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
/ access modifiers changed from: protected
public void reportWarning(int i, String str, String str2, Object obj, String str3) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\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 PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void leti() \n\t{\n\t}", "private TMCourse() {\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "protected FanisamBato(){\n\t}", "public abstract Object mo1771a();", "public abstract void m15813a();", "public void gored() {\n\t\t\n\t}", "@Override\n public void get() {}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@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 }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }" ]
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.6406691", "0.6402136", "0.6400287", "0.63977665", "0.63784796", "0.6373787", "0.63716805", "0.63680965", "0.6353791", "0.63344383", "0.6327005", "0.6327005", "0.63259363", "0.63079315", "0.6279023", "0.6271251", "0.62518364", "0.62254924", "0.62218183", "0.6213994", "0.6204108", "0.6195944", "0.61826825", "0.617686", "0.6158371", "0.6138765", "0.61224854", "0.6119267", "0.6119013", "0.61006695", "0.60922325", "0.60922325", "0.6086324", "0.6083917", "0.607071", "0.6070383", "0.6067458", "0.60568124", "0.6047576", "0.6047091", "0.60342956", "0.6031699", "0.6026248", "0.6019563", "0.60169774", "0.6014913", "0.6011912", "0.59969044", "0.59951806", "0.5994921", "0.599172", "0.59913194", "0.5985337", "0.59844744", "0.59678656", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.5966894", "0.59647757", "0.59647757", "0.59616375", "0.5956373", "0.5952514", "0.59497356", "0.59454703", "0.5941018", "0.5934147", "0.5933801", "0.59318185", "0.5931161", "0.5929297", "0.5926942", "0.5925829", "0.5924853", "0.5923296", "0.5922199", "0.59202504", "0.5918595" ]
0.0
-1
/ access modifiers changed from: protected
public void loadLibrary(String str) { _lancet.com_ss_android_ugc_aweme_lancet_launch_LoadSoLancet_loadLibrary(str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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 ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\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 PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "private TMCourse() {\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected FanisamBato(){\n\t}", "protected void method_3848() {\r\n super.method_3848();\r\n }", "public abstract Object mo1771a();", "public abstract void m15813a();", "@Override\n public void get() {}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "@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 }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public abstract String mo118046b();" ]
[ "0.7375959", "0.70425177", "0.69218665", "0.6908857", "0.68462455", "0.68293995", "0.6805953", "0.6583417", "0.65397364", "0.65014184", "0.6491877", "0.6491877", "0.6472813", "0.64386034", "0.6432003", "0.6432003", "0.64291835", "0.6425716", "0.6419082", "0.6409203", "0.6406647", "0.6401983", "0.6399918", "0.63980156", "0.63775325", "0.637381", "0.6371243", "0.63685536", "0.6354125", "0.63342035", "0.6326444", "0.6326444", "0.6326272", "0.63074166", "0.6279543", "0.62711143", "0.62517804", "0.6225546", "0.6221585", "0.6214133", "0.62042844", "0.6195285", "0.6182919", "0.6176472", "0.61582804", "0.6138921", "0.6122121", "0.6118945", "0.6118614", "0.61002874", "0.60924006", "0.60924006", "0.60867274", "0.6084558", "0.6070018", "0.6070004", "0.60676074", "0.60570544", "0.6047126", "0.6047071", "0.6034709", "0.6031872", "0.6025553", "0.6020158", "0.60166955", "0.6015039", "0.6011175", "0.5995864", "0.59951955", "0.599483", "0.5992563", "0.59914196", "0.5985271", "0.59848785", "0.59677714", "0.5967113", "0.5967113", "0.5967113", "0.5967113", "0.5967113", "0.5967113", "0.5966056", "0.5966056", "0.59610426", "0.59567136", "0.5953479", "0.59491515", "0.5945194", "0.594085", "0.59344965", "0.5932654", "0.5932434", "0.59303945", "0.5929808", "0.5926648", "0.5924341", "0.59239006", "0.5923369", "0.59223837", "0.59204763", "0.59188694" ]
0.0
-1
Use a Factory to inject dependencies into the ViewModel
@NonNull private static MoviesViewModel obtainViewModelMovies(AppCompatActivity activity) { ViewModelFactory factory = ViewModelFactory.getInstance(activity.getApplication()); return ViewModelProviders.of(activity, factory).get(MoviesViewModel.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }", "void inject(NYNewsViewModel nyNewsViewModel);", "private void initViewModel() {\n ViewModelFactory viewModelFactoryGo4Lunch = DI.getViewModelFactory();\n appViewModel = ViewModelProviders.of(this, viewModelFactoryGo4Lunch).get(AppViewModel.class);\n getRestaurantList();\n }", "void setDataModelFactory (DataModelFactory factory);", "public interface ViewCreatorFactory extends Service {\n /**\n * Used to create Views in a space\n */\n interface ViewCreator {\n /**\n * Creates a view\n * @param path\n * @param sql\n * @param sqlContext\n */\n void createView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Updates a view\n * @param path\n * @param sql\n * @param sqlContext\n * @param attributes\n */\n void updateView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Drops a view\n * @param path\n */\n void dropView(List<String> path);\n }\n\n /**\n * get a ViewCreator for a particular user\n * @param userName\n * @return the ViewCreator\n */\n ViewCreator get(String userName);\n}", "public ViewFactory(DataManager dm) {\n this.dm = dm;\n }", "private ViewFactory() {}", "public ContenedorDetalleVehiculoViewModelItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "ModelsFactory getModelsFactory();", "@Test\n public void factoryMVC_integration_test() {\n\n AbstractFactory pFactory = FactoryProducer.getFactory(\"person\");\n Person person = pFactory.getPerson(\"Person\");\n PersonView pView = new PersonView();\n\n PersonController personController = new PersonController(person, pView);\n\n Assert.assertEquals(\"Person\", personController.getPersonName());\n personController.setPersonName(\"newName\");\n Assert.assertEquals(\"newName\", personController.getPersonName());\n\n\n }", "void setupVariables(IVariableFactory factory);", "public interface ModelViewFactory {\r\n\r\n /**\r\n * Get {@link ModelAndView} of given {@link ModelViewType}.\r\n * \r\n * @param type {@link ModelViewType} - type of the view\r\n * @param voucher {@link Voucher} - voucher is used before (submit form) and\r\n * after submit (status form).\r\n * @return {@link ModelAndView}\r\n */\r\n ModelAndView getModelView(ModelViewType type, Voucher voucher);\r\n}", "private void initViewModel() {\n CitiesViewModelFactory factory = Injector.provideCitiesViewModelFactory(getContext().getApplicationContext());\n mViewModel = ViewModelProviders.of(this, factory).get(CitiesViewModel.class);\n mViewModel.getCities().observe(this, this::onCitiesUpdated);\n }", "private void createSearchViewModel() {\n SearchChampionViewModelFactory searchChampionViewModelFactory =\n new SearchChampionViewModelFactory(Injection.provideChampionsRepository(this));\n\n // Create ViewModel\n searchChampionViewModel = ViewModelProviders\n .of(this, searchChampionViewModelFactory)\n .get(SearchChampionViewModel.class);\n }", "private void initViewModel() {\n viewmodel = new ViewModelProvider(getActivity()).get(ScannerViewModel.class);\n viewmodel.createList();\n }", "TestModelFactory getTestModelFactory();", "@Override\n protected void initViewModel() {\n }", "CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }", "private void initViewModel() {\n //Init viewModel\n stockDisplayViewModel = ViewModelProviders.of(getActivity()).get(StockDisplayViewModel.class);\n }", "void inject(MoviesListPresenter moviesListPresenter);", "AgendaViewModel create(Bundle savedInstanceState);", "void setFactoryBean( FactoryBean factory );", "private void setUpViewModels(){\n EventViewModelFactory factory = new EventViewModelFactory(mDatabase, mEventId);\n EventViewModel eventViewModel =\n ViewModelProviders.of(this, factory).get(EventViewModel.class);\n //Uses view model to get category list\n //listener is called any time the categories are changed or updated\n eventViewModel.getCategoryList().observe(this, new Observer<List<Category>>() {\n @Override\n public void onChanged(List<Category> categories) {\n mCategories = new ArrayList<>(categories);\n setUpSpinner(); //sets up spinner if categories change\n }\n });\n\n //creates a new Factory with database and current time\n AddScheduledEventViewModelFactory eventFactory =\n new AddScheduledEventViewModelFactory(mDatabase, Calendar.getInstance().getTimeInMillis());\n AddScheduledEventViewModel addScheduledEventViewModel =\n ViewModelProviders.of(this, eventFactory).get(AddScheduledEventViewModel.class);\n //attaches listener to events list\n addScheduledEventViewModel.getEvents().observe(this, new Observer<List<Event>>() {\n @Override\n public void onChanged(List<Event> events) {\n //updates the events that are given to mScheduler\n if(mScheduler == null){\n mScheduler = new Scheduler(events, Calendar.getInstance(), null);\n } else mScheduler.setEvents(events);\n }\n });\n }", "Demo1Factory getDemo1Factory();", "public interface ViewWithViewModel {\n public void setViewModel(Object viewModel);\n}", "public interface IVM {\n\n /***\n * This method is used to instantiate the data of your viewmodel / its components\n */\n void init();\n\n /***\n * This method is called when you have o clear subscription when using Reactive for example\n */\n void destroy();\n}", "InjectProperty create(ContextManagerFactory contextManagerFactory, Method property);", "void setObjectFactory(Injectable injectable, ObjectFactory<?> objectFactory);", "public interface ViewFactory {\n\n View provideView(int position);\n\n void release();\n}", "public void setFactory(ValueFactory<K, V> factory)\n {\n this.factory = factory;\n }", "private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }", "public interface IViewModel {\n}", "public interface IViewModel {\n}", "public Object run(ModelFactory factory);", "public interface MVP {\n interface ModelImpl{\n public void retrievePersonas();\n public void updateEsFavoritoPersona(Persona persona);\n }\n\n interface PresenterImpl{\n public void retrievePersona(Bundle savedInstanceState);\n public void updateEsFavoritoPersona(Persona persona);\n public void showToast(String mensaje);\n public void showProgressBar(boolean status);\n public void setView(MVP.ViewImpl view);\n public Context getContext();\n public void updateListaRecycler(ArrayList<Persona> personas);\n public void updateItemRecycler(Persona persona);\n public ArrayList<Persona> getPersonas();\n }\n\n interface ViewImpl{\n final String PERSONAS_KEY = \"personas\";\n\n public void showToast(String mensaje);\n public void showProgressBar(int visibilidad);\n public void updateListaRecycler();\n public void updateItemRecycler(int posicion);\n }\n}", "BehaviouralModelFactory getBehaviouralModelFactory();", "private void initPresenter() {\n\n RequestQueue requestQueue = App.getInstance().getRequestQueue();\n CatsHttp catsHttp = new VolleyCatsHttp(requestQueue);\n\n CatsRepository catsRepository = new CatsRepository(catsHttp);\n\n presenter = new MainPresenter(catsRepository);\n presenter.bindView(this);\n }", "public interface BeanFactory {\r\n\t/**\r\n\t * Creates a new instance of the bean this is the factory for and invokes \r\n\t * its {@link Initializer}s.\r\n\t * @param controller the controller to use (needed for Actors only, may be null otherwise)\r\n\t * @param props the initial properties of the new bean\r\n\t * @return the new bean\r\n\t */\r\n\tpublic Object createNewInstance(Controller controller, Props props);\r\n}", "public interface IFactory {\n\n public IUser createUser();\n\n public IDepartment addDepartment();\n}", "public interface IRegisterProductMVP {\n\n interface View{\n\n void setMessageError(String msg, int idView);\n\n }\n\n interface Presenter{\n\n boolean validateData(String name, String description, String dosage, String brand, double price, int stock, int image);\n\n }\n\n interface Model{\n\n\n }\n}", "QuestionnaireFactory getQuestionnaireFactory();", "private MultibinderFactory() { }", "public interface IFactory {\n IUser createUser();\n IDepartment createDepartment();\n}", "public void setDependencyFactory( DependencyFactory dependencyFactory ) \r\n {\r\n this.dependencyFactory = dependencyFactory;\r\n }", "public ViewModel(IModel model) {\n this.model = model;\n }", "Builder injectionFactory(InjectionObjectFactory factory);", "public BrowserPresenterFactory(Context context) {\n this.context = context;\n }", "private void getAndBindViewModel() {\n game.getHumanPlayer().getNations().stream().filter(Nation::isSquadronsPresent).forEach(nation -> {\n RegionViewModel regionViewModel = regionViewModelProvider.get();\n regionViewModelMap.put(nation, regionViewModel);\n\n AirfieldViewModel airfieldViewModel = airfieldViewModelProvider.get();\n airfieldViewModelMap.put(nation, airfieldViewModel);\n\n view\n .bind(nation, regionViewModel)\n .bind(nation, airfieldViewModel)\n .bind(nation, deploymentViewModel);\n });\n }", "public abstract void setupMvpPresenter();", "public interface ResumeHolderFactory {\n BaseViewHolder createHolder(int type, View view);\n int getType(RepoVM repoVM);\n}", "public interface GridPanelFactory {\r\n /**\r\n * Creates an instance of the grid panel and initializes it.\r\n *\r\n * @param model is a model instance.\r\n * @return a newly created grid panel.\r\n */\r\n GridPanel create(GridDataModel model);\r\n\r\n /**\r\n * This method creates a data model.<p>\r\n * It's used by the hiearachical grid if there is no data model defined for the cell \r\n * in the parent data model.\r\n *\r\n * @param parentRow is a parent model row.\r\n * @param parentModel is a parent model instance.\r\n * \r\n * @return a data model.\r\n */\r\n GridDataModel create(int parentRow, GridDataModel parentModel);\r\n}", "public MainView(@Autowired GreetService service) {\n\n add(new Label(\"Custom View below\"));\n final TestDesign1 testDesign1 = new TestDesign1();\n testDesign1.getpButton().setText(\"Button Text\");\n testDesign1.getpCheckbox().setValue(true);\n testDesign1.getpComboBox().setDataProvider(new ListDataProvider<>(Arrays.asList(\"Dog\", \"Cat\", \"Mouse\", \"Snake\")));\n testDesign1.getpTextField().setPlaceholder(\"Something\");\n testDesign1.getpTable().setDataProvider(DataProvider.ofItems(new PTable.TableBean(\"Anakin\", \"Skywalker\", \"Outer Rim\", 22, LocalDate.of(2000, 10, 10)),\n new PTable.TableBean(\"Lea\", \"Organa\", \"Alderan\", 33, LocalDate.of(1999, 9, 11)),\n new PTable.TableBean(\"Luke\", \"Skywalker\", \"Outer Rim\", 44, LocalDate.of(1998, 8, 12)),\n new PTable.TableBean(\"Obi Wan\", \"Kenobi\", \"Corouscant\", 55, LocalDate.of(1997, 7, 13)),\n new PTable.TableBean(\"Han\", \"Solo\", \"Falcon\", 66, LocalDate.of(1996, 6, 14))));\n add(testDesign1);\n\n add(new Label(\"Vaadin View Below\"));\n final TestDesign2 testDesign2 = new TestDesign2();\n add(testDesign2);\n }", "public ContenedorloginviewmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public interface PropertiesFactory {\n\n\t/**\n\t * Creates properties list.\n\t * @param app properties for app\n\t * @param localization localization for properties\n\t * @param onLanguageSetCallback callback when language is set\n\t * @return a list of properties\n\t */\n\tList<PropertiesArray> createProperties(App app, Localization localization,\n\t\t\tLanguageProperty.OnLanguageSetCallback onLanguageSetCallback);\n}", "public abstract V getViewModel();", "public abstract V getViewModel();", "public abstract V getViewModel();", "private void initMVP() {\n mainPresenter = new MainPresenter(this, getActivity());\n }", "private void configureEstateCreateViewModel(){\n ViewModelFactory modelFactory = Injection.provideViewModelFactory(this);\n mSearchEstateViewModel = ViewModelProviders.of(this, modelFactory).get(SearchEstateViewModel.class);\n\n mSearchEstateViewModel.getViewActionLiveData().observe(this, new Observer<SearchEstateViewModel.ViewAction>() {\n @Override\n public void onChanged(SearchEstateViewModel.ViewAction viewAction) {\n if (viewAction == null) {\n return;\n }\n\n switch (viewAction) {\n case INVALID_INPUT:\n showSnackBar(\"Invalid data search\");\n break;\n\n case FINISH_ACTIVITY:\n Intent intent = new Intent();\n intent.putExtra(BUNDLE_SEARCH_OK,true);\n intent.putExtra(BUNDLE_SEARCH_DATA, mSearchEstateViewModel.getSearchData());\n setResult(RESULT_OK,intent);\n // Close Activity and go back to previous activity with a SearchData Object\n finish();\n break;\n }\n }\n });\n\n // Observe a change of Date of Entry1 on the Market\n mSearchEstateViewModel.getDateEntryOfTheMarket1().observe(this,this::refreshDateEntryOfTheMarket1);\n // Observe a change of Date of Entry2 on the Market\n mSearchEstateViewModel.getDateEntryOfTheMarket2().observe(this,this::refreshDateEntryOfTheMarket2);\n // Observe a change of Date of Sale1 on the Market\n mSearchEstateViewModel.getDateSale1().observe(this,this::refreshDateSale1);\n // Observe a change of Date of Sale2 on the Market\n mSearchEstateViewModel.getDateSale2().observe(this,this::refreshDateSale2);\n }", "StoriesFactory getStoriesFactory();", "public interface ITVFactory {\n ITV createTV();\n}", "public interface NewsDetailsPresenter {\n\n void setView(NewsDetailsView view);\n\n void setNews(News news);\n\n News getNews();\n\n void destroy();\n\n List<NewsComment> getNewsCommentsList();\n\n void setNewsCommentsList(List<NewsComment> newsCommentsList);\n\n}", "public interface Factory {\r\n}", "void setObjectFactory(Injectable injectable, ObjectFactory<?> objectFactory, InjectionAttributes attributes);", "public interface ConfigModelFactory\n{\n\t/**\n\t * Create an instance of the <code>ConfigModel</code>\n\t *\n\t * @return an instance of the configuration model\n\t */\n\tConfigModel createInstanceOfConfigModel();\n\n\t/**\n\t * Create an instance of the <code>InstanceModel</code>\n\t *\n\t * @return an instance of the instance model\n\t */\n\tInstanceModel createInstanceOfInstanceModel();\n\n\t/**\n\t * Create an instance of the <code>CsticModel</code>\n\t *\n\t * @return an instance of the characteristic model\n\t */\n\tCsticModel createInstanceOfCsticModel();\n\n\t/**\n\t * Create an instance of the <code>CsticValueModel</code>\n\t *\n\t * @param valueType\n\t * The containing Cstic value type\n\t * @return an instance of the characteristic value model\n\t */\n\tCsticValueModel createInstanceOfCsticValueModel(int valueType);\n\n\t/**\n\t * Create an instance of the <code>CsticGroupModel</code>\n\t *\n\t * @return an instance of the characteristic group model\n\t */\n\tCsticGroupModel createInstanceOfCsticGroupModel();\n\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel createInstanceOfPriceModel();\n\n\t/**\n\t * Create an instance of the <code>SolvableConflictModel</code>\n\t *\n\t * @return an instance of the Solvable Conflict Model\n\t */\n\tSolvableConflictModel createInstanceOfSolvableConflictModel();\n\n\t/**\n\t * Create an instance of the <code>ConflictingAssumptionModel</code>\n\t *\n\t * @return an instance of the Conflicting Assumption Model\n\t */\n\tConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel getZeroPriceModel();\n\n\t/**\n\t * Create an instance of the <code>PriceSummaryModel</code>\n\t *\n\t * @return an instance of the price summary model\n\t */\n\tPriceSummaryModel createInstanceOfPriceSummaryModel();\n\n\t/**\n\t * @return a builder to construct {@link ProductConfigMessage} objects\n\t */\n\tdefault ProductConfigMessageBuilder createProductConfigMessageBuilder()\n\t{\n\t\treturn new ProductConfigMessageBuilder();\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t * uses the <code>DEFAULT</code> ProductConfigMessageSourceSubType\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tdefault ProductConfigMessage createInstanceOfProductConfigMessage(final String message, final String key,\n\t\t\tfinal ProductConfigMessageSeverity severity, final ProductConfigMessageSource source)\n\t{\n\t\treturn createInstanceOfProductConfigMessage(message, key, severity, source, ProductConfigMessageSourceSubType.DEFAULT);\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @param subType\n\t * optional sub type of the message source\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tProductConfigMessage createInstanceOfProductConfigMessage(String message, String key, ProductConfigMessageSeverity severity,\n\t\t\tProductConfigMessageSource source, ProductConfigMessageSourceSubType subType);\n\n\n\t/**\n\t * Create an instance of the <code>VariantConditionModel</code>\n\t *\n\t * @return an instance of the variant condition model\n\t */\n\tVariantConditionModel createInstanceOfVariantConditionModel();\n\n\t/**\n\t * @return class name of the {@link PriceSummaryModel} implementation\n\t */\n\tString getTargetClassNamePriceSummaryModel();\n\n\n\t/**\n\t * @return class name of the {@link PriceModel} implementation\n\t */\n\tString getTargetClassNamePriceModel();\n\n\t/**\n\t * @return class name of the {@link CsticGroupModel} implementation\n\t */\n\tString getTargetClassNameCsticGroupModel();\n\n\t/**\n\t * @return class name of the {@link CsticValueModel} implementation\n\t */\n\tString getTargetClassNameCsticValueModel();\n\n\t/**\n\t * @return class name of the {@link CsticModel} implementation\n\t */\n\tString getTargetClassNameCsticModel();\n\n\t/**\n\t * @return class name of the {@link InstanceModel} implementation\n\t */\n\tString getTargetClassNameInstanceModel();\n\n\t/**\n\t * @return class name of the {@link ConfigModel} implementation\n\t */\n\tString getTargetClassNameConfigModel();\n\n\t/**\n\t * @return class name of the {@link SolvableConflictModel} implementation\n\t */\n\tString getTargetClassNameSolvableConflictModel();\n\n\t/**\n\t * @return class name of the {@link ConflictingAssumptionModel} implementation\n\t */\n\tString getTargetClassNameConflictingAssumptionModel();\n\n\t/**\n\t * @return class name of the {@link VariantConditionModel} implementation\n\t */\n\tString getTargetClassNameVariantConditionModel();\n}", "public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public interface IConvertContract {\n interface IConvertView extends IBaseView{\n void showOrderGoods(List<OrderGoodsDto> orderGoodsDtos);\n void startSelectAddress();\n void showDefaultAddress(AddressDto addressDto);\n\n void showConversionGoodsResult(boolean isSuccess);\n void showTotalMoney(int totalMoney);\n }\n\n interface IConvertModel{\n Observable<String> doConversionGoods(List<OrderGoodsDto> orderGoodsDtos);\n Observable<AddressDto> getDefaultAddress();\n }\n\n interface IConvertPresenter{\n void doSelectAddress();\n void getDefaultAddress();\n void doConvertGoodsToOrder(List<GoodsDto> goodsDtos);\n void doConversionGoods(List<OrderGoodsDto> orderGoodsDtos);\n void doSetTotalMoney(int totalMoney);\n }\n}", "public void setUpViewModel() {\n final FavoriteViewModel viewModel = ViewModelProviders.of(this).get(FavoriteViewModel.class);\n viewModel.getFavorites().observe(this, new Observer<List<NoteEntry>>() {\n @Override\n public void onChanged(@Nullable List<NoteEntry> noteEntries) {\n mAdapter.setNotes(noteEntries);\n toggleEmptyView(noteEntries);\n }\n });\n }", "public interface TargetFactory<R extends View,T> {\n\n DisposableObserver<T> buildTarget(R r);\n DisposableObserver<T> buildTarget(R r, LoadCallBack loadCallBack);\n}", "public interface TypeFactory {\n int type(Meizi m);\n\n int type(String string);\n\n BaseViewHolder creatViewHolder(int viewType, View view);\n}", "public interface CreateProgramView extends MvpView\n{\n\tvoid initViewPager(Boolean needPublicInfo, Boolean needDeposit, CreateProgramModel model);\n\n\tvoid showSettings();\n\n\tvoid showDeposit();\n\n\tvoid showProgress(boolean show);\n\n\tvoid showSnackbarMessage(String message);\n\n\tvoid finishActivity();\n}", "PlanningFactory getFactory();", "@Inject\n public AuthViewModel(AuthApi authApi, SessionManager sessionManager) {\n mAuthApi = authApi;\n mSessionManager = sessionManager;\n }", "@Inject\n public ImmutabilityTools(TermFactory termFactory) {\n this.termFactory = termFactory;\n }", "public ScriptExpressionEvaluatorFactory(ScriptExpressionFactory scriptExpressionFactory,\n\t\t\tSecurityContextManager securityContextManager, PrismContext prismContext) {\n\t\tthis.scriptExpressionFactory = scriptExpressionFactory;\n this.securityContextManager = securityContextManager;\n this.prismContext = prismContext;\n\t}", "private void setupFactory(Factory f) {\n f.createQuery(f.getModel().getRootPackage()).filterChildren(e -> {\n e.setFactory(f);\n return false;\n }).list();\n }", "public interface IFactory {\n IProductA getProductA();\n IProductB getProductB();\n}", "public interface ModelFactory <ModelObject> {\n public void createElement(ModelObject object);\n}", "public Framework_matriculaItemProviderAdapterFactory() {\n\t\tsupportedTypes.add(IEditingDomainItemProvider.class);\n\t\tsupportedTypes.add(IStructuredItemContentProvider.class);\n\t\tsupportedTypes.add(ITreeItemContentProvider.class);\n\t\tsupportedTypes.add(IItemLabelProvider.class);\n\t\tsupportedTypes.add(IItemPropertySource.class);\n\t}", "public FurnitureController(Home home, \n UserPreferences preferences,\n ViewFactory viewFactory) {\n this(home, preferences, viewFactory, null, null); \n }", "private void initViewModel() {\n SearchUserViewModel uvm = new SearchUserViewModel(this);\n mBinding.searchUserLayout.setUvm(uvm);\n }", "public interface Factory{\n\n @NonNull\n Navigator createNavigator();\n }", "QuestionarioFactory getQuestionarioFactory();", "void inject(HomeView homeView);", "public interface IOrderView extends MvpView {\n void showView(List<Order> orders);\n void addOrder();\n}", "public interface WordsAllView extends MvpView {\n void showWordlists(List<Word> wordlists);\n void setPresenter(WordsAllPresenter<WordsAllView> presenter);\n}", "public interface ProjectHomePresenter {\n\n void init();\n\n}", "protected abstract void setupMvpView();", "public interface CategoryTourPresenter {\n\n void getAllCategory();\n\n interface View extends BaseView{\n\n void showAllCategory(List<ItemCategory> itemCategoryList);\n }\n\n}", "public ParsedmodelFactoryImpl() {\n\t\tsuper();\n\t}", "public interface IView {\n void initializePresenter();\n BasePresenter getPresenter();\n}", "protected abstract GameViewFactory getGameViewFactory();", "private void configureViewModel(){\n viewModel = ViewModelProviders.of(this, viewModelFactory).get(SearchViewModel.class);\n\n //viewModel.init(binding.etSearchQuery.getText().toString());\n\n viewModel.getSearchResults().observe(this, searchResponse -> {\n\n // Update UI here\n\n if(searchResponse != null && searchResponse.getSearchResults() != null && searchResponse.getSearchResults().size() > 0) {\n\n SearchResultRvAdapter rvAdapter = new SearchResultRvAdapter(searchResponse.getSearchResults());\n binding.rvRepos.setAdapter(rvAdapter);\n }\n\n });\n }", "public interface IViewGetter<T,V extends View> {\n V createView(Context context);\n void initView(V view, T bean);\n}", "@Singleton\n@Component(modules = {ModelModule.class, PresenterModule.class})\npublic interface AppComponent {\n void inject(ModelImpl dataRepository);\n\n void inject(BasePresenter basePresenter);\n\n void inject(PresenterSearch presenterSearch);\n\n void inject(FavouriteActivity favouriteActivity);\n}", "public interface UnitFactory {\n Gui_Unit createUnit(String name, int team);\n Gui_Unit copy(Gui_Unit guiUnit);\n\n static UnitFactory getUnitFactory(UnitClassNames name){\n UnitFactory factory = null;\n\n switch (name){\n case ARTILLERY:{\n factory = new ArtilleryFactory();\n break;\n }\n case VEHICLE:{\n factory = new VehicleFactory();\n break;\n }\n case LIGHT_INFANTRY:{\n factory = new LightInfantryFactory();\n break;\n }\n case MELEE_INFANTRY:{\n factory = new MeleeInfantryFactory();\n break;\n }\n case HEAVY_INFANTRY:{\n factory = new HeavyInfantryFactory();\n break;\n }\n }\n return factory ;\n }\n}", "void inject(TravelsProvider provider);", "public ModelItemProviderAdapterFactory() {\n\t\tsupportedTypes.add(IEditingDomainItemProvider.class);\n\t\tsupportedTypes.add(IStructuredItemContentProvider.class);\n\t\tsupportedTypes.add(ITreeItemContentProvider.class);\n\t\tsupportedTypes.add(IItemLabelProvider.class);\n\t\tsupportedTypes.add(IItemPropertySource.class);\n\t}", "public interface ParamResolverFactory<T> {\n ParamResolver<T> createParamResolver(Parameter parameter);\n}", "public interface ISupportViewModel {\n /** View的界面创建时回调 */\n void onCreate();\n\n /** View的界面销毁时回调*/\n void onDestroy();\n\n}", "public interface Factory {\n LeiFeng createLeiFeng();\n}" ]
[ "0.67104053", "0.64117134", "0.6267387", "0.6148617", "0.6074435", "0.6034059", "0.5956218", "0.58935964", "0.5889535", "0.58716047", "0.58518606", "0.58419424", "0.5785589", "0.5752367", "0.5731374", "0.5713218", "0.5709199", "0.57055515", "0.5684043", "0.5606752", "0.56007093", "0.5584373", "0.55813533", "0.55794185", "0.5549376", "0.5545854", "0.5538895", "0.5520105", "0.5515223", "0.55077004", "0.55073434", "0.5502018", "0.5502018", "0.54994667", "0.54929256", "0.54589146", "0.54585963", "0.5428111", "0.5426669", "0.5420451", "0.5413116", "0.5411438", "0.53996855", "0.5397871", "0.539704", "0.5388573", "0.53859043", "0.53694785", "0.5356438", "0.53552157", "0.5354548", "0.53390115", "0.5336606", "0.533549", "0.532913", "0.532913", "0.532913", "0.53224015", "0.53163624", "0.53138876", "0.5309891", "0.5305443", "0.53054315", "0.530168", "0.53002644", "0.5297834", "0.5295345", "0.5282747", "0.52723014", "0.52627856", "0.5246391", "0.5245533", "0.5242332", "0.5242258", "0.5241183", "0.5237629", "0.52347773", "0.5206065", "0.5190549", "0.5187351", "0.5184106", "0.5181878", "0.5179543", "0.5176078", "0.5174642", "0.5174608", "0.5172797", "0.51722354", "0.51696664", "0.5163928", "0.51617205", "0.51549035", "0.5150507", "0.51492065", "0.51472366", "0.513492", "0.51232296", "0.51201797", "0.5110691", "0.510866", "0.5108322" ]
0.0
-1
Use a Factory to inject dependencies into the ViewModel
@NonNull private static TVShowsViewModel obtainViewModelTvShow(AppCompatActivity activity) { ViewModelFactory factory = ViewModelFactory.getInstance(activity.getApplication()); return ViewModelProviders.of(activity, factory).get(TVShowsViewModel.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "interface Factory {\r\n /**\r\n * Create an instance of an agenda view model with the given saved\r\n * instance state.\r\n *\r\n * @param savedInstanceState previously saved state of the view model\r\n * @return the created agenda view model\r\n */\r\n AgendaViewModel create(Bundle savedInstanceState);\r\n }", "void inject(NYNewsViewModel nyNewsViewModel);", "private void initViewModel() {\n ViewModelFactory viewModelFactoryGo4Lunch = DI.getViewModelFactory();\n appViewModel = ViewModelProviders.of(this, viewModelFactoryGo4Lunch).get(AppViewModel.class);\n getRestaurantList();\n }", "void setDataModelFactory (DataModelFactory factory);", "public interface ViewCreatorFactory extends Service {\n /**\n * Used to create Views in a space\n */\n interface ViewCreator {\n /**\n * Creates a view\n * @param path\n * @param sql\n * @param sqlContext\n */\n void createView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Updates a view\n * @param path\n * @param sql\n * @param sqlContext\n * @param attributes\n */\n void updateView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Drops a view\n * @param path\n */\n void dropView(List<String> path);\n }\n\n /**\n * get a ViewCreator for a particular user\n * @param userName\n * @return the ViewCreator\n */\n ViewCreator get(String userName);\n}", "public ViewFactory(DataManager dm) {\n this.dm = dm;\n }", "private ViewFactory() {}", "public ContenedorDetalleVehiculoViewModelItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "ModelsFactory getModelsFactory();", "@Test\n public void factoryMVC_integration_test() {\n\n AbstractFactory pFactory = FactoryProducer.getFactory(\"person\");\n Person person = pFactory.getPerson(\"Person\");\n PersonView pView = new PersonView();\n\n PersonController personController = new PersonController(person, pView);\n\n Assert.assertEquals(\"Person\", personController.getPersonName());\n personController.setPersonName(\"newName\");\n Assert.assertEquals(\"newName\", personController.getPersonName());\n\n\n }", "void setupVariables(IVariableFactory factory);", "public interface ModelViewFactory {\r\n\r\n /**\r\n * Get {@link ModelAndView} of given {@link ModelViewType}.\r\n * \r\n * @param type {@link ModelViewType} - type of the view\r\n * @param voucher {@link Voucher} - voucher is used before (submit form) and\r\n * after submit (status form).\r\n * @return {@link ModelAndView}\r\n */\r\n ModelAndView getModelView(ModelViewType type, Voucher voucher);\r\n}", "private void initViewModel() {\n CitiesViewModelFactory factory = Injector.provideCitiesViewModelFactory(getContext().getApplicationContext());\n mViewModel = ViewModelProviders.of(this, factory).get(CitiesViewModel.class);\n mViewModel.getCities().observe(this, this::onCitiesUpdated);\n }", "private void createSearchViewModel() {\n SearchChampionViewModelFactory searchChampionViewModelFactory =\n new SearchChampionViewModelFactory(Injection.provideChampionsRepository(this));\n\n // Create ViewModel\n searchChampionViewModel = ViewModelProviders\n .of(this, searchChampionViewModelFactory)\n .get(SearchChampionViewModel.class);\n }", "private void initViewModel() {\n viewmodel = new ViewModelProvider(getActivity()).get(ScannerViewModel.class);\n viewmodel.createList();\n }", "TestModelFactory getTestModelFactory();", "@Override\n protected void initViewModel() {\n }", "CreateEventViewModelFactory() {\n super(Storage.class, Authenticator.class);\n }", "private void initViewModel() {\n //Init viewModel\n stockDisplayViewModel = ViewModelProviders.of(getActivity()).get(StockDisplayViewModel.class);\n }", "void inject(MoviesListPresenter moviesListPresenter);", "AgendaViewModel create(Bundle savedInstanceState);", "void setFactoryBean( FactoryBean factory );", "private void setUpViewModels(){\n EventViewModelFactory factory = new EventViewModelFactory(mDatabase, mEventId);\n EventViewModel eventViewModel =\n ViewModelProviders.of(this, factory).get(EventViewModel.class);\n //Uses view model to get category list\n //listener is called any time the categories are changed or updated\n eventViewModel.getCategoryList().observe(this, new Observer<List<Category>>() {\n @Override\n public void onChanged(List<Category> categories) {\n mCategories = new ArrayList<>(categories);\n setUpSpinner(); //sets up spinner if categories change\n }\n });\n\n //creates a new Factory with database and current time\n AddScheduledEventViewModelFactory eventFactory =\n new AddScheduledEventViewModelFactory(mDatabase, Calendar.getInstance().getTimeInMillis());\n AddScheduledEventViewModel addScheduledEventViewModel =\n ViewModelProviders.of(this, eventFactory).get(AddScheduledEventViewModel.class);\n //attaches listener to events list\n addScheduledEventViewModel.getEvents().observe(this, new Observer<List<Event>>() {\n @Override\n public void onChanged(List<Event> events) {\n //updates the events that are given to mScheduler\n if(mScheduler == null){\n mScheduler = new Scheduler(events, Calendar.getInstance(), null);\n } else mScheduler.setEvents(events);\n }\n });\n }", "Demo1Factory getDemo1Factory();", "public interface ViewWithViewModel {\n public void setViewModel(Object viewModel);\n}", "public interface IVM {\n\n /***\n * This method is used to instantiate the data of your viewmodel / its components\n */\n void init();\n\n /***\n * This method is called when you have o clear subscription when using Reactive for example\n */\n void destroy();\n}", "InjectProperty create(ContextManagerFactory contextManagerFactory, Method property);", "void setObjectFactory(Injectable injectable, ObjectFactory<?> objectFactory);", "public interface ViewFactory {\n\n View provideView(int position);\n\n void release();\n}", "public void setFactory(ValueFactory<K, V> factory)\n {\n this.factory = factory;\n }", "private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }", "public interface IViewModel {\n}", "public interface IViewModel {\n}", "public Object run(ModelFactory factory);", "public interface MVP {\n interface ModelImpl{\n public void retrievePersonas();\n public void updateEsFavoritoPersona(Persona persona);\n }\n\n interface PresenterImpl{\n public void retrievePersona(Bundle savedInstanceState);\n public void updateEsFavoritoPersona(Persona persona);\n public void showToast(String mensaje);\n public void showProgressBar(boolean status);\n public void setView(MVP.ViewImpl view);\n public Context getContext();\n public void updateListaRecycler(ArrayList<Persona> personas);\n public void updateItemRecycler(Persona persona);\n public ArrayList<Persona> getPersonas();\n }\n\n interface ViewImpl{\n final String PERSONAS_KEY = \"personas\";\n\n public void showToast(String mensaje);\n public void showProgressBar(int visibilidad);\n public void updateListaRecycler();\n public void updateItemRecycler(int posicion);\n }\n}", "BehaviouralModelFactory getBehaviouralModelFactory();", "private void initPresenter() {\n\n RequestQueue requestQueue = App.getInstance().getRequestQueue();\n CatsHttp catsHttp = new VolleyCatsHttp(requestQueue);\n\n CatsRepository catsRepository = new CatsRepository(catsHttp);\n\n presenter = new MainPresenter(catsRepository);\n presenter.bindView(this);\n }", "public interface BeanFactory {\r\n\t/**\r\n\t * Creates a new instance of the bean this is the factory for and invokes \r\n\t * its {@link Initializer}s.\r\n\t * @param controller the controller to use (needed for Actors only, may be null otherwise)\r\n\t * @param props the initial properties of the new bean\r\n\t * @return the new bean\r\n\t */\r\n\tpublic Object createNewInstance(Controller controller, Props props);\r\n}", "public interface IFactory {\n\n public IUser createUser();\n\n public IDepartment addDepartment();\n}", "public interface IRegisterProductMVP {\n\n interface View{\n\n void setMessageError(String msg, int idView);\n\n }\n\n interface Presenter{\n\n boolean validateData(String name, String description, String dosage, String brand, double price, int stock, int image);\n\n }\n\n interface Model{\n\n\n }\n}", "QuestionnaireFactory getQuestionnaireFactory();", "private MultibinderFactory() { }", "public interface IFactory {\n IUser createUser();\n IDepartment createDepartment();\n}", "public void setDependencyFactory( DependencyFactory dependencyFactory ) \r\n {\r\n this.dependencyFactory = dependencyFactory;\r\n }", "public ViewModel(IModel model) {\n this.model = model;\n }", "Builder injectionFactory(InjectionObjectFactory factory);", "public BrowserPresenterFactory(Context context) {\n this.context = context;\n }", "private void getAndBindViewModel() {\n game.getHumanPlayer().getNations().stream().filter(Nation::isSquadronsPresent).forEach(nation -> {\n RegionViewModel regionViewModel = regionViewModelProvider.get();\n regionViewModelMap.put(nation, regionViewModel);\n\n AirfieldViewModel airfieldViewModel = airfieldViewModelProvider.get();\n airfieldViewModelMap.put(nation, airfieldViewModel);\n\n view\n .bind(nation, regionViewModel)\n .bind(nation, airfieldViewModel)\n .bind(nation, deploymentViewModel);\n });\n }", "public interface ResumeHolderFactory {\n BaseViewHolder createHolder(int type, View view);\n int getType(RepoVM repoVM);\n}", "public abstract void setupMvpPresenter();", "public interface GridPanelFactory {\r\n /**\r\n * Creates an instance of the grid panel and initializes it.\r\n *\r\n * @param model is a model instance.\r\n * @return a newly created grid panel.\r\n */\r\n GridPanel create(GridDataModel model);\r\n\r\n /**\r\n * This method creates a data model.<p>\r\n * It's used by the hiearachical grid if there is no data model defined for the cell \r\n * in the parent data model.\r\n *\r\n * @param parentRow is a parent model row.\r\n * @param parentModel is a parent model instance.\r\n * \r\n * @return a data model.\r\n */\r\n GridDataModel create(int parentRow, GridDataModel parentModel);\r\n}", "public MainView(@Autowired GreetService service) {\n\n add(new Label(\"Custom View below\"));\n final TestDesign1 testDesign1 = new TestDesign1();\n testDesign1.getpButton().setText(\"Button Text\");\n testDesign1.getpCheckbox().setValue(true);\n testDesign1.getpComboBox().setDataProvider(new ListDataProvider<>(Arrays.asList(\"Dog\", \"Cat\", \"Mouse\", \"Snake\")));\n testDesign1.getpTextField().setPlaceholder(\"Something\");\n testDesign1.getpTable().setDataProvider(DataProvider.ofItems(new PTable.TableBean(\"Anakin\", \"Skywalker\", \"Outer Rim\", 22, LocalDate.of(2000, 10, 10)),\n new PTable.TableBean(\"Lea\", \"Organa\", \"Alderan\", 33, LocalDate.of(1999, 9, 11)),\n new PTable.TableBean(\"Luke\", \"Skywalker\", \"Outer Rim\", 44, LocalDate.of(1998, 8, 12)),\n new PTable.TableBean(\"Obi Wan\", \"Kenobi\", \"Corouscant\", 55, LocalDate.of(1997, 7, 13)),\n new PTable.TableBean(\"Han\", \"Solo\", \"Falcon\", 66, LocalDate.of(1996, 6, 14))));\n add(testDesign1);\n\n add(new Label(\"Vaadin View Below\"));\n final TestDesign2 testDesign2 = new TestDesign2();\n add(testDesign2);\n }", "public ContenedorloginviewmodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public interface PropertiesFactory {\n\n\t/**\n\t * Creates properties list.\n\t * @param app properties for app\n\t * @param localization localization for properties\n\t * @param onLanguageSetCallback callback when language is set\n\t * @return a list of properties\n\t */\n\tList<PropertiesArray> createProperties(App app, Localization localization,\n\t\t\tLanguageProperty.OnLanguageSetCallback onLanguageSetCallback);\n}", "public abstract V getViewModel();", "public abstract V getViewModel();", "public abstract V getViewModel();", "private void initMVP() {\n mainPresenter = new MainPresenter(this, getActivity());\n }", "private void configureEstateCreateViewModel(){\n ViewModelFactory modelFactory = Injection.provideViewModelFactory(this);\n mSearchEstateViewModel = ViewModelProviders.of(this, modelFactory).get(SearchEstateViewModel.class);\n\n mSearchEstateViewModel.getViewActionLiveData().observe(this, new Observer<SearchEstateViewModel.ViewAction>() {\n @Override\n public void onChanged(SearchEstateViewModel.ViewAction viewAction) {\n if (viewAction == null) {\n return;\n }\n\n switch (viewAction) {\n case INVALID_INPUT:\n showSnackBar(\"Invalid data search\");\n break;\n\n case FINISH_ACTIVITY:\n Intent intent = new Intent();\n intent.putExtra(BUNDLE_SEARCH_OK,true);\n intent.putExtra(BUNDLE_SEARCH_DATA, mSearchEstateViewModel.getSearchData());\n setResult(RESULT_OK,intent);\n // Close Activity and go back to previous activity with a SearchData Object\n finish();\n break;\n }\n }\n });\n\n // Observe a change of Date of Entry1 on the Market\n mSearchEstateViewModel.getDateEntryOfTheMarket1().observe(this,this::refreshDateEntryOfTheMarket1);\n // Observe a change of Date of Entry2 on the Market\n mSearchEstateViewModel.getDateEntryOfTheMarket2().observe(this,this::refreshDateEntryOfTheMarket2);\n // Observe a change of Date of Sale1 on the Market\n mSearchEstateViewModel.getDateSale1().observe(this,this::refreshDateSale1);\n // Observe a change of Date of Sale2 on the Market\n mSearchEstateViewModel.getDateSale2().observe(this,this::refreshDateSale2);\n }", "StoriesFactory getStoriesFactory();", "public interface ITVFactory {\n ITV createTV();\n}", "public interface NewsDetailsPresenter {\n\n void setView(NewsDetailsView view);\n\n void setNews(News news);\n\n News getNews();\n\n void destroy();\n\n List<NewsComment> getNewsCommentsList();\n\n void setNewsCommentsList(List<NewsComment> newsCommentsList);\n\n}", "public interface Factory {\r\n}", "void setObjectFactory(Injectable injectable, ObjectFactory<?> objectFactory, InjectionAttributes attributes);", "public interface ConfigModelFactory\n{\n\t/**\n\t * Create an instance of the <code>ConfigModel</code>\n\t *\n\t * @return an instance of the configuration model\n\t */\n\tConfigModel createInstanceOfConfigModel();\n\n\t/**\n\t * Create an instance of the <code>InstanceModel</code>\n\t *\n\t * @return an instance of the instance model\n\t */\n\tInstanceModel createInstanceOfInstanceModel();\n\n\t/**\n\t * Create an instance of the <code>CsticModel</code>\n\t *\n\t * @return an instance of the characteristic model\n\t */\n\tCsticModel createInstanceOfCsticModel();\n\n\t/**\n\t * Create an instance of the <code>CsticValueModel</code>\n\t *\n\t * @param valueType\n\t * The containing Cstic value type\n\t * @return an instance of the characteristic value model\n\t */\n\tCsticValueModel createInstanceOfCsticValueModel(int valueType);\n\n\t/**\n\t * Create an instance of the <code>CsticGroupModel</code>\n\t *\n\t * @return an instance of the characteristic group model\n\t */\n\tCsticGroupModel createInstanceOfCsticGroupModel();\n\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel createInstanceOfPriceModel();\n\n\t/**\n\t * Create an instance of the <code>SolvableConflictModel</code>\n\t *\n\t * @return an instance of the Solvable Conflict Model\n\t */\n\tSolvableConflictModel createInstanceOfSolvableConflictModel();\n\n\t/**\n\t * Create an instance of the <code>ConflictingAssumptionModel</code>\n\t *\n\t * @return an instance of the Conflicting Assumption Model\n\t */\n\tConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();\n\n\t/**\n\t * Create an instance of the <code>PriceModel</code>\n\t *\n\t * @return an instance of the price model\n\t */\n\tPriceModel getZeroPriceModel();\n\n\t/**\n\t * Create an instance of the <code>PriceSummaryModel</code>\n\t *\n\t * @return an instance of the price summary model\n\t */\n\tPriceSummaryModel createInstanceOfPriceSummaryModel();\n\n\t/**\n\t * @return a builder to construct {@link ProductConfigMessage} objects\n\t */\n\tdefault ProductConfigMessageBuilder createProductConfigMessageBuilder()\n\t{\n\t\treturn new ProductConfigMessageBuilder();\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t * uses the <code>DEFAULT</code> ProductConfigMessageSourceSubType\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tdefault ProductConfigMessage createInstanceOfProductConfigMessage(final String message, final String key,\n\t\t\tfinal ProductConfigMessageSeverity severity, final ProductConfigMessageSource source)\n\t{\n\t\treturn createInstanceOfProductConfigMessage(message, key, severity, source, ProductConfigMessageSourceSubType.DEFAULT);\n\t}\n\n\t/**\n\t * Create an instance of the <code>ProductConfigMessage</code><br>\n\t *\n\t * @param message\n\t * localized message\n\t * @param key\n\t * message key, should be unique together with message source\n\t * @param severity\n\t * message severity\n\t * @param source\n\t * message source, should be unique together with message key\n\t * @param subType\n\t * optional sub type of the message source\n\t * @return a message instance\n\t * @deprecated since 18.08.0 - use {@link ProductConfigMessageBuilder} instead\n\t */\n\t@Deprecated(since = \"1808\", forRemoval=true)\n\tProductConfigMessage createInstanceOfProductConfigMessage(String message, String key, ProductConfigMessageSeverity severity,\n\t\t\tProductConfigMessageSource source, ProductConfigMessageSourceSubType subType);\n\n\n\t/**\n\t * Create an instance of the <code>VariantConditionModel</code>\n\t *\n\t * @return an instance of the variant condition model\n\t */\n\tVariantConditionModel createInstanceOfVariantConditionModel();\n\n\t/**\n\t * @return class name of the {@link PriceSummaryModel} implementation\n\t */\n\tString getTargetClassNamePriceSummaryModel();\n\n\n\t/**\n\t * @return class name of the {@link PriceModel} implementation\n\t */\n\tString getTargetClassNamePriceModel();\n\n\t/**\n\t * @return class name of the {@link CsticGroupModel} implementation\n\t */\n\tString getTargetClassNameCsticGroupModel();\n\n\t/**\n\t * @return class name of the {@link CsticValueModel} implementation\n\t */\n\tString getTargetClassNameCsticValueModel();\n\n\t/**\n\t * @return class name of the {@link CsticModel} implementation\n\t */\n\tString getTargetClassNameCsticModel();\n\n\t/**\n\t * @return class name of the {@link InstanceModel} implementation\n\t */\n\tString getTargetClassNameInstanceModel();\n\n\t/**\n\t * @return class name of the {@link ConfigModel} implementation\n\t */\n\tString getTargetClassNameConfigModel();\n\n\t/**\n\t * @return class name of the {@link SolvableConflictModel} implementation\n\t */\n\tString getTargetClassNameSolvableConflictModel();\n\n\t/**\n\t * @return class name of the {@link ConflictingAssumptionModel} implementation\n\t */\n\tString getTargetClassNameConflictingAssumptionModel();\n\n\t/**\n\t * @return class name of the {@link VariantConditionModel} implementation\n\t */\n\tString getTargetClassNameVariantConditionModel();\n}", "public UsermodelFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public interface IConvertContract {\n interface IConvertView extends IBaseView{\n void showOrderGoods(List<OrderGoodsDto> orderGoodsDtos);\n void startSelectAddress();\n void showDefaultAddress(AddressDto addressDto);\n\n void showConversionGoodsResult(boolean isSuccess);\n void showTotalMoney(int totalMoney);\n }\n\n interface IConvertModel{\n Observable<String> doConversionGoods(List<OrderGoodsDto> orderGoodsDtos);\n Observable<AddressDto> getDefaultAddress();\n }\n\n interface IConvertPresenter{\n void doSelectAddress();\n void getDefaultAddress();\n void doConvertGoodsToOrder(List<GoodsDto> goodsDtos);\n void doConversionGoods(List<OrderGoodsDto> orderGoodsDtos);\n void doSetTotalMoney(int totalMoney);\n }\n}", "public void setUpViewModel() {\n final FavoriteViewModel viewModel = ViewModelProviders.of(this).get(FavoriteViewModel.class);\n viewModel.getFavorites().observe(this, new Observer<List<NoteEntry>>() {\n @Override\n public void onChanged(@Nullable List<NoteEntry> noteEntries) {\n mAdapter.setNotes(noteEntries);\n toggleEmptyView(noteEntries);\n }\n });\n }", "public interface TargetFactory<R extends View,T> {\n\n DisposableObserver<T> buildTarget(R r);\n DisposableObserver<T> buildTarget(R r, LoadCallBack loadCallBack);\n}", "public interface TypeFactory {\n int type(Meizi m);\n\n int type(String string);\n\n BaseViewHolder creatViewHolder(int viewType, View view);\n}", "public interface CreateProgramView extends MvpView\n{\n\tvoid initViewPager(Boolean needPublicInfo, Boolean needDeposit, CreateProgramModel model);\n\n\tvoid showSettings();\n\n\tvoid showDeposit();\n\n\tvoid showProgress(boolean show);\n\n\tvoid showSnackbarMessage(String message);\n\n\tvoid finishActivity();\n}", "PlanningFactory getFactory();", "@Inject\n public AuthViewModel(AuthApi authApi, SessionManager sessionManager) {\n mAuthApi = authApi;\n mSessionManager = sessionManager;\n }", "@Inject\n public ImmutabilityTools(TermFactory termFactory) {\n this.termFactory = termFactory;\n }", "public ScriptExpressionEvaluatorFactory(ScriptExpressionFactory scriptExpressionFactory,\n\t\t\tSecurityContextManager securityContextManager, PrismContext prismContext) {\n\t\tthis.scriptExpressionFactory = scriptExpressionFactory;\n this.securityContextManager = securityContextManager;\n this.prismContext = prismContext;\n\t}", "private void setupFactory(Factory f) {\n f.createQuery(f.getModel().getRootPackage()).filterChildren(e -> {\n e.setFactory(f);\n return false;\n }).list();\n }", "public interface IFactory {\n IProductA getProductA();\n IProductB getProductB();\n}", "public interface ModelFactory <ModelObject> {\n public void createElement(ModelObject object);\n}", "public Framework_matriculaItemProviderAdapterFactory() {\n\t\tsupportedTypes.add(IEditingDomainItemProvider.class);\n\t\tsupportedTypes.add(IStructuredItemContentProvider.class);\n\t\tsupportedTypes.add(ITreeItemContentProvider.class);\n\t\tsupportedTypes.add(IItemLabelProvider.class);\n\t\tsupportedTypes.add(IItemPropertySource.class);\n\t}", "public FurnitureController(Home home, \n UserPreferences preferences,\n ViewFactory viewFactory) {\n this(home, preferences, viewFactory, null, null); \n }", "private void initViewModel() {\n SearchUserViewModel uvm = new SearchUserViewModel(this);\n mBinding.searchUserLayout.setUvm(uvm);\n }", "public interface Factory{\n\n @NonNull\n Navigator createNavigator();\n }", "QuestionarioFactory getQuestionarioFactory();", "public interface IOrderView extends MvpView {\n void showView(List<Order> orders);\n void addOrder();\n}", "void inject(HomeView homeView);", "public interface WordsAllView extends MvpView {\n void showWordlists(List<Word> wordlists);\n void setPresenter(WordsAllPresenter<WordsAllView> presenter);\n}", "public interface ProjectHomePresenter {\n\n void init();\n\n}", "protected abstract void setupMvpView();", "public interface CategoryTourPresenter {\n\n void getAllCategory();\n\n interface View extends BaseView{\n\n void showAllCategory(List<ItemCategory> itemCategoryList);\n }\n\n}", "public ParsedmodelFactoryImpl() {\n\t\tsuper();\n\t}", "public interface IView {\n void initializePresenter();\n BasePresenter getPresenter();\n}", "protected abstract GameViewFactory getGameViewFactory();", "private void configureViewModel(){\n viewModel = ViewModelProviders.of(this, viewModelFactory).get(SearchViewModel.class);\n\n //viewModel.init(binding.etSearchQuery.getText().toString());\n\n viewModel.getSearchResults().observe(this, searchResponse -> {\n\n // Update UI here\n\n if(searchResponse != null && searchResponse.getSearchResults() != null && searchResponse.getSearchResults().size() > 0) {\n\n SearchResultRvAdapter rvAdapter = new SearchResultRvAdapter(searchResponse.getSearchResults());\n binding.rvRepos.setAdapter(rvAdapter);\n }\n\n });\n }", "public interface IViewGetter<T,V extends View> {\n V createView(Context context);\n void initView(V view, T bean);\n}", "@Singleton\n@Component(modules = {ModelModule.class, PresenterModule.class})\npublic interface AppComponent {\n void inject(ModelImpl dataRepository);\n\n void inject(BasePresenter basePresenter);\n\n void inject(PresenterSearch presenterSearch);\n\n void inject(FavouriteActivity favouriteActivity);\n}", "public interface UnitFactory {\n Gui_Unit createUnit(String name, int team);\n Gui_Unit copy(Gui_Unit guiUnit);\n\n static UnitFactory getUnitFactory(UnitClassNames name){\n UnitFactory factory = null;\n\n switch (name){\n case ARTILLERY:{\n factory = new ArtilleryFactory();\n break;\n }\n case VEHICLE:{\n factory = new VehicleFactory();\n break;\n }\n case LIGHT_INFANTRY:{\n factory = new LightInfantryFactory();\n break;\n }\n case MELEE_INFANTRY:{\n factory = new MeleeInfantryFactory();\n break;\n }\n case HEAVY_INFANTRY:{\n factory = new HeavyInfantryFactory();\n break;\n }\n }\n return factory ;\n }\n}", "void inject(TravelsProvider provider);", "public ModelItemProviderAdapterFactory() {\n\t\tsupportedTypes.add(IEditingDomainItemProvider.class);\n\t\tsupportedTypes.add(IStructuredItemContentProvider.class);\n\t\tsupportedTypes.add(ITreeItemContentProvider.class);\n\t\tsupportedTypes.add(IItemLabelProvider.class);\n\t\tsupportedTypes.add(IItemPropertySource.class);\n\t}", "public interface ParamResolverFactory<T> {\n ParamResolver<T> createParamResolver(Parameter parameter);\n}", "public interface ISupportViewModel {\n /** View的界面创建时回调 */\n void onCreate();\n\n /** View的界面销毁时回调*/\n void onDestroy();\n\n}", "public interface Factory {\n LeiFeng createLeiFeng();\n}" ]
[ "0.6709745", "0.6411613", "0.6266754", "0.6148994", "0.6073419", "0.60323507", "0.5953765", "0.589583", "0.5888859", "0.5870754", "0.5851906", "0.5841233", "0.57855046", "0.5751284", "0.5730843", "0.5712434", "0.57095635", "0.5705259", "0.56835824", "0.56062555", "0.5599735", "0.55844843", "0.55811375", "0.5578464", "0.5549108", "0.55462307", "0.5539366", "0.55186474", "0.55133003", "0.5508261", "0.55056953", "0.55023885", "0.55023885", "0.54986817", "0.54921734", "0.5458052", "0.5456881", "0.54276466", "0.54270333", "0.54196", "0.541255", "0.5410687", "0.53995657", "0.53986686", "0.5396265", "0.5386773", "0.5383203", "0.53690976", "0.5355432", "0.53547305", "0.53542674", "0.53375936", "0.5336769", "0.53358895", "0.53291744", "0.53291744", "0.53291744", "0.53202945", "0.5316643", "0.5312976", "0.5309562", "0.5305408", "0.53052956", "0.5300004", "0.5298816", "0.52976674", "0.5295139", "0.5282384", "0.5271985", "0.52625066", "0.52462274", "0.5245418", "0.52431685", "0.52431136", "0.5241098", "0.52379924", "0.52344877", "0.5205236", "0.51906896", "0.51867676", "0.51837295", "0.5180769", "0.5178654", "0.51750726", "0.51749736", "0.5173933", "0.51717335", "0.51706815", "0.51698107", "0.51635057", "0.5160161", "0.5153396", "0.5150941", "0.51484656", "0.5145559", "0.5134441", "0.51236224", "0.5120203", "0.51100093", "0.5108533", "0.51083624" ]
0.0
-1
Empty list for the new items
@Override public void onDataChange(DataSnapshot dataSnapshot) { trackDataList.clear(); for (DataSnapshot snapshot : dataSnapshot.getChildren()) { if (snapshot != null) { TrackData trackData = snapshot.getValue(TrackData.class); if (permissionUtil.isReadStoragePermissionGranted(context)) { FileStorageUtil.TrackDataChanged dataChanged = FileStorageUtil.checkForNewPathData(trackData, context); if (dataChanged.updated) { fireBaseManager.deleteTrack(trackData.getKey()); trackData = dataChanged.trackData; fireBaseManager.pushTrackData(dataChanged.trackData); } } trackDataList.add(trackData); if (callBack != null) { callBack.onDataChanged(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void emptyList() {\n coursesTaken = new ArrayList<CourseTaken>();\r\n }", "@SuppressWarnings(\"unchecked\")\r\n public void createList() {\r\n items = new int[MAX_LIST];\r\n NumItems = 0;\r\n }", "public void EmptyList(){\n BusStopSearcherPresenter.setListview(initList(emptylist));\n }", "private List<itemInfo> getNewEntries() {\n\n final List<itemInfo> entries = new ArrayList<itemInfo>();\n return entries;\n }", "public void empty() {\n _items.clear();\n }", "public ListItems() {\n itemList = new ArrayList();\n }", "public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}", "List() {\n this.length = 0;\n }", "public void clear(){\n this.items.clear();\n }", "void clear() {\n\t\t// Initialize new empty list, clearing out old data\n\t\tmNewsList = new ArrayList<>();\n\t}", "private void updateEmptyLists() {\n \n for(int i = 0; i < this.allLists.size(); i++) {\n if(this.allLists.get(i).size() == 0) {\n for(int c = 0; c < this.dataTable.getRowCount(); c++) {\n this.allLists.get(i).add(\"\");\n }\n }\n }\n }", "@Override\r\n\t\tpublic List<Item> getItems() {\n\t\t\treturn null;\r\n\t\t}", "public void emptyArrayList_ListOfMiniCartItems() {\n ListOfMiniCartItems.clear();\n System.out.println(\" Clear Mini-Cart Item Array List: \" + ListOfMiniCartItems);\n }", "public void reset() {\n this.list.clear();\n }", "public void clearItems(){\n items.clear();\n }", "private void initList() {\n\n }", "@SuppressWarnings(\"unchecked\")\r\n \tpublic List() {\r\n \t\titems = (T[]) new Object[INIT_LEN];\r\n \t\tnumItems = 0;\r\n \t\tcurrentObject = 0;\r\n \t}", "public void clear() {\r\n\t\titems.clear();\r\n\t}", "public void makeEmpty(){\n front = null;\n numItems =0;\n }", "public void Reset()\n {\n this.list1.clear();\n }", "public MutiList() {\n\t\tsuper();\n\t\tthis.myList = new ArrayList<>();\n\t}", "public void makeEmpty() {\n for (int i = 0; i < buckets.length; i++) {\n buckets[i] = new SList();\n }\n size = 0;\n }", "private void removeList()\r\n {\n if (tableCheckBinding != null)\r\n {\r\n tableCheckBinding.dispose();\r\n tableCheckBinding = null;\r\n }\r\n\r\n // m_TableViewer.setInput(null);\r\n WritableList newList = new WritableList(SWTObservables.getRealm(Display.getDefault()));\r\n for (int i = 0; i < 10; ++i)\r\n {\r\n newList.add(this.generateNewDataModelItem());\r\n }\r\n m_TableViewer.setInput(newList);\r\n }", "void clear()\n\t{\n\t\tgetItems().clear();\n\t}", "public NewItems() {\n super();\n }", "public void clearItems() {\n grabbedItems.clear();\n }", "private void fillStatusList() {\n StatusList = new ArrayList<>();\n StatusList.add(new StatusItem(\"Single\"));\n StatusList.add(new StatusItem(\"Married\"));\n }", "@Override\n public List<Object> list() {\n return null;\n }", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "public AList() {\n size = 0;\n items = (Item[]) new Object[100];\n }", "List<Wine> emptyMethodReturnList(){\n return List.of();\n }", "public void emptyArrayList_DeletedItemsFromShoppingCard() {\n listOfDeletedItemNameShoppingCart.clear();\n System.out.println(\" Clear Deleted Items stored in Shopping Cart Array List: \" + listOfDeletedItemNameShoppingCart);\n }", "public Builder clearItems() {\n items_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n return this;\n }", "public void emptyArrayList_ListOfShoppingCardItems() {\n listOfShoppingCardItem.clear();\n System.out.println(\" Clear Shopping Cart Item Array List: \" + listOfShoppingCardItem);\n }", "private void createLoanList() {\n\t\tArrayList<Object> loans = new ArrayList<Object>(Arrays.asList(loanArray));\n\t\tfor (int i = 0; i < loans.size(); i++)\n\t\t\tif (((Loan) loans.get(i)).getFineAmount() == 0)\n\t\t\t\tloans.remove(i);\n\t\tlist = new LoanList();\n\t\tlist.setItems(loans);\n\t\tadd(list);\n\t}", "public void initializeList() {\n listitems.clear();\n int medicationsSize = Medications.length;\n for(int i =0;i<medicationsSize;i++){\n Medication Med = new Medication(Medications[i]);\n listitems.add(Med);\n }\n\n }", "@Override\n public void resetFilteredLists() {\n\n }", "public void clear() {\n\t\tlists.clear();\n\t}", "public void clear() {\n size = 0;\n Arrays.fill(items, null);\n }", "public void clear(){\r\n NotesList.clear();\r\n }", "public void clear() {\n items.clear();\n update();\n }", "public void makeEmpty() {\n System.out.println(\"List is now empty\");\n head = null;\n tail = null;\n\n }", "public void testCopyList_emptyNewName()\n\t{\n\t\t// Arrange\n\t\t// let's add a new list, category, and a few items to the new list\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tint listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\t\tassertEquals(2, listId);\n\n\t\t// Act\n\t\tservice.copyList(listId, \"\");\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testList2\");\n\n\t\t// Assert\n\t\tassertNull(newList);\n\t}", "private void addToEmptyList(T data) {\n this.first = this.last = new Node(data);\n this.nrOfElements++;\n }", "public void removeAllItem() {\n orderList.clear();\n }", "public static void emptyWishlist() {\n click(WISHLIST_UPPER_MENU);\n click(REMOVE_FROM_WISHLIST_BUTTON);\n }", "public List onStartUp() {\n\t\t// TODO - implement ItemManager.onStartUp\n\n\t\tItemDAO itemDAO = new ItemDAO();\n\n\t\tList listOfItems = itemDAO.retrieveAll();\n\n\t\tfor (int i = 0; i < listOfItems.size(); i++) {\n\t\t\tItem tempItem = (Item) listOfItems.get(i);\n\n\t\t\tif (tempItem.getRemoved() == true) {\n\t\t\t\tlistOfItems.remove(i);\n\t\t\t\ti = i - 1;\n\t\t\t}\n\t\t}\n\n\t\treturn listOfItems;\n\n\t}", "public void makeEmpty() {\n // remove Squares until empty\n while (!exploreList.isEmpty()) {\n exploreList.getNext();\n }\n }", "public void clear(){\n\n \tlist = new ArrayList();\n\n }", "public void imprimirLista() {\n NodoListaDoble<T> tmp = raiz;\n\n if (this.raiz == null) {\n System.out.println(\"Lista vacia\");\n } else {\n System.out.println(\"--------------------------\");\n while (tmp != null) {\n System.out.println(tmp.toString());\n tmp = tmp.getSiguiente();\n }\n System.out.println(\"--------------------------\");\n }\n }", "public void removeAllItems ();", "protected void clear() {\n\n\t\tthis.myRRList.clear();\n\t}", "public void populateList() {\n }", "public AList() {\n items = (TypeHere[]) new Object[100];\n size = 0;\n }", "private ArrayList<String> populateEmptyAlias() {\n ArrayList<String> emptyList = new ArrayList<String>();\n int size = AliasCommand.getCommands().size();\n for (int i = 0; i < size; i++) {\n emptyList.add(\"\");\n }\n return emptyList;\n }", "public void clearListNotIndex(){\n for(int z=0; z<list.length; z++){\n list [z] = 0;\n }\n }", "public List() {\n this.list = new Object[MIN_CAPACITY];\n this.n = 0;\n }", "public static <T> List<T> createList() {\n\t\treturn Collections.emptyList();\n\t}", "private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }", "public Builder clearList() {\n list_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x08000000);\n onChanged();\n return this;\n }", "public void clearList() {\n\t\tdeletedList.clear();\n\t}", "public void clearInitialize(){\n index=0;\n for(int i =0; i < list.length;i++){\n list[i]=0;\n }\n hasFilled = false;\n\n }", "public static void restoreList() {\n\n if (copyList.isEmpty())\n return;\n\n\n getList().clear();\n\n for (Map<String, ?> item : copyList) {\n getList().add(item);\n }\n\n copyList.clear();\n //Log.d(\"test\", \"After restore: Champlist size \" + getSize() + \" copylist size \" + copyList.size());\n\n }", "private void restList() {\n for (Processus tmp : listOfProcess) {\n tmp.resetProcess();\n }\n }", "public List<New> list();", "protected <V> List<V> newObject(Collection<V> initialValues) {\n return new ArrayList<>(initialValues);\n }", "public TempList() {\n list = new ArrayList<T>();\n }", "public void clearItems(){\n\t\tinnerItemShippingStatusList.clear();\n\t}", "public void emptyArrayList_PriceQTY_ShoppingCard() {\n PriceList.clear();\n QtyList.clear();\n System.out.println(\" Clear Price Array List: \" + PriceList);\n System.out.println(\" Clear Qty History Array List: \" + QtyList);\n }", "protected void newPlayerList() {\n int len = getPlayerCount();\n mPlayerStartList = new PlayerStart[ len ];\n for(int i = 0; i < len; i++) {\n mPlayerStartList[i] = new PlayerStart( 0.f, 0.f );\n }\n }", "public void reset() {\r\n setGiftCardList(new ArrayList());\r\n for (int i = 0; i < getMaxNumGiftCards(); 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 clearPurchaseList()\r\n\t{\r\n\t\tm_purechaseList.clear();\r\n\t}", "@Override\n public void refreshList() {\n }", "public void clear(){\r\n BarsList.clear();\r\n }", "public void testCopyList_copyEmptyList()\n\t{\n\t\t// Arrange\n\t\t// let's add a new list, category, and a few items to the new list\n\t\tUri listUri = helper.insertNewList(\"testlist\");\n\t\tint listId = Integer.parseInt(listUri.getPathSegments().get(1));\n\t\tassertEquals(2, listId);\n\n\t\t// Act\n\t\tservice.copyList(listId, \"testList2\");\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testList2\");\n\n\t\t// Assert\n\t\tassertNotNull(newList);\n\t\tassertTrue(newList.getCategories().isEmpty());\n\t}", "public void newItemNotAdded(String itemValue);", "private List<StadiumModel> dummyDataStadiumList()\n\t{\n\t\tfinal StadiumModel wembley = new StadiumModel();\n\t\twembley.setCode(STADIUM_NAME);\n\t\twembley.setCapacity(STADIUM_CAPACITY);\n\t\tfinal List<StadiumModel> stadiums = new ArrayList<StadiumModel>();\n\t\tstadiums.add(wembley);\n\t\treturn stadiums;\n\t}", "public ListHolder()\n {\n this.list = new TestList(15, false);\n }", "public void addAsPerFilterFirstLoad(List<Job> newJob){\n int currentSize = mJobList.size();\n //remove the current items\n mJobList.clear();\n //add all the new items\n mJobList.addAll(newJob);\n //tell the recycler view that all the old items are gone\n notifyItemRangeRemoved(0, currentSize);\n //tell the recycler view how many new items we added\n notifyItemRangeInserted(0, mJobList.size());\n }", "private void createList(DataSnapshot dataSnapshot) {\n if (daList.isEmpty()) {\n Item item = dataSnapshot.getValue(LostItem.class);\n daList.add(item);\n adapter.notifyDataSetChanged();\n } else {\n Item item = dataSnapshot.getValue(LostItem.class);\n daList.add(item);\n adapter.notifyDataSetChanged();\n }\n }", "public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }", "public lostFoundList() {\n\tsuper((StringBuilder)null);\n\tinitHeaders();\n\t}", "public void genLists() {\n\t\tItem noitem = new Item(\"nothing\", \"You don't see that here.\", \"no_item\", \"\", true);\r\n\t\titems.put(noitem.getId(), noitem);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//DataInputStream in = new DataInputStream(new FileInputStream(ITEM_FILE));\r\n\t\t\tDataInputStream in = new DataInputStream(getClass().getResourceAsStream(ITEM_FILE));\r\n\t\t\ttry {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tItem new_item = Item.readItem(in);\r\n\t\t\t\t\titems.put(new_item.getId(), new_item);\r\n\t\t\t\t}\r\n\t\t\t} catch (EOFException eof) {}\r\n\t\t\tin.close();\r\n\t\t\t\r\n\t\t\tin = new DataInputStream(getClass().getResourceAsStream(ROOM_FILE));\r\n\t\t\ttry {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tRoom new_room = Room.readRoom(in, items);\r\n\t\t\t\t\trooms.put(new_room.getId(), new_room);\r\n\t\t\t\t}\r\n\t\t\t} catch (EOFException eof) {}\r\n\t\t\tin.close();\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tplayer.setCurrentRoom(getRoom(\"start\"));\r\n\t}", "public void reset() {\n \titems.clear();\n \tsetProcessCount(0);\n }", "public void clear() {\n\t\tthis.count = (emptyItem ? 1 : 0);\n\t\tpages.clear();\n\t}", "public UtillLinkList() {\n\t\tlist = new LinkedList<String>();\n\t}", "public void clear(){\r\n MetersList.clear();\r\n }", "public void clear() {\n listItems.clear();\n notifyDataSetChanged();\n }", "public void clear()\n {\n dessertList.clear();\n }", "public void clearList() {\n data.clear();\n notifyDataSetChanged();\n }", "public void makeEmpty() {\r\n for (int i = 0; i < tableSize; i++) {\r\n table[i] = new DList<Entry<K, V>>();\r\n }\r\n }", "public list() {\r\n }", "public TaskList() {\n this.listItems = new ArrayList<>();\n }", "private MealsList() {\n meals = new ArrayList<>();\n }", "myArrayList() {\n\t\thead = null;\n\t\ttail = null;\n\t}", "private List<ItemModel> addList() {\n List<ItemModel> items = new ArrayList<>();\n\n managerlist = new ArrayList(strangerList);\n for(int i = 0; i < managerlist.size(); i++)\n if(managerlist.get(i).getId().equals(mPI.getId())) {\n managerlist.remove(i);\n break;\n }\n for(PersonalInformation i : managerlist){\n items.add(new ItemModel(i.getGraph(), i.getName(), i.getCity(), i.getAge()));\n }\n return items;\n }", "public SmartList() {\n size = 0;\n storage = null;\n }", "private ContentProposalList getEmptyProposalArray() {\n\t\treturn new ContentProposalList();\n\t}", "protected void addEntries() {\r\n\t\t// default is to do nothing;\r\n\t}", "private void refreshList () {\n List<DisplayedUserCommand> list = new ArrayList<DisplayedUserCommand>();\n for (DisplayedUserCommand command : myUserDefinedCommandsList) {\n list.add(command);\n }\n myUserDefinedCommandsList.clear();\n myUserDefinedCommandsList.addAll(list);\n }", "public void removeAllItems() {\n contents.clear();\n }" ]
[ "0.7220098", "0.71312094", "0.6964285", "0.68545866", "0.68266386", "0.6823389", "0.6719754", "0.66836643", "0.6593611", "0.6578347", "0.65747106", "0.6570031", "0.65676105", "0.6546387", "0.6539775", "0.64642596", "0.6447192", "0.64346", "0.6418276", "0.6413188", "0.6410743", "0.64089847", "0.6379408", "0.6369733", "0.6360631", "0.6359356", "0.63367283", "0.6329869", "0.6328812", "0.6328812", "0.6325127", "0.63245535", "0.62865454", "0.6271471", "0.62644714", "0.62632227", "0.6256844", "0.6254578", "0.62526417", "0.6240871", "0.6207434", "0.62061", "0.6202626", "0.6177559", "0.61769533", "0.6174849", "0.6171834", "0.61681485", "0.6159835", "0.6159476", "0.6159149", "0.6157886", "0.61460847", "0.6144599", "0.6138592", "0.61379033", "0.6131839", "0.6130138", "0.6115872", "0.6099397", "0.60973233", "0.60936236", "0.6090439", "0.6089326", "0.60880846", "0.6086002", "0.6074314", "0.60737836", "0.6073654", "0.6049981", "0.6045132", "0.6041035", "0.6040601", "0.6039488", "0.60376936", "0.60319537", "0.6029531", "0.6027328", "0.6021094", "0.6020258", "0.60177773", "0.6011344", "0.6007397", "0.6000091", "0.5997914", "0.59789854", "0.597783", "0.5976482", "0.59731823", "0.5969893", "0.59563845", "0.5955357", "0.5954404", "0.5953377", "0.5938432", "0.5936283", "0.5934772", "0.5920964", "0.5906622", "0.590076", "0.5898008" ]
0.0
-1
Write a return method that can concat two arrays
public static int[] array(int[] arr1, int[] arr2) { int[] arr3 = new int[arr1.length + arr2.length]; //now the length = 5 int j = 0;//will represent indexes of 3rd array for (int each : arr1) { //1, 2, 3 arr3[j++] = each; } for (int each : arr2) { arr3[j++] = each; } return arr3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer[] concatArrays(Integer[] array1, Integer[] array2);", "private Cell[] concatArray(Cell[] arr1, Cell[] arr2) {\r\n\t\tCell[] concat = new Cell[arr1.length + arr2.length];\r\n\t\tfor (int k = 0; k < concat.length; k++) {\r\n\t\t\tif (k < arr1.length) {\r\n\t\t\t\tconcat[k] = arr1[k];\r\n\t\t\t} else {\r\n\t\t\t\tconcat[k] = arr2[k - arr1.length];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn concat;\r\n\t}", "public static <T> T[] concat(T[] first, T[] second) {\r\n\t\tT[] result = Arrays.copyOf(first, first.length + second.length);\r\n\t\tSystem.arraycopy(second, 0, result, first.length, second.length);\r\n\t\treturn result;\r\n\t}", "private Position[] concatArrays(Position[] first, Position[] second)\r\n {\r\n int size = first.length + second.length;\r\n Position[] a = new Position[size];\r\n int pt = 0;\r\n\r\n for (Position tmpPos : first)\r\n {\r\n a[pt] = tmpPos;\r\n pt++;\r\n }\r\n\r\n for (Position tmpPos : second)\r\n {\r\n a[pt] = tmpPos;\r\n pt++;\r\n }\r\n\r\n return a;\r\n }", "public static Object[] arrayConcatenate(Object[] input, Object[] a1, Object[] a2) {\r\n\t\tint i = 0;\r\n\t\tfor(int j = 0; j < a1.length; j++) {\r\n\t\t\tinput[i] = a1[j];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tfor(int j = 0; j < a2.length; j++) {\r\n\t\t\tinput[i] = a2[j];\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn input;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n public static <T> T[] concat(T[] left, T[] right) {\n T[] res;\n\n if (ArrayUtils.isEmpty(left)) {\n res = right;\n } else if (ArrayUtils.isEmpty(right)) {\n res = left;\n } else {\n res = (T[]) Array.newInstance(left[0].getClass(), left.length + right.length);\n System.arraycopy(left, 0, res, 0, left.length);\n System.arraycopy(right, 0, res, left.length, right.length);\n }\n\n return res;\n }", "private String[] combine(String array1[], String array2[]) {\n\t\tint length = array1.length + array2.length;\r\n\t\tString result[] = new String[length];\r\n\t\tSystem.arraycopy(array1, 0, result, 0, array1.length);\r\n\t\tSystem.arraycopy(array2, 0, result, array1.length, array2.length);\r\n\t\treturn result;\r\n\t}", "public String[] concatArrays(String[] input1, String[] input2){\n String[] result = new String[input1.length + input2.length];\n System.arraycopy(input1, 0, result, 0, input1.length);\n System.arraycopy(input2, 0, result, input1.length, result.length - input1.length);\n return result;\n }", "public static String[] concatenateArray(String[] a, String[] b) {\n String[] r = new String[a.length + b.length];\n\n for (int i = 0; i < a.length; i++) {\n r[i] = a[i];\n }\n\n for (int i = 0; i < b.length; i++) {\n r[a.length + i] = b[i];\n }\n\n return r;\n }", "public static int[] combine(int[] a, int[] b){\n if(a.length == 0 && b.length == 0)\n return new int[0];\n else if(a.length == 0)\n return b;\n else if(b.length == 0)\n return a;\n else {\n int[] combinedArray = new int[a.length + b.length];\n System.arraycopy(a, 0, combinedArray, 0, a.length);\n System.arraycopy(b, 0, combinedArray, a.length, b.length);\n\n return combinedArray;\n }\n }", "public static byte[] concat(byte[] a, byte[] b) {\n\n if (b == null) {\n return a;\n }\n\n int aLen = a.length;\n int bLen = b.length;\n byte[] c = new byte[aLen + bLen];\n System.arraycopy(a, 0, c, 0, aLen);\n System.arraycopy(b, 0, c, aLen, bLen);\n return c;\n }", "private static byte[] concatenateByteArrays(byte[] first, byte[] second) {\n int firstLength = first.length;\n int secondLength = second.length;\n\n byte[] ret = new byte[first.length + second.length];\n System.arraycopy(first, 0, ret, 0, first.length);\n System.arraycopy(second, 0, ret, first.length, second.length);\n\n return ret;\n }", "private static byte[] concat(byte[]... arrays) {\n int length = 0;\n for (byte[] array : arrays) {\n length += array.length;\n }\n final byte[] res = new byte[length];\n int pos = 0;\n for (byte[] array : arrays) {\n System.arraycopy(array, 0, res, pos, array.length);\n pos += array.length;\n }\n return res;\n }", "Concat createConcat();", "public static JSONArray concatArrays(JSONArray first, JSONArray second) {\n JSONArray concatenatedArray = new JSONArray();\n if (first == null && second == null) {\n return concatenatedArray;\n } else {\n if (first == null) return second;\n if (second == null) return first;\n\n first.forEach(concatenatedArray::put);\n second.forEach(concatenatedArray::put);\n return concatenatedArray;\n }\n }", "public static double [] combineArray(double []num1, double []num2){\n\t\t\n\t\t double []sum=new double[num1.length + num2.length];\n\n\t\t for (int i=0; i<num1.length; i++){\n\t\t sum[i]+=num1[i];\n\t\t }\n\t\t for (int i=0; i<num2.length; i++){\n\t\t \tsum[i+num1.length]+=num2[i];\n\t\t }\n\t\t\treturn sum;\n\t}", "private byte[] concateByteArray(byte[] firstarray, byte[] secondarray){\r\n\tbyte[] output = new byte[firstarray.length + secondarray.length];\r\n\tint i=0;\r\n\tfor(i=0;i<firstarray.length;i++){\r\n\t output[i] = firstarray[i];\r\n\t}\r\n\tint index=i;\r\n\tfor(i=0;i<secondarray.length;i++){\r\n\t output[index] = secondarray[i];\r\n\t index++;\r\n\t}\r\n\treturn output;\r\n}", "public static byte[] concat(final byte[] bytes1, final byte[] bytes2) {\n\t\tfinal byte[] result = new byte[bytes1.length + bytes2.length];\n\t\tSystem.arraycopy(bytes1, 0, result, 0, bytes1.length);\n\t\tSystem.arraycopy(bytes2, 0, result, bytes1.length, bytes2.length);\n\t\treturn result;\n\t}", "void doMerge() {\n int[] temp = new int[arr.length + brr.length];\n int count = 0;\n for (int i = 0; i < arr.length; i++) {\n temp[i] = arr[i];\n count++;\n }\n for (int i = 0; i < brr.length; i++) {\n temp[count++] = brr[i];\n }\n for (int i = 0; i < temp.length; i++) {\n System.out.println( temp[i] );\n }\n String a[] = {\"A\", \"E\", \"I\"};\n String b[] = {\"O\", \"U\"};\n List<String> list = new ArrayList( Arrays.asList( a ) );\n list.addAll( Arrays.asList( b ) );\n Object[] c = list.toArray();\n System.out.println( Arrays.toString( c ) );\n }", "@SafeVarargs\n public static <T> Array<T> concat(Array<? extends T> ...arrays)\n {\n Array<T> out = new Array<>();\n\n for (Array<? extends T> array: arrays)\n out.addAll(array);\n\n return out;\n }", "public static <T> T[] concatAll(T[] first, T[]... rest) {\n\t\t int totalLength = first.length;\n\t\t for (T[] array : rest) {\n\t\t totalLength += array.length;\n\t\t }\n\t\t T[] result = Arrays.copyOf(first, totalLength);\n\t\t int offset = first.length;\n\t\t for (T[] array : rest) {\n\t\t System.arraycopy(array, 0, result, offset, array.length);\n\t\t offset += array.length;\n\t\t }\n\t\t return result;\n\t\t}", "Nda<V> concatAt( int axis, Nda<V> other, Nda<V>... ndArrays );", "private double[] merge(double[]... arrays) {\n int count = 0;\n for (double[] array : arrays) {\n count += array.length;\n }\n // Create new array and copy all array contents\n double[] mergedArray = new double[count];\n int start = 0;\n for (double[] array: arrays)\n {\n System.arraycopy(array, 0, mergedArray, start, array.length);\n start += array.length;\n }\n return mergedArray;\n }", "int[] concat(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n st[0] = s1;\r\n\t\tst[1] = t2;\r\n\t\t\r\n\t\taddEdge(t1, epssymbol, s2);\r\n\t\t\r\n\t\treturn st;\r\n\t}", "public static JSONArray concatJSONArrayWithAmmendment(JSONArray Array1, JSONArray Array2, String taxclasstype) throws JSONException {\n for (int i = 0; i < Array2.length(); i++) {\n if (Array2.optJSONObject(i) != null) {\n Array1.put(Array2.optJSONObject(i).put(\"taxclasstype\", taxclasstype));\n }\n }\n return Array1;\n }", "public static <T> T[] concat(T[] first, T[]... rest) {\n\n\t\t//Read rest\n\t\tint totalLength = first.length;\n\t\tfor (T[] array : rest) {\n\t\t\ttotalLength += array.length;\n\t\t}\n\n\t\t//Concat with arraycopy\n\t\tT[] result = Arrays.copyOf(first, totalLength);\n\t\tint offset = first.length;\n\t\tfor (T[] array : rest) {\n\t\t\tSystem.arraycopy(array, 0, result, offset, array.length);\n\t\t\toffset += array.length;\n\t\t}\n\t\treturn result;\n\n\t}", "private static int[] merge( int[] a, int[] b ) \n { \n\tint[] retArr = new int[a.length + b.length];\n\tint aCounter = 0;\n\tint bCounter = 0;\n\tint index = 0;\n while (aCounter < a.length && bCounter < b.length){\n\t if (a[aCounter] < b[bCounter]){\n\t\tretArr[index] = a[aCounter];\n\t\tindex++;\n\t\taCounter++;\n\t }\n\t else {\n\t\tretArr[index] = b[bCounter];\n\t\tindex++;\n\t\tbCounter++;\n\t }\n\t}\n\tif (aCounter < a.length){\n\t for (int x = aCounter; x < a.length; x++){\n\t\tretArr[index] = a[x];\n\t\tindex++;\n\t }\n\t}\n\telse if (bCounter < b.length){\n\t for (int x = bCounter; x < b.length; x++){\n\t\tretArr[index] = b[x];\n\t\tindex++;\n\t }\n\t}\n\tprintArray(retArr);\n\tSystem.out.println();\n\treturn retArr;\n }", "private static int[] merge( int[] a, int[] b )\n {\n int[] retList = new int[a.length + b.length];\n\t int aPos = 0, bPos = 0;\n\t for(int x = 0; x < retList.length; x ++) {\n\t\t if(aPos < a.length && bPos < b.length) {\n\t\t\t if(a[aPos] < b[bPos]) {\n\t\t\t\t retList[x] = a[aPos];\n\t\t\t\t aPos ++;\n\t\t\t }\n\t\t\t else {\n\t\t\t\t retList[x] = b[bPos];\n\t\t\t\t bPos ++;\n\t\t\t }\n\t\t }\n\t\t else if(aPos < a.length) {\n\t\t\t retList[x] = a[aPos];\n\t\t\t aPos ++;\n\t\t }\n\t\t else {\n\t\t\t retList[x] = b[bPos];\n\t\t\t bPos ++;\n\t\t }\n\t }\n return retList;\n }", "static String unionOfBothArrays(final int[] arr1, final int[] arr2) {\n\t\tString res = \"\";\n\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\tres += arr1[i] + \" \";\n\t\t}\n\t\tres += intersectionOfBothArrays(arr1, arr2);\n\t\treturn res.trim();\n\t}", "public static Term[] combineTwoTermArrays(Term[] first, Term[] second) {\n\t\tTerm[] newRA;\n\t\tif(first==null) {\n\t\t\tnewRA= new Term[second.length];\n\t\t}else {\n\t\t\tnewRA= new Term[first.length+second.length];\n\t\t\tint k = 0;\n\t\t\tfor (int i = 0; i < first.length; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tnewRA[k] = new Term(first[i].dispTerm().toCharArray());\n\t\t\t\t\tk++;\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i < second.length; i++) {\n\t\t\t\tnewRA[k] = new Term(second[i].dispTerm().toCharArray());\n\t\t\t\tk++;\n\t\t\t} \n\t\t}\n\t\treturn newRA;\n\t}", "private static int[] merge( int[] a, int[] b )\n {\n int[] ans = new int[(a.length + b.length)]; //create new array with the combined lengths\n int a1 = 0; //counter for a's position\n int b1 = 0; //counter for b's position\n while (a1 < a.length || b1 < b.length) { //iterates while either counter is not at the end of each array\n\t if (a1 == a.length) { //if you finished with all of a add the remaining b elements\n\t ans[a1 + b1] = b[b1]; \n\t b1 += 1;\n\t }\n\t else if (b1 == b.length) { //if you finished with all of b add the remaining a elements\n\t ans[a1 + b1] = a[a1];\n\t a1 += 1;\n\t }\n\t else if (a[a1] > b[b1]) { //if the current element at position a1 is larger than the one at b1, add the lower b1 to the new array and move to next b position\n\t ans[a1 + b1] = b[b1];\n\t b1 += 1;\n\t }\n\t else {\n\t ans[a1 + b1] = a[a1]; //otherwise add the element at a1 and move to next a position \n\t a1 += 1;\n\t }\n }\n return ans; //return the sorted merged array\t \t \n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static String[] union(String[] t1, String[] t2) {\n \tSet<String> set = new HashSet<String>();\n \tfor(String t : t1) set.add(t);\n \tfor(String t : t2) set.add(t);\n \treturn set.toArray(new String[]{});\n }", "private static int[] add(int[] x, int[] y) {\n // If x is shorter, swap the two arrays\n if (x.length < y.length) {\n int[] tmp = x;\n x = y;\n y = tmp;\n }\n\n int xIndex = x.length;\n int yIndex = y.length;\n int result[] = new int[xIndex];\n long sum = 0;\n if (yIndex == 1) {\n sum = (x[--xIndex] & LONG_MASK) + (y[0] & LONG_MASK) ;\n result[xIndex] = (int)sum;\n } else {\n // Add common parts of both numbers\n while (yIndex > 0) {\n sum = (x[--xIndex] & LONG_MASK) +\n (y[--yIndex] & LONG_MASK) + (sum >>> 32);\n result[xIndex] = (int)sum;\n }\n }\n // Copy remainder of longer number while carry propagation is required\n boolean carry = (sum >>> 32 != 0);\n while (xIndex > 0 && carry)\n carry = ((result[--xIndex] = x[xIndex] + 1) == 0);\n\n // Copy remainder of longer number\n while (xIndex > 0)\n result[--xIndex] = x[xIndex];\n\n // Grow result if necessary\n if (carry) {\n int bigger[] = new int[result.length + 1];\n System.arraycopy(result, 0, bigger, 1, result.length);\n bigger[0] = 0x01;\n return bigger;\n }\n return result;\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tInteger[] arr1 = {1,2,3,4,5};\r\n\t\tInteger[] arr2 = {10,20,30,40,50};\r\n\t\t\r\n\t\t\r\n//\t}\r\n\t\r\n//\tpublic static (ArrayList<Integer> list1, ArrayList<Integer> list2) {\r\n//\t\tInteger[] combine = new Integer[list1.size()+list2.size()];\r\n//\t\tfor(Integer i=0; i<list1.size(); i++) {\r\n//\t\t\tcombine[i] = list1<Integer>;\r\n//\t\t\t\r\n//\t\t}\r\n//\t\t\t\r\n\t\t\t\r\n\t//\t}\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}", "public int[] merge(int[] oneArr, int[] twoArr) {\n int lenOneArr = oneArr.length , lenTwoArr = twoArr.length ; // Длинна 1-го и 2-го массива\n int[] threeArr = new int[lenOneArr + lenTwoArr];\n int i = 0, j = 0;\n while (i < lenOneArr && j < lenTwoArr) {\n if (oneArr[i] < twoArr[j]) {\n threeArr[i + j] = oneArr[i];\n i++;\n } else {\n threeArr[i + j] = twoArr[j];\n j++;\n }\n }\n while (i < lenOneArr) { // Если достигнут конец одного из массива цикл дописывает оставшуюся часть доконца.\n threeArr[i + j] = oneArr[i];\n i++;\n }\n while (j < lenTwoArr) {\n threeArr[i + j] = twoArr[j];\n j++;\n }\n return threeArr;\n }", "Nda<V> concatAt( int axis, Nda<V> other );", "public static void main(String[] args) \r\n\t{\n\r\n\t\tint[] A = {1,5,8,7,3,6};\r\n\t\tint[] B = {2,9,4};\r\n\t\t\r\n\t\tList<Integer> list = Arrays.stream(A).boxed().collect(Collectors.toList());\r\n\t\tList<Integer> list2 = Arrays.stream(B).boxed().collect(Collectors.toList());\r\n\t\tList<Integer> combine = new ArrayList<>();\r\n\t\tcombine.addAll(list);\r\n\t\tcombine.addAll(list2);\r\n\t\t\r\n\t\tSystem.out.println(list);\r\n\t\tSystem.out.println(combine);\r\n\t\tCollections.sort(combine);\r\n\t\tSystem.out.println(combine);\r\n\t\r\n\t\tList<Integer> extractA = combine.subList(0, A.length);\r\n\t\tList<Integer> extractB = combine.subList(A.length, A.length+B.length);\r\n\t\t\r\n\t\tSystem.out.println(extractA);\r\n\t\tSystem.out.println(extractB);\r\n\t\t\r\n// second approch for integer to array\t\t\r\n\t\tint[] ints = {1, 2, 3};\r\n\t\tList<Integer> intList = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor (int i = 0; i < ints.length; i++) \r\n\t\t{\r\n\t\t\t intList.add(ints[i]);\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(intList);\r\n\t\t\r\n\t}", "private static <Item extends Comparable> List<Item> catenate(List<Item> q1, List<Item> q2) {\n List<Item> catenated = new ArrayList<>();\n for (Item item : q1) {\n catenated.add(item);\n }\n for (Item item: q2) {\n catenated.add(item);\n }\n return catenated;\n }", "public static String[] merge(String[] arr1, String[] arr2) {\n StringList list = new StringList(arr1);\n list.merge(arr2);\n return list.toArray();\n }", "public ByteArray combineWith(final byte[] bytesToAppend)\n\t{\n\t\t// holds the byte array to return\n\t\tbyte[] byteReturn = new byte[bytes.length + bytesToAppend.length];\n\t\t\n\t\t// copy the first array\n\t\tfor (int i = 0; i < bytes.length; i++)\n\t\t{\n\t\t\tbyteReturn[i] = bytes[i];\n\t\t}\n\t\t\n\t\t// append the second array\n\t\tfor (int i = 0; i < bytesToAppend.length; i++)\n\t\t{\n\t\t\tbyteReturn[i + bytes.length] = bytesToAppend[i];\n\t\t}\n\t\t\n\t\t// return the new combined array\n\t\treturn new ByteArray(byteReturn);\n\t}", "private static int[] merge( int[] a, int[] b ) \n {\n\tint[] c = new int[a.length+b.length];\n\n\tint x=0;\n\tint y=0;\n\tint z=0;\n\n\twhile (x < a.length || y < b.length){\n\t if (x>=a.length) {\n\t\tc[z]=b[y];\n\t\ty++;\n\t }\n\t else if (y>=b.length) {\n\t\tc[z]=a[x];\n\t\tx++;\n\t }\n\n\t else if (a[x] >= b[y]) {\n\t\tc[z] = b[y];\n\t\ty++;\t\t\n\t }\n\t else if (a[x] < b[y]) {\n\t\tc[z] = a[x];\n\t\tx++;\t\t\n\t }\n\t z++;\n\t}\n\treturn c;\n\n }", "public static byte[] byteAppend(byte[] buf1, byte[] buf2) {\n byte[] ret = new byte[buf1.length + buf2.length];\n System.arraycopy(buf1, 0, ret, 0, buf1.length);\n System.arraycopy(buf2, 0, ret, buf1.length, buf2.length);\n return ret;\n }", "public JSONArray concatArray(final JSONArray... arguments) throws JSONException {\n final JSONArray result = new JSONArray();\n for (final JSONArray arr : arguments) {\n for (int i = 0; i < arr.length(); i++) {\n result.put(arr.get(i));\n }\n }\n return result;\n }", "public synchronized static byte[] Append ( byte[] packetA, byte[] packetB )\n {\n // Create a new array whose size is equal to sum of packets\n // being added\n byte packetAB [] = new byte [ packetA.length + packetB.length ];\n\n // First paste in packetA\n for ( int i=0; i < packetA.length; i++ )\n packetAB [i] = packetA [i];\n\n // Now start pasting packetB\n for ( int i=0; i < packetB.length; i++ )\n packetAB [i+packetA.length] = packetB [i];\n\n return packetAB;\n }", "private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }", "private static List concatList(List x, List y) {\n List ret = new ArrayList<Long>(x);\n ret.addAll(y);\n return ret;\n }", "private static int[] union(int[] items1, int[] items2) {\n\t\tSet<Integer> itemSet = new HashSet<Integer>();\n\t\tfor(int i : items1) {\n\t\t\titemSet.add(i);\n\t\t}\n\t\tfor(int i : items2){\n\t\t\titemSet.add(i);\n\t\t}\n\t\tint[] items = new int[itemSet.size()];\n\t\tint i = 0;\n\t\tfor(int val : itemSet){\n\t\t\titems[i++] = val; \n\t\t}\n\t\treturn items;\n\t}", "public static void main(String[] args) {\n\n int[] ints1={1,2,3};\n int[] ints2 ={3,2,1};\n\n System.out.println(Arrays.toString(addElements(ints1,ints2)) );\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T[] concatArrays(T[]... arrays) {\n\t\tint c = 0;\n\t\tCollection<Class<?>> classes = new HashSet<Class<?>>();\n\t\tfor (T[] a : arrays) {\n\t\t\tc+=a.length;\n\t\t\tclasses.add(a.getClass().getComponentType());\n\t\t}\n\n\t\tT[] re = (T[]) Array.newInstance(ReflectionUtils.getCommonSuperClass(classes), c);\n\t\tc=0;\n\t\tfor (T[] a : arrays) {\n\t\t\tSystem.arraycopy(a, 0, re, c, a.length);\n\t\t\tc+=a.length;\n\t\t}\n\t\treturn re;\n\t}", "static int[] merge(int[] a, int[] b) {\n\t\tint m = a.length, n = b.length;\n\t\tint[] res = new int[m + n];\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < m || j < n) {\n\t\t\tif (i == m)\n\t\t\t\tres[k++] = b[j++];\n\t\t\telse if (j == n)\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse if (a[i] < b[j])\n\t\t\t\tres[k++] = a[i++];\n\t\t\telse\n\t\t\t\tres[k++] = b[j++];\n\t\t}\n\t\treturn res;\n\t}", "public static int[] mergeTwoSortedArrays(int[] a, int[] b){\n System.out.println(\"Merging these two arrays \");\n System.out.print(\"left array -> \");\n print(a);\n System.out.print(\"right array -> \");\n print(b);\n int i = 0, j =0, k = 0;\n int[] ans = new int[a.length + b.length];\n while(i < a.length && j < b.length){\n if(a[i] <= b[j]){\n ans[k] = a[i];\n i++;\n k++;\n }else{\n ans[k] = b[j];\n j++;\n k++;\n }\n }\n\n while(i < a.length){\n ans[k] = a[i];\n k++;\n i++;\n }\n\n while(j < b.length){\n ans[k] = b[j];\n k++;\n j++;\n }\n\n return ans;\n}", "public static Seq plus(Jumble j1, Jumble j2){\n int new_size = (j1.count < j2.count) ? j1.count : j2.count;\n int new_arr[] = new int[new_size];\n for(int i = 0; i < new_size; i++) {\n new_arr[i] = j1.values[i] + j2.values[i]; //add each corresponding element\n }\n return new Jumble(new_arr); // the Jumble constructor does copy \n }", "@NonNull\n @SafeVarargs\n static <V> ConsList<V> concat(@NonNull ConsList<V> first, @NonNull ConsList<V>... rest) {\n Objects.requireNonNull(first, \"Null concat argument at position 0\");\n Objects.requireNonNull(rest, ConsUtil.MSG_ARG_ARRAY_REST_IS_NULL);\n if (rest.length == 0) {\n return first;\n }\n ConsList<V> result = rest[rest.length - 1];\n if (result == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + rest.length);\n }\n for (int i = rest.length - 2; i >= -1; i--) {\n ConsList<V> cons;\n if (i == -1) {\n cons = first;\n } else {\n if (rest[i] == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + (i + 1));\n }\n cons = rest[i].reverse();\n }\n while (cons != Nil.INSTANCE) {\n result = new ConsListImpl<>(cons.head(), result);\n cons = cons.tail();\n }\n }\n return result;\n }", "public static int[][] add(int[][] a, int[][] b) {\n\t\tint[][] C = new int[4][4];\n\t\t \n for (int q = 0; q < C.length; q++) {\n for (int w = 0; w < C[q].length; w++) {\n C[q][w] = a[q][w] + b[q][w];\n }\n }\n \n for (int q = 0; q < b.length; q++ ){\n for(int w = 0; w < C[q].length;w++){\n }\n }\n \n return C;\n \n \n }", "public static <T> Array<T> concat(Iterable<? extends Array<? extends T>> arrays)\n {\n Array<T> out = new Array<>();\n\n for (Array<? extends T> array: arrays)\n out.addAll(array);\n\n return out;\n }", "public void joinTwoArrayList(ArrayList<E> array1 , ArrayList<E> array2){\n\t\tint length2 = array2.size();\n\t\tfor(int i=0 ; i<length2 ; i++){\n\t\t\tarray1.add(array2.getElement(i));\n\t\t}\n\t}", "Node[] merge(List<Node> nodeList1, List<Node> nodeList2, List<Node> exhaustedNodes);", "public ArrBag<T> union( ArrBag<T> other )\n {\n ArrBag<T> unionArray = new ArrBag<T>(other.size() + this.size()); \n\n int unionCount = 0; \n for (int i = 0; i <this.size(); i++ ){\n unionArray.add(this.get(i));\n unionCount++;\n } for (int i = 0; i<other.size(); i++){\n if (!unionArray.contains(other.get(i))){\n unionArray.add(other.get(i));\n unionCount ++;\n }\n }\n return unionArray;\n }", "private static int[] merge(int array1[], int array2[]) {\n\n\t\tint totalNumbers = array1.length + array2.length;\n\t\tint mergedArray[] = new int[totalNumbers];\n\n\t\tint pointerInArray1 = 0, pointerInArray2 = 0;\n\n\t\tfor (int i = 0; i < totalNumbers; i++) {\n\t\t\tif (pointerInArray1 >= array1.length) {\n\t\t\t\tmergedArray[i] = array2[pointerInArray2++];\n\t\t\t} else if (pointerInArray2 >= array2.length) {\n\t\t\t\tmergedArray[i] = array1[pointerInArray1++];\n\t\t\t} else if (array1[pointerInArray1] < array2[pointerInArray2]) {\n\t\t\t\tmergedArray[i] = array1[pointerInArray1++];\n\t\t\t} else {\n\t\t\t\tmergedArray[i] = array2[pointerInArray2++];\n\t\t\t}\n\t\t}\n\n\t\treturn mergedArray;\n\t}", "public static int[] mergeArrays(int[] a1, int[] a2) {\n if (a1 == null || a1.length == 0) {\n if (a2 == null || a2.length == 0) {\n return new int[0];\n }\n return a2;\n }\n if (a2 == null || a2.length == 0) {\n return a1;\n }\n\n // Теперь работаем с массивами, где есть хотя бы 1 элемент.\n int[] a3 = new int[a1.length + a2.length];\n for (int index1 = 0, index2 = 0, index3 = 0; index3 < a3.length; ) {\n int minValue = a1[index1] < a2[index2] ? a1[index1] : a2[index2];\n // Работаем с первым массивом\n while (index1 < a1.length && minValue == a1[index1]) {\n a3[index3++] = a1[index1++];\n }\n if (index1 == a1.length) {\n // Первый массив закончился, сливаем хвост второго\n while (index2 < a2.length && index3 < a3.length) {\n a3[index3++] = a2[index2++];\n }\n return a3;\n }\n // Работаем со вторым массивом\n while (index2 < a2.length && minValue == a2[index2]) {\n a3[index3++] = a2[index2++];\n }\n if (index2 == a2.length) {\n // Второй массив закончился, сливаем хвост первого массива\n while (index1 < a1.length && index3 < a3.length) {\n a3[index3++] = a1[index1++];\n }\n return a3;\n }\n }\n return a3;\n }", "@Nonnull\r\n\tpublic static <T> Observable<T> concat(\r\n\t\t\t@Nonnull Observable<? extends T> first,\r\n\t\t\t@Nonnull Observable<? extends T> second) {\r\n\t\tList<Observable<? extends T>> list = new ArrayList<Observable<? extends T>>();\r\n\t\tlist.add(first);\r\n\t\tlist.add(second);\r\n\t\treturn concat(list);\r\n\t}", "private String[] merge(String[] left, String[] right) {\n\t\tString[] result = new String[left.length + right.length];\n\t\t\n\t\tint leftIndex = 0;\n\t\tint rightIndex = 0;\n\t\tint resultIndex = 0;\n\t\t\n\t\t/*\n\t\t * Add current string from the left array if it is alphabetically before\n\t\t * the current string from the right array, or the other way around.\n\t\t */\n\t\twhile(leftIndex < left.length && rightIndex < right.length) {\n\t\t\t\n\t\t\tif(left[leftIndex].compareTo(right[rightIndex]) <= 0) {\n\t\t\t\tresult[resultIndex++] = left[leftIndex++];\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tresult[resultIndex++] = right[rightIndex++];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * Add anything that is left.\n\t\t */\n\t\tfor(int k = leftIndex; k < left.length; k++) {\n\t\t\tresult[resultIndex++] = left[k];\n\t\t}\n\t\t\n\t\tfor(int k = rightIndex; k < right.length; k++) {\n\t\t\tresult[resultIndex++] = right[k];\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public <T> T[] a(T[] tArr, T[] tArr2) {\n int length = tArr.length;\n int length2 = tArr2.length;\n T[] tArr3 = (Object[]) Array.newInstance(tArr.getClass().getComponentType(), length + length2);\n System.arraycopy(tArr, 0, tArr3, 0, length);\n System.arraycopy(tArr2, 0, tArr3, length, length2);\n return tArr3;\n }", "public static byte[] concatByteArrays(byte[] first, byte[]... rest) {\r\n int totalLength = first.length;\r\n for (byte[] array : rest) {\r\n totalLength += array.length;\r\n }\r\n byte[] result = Arrays.copyOf(first, totalLength);\r\n int offset = first.length;\r\n for (byte[] array : rest) {\r\n System.arraycopy(array, 0, result, offset, array.length);\r\n offset += array.length;\r\n }\r\n return result;\r\n }", "private static int[] mergeSortedArrays(int[] arr1, int[] arr2) {\n if (arr1 == null\n || arr2 == null\n || arr1.length == 0\n || arr2.length == 0) {\n return new int[]{-1};\n }\n\n int[] mergedArr = new int[arr1.length + arr2.length];\n int lengthOfArrOne = arr1.length;\n int lengthOfArrTwo = arr2.length;\n int indexForFirstArr = 0;\n int indexForSecondArr = 0;\n int indexForMergedArr = 0;\n while (indexForFirstArr < lengthOfArrOne\n && indexForSecondArr < lengthOfArrTwo) {\n if (arr1[indexForFirstArr] < arr2[indexForSecondArr]) {\n mergedArr[indexForMergedArr++] = arr1[indexForFirstArr++];\n } else {\n mergedArr[indexForMergedArr++] = arr2[indexForSecondArr++];\n }\n\n //increase index counter\n //indexForFirstArr++;\n //indexForSecondArr++;\n }\n\n //append the remaining array\n if(indexForFirstArr == lengthOfArrOne\n && indexForSecondArr < lengthOfArrTwo){\n for(int index = indexForSecondArr; indexForSecondArr<lengthOfArrTwo; indexForSecondArr++){\n mergedArr[indexForMergedArr++] = arr2[index];\n }\n }else if(indexForFirstArr < lengthOfArrOne\n && indexForSecondArr == lengthOfArrTwo){\n for(int index = indexForFirstArr; indexForFirstArr<lengthOfArrOne; indexForFirstArr++){\n mergedArr[indexForMergedArr++] = arr1[index];\n }\n }\n\n //decrease the extra space in the last index\n --indexForMergedArr;\n\n return mergedArr;\n }", "public static void main(String[] args) {\n\t\tint arr1[] = {1, 3, 5};\n\t\tint arr2[] = {2, 3, 3};\n\t\tint a[] = merge(arr1, arr2);\n\t\tfor (int i = 0; i )\n\t\tSystem.out.println();\n\t}\n\t\n\tpublic static int[] merge (int arr1[], int arr2[]){\n\t\tint result[] = new int[arr1.length + arr2.length];\n\t\tint idex_arr1 = 0;\n\t\tint idex_arr2 = 0;\n\t\tint idex_result = 0;\n\t\t//index arr1 < index arr2, result [0] = arr1[0]\n\t\twhile (idex_arr1 < arr1.length || idex_arr2 < arr2.length)\n\t\t{\n\t\t\tif (idex_arr2 >= arr2.length)\n\t\t\t{\n\t\t\t\tresult[idex_result++] = arr1[idex_arr1++];\n\t\t\t}\n\t\t\telse if (idex_arr1 < arr1.length)\n\t\t\t{\n\t\t\t\tif (arr1[idex_arr1] < arr2[idex_arr2])\n\t\t\t\t\tresult[idex_result++] = arr1[idex_arr1++];\n\t\t\t\telse\n\t\t\t\t\tresult[idex_result++] = arr2[idex_arr2++];\n\t\t\t} else {\n\t\t\t\tresult[idex_result++] = arr2[idex_arr2++];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static Comparable[] merge( Comparable[] leftPart, Comparable[] rightPart ) {\n\n int cursorLeft = 0, cursorRight = 0, counter = 0;\n\n Comparable[] merged = new Comparable[leftPart.length + rightPart.length];\n\n\n\n while ( cursorLeft < leftPart.length && cursorRight < rightPart.length ) {\n\n\n if ( leftPart[cursorLeft].compareTo(rightPart[cursorRight])<0) {\n\n merged[counter] = leftPart[cursorLeft];\n\n cursorLeft++;\n\n } else {\n\n merged[counter] = rightPart[cursorRight];\n\n cursorRight++;\n\n }\n\n\n\n counter++;\n\n }\n\n\n\n if ( cursorLeft < leftPart.length ) {\n\n System.arraycopy( leftPart, cursorLeft, merged, counter, merged.length - counter );\n\n }\n\n if ( cursorRight < rightPart.length ) {\n\n System.arraycopy( rightPart, cursorRight, merged, counter, merged.length - counter );\n\n }\n\n\n\n return merged;\n\n }", "private static int[] merge(int[] integers, int[] integers2) {\n\t\tint[] c = new int[integers.length + integers2.length];\n int i = 0, j = 0;\n for (int k = 0; k < c.length; k++) {\n if (i >= integers.length) c[k] = integers2[j++];\n else if (j >= integers2.length) c[k] = integers[i++];\n else if (integers[i] <= integers2[j]) c[k] = integers[i++];\n else c[k] = integers2[j++];\n }\n return c;\n }", "public static <R> Tuple<R> concat(Tuple<R> a, Tuple<R> b) {\n\t\tLinkedList<R> list = new LinkedList<>();\n\t\tfor (R element : a) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\tfor (R element : b) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\treturn new Tuple<>(list);\n\t}", "public static byte[] merge(final byte[] begin, final byte[] end) {\n Objects.requireNonNull(begin);\n Objects.requireNonNull(end);\n final byte[] result = new byte[begin.length + end.length];\n System.arraycopy(begin, 0, result, 0, begin.length);\n System.arraycopy(end, 0, result, begin.length, end.length);\n return (result);\n }", "private static byte[] crossCombined(byte[] privateSalt, byte[] publicSalt) {\r\n\t\tAssert.notNull(privateSalt, \"'privateSalt' must not be null\");\r\n\t\tAssert.notNull(publicSalt, \"'publicSalt' must not be null\");\r\n\t\tint privateSaltLength = privateSalt != null ? privateSalt.length : 0;\r\n\t\tint publicSaltLength = publicSalt != null ? publicSalt.length : 0;\r\n\r\n\t\tint length = privateSaltLength + publicSaltLength;\r\n\t\tif (length <= 0) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tbyte[] combined = new byte[length];\r\n\t\tint i = 0;\r\n\t\tfor (int j = 0, k = 0; j < privateSaltLength || k < publicSaltLength; j++, k++) {\r\n\t\t\tif (j < privateSaltLength) {\r\n\t\t\t\tcombined[i++] = privateSalt[j];\r\n\t\t\t}\r\n\t\t\tif (k < publicSaltLength) {\r\n\t\t\t\tcombined[i++] = publicSalt[k];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn combined;\r\n\t}", "int[] populateArray(int[] firstArr,int[] secondArr){\n\t\tlength = firstArr.length + secondArr.length; //Getting length of the resultant array\n\t\tresultArr = new int[length]; //set resultant array length\n\t\tfor(kCounter = 0 ; kCounter < length; kCounter++){\n\t\t\t//checking index of the array is even or odd\n\t\t\tif(kCounter % 2 == 0){\n\t\t\t\tresultArr[kCounter] = secondArr[iCounter]; //if position is even then add element to even index\n\t\t\t\tiCounter++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tresultArr[kCounter] = firstArr[jCounter]; //if position is odd then add element to odd index\n\t\t\t\tjCounter++;\n\t\t\t}\n\t\t}\n\t\treturn resultArr;\n\t}", "private static void merge(int[] array, int[] left, int[] right) {\n\n int i;\n\n for(i = 0; i < left.length; i++) {\n\n array[i] = left[i];\n }\n\n for (int j = 0; j < right.length; j++, i++) {\n\n array[i] = right[j];\n }\n }", "static int[] merge(int[] A, int[] B){\n int m = A.length; int n = B.length;\n A = Arrays.copyOf(A, m+n);\n while(m > 0 && n > 0){\n if(A[m-1] > B[n-1]){\n A[m+n-1] = A[m-1];\n m--;\n }else{\n A[m+n-1] = B[n-1];\n n--;\n }\n }\n\n while(n > 0){\n A[m+n-1] = B[n-1];\n n--;\n }\n return A;\n }", "public static byte[] mergeByteArrays(byte[] a,byte[] b){\r\n\t\treturn mergeByteArrays(a, b, new byte[0], new byte[0], new byte[0], new byte[0], new byte[0]);\r\n\t}", "public static void main(String[] args) {\n\n\t\tdouble [] num1 = {1.1, 3.9, 2.2};\n\t\tdouble [] num2 = {2.4, 2.88};\n\t\tdouble []target = combineArray(num1, num2);\n\t\tSystem.out.println(Arrays.toString(target));\n\t\tSystem.out.println(Arrays.toString(combineArray(num1, num2)));\n\t\t\n\t\tdouble [] expected = {1.1, 3.9, 2.2, 2.4, 2.88};\n\t\t\n\t\tif(Arrays.equals(expected, target)) {\n\t\t\tSystem.out.println(\"PASSED\");\n\t\t}else {\n\t\t\tSystem.out.println(\"FAILED\");\n\t\t}\n\t\t\t\n\t\t\n\t}", "private Register[] createJoinResult(Register[] left, Register[] right) {\n Register[] result = new Register[left.length + right.length - 1]; // -1 because of joining key\n\n int pos = 0;\n for (int i = 0; i < left.length; i++) {\n result[pos++] = left[i];\n }\n\n for (int i = 0; i < right.length; i++) {\n if (i != rightJoinAttributeIndex) {\n result[pos++] = right[i];\n }\n }\n\n return result;\n }", "public static int[] merge(int[] arr1, int[] arr2) {\n int[] merged = new int[arr1.length + arr2.length];\n\n int arr1Index = 0;\n int arr2Index = 0;\n int mergedIndex = 0;\n\n // Keep taking values from arr1 or arr2 until the merged array is full.\n while (mergedIndex < merged.length) {\n\n if (arr1Index < arr1.length && arr2Index < arr2.length) {\n /*\n * Still have values in both arr1 and arr2 that have not been\n * used, so take the smaller of the two and put it into merged.\n */\n if (arr1[arr1Index] < arr2[arr2Index]) {\n merged[mergedIndex] = arr1[arr1Index];\n arr1Index++;\n }\n else {\n merged[mergedIndex] = arr2[arr2Index];\n arr2Index++;\n }\n }\n else if (arr1Index < arr1.length) {\n /*\n * There are still values in arr1 that have not been used but\n * arr2 has been exhausted so take the next value from arr1.\n */\n merged[mergedIndex] = arr1[arr1Index];\n arr1Index++;\n }\n else {\n /*\n * There are still values in arr2 that have not been used but\n * arr1 has been exhausted so take the next value from arr2.\n */\n merged[mergedIndex] = arr2[arr2Index];\n arr2Index++;\n }\n\n mergedIndex++;\n }\n\n return merged;\n }", "public static void main(String[] args) {\n\t\tint []arr1= {12,13,44};\r\n\t\tint []arr2= {44,45,47,50};\r\n\t\tint i,j;\r\n\t\tint count=0;\r\n\t\t\r\n\t\tint []merge=new int[arr1.length+arr2.length];\r\n\t\tfor(i=0;i<arr1.length;i++)\r\n\t\t{\r\n\t\t\tmerge[i]=arr1[i];\r\n\t\t\tcount++;\r\n\t\t}\r\n\t\t\tfor(i=0;i<arr2.length;i++)\r\n\t\t\t{\r\n\t\t\t\tmerge[count++]=arr2[i];\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(i=0;i<merge.length;i++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\" \" +merge[i]);\r\n\t\t\t}\r\n\t\t\r\n\r\n\t}", "public static double[] vectorAddition(double[] a, double[] b) {\r\n\t\tdouble[] retval = new double[a.length];\r\n\t\tfor(int i = 0; i < a.length; i += 1) {\r\n\t\t\tretval[i] = a[i] + b[i];\r\n\t\t}\r\n\t\treturn retval;\r\n\t}", "public static void merge (int[] result, int[] a1, int[] a2) {\r\n\t\tint len1 = a1.length;\r\n\t\tint len2 = a2.length;\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint j = 0;\r\n\t\tint k = 0;\r\n\t\t\r\n\t\twhile (i < len1 && j < len2) {\r\n\t\t\tif (a1[i] < a2[j]) {\r\n\t\t\t\tresult[k] = a1[i];\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tresult[k] = a2[j];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (i < len1) {\r\n\t\t\tresult[k] = a1[i];\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t\twhile (j < len2) {\r\n\t\t\tresult[k] = a2[j];\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n @BackpressureSupport(BackpressureKind.FULL)\n @SchedulerSupport(SchedulerKind.NONE)\n public static <T> Observable<T> concatArray(Publisher<? extends T>... sources) {\n if (sources.length == 0) {\n return empty();\n } else\n if (sources.length == 1) {\n return fromPublisher(sources[0]);\n }\n return fromArray(sources).concatMap((Function)Functions.identity());\n }", "public final CQLParser.concatFunction_return concatFunction() throws RecognitionException {\n CQLParser.concatFunction_return retval = new CQLParser.concatFunction_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token CONCAT139=null;\n CQLParser.arrayOperation_return e1 = null;\n\n CQLParser.arrayOperation_return e2 = null;\n\n\n Object CONCAT139_tree=null;\n\n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:476:2: (e1= arrayOperation ( CONCAT e2= arrayOperation )? )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:476:4: e1= arrayOperation ( CONCAT e2= arrayOperation )?\n {\n root_0 = (Object)adaptor.nil();\n\n pushFollow(FOLLOW_arrayOperation_in_concatFunction2304);\n e1=arrayOperation();\n\n state._fsp--;\n\n adaptor.addChild(root_0, e1.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:476:22: ( CONCAT e2= arrayOperation )?\n int alt36=2;\n int LA36_0 = input.LA(1);\n\n if ( (LA36_0==CONCAT) ) {\n alt36=1;\n }\n switch (alt36) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:476:23: CONCAT e2= arrayOperation\n {\n CONCAT139=(Token)match(input,CONCAT,FOLLOW_CONCAT_in_concatFunction2307); \n CONCAT139_tree = (Object)adaptor.create(CONCAT139);\n root_0 = (Object)adaptor.becomeRoot(CONCAT139_tree, root_0);\n\n pushFollow(FOLLOW_arrayOperation_in_concatFunction2312);\n e2=arrayOperation();\n\n state._fsp--;\n\n adaptor.addChild(root_0, e2.getTree());\n\n }\n break;\n\n }\n\n\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "public static String[] merge(String[] arr1, String[] arr2, String arr3[]) {\n StringList list = new StringList(arr1);\n list.merge(arr2);\n list.merge(arr3);\n return list.toArray();\n }", "public ZYSet<ElementType> union(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n result.add(e);\n }\n for(ElementType e :otherSet){\n result.add(e);\n }\n \n return result;\n }", "public static void main(String[] args) {\nint[] array1 = {5,2,8,23,14};\nint[] array2 = {67,32,7,4,61};\nint add = array1[0];\nint [] second = new int [5];\nfor(int i = 0; i<=second.length-1;i++) {\n\tsecond[i] = (array1[i] + array2[i]);\n\tSystem.out.println(second[i]);\n\t}\n}", "public static int[] merge(int[] arrLeft, int[] arrRight){\n int[] vals = new int[arrLeft.length + arrRight.length];\n int i = 0;\n int j = 0;\n while(i < arrLeft.length && j < arrRight.length){\n if(arrLeft[i] < arrRight[j]){\n vals[i+j] = arrLeft[i];\n i++;\n }else{\n vals[i+j] = arrRight[j];\n j++;\n }\n }\n while(i < arrLeft.length){\n vals[i+j] = arrLeft[i];\n i++;\n }\n while(j < arrRight.length){\n vals[i+j] = arrRight[j];\n j++;\n }\n return vals;\n\n}", "public static byte[] concatAnyNumberOfByteArrays(byte[] firstArray, byte[]...rest) {\n\t\tint lengthTotal = firstArray.length;\n\t\tfor(byte[] arrayElement : rest) {\n\t\t\tlengthTotal+=arrayElement.length;\n\t\t}\n\t\tbyte[] toBeReturned = Arrays.copyOf(firstArray, lengthTotal);\n\t\tint offset = firstArray.length;\n\t\t\n\t\tfor(byte[] arrayElement : rest) {\n\t\t\tSystem.arraycopy(arrayElement, 0, toBeReturned, offset, arrayElement.length);\n\t\t\toffset+=arrayElement.length;\n\t\t}\n\t\t\n\t\treturn toBeReturned;\n\t}", "public interface Groups {\n\n //region Arrays\n static <T> boolean isNullOrEmpty(T[] original) {\n return original == null || original.length == 0;\n }\n\n /**\n * expend a Array\n *\n * @param origin the source\n * @param prepend elements to prepend\n * @param append elements to append\n * @param <T> type\n * @return array\n */\n static <T> T[] expend(T[] origin, T[] prepend, T[] append) {\n if (isNullOrEmpty(origin)) return append(prepend, append);\n if (isNullOrEmpty(prepend)) return append(origin, append);\n if (isNullOrEmpty(append)) return prepend(origin, prepend);\n val x = java.util.Arrays.copyOf(origin, prepend.length + origin.length + append.length);\n System.arraycopy(prepend, 0, x, 0, prepend.length);\n System.arraycopy(origin, 0, x, prepend.length, origin.length);\n System.arraycopy(append, 0, x, (prepend.length + origin.length), append.length);\n return x;\n\n }\n\n /**\n * prepend a Array\n *\n * @param origin the source\n * @param prepend the element to prepended\n * @param <T> type\n * @return array\n */\n @SafeVarargs\n static <T> T[] prepend(T[] origin, T... prepend) {\n if (isNullOrEmpty(origin)) return prepend;\n if (isNullOrEmpty(prepend)) return origin;\n val x = java.util.Arrays.copyOf(origin, origin.length + prepend.length);\n System.arraycopy(prepend, 0, x, 0, prepend.length);\n System.arraycopy(origin, 0, x, prepend.length, origin.length);\n return x;\n }\n\n /**\n * append a Array\n *\n * @param origin the source\n * @param append the element to append\n * @param <T> type\n * @return array\n */\n @SafeVarargs\n static <T> T[] append(T[] origin, T... append) {\n if (isNullOrEmpty(origin)) return append;\n if (isNullOrEmpty(append)) return origin;\n val x = java.util.Arrays.copyOf(origin, origin.length + append.length);\n System.arraycopy(append, 0, x, origin.length, append.length);\n return x;\n }\n\n Object[] EMPTY_OBJECT = {};\n\n @SuppressWarnings(\"unchecked\")\n static <T> T[] empty() {\n return (T[]) EMPTY_OBJECT;\n }\n\n @SuppressWarnings(\"unchecked\")\n static <T> T[] create(Class<T> component, int size) {\n return (T[]) Array.newInstance(component, size);\n }\n\n @SuppressWarnings(\"unchecked\")\n static <T, R> R[] createGeneric(Class<T> component, int size) {\n return (R[]) Array.newInstance(component, size);\n }\n\n //endregion\n\n //region List\n @SuppressWarnings(\"unchecked\")\n static <T extends I, I>\n List<I> castUp(List<T> src) {\n if (src == null || src.isEmpty()) return Collections.emptyList();\n return ((List<I>) src);\n }\n\n /**\n * cast or convert list to a sub type list\n *\n * @param type the target type\n * @param src the source list\n * @param converter converter method\n * @param every dose convert everyone or just check first\n * @param <T> target type\n * @param <I> source type or interface\n * @return list\n */\n @SuppressWarnings(\"unchecked\")\n static <T extends I, I>\n List<T> castDown(Class<T> type, List<I> src, Function<I, T> converter, boolean every) {\n if (src == null || src.isEmpty()) return Collections.emptyList();\n if (type.isAssignableFrom(src.get(0).getClass()) && !every) {\n return ((List<T>) src);\n }\n val list = new ArrayList<T>();\n for (I i : src) {\n T t = converter.apply(i);\n list.add(t);\n }\n return list;\n }\n //endregion\n\n //region Set\n @SuppressWarnings(\"unchecked\")\n static <T extends I, I>\n Set<I> castUp(Set<T> src) {\n if (src == null || src.isEmpty()) return Collections.emptySet();\n return ((Set<I>) src);\n }\n\n /**\n * cast or convert list to a sub type list\n *\n * @param type the target type\n * @param src the source list\n * @param converter converter method\n * @param every dose convert everyone or just check first\n * @param <T> target type\n * @param <I> source type or interface\n * @return list\n */\n @SuppressWarnings(\"unchecked\")\n static <T extends I, I>\n Set<T> castDown(Class<T> type, Set<I> src, Function<I, T> converter, boolean every) {\n if (src == null || src.isEmpty()) return Collections.emptySet();\n val first = src.iterator().next();\n if (type.isAssignableFrom(first.getClass()) && !every) {\n return ((Set<T>) src);\n }\n val list = new HashSet<T>();\n for (I i : src) {\n T t = converter.apply(i);\n list.add(t);\n }\n return list;\n }\n //endregion\n\n //region Map\n @SuppressWarnings(\"unchecked\")\n static <K, T extends I, I>\n Map<K, I> castUp(Map<K, T> src) {\n if (src == null || src.isEmpty()) return Collections.emptyMap();\n return ((Map<K, I>) src);\n }\n\n @SuppressWarnings(\"unchecked\")\n static <V, T extends I, I>\n Map<I, V> castUpKey(Map<T, V> src) {\n if (src == null || src.isEmpty()) return Collections.emptyMap();\n return ((Map<I, V>) src);\n }\n\n @SuppressWarnings(\"unchecked\")\n static <K, T extends I, I>\n Map<K, T> castDown(Class<T> type, Map<K, I> src, Function<I, T> converter, boolean every) {\n if (src == null || src.isEmpty()) return Collections.emptyMap();\n val first = src.values().iterator().next();\n if (type.isAssignableFrom(first.getClass()) && !every) {\n return ((Map<K, T>) src);\n }\n val list = new HashMap<K, T>();\n src.forEach((k, v) -> list.put(k, converter.apply(v)));\n return list;\n }\n\n @SuppressWarnings(\"unchecked\")\n static <V, T extends I, I>\n Map<T, V> castDownKey(Class<T> type, Map<I, V> src, Function<I, T> converter, boolean every) {\n if (src == null || src.isEmpty()) return Collections.emptyMap();\n val first = src.values().iterator().next();\n if (type.isAssignableFrom(first.getClass()) && !every) {\n return ((Map<T, V>) src);\n }\n val list = new HashMap<T, V>();\n src.forEach((k, v) -> list.put(converter.apply(k), v));\n return list;\n }\n\n @SafeVarargs\n static <K, V> Map<K, V> hashMapOf(Map.Entry<K, V>... entries) {\n val m = new HashMap<K, V>();\n for (Map.Entry<K, V> e : entries) {\n if (m.containsKey(e.getKey()))\n throw new IllegalStateException(\"key '\" + e.getKey() + \"' is already exists !\");\n m.put(e.getKey(), e.getValue());\n }\n return m;\n }\n\n @SafeVarargs\n static <K, V> Map<K, V> unmodifiableMapOf(Map.Entry<K, V>... entries) {\n return Collections.unmodifiableMap(hashMapOf(entries));\n }\n //endregion\n\n\n static <K, V> Map.Entry<K, V> entryOf(K k, V v) {\n return new AbstractMap.SimpleEntry<>(k, v);\n }\n}", "private int[] add(int[] a, int[] b)\n {\n int tI = a.length - 1;\n int vI = b.length - 1;\n long m = 0;\n\n while (vI >= 0)\n {\n m += (((long)a[tI]) & IMASK) + (((long)b[vI--]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }", "private int[] add(int[] a, int[] b)\n {\n int tI = a.length - 1;\n int vI = b.length - 1;\n long m = 0;\n\n while (vI >= 0)\n {\n m += (((long)a[tI]) & IMASK) + (((long)b[vI--]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }", "public String devolver_campos_concatenados(){\n String dato_concatenado=\"\";\n campos_concaenados=\" \";\n for (int j=0;j<numero_campos;j++){\n if(j==numero_campos-1){\n dato_concatenado=campos[j];\n }else{\n dato_concatenado=campos[j]+\", \";\n }\n campos_concaenados=campos_concaenados+dato_concatenado;\n }\n \n return campos_concaenados;\n }", "public static byte[] byteAppend(byte[] buf1, byte[] buf2, int len) {\n if (len > buf2.length)\n len = buf2.length;\n byte[] ret = new byte[buf1.length + len];\n System.arraycopy(buf1, 0, ret, 0, buf1.length);\n System.arraycopy(buf2, 0, ret, buf1.length, len);\n return ret;\n }", "private ByteBuffer concatBuffers(List<Object> buffers) throws Exception {\n\t/*\n var length = 0;\n for (var i = 0, l = buffers.length; i < l; ++i) length += buffers[i].length;\n var mergedBuffer = new Buffer(length);\n bufferUtil.merge(mergedBuffer, buffers);\n return mergedBuffer;*/\n\treturn Util.concatByteBuffer(buffers, 0);\n}", "private static void merge(int[] num1, int[] num2) {\n\t\tint len = num1.length + num2.length;\n\n\t\tint[] temp = new int[len];\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tint count = 0;\n\t\twhile (i < num1.length && j < num2.length) {\n\t\t\tif (num1[i] < num2[j]) {\n\t\t\t\ttemp[count++] = num1[i++];\n\t\t\t \n\t\t\t} else {\n\t\t\t\ttemp[count++] = num2[j++];\n\t\t\t \n\t\t\t}\n\t\t}\n\n\t\twhile (i < num1.length) {\n\t\t\ttemp[count++] = num1[i++];\n\t\t}\n\t\twhile (j < num2.length) {\n\t\t\ttemp[count++] = num2[j++];\n\t\t}\n\t\tfor (int ind = 0; ind < temp.length; ind++) {\n\t\t\tSystem.out.print(temp[ind] + \" \");\n\t\t}\n\t}", "public static void mergeArrays(int[] arrayA, int[] arrayB, int a,\n int b, int[] arrayC)\n {\n int i = 0, j = 0, k = 0;\n \n // Traverse both array\n while (i<a && j <b)\n {\n \n if (arrayA[i] < arrayB[j])\n \tarrayC[k++] = arrayA[i++];\n else\n \tarrayC[k++] = arrayB[j++];\n }\n \n // Store remaining elements of first array\n while (i < a)\n \tarrayC[k++] = arrayA[i++];\n \n // Store remaining elements of second array\n while (j < b)\n \tarrayC[k++] = arrayB[j++];\n }", "@NonNull\n @SafeVarargs\n static DoubleConsList<Double> concat(@NonNull DoubleConsList<Double> first, @NonNull DoubleConsList<Double>... rest) {\n Objects.requireNonNull(first, \"Null concat argument at position 0\");\n Objects.requireNonNull(rest, ConsUtil.MSG_ARG_ARRAY_REST_IS_NULL);\n if (rest.length == 0) {\n return first;\n }\n DoubleConsList<Double> result = rest[rest.length - 1];\n if (result == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + rest.length);\n }\n for (int i = rest.length - 2; i >= -1; i--) {\n DoubleConsList<Double> cons;\n if (i == -1) {\n cons = first;\n } else {\n if (rest[i] == null) {\n throw new NullPointerException(ConsUtil.MSG_NULL_CONCAT_ARG_AT_POS + (i + 1));\n }\n cons = rest[i].doubleReverse();\n }\n while (cons != Nil.INSTANCE) {\n result = new DoubleConsListImpl(cons.doubleHead(), result);\n cons = cons.doubleTail();\n }\n }\n return result;\n }", "private static void mergeSortedArrays(int[] arr1, int[] arr2, int length1, int length2) {\n\t\tint j = 0;\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (length1 > length2) {\n\t\t\tfor (int i = length1 - length2; i < length1; i++) {\n\t\t\t\tarr1[i] = arr2[j++];\n\t\t\t}\n\t\t\tArrays.sort(arr1);\n\t\t\tfor (int i = 0; i < arr1.length; i++) {\n\t\t\t\tsb.append(arr1[i] + \" \");\n\t\t\t}\n\t\t} else {\n\t\t\tfor (int i = length2 - length1; i < length2; i++) {\n\t\t\t\tarr2[i] = arr1[j++];\n\t\t\t}\n\t\t\tArrays.sort(arr2);\n\t\t\tfor (int i = 0; i < arr2.length; i++) {\n\t\t\t\tsb.append(arr2[i] + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(sb.toString());\n\t}", "@Nonnull\r\n\tpublic static <T, U> Observable<U> concat(\r\n\t\t\t@Nonnull final Func2<? super T, ? super Integer, ? extends Observable<? extends U>> resultSelector,\r\n\t\t\t@Nonnull T... source) {\r\n\t\treturn new Concat.FromIterable.IndexedSelector<T, U>(Arrays.asList(source), resultSelector);\r\n\t}", "public static byte[] concatBytes(byte[] ...bytes) throws IOException\n {\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n for(byte[] b : bytes){\n output.write(b);\n }\n return output.toByteArray();\n \n }" ]
[ "0.7991122", "0.7838436", "0.771636", "0.77121806", "0.7674839", "0.7555348", "0.75366783", "0.7405205", "0.7245919", "0.7204713", "0.7137506", "0.70546687", "0.69600755", "0.69274074", "0.68346494", "0.68012244", "0.6704679", "0.6628356", "0.6618179", "0.661547", "0.6561272", "0.64788353", "0.64476985", "0.6420021", "0.63900983", "0.6389024", "0.63889396", "0.63598484", "0.6281388", "0.62706625", "0.6208997", "0.6186429", "0.61775005", "0.6163602", "0.6146083", "0.6137821", "0.61292624", "0.612729", "0.6119947", "0.6095944", "0.6091432", "0.60707873", "0.6067441", "0.60667664", "0.60666823", "0.60666823", "0.6038337", "0.60269487", "0.6023257", "0.6005206", "0.5990677", "0.5979041", "0.5973395", "0.5948521", "0.594091", "0.59402335", "0.59169847", "0.5914824", "0.58951235", "0.58885926", "0.5878442", "0.58744097", "0.58676255", "0.5850135", "0.584666", "0.5827898", "0.5819471", "0.58179516", "0.58061314", "0.5801933", "0.5799989", "0.5787734", "0.57684493", "0.5747255", "0.5732911", "0.57204556", "0.57183903", "0.57174134", "0.5712548", "0.57104087", "0.5709434", "0.57009673", "0.57007635", "0.5683412", "0.5673339", "0.5665776", "0.56606036", "0.56448203", "0.56279624", "0.561587", "0.561587", "0.5608644", "0.56032455", "0.55910605", "0.55804807", "0.5580361", "0.5568554", "0.55555177", "0.55302584", "0.5516833" ]
0.57770586
72
/Cookie [] getOrders(int idprincipal, String [] cookiesval, String [] cookiesname);
Cookie deleteOrder(int id, String [] cookiesval, String [] cookiesname);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Cookie[] getCookies();", "public abstract Cookie[] getResponseCookies();", "@Override\r\n public void getCookie(String name)\r\n {\n\r\n }", "public JSONArray getOrders() throws Exception;", "void getOrders();", "@Override\r\n public void getAllCookies()\r\n {\n\r\n }", "public JSONObject fetchOrder(long orderId) throws Exception;", "public static String retrieveLoginCookies(HashMap<String, String> params) throws IOException {\n String url = Constants.LOGIN_URL;\n CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));\n HttpURLConnection con = null;\n try {\n URL obj = new URL(url);\n con = (HttpURLConnection) obj.openConnection();\n } catch (UnknownHostException e) {\n //try to fix broken url\n con = (HttpURLConnection) new URL(\"http://\" + url).openConnection();\n }\n\n //add request header\n con.setRequestMethod(\"POST\");\n //just for fun\n con.setRequestProperty(\"Accept-Language\", \"ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4,de;q=0.2\");\n\n String urlParameters = \"\";\n\n for (Map.Entry<String, String> e : params.entrySet()) {\n urlParameters += e.getKey() + \"=\" + e.getValue() + \"&\";\n }\n\n //send post request\n con.setDoOutput(true);\n DataOutputStream wr = new DataOutputStream(con.getOutputStream());\n wr.writeBytes(urlParameters);\n wr.flush();\n wr.close();\n\n\n // temporary to build request cookie header\n String sessionCookie = \"\";\n // find the cookies in the response header from the first request\n List<String> cookies = con.getHeaderFields().get(\"Set-Cookie\");\n if (cookies != null) {\n for (String cookie : cookies) {\n // only want the first part of the cookie header that has the value\n String value = cookie.split(\";\")[0];\n sessionCookie += value + \";\";\n }\n }\n return sessionCookie;\n }", "@Override\n\t\tpublic Cookie[] getCookies() {\n\t\t\treturn null;\n\t\t}", "public Session getSessionbyCookie(int cookie);", "public void part2(){\n Cookie c1 = new Cookie(\"uid\", \"2018\", 1800,false);\n Cookie c2 = new Cookie(\"PICK_KEY\", \"ahmd13ldsws8cw\",10800,true);\n Cookie c3 = new Cookie(\"REMEMBER_ME\",\"true\",10800,true);\n }", "@Override\n public List<Order> call() throws Exception {\n String lastName = customer.getLastName();\n String firstName = customer.getFirstName();\n String str = \"http://10.0.2.2:8082/getCustomerOrders?lastName=\" +lastName + \"&firstName=\"+firstName;\n URLConnection urlConn;\n BufferedReader bufferedReader;\n List<Order> orderList = new ArrayList<>();\n\n\n try {\n URL url = new URL(str);\n urlConn = url.openConnection();\n bufferedReader = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n\n JSONObject jsonObject = new JSONObject(line);\n Order order = new Order();\n order.setOrderID(jsonObject.getString(\"_id\"));\n order.setLastName(jsonObject.getString(\"lastName\"));\n order.setFirstName(jsonObject.getString(\"firstName\"));\n order.setDate(jsonObject.getString(\"dateOfOrder\"));\n order.setTotal(jsonObject.getDouble(\"Total\"));\n orderList.add(order);\n\n\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return orderList;\n }", "public String[] getCookies() throws GGException{\n\t\tif(!authorized){\n\t\t\tthrow new GGException(GGErrorCodes.GG_UNABLE_TO_AUTH);\n\t\t}\n\t\treturn cookies;\n\t}", "@Test\n\t //Extracting a string from the response\n\t public void getBasicAuthTestResultCookies() {\n\t Cookies cookies = given ()\n\t \t.spec(requestSpec)\n\t .when()\n\t .get (\"/maps/api/place/textsearch/json\")\n\t .detailedCookies();\n\t System.out.println(\"Cookies\"+cookies.size());\n\t System.out.println(\"CookiesList\"+cookies.getList(\"cookie1\").size());\n\t //System.out.println(\"Cookies\"+cookies.values().toString());\n\t //Assert.assertEquals(statusCode.toString(), \"200\");\n\t }", "@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\n }", "public List<Map<String, Object>> getOrder(String id);", "@GetMapping(path = \"/orders\")\n Iterable<ShopOrder> getOrdersByUser(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "public static synchronized Cookie[] getCookies(HttpSession session) {\n Vector cookiesPending = (Vector) getObject(session, COOKIES_PENDING);\n Vector cookiesSent = (Vector) getObject(session, COOKIES_SENT);\n\n // Determine the total number of cookies\n int cookieCount = 0;\n if (cookiesPending != null) {\n cookieCount = cookieCount + cookiesPending.size();\n }\n if (cookiesSent != null) {\n cookieCount = cookieCount + cookiesSent.size();\n }\n\n // Construct the list of cookies\n Cookie[] cookiesAll = null;\n if (cookieCount > 0) {\n cookiesAll = new Cookie[cookieCount];\n int cookieIdx = 0;\n\n // Get a combined list of all pending and sent cookies\n Cookie current = null;\n if (cookiesSent != null) {\n for (int s = 0; s < cookiesSent.size(); s++) {\n cookiesAll[cookieIdx] = (Cookie) cookiesSent.get(s);\n cookieIdx++;\n }\n }\n\n // Pending cookies will overwrite any existing cookies\n if (cookiesPending != null) {\n for (int p = 0; p < cookiesPending.size(); p++) {\n cookiesAll[cookieIdx] = (Cookie) cookiesPending.get(p);\n cookieIdx++;\n }\n }\n\n }\n\n\n return cookiesAll;\n }", "public Cookie[] getCookieObjects() {\n\t\tCookie[] result = request.getCookies();\n\t\treturn result != null ? result : new Cookie[0];\n\t}", "void getMarketOrders();", "public List<Cookie> getCookies() {\n return cookies == null ? Collections.EMPTY_LIST : cookies;\n }", "List<Order> selectAll(int userid);", "public void setCookies(Series<Cookie> cookies) {\n this.cookies = cookies;\n }", "@DOMSupport(DomLevel.ONE)\r\n @Property String getCookie();", "static Map<String, Cookie> parseCookies(Headers headers) {\n\t\tMap<String, String> params = parseHeaderParams(headers.get(HeaderName.COOKIE));\n\t\tMap<String, Cookie> cookies = new LinkedHashMap<>();\n\t\tfor (Map.Entry<String, String> entry : params.entrySet()) {\n\t\t\tif (!entry.getValue().isEmpty()) {\n\t\t\t\tcookies.put(entry.getKey(), new Cookie(entry.getKey(), entry.getValue()));\n\t\t\t}\n\t\t}\n\t\treturn cookies;\n\t}", "List<Order> getByUser(User user);", "List<Order> getUserOrderList(int userId) throws ServiceException;", "public List getOrderDetails(OrderDetail orderDetail);", "public abstract List<CustomerOrder> findAll(Iterable<Long> ids);", "public static String getCookiesFromWebkitSqlite(String cookieFile, final String domain, String[] hosts, String[] paths, Object dbLockObject) throws ClassNotFoundException, SQLException {\r\n\t\tStringBuilder sbSQLQuery = new StringBuilder(\"SELECT * FROM cookies WHERE (host_key = '\" + domain + \"' OR \");\r\n\t\tfor (int i = 0; i < hosts.length; i++) {\r\n\t\t\tsbSQLQuery.append(\"host_key = '\" + hosts[i] + \"'\");\r\n\t\t\tif (i < hosts.length - 1) {\r\n\t\t\t\tsbSQLQuery.append(\" OR \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tsbSQLQuery.append(\") AND (\");\r\n\t\tfor (int i = 0; i < paths.length; i++) {\r\n\t\t\tsbSQLQuery.append(\"path = '\" + paths[i] + \"'\");\r\n\t\t\tsbSQLQuery.append(\" OR \");\r\n\t\t\tsbSQLQuery.append(\"path = '\" + paths[i] + \"/'\");\r\n\t\t\tif (i < paths.length - 1) {\r\n\t\t\t\tsbSQLQuery.append(\" OR \");\r\n\t\t\t}\r\n\t\t}\r\n\t\tsbSQLQuery.append(\")\");\r\n\t\tString sqlQuery = sbSQLQuery.toString();\r\n\r\n\t\tClass.forName(\"org.sqlite.JDBC\");\r\n\r\n\t\tList<String[]> v = new ArrayList<>();\r\n\r\n\t\tsynchronized (dbLockObject) {\r\n\t\t\tlogger.debug(\"SQL-Query: \" + sqlQuery);\r\n\t\t\ttry (Connection con = DriverManager.getConnection(\"jdbc:sqlite:\" + cookieFile)) {\r\n\t\t\t\ttry (Statement stat = con.createStatement()) {\r\n\t\t\t\t\ttry (ResultSet rs = stat.executeQuery(sqlQuery)) {\r\n\t\t\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t * 1: id\r\n\t\t\t\t\t\t\t * 2: name\r\n\t\t\t\t\t\t\t * 3: value\r\n\t\t\t\t\t\t\t * 4: host\r\n\t\t\t\t\t\t\t * 5: path\r\n\t\t\t\t\t\t\t * 6: expiry\r\n\t\t\t\t\t\t\t * 7: lastAccessed\r\n\t\t\t\t\t\t\t * 8: isSecure\r\n\t\t\t\t\t\t\t * 9: isHttpOnly\r\n\t\t\t\t\t\t\t * 10: encrypted value\r\n\t\t\t\t\t\t\t */\r\n\t\t\t\t\t\t\tString[] cookie = new String[9];\r\n\t\t\t\t\t\t\tcookie[0] = rs.getString(\"name\");\r\n\t\t\t\t\t\t\tcookie[1] = rs.getString(\"value\");\r\n\t\t\t\t\t\t\tcookie[2] = rs.getString(\"host_key\");\r\n\t\t\t\t\t\t\tcookie[3] = rs.getString(\"path\");\r\n\t\t\t\t\t\t\tcookie[4] = rs.getString(\"expires_utc\");\r\n\t\t\t\t\t\t\tcookie[5] = rs.getString(\"last_access_utc\");\r\n\t\t\t\t\t\t\tcookie[6] = rs.getString(\"secure\");\r\n\t\t\t\t\t\t\tcookie[7] = rs.getString(\"httponly\");\r\n\t\t\t\t\t\t\tbyte[] encryptedValue = rs.getBytes(\"encrypted_value\");\r\n\t\t\t\t\t\t\tcookie[8] = decryptValue(encryptedValue, cookie[0], cookie[2]);\r\n\t\t\t\t\t\t\tv.add(cookie);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlogger.debug(\"Found cookies: \" + v.size());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException se) {\r\n\t\t\t\tlogger.error(\"Could not read cookies from file: {}\", cookieFile, se);\r\n\t\t\t\tthrow se;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Sort Cookies\r\n\t\tCollections.sort(v, cookieComparator);\r\n\r\n\t\tStringBuilder sbCookies = new StringBuilder();\r\n\t\tfor (String[] cookiex : v) {\r\n\t\t\tif (sbCookies.length() > 0) {\r\n\t\t\t\tsbCookies.append(\"; \");\r\n\t\t\t}\r\n\t\t\tif (!cookiex[8].isEmpty()) {\r\n\t\t\t\tsbCookies.append(cookiex[0] + \"=\" + cookiex[8]);\r\n\t\t\t} else {\r\n\t\t\t\tsbCookies.append(cookiex[0] + \"=\" + cookiex[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sbCookies.toString();\r\n\t}", "HttpClientRequest addCookie(Cookie cookie);", "public List<String> retrieveServicesOfOrder(String orderID) {\r\n\t\tlogger.info(\"will retrieve ActiveServiceOfExternalPartners\" );\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tObject response = template.\r\n\t\t\t\t\trequestBody( CATALOG_GET_SERVICE_BY_ORDERID, orderID );\r\n\r\n\t\t\tlogger.debug(\"will retrieve ServicesOfOrder response: \" + response.getClass() );\r\n\t\t\tif ( !(response instanceof String)) {\r\n\t\t\t\tlogger.error(\"List object is wrong.\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tString[] sor = toJsonObj( (String)response, String[].class ); \r\n\t\t\tlogger.debug(\"ServicesOfOrder response is: \" + response);\r\n\t\t\t\r\n\t\t\treturn Arrays.asList(sor);\r\n\t\t\t\r\n\t\t}catch (Exception e) {\r\n\t\t\tlogger.error(\"Cannot retrieve Listof ServicesOfOrder . \" + e.toString());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "List<CustomerOrder> getAllCustomerOrder();", "public List<Order> getAllUsersOrdersById(long userId);", "private String createCookies() {\n\n String bengLoginID = uid + \"\";\n String timeStr = MyApplication.getInstance().authorTime;\n ToastUtil.toast(timeStr + \"\");\n String cookes = MyApplication.getInstance().bengLoginId + \"; \" + MyApplication.getInstance().userHit + \"; \" + MyApplication.getInstance().authorID + \"; \" + timeStr + \"; \" + MyApplication.getInstance().phpSessid;\n ToastUtil.toast(cookes);\n return cookes;\n\n }", "List<Order> findClientOrders(long clientId) throws DaoProjectException;", "@GET\n\t@Path(\"{id}\")\n\tpublic Response getOrder(@PathParam(\"id\") String id) {\n\t\t String orderJSON = null;\n\t\t try {\n\t\t \torderJSON = backend.getOrder(id);\n\t\t \t// returns a JSON string based on a UUID\n\t\t } catch ( NotFoundException e) {\n\t\t \treturn Response.status(404).entity(id).build();\n\t\t }\n\t\t return Response.status(200).entity(orderJSON).build();\n\t}", "List<Order> getHistoryOrders(HistoryOrderRequest orderRequest);", "@Nullable\n public ArrayList<Order> doRetrieveByUsername(@NotNull String username) {\n try {\n Connection cn = ConPool.getConnection();\n PreparedStatement st;\n User u = ud.doRetrieveByUsername(username);\n Order o = null;\n Operator op = null;\n ArrayList<Order> orders = new ArrayList<>();\n if (u != null) {\n st = cn.prepareStatement(\"SELECT * FROM `order` O WHERE O.user=?;\");\n st.setString(1, username);\n ResultSet rs = st.executeQuery();\n while (rs.next()) {\n o = new Order();\n o.setUser(u);\n o.setId(rs.getInt(2));\n o.setTotPrice(rs.getDouble(3));\n o.setNumberOfItems(rs.getInt(4));\n o.setData(rs.getString(5));\n if (rs.getString(6) != null) {\n op = opd.doRetrieveByUsername(rs.getString(6));\n } else {\n op = null;\n }\n o.setOperator(op);\n st = cn.prepareStatement(\"SELECT * FROM digitalpurchasing D WHERE D.order=?;\");\n st.setInt(1, o.getId());\n ResultSet rs2 = st.executeQuery();\n DigitalProduct dp = null;\n while (rs2.next()) {\n dp = dpd.doRetrieveById(rs2.getInt(1));\n o.addProduct(dp, rs2.getInt(3));\n }\n st = cn.prepareStatement(\"SELECT * FROM physicalpurchasing P WHERE P.order=?;\");\n st.setInt(1, o.getId());\n rs2 = st.executeQuery();\n PhysicalProduct pp = null;\n while (rs2.next()) {\n pp = ppd.doRetrieveById(rs2.getInt(1));\n o.addProduct(pp, rs2.getInt(3));\n }\n orders.add(o);\n }\n st.close();\n cn.close();\n }\n return orders;\n } catch (SQLException e) {\n return null;\n }\n }", "public Set<Cookie> getCookies(String name) {\r\n Set<Cookie> matchCookies = new HashSet<Cookie>();\r\n if (lastCookies != null) {\r\n for (Cookie c : lastCookies) {\r\n if (c.getName().equals(name)) {\r\n matchCookies.add(c);\r\n }\r\n }\r\n }\r\n return matchCookies;\r\n }", "@CrossOrigin\n\t@RequestMapping(value=\"/order/items/{orderid}\", method=RequestMethod.GET)\n\tpublic ResponseEntity<List<CartItem>> getAllCartItems(@PathVariable(\"orderid\") int orderid){\n\t\treturn new ResponseEntity<List<CartItem>>(CartItemService.getAllCartItem(orderid), HttpStatus.OK);\n\t}", "public List<Orders> findOrder(Map<String, Object> params);", "public void setCookies(String[] cookies) throws IOException {\r\n if (cookies == null)\r\n return;\r\n for (int i = 0; i < cookies.length - 1; i += 2) {\r\n setCookie(cookies[i], cookies[i + 1]);\r\n }\r\n }", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:41.967 -0500\", hash_original_method = \"D5A9FC7DDB356B7F9D175C82B50A2AF1\", hash_generated_method = \"24C7574FF957618A543446AAAEE4BC4D\")\n \nprivate void setCookies(String url, String value) {\n if (value.contains(\"\\r\") || value.contains(\"\\n\")) {\n // for security reason, filter out '\\r' and '\\n' from the cookie\n int size = value.length();\n StringBuilder buffer = new StringBuilder(size);\n int i = 0;\n while (i != -1 && i < size) {\n int ir = value.indexOf('\\r', i);\n int in = value.indexOf('\\n', i);\n int newi = (ir == -1) ? in : (in == -1 ? ir : (ir < in ? ir\n : in));\n if (newi > i) {\n buffer.append(value.subSequence(i, newi));\n } else if (newi == -1) {\n buffer.append(value.subSequence(i, size));\n break;\n }\n i = newi + 1;\n }\n value = buffer.toString();\n }\n CookieManager.getInstance().setCookie(url, value);\n }", "public Collection<Cookie> getCookies()\n\t{\n\t\tparseCookiesIfNecessary();\n\t\tif (this.cookies != null)\n\t\t\treturn this.cookies.values();\n\t\telse\n\t\t\treturn null;\n\t}", "public static Series<Cookie> getResourceCookies() {\n return getRequest() == null ? null : getRequest().getCookies();\n }", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "public static CookieStore getCookieStore(String[] ks, String[] vs){\n \tCookieStore cookieStore = new BasicCookieStore();\n \t\n \tfor(int i=0; i<ks.length; i++ ){\n \t\tBasicClientCookie ck = new BasicClientCookie(ks[i] ,vs[i]);\n \t\tck.setDomain(\".weibo.com\");\n \t\tck.setPath(\"/\");\n \t\tcookieStore.addCookie(ck);\n \t}\n \t\n \treturn cookieStore;\n }", "public Map<String, String> getCookies() {\r\n return _cookies;\r\n }", "public void getResponseCookies(@NonNull Uri uri, @NonNull Callback<List<String>> callback) {\n ThreadCheck.ensureOnUiThread();\n if (WebLayer.getSupportedMajorVersionInternal() < 101) {\n throw new UnsupportedOperationException();\n }\n try {\n ValueCallback<List<String>> valueCallback = (List<String> result) -> {\n callback.onResult(result);\n };\n mImpl.getResponseCookies(uri.toString(), ObjectWrapper.wrap(valueCallback));\n } catch (RemoteException e) {\n throw new APICallException(e);\n }\n }", "public List<OrderDetail> getOrderDetailByOrder(Long orderId);", "private ObservableList<Order> getAllCustomerOrders(int customerId){\r\n ObservableList<Order> customerOrders = null;\r\n try {\r\n OrderDB odb = new OrderDB();\r\n customerOrders = odb.getAllOrders(customerId);\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n return customerOrders;\r\n }", "public List<OrderReport> getAllOrders(@Param(\"storeid\") String storeid);", "public Object getAllCustomers(HttpServletRequest req);", "@Override\n\tpublic List<OdderDTO> odderList(String id) {\n\t\treturn cookie.odderList(id);\n\t}", "List<Product> getProducts(Order order);", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:41.970 -0500\", hash_original_method = \"E3D7D6931554145E868760CB2C4A26A3\", hash_generated_method = \"EE86FFF77F12F6E87C0C4F0204A00383\")\n \nprivate String cookies(String url) {\n return CookieManager.getInstance().getCookie(url);\n }", "private List<String> getSessionIdFromCookie()\n //----------------------------------------------------------------\n {\n String name = null;\n String value = null;\n PageContext pageContext = null;\n HttpServletRequest httpRequest = null;\n Cookie[] cookies = null;\n pageContext = (PageContext) this.getJspContext();\n List<String> sessionList = null;\n\n /*\n * There might be multiple Cookies with the same name\n * Get the value for each Cookie and store it in the List\n */\n\n sessionList = new LinkedList<String>();\n\n if (pageContext != null)\n {\n httpRequest = (HttpServletRequest) pageContext.getRequest();\n if (httpRequest != null)\n {\n cookies = httpRequest.getCookies();\n if (cookies != null)\n {\n for (Cookie cookie : cookies)\n {\n if (cookie != null)\n {\n name = cookie.getName();\n if (name != null && name.length() > 0 && name.equals(COOKIE_NAME))\n {\n value = cookie.getValue();\n if (value != null && value.length() > 0)\n {\n sessionList.add(value);\n }\n }\n }\n }\n }\n }\n }\n\n return sessionList;\n }", "@CrossOrigin(origins = \"*\")\n @GetMapping(\"/orders/user/{userid}\")\n public ResponseEntity<List<Order>> getAllOrdersByUserId(@PathVariable(\"userid\") UUID userId) {\n List<Order> orders = ordersRepository.findAllByUserId(userId);\n return ResponseEntity.ok(orders);\n }", "CookieValue(Cookie cookie)\n {\n valuesAsString = cookie.getValue();\n /* XXX Not sure if this works */\n if (DBG.isDebugEnabled()) DBG.debug(\"Cookie values: \" +\n valuesAsString);\n if (valuesAsString.indexOf('=') != -1) \n {\n Map hashValues = ParseQueryString.parse(valuesAsString);\n /* Lowercase the value keys */\n for (Iterator i = hashValues.keySet().iterator(); i.hasNext();)\n {\n String key = (String)i.next();\n String value[] = (String[])hashValues.get(key);\n if (DBG.isDebugEnabled()) {\n DBG.debug(\"Key: \" + key);\n DBG.debug(\"Value: \" + value[0]);\n }\n cookieValues.put(new IdentNode(key), value[0]);\n }\n }\n }", "public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }", "@Override\n public Collection<Order> getOrdersByUserId(String id) {\n Collection<Order> orders = getAll();\n return orders.stream()\n .filter(x -> x.getCustomerId().equals(id))\n .collect(Collectors.toList());\n }", "public List<Weborders> getWeborders() {\r\n List<Weborders> webordersListe = null;\r\n Transaction tx = null;\r\n try {\r\n tx = sessionH.beginTransaction();\r\n Query q = this.sessionH.createQuery(\"from Weborders ORDER BY weborderId\");\r\n webordersListe = q.list();\r\n tx.commit();\r\n } catch (HibernateException e) {\r\n if (tx != null) {\r\n tx.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n sessionH.close();\r\n }\r\n return webordersListe;\r\n }", "@RequestMapping(\"/getUserOrder\")\n public List<Order> getUserOrder(@RequestParam(\"user_id\") int user_id){\n return orderService.getOrdersByUser(user_id);\n }", "public Series<Cookie> getCookies() {\n // Lazy initialization with double-check.\n Series<Cookie> c = this.cookies;\n if (c == null) {\n synchronized (this) {\n c = this.cookies;\n if (c == null) {\n this.cookies = c = new CookieSeries();\n }\n }\n }\n return c;\n }", "public List<ViewXwZqkh> Query(String filters, String orders, Object... values);", "private Cookie getCookie(HttpServletRequest request,String name) {\r\n\t\tCookie[] cookies=request.getCookies();\r\n\r\n\t\tfor(Cookie c:cookies){\r\n\t\t\tif(c.getName().equals(name))\r\n\t\t\t\treturn c;\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "public List<CustomerOrder> custOrders(String custid) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "String getCookie(HttpServletRequest request, String name) throws ValidationException;", "@Override\n public void addCookie(Cookie arg0) {\n\n }", "List<OrderDto> getOrders();", "private List<HttpCookie> parseCookiesFromHeaders(HttpHeaders httpHeaders) {\n List<HttpCookie> cookies = Lists.newArrayList();\n List<String> cookieHeaders = httpHeaders.get(HttpHeaders.SET_COOKIE);\n if (cookieHeaders != null) {\n cookieHeaders.forEach(header -> cookies.addAll(HttpCookie.parse(header)));\n }\n\n cookieHeaders = httpHeaders.get(HttpHeaders.SET_COOKIE2);\n if (cookieHeaders != null) {\n cookieHeaders.forEach(header -> cookies.addAll(HttpCookie.parse(header)));\n }\n return cookies;\n }", "public static String getCookieValue(final String cookieName, final Cookie[] cookies)\n throws IllegalArgumentException {\n \n // Sanity checks.\n if (cookieName == null || cookieName.equals(\"\"))\n throw new IllegalArgumentException(\"Cookie name must be a non-empty string\");\n if (cookies == null)\n return null;\n \n // Return cookie value, if set.\n String value = null;\n for (int i = 0; i < cookies.length; i++) {\n if (cookies[i].getName().equals(cookieName))\n value = cookies[i].getValue();\n }\n return value;\n \n }", "@GET\n @Path(\"orderlist\")\n @Produces(MediaType.TEXT_PLAIN)\n public String getOrderList(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + os.getAllOrders().toJSONString() + \")\";\n }", "@GetMapping(\"/order\")\n\t public String getAllOrders() {\n\t \tList<Order> orders = oService.getAllOrers();\n\t StringBuffer ordertext = new StringBuffer();\n\t orders.parallelStream().forEach(ord->{\n\t \t ordertext.append(\"<tr><td>\"+ord.getOrdid()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"badge badge-secondary\\\">\"+ord.getPaymentstatus()\n\t +\"</span></td>\") ;\n\t ordertext.append(\"<td>\"+ord.getPaymentgroup()+\"</td>\") ; \n\t ordertext.append(\"<td><span class=\\\"badge badge-success\\\">\"+ord.getOrdstatus()+\"</span></td>\");\n\t ordertext.append(\"<td>\"+ord.getOrderdate()+\"</td>\") ;\n\t ordertext.append(\"<td>\"+ord.getTotal()+\"</td>\") ;\n\t ordertext.append(\"<td><span class=\\\"fa fa-eye\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"showprd('\"+ord.getOrdid()+\"')\\\" title=\\\"view details\\\"> </span>\") ;\n\t ordertext.append(\"<span class=\\\"fa fa-remove\\\" style=\\\"cursor:pointer;\\\" onclick=\\\"\\\" title=\\\"cancel\\\"></span></td>\") ;\n\t });\n\t return ordertext.toString() ;\n\t }", "List<Cargo> getCargoesForOrder(OrderDTO orderDTO);", "GroupKey appCookie();", "@Override\r\n public void delCookie(String name)\r\n {\n\r\n }", "public static ArrayList<Order> getOrders(Client client) {\n\t\tArrayList<Order> temp = new ArrayList<Order>();\n\t\tString request = \"SELECT * FROM `order` WHERE `client` = ?\";\n\t\ttry {\n\t\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(request);\n\t\t\tstmt.setInt(1, client.getId());\n\t\t\tResultSet results = stmt.executeQuery();\n\t\t\twhile(results.next()) {\n\t\t\t\ttemp.add(new Order(results.getInt(1), results.getString(4), results.getDate(3), CartItem.getCartItems(results.getInt(1))));\n\t\t\t}\n\t\t\treturn temp;\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\tSystem.out.println(\"An error occured while fetching orders: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public static String sendOrder(ArrayList<MenuItem> orders) {\n try {\n JSONObject obj = new JSONObject();\n obj.put(\"name\", new String(\"Person1\"));\n obj.put(\"storeId\", storeId);\n JSONArray array = new JSONArray(); //array of items ordered\n JSONObject orderDetails = new JSONObject(); //for each item ordered\n\n int orderSize = orders.size();\n for (int i = 0; i < orderSize; i++) {\n //add order details\n orderDetails.put(\"itemId\", orders.get(i).getId());\n orderDetails.put(\"quantity\", orders.get(i).getQuantity());\n //put order details into this array\n array.put(orderDetails);\n orderDetails = new JSONObject(); //reset the orderDetail for a new item.\n }\n obj.put(\"order\", array);\n// obj.put(\"name\", new String(\"John\")); //name on the order\n// obj.put(\"storeId\", storeId);\n\n// LinkedHashMap<String, String> jsonOrderedMap = new LinkedHashMap<String, String>();\n//\n// jsonOrderedMap.put(\"name\",new String(\"John\"));\n// jsonOrderedMap.put(\"storeId\", storeId);\n// jsonOrderedMap.put(\"order\", array);\n//\n// JSONObject orderedJson = new JSONObject(jsonOrderedMap);\n//\n// JSONArray jsonArray = new JSONArray(Arrays.asList(orderedJson));\n\n return obj.toString();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n }", "public List getOrderDetailsByIdList(final Map idList);", "public List<com.scratch.database.mysql.jv.tables.pojos.Session> fetchByData(String... values) {\n return fetch(Session.SESSION.DATA, values);\n }", "@Override\n public List<Customer> call() throws Exception {\n string = string.replace(\"[\", \"\");\n string = string.replace(\"]\",\"\");\n string = string.replace(\" \", \"\");\n String str = \"http://10.0.2.2:8082/getCustomersByID?customerIDs=\" + string.replace(\"\\\"\", \"'\");\n URLConnection urlConn;\n BufferedReader bufferedReader;\n List<Customer> customerList = new ArrayList<>();\n\n\n try {\n URL url = new URL(str);\n urlConn = url.openConnection();\n bufferedReader = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n JSONObject jsonObject = new JSONObject(line);\n Customer customer = new Customer();\n customer.setCustomerID(jsonObject.getString(\"_id\"));\n customer.setLastName(jsonObject.getString(\"lastName\"));\n customer.setFirstName(jsonObject.getString(\"firstName\"));\n customer.setPhoneNumber(jsonObject.getString(\"phoneNumber\"));\n customer.setAddress(jsonObject.getString(\"address\"));\n customer.setBalance(jsonObject.getString(\"balance\"));\n customerList.add(customer);\n\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return customerList;\n }", "static void addOrder(orders orders) {\n }", "private void getCities(HttpServletRequest req, HttpServletResponse resp) throws IOException {\n\t\t\n\t\tCitiesServiceImpl cities = new CitiesServiceImpl();\n\t\t\n\t\t\n\t\tString parameter = req.getParameter(\"\");\n\t\tList<Cities> select = cities.selectAllId(\"2\");\n\t\t\n\t\t\n\t\t\n\t\tGson gson =new GsonBuilder()\n\t\t.create();\n\t\tString json = gson.toJson(select); \n\t\tSystem.out.println(\"json:\"+json);\n\t\tPrintWriter writer = resp.getWriter();\n\t\twriter.print(json); // 返回数据给前台\n\t\twriter.close();\n\t\n\t}", "@GET\n @Produces(\"text/plain\")\n public String getList(\n\n final StringBuilder builder = new StringBuilder();\n\n builder.append(\"JSESSIONID: \").append(sessionId).append(\"<br>Accept: \").append(acceptHeader);\n\n return builder.toString();\n }", "public static Vector commitCookies(HttpSession session) {\n Vector cookiesPending = (Vector) getObject(session, COOKIES_PENDING);\n Vector cookiesSent = (Vector) getObject(session, COOKIES_SENT);\n\n // List of pending cookies\n Vector response = new Vector();\n\n // Make sure there are cookies pending\n if (cookiesPending != null) {\n // Make sure the list of sent cookies is created if necessary\n if (cookiesSent == null) {\n cookiesSent = new Vector();\n }\n\n // Process all pending cookies\n for (int idx = 0; idx < cookiesPending.size(); idx++) {\n boolean sent = false;\n Cookie pending = (Cookie) cookiesPending.remove(idx);\n response.add(pending);\n\n // Add the cookie to the list of sent cookies\n for (int s = 0; s < cookiesSent.size(); s++) {\n Cookie cookie = (Cookie) cookiesSent.get(s);\n if (cookie.getName().equals(pending.getName())) {\n cookiesSent.set(s, pending);\n sent = true;\n }\n }\n\n // If cookie did not already exist, add it now\n if (sent == false) { \n cookiesSent.add(pending); \n sent = true;\n }\n\n // Make sure the sent vector exists in the session\n setObject(session, COOKIES_SENT, cookiesSent);\n }\n }\n\n return response;\n }", "public Cookies cookies() {\n return new Cookies() {\n @Override\n public Optional<Cookie> get(String name) {\n return cookies.stream().filter(c -> c.name().equals(name)).findFirst();\n }\n\n @Override\n public Iterator<Cookie> iterator() {\n return cookies.iterator();\n }\n };\n }", "public static byte[] createData(byte objHandle[])\n {\n return addLengthOctet(COOKIE + \" \" + new String(Base64.encode(objHandle)));\n }", "List<OrderDTO> findAll(String customerId);", "public OrderList findOrders(){\n sql=\"SELECT * FROM Order\";\n Order order;\n try{\n ResultSet resultSet = db.SelectDB(sql);\n \n while(resultSet.next()){\n order = new Order();\n order.setOrderID(resultSet.getString(\"OrderID\"));\n order.setCustomerID(resultSet.getString(\"CustomerID\"));\n order.setStatus(resultSet.getString(\"Status\"));\n ordersList.addItem(order);\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash finding all orders\" + e);\n }\n return ordersList;\n }", "@Test\n\tpublic void getAllClientOrders() {\n\t\tString email = \"[email protected]\";\n\t\t\n\t\tservice.insertClient(\"devtestuser\", \"test\", email, \"devpass\");\n\t\t\n\t\tint clientId = service.getClient(email).getClient();\n\t\tservice.insertOrder(\"VODAFONE\", \"VOD\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"Apple\", \"APPL\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"VODAFONE\", \"VOD\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"BT Group\", \"BT\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\t\n\t\tList<OrderDTO> clientOrders = service.getClientOrders(clientId);\n\t\t\n\t\tassertEquals(4, clientOrders.size());\n\t\t\n\t\t\n\t\tfor(OrderDTO orderDTO : clientOrders) {\n\t\t\tservice.deleteOrder(orderDTO.getOrderId());\n\t\t}\n\t\t\n\t\tservice.deleteClient(email);\n\t}", "public String getCookie(String name) {\r\n return _cookies.get(name);\r\n }", "List<UserOrder> findUserOrdersByUserId(Long userId);", "public void setOrders(ArrayList<Order> orders) {\n this.orders = orders;\n }", "OrderDetailBean getSearchOrderById(long orderIdi,String userLogin,int paymenttype) throws SQLException, Exception, RemoteException;" ]
[ "0.6929124", "0.6475093", "0.5825973", "0.56758595", "0.5596224", "0.55652916", "0.5533742", "0.5526373", "0.5436602", "0.542011", "0.54172695", "0.5399433", "0.53972536", "0.5363861", "0.53630745", "0.53320205", "0.5325192", "0.5311433", "0.53098166", "0.52997607", "0.52752054", "0.52278894", "0.5210044", "0.51723963", "0.51710844", "0.51573426", "0.5148094", "0.51362216", "0.51299644", "0.5127921", "0.5126596", "0.5126067", "0.5097541", "0.509189", "0.5079391", "0.5079012", "0.5077183", "0.5060812", "0.50520647", "0.50293887", "0.5025405", "0.50129765", "0.499188", "0.49843422", "0.49799123", "0.4970326", "0.4969747", "0.49421483", "0.49421483", "0.494165", "0.49389324", "0.49328446", "0.49161962", "0.49037704", "0.4901488", "0.49001002", "0.4893256", "0.48883873", "0.48876363", "0.48706877", "0.4869767", "0.48660392", "0.48593733", "0.48533916", "0.4831167", "0.48290417", "0.48168868", "0.4802598", "0.47925428", "0.47638205", "0.47620434", "0.47553426", "0.47545096", "0.47533444", "0.4751731", "0.474792", "0.47344142", "0.4729718", "0.47247073", "0.47184935", "0.47182983", "0.4715803", "0.47066104", "0.47064492", "0.47040516", "0.4692271", "0.46897852", "0.46841335", "0.4675875", "0.4670035", "0.46665978", "0.46648306", "0.4662894", "0.4661953", "0.46602568", "0.46593964", "0.4650739", "0.46454546", "0.46448112", "0.46440515" ]
0.7095939
0
/ Initializes material attributes from the material in the given / model at the given index. / \param[in] pModel Pointer to the source model that contains the / material definitions. / \param[in] materialIndex Index of the material to get properties from / \return True if the material could be initialized from the requested / model and material index. False if there was a problem and / the material could not be initialized.
boolean InitFromMaterial(NvModelExt pModel, int materialIndex){ if (null == pModel) return false; Material pMaterial = pModel.GetMaterial(materialIndex); if (null == pMaterial) return false; m_ambient = pMaterial.m_ambient; m_diffuse = pMaterial.m_diffuse; m_emissive = pMaterial.m_emissive; m_specular = pMaterial.m_specular; m_shininess = pMaterial.m_shininess; m_alpha = pMaterial.m_alpha; if (pMaterial.m_diffuseTextures.isEmpty()) { m_diffuseTexture = -1; } else { m_diffuseTexture = pMaterial.m_diffuseTextures.get(0).m_textureIndex; } if (pMaterial.m_bumpMapTextures.isEmpty()) { m_bumpMapTexture = -1; } else { m_bumpMapTexture = pMaterial.m_bumpMapTextures.get(0).m_textureIndex; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean setMaterial(int index) {\n if (isValidIndex(index, MATERIALS)) {\n material = index;\n return true;\n } else {\n return false;\n }\n }", "public void setMaterialInstanceAt(@EntityInstance int i, @IntRange(from = 0) int primitiveIndex,\n @NonNull MaterialInstance materialInstance) {\n int required = materialInstance.getMaterial().getRequiredAttributesAsInt();\n int declared = nGetEnabledAttributesAt(mNativeObject, i, primitiveIndex);\n if ((declared & required) != required) {\n Platform.get().warn(\"setMaterialInstanceAt() on primitive \"\n + primitiveIndex + \" of Renderable at \" + i\n + \": declared attributes \" + getEnabledAttributesAt(i, primitiveIndex)\n + \" do no satisfy required attributes \" + materialInstance.getMaterial().getRequiredAttributes());\n }\n nSetMaterialInstanceAt(mNativeObject, i, primitiveIndex, materialInstance.getNativeObject());\n }", "public void setMaterialIndex(int index) { materialIndex = index; }", "@NonNull\n public Builder material(@IntRange(from = 0) int index, @NonNull MaterialInstance material) {\n nBuilderMaterial(mNativeBuilder, index, material.getNativeObject());\n return this;\n }", "public void read() {\n prepareAdditionalStates();\n materialParameters.clear();\n int level = 0;\n boolean params = false;\n boolean states = false;\n try {\n //scan material text\n for (String line : material.asLines()) {\n //trim line incl comments\n line = trimLine(line);\n //find and load matdef file\n if (line.startsWith(\"Material \") || line.startsWith(\"Material\\t\") && level == 0) {\n parseMaterialProperties(line);\n }\n //start parsing material parameters\n if (line.startsWith(\"MaterialParameters \") || line.startsWith(\"MaterialParameters\\t\") || line.startsWith(\"MaterialParameters{\") && level == 1) {\n params = true;\n }\n //start parsing renderstates\n if (line.startsWith(\"AdditionalRenderState \") || line.startsWith(\"AdditionalRenderState\\t\") || line.startsWith(\"AdditionalRenderState{\") && level == 1) {\n states = true;\n }\n //up a level\n if (line.indexOf(\"{\") != -1) {\n level++;\n }\n //down a level, stop processing parameters/states\n if (line.indexOf(\"}\") != -1) {\n level--;\n if (params) {\n params = false;\n }\n if (states) {\n states = false;\n }\n }\n //try reading parameter\n if (level == 2 && params) {\n int colonIdx = line.indexOf(\":\");\n if (colonIdx != -1) {\n String[] lines = line.split(\":\");\n MaterialProperty prop = new MaterialProperty();\n prop.setName(lines[0].trim());\n if (lines.length > 1) {\n prop.setValue(lines[lines.length - 1].trim());\n }\n materialParameters.put(prop.getName(), prop);\n }\n }\n //try reading state\n if (level == 2 && states) {\n String[] lines = null;\n int colonIdx = line.indexOf(\" \");\n if (colonIdx != -1) {\n lines = line.split(\" \");\n }\n colonIdx = line.indexOf(\"\\t\");\n if (colonIdx != -1) {\n lines = line.split(\"\\t\");\n }\n if (lines != null) {\n MaterialProperty prop = new MaterialProperty();\n String name = lines[0].trim();\n prop.setName(name);\n if (additionalRenderStates.get(name) != null) {\n\n prop.setType(additionalRenderStates.get(name).getType());\n if (lines.length > 1) {\n String value = \"\";\n for (int i = 1; i < lines.length; i++) {\n value += \" \" + lines[i];\n }\n prop.setValue(value.trim());\n } \n additionalRenderStates.put(prop.getName(), prop);\n }\n }\n }\n }\n checkWithMatDef();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n }", "private void checkWithMatDef() {\n //load matdef\n matDefEntries.clear();\n boolean params = false;\n int level = 0;\n if (matDef != null && matDef.isValid()) {\n try {\n for (String defLine : matDef.asLines()) {\n defLine = trimLine(defLine.trim());\n if (defLine.startsWith(\"MaterialParameters \") || defLine.startsWith(\"MaterialParameters\\t\") || defLine.startsWith(\"MaterialParameters{\") && level == 1) {\n params = true;\n }\n if (defLine.indexOf(\"{\") != -1) {\n level++;\n }\n if (defLine.indexOf(\"}\") != -1) {\n level--;\n if (params) {\n params = false;\n }\n }\n //read variable types\n if (level == 2 && params) {\n for (int i = 0; i < variableTypes.length; i++) {\n String string = variableTypes[i];\n if (defLine.startsWith(string)) {\n String name = trimName(defLine.replaceFirst(string, \"\"));\n matDefEntries.add(name);\n MaterialProperty prop = materialParameters.get(name);\n if (prop == null) {\n prop = new MaterialProperty();\n prop.setName(name);\n prop.setValue(\"\");\n materialParameters.put(prop.getName(), prop);\n }\n prop.setType(string);\n }\n }\n }\n }\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n } else {\n Logger.getLogger(EditableMaterialFile.class.getName()).log(Level.WARNING, \"Could not read MaterialDef!\");\n }\n for (Iterator<Map.Entry<String, MaterialProperty>> it = materialParameters.entrySet().iterator(); it.hasNext();) {\n Map.Entry<String, MaterialProperty> entry = it.next();\n if (!matDefEntries.contains(entry.getKey())) {\n it.remove();\n }\n }\n }", "public @NonNull MaterialInstance getMaterialInstanceAt(@EntityInstance int i,\n @IntRange(from = 0) int primitiveIndex) {\n long nativeMatInstance = nGetMaterialInstanceAt(mNativeObject, i, primitiveIndex);\n return new MaterialInstance(nativeMatInstance);\n }", "private void initMaterials()\r\n {\r\n get_availableMaterials().add(\r\n new Material( \"Wood\", EnvSettings.WOOD_COLOR, EnvSettings.WOOD_SPECIFIC_HEAT,\r\n EnvSettings.WOOD_TRANSPARENCY, EnvSettings.WOOD_THERMAL_CONDUCTIVITY,\r\n EnvSettings.WOOD_FLAME_POINT, EnvSettings.WOOD_DURABILITY, true, EnvSettings.WOOD_SMOKE_CAPACITY ) );\r\n get_availableMaterials().add(\r\n new Material( \"Air\", Scene3D.setBlue( _worldInitTemp ), EnvSettings.AIR_SPECIFIC_HEAT,\r\n EnvSettings.AIR_TRANSPARENCY, EnvSettings.AIR_THERMAL_CONDUCTIVITY,\r\n EnvSettings.VAPOR_FLAME_POINT, (int)( EnvSettings.INFINITIVE ), false , EnvSettings.AIR_SMOKE_CAPACITY) );\r\n get_availableMaterials().add(\r\n new Material( \"Metal\", EnvSettings.METAL_COLOR, EnvSettings.METAL_SPECIFIC_HEAT,\r\n EnvSettings.METAL_TRANSPARENCY, EnvSettings.METAL_THERMAL_CONDUCTIVITY,\r\n EnvSettings.INFINITIVE, (int)( EnvSettings.INFINITIVE ), false, EnvSettings.METAL_SMOKE_CAPACITY ) );\r\n }", "public void updateMaterial() {\n this.material = world.getRecipeManager().getFirstMatch(RecipeTypes.MATERIAL, this, world).orElse(null);\n }", "public Builder setMaterials(int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureMaterialsIsMutable();\n materials_.set(index, value);\n bitField0_ |= 0x00000008;\n onChanged();\n return this;\n }", "private void materialSetup(GL gl)\n {\n\tfloat white[] = { 1.0f, 1.0f, 1.0f, 1.0f };\n\tfloat black[] = { 0.0f, 0.0f, 0.0f, 1.0f };\n\tfloat dim[] = { 0.1f, 0.1f, 0.1f, 1.0f };\n\t\n\t// Set up material and light\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT, dim, 0);\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE, white, 0);\n\tgl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SPECULAR, dim, 0);\n\tgl.glMaterialf(GL.GL_FRONT_AND_BACK, GL.GL_SHININESS, 5);\n\n\t// Set light color\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, dim, 0);\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, white, 0);\n \tgl.glLightfv(GL.GL_LIGHT0, GL.GL_SPECULAR, black, 0);\n\n\t// Turn on light and lighting\n\tgl.glEnable(GL.GL_LIGHT0);\n\tgl.glEnable(GL.GL_LIGHTING);\n\n\t// Allow glColor() to affect current diffuse material\n\tgl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_DIFFUSE);\n\tgl.glEnable(GL.GL_COLOR_MATERIAL);\n }", "public Material getMaterial(int materialId) {\n\t\treturn null;\n\t}", "private Material validateAndGetMaterial(String rawMaterial) {\n Material material = Material.getMaterial(rawMaterial);\n\n // Try the official look up\n if (material == null) {\n\n // if that fails, try our custom lookup\n material = Utils.lookupMaterial(rawMaterial);\n\n if (material != null) {\n // if we find a old matching version, replace it with the new version\n Utils.log(\"Outdated Material found \" + rawMaterial + \" found new version \" + material.name(), 1);\n updateOutdatedMaterial(rawMaterial, material.name());\n Utils.log(\"Action has been transferred to use \" + material.name());\n\n } else {\n Utils.log(\"Material \" + rawMaterial + \" in kit \" + name + \" is invalid.\", 2);\n }\n }\n return material;\n }", "public void setAsMaterial(Material mat) throws IOException {\n assert (mat.getMaterialDef().getAssetName() != null);\n setName(\"MyMaterial\");\n setMatDefName(mat.getMaterialDef().getAssetName());\n createBaseMaterialFile();\n materialParameters.clear();\n Collection<MatParam> params = mat.getParams();\n for (Iterator<MatParam> it = params.iterator(); it.hasNext();) {\n MatParam matParam = it.next();\n materialParameters.put(matParam.getName(), new MaterialProperty(matParam));\n }\n additionalRenderStates.put(\"Wireframe\", new MaterialProperty(\"OnOff\", \"Wireframe\", mat.getAdditionalRenderState().isWireframe() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"DepthWrite\", new MaterialProperty(\"OnOff\", \"DepthWrite\", mat.getAdditionalRenderState().isDepthWrite() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"DepthTest\", new MaterialProperty(\"OnOff\", \"DepthTest\", mat.getAdditionalRenderState().isDepthTest() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"ColorWrite\", new MaterialProperty(\"OnOff\", \"ColorWrite\", mat.getAdditionalRenderState().isColorWrite() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"PointSprite\", new MaterialProperty(\"OnOff\", \"PointSprite\", mat.getAdditionalRenderState().isPointSprite() ? \"On\" : \"Off\"));\n additionalRenderStates.put(\"FaceCull\", new MaterialProperty(\"FaceCullMode\", \"FaceCull\", mat.getAdditionalRenderState().getFaceCullMode().name()));\n additionalRenderStates.put(\"Blend\", new MaterialProperty(\"BlendMode\", \"Blend\", mat.getAdditionalRenderState().getBlendMode().name()));\n additionalRenderStates.put(\"AlphaTestFalloff\", new MaterialProperty(\"Float\", \"AlphaTestFalloff\", mat.getAdditionalRenderState().getAlphaFallOff() + \"\"));\n additionalRenderStates.put(\"PolyOffset\", new MaterialProperty(\"Float,Float\", \"PolyOffset\", mat.getAdditionalRenderState().getPolyOffsetUnits() + \" \" + mat.getAdditionalRenderState().getPolyOffsetFactor()));\n checkWithMatDef();\n setAsText(getUpdatedContent());\n }", "public void setMATERIAL_VERSION(java.lang.String MATERIAL_VERSION) {\r\n this.MATERIAL_VERSION = MATERIAL_VERSION;\r\n }", "void createMaterial(Material material) throws CreateException;", "public com.google.protobuf.ByteString getMaterialsBytes(int index) {\n return materials_.getByteString(index);\n }", "public java.lang.String getMaterials(int index) {\n return materials_.get(index);\n }", "public void ApplyMaterial(TF3D_Material mat)\n\t{\n\t\tif (mat.typ == F3D.MAT_TYPE_TEXTURE)\n\t\t{\n\n\t\t\tthis.ResetMaterial();\n\t\t\t\n\t\t\tif (mat.bAlphaTest)\n\t\t\t{\n\t\t\t\tglEnable(GL_ALPHA_TEST);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_ALPHA_TEST);\n\t\t\t}\n\n\t\t\tif (mat.bDepthTest)\n\t\t\t{\n\t\t\t\tglEnable(GL_DEPTH_TEST);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_DEPTH_TEST);\n\t\t\t}\n\n\t\t\tif (mat.bFaceCulling)\n\t\t\t{\n\t\t\t\tglEnable(GL_CULL_FACE);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_CULL_FACE);\n\t\t\t}\n\n\t\t\tif (F3D.Config.use_gl_light)\n\t\t\t{\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_AMBIENT, F3D.GetBuffer.Float(mat.colors.ambient));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE, F3D.GetBuffer.Float(mat.colors.diffuse));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_SPECULAR, F3D.GetBuffer.Float(mat.colors.specular));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_EMISSION, F3D.GetBuffer.Float(mat.colors.emissive));\n\t\t\t\tglMaterialf(GL_FRONT, GL_SHININESS, mat.colors.shinisess);\n\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglColor4f(mat.colors.diffuse[0], mat.colors.diffuse[1], mat.colors.diffuse[2], mat.colors.diffuse[3]);\n\t\t\t}\n\n\t\t\tfor (int u = 0; u < F3D.MAX_TMU; u++)\n\t\t\t{\n\t\t\t\tif (mat.texture_unit[u].bEvent)\n\t\t\t\t{\n\t\t\t\t\tF3D.MaterialEvents.Apply(u, mat.texture_unit[u].event_id);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tF3D.MaterialEvents.ResetEvent(u);\n\t\t\t\t}\n\n\t\t\t\tif (mat.texture_unit[u].bTexture)\n\t\t\t\t{\n\t\t\t\t\tF3D.Textures.ActivateLayer(u);\n\t\t\t\t\tF3D.Textures.Bind(mat.texture_unit[u].texture_id);\n\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tF3D.Textures.DeactivateLayer(u);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// SHADER\n\t\tif (mat.typ == F3D.MAT_TYPE_SHADER)\n\t\t{\n\n\t\t\tif (mat.bAlphaTest)\n\t\t\t{\n\t\t\t\tglEnable(GL_ALPHA_TEST);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_ALPHA_TEST);\n\t\t\t}\n\n\t\t\tif (mat.bDepthTest)\n\t\t\t{\n\t\t\t\tglEnable(GL_DEPTH_TEST);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_DEPTH_TEST);\n\t\t\t}\n\n\t\t\tif (mat.bFaceCulling)\n\t\t\t{\n\t\t\t\tglEnable(GL_CULL_FACE);\n\t\t\t} else\n\t\t\t{\n\t\t\t\tglDisable(GL_CULL_FACE);\n\t\t\t}\n\n\t\t\t\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_AMBIENT, F3D.GetBuffer.Float(mat.colors.ambient));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE, F3D.GetBuffer.Float(mat.colors.diffuse));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_SPECULAR, F3D.GetBuffer.Float(mat.colors.specular));\n\t\t\t\tglMaterial(GL_FRONT_AND_BACK, GL_EMISSION, F3D.GetBuffer.Float(mat.colors.emissive));\n\t\t\t\tglMaterialf(GL_FRONT, GL_SHININESS, mat.colors.shinisess);\n\n\t\t\t\n\n\t\t\tif (mat.use_shader)\n\t\t\t{\n\t\t\t\tF3D.Shaders.UseProgram(mat.shader_id);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int u = 0; u < F3D.MAX_TMU; u++)\n\t\t\t{\n\t\t\t\tif (mat.texture_unit[u].bEvent)\n\t\t\t\t{\n\t\t\t\t\tF3D.MaterialEvents.Apply(u, mat.texture_unit[u].event_id);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tF3D.MaterialEvents.ResetEvent(u);\n\t\t\t\t}\n\n\t\t\t\tif (mat.texture_unit[u].bTexture)\n\t\t\t\t{\n\t\t\t\t\tF3D.Textures.ActivateLayer(u);\n\t\t\t\t\tF3D.Textures.Bind(mat.texture_unit[u].texture_id);\n\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tF3D.Textures.DeactivateLayer(u);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\t\n\t}", "public void createMaterialUniform(String uniformName) {\n createUniform(uniformName + \".color\");\n createUniform(uniformName + \".hasTexture\");\n createUniform(uniformName + \".reflectance\");\n }", "public com.google.protobuf.ByteString getMaterialsBytes(int index) {\n return materials_.getByteString(index);\n }", "public java.lang.String getMaterials(int index) {\n return materials_.get(index);\n }", "public boolean isSetMaterialName() {\n return this.materialName != null;\n }", "private void configureMaterials() {\n quadMaterial = new Material(assetManager,\n \"Common/MatDefs/Misc/Unshaded.j3md\");\n quadMaterial.setColor(\"Color\", ColorRGBA.Green.clone());\n RenderState ars = quadMaterial.getAdditionalRenderState();\n ars.setWireframe(true);\n }", "public void setMATERIAL(java.lang.String MATERIAL) {\r\n this.MATERIAL = MATERIAL;\r\n }", "public void setMaterial(String material) {\n this.material = material;\n }", "public EnableMaterial(ResourceUrn materialUrn) {\n this.materialUrn = materialUrn;\n this.material = getMaterial(materialUrn);\n }", "public void setMATERIAL_GUID(java.lang.String MATERIAL_GUID) {\r\n this.MATERIAL_GUID = MATERIAL_GUID;\r\n }", "public void setMaterial_type(Integer material_type) {\n this.material_type = material_type;\n }", "public void setMaterial_id(Integer material_id) {\n this.material_id = material_id;\n }", "Material findMaterial(String name) throws ReadException;", "public int getMaterialsCount() {\n return materials_.size();\n }", "@Element \n public void setMaterial(String material) {\n this.material = material;\n }", "public void setMaterial(java.lang.String material) {\r\n this.material = material;\r\n }", "public static boolean isMaterial(IBlockState blockState, Material mat)\n\t{\n\t\tBlock posBlock = blockState.getBlock();\n\t\tif(posBlock.getMaterial() == mat)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public int getMaterialsCount() {\n return materials_.size();\n }", "public String getMaterial() {\n return material;\n }", "public String getMaterial() {\n return material;\n }", "private void initMatDef() {\n matDef = manager.getAssetFolder().getFileObject(getMatDefName());\n\n //try to read from classpath if not in assets folder and store in a virtual filesystem folder\n if (matDef == null || !matDef.isValid()) {\n try {\n fs = FileUtil.createMemoryFileSystem();\n matDef = fs.getRoot().createData(name, \"j3md\");\n OutputStream out = matDef.getOutputStream();\n InputStream in = JmeSystem.getResourceAsStream(\"/\" + getMatDefName());\n if (in != null) {\n int input = in.read();\n while (input != -1) {\n out.write(input);\n input = in.read();\n }\n in.close();\n }\n out.close();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n }", "public Material getMaterial() {\n\t\treturn material;\n\t}", "private void initiateGameTerrain(GameTerrain terrainModel){\r\n\t\t//Reference the raw model from the entity model\r\n\t\tUntexturedModel untexturedModel = terrainModel.getUntexturedModel();\r\n\t\t//Bind the model's VAO\r\n\t\tGL30.glBindVertexArray(untexturedModel.getVertexArrayObjectReferenceID());\r\n\t\t//Enable the vertex position attribute from VAO\r\n\t\tGL20.glEnableVertexAttribArray(0);\r\n\t\t//Enable the texture coordinate attribute from VAO\r\n\t\tGL20.glEnableVertexAttribArray(1);\r\n\t\t//Enable the normal vector attribute from VAO\r\n\t\tGL20.glEnableVertexAttribArray(2);\r\n\t\t//Attach the textures\r\n\t\tattachTextures(terrainModel);\r\n\t\t//Start light shading\r\n\t\tgameTerrainShader.loadLightVariables(1,0);\r\n\t}", "@Element \n public String getMaterial() {\n return material;\n }", "public java.lang.String getMaterial() {\r\n return material;\r\n }", "public boolean testMaterial(EIfcmaterialconstituent type) throws SdaiException;", "private void initRender() {\n if (!isRenderable()) {\n throw new IllegalStateException(\"Make the mesh renderable before rendering!\");\n }\n \n //Set active texture if it exists\n if (material.hasTexture()) {\n glActiveTexture(GL_TEXTURE0);\n glBindTexture(GL_TEXTURE_2D, material.getTexture().getId());\n }\n\n if (material.hasNormalMap()) {\n glActiveTexture(GL_TEXTURE1);\n glBindTexture(GL_TEXTURE_2D, material.getNormalMap().getId());\n }\n\n //Draw mesh\n glBindVertexArray(vaoId);\n glEnableVertexAttribArray(0);\n glEnableVertexAttribArray(1);\n glEnableVertexAttribArray(2);\n glEnableVertexAttribArray(3);\n glEnableVertexAttribArray(4);\n }", "List<Material> findAllMaterials() throws ReadException;", "public MediaDeviceDescription setColorIndex(int colorIndex) {\n this.colorIndex = colorIndex;\n return this;\n }", "public Integer getMaterial_type() {\n return material_type;\n }", "public void setUniform(String uniformName, Material material) {\n setUniform(uniformName + \".color\", material.getColor());\n setUniform(uniformName + \".hasTexture\", material.isTextured() ? 1 : 0);\n setUniform(uniformName + \".reflectance\", material.getReflectance());\n }", "public void setParameters(MaterialParams mp);", "public void\n\t setColorMaterialElt( boolean value )\n\t \n\t {\n//\t if (ivState.lightModel == LightModel.BASE_COLOR.getValue()) value = false;\n//\t ivState.colorMaterial = value;\n\t }", "public void setMaterial(String material) {\n this.material = material == null ? null : material.trim();\n }", "public void setColorColumn (int modelIndex)\n\t{\n\t\tm_colorColumnIndex = modelIndex;\n\t}", "WorldMaterialMap getMaterialMap();", "boolean materialExistInDB(int materialID) throws SQLException;", "public java.lang.String getMATERIAL() {\r\n return MATERIAL;\r\n }", "@Override\n\tpublic Material findMaterialInfoById(Integer materialid) {\n\t\treturn md.findMaterialInfoById(materialid);\n\t}", "protected final void addSpecular(SoftwareMaterial kMaterial,\r\n SoftwareVertexProperty kVertexProperty,\r\n Vector3f kDirection, float fDdN) {\r\n\r\n Color3f kSpecular = kVertexProperty.getSpecular();\r\n if (null == kSpecular) {\r\n kSpecular = kMaterial.specular;\r\n }\r\n\r\n m_kReflect.scaleAdd( -2.0f * fDdN, m_kNormal, kDirection);\r\n float fRdU = m_kReflect.dot(m_kView);\r\n if (fRdU < 0.0f) {\r\n fRdU = (float) Math.pow( -fRdU, kMaterial.shininess);\r\n float fSpecAmpl = m_fAttenuate * m_fSpot * fRdU; //Correct method ?\r\n //float fSpecAmpl = 2 * kMaterial.shininess * m_fAttenuate * m_fSpot * fRdU;\r\n m_kColor.x += fSpecAmpl * specular.x * kSpecular.x;\r\n m_kColor.y += fSpecAmpl * specular.y * kSpecular.y;\r\n m_kColor.z += fSpecAmpl * specular.z * kSpecular.z;\r\n }\r\n }", "public static List<Material> parseMTL(File f, Model m)\n\t{\n\t\tList<Material> mats = new ArrayList<Material>();\n\t\tint matNum = -1;\n\n\t\ttry{\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(f));\n\t\t\tMaterial mtl = null;\n\t\t\tString line;\n\n\t\t\twhile((line = reader.readLine())!=null)\n\t\t\t{\t\n\t\t\t\t//Declaring a new material\n\t\t\t\tif(line.startsWith(\"newmtl \"))\n\t\t\t\t{\n\t\t\t\t\t//If this is not the first material,\n\t\t\t\t\t//Add the current material to the mats list\n\t\t\t\t\t//before creating a new one\n\t\t\t\t\tif(mtl != null)\n\t\t\t\t\t\tmats.add(mtl);\n\n\t\t\t\t\t//Make mtl a new material and set name and id\n\t\t\t\t\tmtl = new Material();\n\t\t\t\t\tmtl.name = line.split(\" \")[1];\n\t\t\t\t\tmtl.id = -1;\n\t\t\t\t}\n\t\t\t\t//Specifying ambient color of material\n\t\t\t\telse if(line.startsWith(\"Ka \"))\n\t\t\t\t{\n\t\t\t\t\t//Just split line up and set the ambient\n\t\t\t\t\tmtl.ambient = new Vector3f(\n\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[1]),\n\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[2]),\n\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[3])\n\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t//Specifying diffuse color of material\n\t\t\t\telse if(line.startsWith(\"Kd \"))\n\t\t\t\t{\n\t\t\t\t\tmtl.diffuse = new Vector3f(\n\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[1]),\n\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[2]),\n\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[3])\n\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t//Specifying specular color of material\n\t\t\t\telse if(line.startsWith(\"Ks \"))\n\t\t\t\t{\n\t\t\t\t\tmtl.specular = new Vector3f(\n\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[1]),\n\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[2]),\n\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[3])\n\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t//Specifying coefficiant of specular color\n\t\t\t\t//TODO add support for specular coefficiants\n\t\t\t\telse if(line.startsWith(\"Ns \"))\n\t\t\t\t{\n\n\t\t\t\t}\n\t\t\t\t//Specifying ambient texture map\n\t\t\t\t//TODO add support for ambient texture map\n\t\t\t\telse if(line.startsWith(\"map_Ka \"))\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\t//Specifying diffuse texture map\n\t\t\t\telse if(line.startsWith(\"map_Kd \"))\n\t\t\t\t{\n\t\t\t\t\tmatNum++;\n\t\t\t\t\t//Set the material's texture to specified texture\n\t\t\t\t\tmtl.texture = MyTextureLoader.getTexture(f.getParentFile() + File.separator + line.split(\" \")[1]);\n\t\t\t\t\tm.textures.add(mtl.texture);\n\t\t\t\t\t//m.texture = mtl.texture;\n\t\t\t\t\tmtl.id = matNum;\n\t\t\t\t}\n\t\t\t\t//Specifying specular texture map\n\t\t\t\t//TODO add support for specular texture map\n\t\t\t\telse if(line.startsWith(\"map_Ks \"))\n\t\t\t\t{\n\n\t\t\t\t}\n\t\t\t\t//Specifying highlight component map\n\t\t\t\t//TODO add support for highlight component map\n\t\t\t\telse if(line.startsWith(\"map_Ns \"))\n\t\t\t\t{\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.close();\n\n\t\t\tmats.add(mtl);\n\t\t}\n\t\tcatch(FileNotFoundException e){e.printStackTrace();} \n\t\tcatch (IOException e) {e.printStackTrace();}\n\n\t\treturn mats;\n\t}", "public void setColorModel(IndexColorModel colorModel);", "@Generated(hash = 2102404791)\n public void setMaterial(Material material) {\n synchronized (this) {\n this.material = material;\n materialId = material == null ? null : material.getId();\n material__resolvedKey = materialId;\n }\n }", "@Override\n\tpublic void updateRecMaterial(RecMatConfigure rec) {\n\t\t\n\t}", "private void parseMaterialProperties(String line) {\n int colonIdx = line.indexOf(\":\");\n //find matdef file\n if (colonIdx != -1) {\n line = line.replaceFirst(\"Material\", \"\");\n line = line.replace(\"{\", \"\");\n String[] lines = line.split(\":\");\n setName(lines[0].trim());\n setMatDefName(lines[1].trim());\n }\n }", "public void setWormColorIndex( final int wormColorIndex ) throws RemoteException {\r\n playerState.wormColorIndex = wormColorIndex;\r\n }", "public Integer getMaterial_id() {\n return material_id;\n }", "public interface MaterialCreator {\n\n\t/**\n\t * Creates the material and returns it.\n\t * @return the material\n\t */\n\tpublic Material create();\n\n\t/**\n\t * Sets the material parameters which define the actual appearance of the final material.\n\t * \n\t * @param mp the material parameters\n\t */\n\tpublic void setParameters(MaterialParams mp);\n\t\n}", "public Material create();", "@Override\r\n\tMaterial get(String material) {\n\t\treturn null;\r\n\t}", "public void setMATERIAL_EXTERNAL(java.lang.String MATERIAL_EXTERNAL) {\r\n this.MATERIAL_EXTERNAL = MATERIAL_EXTERNAL;\r\n }", "@Transactional\r\n\tpublic TypeMaterial getTypeMaterial(int Id) {\n\t\treturn typematerialdao.getTypeMaterial(Id);\r\n\t}", "static public Model load(String filename, int minFilter, int magFilter) throws Exception {\n\t\tString name = \"\";\n\n\t\t//Result:\n\t\tHashMap<Material, Mesh> meshes = new HashMap<Material, Mesh>();\n\t\t\n\t\tMaterial currentMaterial = null;\n\t\tHashMap<String, Material> materials = new HashMap<String, Material>();\n\t\tVector<float[]> coords = new Vector<float[]>(100);\n\t\tVector<float[]> normals = new Vector<float[]>(100);\n\t\tVector<float[]> textureCoords = new Vector<float[]>(100);\n\t\tHashMap<Material, HashMap<Integer, LinkedList<Integer>>> indicesByMaterial = new HashMap<Material, HashMap<Integer, LinkedList<Integer>>>();\n\t\t\n\t\tHashMap<String, Integer> verticesByIndex = new HashMap<String, Integer>();\n\t\tLinkedList<String> vertices = new LinkedList<String>();\n\t\t\n\t\t// Parse file:\n\t\tFile modelFile = new File(filename);\n\t\tFileInputStream fos = new FileInputStream(modelFile);\n\t\tScanner scanner = new Scanner(fos);\n\t\tscanner.useDelimiter(\"\\\\n\");\n\t\t\n\t\twhile (scanner.hasNext())\n\t\t{\n\t\t\tString currentLine = scanner.next();\n\t\t\tString[] s = currentLine.split(\"\\\\s+\");\n\t\t\t\n\t\t\t\n\t\t\tif (s.length == 0) { // UNNESSESARY || (s[0].startsWith(\"#\")) || (s[0].equals(\"g\"))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if ((s[0].equals(\"g\")) && (name != null)) {\n\t\t\t\tname = s[1];\n\t\t\t}\n\t\t\telse if (s[0].equals(\"v\")) {\n\t\t\t\tfloat[] coord = {Float.valueOf(s[1]), Float.valueOf(s[2]), Float.valueOf(s[3])};\n\t\t\t\tcoords.add(coord);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"vn\")) {\n\t\t\t\tfloat[] normal = {Float.valueOf(s[1]), Float.valueOf(s[2]), Float.valueOf(s[3])};\n\t\t\t\tnormals.add(normal);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"vt\")) {\n\t\t\t\tfloat[] textureCoord = {Float.valueOf(s[1]), 1.0f - Float.valueOf(s[2])};\n\t\t\t\ttextureCoords.add(textureCoord);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"mtlib\")) {\n\t\t\t\tLinkedList<Material> loadedMaterials = MaterialLoader.load(modelFile.getParent() + File.separator + s[1], minFilter, magFilter);\n\t\t\t\tfor (Material material : loadedMaterials)\n\t\t\t\t\tmaterials.put(material.getName(), material);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"usemtl\")) {\n\t\t\t\tcurrentMaterial = materials.get(s[1]);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"f\")) {\n\t\t\t\tint indexSize = s.length - 1;\n\t\t\t\t\n\t\t\t\t// Access indices by material:\n\t\t\t\tHashMap<Integer, LinkedList<Integer>> indicesByPrimitive = indicesByMaterial.get(currentMaterial);\n\t\t\t\tif (indicesByPrimitive == null) {\n\t\t\t\t\tindicesByPrimitive = new HashMap<Integer, LinkedList<Integer>>();\n\t\t\t\t\tindicesByMaterial.put(currentMaterial, indicesByPrimitive);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Access indices by primitive-type:\n\t\t\t\tLinkedList<Integer> indices = indicesByPrimitive.get(indexSize);\n\t\t\t\tif (indices == null) {\n\t\t\t\t\tindices = new LinkedList<Integer>();\n\t\t\t\t\tindicesByPrimitive.put(indexSize, indices);\n\t\t\t\t}\n\n\t\t\t\t// Iterate over indices:\n\t\t\t\tfor (int i = 0; i < indexSize; i++) {\n\t\t\t\t\t\n\t\t\t\t\t// 1. Index des Vertex ermitteln:\n\t\t\t\t\tInteger index = verticesByIndex.get(s[i + 1]);\n\t\t\t\t\tif (index == null) {\t\t\t// Dieser Vertex existiert noch nicht im VertexBuffer\n\t\t\t\t\t\tindex = vertices.size();\t// Nächsten freien Index ermitteln\n\t\t\t\t\t\tverticesByIndex.put(s[i + 1], index);\t// In Zuordnungstabelle Vertex-Index speichern\n\t\t\t\t\t\tvertices.add(s[i + 1]); \t// In Vertexbuffer eintragen\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 2. Den Index des neuen / bekannten Vertex in der Indexliste dieses Material & Primitiventypes speichern:\n\t\t\t\t\tindices.add(index);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tscanner.close();\n\t\t\n\t\t// Vertices, Normalen und Texturcoords zusammenführen:\n\t\tFloatBuffer interleavedBuffer = BufferUtils.createFloatBuffer(vertices.size() * 8);\n\t\t\n\t\tfor (String vertex : vertices) {\n\t\t\t\n\t\t\t// Transform vertex indices from string to integer values:\n\t\t\tString[] s = vertex.split(\"/\");\n\t\t\tint[] indices = new int[s.length];\n\t\t\tfor (int i = 0; i < s.length; i++)\n\t\t\t\tindices[i] = Integer.parseInt(s[i]) - 1;\n\t\t\t\n\t\t\t// Add corresponding vertex data into the interleaved buffer:\n\t\t\tinterleavedBuffer.put(textureCoords.get(indices[1])[0]);\n\t\t\tinterleavedBuffer.put(textureCoords.get(indices[1])[1]);\n\t\t\t\n\t\t\tinterleavedBuffer.put(normals.get(indices[2])[0]);\n\t\t\tinterleavedBuffer.put(normals.get(indices[2])[1]);\n\t\t\tinterleavedBuffer.put(normals.get(indices[2])[2]);\n\t\t\t\n\t\t\tinterleavedBuffer.put(coords.get(indices[0])[0]);\n\t\t\tinterleavedBuffer.put(coords.get(indices[0])[1]);\n\t\t\tinterleavedBuffer.put(coords.get(indices[0])[2]);\n\t\t}\n\t\tinterleavedBuffer.flip();\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// Iterate over faces of different material:\n\t\t\tfor (Map.Entry<Material, HashMap<Integer, LinkedList<Integer>>> iIndicesByPrimitive : indicesByMaterial.entrySet()) {\t\n\t\t\t\t\n\t\t\t\t// Apply material:\n\t\t\t\t//if (iIndicesByPrimitive.getKey() != null) iIndicesByPrimitive.getKey().render();\n\t\t\t\t\n\t\t\t\t// Create displaylist:\n\t\t\t\tint displayList = GL11.glGenLists(1);\n\t\t\t\t\n\t\t\t\t// Start outputting displaylist:\n\t\t\t\tGL11.glNewList(displayList, GL11.GL_COMPILE);\n\t\t\t\t\n\t\t\t\tGL11.glInterleavedArrays(GL11.GL_T2F_N3F_V3F, 0, interleavedBuffer);\n\t\t\t\t\n\t\t\t\tfor (Map.Entry<Integer, LinkedList<Integer>> iIndices : iIndicesByPrimitive.getValue().entrySet()) {\n\t\t\t\t\t\n\t\t\t\t\t// Convert index-list to buffer:\n\t\t\t\t\tIntBuffer indexBuffer = BufferUtils.createIntBuffer(iIndices.getValue().size());\n\t\t\t\t\tfor (Integer index : iIndices.getValue())\n\t\t\t\t\t\tindexBuffer.put(index);\n\t\t\t\t\tindexBuffer.flip();\n\t\t\t\t\t\n\t\t\t\t\t// Determine type of current face:\n\t\t\t\t\tint primitiveType;\n\t\t\t\t\n\t\t\t\t\tswitch (iIndices.getKey()) {\n\t\t\t\t\t\tcase 3: primitiveType = GL11.GL_TRIANGLES; break;\n\t\t\t\t\t\tcase 4:\tprimitiveType = GL11.GL_QUADS; break;\n\t\t\t\t\t\tdefault: primitiveType = GL11.GL_POLYGON;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Render primitives:\n\t\t\t\t\tGL11.glDrawElements(primitiveType, indexBuffer);\n\t\t\t\t\t\n\t\t\t\t\t// On some devices, immediate mode is faster than VBs:\n\t\t\t\t\t/*GL11.glBegin(primitiveType);\n\t\t\t\t\tfor (int i = 0; i < iIndices.getValue().size(); i++) {\n\t\t\t\t\t\tGL11.glTexCoord2f(interleavedBuffer.get(indexBuffer.get(i)*8 + 0), interleavedBuffer.get(indexBuffer.get(i)*8 + 1));\n\t\t\t\t\t\tGL11.glNormal3f(interleavedBuffer.get(indexBuffer.get(i)*8 + 2), interleavedBuffer.get(indexBuffer.get(i)*8 + 3), interleavedBuffer.get(indexBuffer.get(i)*8 + 4));\n\t\t\t\t\t\tGL11.glVertex3f(interleavedBuffer.get(indexBuffer.get(i)*8 + 5), interleavedBuffer.get(indexBuffer.get(i)*8 + 6), interleavedBuffer.get(indexBuffer.get(i)*8 + 7));\n\t\t\t\t\t}\n\t\t\t\t\tGL11.glEnd();*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tGL11.glEndList();\n\t\t\t\t\n\t\t\t\t// Insert the mesh related to its material:\n\t\t\t\tmeshes.put(iIndicesByPrimitive.getKey(), new Mesh(displayList));\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\t\n\t\t\t// Vertex-data is invalid, throw exception:\n\t\t\texception.printStackTrace();\n\t\t\tthrow new IOException(\"incompatible vertex-data\");\n\t\t}\n\t\tfinally {\n\t\t}\n\n\t\treturn new Model(meshes);\n\t}", "@Generated(hash = 199544555)\n public Material getMaterial() {\n Long __key = this.materialId;\n if (material__resolvedKey == null || !material__resolvedKey.equals(__key)) {\n final DaoSession daoSession = this.daoSession;\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n MaterialDao targetDao = daoSession.getMaterialDao();\n Material materialNew = targetDao.load(__key);\n synchronized (this) {\n material = materialNew;\n material__resolvedKey = __key;\n }\n }\n return material;\n }", "public void Load(String filename)\n\t{\n\t\tTF3D_PARSER PARSER = new TF3D_PARSER();\n\t\tTF3D_Material mat;\n\t\tint BLOCK_ID;\n\t\tString tmp_str;\n\n\t\tSystem.out.println(\"Loading config... \" + filename);\n\t\tBoolean Exist = F3D.AbstractFiles.ExistFile(filename);\n\n\t\tif (!Exist)\n\t\t{\n\t\t\tSystem.out.print(\"Can't load file:\" + filename);\t\t\t\n\t\t}\n\n\t\tPARSER.ParseFile(F3D.AbstractFiles.GetFullPath(filename));\n\n\t\tfor (BLOCK_ID = 0; BLOCK_ID < PARSER.GetBlocksCount(); BLOCK_ID++)\n\t\t{\n\t\t\tPARSER.SetBlock(BLOCK_ID);\n\t\t\tmat = new TF3D_Material();\n\n\t\t\t// get type\n\t\t\ttmp_str = PARSER.GetAs_STRING(\"type\");\n\n\t\t\tif (tmp_str.equalsIgnoreCase(\"MAT_TEXTURE\"))\n\t\t\t{\n\t\t\t\tmat.typ = F3D.MAT_TYPE_TEXTURE;\n\t\t\t}\n\n\t\t\tif (tmp_str.equalsIgnoreCase(\"MAT_SHADER\"))\n\t\t\t{\n\t\t\t\tmat.typ = F3D.MAT_TYPE_SHADER;\n\t\t\t\t// get Shader name\n\t\t\t\tmat.shader_name = PARSER.GetAs_STRING(\"shader\");\n\t\t\t\tmat.shader_id = F3D.Shaders.FindByName(mat.shader_name);\n\t\t\t\tif (mat.shader_id >= 0)\n\t\t\t\t{\n\t\t\t\t\tmat.use_shader = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// get name\n\t\t\tmat.name = PARSER.GetAs_STRING(\"name\");\n\n\t\t\t// get material colors deinition\t\t\t \n\n\t\t\tmat.colors.SetDiffuse(PARSER.GetAs_VECTOR4F(\"diffuse\"));\n\t\t\tmat.colors.SetAmbient(PARSER.GetAs_VECTOR4F(\"ambient\"));\n\t\t\tmat.colors.SetSpecular(PARSER.GetAs_VECTOR4F(\"specular\"));\n\t\t\tmat.colors.SetEmissive(PARSER.GetAs_VECTOR4F(\"emissive\"));\n\t\t\tmat.colors.shinisess = PARSER.GetAs_FLOAT(\"shinisess\");\n\t\t\t\n\t\t\tif (mat.colors.shinisess>128.0f)\n\t\t\t{\n\t\t\t\tmat.colors.shinisess=127.0f;\n\t\t\t}\n\t\t\t\n\t\t\t// get texture 0 .. 3\n\t\t\tmat.texture_unit[0].texture_name = PARSER.GetAs_STRING(\"texture_0\");\n\t\t\tmat.texture_unit[1].texture_name = PARSER.GetAs_STRING(\"texture_1\");\n\t\t\tmat.texture_unit[2].texture_name = PARSER.GetAs_STRING(\"texture_2\");\n\t\t\tmat.texture_unit[3].texture_name = PARSER.GetAs_STRING(\"texture_3\");\n\n\t\t\t// get event 0 .. 3\n\t\t\tmat.texture_unit[0].event_name = PARSER.GetAs_STRING(\"event_0\");\n\t\t\tmat.texture_unit[1].event_name = PARSER.GetAs_STRING(\"event_1\");\n\t\t\tmat.texture_unit[2].event_name = PARSER.GetAs_STRING(\"event_2\");\n\t\t\tmat.texture_unit[3].event_name = PARSER.GetAs_STRING(\"event_3\");\n\n\t\t\t// get depthtest\n\t\t\tmat.bDepthTest = PARSER.GetAs_BOOLEAN(\"depthtest\");\n\n\t\t\t// get alphatest\n\t\t\tmat.bAlphaTest = PARSER.GetAs_BOOLEAN(\"alphatest\");\n\n\t\t\t// get faceculling\n\t\t\tmat.bFaceCulling = PARSER.GetAs_BOOLEAN(\"faceculling\");\n\t\t\tF3D.Log.warning(\"Culling\", mat.name + \" \" + mat.bFaceCulling.toString());\n\n\t\t\t// prepare textures\n\t\t\tfor (int t = 0; t < F3D.MAX_TMU; t++)\n\t\t\t{\n\t\t\t\tif (mat.texture_unit[t].texture_name.equals(\"none\"))\n\t\t\t\t{\n\t\t\t\t\tmat.texture_unit[t].bTexture = false;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tBoolean exist = F3D.Textures.Exist(mat.texture_unit[t].texture_name);\n\n\t\t\t\t\tif (exist)\n\t\t\t\t\t{\n\t\t\t\t\t\tmat.texture_unit[t].texture_id = F3D.Textures.FindByName(mat.texture_unit[t].texture_name);\n\t\t\t\t\t\tmat.texture_unit[t].bTexture = true;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tF3D.Log.error(\"TF3D_SurfaceManager\", \"Texture name: '\" + mat.texture_unit[t].texture_name + \"' missing (texture you have to load first !)\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (mat.texture_unit[t].event_name.equalsIgnoreCase(\"none\"))\n\t\t\t\t{\n\t\t\t\t\tmat.texture_unit[t].bEvent = false;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tBoolean exist = F3D.MaterialEvents.Exist(mat.texture_unit[t].event_name);\n\n\t\t\t\t\tif (exist)\n\t\t\t\t\t{\n\t\t\t\t\t\tmat.texture_unit[t].event_id = F3D.MaterialEvents.FindByName(mat.texture_unit[t].event_name);\n\t\t\t\t\t\tmat.texture_unit[t].bEvent = true;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tF3D.Log.error(\"TF3D_SurfaceManager\", \"Event name: '\" + mat.texture_unit[t].event_name + \"' missing (events you have to load first !)\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.Add(mat);\n\t\t}\n\n\t}", "public ItemBuilder setMaterial(Material material) {\r\n\t\tthis.material = material;\r\n\t\treturn this;\r\n\t}", "public void setMaterial(Material mat)\r\n\t{\r\n\t\tgl.glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, mat.ambient);\r\n\t\tgl.glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, mat.diffuse);\r\n\t\tgl.glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat.specular);\r\n\t\tgl.glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 0.8F);\r\n\t\tgl.glColor3f(mat.diffuse[0],mat.diffuse[1],mat.diffuse[2]);\r\n\t}", "public void setMaterials(List<Material> materials)\n {\n this.materials = materials;\n }", "@Override\n\tpublic Material getMaterial() {\n\t\treturn this.m_material;\n\t}", "public void initialize( )\n\t{\n\t\twakeupOn( m_WakeupCondition );\n\n\t\tColor3f objColor = new Color3f( 1.0f, 0.1f, 0.2f );\n\t\tColor3f black = new Color3f( 0.0f, 0.0f, 0.0f );\n\t\tcollideMaterial = new Material( objColor, black, objColor, black, 80.0f );\n\n\t\tobjColor = new Color3f( 0.0f, 0.1f, 0.8f );\n\t\tmissMaterial = new Material( objColor, black, objColor, black, 80.0f );\n\n\t\tobjectAppearance.setMaterial( missMaterial );\n\t}", "public java.lang.String getMATERIAL_VERSION() {\r\n return MATERIAL_VERSION;\r\n }", "public void addMaterial(PlayerMaterialSql materialSql) {\n\t}", "public Material() {}", "public List<Material> getAllMaterials() {\n\t\treturn null;\n\t}", "public void setContents(MaterialData materialData) {\n/* 91 */ Material mat = materialData.getItemType();\n/* */ \n/* 93 */ if (mat == Material.RED_ROSE) {\n/* 94 */ setData((byte)1);\n/* 95 */ } else if (mat == Material.YELLOW_FLOWER) {\n/* 96 */ setData((byte)2);\n/* 97 */ } else if (mat == Material.RED_MUSHROOM) {\n/* 98 */ setData((byte)7);\n/* 99 */ } else if (mat == Material.BROWN_MUSHROOM) {\n/* 100 */ setData((byte)8);\n/* 101 */ } else if (mat == Material.CACTUS) {\n/* 102 */ setData((byte)9);\n/* 103 */ } else if (mat == Material.DEAD_BUSH) {\n/* 104 */ setData((byte)10);\n/* 105 */ } else if (mat == Material.SAPLING) {\n/* 106 */ TreeSpecies species = ((Tree)materialData).getSpecies();\n/* */ \n/* 108 */ if (species == TreeSpecies.GENERIC) {\n/* 109 */ setData((byte)3);\n/* 110 */ } else if (species == TreeSpecies.REDWOOD) {\n/* 111 */ setData((byte)4);\n/* 112 */ } else if (species == TreeSpecies.BIRCH) {\n/* 113 */ setData((byte)5);\n/* */ } else {\n/* 115 */ setData((byte)6);\n/* */ } \n/* 117 */ } else if (mat == Material.LONG_GRASS) {\n/* 118 */ GrassSpecies species = ((LongGrass)materialData).getSpecies();\n/* */ \n/* 120 */ if (species == GrassSpecies.FERN_LIKE) {\n/* 121 */ setData((byte)11);\n/* */ }\n/* */ } \n/* */ }", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3 };\n\t\tmesh = new StaticMesh(gl, vertices, null, texCoords, indices);\n\t\tmesh.setPositionIndex(shader.getAttributeLocation(\"aVertexPosition\"));\n\t\tmesh.setNormalIndex(-1);\n\t\tmesh.setTexCoordIndex(shader.getAttributeLocation(\"aTextureCoord\"));\n\t\tmesh.setBeginMode(BeginMode.TRIANGLE_STRIP);\n\t}", "public ManageRawMaterials() {\n initComponents();\n \n txtF230IID.setText(wdba.GetIncrementedId(\"rawMaterialId\",\"rawMaterial\",2));\n \n wdba.FillCombo(cmb231IName,\"itemName\",\"rawMaterial\");\n ck = new ComboKeyHandler(cmb231IName);\n \n wdba.ViewAll(tbl201RawMaterials,\"rawMaterial\");\n SetTableHeaders();\n jLabel9.setVisible(false);\n spnnr233IQty1.setVisible(false);\n updateItem.setText(\"Update Item\");\n tbl201RawMaterials.setComponentPopupMenu(pop234Update);\n \n \n cmb231IName.getEditor().getEditorComponent().addKeyListener(new KeyAdapter() {\n public void keyTyped(KeyEvent e){\n ck.keyTyped(e);\n }\n });\n }", "public void setMaterial(ItemStack stack) {\n this.materialName = Block.blockRegistry.getNameForObject(stack.getItem());\n this.materialMeta = stack.getItemDamage();\n }", "boolean checkIfCopyAvailable(int materialId);", "int countMaterials() throws ReadException;", "@Test\n public void testDefaultConstructor() throws URISyntaxException\n {\n final GeometryInstance instance = new GeometryInstance(new URI(\"foo\"));\n final MaterialBinding binding = new MaterialBinding(instance);\n assertEquals(0, binding.getParams().size());\n assertNotNull(binding.getCommonTechnique());\n }", "public Documentomaterial(DocumentoMaterialBean documentoMaterialBean) {\r\n\r\n\t\t// Fecha Documento\r\n\t\tthis.fechaDocumentomaterial = documentoMaterialBean.getFechaDocumentomaterial();\r\n\t\t// Tipo Documento Material\r\n\t\tTipodocumentomaterial tipodocumentomaterial = new Tipodocumentomaterial();\r\n\t\ttipodocumentomaterial.setPkCodigoTipodocumentomaterial(documentoMaterialBean.getTipodocumentomaterial().getCodigo());\r\n\t\t\r\n\t\tthis.tipodocumentomaterial = tipodocumentomaterial;\r\n\t\t// Origen SAP Movimiento\r\n\t\tthis.origenSapMovimiento = documentoMaterialBean.getOrigenSapMovimiento();\r\n\t\t// Periodo Contable\r\n\t\tPeriodocontable periodocontable = new Periodocontable();\r\n\t\tperiodocontable.setPkCodigoPeridocontable(documentoMaterialBean.getPeriodocontable().getCodigo());\r\n\t\tthis.periodocontable = periodocontable;\r\n\t\t// Sociedad\r\n\t\tSociedad sociedad = new Sociedad();\r\n\t\tsociedad.setPkCodigoSociedad(documentoMaterialBean.getSociedad().getCodigo());\r\n\t\tthis.sociedad = sociedad;\r\n\t\t// Usuario\r\n\t\tUsuario usuario = new Usuario();\r\n\t\tusuario.setPkCodigoUsuario(documentoMaterialBean.getUsuario().getCodigo());\r\n\r\n\t\t/**\r\n\t\t * JORDAN\r\n\t\t */\r\n\t\tthis.setTicket(documentoMaterialBean.getTicket());\r\n\t\tthis.setObservacion(documentoMaterialBean.getObservacion());\r\n\t\tthis.setNotaEntrega(documentoMaterialBean.getNotaEntrega());\r\n\t\tthis.setPlaca(documentoMaterialBean.getPlaca());\r\n\r\n\t\tthis.usuario = usuario;\r\n\r\n\t}", "public int Add(TF3D_Material mat)\n\t{\n\t\tif (this.Exist(mat.name))\n\t\t{\n\t\t\tF3D.Log.info(\"TF3D_SurfaceManager\", \"TA3D_SurfaceManager: Add() '\" + mat.name + \"' wasn't added - exist !\");\n\t\t\treturn this.FindByName(mat.name);\n\n\t\t} else\n\t\t{\n\t\t\tint res = this.materials.size();\n\t\t\tthis.materials.add(mat);\n\t\t\tF3D.Log.info(\"TF3D_SurfaceManager\", \"TA3D_SurfaceManager: Add() '\" + mat.name + \"'\");\n\t\t\treturn res;\n\t\t}\n\t}", "protected void InitData(Material material)\n {\n // TODO: Read this block of data from a config file, based on type.\n \tnumSpinners = 3;\n \t\n \tspinnerContents = new Material[numSpinners][];\n \tspinnerContents[0] = new Material[3];\n \tspinnerContents[0][0] = Material.APPLE;\n \tspinnerContents[0][1] = Material.BONE;\n \tspinnerContents[0][2] = Material.DIAMOND;\n \tspinnerContents[1] = new Material[3];\n \tspinnerContents[1][0] = Material.APPLE;\n \tspinnerContents[1][1] = Material.BONE;\n \tspinnerContents[1][2] = Material.DIAMOND;\n \tspinnerContents[2] = new Material[5];\n \tspinnerContents[2][0] = Material.APPLE;\n \tspinnerContents[2][1] = Material.BONE;\n \tspinnerContents[2][2] = Material.APPLE;\n \tspinnerContents[2][3] = Material.BONE;\n \tspinnerContents[2][4] = Material.DIAMOND;\n \t\n \tduration = new int[numSpinners];\n \tduration[0] = 20;\n \tduration[1] = 40;\n \tduration[2] = 70;\n \t\n \treward = new SlotMachineReward[3];\n reward[0] = new SlotMachineReward(Material.APPLE, Material.APPLE, 3, 0, 1);\n reward[1] = new SlotMachineReward(Material.BONE, Material.AIR, 0, 10, 2);\n reward[2] = new SlotMachineReward(Material.DIAMOND, Material.NETHER_STAR, 1, 0, 5);\n }", "public boolean initializeIndexReader() {\n return initializeIndexReader(Constants.INDEX_DIRECTORY);\n }", "public void setMaterial(NBTTagCompound tag) {\n if(tag!=null && tag.hasKey(Names.NBT.material) && tag.hasKey(Names.NBT.materialMeta)) {\n this.materialName = tag.getString(Names.NBT.material);\n this.materialMeta = tag.getInteger(Names.NBT.materialMeta);\n }\n }", "private static void fetchMaterialById() throws MaterialNotFoundException {\r\n\t\t\t\t\t\t\tScanner s = new Scanner(System.in);\r\n\t\t\t\t\t\t\tSystem.out.println(\"Please Enter The Material_id:\");\r\n\t\t\t\t\t\t\tInteger Material_id = Integer.parseInt(s.nextLine());\r\n\r\n\t\t\t\t\t\t\tMaterialService materialService = new MaterialService();\r\n\t\t\t\t\t\t\tMaterialResponseObject obj= materialService.fetchMaterialById(Material_id);\r\n\t\t\t\t\t\t\tMaterialVO vo;\r\n\t\t\t\t\t\t\tvo = obj.getMaterialVO();\r\n\t\t\t\t\t\t\tif (vo != null) {\r\n\t\t\t\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\t\"========================================================================================================================================================\");\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Material_id\" + '\\t' + \"Material_name\");\r\n\t\t\t\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\t\"=========================================================================================================================================================\");\r\n\t\t\t\t\t\t\t\tSystem.out.println(vo.getMaterial_id() + \"\\t\\t\" + vo.getMaterial_name());\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tSystem.out.println(obj.getFailureMessage());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "public java.lang.String getMATERIAL_GUID() {\r\n return MATERIAL_GUID;\r\n }", "public void setEffect(int effectIndex, int filterIndex) {\n\t\talSource3i(musicSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(musicSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(reverseSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(reverseSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(flangeSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(flangeSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(revFlangeSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(revFlangeSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(wahSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(wahSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(revWahSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(revWahSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(wahFlangeSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(wahFlangeSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(revWahFlangeSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(revWahFlangeSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(distortSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(distortSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(revDistortSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(revDistortSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(distortFlangeSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(distortFlangeSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(revDistortFlangeSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(revDistortFlangeSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(wahDistortSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(wahDistortSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(revWahDistortSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(revWahDistortSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(wahDistortFlangeSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(wahDistortFlangeSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t\talSource3i(revWahDistortFlangeSourceIndex, AL_AUXILIARY_SEND_FILTER, effectIndex, 0, AL_FILTER_NULL);\n\t\talSourcei(revWahDistortFlangeSourceIndex, AL_DIRECT_FILTER, filterIndex);\n\t}", "@Override\n public void drawMesh(String name, util.Material material, String textureName, final Matrix4f transformation) {\n if (meshRenderers.containsKey(name)) {\n GL3 gl = glContext.getGL().getGL3();\n //get the color\n\n FloatBuffer fb4 = Buffers.newDirectFloatBuffer(4);\n FloatBuffer fb16 = Buffers.newDirectFloatBuffer(16);\n\n int loc = -1;\n\n loc = shaderLocations.getLocation(\"material.ambient\");\n if (loc >= 0) {\n gl.glUniform3fv(loc, 1, material.getAmbient().get(fb4));\n } else {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.ambient \\\"\");\n }\n\n loc = shaderLocations.getLocation(\"material.diffuse\");\n if (loc >= 0) {\n gl.glUniform3fv(loc, 1, material.getDiffuse().get(fb4));\n } else {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.diffuse \\\"\");\n }\n\n if (loc >= 0) {\n loc = shaderLocations.getLocation(\"material.specular\");\n gl.glUniform3fv(loc, 1, material.getSpecular().get(fb4));\n } else {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.specular \\\"\");\n }\n\n loc = shaderLocations.getLocation(\"material.shininess\");\n if (loc >= 0) {\n gl.glUniform1f(loc, material.getShininess());\n } else {\n throw new IllegalArgumentException(\"No shader variable for \\\" material.shininess \\\"\");\n }\n\n loc = shaderLocations.getLocation(\"modelview\");\n if (loc >= 0) {\n gl.glUniformMatrix4fv(loc, 1, false, transformation.get(fb16));\n }\n else {\n throw new IllegalArgumentException(\"No shader variable for \\\" modelview \\\"\");\n }\n\n loc = shaderLocations.getLocation(\"normalmatrix\");\n if (loc>=0) {\n Matrix4f normalmatrix = new Matrix4f(transformation).invert().transpose();\n gl.glUniformMatrix4fv(loc,1,false,normalmatrix.get(fb16));\n }\n else {\n throw new IllegalArgumentException(\"No shader variable for \\\" normalmatrix \\\"\");\n }\n\n\n\n if (textures.containsKey(textureName))\n textures.get(textureName).getTexture().bind(gl);\n else if (textures.containsKey(\"white\"))\n textures.get(\"white\").getTexture().bind(gl);\n\n meshRenderers.get(name).draw(glContext);\n }\n }", "public boolean isSetIndex_params() {\n return this.index_params != null;\n }", "protected void initView(Point3f kEye, SoftwareVertexProperty kVertexProperty) {\r\n m_kView.sub(kVertexProperty.getPosition(), kEye);\r\n normalize(m_kView);\r\n\r\n // invert backfacing normals\r\n Vector3f kNormal = kVertexProperty.getNormal();\r\n if (m_kView.dot(kNormal) <= 0.0f) {\r\n m_kNormal.set(kNormal);\r\n }\r\n else {\r\n m_kNormal.negate(kNormal);\r\n }\r\n }" ]
[ "0.61882466", "0.5529436", "0.54451185", "0.53304636", "0.52719015", "0.52245003", "0.51520836", "0.4991756", "0.48208445", "0.47811013", "0.46373674", "0.4567105", "0.45367974", "0.45209804", "0.44731662", "0.44241542", "0.44124782", "0.44064292", "0.43975908", "0.43954983", "0.43782058", "0.43727297", "0.43429047", "0.42704985", "0.42606208", "0.4257967", "0.42362422", "0.42111972", "0.42026842", "0.42013028", "0.42009246", "0.42000878", "0.4176155", "0.41663525", "0.41389552", "0.41287598", "0.4112723", "0.4112723", "0.407267", "0.4050939", "0.40313458", "0.4017299", "0.3969432", "0.39677766", "0.39664674", "0.3962317", "0.39620173", "0.3926159", "0.39200777", "0.39085937", "0.3903488", "0.38970938", "0.38902274", "0.3865638", "0.38643372", "0.38641453", "0.38487905", "0.38448226", "0.38427043", "0.3825368", "0.38252243", "0.38055375", "0.37917018", "0.37888974", "0.37803715", "0.3779901", "0.37788615", "0.37532005", "0.37481406", "0.3737022", "0.37306547", "0.37157327", "0.37102586", "0.37070563", "0.37027687", "0.36826438", "0.367561", "0.36694455", "0.36691976", "0.36619338", "0.3660296", "0.36561424", "0.36474073", "0.36453182", "0.36440036", "0.36369333", "0.3616175", "0.36114067", "0.3607403", "0.36058888", "0.35993245", "0.35974717", "0.35954958", "0.3593147", "0.35913238", "0.35911128", "0.3585987", "0.35858607", "0.35840115", "0.35717505" ]
0.8002071
0
First: create an inflater service in order to inflate the current row in the layout
@Override public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); // Second: get the id for the item text in order to change ot to the appropriate text according to the position View rowView = inflater.inflate(R.layout.list_todo_item, parent, false); TextView itemText = (TextView) rowView.findViewById(R.id.txtTodoTitle); TextView itemDate = (TextView) rowView.findViewById(R.id.txtTodoDueDate); // Third: change the text according to the position SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy"); itemText.setText(mObjects.get(position).GetText()); if(mObjects.get(position).GetDate()!= null) { itemDate.setText(formatter.format(mObjects.get(position).GetDate())); // Forth: change color for the overdue items Calendar c = Calendar.getInstance(); Date currentDate = c.getTime(); if (currentDate.after(mObjects.get(position).GetDate())) { itemText.setTextColor(Color.RED); itemDate.setTextColor(Color.RED); } } else { itemDate.setText(NO_DUE_DATE); } return rowView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\tView row = (View) inflater.inflate(R.layout.list_row, arg2, false);\n\t\treturn row;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n convertView = inflater.inflate(R.layout.fragment_homecircles, container, false);\n init();\n return convertView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.information_view, container, false);\n mFillContentCallback.invoke(view);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.layout_true_false_row, container, false);\n }", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tcurrentView = inflater.inflate(R.layout.inspect_history_fragment_page_item, container, false);\n\t\tinitial(currentView);\n\t\treturn currentView;\n\t}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_number_full,container,false);\n itemView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.book_list, container, false);\n\n /** RETURN THE VIEW INSTANCE TO SETUP THE LAYOUT **/\n return view;\n }", "@Override\n \tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n \t\t\tBundle savedInstanceState) {\n \t\treturn inflater.inflate(R.layout.list, container, false);\n \t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n return inflater.inflate(R.layout.frag_new_entries, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View layout = inflater.inflate(R.layout.custom_row, container, false);\n recyclerView = (RecyclerView) layout.findViewById(R.id.rv);\n adapter = new WebCrawlerRecyclerViewAdapter(getActivity(), getData());\n recyclerView.setAdapter(adapter);\n LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView.setLayoutManager(layoutManager);\n return layout;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.activity_recetas, parent, false);\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.read_layout,container,false);\n mContext = view.getContext();\n if(readPresenter ==null)\n readPresenter = new ReadPresenter(getContext(),this);\n initUI(view);\n return view;\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n\tpublic View getView(final int position, View row, ViewGroup parent) {\n\t\tif (row == null) {\n\t\t\tLayoutInflater inflater = context.getLayoutInflater();\n\t\t\trow = inflater.inflate(LayoutId, parent, false);\n\t\t}\n\n\t\treturn row;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.main, container,false);\n\n\t\t//Update this view's content\n\t\tupdate();\n\n\t\t//Return this view to the adapter\n\t\treturn view;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n view = inflater.inflate(R.layout.layout_inventory_list, container, false);\n\n return view;\n }", "protected View inflateRow(ViewHolder holder){\n View row = null;\n switch (type)\n {\n case TYPE_TEXT_USER:\n row = inflater.inflate(textUserRowResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.txtContent = (TextView) row.findViewById(R.id.txt_content);\n\n break;\n\n case TYPE_TEXT_FRIEND:\n\n row = inflater.inflate(textFriendRowResId, null);\n\n holder.txtContent = (TextView) row.findViewById(R.id.txt_content);\n\n break;\n\n case TYPE_IMAGE_USER:\n row = inflater.inflate(imageUserRowResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n\n case TYPE_IMAGE_FRIEND:\n row = inflater.inflate(imageFriendRowResId, null);\n\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n break;\n\n case TYPE_LOCATION_USER:\n row = inflater.inflate(locationUserResId, null);\n holder.readStatus = (ImageSwitcher) row.findViewById(R.id.read_status);\n holder.readStatus.setFactory(new ViewSwitcher.ViewFactory() {\n @Override\n public View makeView() {\n ImageView imageView = new ImageView(mActivity.getApplicationContext());\n imageView.setScaleType(ImageView.ScaleType.CENTER);\n return imageView;\n }\n });\n holder.readStatus.setInAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_in));\n holder.readStatus.setOutAnimation(AnimationUtils.loadAnimation(mActivity.getApplicationContext(),\n android.R.anim.fade_out));\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n\n case TYPE_LOCATION_FRIEND:\n row = inflater.inflate(locationFriendRowResId, null);\n\n holder.progressBar = (ProgressBar) row.findViewById(R.id.chat_sdk_progress_bar);\n holder.image = (ChatBubbleImageView) row.findViewById(R.id.chat_sdk_image);\n\n break;\n }\n\n return row;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return Utils.setCustomAdapterTheme(getActivity(), inflater, R.layout.slide_result, container, false);\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\n View view;\n\n view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_service_text, parent, false);\n\n mview=view;\n return new ViewHolder(view); // Inflater means reading a layout XML\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n\t\tmBinding = DataBindingUtil.inflate(inflater, R.layout.fg_news_ent, container, false);\n\n\t\tinitView();\n\t\treturn mBinding.getRoot();\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 public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil.inflate(inflater, R.layout.fragment_table_my_cart, container, false);\n return binding.getRoot();\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = super.onCreateView(inflater, container, savedInstanceState);\n\n // TODO: touch listener to get recipe online\n\n a = new RecipeAdapter(this.getContext());\n rv.setAdapter(a);\n\n // swipe to refresh implementation\n if (mode == 0) {\n swipe.setEnabled(true);\n swipe.setOnRefreshListener(this);\n // automatically refresh on load\n swipe.post(new Runnable() {\n @Override\n public void run() {\n onRefresh();\n }\n });\n }\n return rootView;\n }", "@Override\n\tpublic View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n\t Bundle savedInstanceState) {\n\t\tView rootView = inflater.inflate(R.layout.fragment_info_listview, container, false);\n\t\tButterKnife.bind(this, rootView);\n\t\treturn rootView;\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\ttoDelete = new ArrayList<Item>();\n\n\t\tRelativeLayout layout = (RelativeLayout)inflater.inflate(getLayout(), container,\n\t\t\t\tfalse);\n\t\tListView listView = (ListView) layout.findViewById(android.R.id.list);\n\n\t\tImageButton addButton = (ImageButton) layout.findViewById(R.id.editAddButton);\n\t\tImageButton removeButton = (ImageButton) layout.findViewById(R.id.editRemoveButton);\n\n\t\taddButton.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t\t\t public void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\t Intent intent = new Intent(getActivity(), com.iaco.testapp.EditActivity.class);\n\t\t\t\t\t\t\t\t\t\t\t startActivityForResult(intent, 1001);\n\n\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t);\n\n\t\tremoveButton.setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Item item : toDelete) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tm_dao.delete(item);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\trefreshList();\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t);\n\n\n\t\treturn layout;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n context = getActivity().getApplicationContext();\n View inflaterview = inflater.inflate(R.layout.fragment_order_detail, container, false);\n collectName = (TextView)inflaterview.findViewById(R.id.txtResName);\n collectAddress = (TextView)inflaterview.findViewById(R.id.txtResAddress);\n collectPhone = (TextView)inflaterview.findViewById(R.id.txtResPhone);\n deliverAddress = (TextView)inflaterview.findViewById(R.id.txtDeliverAddress);\n deliverPhone = (TextView)inflaterview.findViewById(R.id.txtDeliverPhone);\n layItem = (LinearLayout)inflaterview.findViewById(R.id.layoutItem);\n btnRequest = (Button)inflaterview.findViewById(R.id.btnRequest);\n btnMap = (Button)inflaterview.findViewById(R.id.btnMap);\n txtordercode = (TextView)inflaterview.findViewById(R.id.txtOrderCode);\n txtdelicharge = (TextView)inflaterview.findViewById(R.id.txtDelivcharge);\n txttotalamount = (TextView)inflaterview.findViewById(R.id.txtTotalAmount);\n return inflaterview;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = getThisView(inflater,container);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View itemView = inflater.inflate(R.layout.fragment_weather_5_day, container, false);\n\n unbinder = ButterKnife.bind(this, itemView);\n\n getForecastInfo();\n\n return itemView;\n }", "@Override\n public View newView (Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.fragment_city_list_row, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_select_service_item, container, false);\n ButterKnife.bind(this, view);\n getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n typeName.setText(serviceTypeEx.getTypeName());\n adapter = new ServiceItemAdapter();\n recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n recyclerView.setAdapter(adapter);\n// adapter.setServiceTypeExList(serviceTypeExList);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView fr0v=inflater.inflate(R.layout.my_shop_car, null, false);\r\n\t\t\r\n\t\treturn fr0v;\r\n\t}", "private View initView(int position, View convertView, ViewGroup parent) {\n View row = convertView;\n if (row == null) {\n LayoutInflater inflater = ((Activity) context).getLayoutInflater();\n row = inflater.inflate(resourceId, parent, false);\n }\n Scenario record = getItem(position);\n if (record != null) {\n TextView scenarioId = (TextView) row.findViewById(R.id.rowScenarioId);\n TextView scenarioName = (TextView) row.findViewById(R.id.rowScenarioName);\n TextView scenarioFileName = (TextView) row.findViewById(R.id.rowScenarioFile);\n TextView scenarioMime = (TextView) row.findViewById(R.id.rowScenarioMime);\n\n if (scenarioId != null) {\n scenarioId.setText(Integer.toString(record.getScenarioId()));\n }\n if (scenarioName != null) {\n scenarioName.setText(record.getScenarioName());\n }\n if (scenarioFileName != null) {\n scenarioFileName.setText(record.getFileName());\n }\n if (scenarioMime != null) {\n scenarioMime.setText(record.getMimeType());\n }\n }\n return row;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t\n\t\tView arrangeOrderLayout = inflater.inflate(R.layout.arrange_order, container, false);\n\t\tinitButton(arrangeOrderLayout);\n\t\tinitListView(arrangeOrderLayout);\n\t\treturn arrangeOrderLayout;\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 }", "public void onFinishInflate() {\n AppMethodBeat.i(103009);\n if (getChildCount() > 0) {\n View childAt = getChildAt(0);\n if (!(childAt instanceof RadarSpecialTableLayout)) {\n childAt = null;\n }\n this.pCL = (RadarSpecialTableLayout) childAt;\n }\n AppMethodBeat.o(103009);\n }", "private void inflateView() {\n\t\tLog.v(T, \"inflateView\");\n\t\tif (!isInEditMode()) {\n\t\t\tString inflaterService = Context.LAYOUT_INFLATER_SERVICE;\n\n\t\t\tLayoutInflater layoutInflater = (LayoutInflater) getContext()\n\t\t\t\t\t.getSystemService(inflaterService);\n\t\t\tlayoutInflater.inflate(R.layout.dms_coordinate, this, true);\n\n\t\t\t// Get child control references\n\t\t\teditDegrees = (EditText) findViewById(R.id.editDegrees);\n\t\t\teditMinutes = (EditText) findViewById(R.id.editMinutes);\n\t\t\teditSeconds = (EditText) findViewById(R.id.editSeconds);\n\t\t}\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.folio_activity, container, false);\n }", "@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 public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_appointments_main, container, false);\n\n recyclerView = (RecyclerView) view.findViewById(R.id.hairstyleRecyclerView);\n recyclerView.setHasFixedSize(true);\n\n layoutManager = new LinearLayoutManager(getActivity());\n recyclerView.setLayoutManager(layoutManager);\n\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n\n hairstyleData = new ArrayList<HairStyleDataModel>();\n for (int i = 0; i < HairStylesMenuData.hairStyleArray.length; i++) {\n hairstyleData.add(new HairStyleDataModel(\n HairStylesMenuData.hairStyleArray[i],\n HairStylesMenuData.priceArray[i],\n HairStylesMenuData.drawableArray[i]\n ));\n }\n \n mainActivity = (MainActivity) getActivity();\n adapter = new HairStylesMenuCustomAdapter(hairstyleData,mainActivity);\n recyclerView.setAdapter(adapter);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n return inflater.inflate(R.layout.all_books, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.list_base, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_restaurants, container, false);\n ButterKnife.bind(this, view);\n\n //shimmer RecyclerView thing\n\n shimmerRecycler.showShimmerAdapter();\n shimmerRecycler.setLayoutManager(new GridLayoutManager(activity,3));\n\n return view;\n }", "protected LayoutInflater getInflater(){\n return getActivity().getLayoutInflater();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_order_record, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_table_view, container, false);\n addHeaders(view);\n addData(view);\n return view;\n }", "@Override\r\n\t\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\t\t\t LayoutInflater inflater = LayoutInflater.from(arg2.getContext());\r\n\t\t\t View retView = inflater.inflate(R.layout.report_listitems, arg2, false);\r\n\t\t\t int j=i%2;\r\n\t\t\t retView.setBackgroundColor(colors[j]);\r\n\t\t\t i++;\r\n\t\t\t bindView(retView,arg0,arg1);\r\n\t\t\t return retView;\r\n\t\t\t \r\n\t\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t// cityIntent = new Intent(AppContext.curActivity,\n\t\t// EventSearchInitialActivity.class);\n\t\tif (null == contentView) {\n\t\t\tloader = OriginalImageAsyncLoader.getInstance();\n\t\t\tinitRequestModel();\n\t\t\tcontentView = inflater.inflate(R.layout.frag_venue, container,\n\t\t\t\t\tfalse);\n\t\t\tvHeader = inflater.inflate(R.layout.header_hot_venue, null);\n\t\t\tvHeader.setVisibility(View.INVISIBLE);\n\t\t\tinitView();\n\t\t\tinitDate();\n\t\t\tvHeader.setVisibility(View.VISIBLE);\n\t\t} else {\n\t\t\t((ViewGroup) contentView.getParent()).removeView(contentView);\n\t\t}\n\t\tif (pagerAdapter != null) {\n\t\t\tpagerAdapter.notifyDataSetChanged();\n\t\t}\n\t\tif (null != mAdapter) {\n\t\t\tmAdapter.notifyDataSetChanged();\n\t\t}\n\t\treturn contentView;\n\t}", "@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\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tif (mObjView == null) {\n\t\t\tmObjView = inflater.inflate(R.layout.jeep_airset, container, false);\n\t\t\tinit();\n\t\t}\n\n\t\treturn mObjView;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View rootView = inflater.inflate(R.layout.poi_list, container, false);\n\n mRecyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n poiListAdapter = new POIListAdapter(getActivity(), poiCursor);\n mRecyclerView.setAdapter(poiListAdapter);\n mRecyclerView.setHasFixedSize(false);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_detail, container, false);\n ButterKnife.bind(this, view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.first_step_layout, container, false);\n initView();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n binding = FragmentRickandmortyListBinding.inflate(getLayoutInflater());\n mcontext = this.getActivity();\n AppLogger.e(\"RickAndMortyFragment\" + \"=>oncreateView\");\n currentPage = PAGE_START;\n AppLogger.e(\"RickAndMortyFragment\" + \"=>oncreateView NumberPage=>\" + currentPage);\n View view = binding.getRoot();\n\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if(container == null)\n return null;\n\n Boolean isNew = getArguments().getBoolean(\"isNew\");\n View view = inflater.inflate(R.layout.fragment_diary_detail, container, false);\n loadEntry(view, isNew);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_salary, container, false);\n addInfoClickListener(rootView);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_important_information, container, false);\n ButterKnife.bind(this, view);\n\n presenter.getViewElements();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_products, container, false);\n\n // Get refreshLayout\n refreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipeRefresh);\n refreshLayout.setOnRefreshListener(this);\n\n recyclerViewInit(view);\n\n interactor = new ProductsListInteractor(getActivity().getApplicationContext(), this);\n interactor.requestProducts();\n\n return view;\n\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tinflater = LayoutInflater.from(getApplicationContext());\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onCreateView---------\");\n\t\tview = inflater.inflate(getContentViewId(),container,false);\n\t\tunbinder = ButterKnife.bind(this,view);\n\t\tinitView(savedInstanceState);\n\t\treturn view;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.activity_click_product_layout, container, false);\n\n ivList=view.findViewById(R.id.iv_list);\n txtProductDescription=view.findViewById(R.id.txt_productDescription);\n txtShowOfeerPrice=view.findViewById(R.id.txt_showOfferPrice);\n txtShowPrice=view.findViewById(R.id.txt_showPrice);\n txtTitleName=view.findViewById(R.id.tv_list_name);\n edtEnterPinCode=view.findViewById(R.id.edt_enterPinCode);\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mBinding = DataBindingUtil.inflate(inflater,R.layout.fragment_goods, container, false);\n id = (String)getActivity().getIntent().getExtras().get(\"id\");\n initView();\n initData();\n\n return mBinding.getRoot();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_yesterday, container, false);\n mContext = getContext();\n mActivity = getActivity();\n reportList = new ArrayList<>();\n tableList = new ArrayList<>();\n ButterKnife.bind(this, view);\n \n return view ;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_sugar_survey_whole_sale_imported, container, false);\n\n ButterKnife.bind(this, view);\n\n app = (AFA) Objects.requireNonNull(getActivity()).getApplication();\n\n db = new AFADatabaseAdapter(getContext()).open();\n countryList = new ArrayList<Country>();\n getCountryListApplicable();\n\n\n\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n\n view = inflater.inflate(LAYOUT, container, false);\n return view;\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 }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_create_listing_step2, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_edit_card, container, false);\n\n ImageButton selectImageButton = (ImageButton) view.findViewById(R.id.selectImageButton);\n imageView = (ImageView) view.findViewById(R.id.imageView);\n questionEditText = (EditText) view.findViewById(R.id.questionEditText);\n answerEditText = (EditText) view.findViewById(R.id.answerEditText);\n\n Button makeCardButton = (Button) view.findViewById(R.id.makeCardButton);\n selectImageButton.setOnClickListener(imageButtonListener);\n makeCardButton.setOnClickListener(cardButtonListener);\n\n //get Bundle of arguments to get the rowID of the class\n Bundle classArg = getArguments();\n class_rowID = classArg.getLong(HomeActivity.CLASS_ROW_ID);\n\n return view;\n }", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\t\tBundle savedInstanceState) {\n\t\t\tint position;\n\t\t\tBundle args = getArguments();\n\t\t\tposition = args.getInt(ARG_OBJECT);\n\t\t\t// }\n\n\t\t\tint tabLayout = 0;\n\t\t\tswitch (position) {\n\t\t\tcase 0:\n\t\t\t\ttabLayout = R.layout.pagina1;\n\t\t\t\tnView = 0;\n\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttabLayout = R.layout.pagina2;\n\t\t\t\tnView = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tView rootView = inflater.inflate(tabLayout, container, false);\n\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.day_layout, container,false);\n setPieMap(v);\n loadDatas();\n simulator();\n return v;\n }", "protected abstract ReadCell<DataType> createItemCell(LayoutInflater inflater, View convertView, ViewGroup parent);", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.main_fhmx, container, false);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_sqlite, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n try {\n rootView = inflater.inflate(R.layout.fragment_editar_tweet_premiacion, container, false);\n return rootView;\n } catch (Exception e) {\n Log.e(\"Parrilla: onCreateView\", e.getMessage());\n }\n return null;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_detail_list, container, false);\n\n getViews(view);\n\n setInfo();\n\n setListeners();\n\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tapplication = (MyApplication) context.getApplicationContext();\r\n\t\tview = inflater.inflate(R.layout.myorder_fragment, null);\r\n\t\tlistView = (ListView) view.findViewById(R.id.lv_myOrder);\r\n\t\tmoreView = inflater.inflate(R.layout.my_order_listfootview, null);\r\n\t\tlistData = new ArrayList<String>();\r\n\t\tmoreView.setVisibility(View.GONE);\r\n\t\t\r\n\t\tprepareData(); // 准备数据\r\n\r\n\t\treturn view;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_simplelistview_test, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_sell_product, container, false);\n bind = ButterKnife.bind(this, inflate);\n initView();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_history_order, container, false);\n initialization(view);\n getData();\n clickListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View r = inflater.inflate(R.layout.fragment_do_an_307, container, false);\n\n gvmon_307 = r.findViewById(R.id.gv_mon_307);\n spadt_307 = new SanPhamAdapter_307(DoAnFragment.this.getActivity(), R.layout.item_307);\n gvmon_307.setAdapter(spadt_307);\n registerForContextMenu(gvmon_307);\n fakeData();\n addEvents();\n return r;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_information, container, false);\n findViews(view);\n initViews();\n //setUpAdapter();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ctx = getActivity();\n View view = inflater.inflate(getLayoutID(),null);\n mPreenter = createPresenter();\n loading = new MyProgressLoading(ctx, R.style.DialogStyle);\n sp = ctx.getSharedPreferences(SpUtiles.SP_Mode,Context.MODE_PRIVATE);\n HideUtil.init(getActivity());\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_sale, container, false);\n toolbar = getActivity().findViewById(R.id.toolbar);\n ((AppCompatActivity) getActivity()).setSupportActionBar(toolbar);\n toolbar.setTitle(\"Sale\");\n unbinder = ButterKnife.bind(this, view);\n\n helper = new dbHelper(getContext());\n LoadSpinner();\n LoadRecyclerView();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view= inflater.inflate(R.layout.customer_book_fragment, container, false);\n inti(view);\n //clicks\n clicks();\n return view;\n }", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n int weeks = 0;\n String program = null;\n if(getArguments() != null) {\n Log.d(TAG, \"onCreateView: Argument Retrieved\");\n Bundle args = getArguments();\n weeks = Integer.parseInt(args.getString(\"weeks\"));\n program = args.getString(\"sched\");\n }\n View view = inflater.inflate(R.layout.table_fragment, container, false);\n table = view.findViewById(R.id.table);\n buildTable(table,weeks, program);\n\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView layout = inflater.inflate(R.layout.fragment_assistant, container, false);\r\n\t\tlayout.findViewById(R.id.kaniu).setOnClickListener(this);\r\n\t\tlayout.findViewById(R.id.img_add).setOnClickListener(this);\r\n\t\tinitListView(layout);\r\n\t\treturn layout;\r\n\t}", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.fragment_food_list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n //inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot)\n //Inflate a new view hierarchy from the specified XML node\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_current_order, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n intialFragment();\n // return inflater.inflate(R.layout.fragment_old_ordered, container, false);\n oldOrderedBinding = DataBindingUtil.inflate(\n inflater, R.layout.fragment_orederd_recycler, container, false);\n View view = oldOrderedBinding.getRoot();\n\n return view;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view;\n\t\tview = inflater\n\t\t\t\t.inflate(R.layout.fragment_photo_goods, container, false);\n\t\tViewUtils.inject(this, view);\n\n\t\tmList = new ArrayList<GoodsList>();\n\t\tmGridView=mPull.getRefreshableView();\n\t\tmPull.setMode(Mode.PULL_FROM_END);\n\t\tmPull.setOnRefreshListener(this);\n\t\tloadGoodsList(\"\",\"\",\"\");\n\n\t\tmGridView.setOnItemClickListener(this);\n\n\t\ttoggleButton();\t\t\n\t\tinitPriceData();\n\n\t\treturn view;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.be_admin_printers, container, false);\n\n /** RETURN THE VIEW INSTANCE TO SETUP THE LAYOUT **/\n return view;\n }" ]
[ "0.6714927", "0.6581738", "0.64539236", "0.64100194", "0.6397395", "0.6396718", "0.63878167", "0.636506", "0.63287723", "0.6326578", "0.63137406", "0.6305936", "0.6283191", "0.62617683", "0.62489635", "0.6245635", "0.623668", "0.6231466", "0.6214171", "0.6190557", "0.61805475", "0.617559", "0.61576587", "0.6154345", "0.6151869", "0.6148868", "0.61487514", "0.61395365", "0.61381406", "0.61379284", "0.612963", "0.6128801", "0.6126585", "0.61111313", "0.6104074", "0.6101516", "0.6101502", "0.60881543", "0.60875845", "0.60849804", "0.6075255", "0.6072242", "0.6064748", "0.6058739", "0.6048484", "0.60433775", "0.6042224", "0.6040722", "0.6040577", "0.6040173", "0.60352296", "0.6028972", "0.60246843", "0.60228455", "0.60186595", "0.6011728", "0.600492", "0.60035557", "0.6001398", "0.6000069", "0.59974164", "0.59925854", "0.5991758", "0.5988949", "0.59865797", "0.59759516", "0.5975373", "0.59752536", "0.597237", "0.59710705", "0.5964377", "0.5962976", "0.5960976", "0.5951343", "0.5949601", "0.5948974", "0.59485316", "0.5946342", "0.5944507", "0.59417003", "0.5937699", "0.59368527", "0.5935745", "0.59350455", "0.59349394", "0.5929882", "0.5926379", "0.59248465", "0.5924828", "0.5924521", "0.5922991", "0.59218764", "0.5919505", "0.5917286", "0.59170526", "0.5916846", "0.59162366", "0.59146065", "0.59117305", "0.5910351", "0.59094757" ]
0.0
-1
Creates a new instance of SessionResource
public SessionResource() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SessionsResource() {\n\t\tsuper();\n\t\tLOG.trace(\"Start SessionsResource#SessionsResource()\");\n\t\tsetValidator(new SessionResourceValidator(this));\n\t\tLOG.trace(\"Complete SessionsResource#SessionsResource()\");\n\t}", "public Session createSession() {\n\t\tSession session = new Session();\n\t\tput(session.getId(), session);\n\t\treturn session;\n\t}", "Resource create(Session session, IRI identifier, IRI type);", "DefaultSession createSession(String id);", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public Session createSession(String sessionId);", "public Session() {\n\t\tLogger.log(\"Creating application session\");\n\t}", "protected abstract SESSION newSessionObject() throws EX;", "@Override\n\tpublic Session createSession(SessionBasicInfo sessionBasicInfo) {\n\t\tSession session = sessionStore.createSession( sessionBasicInfo);\n\t\tif(session == null)\n\t\t\treturn null;\n\t\tsession._setSessionStore(this);\n\t\tsession.putNewStatus();\n\t\t\n\t\treturn session;\n\t}", "@POST\n public Response createSession(Session session) throws URISyntaxException {\n log.debug(\"REST request to save Session : {}\", session);\n sessionRepository.create(session);\n return HeaderUtil.createEntityCreationAlert(Response.created(new URI(\"/resources/api/session/\" + session.getId())),\n \"session\", session.getId().toString())\n .entity(session).build();\n }", "InternalSession createSession(String sessionId);", "private Session() {\n }", "private Session() {\n }", "public Session create() {\n // Attempt to generate a random session 5 times then fail\n final int MAX_ATTEMPTS = 5; \n \n // Loop until we have outdone our max attempts\n for(int x = 0; x < MAX_ATTEMPTS; x++) {\n String sessionKey = randomString(SESSION_KEY_SIZE); // SESSION_KEY_SIZE characters\n\n // The session key exists\n if (exists(sessionKey))\n continue;\n\n // Create the new session\n Session session = new Session(sessionKey);\n sessions.put(sessionKey, session, POLICY, EXPIRATION_TIME, EXPIRATION_UNIT); \n return session;\n }\n\n // Failed to generate new session key\n return null;\n }", "Session createSession(Long courseId, Long studentId, Session session);", "@PostMapping\n @ResponseStatus(HttpStatus.CREATED)\n public Session create(@RequestBody final Session session) {\n return sessionRepository.saveAndFlush(session);\n }", "public SessionController() {\n }", "synchronized public Session newSysSession() {\n\n Session session = new Session(sysSession.database,\n sysSession.getUser(), false, false,\n sessionIdCount, null, 0);\n\n session.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n\n sessionMap.put(sessionIdCount, session);\n\n sessionIdCount++;\n\n return session;\n }", "public SessionManager(API api) {\n _api = api;\n }", "public Session createSession(String id)\n\t{\n\t\tif (id == null)\n\t\t\tid = generateSessionId();\n\t\tSession session = new SessionImpl(id);\n\t\t_sessions.put(id, session);\n\t\treturn session;\n\t}", "public interface ResourceService {\n\n /**\n * Set the event service\n * @param service the event service\n */\n default void setEventService(EventService service) {\n bind(service);\n }\n\n /**\n * Bind the event service\n * @param service the event service\n */\n void bind(EventService service);\n\n /**\n * Unbind the event service\n * @param service the event service\n */\n void unbind(EventService service);\n\n /**\n * Find a resource at the given location\n * @param session the session\n * @param identifier the resource identifier\n * @return the resource\n */\n Optional<Resource> find(Session session, IRI identifier);\n\n /**\n * Test whether a resource exists at the identifier\n * @param session the session\n * @param identifier the resource identifier\n * @return whether the identified resource exists\n */\n Boolean exists(Session session, IRI identifier);\n\n /**\n * Create a new resource\n * @param session the session\n * @param identifier the Identifier for the new resource\n * @param type the type of the resource\n * @return the new resource\n */\n Resource create(Session session, IRI identifier, IRI type);\n\n /**\n * Update a resource\n * @param session the session\n * @param identifier the resource identifier\n * @param graph the new graph\n */\n void update(Session session, IRI identifier, Graph graph);\n\n /**\n * Delete a resource\n * @param session the session\n * @param identifier the resource identifier\n */\n void delete(Session session, IRI identifier);\n\n /**\n * Commit changes to durable storage\n * @param session the session\n */\n void commit(Session session);\n\n /**\n * Expire a session and drop any uncommitted changes\n * @param session the session\n */\n void expire(Session session);\n\n /**\n * Begin a new session\n * @return the session\n */\n Session begin();\n\n /**\n * Resume an existing session\n * @param identifier the identifier\n * @return the session, if it exists\n */\n Optional<Session> resume(IRI identifier);\n\n /**\n * Extend a session\n * @param session the session\n * @param duration the amount of time by which to extend the session\n * @return the new session\n */\n Optional<Session> extend(Session session, Duration duration);\n}", "public UserSession(User user) {\n\n }", "DatastoreSession createSession();", "@Override\r\n\t\tpublic Session newSession(Request request, Response response) {\n\t\t\tLoginSession session = new LoginSession(request);\r\n\t\t\tsession.authenticate(\"scott\", \"tiger\");\r\n\t\t\t\r\n\t\t\treturn session;\r\n\t\t}", "Resource createResource();", "public void createSession(int uid);", "public HelloControllerSession() {\n }", "@Path(\"/{id}\")\n @GET\n public Response getSession(@PathParam(\"id\") Long id) {\n log.debug(\"REST request to get Session : {}\", id);\n Session session = sessionRepository.find(id);\n return Optional.ofNullable(session)\n .map(result -> Response.status(Response.Status.OK).entity(session).build())\n .orElse(Response.status(Response.Status.NOT_FOUND).build());\n }", "public synchronized static Session getInstance(){\n if (_instance == null) {\n _instance = new Session();\n }\n return _instance;\n }", "@Override\r\n\tpublic HttpSession getSession(boolean create)\r\n\t{\r\n\t\treturn getSession();\r\n\t}", "public Session openSession() {\r\n //Interceptor interceptor= new Interceptor();\r\n //Session regresar = sessionFactory.withOptions().interceptor(interceptor).openSession();\r\n Session regresar = sessionFactory.openSession();\r\n //interceptor.setSession(regresar);\r\n return regresar;\r\n }", "public SessionService() {\n user = new User();\n project = new Project();\n project.setId(-1);\n project.setName(\"не выбран\");\n logged = false;\n textUpdated = false;\n }", "public Session(User user) {\n sessionId = UUID.randomUUID().toString();\n loggedInUser = user;\n }", "Session get(int id);", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "public AuthStorageSession() { \n }", "public SessionDao() {\n super(Session.SESSION, com.scratch.database.mysql.jv.tables.pojos.Session.class);\n }", "protected Session createSession (ServerChannel channel) {\n return new Session (channel);\n }", "@Override\n public CreateSessionResponse createSession()\n throws EwalletException {\n return null;\n }", "ResourceAPI createResourceAPI();", "@Override\n\t\tpublic HttpSession getSession(boolean create) {\n\t\t\treturn null;\n\t\t}", "@Override\n public synchronized SessionImpl getConnection() {\n if (Framework.getRuntime().isShuttingDown()) {\n throw new IllegalStateException(\"Cannot open connection, runtime is shutting down\");\n }\n SessionPathResolver pathResolver = new SessionPathResolver();\n Mapper mapper = newMapper(pathResolver, true);\n SessionImpl session = newSession(model, mapper);\n pathResolver.setSession(session);\n sessions.add(session);\n sessionCount.inc();\n return session;\n }", "private Session getSession (String sessionID) {\n\t\tSession session;\n\t\tif (get(sessionID) != null) {\n\t\t\tsession = get(sessionID);\n\t\t} else {\n\t\t\tsession = new Session();\n\t\t\tput(session.getId(), session);\n\t\t}\n\t\treturn session;\n\t}", "IDAOSession createNewSession();", "public Session createEmptySession();", "private SessionTicket createUniqueSessionTicket() {\n String ticket = UUID.randomUUID().toString();\n SessionTicket sessionTicket = new SessionTicket();\n sessionTicket.setTicket(ticket);\n return sessionTicket;\n }", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "public Session getSession();", "public interface SessionService {\n\n Session addSession(Session session);\n Session getSession(Long id);\n boolean deleteSession(Long id);\n List<Session> getSessions();\n boolean updateRecord(Long id, String record);\n}", "SessionManagerImpl() {\n }", "@Override\n\tprotected Serializable doCreate(Session session) {\n\t\treturn null;\n\t}", "public static DefaultSessionIdentityMaker newInstance() { return new DefaultSessionIdentityMaker(); }", "@Path(\"{userId}/sessions\")\n\tpublic SessionsResource sessions(@PathParam(Const.USER_ID) String userId) {\n\t\ttry {\n\t\t\treturn new SessionsResource(appId, userId);\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tLog.error(\"\", this, \"sessions\", \"Illegal Arguments.\", e); \n\t\t\tthrow new WebApplicationException(Response.status(Status.BAD_REQUEST).entity(\"Parse error\").build());\n\t\t}\n\t}", "Session getSession();", "Session getSession();", "private Session session(Properties props) {\n return Session.getInstance(props,\n new Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\"[email protected]\", \"happinessbarometer2014\");\n }\n }\n );\n }", "public HttpSessionManager() {\r\n\r\n }", "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "protected Session getSession() { return session; }", "private HTTPSession ()\n\t{\n\t\tthis (null, false, null);\n\t}", "ObjectResource createObjectResource();", "Service_Resource createService_Resource();", "public CreateSessionReq(CreateSessionReq other) {\n if (other.isSetUser()) {\n this.user = TBaseHelper.deepCopy(other.user);\n }\n if (other.isSetGraph_addr()) {\n this.graph_addr = TBaseHelper.deepCopy(other.graph_addr);\n }\n if (other.isSetClient_ip()) {\n this.client_ip = TBaseHelper.deepCopy(other.client_ip);\n }\n }", "@Override\n public Single<SessionEntity> createUserSession() {\n return this.userRepository.getUser().firstOrError().flatMap(userEntity -> {\n if (!userEntity.isGuestUser()) {\n if (userEntity.getSessionId().isEmpty()) {\n return newSession(userEntity);\n }\n else if (userEntity.isHasOpenSession()) {\n return Single.just(new SessionEntity(userEntity.isHasOpenSession(), userEntity.getSessionId()));\n }\n }\n return Single.just(new SessionEntity(false, \"\"));\n });\n }", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "@Override\n\tpublic void createSession(String customer) {\n\t\t\n\t}", "private void initSession(HttpServletRequest request, HttpServletResponse response) throws IOException {\n // create new seassion for user\n HttpSession session = request.getSession();\n if (session != null) {\n _sessionId = session.getId();\n }\n\n response.getWriter().write(_sessionId);\n }", "public SessionService session() {\n return service;\n }", "public Result withSession(Map<String, String> session) {\n return withSession(new Session(session));\n }", "public McqOfficialSession(){\n\t\tsuper(); \n\t}", "protected Session buildOrObtainSession() {\r\n\t\tLOGGER.fine(\"Opening a new Session\");\r\n\t\tSession s = super.buildOrObtainSession();\r\n\r\n\t\tLOGGER.fine(\"Disabling automatic flushing of the Session\");\r\n\t\ts.setFlushMode(FlushMode.MANUAL);\r\n\r\n\t\treturn s;\r\n\t}", "public static Session getSession() {\n return session;\n }", "public static Session getSession(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Session.class);\n }", "public Result withNewSession() {\n return withSession(Collections.emptyMap());\n }", "private Session establishSession(String sessionid) throws AxisFault {\n Session s = sessionManager.getSession(sessionid);\n\n if (s == null) {\n throw new AxisFault(\"Session \\\"\" + sessionid + \"\\\" is not active\");\n }\n s.setActive();\n sessionManager.setCurrentSession(s);\n return s;\n }", "public Session getSession() { return session; }", "public Session(long sid, String cred, String cardNo) {\n\t\tthis.sid = sid;\n\t\tthis.cred = cred;\n\t\tthis.cardNo = cardNo;\n\t\tops = new ArrayList<Operation>();\n\t}", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public static CourseSession createSession(String classNumber) {\n CourseSession session = new CourseSession();\n session.setClassNumber(classNumber);\n CourseInstructor instructor = new CourseInstructor();\n instructor.setId(\"1\");\n instructor.setFirstName(\"Steve\");\n instructor.setLastName(\"Jobs\");\n session.setInstructor(instructor);\n return session;\n }", "SessionManager get();", "private Session() {\n userId = -1;\n onUserDeletion = null;\n }", "public void createSession(HttpServletRequest request) {\n\n session = request.getSession();\n writeSessionMessage(session);\n }", "public ResourceFactory(){}", "ServiceDataResource createServiceDataResource();", "public StudentResource() {\n }", "public SessionList() { \n sessions = ExpiringMap.builder().variableExpiration().build();\n }", "DefaultSession getSession(String id);", "public ProfileResource() {\n }", "public MemberResource() {\n sessionBeanLookup = new SessionBeanLookup();\n \n memberEntitySessionBeanLocal = sessionBeanLookup.lookupMemberEntitySessionBeanLocal();\n }", "public UserSession initUserSession() {\n return new UserSession(RAND_MAX, RAND_MIN, rand(RAND_MIN, RAND_MAX));\n }", "com.google.spanner.v1.Session getSessionTemplate();", "public Session createSession(String oauthState, String authorizationCode) {\n FhirSessionContext fhirSessionContext = fhirSessionContextHolder.get(oauthState);\n AuthorizationCodeRequest authorizationCodeRequest = fhirSessionContext.getAuthorizationCodeRequest();\n Validate.notNull(authorizationCodeRequest, \"AuthorizationCodeRequest not found for oauthState: \" + oauthState);\n Validate.isTrue(clientId.equals(authorizationCodeRequest.getClientId()), \"AuthorizationCodeRequest.clientId does not match\");\n\n // gain an access token for use by the session\n String fhirServiceUrl = authorizationCodeRequest.getFhirEndpoints().getFhirServiceApi();\n String tokenEndpoint = authorizationCodeRequest.getFhirEndpoints().getTokenEndpoint();\n String userInfoEndpoint = authorizationCodeRequest.getFhirEndpoints().getUserInfoEndpoint();\n AuthorizationCodeAccessTokenRequest<C> authorizationCodeAccessTokenRequest =\n new AuthorizationCodeAccessTokenRequest<>(clientId, clientCredentials, authorizationCode, redirectUri);\n\n AccessToken accessToken = accessTokenProvider.getAccessToken(tokenEndpoint, authorizationCodeAccessTokenRequest);\n\n // obtain the userInfo\n UserInfo userInfo = null;\n if (accessToken.getIdTokenStr() != null) {\n userInfo = accessTokenProvider.getUserInfo(userInfoEndpoint, accessToken);\n }\n\n return new Session(hapiFhirContext, fhirServiceUrl, accessToken, userInfo);\n }", "public AppUserResource() {\r\n }", "public Resource() {\n }", "public Resource() {\n }", "Observable<Session> createSession(RelyingParty relyingParty, Map<String, Object> userInfo, Set<String> scopes, AcrValues acrValues, String redirectUrl);", "@Override\r\n \t\t\tpublic SSession createSession(long tenantId, String userName)\r\n \t\t\t throws SSessionException {\n \t\t\t\treturn null;\r\n \t\t\t}", "public void setSession(Session session) { this.session = session; }", "public void startSession(){\n sessionID = client.startSession();\n \n //Get system temporary files path\n String temporaryPath = System.getProperty(\"java.io.tmpdir\").replaceAll(\"\\\\\\\\\",\"/\");\n \n //If temporary file path does not end with /, add it\n if(!temporaryPath.endsWith(\"/\"))\n temporaryPath = temporaryPath + \"/\";\n \n //Create session directory\n sessionDirectory = new File(temporaryPath+sessionID);\n sessionDirectory.mkdir();\n \n }", "public UserResource()\n {\n backend_ = (Backend) getApplication().getContext().getAttributes()\n .get(\"backend\");\n }" ]
[ "0.75671345", "0.7005629", "0.6811433", "0.6611273", "0.6500064", "0.6464639", "0.63371885", "0.632238", "0.62109125", "0.6170711", "0.6145204", "0.61164176", "0.61164176", "0.60577184", "0.6045055", "0.604322", "0.5997764", "0.5904641", "0.5891836", "0.5880943", "0.58580416", "0.5820837", "0.5820654", "0.57692057", "0.5743882", "0.56680197", "0.56581604", "0.5653389", "0.5643639", "0.56240666", "0.56125194", "0.5597433", "0.55933404", "0.5574336", "0.55675715", "0.5563975", "0.5531889", "0.54853606", "0.5476645", "0.5458711", "0.54525596", "0.5430183", "0.5425398", "0.54222775", "0.5418497", "0.54184496", "0.54123145", "0.53973925", "0.5389249", "0.5389245", "0.538855", "0.5386427", "0.5382271", "0.5378371", "0.5378371", "0.53700256", "0.5325072", "0.5324225", "0.53008837", "0.53002393", "0.5296179", "0.52953637", "0.5293054", "0.5288353", "0.5277882", "0.52748233", "0.5265607", "0.52609813", "0.52604616", "0.5253461", "0.5250372", "0.5249497", "0.52480537", "0.52444136", "0.5237233", "0.523488", "0.5230635", "0.5219014", "0.521359", "0.5213091", "0.5212075", "0.52058935", "0.52011824", "0.519757", "0.5193649", "0.51846516", "0.5181902", "0.5174208", "0.5171975", "0.5170583", "0.5167587", "0.5161337", "0.5155289", "0.51461184", "0.51461184", "0.5124307", "0.51189154", "0.5116561", "0.51099944", "0.51089066" ]
0.79174155
0
Retrieves representation of an instance of conf.session.ws.rest.SessionResource
@GET @Produces(MediaType.APPLICATION_XML) public String getXml() { //TODO return proper representation object throw new UnsupportedOperationException(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SessionResource() {\n }", "public SessionsResource() {\n\t\tsuper();\n\t\tLOG.trace(\"Start SessionsResource#SessionsResource()\");\n\t\tsetValidator(new SessionResourceValidator(this));\n\t\tLOG.trace(\"Complete SessionsResource#SessionsResource()\");\n\t}", "@Path(\"/{id}\")\n @GET\n public Response getSession(@PathParam(\"id\") Long id) {\n log.debug(\"REST request to get Session : {}\", id);\n Session session = sessionRepository.find(id);\n return Optional.ofNullable(session)\n .map(result -> Response.status(Response.Status.OK).entity(session).build())\n .orElse(Response.status(Response.Status.NOT_FOUND).build());\n }", "public String getSession() {\n return this.session;\n }", "public String getSession() {\n return session;\n }", "public static String buildSessionXML() throws JsonProcessingException {\n\t\tSessionBean sBean = new SessionBean();\n\t\tsBean.setClientType(\"REST Client\");\n\t\tXmlMapper mapper = new XmlMapper();\n\t\treturn mapper.writeValueAsString(sBean);\n\t}", "@RequestMapping(method = RequestMethod.GET)\n public Sessions retrieve(@RequestHeader(\"X-CS-Auth\") String auth,\n @RequestHeader(\"X-CS-Session\") String sessionId) {\n return sessionService.retrieve();\n }", "public Resource getResource(){\n return res;\n }", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "public Session session() {\n return session;\n }", "@Override // com.android.server.wm.WindowContainer\n public SurfaceSession getSession() {\n return this.mSession;\n }", "public interface Resource extends Serializable\r\n{\r\n /**\r\n * Gets the resource id.\r\n * \r\n * @return the resource id\r\n */\r\n public String getResourceId();\r\n \r\n /**\r\n * Gets the protocol id\r\n * \r\n * @return the protocol id\r\n */\r\n public String getProtocolId(); \r\n \r\n /**\r\n * Returns the object id of the resource\r\n * \r\n * @return the object id\r\n */\r\n public String getObjectId();\r\n \r\n /**\r\n * Sets the object id.\r\n * \r\n * @param objectId the new object id\r\n */\r\n public void setObjectId(String objectId);\r\n\r\n /**\r\n * Returns the endpoint of the resource\r\n * \r\n * @return the endpoint\r\n */\r\n public String getEndpointId();\r\n\r\n /**\r\n * Sets the endpoint of the resource\r\n * \r\n * @param endpointId String\r\n */\r\n public void setEndpointId(String endpointId);\r\n \r\n /**\r\n * Gets the name.\r\n * \r\n * @return the name\r\n */\r\n public String getName();\r\n \r\n /**\r\n * Sets the name.\r\n * \r\n * @param name the new name\r\n */\r\n public void setName(String name);\r\n \r\n /**\r\n * Gets the metadata for this resource. If there is no metadata\r\n * for this resource, null will be returned.\r\n * \r\n * @return the metadata or null\r\n */\r\n public ResourceContent getMetadata() throws IOException;\r\n \r\n /**\r\n * Gets the content for this resource. If there is no content\r\n * for this resource, null will be returned.\r\n * \r\n * @return the content or null.\r\n */\r\n public ResourceContent getContent() throws IOException;\r\n \r\n /**\r\n * Gets the metadata url. If there is no metadata url for this\r\n * resource, null will be returned.\r\n * \r\n * @return the metadata url or null.\r\n */\r\n public String getMetadataURL();\r\n\r\n /**\r\n * Gets the content url. If there is no content url for this\r\n * resource, null will be returned.\r\n * \r\n * @return the content url\r\n */\r\n public String getContentURL();\r\n \r\n /**\r\n * Gets the object type id.\r\n * \r\n * @return the object type id\r\n */\r\n public String getObjectTypeId();\r\n \r\n /**\r\n * Checks if the resource is a container.\r\n * \r\n * @return true, if is container\r\n */\r\n public boolean isContainer(); \r\n}", "@JsonGetter(\"session_token\")\n public String getSessionToken ( ) { \n return this.sessionToken;\n }", "@JsonIgnore\n public String getResource() {\n return this.resource;\n }", "@GET(\"sdk/v5/sessions\")\n Call<SessionResponse> getSession(@Header(\"Authorization\") String Authorization);", "Session get(int id);", "public ResourceVO getResource() {\n\treturn resource;\n}", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "public Session getSession() { return session; }", "public interface SessionDetails extends WriteMarshallable {\n\n // a unique id used to identify this session, this field is by contract immutable\n UUID sessionId();\n\n // a unique id used to identify the client\n UUID clientId();\n\n @Nullable\n String userId();\n\n @Nullable\n String securityToken();\n\n @Nullable\n String domain();\n\n SessionMode sessionMode();\n\n @Nullable\n InetSocketAddress clientAddress();\n\n long connectTimeMS();\n\n <I> void set(Class<I> infoClass, I info);\n\n @NotNull\n <I> I get(Class<I> infoClass);\n\n @Nullable\n WireType wireType();\n\n byte hostId();\n\n @Override\n default void writeMarshallable(@NotNull WireOut w) {\n w.writeEventName(EventId.userId).text(userId())\n .writeEventName(EventId.domain).text(domain());\n if (sessionMode() != null)\n w.writeEventName(EventId.sessionMode).text(sessionMode().toString());\n w.writeEventName(EventId.securityToken).text(securityToken())\n .writeEventName(EventId.clientId).text(clientId().toString())\n .writeEventName(EventId.hostId).int8(hostId())\n .writeEventName(EventId.wireType).asEnum(wireType());\n }\n}", "String getAssociatedSession();", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "public String toString() {\n String ret = null;\n ContentIOSession session = getIOSession();\n try {\n ret = \"{\" + session.getId() + \", \" + session.getType() + \"}\";\n } finally {\n session.close();\n }\n return ret;\n\n }", "public String getRdSession() {\n return rdSession;\n }", "public String toString() {\n\t\treturn _sessionId;\n\t}", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "public User getSession(){\n\t\treturn this.session;\n\t}", "public interface ResourceService {\n\n /**\n * Set the event service\n * @param service the event service\n */\n default void setEventService(EventService service) {\n bind(service);\n }\n\n /**\n * Bind the event service\n * @param service the event service\n */\n void bind(EventService service);\n\n /**\n * Unbind the event service\n * @param service the event service\n */\n void unbind(EventService service);\n\n /**\n * Find a resource at the given location\n * @param session the session\n * @param identifier the resource identifier\n * @return the resource\n */\n Optional<Resource> find(Session session, IRI identifier);\n\n /**\n * Test whether a resource exists at the identifier\n * @param session the session\n * @param identifier the resource identifier\n * @return whether the identified resource exists\n */\n Boolean exists(Session session, IRI identifier);\n\n /**\n * Create a new resource\n * @param session the session\n * @param identifier the Identifier for the new resource\n * @param type the type of the resource\n * @return the new resource\n */\n Resource create(Session session, IRI identifier, IRI type);\n\n /**\n * Update a resource\n * @param session the session\n * @param identifier the resource identifier\n * @param graph the new graph\n */\n void update(Session session, IRI identifier, Graph graph);\n\n /**\n * Delete a resource\n * @param session the session\n * @param identifier the resource identifier\n */\n void delete(Session session, IRI identifier);\n\n /**\n * Commit changes to durable storage\n * @param session the session\n */\n void commit(Session session);\n\n /**\n * Expire a session and drop any uncommitted changes\n * @param session the session\n */\n void expire(Session session);\n\n /**\n * Begin a new session\n * @return the session\n */\n Session begin();\n\n /**\n * Resume an existing session\n * @param identifier the identifier\n * @return the session, if it exists\n */\n Optional<Session> resume(IRI identifier);\n\n /**\n * Extend a session\n * @param session the session\n * @param duration the amount of time by which to extend the session\n * @return the new session\n */\n Optional<Session> extend(Session session, Duration duration);\n}", "public Session getSession() {\n return session;\n }", "@GET\n @Path(\"/session\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response getSessionInfo(@Context HttpServletRequest request) {\n try {\n BlahguaSession.ensureAdmin(request);\n return Response.ok(BlahguaSession.getSessionInfo(request)).build();\n } catch (Exception e) {\n return RestUtilities.make500AndLogSystemErrorResponse(request, e);\n }\n }", "public Session getSession() {\n return session;\n }", "public String getSessionID() {\n\t\treturn SID;\n\t}", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n return session_;\n }", "public static Session getSession() {\n return session;\n }", "public SessionService session() {\n return service;\n }", "public Session getSession()\n {\n return session;\n }", "@GET\n @Path(\"/status\")\n @Produces(MediaType.TEXT_PLAIN)\n public String status() {\n Device device = getDevice();\n try {\n StreamingSession session = transportService.getSession(device.getId());\n return \"Status device:[\" + device.getId() + \"]\" + \" session [\" + session.toString() + \"]\";\n } catch (UnknownSessionException e) {\n return e.getMessage();\n }\n }", "SessionManager get();", "protected Session getSession() { return session; }", "public SessionInfo getSessionInfo() {\n\t\treturn sessionInfo;\n\t}", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "public AbstractResource resource()\r\n {\r\n\t return this.resource_state;\r\n }", "public AbstractSession getSession() {\n return session;\n }", "public Session getSession();", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public com.google.protobuf.ByteString\n getSessionIDBytes() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n sessionID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSessionIDBytes() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n sessionID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSessionID() {\n\t\treturn sessionId;\n\t}", "@Path(\"{userId}/sessions\")\n\tpublic SessionsResource sessions(@PathParam(Const.USER_ID) String userId) {\n\t\ttry {\n\t\t\treturn new SessionsResource(appId, userId);\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tLog.error(\"\", this, \"sessions\", \"Illegal Arguments.\", e); \n\t\t\tthrow new WebApplicationException(Response.status(Status.BAD_REQUEST).entity(\"Parse error\").build());\n\t\t}\n\t}", "public String getSessionId() {\n return sessionId;\n }", "public String getSessionId() {\n return sessionId;\n }", "Object getNativeSession();", "com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder();", "public com.google.protobuf.ByteString\n getSessionIDBytes() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n sessionID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSessionIDBytes() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n sessionID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSessionId() {\n return this.sessionid;\n }", "com.weizhu.proto.WeizhuProtos.Session getSession();", "public org.openejb.config.ejb11.Session getSession() {\n return this._session;\n }", "public static String getSessionURL() {\n\n\t\treturn baseURL + \"/rest/site-session\";\n\t}", "public PSUserSession getSession();", "public synchronized RestResponse getResponse() {\n\t\treturn getContext().getLocalSession().getOpSession().getResponse();\n\t}", "public String getSessionId() {\n return super.getSessionId();\n }", "public LocalSession session() { return session; }", "public String getSessionId()\r\n\t{\r\n\t\treturn sessionId;\r\n\t}", "public String getSessionId() {\n return sessionId;\n }", "public String getSessionId() {\n return this.SessionId;\n }", "protected abstract SESSION getThisAsSession();", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n if (sessionBuilder_ != null) {\n return sessionBuilder_.getMessageOrBuilder();\n } else {\n return session_;\n }\n }", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "Optional<Resource> find(Session session, IRI identifier);", "Resource getResource() {\n\t\treturn resource;\n\t}", "private static JsonSession toBasicJson(Session session) {\r\n\t\tJsonSession jsonSession = new JsonSession();\r\n\t\tapplyBasicJsonValues(jsonSession, session);\r\n\t\treturn jsonSession;\r\n\t}", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "public SessionModel getSessionById(String sessionId) {\n\t\tSession session = this.sessionRepository.findOne(sessionId);\n\t\treturn session == null ? null : session.toModel(mapper);\n\t}", "public String getSessionId()\n\t{\n\t\treturn sessionId;\n\t}", "public java.lang.String getSessionToken() {\r\n return sessionToken;\r\n }", "public String testSession() {\n ActionContext context = ActionContext.getContext();\n Map session = context.getSession(); //session\n Struts2Utils.renderJson(session);\n return null;\n }", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "public interface Session {\n\n String API_KEY = \"kooloco\";\n String USER_SESSION = \"szg9wyUj6z0hbVDU6nM2vuEmbyigN3PgC5q8EksKTs25\";\n String USER_ID = \"24\";\n String DEVICE_TYPE = \"A\";\n\n String getApiKey();\n\n String getUserSession();\n\n String getUserId();\n\n void setApiKey(String apiKey);\n\n void setUserSession(String userSession);\n\n void setUserId(String userId);\n\n String getDeviceId();\n\n void setUser(User user);\n\n User getUser();\n\n void clearSession();\n\n String getLanguage();\n\n String getCurrency();\n\n String getAppLanguage();\n\n void setCurrency(String currency, String lCurrency);\n\n}", "protected Resource getResource() {\n return resource;\n }", "String getSessionId() {\n return this.sessionId;\n }", "public Resource getResource() {\n return resource;\n }", "public String getSessionID ()\n\t{\n\t\treturn sessionID;\n\t}", "public SqlContainerResource resource() {\n return this.innerProperties() == null ? null : this.innerProperties().resource();\n }", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public String getSessionId() {\n\t\treturn sessionId;\n\t}", "public String getSessionId() {\n\t\treturn sessionId;\n\t}", "public final String getSessionId() {\n return sessionId;\n }", "@Override\n\tprotected Session doReadSession(Serializable sessionId) {\n\t\treturn null;\n\t}", "private RESTResource getRestResource(GeobatchRunInfo runInfo) {\n // Mapping og run status\n RESTResource resource = new RESTResource();\n // Category it's our category for geobatch execution\n resource.setCategory(getGeobatchExecutionCategory());\n // Name it's the run UID for the execution\n resource.setName(runInfo.getFlowUid());\n // Description it's the composite id\n resource.setDescription(runInfo.getInternalUid());\n // Metadata it's the status of the execution\n resource.setMetadata(runInfo.getFlowStatus());\n resource.setId(runInfo.getId());\n return resource;\n }", "Session getCurrentSession();", "Session getCurrentSession();", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n if (sessionBuilder_ == null) {\n return session_;\n } else {\n return sessionBuilder_.getMessage();\n }\n }", "public Object getObject() {\n\t\treturn this.sessionFactory;\n\t}", "public String getSessionContext() {\n return this.SessionContext;\n }", "public String sessionId() {\n\t\treturn sessionId;\n\t}", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public byte[] sessionToken() {\n return sesTok;\n }" ]
[ "0.6656597", "0.63648486", "0.6024317", "0.5922351", "0.5906995", "0.58016634", "0.5523171", "0.55105436", "0.5493368", "0.54368985", "0.54316384", "0.5424018", "0.5408188", "0.5395608", "0.53614813", "0.5340999", "0.5339911", "0.53376836", "0.5334158", "0.53291327", "0.5318312", "0.53126484", "0.5304142", "0.52970296", "0.528956", "0.5272758", "0.52610815", "0.5248036", "0.5245274", "0.5231973", "0.5211107", "0.5209836", "0.52080923", "0.52030325", "0.51976895", "0.51932275", "0.51824826", "0.5179883", "0.51607907", "0.5160284", "0.5141857", "0.5141748", "0.5122732", "0.5120242", "0.5111511", "0.5111511", "0.5111511", "0.5110608", "0.5110608", "0.5103114", "0.5100831", "0.50975055", "0.50975055", "0.5095335", "0.5088335", "0.5080239", "0.5080239", "0.5079145", "0.5070343", "0.50638545", "0.50542396", "0.5049919", "0.5043939", "0.5038825", "0.50360096", "0.50320286", "0.5027216", "0.5026046", "0.50236434", "0.5020175", "0.50159216", "0.5013778", "0.5009853", "0.5003984", "0.49915206", "0.4990046", "0.49864784", "0.49848428", "0.49845785", "0.4981628", "0.4972097", "0.4971257", "0.49613774", "0.49584275", "0.4957119", "0.49554366", "0.4954638", "0.4954399", "0.4954399", "0.4953353", "0.49498105", "0.49434087", "0.4938683", "0.4938683", "0.49380547", "0.49352127", "0.49347818", "0.49260315", "0.4911457", "0.49108154", "0.49069366" ]
0.0
-1
PUT method for updating or creating an instance of SessionResource
@PUT @Consumes(MediaType.APPLICATION_XML) public void putXml(String content) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"{id}\", method = RequestMethod.PUT)\n public Session update(@PathVariable Long id, @RequestBody Session session) {\n //TODO: Add validation that all attributes are passed in, otherwise return a 400 bad payload\n Session existingSession = sessionRepository.getOne(id);\n // The third field in the below function allows us to ignore\n // a passed in attribute that we don't want overwritten.\n // In this case, session_id because it's our primary key and it'll\n // copy over null if we don't ignore it.\n BeanUtils.copyProperties(session, existingSession, \"session_id\");\n return sessionRepository.saveAndFlush(existingSession);\n }", "public ResponseTranslator put() {\n setMethod(\"PUT\");\n return doRequest();\n }", "public void setSession(Session value);", "@PUT\n @Path(\"/update\")\n public void put() {\n System.out.println(\"PUT invoked\");\n }", "@PutMapping\n\tpublic ResponseEntity<Object> updateUser(@RequestBody User user, HttpSession session) {\n\t\t\tuserSrvc.update(user);\n\t\t\treturn ResponseEntity.ok(null);\n\t}", "ClientResponse put(URI resourceURI, String jsonFormat) {\n ClientResponse response = _client.put(resourceURI, _vplexSessionId, jsonFormat);\n updateVPLEXSessionId(response);\n return response;\n }", "public interface SessionService {\n\n Session addSession(Session session);\n Session getSession(Long id);\n boolean deleteSession(Long id);\n List<Session> getSessions();\n boolean updateRecord(Long id, String record);\n}", "E update(ID id, E entity, RequestContext context);", "@Override\r\n\tpublic void update(T t) {\n\t\tsuper.getSessionFactory().getCurrentSession().update(t);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}", "public SessionsResource() {\n\t\tsuper();\n\t\tLOG.trace(\"Start SessionsResource#SessionsResource()\");\n\t\tsetValidator(new SessionResourceValidator(this));\n\t\tLOG.trace(\"Complete SessionsResource#SessionsResource()\");\n\t}", "@PutMapping(value = \"/update\", produces = \"application/json\")\n void update(@RequestParam int id, @RequestBody Patient patient);", "@RequestMapping(value = \"/{id}\", method = RequestMethod.PUT)\n public void put(@PathVariable(\"id\") String id, HttpServletRequest req){\n throw new NotImplementedException(\"To be implemented\");\n }", "@PUT\n @JWTTokenNeeded\n @Consumes({MediaType.APPLICATION_JSON})\n @Produces({MediaType.APPLICATION_JSON})\n public Response update(EscenarioDTO entidad) {\n logger.log(Level.INFO, \"entidad:{0}\", entidad);\n \n try {\n \tConciliacion entidadPadreJPA = null;\n if (entidad.getIdConciliacion() != null) {\n entidadPadreJPA = padreDAO.find(entidad.getIdConciliacion());\n if (entidadPadreJPA == null) {\n throw new DataNotFoundException(Response.Status.NOT_FOUND.getReasonPhrase() + entidad.getIdConciliacion());\n }\n }\n //Hallar La entidad actual para actualizarla\n Escenario entidadJPA = managerDAO.find(entidad.getId());\n if (entidadJPA != null) {\n entidadJPA.setFechaActualizacion(Date.from(Instant.now()));\n entidadJPA.setNombre(entidad.getNombre() != null ? entidad.getNombre() : entidadJPA.getNombre());\n entidadJPA.setImpacto(entidad.getImpacto() != null ? entidad.getImpacto() : entidadJPA.getImpacto());\n entidadJPA.setDescripcion(entidad.getDescripcion() != null ? entidad.getDescripcion() : entidadJPA.getDescripcion());\n \n Boolean actualizarConciliacion = false;\n entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n \n Conciliacion conciliacionpadreactual = null;\n \n \n if (entidadJPA.getConciliacion() != null && !Objects.equals(entidadJPA.getConciliacion().getId(), entidad.getIdConciliacion())){\n actualizarConciliacion = true;\n conciliacionpadreactual = padreDAO.find(entidadJPA.getConciliacion().getId());\n }\n //entidadJPA.setConciliacion(entidad.getIdConciliacion() != null ? (entidadPadreJPA != null ? entidadPadreJPA : null) : entidadJPA.getConciliacion());\n managerDAO.edit(entidadJPA);\n if (actualizarConciliacion){\n if ((entidadPadreJPA != null)) {\n entidadPadreJPA.addEscenario(entidadJPA);\n padreDAO.edit(entidadPadreJPA);\n conciliacionpadreactual.removeEscenario(entidadJPA);\n padreDAO.edit(conciliacionpadreactual);\n }\n }\n LogAuditoria logAud = new LogAuditoria(this.modulo, Constantes.Acciones.EDITAR.name(), Date.from(Instant.now()), entidad.getUsername(), entidadJPA.toString());\n logAuditoriaDAO.create(logAud);\n \n ResponseWrapper wraper = new ResponseWrapper(true,I18N.getMessage(\"escenario.update\", entidad.getNombre()) ,entidadJPA.toDTO());\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }\n \n ResponseWrapper wraper = new ResponseWrapper(false,I18N.getMessage(\"escenario.notfound\", entidad.getNombre()));\n \treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n }catch (Exception e) {\n \tif(e.getCause() != null && (e.getCause() instanceof DataAlreadyExistException || e.getCause() instanceof DataNotFoundException)) {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, e.getCause().getMessage(), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}else {\n \t\tlogger.log(Level.SEVERE, e.getMessage(), e);\n \t\tResponseWrapper wraper = new ResponseWrapper(false, I18N.getMessage(\"general.readerror\"), 500);\n \t\treturn Response.ok(wraper,MediaType.APPLICATION_JSON).build();\n \t}\n }\n }", "@RequestMapping(value = \"/renew\", method = RequestMethod.PATCH)\n public void renew(@RequestHeader(\"X-CS-Auth\") String auth,\n @RequestHeader(\"X-CS-Session\") String sessionId) {\n sessionService.renew();\n }", "public BladeController setSessionAttr(String key, Object value) {\n\t\tSession session = getSession();\n\t\tsession.setAttribute(key, value);\n\t\treturn this;\n\t}", "public void setSession(Session session) { this.session = session; }", "private boolean update() {\r\n\t\ttry {\r\n\t\t\tif (_session != null) {\r\n\t\t\t\tlong usrid = _session.getUsrID();\r\n\t\t\t\tJSONObject result = new JSONObject();\r\n\t\t\t\tresult.put(\"usrid\", usrid);\r\n\t\t\t\taddData(result);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tsetError(e);\r\n\t\t}\r\n\t\tsetError(Transaction.NO_SESSION_ERROR);\r\n\t\treturn false;\r\n\t}", "@RestAPI\n \t@PreAuthorize(\"hasAnyRole('A')\")\n \t@RequestMapping(value = \"/api/{id}\", params = \"action=update\", method = RequestMethod.PUT)\n \tpublic HttpEntity<String> update(@PathVariable(\"id\") Long id) {\n \t\tagentManagerService.update(id);\n \t\treturn successJsonHttpEntity();\n \t}", "public ServiceRequest updateServiceRequest(ServiceRequest sr)\r\n {\r\n\t Session session = sessionFactory.getCurrentSession();\r\n\t session.update(sr);\r\n\t return sr;\r\n\t}", "public void setSession(Session session) {\n\tthis.session = session; \r\n}", "public void update(T obj) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.update(obj);\n\t\t\n\t}", "@Override\r\n\tpublic void update(T t) {\n\t\tgetSession().update(t);\r\n\t}", "public Future<CtxModelObject> update(CtxModelObject identifier);", "protected ValidatableResponse updateResource(String path, JSONObject newResource) throws JSONException {\n return given()\n .header(HEADER_AUTHORIZATION, authenticated())\n .contentType(ContentType.JSON)\n .body(newResource.toString())\n .when()\n .put(path)\n .then()\n .statusCode(204);\n }", "public interface HttpSession {\n String getId();\n void setAttribute(String name, Object value);\n Object getAttribute(String name);\n void removeAttribute(String name);\n void invalidate();\n}", "@Override\r\n public long saveOrUpdate(Object model) {\r\n OrmPreconditions.checkForOpenSession(mIsOpen);\r\n OrmPreconditions.checkPersistenceForModify(model, mPersistencePolicy);\r\n mLogger.debug(\"Sending PUT request to save or update entity\");\r\n String uri = mHost + mPersistencePolicy.getRestEndpoint(model.getClass());\r\n Map<String, String> headers = new HashMap<String, String>();\r\n RestfulModelMap modelMap = mMapper.mapModel(model);\r\n if (mRestContext.getMessageType() == MessageType.JSON)\r\n headers.put(\"Content-Type\", \"application/json\");\r\n else if (mRestContext.getMessageType() == MessageType.XML)\r\n headers.put(\"Content-Type\", \"application/xml\");\r\n RestResponse response = mRestClient.executePut(uri, modelMap.toHttpEntity(), headers);\r\n switch (response.getStatusCode()) {\r\n case HttpStatus.SC_CREATED:\r\n return 1;\r\n case HttpStatus.SC_OK:\r\n case HttpStatus.SC_NO_CONTENT:\r\n return 0;\r\n default:\r\n return -1;\r\n }\r\n }", "@Override\n\tpublic void setSession(Map<String, Object> s) {\n\t\tsession = s;\n\t}", "@RequestMapping(value = \"/enquirys\",\n method = RequestMethod.PUT,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> update(@Valid @RequestBody Enquiry enquiry) throws URISyntaxException {\n log.debug(\"REST request to update Enquiry : {}\", enquiry);\n if (enquiry.getId() == null) {\n return create(enquiry);\n }\n enquiryRepository.save(enquiry);\n return ResponseEntity.ok().build();\n }", "public void update(T obj) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n\t\tsession.update(obj);\n\t}", "@Override\n public final void doPut() {\n try {\n checkPermissions(getRequest());\n if (id == null) {\n throw new APIMissingIdException(getRequestURL());\n }\n\n final String inputStream = getInputStream();\n if (inputStream.length() == 0) {\n api.runUpdate(id, new HashMap<String, String>());\n return;\n }\n\n Item.setApplyValidatorMandatoryByDefault(false);\n final IItem item = getJSonStreamAsItem();\n api.runUpdate(id, getAttributesWithDeploysAsJsonString(item));\n } catch (final APIException e) {\n e.setApi(apiName);\n e.setResource(resourceName);\n throw e;\n\n }\n }", "@Override\r\n\tpublic void setSession(Map<String, Object> session) \r\n\t{\n\t\tthis.session = session;\r\n\t}", "@PostMapping\n @ResponseStatus(HttpStatus.CREATED)\n public Session create(@RequestBody final Session session) {\n return sessionRepository.saveAndFlush(session);\n }", "public abstract void setIdSession(String id_session);", "@Override\n\tpublic void updateSession(CacheHttpSession httpSession) {\n\t\t\n\t}", "public void changeSessionId(Session session);", "Patient update(Patient patient);", "@RequestMapping(value = \"/tshirt\", method = RequestMethod.PUT)\n @ResponseStatus(value = HttpStatus.OK)\n public void updateTShirt(@RequestBody @Valid TShirt tShirt) {\n // Get the TShirt from the database\n TShirt tShirtFromDB = serviceLayer.getTShirt(tShirt.getId());\n\n // Update the TShirt if it is found in the database\n if (tShirtFromDB != null) {\n serviceLayer.updateTShirt(tShirt);\n } else {\n throw new IllegalArgumentException(\"There is no T-Shirt with id: \" + tShirt.getId());\n }\n }", "@RequestMapping(value = \"/shopressource\", method = RequestMethod.PUT)\n ShopRessource updateShopRessource(@RequestBody ShopRessource shopRessource);", "@Override\n\tprotected void doUpdate(Session session) {\n\n\t}", "@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session=session;\r\n\t}", "public static void setObject(HttpSession session, String key, Object obj) {\n session.setAttribute(key, obj);\n }", "void setSessionId(String sessionId);", "@RequestMapping(value=\"/update\", method = RequestMethod.PUT)\r\n\t @ResponseBody\r\n//\t public String updateUser(Long id, String userName, String phone, String email, String password, Date dateOfBirth, String userNotes) {\r\n\t public UserDto update(UserDto userDto) \r\n\t {\r\n\t\t return service.update(userDto);\r\n\t }", "@Override\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session=session;\n\t}", "@Override\n\tpublic void updateEntity(T t) {\n\t\tgetSession().update(t);\n\t}", "@PutMapping(\"/products\") \nprivate Products update(@RequestBody Products products) \n{ \nproductsService.saveOrUpdate(products); \nreturn products; \n}", "@Override\n\tpublic void setSession(Map<String, Object> session)\n\t{\n\t\tthis.session = session;\n\n\t}", "@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session = session;\r\n\t}", "@Override\r\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session = session;\r\n\t}", "@Override\n\tpublic void setSession(Map<String, Object> session) {\n\t\tthis.session = session;\n\t}", "@PutMapping\n public ResponseEntity<Track> updateTrack(@Valid @RequestBody Track mySong, @RequestHeader Map<String, String> headers)\n throws RecordNotFoundException, RecordUnauthorizedException{\n if(Utils.apiKey(headers)){\n Track entity = service.updateTrack(mySong);\n \n return new ResponseEntity<Track>(entity, new HttpHeaders(), HttpStatus.OK);\n }else{\n throw new RecordUnauthorizedException(\"API Key ERROR\");\n }\n }", "public SessionResource() {\n }", "private void updateSessionDetailsInDB(GlusterGeoRepSession session) {\n for (GlusterGeoRepSessionDetails sessDetails : session.getSessionDetails()) {\n sessDetails.setSessionId(session.getId());\n }\n getGeoRepDao().saveOrUpdateDetailsInBatch(session.getSessionDetails());\n }", "@Headers({\n \"Content-Type:application/json\"\n })\n @PUT(\"users/{id}\")\n Call<Void> updateUser(\n @retrofit2.http.Path(\"id\") String id, @retrofit2.http.Body UserResource userResource\n );", "Update withIdentity(Identity identity);", "@RequestMapping(method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_VALUE)\n //Request Body is requesting the student parameter\n public void updateStudent(@RequestBody Student student){\n studentService.updateStudent(student);\n }", "public void setSession(Map<String, Object> session) {\n\t\t\n\t}", "@RequestMapping(method = RequestMethod.PUT)\r\n public ResponseObject update(@Validated @RequestBody Candidate candidate) {\r\n return candidateService.update(candidate);\r\n }", "Observable<Session> updateSession(RelyingParty relyingParty, Session session, Map<String, String> additionalUserInfo);", "@POST\n public Response createSession(Session session) throws URISyntaxException {\n log.debug(\"REST request to save Session : {}\", session);\n sessionRepository.create(session);\n return HeaderUtil.createEntityCreationAlert(Response.created(new URI(\"/resources/api/session/\" + session.getId())),\n \"session\", session.getId().toString())\n .entity(session).build();\n }", "@PutMapping(\"/locations\")\n public Location updateLocation(@RequestBody Location location){\n\n service.saveItem(location);\n\n return location;\n }", "public void setCurrentSession(Session session){\n if(currentSession == null){\n currentSession = new MutableLiveData<>();\n }\n Log.i(\"VIewModelSessions\", \"setting current session\");\n currentSession.setValue(session);\n Log.i(\"ViewModelSessions\", \"current session: \"+session.toString());\n }", "public interface SessionRepository extends JpaRepository<VotingSession,Integer>{\n\n\n @Modifying\n @Query(\"UPDATE VotingSession SET active = false\")\n void markAllSessionsInactive();\n\n VotingSession findOneByActiveTrue();\n\n}", "int updateByPrimaryKey(RoleResource record);", "@PutMapping\n public void updateUser(@RequestBody User user) { userService.updateUser(user);}", "@PUT\n @Path(\"/{register_id}\")\n @Consumes(MediaType.APPLICATION_JSON)\n Response update(@Valid @NotNull RegisterDTO registerDto, @PathParam(\"store_id\") Long storeId, @PathParam(\"register_id\") Long registerId);", "public void setSession(Session session) {\r\n this.session = session;\r\n }", "int updateByPrimaryKey(SessionAccountConnectAttrs record);", "@Test\n public void putId() throws Exception {\n Role role = create(new Role(\"roleName\"));\n\n //Change a field of the object that has to be updated\n role.setName(\"roleNameChanged\");\n RESTRole restRole = new RESTRole(role);\n\n //Perform the put request to update the object and check the fields of the returned object\n try {\n mvc.perform(MockMvcRequestBuilders.put(\"/auth/roles/{id}\", UUIDUtil.UUIDToNumberString(role.getUuid()))\n .header(\"Content-Type\", \"application/json\")\n .header(\"Authorization\", authPair[0])\n .header(\"Function\", authPair[1])\n .content(TestUtil.convertObjectToJsonBytes(restRole))\n )\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.name\", equalTo(restRole.getName())));\n } catch (AssertionError e) {\n remove(role.getUuid());\n throw e;\n }\n\n //Test if changes actually went in effect in the database\n try {\n role = get(role.getUuid());\n try {\n assertEquals(\"name field not updated correctly\", \"roleNameChanged\", role.getName());\n } finally {\n //Clean up database for other tests\n remove(role.getUuid());\n }\n } catch (ObjectNotFoundException e) {\n fail(\"Could not retrieve the put object from the actual database\");\n }\n }", "public void saveOrUpdate(SecRole entity);", "@PutMapping(\"/customers\")\n public void updateCustomer(@RequestBody CustomerHibernate theCustomerHibernate) {\n customerService.save(theCustomerHibernate);\n }", "@RequestMapping(value = \"/test\", method = RequestMethod.PUT)\n public void test() {}", "@RequestMapping(value = \"/changeSessionValue\",method = RequestMethod.POST)\n public String changeMethodValue(@ModelAttribute(\"mySessionModel\")MySessionObject sessionObject, HttpSession session){\n //if (sessionObject==null)\n //sessionObject = new MySessionObject();\n //MySessionObject sessionObject = (MySessionObject) session.getAttribute(\"mySession\");\n sessionObject.setCountChanged(sessionObject.getCountChanged()+1);\n //sessionObject.setTitle(title);\n session.setAttribute(\"mySession\",sessionObject);\n return \"redirect:/sessionPage\";\n }", "@RequestMapping(value=\"/infact-record\", method=RequestMethod.PUT)\n\tpublic ResponseEntity<?> update(@RequestBody InfactRecord infactRecord) {\n\t\tinfactRecordServiceImpl.update(infactRecord);\n\t\treturn ResponseEntity.ok().body(\n\t\t\t\t\"infact-record has been updated successfully.\");\n\t}", "@RequestMapping(method=RequestMethod.PUT,\n\t\t\t\t\tconsumes=MediaType.APPLICATION_JSON_VALUE,\n\t\t\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<PetSrvReq> updatePetSrvReq(@Valid @RequestBody PetSrvReq p) {\n\t\t\n\t\tpsService.update(p);\n\t\t\n//\t\tif (p == null) {\n\t\t\t\n//\t\t\tSystem.out.println(\"In PetSrvReqController:updatePetSrvReq() -> conflict updating => .NOT_MODIFIED\");\n//\t\t\treturn new ResponseEntity<PetSrvReq>(p, HttpStatus.NOT_MODIFIED);\n\t\t\t\n//\t\t} else {\n\t\t\t\n\t\t\tSystem.out.println(\"In PetSrvReqController:updatePetSrvReq() -> data was updated\");\n\t\t\tSystem.out.println(p.toString());\n\t\t\treturn new ResponseEntity<PetSrvReq>(p, HttpStatus.OK);\n\t\t\t\n//\t\t}\n\t\t\n\t}", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "@Put\n\tpublic Representation put(Representation entity) {\n\t\tUserInfo userInfo = userInfoProvider.get();\n\t\tif (!userInfo.isSignedIn) {\n\t\t\t// TODO 401\n\t\t\treturn null;\n\t\t}\n\t\tMember member = memberDAO.readByUserId(userInfo.userId);\n\t\tKey theaterKey = Validation\n\t\t\t\t.getValidDSKey((String) getRequestAttributes()\n\t\t\t\t\t\t.get(\"theaterKey\"));\n\n\t\tif (!tmjDAO.memberHasAccessToTheater(\n\t\t\t\tKeyFactory.keyToString(memberDAO.getKey(member)),\n\t\t\t\tKeyFactory.keyToString(theaterKey))) {\n\t\t\t// TODO 401\n\t\t\treturn null;\n\t\t}\n\n\t\tKey locationKey = Validation\n\t\t\t\t.getValidDSKey((String) getRequestAttributes().get(\n\t\t\t\t\t\t\"locationKey\"));\n\n\t\t// check location belongs to given theaterKey\n\t\tif (!KeyFactory.keyToString(locationKey.getParent()).equals(\n\t\t\t\tKeyFactory.keyToString(theaterKey))) {\n\t\t\t// TODO 401\n\t\t\treturn null;\n\t\t}\n\n\t\t// Location locationOld = locationDAO.read(locationKey);\n\n\t\tLocation locationNew = null;\n\n\t\ttry {\n\t\t\tlocationNew = gson.fromJson(entity.getText(), Location.class);\n\t\t} catch (JsonParseException 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\n\t\t// TODO support partial operations\n\n\t\tlocationDAO.update(locationNew, locationKey);\n\n\t\t// TODO return locationNew with key info\n\t\treturn null;\n\t}", "public void setSession(Map<String, Object> session)\r\n\t{\n\t\tthis.session = session;\r\n\t}", "public FamilyTreeServer setSession(Session s) {\n\t\tsession = s;\n\t\treturn this;\n\t}", "@PUT\n\t@Path(\"/\")\n\t@Nonnull\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tExercise update(@Nonnull Exercise exercise);", "E update(IApplicationUser user, ID id, U updateDto);", "public void setAttribute(Session ses, String name, Object value);", "@RolesAllowed(\"admin\")\n @PUT\n @Consumes({\"application/atom+xml\",\n \"application/atom+xml;type=entry\",\n \"application/xml\",\n \"text/xml\"})\n public Response put(Entry entry) {\n\n // Validate the incoming user information independent of the database\n User user = contentHelper.getContentEntity(entry, MediaType.APPLICATION_XML_TYPE, User.class);\n StringBuilder errors = new StringBuilder();\n if ((user.getPassword() == null) || (user.getPassword().length() < 1)) {\n errors.append(\"Missing 'password' property\\r\\n\");\n }\n\n if (errors.length() > 0) {\n return Response.status(400).\n type(\"text/plain\").\n entity(errors.toString()).build();\n }\n\n // Validate conditions that require locking the database\n synchronized (Database.users) {\n\n // Look up the original user information\n User original = Database.users.get(username);\n if (original == null) {\n return Response.status(404).\n type(\"text/plain\").\n entity(\"User '\" + username + \"' does not exist\\r\\n\").\n build();\n }\n\n // Update the original user information\n original.setPassword(user.getPassword());\n original.setUpdated(new Date());\n Database.usersUpdated = new Date();\n return Response.\n ok().\n build();\n\n }\n\n }", "@PutMapping(\"/update\")\n\tpublic Song update(@RequestBody SongDTO songDTO) {\n\t\tSong temp = songService.findById(songDTO.getId());\n\t\tif (temp != null) {\n\t\t\tSystem.out.println(\"Update id: \" + songDTO.getId());\n\t\t\t//so important ^^\n\t\t\ttemp = songService.convert(songDTO);\n\t\t\tsongService.save(temp);\n\t\t\treturn temp;\n\t\t}\n\t\tSystem.out.println(\"Not exsit ID!\");\n\t\treturn temp;\n\t}", "@PutMapping(\"/{id}\")\n @PreAuthorize(\"hasRole('ADMIN') or hasRole('USER')\")\n public ResponseEntity<RecipeDto> update(@Valid @RequestBody RecipeDto recipeDto, @PathVariable(\"id\") int id) {\n return new ResponseEntity<>(RecipeDto.from(recipeService.updateRecipe(id, Recipe.from(recipeDto))), HttpStatus.OK);\n }", "@Override\n\tpublic void update(Users entity) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n \tsession.save(entity);\n\t}", "@RequestMapping(value = \"/twitterUpdateUsername/\", method = RequestMethod.POST)\n\tpublic String twitterUpdateUsername(HttpServletRequest req,\n\t\t\t@RequestParam(value = \"t_username\", defaultValue = \"null\") String t_username) {\n\n\t\tSystem.out.println(\"Updating twitter data!\");\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"Here twitter Update Username: \" + username);\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\tDate date = new Date();\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\trestTemplate.setErrorHandler(new DefaultResponseErrorHandler() {\n\t\t\tprotected boolean hasError(HttpStatus statusCode) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tSocialMediaAccess smaNewCreate = new SocialMediaAccess(username, \"twitter\", \"twitter_username\", t_username,\n\t\t\t\t\"long_live\", dateFormat.format(date));\n\t\tResponseEntity<SocialMediaAccess> smaTwitter = restTemplate.getForEntity(uriReadSM + username + \"/twitter/\",\n\t\t\t\tSocialMediaAccess.class);\n\n\t\tSystem.out.println(\"--------------------------START check in smaTwitter. username: \" + username);\n\t\tif (smaTwitter.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***START. There is smaTwitter in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaTwitter.getBody().getSma_id());\n\t\t\tsmaNewCreate.setSma_id(smaTwitter.getBody().getSma_id());\n\t\t\trestTemplate.put(uriUpdateSMA, smaNewCreate);\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***END. There is smaTwitter in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaTwitter.getBody().getSma_id());\n\t\t} else {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------******START. There is NO smaTwitter in database. need to CREATE.\");\n\t\t\tResponseEntity<SocialMediaAccess> resmaCreated = restTemplate.postForEntity(uriCreateSMA, smaNewCreate,\n\t\t\t\t\tSocialMediaAccess.class);\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------******END. There is NO smaTwitter in database. need to CREATE.\");\n\t\t}\n\t\tSystem.out.println(\"--------------------------END check in smaTwitter\");\n\n\t\t// START getting twitter data\n\t\tSystem.out.println(\"Getting twitter data\");\n\n\t\tResponseEntity<SocialMediaData[]> smDataArr = restTemplate.postForEntity(uriGetTwitterDataWeb, smaNewCreate,\n\t\t\t\tSocialMediaData[].class);\n\t\tSystem.out.println(\"+++START Twitter update data. smdLength: \" + smDataArr.getBody().length);\n\t\t// START storing of twitter data to database\n\t\tfor (SocialMediaData smData : smDataArr.getBody()) {\n\t\t\tResponseEntity<SocialMediaData> oldsmd = restTemplate\n\t\t\t\t\t.getForEntity(uriGetSMDataByID + smData.getData_id() + \"/\", SocialMediaData.class);\n\t\t\tif (oldsmd.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\tSystem.out.println(\"Social Media Data Id = \" + smData.getData_id() + \" exists already\");\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Social Media Data id = \" + smData.getData_id() + \" doesn't exists. Need to create..\");\n\t\t\t\tResponseEntity<SocialMediaData> smD = restTemplate.postForEntity(uriSocialMediaDataCreate, smData,\n\t\t\t\t\t\tSocialMediaData.class);\n\t\t\t}\n\t\t\t/*\n\t\t\t * System.out.println(\"Printing: \" + smData.getData());\n\t\t\t * ResponseEntity<SocialMediaData> smD =\n\t\t\t * restTemplate.postForEntity(uriSocialMediaDataCreate, smData,\n\t\t\t * SocialMediaData.class);\n\t\t\t */\n\t\t}\n\t\tSystem.out.println(\"+++END Updating twitter data+++\");\n\n\t\t// END storing of twitter data to database\n\t\t// END getting twitter data\n\t\tdoAsyncProcessCharacter(username);\n\t\t//\n\t\t// HttpSession session = req.getSession();\n\t\t// String username = (String) session.getAttribute(\"username\");\n\t\t// doAsyncProcessCharacter(username);\n\t\treturn \"redirect:../home\";\n\t}", "abstract ClusterTask getSessionUpdateTask();", "public Customer updateCustomer(@RequestBody Customer theCustomer)\n {\n customerService.save(theCustomer);\n return theCustomer;\n }", "public User updateUser(User user);", "public RequestDataBuilder put() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.PUT);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}", "void setSessionID(java.lang.String sessionID);", "public void crudOperationStudent(){\n //Retrieve Student\n Student student=entityManager.find(Student.class,2L);\n // persistence Context have Student\n //Retrieve Passport\n Passport passport=student.getPassport();\n // persistence Context have Student,passport\n //Update passport number for student\n passport.setPassportNo(\"ZX132322\");\n // persistence Context have Student, updated-passport\n //update Student details\n student.setAge(25);\n // persistence Context have updated-Student, updated-passport\n entityManager.persist(student);\n\n }", "E update(E entity) throws ValidationException;", "@PutMapping(value=\"/ticket/{ticketId}\")\n\tpublic Ticket updateTicket(@RequestBody Ticket ticket,@PathVariable(\"ticketId\") Integer ticketId){\n return ticketBookingService.updateTicket(ticket,ticketId);\t\t\n\t}", "@RequestMapping(value = \"/Reservation\", method = RequestMethod.PUT)\n\t@ResponseBody\n\tpublic Reservation saveReservation(@RequestBody Reservation reservation) {\n\t\treservationService.saveReservation(reservation);\n\t\treturn reservationDAO.findReservationByPrimaryKey(reservation.getReservationId());\n\t}", "public void setSession(Session session) {\n\t\tthis.session = session;\n\t}", "@Override\n public DataObjectResponse<Agenda> handlePUT(DataObjectRequest<Agenda> request)\n {\n return super.handlePUT(request);\n }", "@Put\n public void storeRepresentation(Representation entity)\n throws ResourceException {\n try {\n JaxbRepresentation<Student> jaxbRep =\n new JaxbRepresentation<Student>(entity, Student.class);\n jaxbRep.validate(FileUtils.getSchema(STUDENT_INPUT_SCHEMA_PATH));\n Student updatedStudent = (Student)jaxbRep.getObject();\n dataService.putStudent(student, updatedStudent);\n getResponse().setEntity(\n new JaxbRepresentation(MediaType.TEXT_XML, updatedStudent));\n getResponse().setStatus(Status.SUCCESS_OK);\n } catch (SAXException ex) {\n logger.log(Level.SEVERE, ex.toString(), ex);\n throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, ex);\n } catch (Exception ex) {\n logger.log(Level.SEVERE, ex.toString(), ex);\n throw new ResourceException(Status.SERVER_ERROR_INTERNAL, ex);\n }\n }", "E update(E entity);", "E update(E entity);" ]
[ "0.7482309", "0.5959329", "0.57845265", "0.5723506", "0.56736434", "0.56480575", "0.5563414", "0.55518013", "0.53917325", "0.53904724", "0.5378593", "0.53732556", "0.53570825", "0.5329498", "0.53209466", "0.53021014", "0.5298487", "0.52953416", "0.52930695", "0.52791756", "0.5274805", "0.5269997", "0.52418554", "0.52342916", "0.52062964", "0.5196307", "0.5193791", "0.5191305", "0.51817316", "0.51590157", "0.51584464", "0.515833", "0.51528305", "0.51493853", "0.51295036", "0.5128687", "0.5121531", "0.51212525", "0.51159114", "0.5114181", "0.5107213", "0.5102531", "0.50963527", "0.50953525", "0.5091509", "0.5075895", "0.5074906", "0.506873", "0.506873", "0.5050879", "0.50456613", "0.5045339", "0.50443524", "0.50382113", "0.5028751", "0.50071937", "0.49994496", "0.49977577", "0.49752292", "0.4966701", "0.49561995", "0.4941999", "0.49389103", "0.49243653", "0.49175268", "0.49143636", "0.49087593", "0.49072006", "0.49054134", "0.49026412", "0.4897858", "0.48885423", "0.48811433", "0.48690233", "0.48684365", "0.4860757", "0.48534507", "0.4850159", "0.48456994", "0.48406518", "0.48372507", "0.4836628", "0.48365265", "0.4833038", "0.48285198", "0.48226342", "0.4821121", "0.481966", "0.4815222", "0.48144224", "0.48143345", "0.48045585", "0.48035812", "0.47929698", "0.47922444", "0.47897232", "0.47767156", "0.47755432", "0.4771389", "0.47685006", "0.47685006" ]
0.0
-1
This question is on the trickier side and using hashmap we will use o(n) space but we can do it in o(1) lets see Lets take a list 1>2>3 Lets create copy of the list and attach to the list i.e 1 2 3 null \ / \ / \ / 1 2 3 This way we will be able to resolve random pointers easily for eg we random pointer of 1 is 3 i.e head.random then to set for duplicate list we just have to do head.next.random=head.random.next Finally break the list into two different list keeping in minf duplicate list.next will reach null first
public RandomListNode copyRandomList(RandomListNode head) { RandomListNode curr=head; while(curr!=null) { RandomListNode temp=new RandomListNode(curr.label); temp.next=curr.next; curr.next=temp; curr=curr.next.next; } curr=head; while(curr!=null) { if(curr.random!=null)//Any pointer kept as random can point to null so make sure that we check this scenario to avoid run time error curr.next.random=curr.random.next; curr=curr.next.next; } curr=head; RandomListNode root=head.next; RandomListNode head2=head.next; while(root.next!=null) { curr.next=curr.next.next; curr=curr.next; root.next=root.next.next; root=root.next; } return head2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Node copyRandomList(Node head) {\n\t \n\t Node root = head;\n\t Map<Node, Node> map = new HashMap<>();\n\t \n\t\twhile( root != null ){\n\t\t\tNode newNode = new Node(root.val);\n\t\t\tmap.put( root, newNode );\n\t\t\troot = root.next;\n\t\t}\n\t \n\t\troot = head;\n\t\tNode node = new Node(0);\n\t\tNode ref = node;\n\n\t\tnode.next = ( root != null ) ? map.get( root ) : null;;\n\t\tnode = node.next;\n\t\twhile( root != null ){\n\n\t\t\tNode n1 = ( root.next != null ) ? map.get( root.next ) : null;\n\t\t\tNode n2 = ( root.random != null ) ? map.get( root.random ) : null;\n\t\t\n\t\t\tnode.next = n1;\n\t\t\tnode.random = n2;\n\t\t\n\t\t\troot = root.next;\n\t\t\tnode = node.next;\n\t\t}\n\t\t\n\t\treturn ref.next;\n\t}", "public RandomListNode copyRandomList(RandomListNode head) {\n if (head == null)\n return null;\n RandomListNode root = new RandomListNode(head.label);\n RandomListNode r = root;\n HashMap<RandomListNode, RandomListNode> map = new HashMap<RandomListNode, RandomListNode>();\n map.put(head, root);\n while (head != null) {\n if (head.next != null) {\n if (!map.containsKey(head.next)) {\n RandomListNode next = new RandomListNode(head.next.label);\n map.put(head.next, next);\n r.next = next;\n }\n else\n r.next = map.get(head.next);\n }\n if (head.random != null) {\n if (!map.containsKey(head.random)) {\n RandomListNode random = new RandomListNode(head.random.label);\n map.put(head.random, random);\n r.random = random;\n }\n else\n r.random = map.get(head.random);\n }\n r = r.next;\n head = head.next;\n }\n return root;\n }", "public RandomListNode copyRandomList2(RandomListNode head){\n RandomListNode currP = head;\n \n //copy the node\n while(currP != null){\n RandomListNode tmp = new RandomListNode(currP.label);\n tmp.next = currP.next;\n currP.next = tmp;\n currP = tmp.next;\n }\n \n currP = head;\n //copy the random pointer\n while(currP != null){\n \n if(currP.random != null){\n currP.next.random = currP.random.next; \n }\n \n currP = currP.next.next;\n }\n \n //decouple the list\n RandomListNode safehead = new RandomListNode(0);\n RandomListNode p = safehead;\n currP = head;\n \n while(currP != null){\n p.next = currP.next;\n currP.next = currP.next.next;\n currP = currP.next;\n p = p.next;\n }\n \n return safehead.next;\n }", "public RandomListNode copyRandomListHashMap(RandomListNode head) {\n HashMap<RandomListNode,RandomListNode> connection = new HashMap<RandomListNode,RandomListNode>();\n RandomListNode dummy = new RandomListNode(0);\n RandomListNode first = dummy;\n RandomListNode cur = head;\n \n while(cur!= null){\n RandomListNode copyhead = new RandomListNode(cur.label);\n copyhead.random = cur.random;\n first.next = copyhead;\n connection.put(cur,copyhead); //HashMap content: connection (\"original\", \"copy\")\n first = first.next;\n cur = cur.next;\n }\n cur = dummy.next;\n while(cur != null){ //now, cur is the copy list, but it's .random is still belong to the original list:see row 19 and 20\n cur.random = connection.get(cur.random); //so we could use that as Key to search\n cur = cur.next;\n }\n return dummy.next;\n }", "public static Node copyRandomList2(Node head) {\n\n\t\t//setting up duplicate nodes in between\n\t\tif (head == null) return head;\n\t\tNode curr = head;\n\t\twhile (curr != null) {\n\t\t\tNode node = new Node(curr.val);\n\t\t\tNode next = curr.next;\n\t\t\tcurr.next = node;\n\t\t\tnode.next = next;\n\t\t\tcurr = next;\n\t\t}\n\n\t\t//setting up random for duplicates\n\t\tNode p = head;\n\t\twhile (p != null) {\n\t\t\tcurr = p.next;\n\t\t\tcurr.random = p.random == null ? null : p.random.next;\n\t\t\tp = curr.next;\n\t\t}\n\n\t\t//removing the duplicate list of nodes from the modified\n\t\tNode res = new Node(-1), prev = res;\n\t\tp = head;\n\t\twhile (p != null) {\n\t\t\tcurr = p.next;\n\t\t\tprev.next = curr;\n\t\t\tprev = curr;\n\t\t\tp.next = p.next.next;\n\t\t\tp = p.next;\n\t\t}\n\t\treturn res.next;\n\t}", "public RandomListNode copyRandomList(RandomListNode head) {\r\n if (head == null) {\r\n return null;\r\n }\r\n \r\n Map<RandomListNode, RandomListNode> map = new HashMap<RandomListNode, RandomListNode>();\r\n\r\n RandomListNode cur = head;\r\n while(cur != null) {\r\n map.put(cur, new RandomListNode(cur.label));\r\n cur = cur.next;\r\n }\r\n \r\n for (Map.Entry<RandomListNode, RandomListNode> entry : map.entrySet()) {\r\n final RandomListNode newNode = entry.getValue();\r\n newNode.next = map.get(entry.getKey().next);\r\n newNode.random = (entry.getKey().random == null) ? null : map.get(entry.getKey().random);\r\n }\r\n \r\n return map.get(head);\r\n }", "public RandomListNode copyRandomList1(RandomListNode head) {\n HashMap<RandomListNode, RandomListNode> cpyNode = new HashMap<>();\n\n RandomListNode dummy1 = head, dummy2 = head;\n // phase 1: copy node\n while (dummy1 != null) {\n cpyNode.put(dummy1, new RandomListNode(dummy1.label));\n dummy1 = dummy1.next;\n }\n\n // phase 2: copy link\n while (dummy2 != null) {\n cpyNode.get(dummy2).next = cpyNode.get(dummy2.next);\n cpyNode.get(dummy2).random = cpyNode.get(dummy2.random);\n dummy2 = dummy2.next;\n }\n\n return cpyNode.get(head);\n }", "public RandomListNode copyRandomList(RandomListNode head) {\n if (head == null)\n return null;\n\n RandomListNode dummy = new RandomListNode(0);\n\n RandomListNode cur = dummy; // points to new list\n\n Map<RandomListNode, RandomListNode> map = new HashMap<>();\n\n while (head != null) {\n // copy the current node\n if (!map.containsKey(head))\n map.put(head, new RandomListNode(head.label));\n\n // connect the copied node to the deep copy list\n cur.next = map.get(head);\n\n // copy the random node that it points to\n if (head.random != null) {\n // if this node haven't been copied, copy this node first\n if (!map.containsKey(head.random)) {\n map.put(head.random, new RandomListNode(head.random.label));\n }\n // connect the copied node to the random pointer\n cur.next.random = map.get(head.random);\n }\n head = head.next;\n cur = cur.next;\n }\n return dummy.next;\n }", "public Node copyRandomList(Node head) {\n if (head == null) {\n return null;\n }\n\n LinkedList<Node> nodes = new LinkedList<>();\n Node p = head;\n while (p != null) {\n nodes.add(p);\n p = p.next;\n }\n Node[] arr = nodes.toArray(new Node[]{});\n\n Map<Node, Integer> refToIdxMap = new HashMap<>();\n for (int i = 0; i < arr.length; i++) {\n Node node = arr[i];\n refToIdxMap.put(node, i);\n }\n\n Map<Integer, Integer> idxMap = new HashMap<>();\n for (int i = 0; i < arr.length; i++) {\n Node ref = arr[i].random;\n if (ref != null) {\n Integer randomNodeIdx = refToIdxMap.get(ref);\n idxMap.put(i, randomNodeIdx);\n }\n }\n\n Node newHead = null;\n Node prev = null;\n for (int i = 0; i < arr.length; i++) {\n Node curr = new Node(arr[i].val);\n if (prev == null) {\n newHead = curr;\n } else {\n prev.next = curr;\n }\n prev = curr;\n arr[i] = curr;\n }\n idxMap.forEach((i, j) -> arr[i].random = arr[j]);\n return newHead;\n }", "private void copyRandom(RandomListNode head) {\n while (head != null) {\n // if (head.random.next != null) {\n if (head.next.random != null) { // test case; -1-> null, [null]\n head.next.random = head.random.next;\n }\n head = head.next.next;\n }\n }", "public RandomListNode copyRandomList(RandomListNode head) {\n RandomListNode cur = head;\n while(cur!=null){\n RandomListNode copyhead = new RandomListNode(cur.label);\n copyhead.next = cur.next;\n cur.next = copyhead;\n cur = copyhead.next;\n }\n \n //copy pointer\n cur = head;\n while(cur != null){\n RandomListNode copynode = cur.next;\n if(cur.random != null){\n copynode.random = cur.random.next;\n }\n cur = copynode.next;\n }\n \n //decouple them\n cur = head;\n RandomListNode dummy = head == null? null:head.next;\n while(cur != null){\n RandomListNode temp = cur.next;\n cur.next = temp.next;\n if(temp.next!=null) temp.next = temp.next.next;\n cur = cur.next;\n }\n return dummy;\n }", "public RandomListNode copyRandomList(RandomListNode head) {\n if (head == null) return null;\n\n // replicate next nodes\n RandomListNode p = head;\n while (p != null) {\n RandomListNode copy = new RandomListNode(p.label);\n copy.next = p.next;\n p.next = copy;\n p = copy.next;\n }\n\n // replicate random nodes\n p = head;\n while (p != null) {\n RandomListNode copy = p.next;\n if (p.random != null) copy.random = p.random.next;\n p = copy.next;\n }\n\n // decouple two lists\n p = head;\n RandomListNode newHead = head.next;\n while (p != null) {\n RandomListNode copy = p.next;\n p.next = copy.next;\n if (copy.next != null) copy.next = copy.next.next;\n p = p.next;\n }\n return newHead;\n }", "private static DoublyLinkedListNode copyList(DoublyLinkedListNode head)\n {\n Map<Integer, DoublyLinkedListNode> prev = new HashMap<>();\n //Save given list head\n DoublyLinkedListNode origHead = head;\n //start building the new list with next pointers, at each step save the newly created node\n DoublyLinkedListNode newHead = null;\n if (head != null) {\n newHead = new DoublyLinkedListNode(head.getValue(), null, null);\n prev.put(newHead.getValue(), newHead);\n head = head.getNext();\n }\n\n DoublyLinkedListNode temp = newHead;\n while (head != null) {\n DoublyLinkedListNode node = new DoublyLinkedListNode(head.getValue(), null, null);\n prev.put(node.getValue(), node);\n temp.setNext(node);\n temp = node;\n head = head.getNext();\n }\n\n //Now traverse the original list, get the key of prev node and look in the map for corresponding new Node\n //update previous\n temp = newHead;\n while (origHead != null) {\n DoublyLinkedListNode prevNode = prev.get(origHead.getPrev().getValue());\n temp.setPrev(prevNode);\n origHead = origHead.getNext();\n temp = temp.getNext();\n }\n return newHead;\n }", "public Node clone01(Node head) {\n Map<Node, Node> map = new HashMap<>();\n\n Node originNode = head, cloneNode = null;\n\n while (originNode != null) {\n cloneNode = new Node(originNode.data);\n\n map.put(originNode, cloneNode);\n originNode = originNode.next;\n }\n\n originNode = head;\n while (originNode != null) {\n cloneNode = map.get(originNode);\n cloneNode.next = map.get(originNode.next);\n cloneNode.random = map.get(originNode.random);\n\n originNode = originNode.next;\n }\n\n return map.get(head);\n }", "public static void main(String[] args){\n LinkedList<Integer> linkedList = new LinkedList<>();\n linkedList.add(0);\n linkedList.add(3);\n linkedList.add(5);\n linkedList.add(7);\n linkedList.add(6);\n linkedList.add(77);\n linkedList.add(2);\n linkedList.add(1);\n for (int i=0;i<linkedList.size();i++){\n System.out.println(linkedList.get(i));\n }\n\n\n// LinkedHashMap<Integer,Integer> map = new LinkedHashMap<>(0,0.75f,false);\n// map.put(0,0);\n// map.put(1,1);\n// map.put(2,2);\n// map.put(3,3);\n// map.put(4,4);\n// map.put(5,5);\n// map.put(6,6);\n// map.put(7,7);\n//\n// map.get(1);\n// map.get(2);\n//\n// for (Map.Entry<Integer,Integer> entry : map.entrySet()){\n// System.out.println(entry.getKey()+\":-----value:\"+entry.getValue());\n// }\n\n //---------------------最近最少次序------true-------\n// 0:-----value:0\n// 3:-----value:3\n// 4:-----value:4\n// 5:-----value:5\n// 6:-----value:6\n// 7:-----value:7\n// 1:-----value:1\n// 2:-----value:2\n\n //--------------------插入顺序-------------false------------\n// 0:-----value:0\n// 1:-----value:1\n// 2:-----value:2\n// 3:-----value:3\n// 4:-----value:4\n// 5:-----value:5\n// 6:-----value:6\n// 7:-----value:7\n\n }", "public static ListNode deleteDuplicates(ListNode head) {\n\n if(head == null || head.next == null)\n return head;\n\n ListNode fakehead = new ListNode(0);\n fakehead.next = head;\n ListNode p1 = fakehead;\n ListNode p2 = head;\n\n while(p2 != null && p2.next != null){\n if(p2.val != p2.next.val){\n p1 = p1.next;\n p2 = p2.next;\n }\n else{\n while(p2 != null && p2.next != null && p2.val == p2.next.val){\n p2 = p2.next;\n }\n p2 = p2.next;\n p1.next = p2;\n }\n }\n\n return fakehead.next;\n }", "public ListNode deleteDuplicates2(ListNode head) {\n if (head == null || head.next == null) {\n return head;\n }\n // 0 - 1 - 2 - 3 - 3 - null\n // s\n //. 2 - 3 - 3 - null\n // f\n ListNode slow = head;\n ListNode fast = slow.next;\n while (fast != null) {\n if (slow.val != fast.val) {\n slow = slow.next;\n } else {\n slow.next = fast.next;\n }\n fast = fast.next;\n }\n return head;\n }", "public static void removeDuplicatesWithoutBuffer(LinkedList list)\n\t{\n\t\t//**Needs only two pointers**//\n\t\tNode current = list.getHead();\n\t\twhile(current != null && current.getNext() != null)\n\t\t{\n\t\t\tNode temp = current;\n\t\t\twhile(temp.getNext() != null)\n\t\t\t{\n\t\t\t\tif(current.getData() == temp.getNext().getData())\n\t\t\t\t{\n\t\t\t\t\ttemp.setNext(temp.getNext());\n\t\t\t\t\ttemp.setNext(temp.getNext().getNext());;\n\t\t\t\t} \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttemp = temp.getNext();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t}", "private void removeDuplicates() {\n ListNode current = head;\n while (current != null && current.next != null) {\n if (current.data == current.next.data) {\n current.next = current.next.next;\n } else {\n current = current.next;\n }\n }\n }", "public static void removeDuplicatesWithBuffer(LinkedList list)\n\t{\n\t\tHashSet<Integer> unique = new HashSet<Integer>();\n\t\tNode current = list.getHead(), prev = null;\n\t\twhile(current != null)\n\t\t{\n\t\t\tif(!unique.add(current.getData()))\n\t\t\t{\n\t\t\t\t//**Do not move the previous node to current if there is a duplicate**//\n\t\t\t\tprev.setNext(current.getNext());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprev = current;\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t}", "private static ListNode removeDuplicates(ListNode head) {\n\n if (head == null)\n return head;\n\n // Initialize result node\n ListNode result = new ListNode(0);\n\n // Assuming that, if LinkedList has no duplicates\n result.next = head;\n\n //Iterate curr and next values.\n ListNode curr = result;\n ListNode next = result.next;\n\n boolean isDupFound = false;\n while (next != null) {\n\n //if next value is same as curr value. don't update current\n if (next.next != null && next.val == next.next.val) {\n isDupFound = true;\n }\n else if(isDupFound){\n curr.next = next.next;\n isDupFound = false;\n }\n else {\n curr = curr.next;\n }\n next = next.next;\n\n }\n return result.next;\n }", "public void solution2(LinkedListNode head){\n if(head==null)\n return;\n LinkedListNode current=head;\n while(current!=null){\n LinkedListNode runner=current;\n while(runner.next!=null){\n if(runner.next.data==current.data)\n runner.next=runner.next.next;\n else\n runner=runner.next;\n }\n current=current.next;\n }\n }", "public static ListNode deleteDuplicates(ListNode head) {\n \tif(head == null) return null;\n ListNode nd = head;\n HashSet hs = new HashSet();\n hs.add(nd.val);\n while(nd.next!=null){\n \tif(! hs.add(nd.next.val)){\n \t\tnd.next = nd.next.next;\n \t}\n \telse\n \t\tnd = nd.next;\n }\n return head;\n \n }", "public static void removeDuplicateSample() {\n Node ll1 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll2 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(4, null)))));\n Node ll3 = new Node(1, new Node(1, new Node(3, new Node(4, new Node(5, null)))));\n Node ll4 = new Node(1, new Node(1, new Node(1, new Node(4, new Node(5, null)))));\n\n System.out.println(\"1===\");\n ll1.printList();\n ll1 = ll1.removeDuplicate();\n ll1.printList();\n\n System.out.println(\"2===\");\n ll2.printList();\n ll2 = ll2.removeDuplicate();\n ll2.printList();\n\n System.out.println(\"3===\");\n ll3.printList();\n ll3 = ll3.removeDuplicate();\n ll3.printList();\n\n System.out.println(\"4===\");\n ll4.printList();\n ll4 = ll4.removeDuplicate();\n ll4.printList();\n\n }", "public ListNode swapPairs(ListNode head) {\n if(head == null)\n return head;\n \n \n int count = 0;\n ListNode h = head;\n ListNode end = head;\n ListNode preH = null;\n\n // we prefer to track a linked list using a head and a tail\n ListNode newHead = null;\n ListNode newTail = null;\n \n while(end != null)\n {\n count = 0;\n while(count < 2 && end != null)\n {\n count++;\n end = end.next;\n }\n \n if(count == 2)\n {\n ListNode temp = helper(preH, h, end);\n if(newHead == null)\n {\n newHead = temp;\n newTail = h;\n }else\n {\n newTail.next = temp; //link to the existing linked list\n }\n \n newTail = h; // !!! update tail pointer\n h = end;\n \n }\n if(count < 2 && end == null)\n {\n break;\n }\n \n /*\n if(count == 2 && end == null)\n {\n ListNode temp = helper(preH, h, end);\n if(newHead == null)\n {\n newHead = temp;\n newTail = h;\n }else\n {\n newTail.next = temp;\n \n }\n \n newTail = h; \n h = end;\n }\n */\n }\n \n if(newHead != null)\n return newHead;\n return head;\n }", "public ListNode deleteDuplicates(ListNode head) {\n ListNode newhead = new ListNode(0);\n ListNode curr=head;\n ListNode prev = newhead;\n newhead.next = curr;\n if(curr==null) return null;\n while(curr!=null && curr.next!=null){\n ListNode next = curr.next;\n if(next.val == curr.val){\n while(next!=null && next.val == curr.val){\n next = next.next;\n }\n prev.next = next;\n }\n else{\n prev = curr;\n }\n curr = next;\n \n }\n return newhead.next;\n }", "public void removeDuplicate(Node head){\r\n\t\tMap<Integer, Boolean> buffer = new HashMap<Integer, Boolean>();\r\n\t\tNode previous = null;\r\n\t\twhile(head != null){\r\n\t\t\tif(buffer.get(head.data)){\r\n\t\t\t\tprevious.next = head.next;\r\n\t\t\t}else{\r\n\t\t\t\tprevious = head;\r\n\t\t\t\tbuffer.put(head.data, true);\r\n\t\t\t}\r\n\t\t\thead = head.next;\r\n\t\t}\r\n\t}", "public static ListNode mockIntersectionList(ListNode head) {\n\t\tListNode head3 = null;\n\t\thead3 = insertAtEnd(head3, 9);\n\t\thead3 = insertAtEnd(head3, 10);\n\t\thead3 = insertAtEnd(head3, 12);\n\t\tListNode temp = head3;\n\t\twhile (temp.next != null)\n\t\t\ttemp = temp.next;\n\t\ttemp.next = head.next.next;\n\t\treturn head3;\n\t}", "private static void removeDuplicates(Node head) {\n if (head == null)\n return;\n\n Node current = head;\n while (current != null) {\n Node runner = current;\n while (runner.next != null) {\n if (runner.next.value == current.value)\n runner.next = runner.next.next;\n else\n runner = runner.next;\n }\n current = current.next;\n }\n }", "public ListNode deleteDuplicates(ListNode head) {\n if(head==null) return null;\n ListNode p=head,q=head.next,r=new ListNode(-1);\n r.next=head;\n head=r;\n int count=1;\n while(q!=null)\n {\n if(p.val==q.val){\n q=q.next;\n count++;\n }\n else{\n if(count>=2){\n r.next=q;\n p=q;\n q=q.next;\n count=1;\n }\n else{\n r=r.next;\n p=q;\n q=q.next;\n }\n }\n }\n if(count>=2) r.next=q;\n return head.next;\n }", "public ListNode deleteDuplicates(ListNode head) {\n if (head == null || head.next == null) {\n return head;\n }\n ListNode pointer1 = head;\n ListNode pointer2 = head.next;\n while (pointer2 != null) {\n while (pointer2 != null && pointer2.val == pointer1.val) {\n pointer2 = pointer2.next;\n }\n pointer1.next = pointer2;\n pointer1 = pointer2;\n if (pointer2 != null) {\n pointer2 = pointer2.next;\n }\n }\n return head;\n }", "public Node removeDuplicates(Node head) \n {\n // Your code here\n HashSet<Integer>hs = new HashSet<>();\n Node curr=head;\n Node prev=null;\n while(curr!=null){\n if(hs.contains(curr.data)){\n prev.next = curr.next;\n }else{\n hs.add(curr.data);\n prev = curr;\n }\n curr = curr.next;\n }\n return head;\n }", "private void copyNext(RandomListNode head) {\n while (head != null) {\n RandomListNode newNode = new RandomListNode(head.label);\n newNode.next = head.next;\n newNode.random = head.random; // MUST have, used in copyRandom's condition\n head.next = newNode;\n head = head.next.next;\n }\n }", "public static ListNode deleteDuplicates(ListNode head) {\n if(head == null || head.next == null) return head;\n boolean flag = false;\n if(head.next!=null && head.val == head.next.val) flag = true;\n int ahead = head.val;\n ListNode ptr = head.next;\n ListNode new_head = new ListNode(head.val);\n ListNode cur = new_head;\n while(ptr != null) {\n if(ptr.val != ahead) {\n if(ptr.next == null || ptr.next.val != ptr.val) {\n cur.next = new ListNode(ptr.val);\n cur = cur.next;\n }\n ahead = ptr.val;\n }\n ptr = ptr.next;\n }\n if(flag) return new_head.next;\n return new_head;\n }", "public static ListNode swapPairs(ListNode head) {\n\t\t ListNode dummy = new ListNode(-1);\n\t\t dummy.next = head;\n\t\t \n\t\t // move 3 pointer together until all or two of them are null\n\t\t ListNode p1 = dummy;\n\t\t ListNode p2 = p1 != null ? p1.next : null;\n\t\t ListNode p3 = p2 != null? p2.next: null;\n\t\t \n\t\t while(p2 != null && p3 != null) {\n\t\t\t //swap p2 & p3\n\t\t\t p1.next = p3;\n\t\t\t p2.next = p3.next;\n\t\t\t p3.next = p2;\n\t\t\t \n\t\t\t // p1 moves two steps forward\n\t\t\t p1 = p1.next;\n\t\t\t p1 = p1 != null ? p1.next : null;\n\t\t\t p2 = p1 != null ? p1.next : null;\n\t\t\t p3 = p2 != null? p2.next: null;\n\t\t }\n\t\t \n\t\t return dummy.next;\n\t }", "public static ListNode deleteDuplicates(ListNode head) {\n HashSet<Integer> allVals = new HashSet<Integer>();\n \tListNode temp = head;\n \tListNode before = head;\n \tListNode next = head;\n \twhile(temp!=null){\n \t\tif(allVals.contains(temp.val)){\n \t\t\tbefore.next = next; // delete current node \n \t\t\tif(next == null ) return head;\n \t\t\ttemp = next;\n \t\t\tnext = temp.next;\n \t\t}else{\n \t\t\t\n \t\t\tallVals.add(temp.val);\n \t\t\tbefore = temp;\n \t\ttemp = next;\n \t\tif(temp == null ) return head;\n \t\tnext =next.next;\n \t\t}\n\n \t\t\n \t}\n \treturn head;\n }", "public Node clone02(Node head) {\n Node originNode = head, tmp = null;\n\n while (originNode != null) {\n tmp = originNode.next;\n originNode.next = new Node(originNode.data);\n originNode.next.next = tmp;\n originNode = tmp;\n }\n\n originNode = head;\n while (originNode != null) {\n originNode.next.random = originNode.random.next;\n originNode = originNode.next != null ? originNode.next.next : originNode.next;\n }\n\n originNode = head;\n tmp = head.next;\n Node cloneNode = tmp;\n\n while (originNode != null) {\n originNode.next = originNode.next != null ? originNode.next.next : originNode.next;\n originNode = originNode.next;\n\n tmp.next = tmp.next != null ? tmp.next.next : tmp.next;\n tmp = tmp.next;\n }\n\n return cloneNode;\n }", "public ListNode deleteDuplicates(ListNode head) {\n if (head == null || head.next == null)\n return head;\n Set<Integer> hs = new HashSet();\n ListNode temp = head;\n ListNode prev = head;\n \n while (temp != null) {\n if (!hs.contains(temp.val)) {\n hs.add(temp.val);\n prev = temp;\n } else {\n prev.next = temp.next;\n }\n temp = temp.next;\n }\n return head;\n }", "public ListNode LCdeleteDuplicates(ListNode head) {\n // use two pointers, slow - track the node before the dup nodes,\n \t// fast - to find the last node of dups.\n\n // Raz:\n // the idea is really hard to think of\n // just add the fast.next to slow first.\n // if the fast is duplicate, then remove it, change the slow.next to now fast.next\n // not easy enough as the solution above I think.\n\n ListNode dummy = new ListNode(0), fast = head, slow = dummy;\n slow.next = fast;\n while(fast != null) {\n \twhile (fast.next != null && fast.val == fast.next.val) {\n \t\tfast = fast.next; //while loop to find the last node of the dups.\n \t}\n \tif (slow.next != fast) { //duplicates detected.\n \t\tslow.next = fast.next; //remove the dups.\n \t\tfast = fast.next; //reposition the fast pointer.\n \t} else { //no dup, move down both pointer.\n \t\tslow = slow.next;\n \t\tfast = fast.next;\n \t}\n }\n return dummy.next;\n }", "private static void shuffleJoinSwapAndcloneLinkedList() {\n\t\tLinkedList<Integer> list = new LinkedList<Integer>();\n\t\tlist.add(10);\n\t\tlist.add(20);\n\t\tlist.add(30);\n\t\tlist.add(40);\n\t\tlist.add(50);\n\t\tSystem.out.println(\"LinkedList is : \" + list);\n\n\t\tLinkedList<Integer> list1 = new LinkedList<Integer>();\n\t\tlist.add(60);\n\t\tlist.add(70);\n\t\tlist.add(80);\n\t\tlist.add(90);\n\t\tlist.add(100);\n\t\tSystem.out.println(\"LinkedList is : \" + list1);\n\n\t\t// clone the LinkedList\n\t\tSystem.out.println(\"shuffle the element in the LinkedList \" + list);\n\n\t\t// Shuffle all numbers in LinkedList\n\t\tCollections.shuffle(list);\n\t\tSystem.out.println(\"shuffle the element in the LinkedList \" + list);\n\n\t\t// swap two numbers in LinkedList\n\t\tCollections.swap(list, 01, 04);\n\t\tSystem.out.println(\"Swapping the element in the LinkedList \" + list);\n\n\t}", "public void rehash() {\n\t\tArrayList<Node<MapPair<K, V>>> temp=buckets;\n\t\tbuckets=new ArrayList<>();\n\t\tfor(int i=0;i<2*temp.size();i++)\n\t\t{\n\t\t\tbuckets.add(null);\n\t\t}\n\t\tfor(Node<MapPair<K, V>> node:temp)\n\t\t{\n\t\t\tif(node!=null)\n\t\t\t{\n\t\t\t\twhile(node!=null)\n\t\t\t\t{\n\t\t\t\t\tput(node.data.key,node.data.value);\n\t\t\t\t\tnode=node.next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void removeDuplicates(){\n HashSet<Object> elements = new HashSet<>();\n Node n = head;\n int i=0;\n while(n!=null){\n if(elements.contains(n.getData())){\n if (size == 1) {\n this.head.setData(null);\n } else {\n if (n == this.head) {\n this.head = n.next;\n this.head.prev = this.head;\n } else if (n == this.tail) {\n this.tail = n.prev;\n this.tail.next = this.tail;\n } else {\n n.prev.next = n.next;\n n.next.prev = n.prev;\n }\n }\n size--;\n }else{\n elements.add(n.getData());\n }\n n=n.next;\n }\n }", "public ListNode deleteDuplicates(ListNode head) {\n HashSet<Integer> set = new HashSet<>();\n ListNode node = head;\n ListNode before = null;\n while (head != null) {\n if (set.contains(head.val)) {\n if (head.next != null) {\n head.next = head.next.next;\n } else {\n before.next = null;\n head = null;\n }\n } else {\n set.add(head.val);\n before = head;\n head = head.next;\n }\n }\n return node;\n }", "public ListNode deleteDuplicates(ListNode head) {\n if (head == null)\n return null;\n ListNode itr = head;\n while (itr != null && itr.next != null) {\n ListNode ahead = itr;\n while (ahead.next != null && ahead.next.val == ahead.val)\n ahead = ahead.next;\n itr.next = ahead.next;\n itr = itr.next;\n }\n return head;\n }", "public static void main(String[] args) {\n LinkRemoveDuplicates2 ll=new LinkRemoveDuplicates2();\r\n\r\n ll.insertFirst(40);\r\n\r\n ll.insertFirst(30);\r\n \r\n ll.insertFirst(20);\r\n ll.insertFirst(20);\r\n ll.insertFirst(10);\r\n ll.insertFirst(10);\r\n System.out.println(\"Initial List->\");\r\n ll.printList();\r\n ll.head=ll.remove(ll.head);\r\n System.out.println(\"\\n\\nAfter removing duplicates->\");\r\n ll.printList();\r\n\t}", "public static void removeDups (Node head){\n\n Node i = head;\n Node j;\n Node previous;\n\n while (i != null) {\n previous = i;\n j = i.next;\n while (j != null) {\n if (i.val == j.val){\n previous.next = j.next;\n } else {\n previous = j;\n }\n j = j.next;\n }\n\n i = i.next;\n }\n }", "public ListNode mergeKLists(ListNode[] lists) {\n PriorityQueue<Integer> minHeap = new PriorityQueue<Integer>();\n //Iterate over the list\n for(ListNode head: lists)\n {\n //as long as head not null\n while(head!=null)\n {\n //add the value at the head to min heap\n minHeap.add(head.val);\n //move to next head\n head=head.next;\n }\n }\n //Make a dummy ListNode\n ListNode dummy = new ListNode(-1);\n //make head to dummy\n ListNode head = dummy;\n while(!minHeap.isEmpty())\n {\n //adding the values to the new dummy list\n head.next = new ListNode(minHeap.remove());\n head = head.next;\n }\n //Return the dummy list which is our result\n return dummy.next;\n }", "public ListNode loopDetection1(ListNode head) {\r\n\r\n if (head == null || head.next == null) return null;\r\n\r\n ListNode curr = head;\r\n HashSet<ListNode> list = new HashSet<ListNode>();\r\n\r\n while (curr.next != null) {\r\n if (list.contains(curr)) return curr;\r\n\r\n list.add(curr);\r\n curr = curr.next;\r\n }\r\n\r\n return null;\r\n\r\n }", "public ListNode mergeKLists(ListNode[] lists) {\n LinkedList<Integer> a= new LinkedList<Integer>();\n \n for(int i=0;i<lists.length;i++) {\n ListNode temp = lists[i];\n \n while(temp!=null) {\n // System.out.println(temp.val);\n a.add(temp.val);\n temp=temp.next;\n }\n }\n Collections.sort(a);\n //copy all the elements into ListNode linked list.\n if(a.size()==0) { return null; }\n ListNode head = new ListNode(a.get(0));\n ListNode res = head;\n if(head== null) {\n head = new ListNode(a.get(0));\n }\n for(int j=1;j<a.size();j++) {\n \n res.next = new ListNode(a.get(j));\n res=res.next;\n \n }\n res=head;\n \n return res;\n \n \n \n \n }", "public static ListNode mockLoopList(ListNode head) {\n\t\tif (head != null) {\n\t\t\tListNode temp1 = head;\n\t\t\tListNode temp2 = head.next.next;\n\t\t\twhile (temp1.next != null)\n\t\t\t\ttemp1 = temp1.next;\n\t\t\ttemp1.next = temp2;\n\t\t}\n\t\treturn head;\n\t}", "public ListNode swapPairs(ListNode head) {\n if (head == null || head.next == null) {\n return head;\n }\n ListNode dummy = new ListNode(0);\n ListNode l1 = dummy;\n ListNode l2 = head;\n while (l2 != null && l2.next != null) {\n ListNode nextStart = l2.next.next;\n l1.next = l2.next;\n l2.next.next = l2;\n l2.next = nextStart;\n l1 = l2;\n l2 = nextStart;\n }\n return dummy.next;\n }", "Node removeDuplicates(Node head)\n {\n \tNode cur = head;\n \tNode next = null;\n \twhile(cur.next!=null ){\n \t if(cur.data == cur.next.data){\n \t next = cur.next.next;\n \t cur.next = next;\n \t }else cur = cur.next;\n \t}return head;\n }", "private void rehash() {\r\n\t\tSystem.out.println( \"rehashing : buckets \" + numBuckets + \" size \" + size );\r\n\t\tArrayList<MapNode<K, V>> temp = buckets;\r\n\t\tbuckets = new ArrayList();\r\n\t\tfor( int i = 0; i < 2*numBuckets; i++ ) {\r\n\t\t\tbuckets.add( null );\r\n\t\t}\r\n\t\tsize = 0; //size 0 means abi ek b element nhi h\r\n\t\tnumBuckets *= 2; //ab number of buckets double ho gya h\r\n\t\t//now we will trvrs old arraylist and linkedlist and\r\n\t\t//copy is elemenet one by one\r\n\t\tfor( int i = 0; i < temp.size(); i++ ) {\r\n\t\t\tMapNode< K, V > head = temp.get(i);\r\n\t\t\twhile( head != null ) {\r\n\t\t\t\t\r\n\t\t\t\tK key = head.key;\r\n\t\t\t\tV value = head.value;\r\n\t\t\t\tinsert( key, value );\r\n\t\t\t\thead = head.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public ListNode deleteDuplicates(ListNode head) {\n ListNode curr=head;\n if(curr==null) return null;\n while(curr!=null && curr.next!=null){\n ListNode next = curr.next;\n if(curr.next.val == curr.val){\n curr.next = curr.next.next;\n continue;\n }\n curr = next;\n }\n return head;\n }", "private ListNode deleteReplicateNode(ListNode head) {\n\n if (head == null || head.next == null) {\n System.out.println(\"Head is null or there is only one node\");\n return head;\n }\n\n ListNode preNode = null;\n ListNode node = head;\n while (node != null) {\n\n ListNode nextNode = node.next;\n boolean deleteFlag = false;\n if (nextNode != null && node.val == nextNode.val) {\n deleteFlag = true;\n }\n\n if (!deleteFlag) {\n preNode = node;\n } else {\n int value = node.val;\n ListNode toBeDeleted = node;\n\n while (toBeDeleted != null && toBeDeleted.val == value) {\n nextNode = toBeDeleted.next;\n\n toBeDeleted.next = null;\n\n toBeDeleted = nextNode;\n }\n\n // when old head node is duplicated, we need to assign the new head.\n if (preNode == null) {\n head = nextNode;\n } else {\n // use preNode to connect these non-duplicate nodes.\n preNode.next = nextNode;\n }\n }\n\n node = nextNode;\n }\n\n return head;\n }", "public int getRandom() {\n ListNode curr = head2;\n int r = rand.nextInt(size);\n for (int i=0; i<r; i++) {\n if (curr!= null){\n curr = curr.next;\n }\n }\n return curr.val;\n }", "public Node removeDups(Node head) {\n if (head != null) {\n Node current = head;\n Set<Integer> set = new HashSet<>();\n set.add(current.data);//IMP step\n\n while (current.next != null) {\n if (set.contains(current.next.data)) {\n //found the dup, leave it out\n current.next = current.next.next;\n } else {\n set.add(current.data);\n current = current.next;\n }\n }\n }\n return head;\n }", "public void removeDuplicates() {\n if (head == null) {\n return;\n }\n Node currentNode = this.head;\n Node nextNode = this.head.next;\n while (nextNode != null) {\n if (currentNode.data == nextNode.data) {\n currentNode.next = nextNode.next;\n nextNode = nextNode.next;\n } else {\n currentNode = nextNode;\n nextNode = nextNode.next;\n }\n }\n }", "public static void main(String[] args) {\n\t\tList list = new LinkedList();\n\t\t\n\t\tlist.add(1);\n\t\tlist.add(null);\n\t\tlist.add(2);\n\t\tlist.add(3);\n\t\tlist.add(5);\n\t\tlist.add(4);\n\t\tlist.add(5);\n\t\tlist.add(null);\n\t\tSystem.out.println(list);\n\t\tIterator i=list.iterator();\n\t\twhile(i.hasNext()){\n\t\t\tObject o=i.next();\n\t\t\tSystem.out.println(o);\n\t\t}\n\t\tSystem.out.println(\"*************\");\n\t\t//Set set=new HashSet(); //it does not maintain any order\n\t\t//Set set=new LinkedHashSet(); //it maintains the insertion order\n\t\tSet set=new TreeSet(); //it sorts an elements in ascending order //not allow null elements it returns NullPointerException\n\t\tset.add(1);\n\t\tset.add(5);\n\t\tset.add(3);\n\t\t//set.add(null); //not allow null elements it returns NullPointerException\n\t\t//set.add(null);\n\t\tset.add(1);\n\t\tset.add(4);\n\t\tset.add(6);\n\t\t\n\t\tIterator it=set.iterator();\n\t\twhile(it.hasNext()){\n\t\t\tObject o=it.next();\n\t\t\tSystem.out.println(o);\n\t\t}\n\t\t\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(\"*************\");\n\t\t\n\t\tQueue q=new PriorityQueue();\n\t\tq.add(1);\n\t\tq.add(2);\n\t\tq.add(4);\n\t\tq.add(3);\n\t\t//q.add(null); it does not permit null values it throws an exception NullPointerException\n\t\tq.add(1);\n\t\tq.add(7);\n\t\t//q.add(\"Kanchan\"); //not permit the insertion of non comparable objects throws ClassCastException\n\t\t\n\t\tSystem.out.println(q);\n\t\t\n\t\tSystem.out.println(\"***************\");\n\t\t//Map m=new HashMap(); //it permits null key and null value\n\t\t//it does not maintain the insertion order\n\t\t//it does not allow duplicate keys\n\t\tMap m=new Hashtable(); //not allow null key and value\n\t\t//Map m=new TreeMap(); //not allow null key it returns NullPointerException\n\t\tm.put(\"a\", 1);\n\t\tm.put(\"b\", 5);\n\t\tm.put(\"a\", 3);\n\t\t//m.put(null, 3);\n\t\tm.put(\"e\", 5);\n\t\tm.put(\"u\", 8);\n\t\tm.put(\"g\", 7);\n\t\t//m.put(\"h\", null);\n\t\t\n\t\tSystem.out.println(m);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public ListNode deleteDuplicates(ListNode head) {\r\n\t\tListNode node = head;\r\n\t\twhile (node != null) {\r\n\t\t\tListNode next = node.next;\r\n\t\t\tif (next != null && node.val == next.val) {\r\n\t\t\t\tnode.next = next.next;\r\n\t\t\t} else {\r\n\t\t\t\tnode = next;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn head;\r\n\t}", "public Node removeDuplicates(Node head) {\n Node S = head;\n Node P = head.next;\n while (P != null) {\n if (S.data == P.data) {\n P = P.next;\n } else {\n S.next = P;\n S = S.next;\n P = P.next;\n }\n }\n S.next = P;\n return S;\n }", "public static void removeDuplicates(LinkedList linkedList) {\r\n\t\tif (linkedList == null || linkedList.getHead() == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tHashMap<Integer, IntegerNode> table = new HashMap<Integer, IntegerNode>();\r\n\t\tIntegerNode current = linkedList.getHead();\r\n\r\n\t\ttable.put(current.getData(), current);\r\n\r\n\t\twhile (current.getNext() != null) {\r\n\t\t\tif (table.containsKey(current.getNext().getData())) {\r\n\t\t\t\t// We've accessed this node before, so we're going\r\n\t\t\t\t// to go ahead and delete it\r\n\t\t\t\tIntegerNode matchedNode = current.getNext();\r\n\t\t\t\tcurrent.setNext(matchedNode.getNext());\r\n\t\t\t} else {\r\n\t\t\t\ttable.put(current.getNext().getData(), current);\r\n\t\t\t\tcurrent = current.getNext();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void deleteDuplicatesNoBuffer(LinkedListNode head){\n LinkedListNode current = head;\n\n while ( current != null ) {\n LinkedListNode runner = current;\n\n while ( runner.next != null ) {\n if ( current.data == runner.next.data ) {\n // skip the runner's next node\n runner.next = runner.next.next;\n } else {\n runner = runner.next;\n }\n }\n\n current = current.next;\n }\n }", "public ListNode deleteDuplicates(ListNode head) {\n\t\tif(head == null)\n\t\t\treturn null;\n\t\tListNode res = head;\n\t\tSet<Integer> dedupSet = new HashSet<Integer>();\n\t\tListNode pre = head;\n\t\tdedupSet.add(head.val);\n\t\thead = head.next;\n\t\twhile(head != null){\n\t\t\tif(!dedupSet.contains(head.val)){\n\t\t\t\tdedupSet.add(head.val);\n\t\t\t\tpre = head;\n\t\t\t}else{\n\t\t\t\tpre.next = head.next;\n\t\t\t}\n\t\t\thead = head.next;\n\t\t}\n return res;\n }", "public static ListNode inPlace(ListNode head) {\n if(head == null || head.next == null) return head;\n boolean flag = false;\n if(head.next!=null && head.val == head.next.val) flag = true;\n int ahead = head.val;\n ListNode ptr = head.next;\n ListNode new_head = head;\n ListNode cur = new_head;\n while(ptr != null) {\n if(ptr.val != ahead) {\n if(ptr.next == null || ptr.next.val != ptr.val) {\n cur.next = ptr;\n cur = cur.next;\n }\n ahead = ptr.val;\n }\n ptr = ptr.next;\n }\n cur.next = null;\n if(flag) return new_head.next;\n return new_head;\n }", "public static Node removeDuplicates(Node head) {\n\tif(head == null){\n\t return null;\n\t}\n Node traverser = head;\n while(traverser != null && traverser.next != null) { // While not reached end of list\n if(traverser.data == traverser.next.data) { // If current node = next node\n Node secondNode = traverser.next; \n if(secondNode.next != null) { // If next node is not the tail\n traverser.next = secondNode.next; // Connect current node to the next next\n }\n else { // If it was the tail\n traverser.next = null; // Just remove the tail\n }\n }\n\t if(traverser.next != null && traverser.data != traverser.next.data) { // If the new next is also repeated, dont advance the traverser\n traverser = traverser.next;\n\t }\n }\n return head;\n }", "public void reorderList(ListNode head) {\n\n if(head == null||head.next == null) return;\n int len = 0;\n\n for (ListNode cur = head; cur!= null; cur = cur.next) len++;\n\n int middle = (len%2 == 1) ? len/2 + 1: len/2 ;\n\n ListNode midNode = head;\n for (int i = 0; i < middle - 1; i++)\n midNode = midNode.next;\n\n ListNode head1 = head;\n ListNode head2 = midNode.next;\n midNode.next = null;\n head2 = revertListAndReturnHead(head2);\n\n //MERGE\n ListNode cur1 = head1;\n ListNode cur2 = head2;\n while (cur1 != null && cur2 != null) {\n ListNode nextCur1 = cur1.next;\n ListNode nextCur2 = cur2.next;\n cur1.next = cur2;\n cur2.next = nextCur1;\n cur1 = nextCur1;\n cur2 = nextCur2;\n }\n\n }", "public static void testDedupe(){\n LinkedList<String> list = new LinkedList<String>();\n \n for(int i = 0; i < 10; i++)\n list.add(\"Number \" + i);\n for(int j = 0; j < 5; j++)\n list.add(\"Number \" + j);\n \n //print test list\n for (String num : list)\n System.out.print(num + \" \");\n \n //Call deDupe and reprint list\n LinkedLists.deDupe(list);\n System.out.println(\"List after removing dupes: \" + '\\n');\n for (String num : list)\n System.out.print(num + \" \");\n }", "private void rehash() {\n Entry<K, V>[] old = table;\n allocate((int) (old.length * INC));\n\n for (int i = 0; i < old.length; ++i) {\n if (old[i] != null) {\n for (Node<Pair<K, V>> j = old[i].list.getHead().getNext();\n j != old[i].list.getTail();\n j = j.getNext()) {\n put(j.getData().key, j.getData().value);\n }\n\n }\n }\n }", "public Node method2(Node head)\n {\n Node[] linkedList = new Node[100];\n int index = 0;\n while (head != null)\n {\n linkedList[index] = head;\n head = head.next;\n index++;\n }\n\n return linkedList[index/2];\n }", "public Node removeNonDups(Node head) {\n if (head == null) {\n return null;\n }\n HashMap<Integer, Integer> countMap = new HashMap<>();\n while (head != null) {\n if (countMap.containsKey(head.data)) {\n Integer currentCount = countMap.get(head.data);\n countMap.put(head.data, ++currentCount);\n } else {\n countMap.put(head.data, 1);\n }\n head = head.next;\n }\n Node newHead = null;\n for (Map.Entry<Integer, Integer> entry : countMap.entrySet()) {\n if (entry.getValue() > 1) {\n Node node = new Node(entry.getKey());\n if (newHead == null) {\n newHead = node;\n } else {\n newHead.next = node;\n }\n }\n }\n return newHead;\n }", "private ListNode split2(ListNode head) {\n ListNode res = head.next;\n ListNode p1 = head;\n while (p1 != null) {\n ListNode p2 = p1.next;\n p1.next = p2.next;\n p1 = p1.next;\n if (p2.next != null) {\n p2.next = p1.next;\n }\n }\n return res;\n }", "public void deleteDuplicates() {\n if (head == null)\n throw new RuntimeException(\"List is empty\");\n Node<Integer> previous = head;\n Node<Integer> current = previous.getNextNode();\n while (current != null) {\n Node<Integer> temp = head;\n while (temp != current) { //skips if its the current and node is same\n if (temp.getData() == current.getData()) {\n previous.setNextNode(current.getNextNode());\n current = current.getNextNode();\n break;\n }\n temp = temp.getNextNode();\n }\n if (temp == current) { // move the node pointer\n previous = current;\n current = current.getNextNode();\n }\n }\n }", "public void removeDupsMtd2() {\n Node curr = head;\n Node prev = head;\n while (curr != null) {\n Node runner = curr.getNext();\n while(runner != null) {\n if (runner.getValue() == curr.getValue()) {\n curr.setNext(runner.getNext());\n }\n runner = runner.getNext();\n }\n curr = curr.getNext();\n }\n }", "public static ListNode mergeKLists(ListNode[] lists) {\r\n \r\n\t\t//小顶堆\r\n\t\tComparator<ListNode> comparator=new Comparator<ListNode>() {\r\n\t\t\t\r\n\t\t\tpublic int compare(ListNode p1,ListNode p2){\r\n\t\t\t\treturn p1.val-p2.val;\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\tPriorityQueue<ListNode> heap=new PriorityQueue<>(comparator);\r\n\t\t\r\n\t\tfor (ListNode node : lists) {\r\n\t\t\tif (node!=null) {\r\n\t\t\t\t\r\n\t\t\t\theap.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tListNode head=new ListNode(0);\r\n\t\tListNode pre=head;\r\n\t\twhile(!heap.isEmpty()){\r\n\t\t\tListNode node=heap.poll();\r\n\t\t\tpre.next=node;\r\n\t\t\tpre=node;\r\n\t\t\tif (node.next!=null) {\r\n\t\t\t\theap.add(node.next);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn head.next;\r\n }", "public ListNode deleteDuplicates(ListNode head) {\n\n if (head == null || head.next == null) {\n return head;\n }\n\n ListNode prev = head;\n ListNode node = head;\n\n while (node.next != null) {\n node = node.next;\n if (prev.val == node.val) {\n prev.next = node.next;\n }\n else {\n prev = node;\n }\n }\n\n return head;\n }", "static LinkedListNode removeDuplicates(LinkedListNode n) {\n\t\tif(n == null || n.nextNode == null)\n\t\t\treturn n;\n\t\telse\n\t\t\tif(listContainsVal(n.val, n.nextNode)) \n\t\t\t\treturn removeDuplicates(n.nextNode);\n\t\t\telse {\n\t\t\t\tn.nextNode=removeDuplicates(n.nextNode);\n\t\t\t\treturn n;\n\t\t\t}\n\t}", "static void deleteDup(Linkedlists list){\r\n\tif(list.head==null){\r\n\t\tSystem.out.println(\"enmpty list\");\r\n\t\treturn;\r\n\t}\r\n\telse{\r\n\t\tNode current=list.head;\r\n\t\twhile(current != null){\r\n\t\t\tNode runner=current;\r\n\t\twhile(runner.next != null){\r\n\t\t\tif(runner.next.data==current.data){\r\n\t\t\t\trunner.next=runner.next.next;\r\n\t\t\t\tlist.removeNode(current.data);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\trunner=runner.next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcurrent=current.next;\r\n\t\t}\r\n\t}\r\n\r\n\tSystem.out.println(\"list after duplicate removal\");\r\n\tlist.printList();\r\n}", "public List<List<Integer>> permute(int[] nums) {\n if (nums.length < 2) {\n LinkedList<List<Integer>> res = new LinkedList<>();\n List<Integer> list = Arrays.stream(nums).boxed().collect(Collectors.toList());\n res.add(list);\n return res;\n }\n\n ArrayList<List<Integer>> result = new ArrayList<>();\n ArrayList<Set<Integer>> setList = new ArrayList<>();\n\n //The base set that all the other sets will be \"cloned\" from\n Set<Integer> numSetBase = Arrays.stream(nums).boxed().collect(Collectors.toSet());\n\n //Initialize the custom map-thingy\n for (int i = 0; i < nums.length; i++) {\n List<Integer> temp = new LinkedList<>();\n temp.add(nums[i]);\n result.add(temp); //Key - the list\n\n Set<Integer> newSet = new HashSet<>(numSetBase);\n newSet.remove(nums[i]);\n\n setList.add(newSet); //Add to the set of stuff left\n }\n\n //Iterate\n for (int i = 1; i < nums.length; i++) {\n //Iterate over the whole list\n int initialSize = result.size();\n for (int j = 0; j < initialSize; j++) {\n boolean isFirstElem = true;\n int firstElem = 0;\n //For each unused int in the set entry\n for (int unused: setList.get(j)) {\n if (isFirstElem) {\n firstElem = unused;\n isFirstElem = false;\n } else {\n //Add new entries for the unused nums\n Set<Integer> newSet = new HashSet<>(setList.get(j));\n List<Integer> newList = new LinkedList<>(result.get(j));\n newList.add(unused);\n newSet.remove(unused);\n //Add the new entry\n result.add(newList);\n setList.add(newSet);\n }\n }\n //Modify the first element\n if (!setList.get(j).isEmpty()) {\n result.get(j).add(firstElem);\n setList.get(j).remove(firstElem);\n }\n }\n }\n return result;\n }", "private List<View> m9533a(List<View> list, List<View> list2) {\n LinkedList linkedList = new LinkedList();\n if (list != null && !list.isEmpty()) {\n int size = list.size();\n for (int i = 0; i < size; i++) {\n linkedList.add(list.get(i));\n }\n }\n if (list2 != null && !list2.isEmpty()) {\n int size2 = list2.size();\n for (int i2 = 0; i2 < size2; i2++) {\n linkedList.add(list2.get(i2));\n }\n }\n return linkedList;\n }", "public static void removeDuplicates(Node head)\n {\n HashSet<Integer> seen = new HashSet<Integer>();\n Node curr = head;\n while (curr.next != null)\n {\n seen.add(curr.data);\n if (seen.contains(curr.next.data))\n {\n curr.next = deleteNode(curr.next);\n }\n curr = curr.next;\n }\n }", "public ArrayList<Person> hashLinearDeduplication(){\n\tArrayList<Person> unduplicated = new ArrayList<>();\n\tProbeHashMap<String, Person> map = new ProbeHashMap(SIZE);\n\t//The probe count is adapted to the implementation of the maps\n\t// and use of public instance variable probes() \n\tdouble average=0.0;\n\tint max = 0;\n\tint insertCount =0;\n\tfor(int i=0; i< this.lst.size(); i++){\n\t map.put(lst.get(i).getRef(),lst.get(i));\n\t //count insertions:\n\t insertCount++;\n\t //increment sum of probes:\n\t average += map.probes;\n\t //compute max # of probes:\n\t if ( map.probes >= max) max = map.probes;\n\t}\n\tSystem.out.println (\"Average number of probes: \"+ average/insertCount );\n\tSystem.out.println(\"Max number of probes: \"+ max);\n\tSystem.out.println(\"Load-factor: \"+ (double)map.size()/SIZE );\n\t//initialize iterator to collect singular suspects from the map:\n Iterator<Person> coll = map.values().iterator();\n\twhile(coll.hasNext()){\n\t Person suspect = coll.next();\n\t unduplicated.add(suspect);\n\t}\n\treturn unduplicated;\n }", "public static void randomize( ArrayList<Integer> L) {\n\tRandom rng = new Random();\n\tInteger tmp1, tmp2;\n\tInteger randInd1, randInd2;\n\tint limit = L.size();\n\tfor (int i = 0; i < limit; i++) { // number of times to swap\n\t randInd1 = new Integer( rng.nextInt(L.size()) );\n\t randInd2 = new Integer( rng.nextInt(L.size()) );\n\t while (randInd2 == randInd1 && L.size() > 1) {\n\t\trandInd2 = rng.nextInt(L.size());\n\t }\n\t tmp1 = L.get(randInd1);\n\t tmp2 = L.get(randInd2);\n\t L.set(randInd1, tmp2);\n\t L.set(randInd2, tmp1);\n\t}\n }", "public static void main(String[] args) throws IOException {\n File file = new File(\"E:\\\\MyOwnProject\\\\data\\\\test.txt\");\n Scanner scanner = new Scanner(file);\n \t\n// \tint[] values = {1,2,2,3,4,5,5,5,6,7,7,7,8,9,9,9,9,10};\n// \tSinglyLinkedList llist = new SinglyLinkedList();\n// for (int val:values){\n// llist.insertNode(val);\n// }\n// SinglyLinkedListNode result = removeDuplicates(llist.head);\n// printSinglyLinkedList(result);\n //BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv(\"OUTPUT_PATH\")));\n\n// int tests = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// for (int testsItr = 0; testsItr < tests; testsItr++) {\n// int index = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// SinglyLinkedList llist1 = new SinglyLinkedList();\n//\n// int llist1Count = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// for (int i = 0; i < llist1Count; i++) {\n// int llist1Item = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// llist1.insertNode(llist1Item);\n// }\n// \n// \tSinglyLinkedList llist2 = new SinglyLinkedList();\n//\n// int llist2Count = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// for (int i = 0; i < llist2Count; i++) {\n// int llist2Item = scanner.nextInt();\n// scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n//\n// llist2.insertNode(llist2Item);\n// }\n// \n// \tSinglyLinkedListNode ptr1 = llist1.head;\n// SinglyLinkedListNode ptr2 = llist2.head;\n//\n// for (int i = 0; i < llist1Count; i++) {\n// if (i < index) {\n// ptr1 = ptr1.next;\n// }\n// }\n//\n// for (int i = 0; i < llist2Count; i++) {\n// if (i != llist2Count-1) {\n// ptr2 = ptr2.next;\n// }\n// }\n//\n// ptr2.next = ptr1;\n//// printSinglyLinkedList(llist1.head);\n//// printSinglyLinkedList(llist2.head);\n// int result = findMergeNode(llist1.head, llist2.head);\n// System.out.println(String.valueOf(result));\n// }\n// scanner.close();\n// int[] arr = {3,-7,0};\n// System.out.println(minimumAbsoluteDifference(arr));\n// int money = 5;\n// int[] cost = {2, 1, 3, 5, 6};\n// whatFlavors(cost,money);\n// List<List<Integer>> queries = new ArrayList<>();\n// List<Integer> query = new ArrayList<>();\n// query.add(1);query.add(3);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(2);query.add(3);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(3);query.add(2);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(1);query.add(4);\n// queries.add(query); \n// query = new ArrayList<>();\n// query.add(1);query.add(5);\n// queries.add(query); \n// query = new ArrayList<>();\n// query.add(1);query.add(5);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(1);query.add(4);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(3);query.add(2);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(2);query.add(4);\n// queries.add(query);\n// query = new ArrayList<>();\n// query.add(3);query.add(2);\n// queries.add(query);\n// int[][] queries = {{1, 5},{1, 6},{3, 2},{1, 10},{1, 10},{1, 6},{2, 5},{3, 2}};\n// List<Integer> res = freqQuery(queries);\n// for(Integer i:res){\n// \t System.out.println(i);\n// }\n String s1 = \"OUDFRMYMAW\";\n String s2 = \"AWHYFCCMQX\";\n System.out.println(commonChild(s1,s2));\n \n \n }", "private static void test1() {\n ListNode listOne = new ListNode(1);\n listOne.next = new ListNode(2);\n listOne.next.next = new ListNode(3);\n listOne.next.next.next = new ListNode(4);\n listOne.next.next.next.next = new ListNode(5);\n\n ListNode listTwo = new ListNode(1);\n listTwo.next = new ListNode(3);\n listTwo.next.next = new ListNode(4);\n\n ListNode listThree = new ListNode(2);\n listThree.next = new ListNode(6);\n\n ListNode[] lists = {listOne, listTwo, listThree};\n\n mergeKLists(lists);\n }", "public static void main(String[] args) {\n\t\tNode n = new Node(0);\r\n\t\tNode dummy = n;\r\n\t\tn.next = new Node(1);\r\n\t\tn = n.next;\r\n\t\tn.next = new Node(1);\r\n\t\tn = n.next;\r\n\t\tfor (int i = 1; i < 10; i ++) {\r\n\t\t\tn.next = new Node(i);\r\n\t\t\tn = n.next;\r\n\t\t}\r\n\t\tremoveDuplicate(dummy);\r\n\t\twhile(dummy != null) {\r\n\t\t\tSystem.out.println(dummy.val);\r\n\t\t\tdummy = dummy.next;\r\n\t\t}\r\n\t\t\r\n\t}", "private ListNode split(ListNode head) {\n ListNode res = head.next;\n ListNode p1 = head, p2 = res;\n while (p1.next.next != null) {\n ListNode p1next = p2.next;\n ListNode p2next = p2.next.next;\n p1.next = p1next;\n p2.next = p2next;\n p1 = p1.next;\n p2 = p2.next;\n }\n p1.next = null;\n return res;\n }", "public static void deleteAlternateNodes(Node<Integer> head) {\n int size=0;\n Node temp=head;\n while(head!=null && head.next!=null )\n {\n if(size%2!=0)\n {\n Node t=head.next;\n head.next=t.next;\n head=t.next;\n }\n size++;\n }\n }", "public static ListNode mergeKLists(ListNode[] lists) {\n ListNode result = new ListNode(-1);\n ListNode curr = result;\n boolean []isEnd = new boolean[lists.length];\n int isEndSum = 0;\n for (int i = 0; i < lists.length; i++) {\n if(list[i]==null)\n {\n isEnd[i] = true;\n isEndSum++;\n }\n }\n while(isEndSum<lists.length){\n int min_index=-1;\n int min=Integer.MAX_VALUE;\n for (int i = 0; i < lists.length; i++) {\n if(isEndSum==lists.length-1)\n {\n break;\n }\n if(lists[i]==null&&!isEnd[i])\n {\n isEnd[i]=true;\n isEndSum++;\n }\n if(!isEnd[i] && (min>lists[i].val))\n {\n min_index = i;\n min = lists[i].val;\n }\n }\n if(min_index!=-1)\n {\n curr.next = new ListNode(min);\n lists[min_index] = lists[min_index].next;\n curr = curr.next;\n }\n if(isEndSum==lists.length-1)\n {\n for (int i = 0; i < lists.length; i++) {\n if(!isEnd[i])\n {\n ListNode tmp = lists[i];\n while(tmp!=null)\n {\n curr.next = tmp;\n tmp = tmp.next;\n curr = curr.next;\n\n }\n isEndSum++;\n break;\n }\n \n }\n }\n\n }\n return result.next;\n }", "private void helper(List<Integer> tempList,ArrayList<Integer> list) {\n //stopping condition\n if(list.size()==0) {\n ans.add(new ArrayList<>(tempList)); // add a copy of tempList\n }\n else {\n for(int i=0;i<list.size();i++) {\n if(i==0 || list.get(i-1) != list.get(i)) // avoid duplication\n {\n ArrayList<Integer> newlist = new ArrayList<>(list);\n tempList.add(list.get(i));\n newlist.remove(i);\n helper(tempList,newlist);\n tempList.remove(tempList.size()-1);\n }\n\n }\n }\n }", "public ListNode swapPairs(ListNode head) {\n if (head == null)\n return null;\n if (head.next == null)\n return head;\n ListNode tmp = null;\n ListNode newhead = null;\n ListNode pre = null;\n while (head != null) {\n if (tmp == null) {\n tmp = head;\n head = head.next;\n }\n else {\n if (pre == null) {\n pre = head;\n }\n else {\n pre.next = head;\n pre = pre.next;\n }\n tmp.next = pre.next;\n pre.next = tmp;\n if (newhead == null)\n newhead = pre;\n pre = pre.next;\n tmp = null;\n head = pre.next;\n }\n }\n if (tmp != null)\n pre.next = tmp;\n else {\n pre.next = null;\n }\n return newhead;\n }", "public static void removeDuplicatesInPlace(LinkedList linkedList) {\r\n\t\tif (linkedList == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tIntegerNode toMatch = linkedList.getHead();\r\n\r\n\t\twhile (toMatch != null) {\r\n\t\t\tIntegerNode current = toMatch;\r\n\t\t\twhile (current.getNext() != null) {\r\n\t\t\t\tif (current.getNext().equals(toMatch)) {\r\n\t\t\t\t\tIntegerNode matchedNode = current.getNext();\r\n\t\t\t\t\tcurrent.setNext(matchedNode.getNext());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcurrent = current.getNext();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\ttoMatch = toMatch.getNext();\r\n\t\t}\r\n\t}", "private static void LessonHash() {\n\n System.out.println(\"---Hash Table---\");\n\n Hashtable<Integer, String> oopPrinciples = new Hashtable<>();\n oopPrinciples.put(1, \"Inheritance\");\n oopPrinciples.put(2, \"Polymorphism\");\n oopPrinciples.put(3, \"Abstraction\");\n oopPrinciples.put(4, \"Encapsulation\");\n //oopPrinciples.put(5, null); // throws null pointer execption\n\n //Single output from hashtable\n System.out.println(oopPrinciples.get(3));\n\n //All values\n for(Integer key : oopPrinciples.keySet()) {\n System.out.println(oopPrinciples.get(key));\n };\n System.out.println(\"----------------\");\n\n // Key-Value Pairs / Value List\n /*\n Hash Map\n 1.) Does allow null for either key or value\n 2.) unsynchronized, not thread safe, but performance is better\n */\n\n System.out.println(\"---Hash Map---\");\n\n HashMap<Integer, String> oopPrinciples2 = new HashMap<>();\n oopPrinciples2.put(1, \"Inheritance\");\n oopPrinciples2.put(2, \"Polymorphism\");\n oopPrinciples2.put(3, \"Abstraction\");\n oopPrinciples2.put(4, \"Encapsulation\");\n oopPrinciples2.put(5, null);\n\n //Single output from hashtable\n System.out.println(oopPrinciples2.get(3));\n\n //All values\n for(Integer key : oopPrinciples.keySet()) {\n System.out.println(oopPrinciples.get(key));\n };\n System.out.println(\"----------------\");\n\n // Key-Value Pairs / Value List\n /*\n Hash Set\n 1.) Built in mechanism for duplicates\n 2.) used for when you wanna maintain unique list\n */\n\n System.out.println(\"---Hash Set---\");\n\n HashSet<String> oopPrinciples3 = new HashSet<>();\n oopPrinciples3.add(\"Inheritance\");\n oopPrinciples3.add(\"Polymorphism\");\n oopPrinciples3.add(\"Abstraction\");\n oopPrinciples3.add(\"Encapsulation\");\n\n //Single output from hashtable\n System.out.println(oopPrinciples3);\n\n //All values\n for(String s : oopPrinciples3) {\n System.out.println(s);\n }\n\n if(oopPrinciples.contains(\"Inheritance\")) {\n System.out.println(\"Value does exist!\");\n } else {\n System.out.println(\"Value does not exist!\");\n }\n\n System.out.println(\"----------------\");\n }", "public void cloneList(){\n Node insert = Head;\n while(insert != null){\n Node temp = new Node(insert.data);\n temp.next = insert.next;\n insert.next = temp;\n insert = temp.next;\n }\n\n //Adjusting arbitrary pointers\n\n Node move = Head;\n while(move != null){\n move.next.arbt = move.arbt;\n move = move.next.next;\n }\n\n //cloning linked list by removing copied nodes from original list\n\n copyList = Head.next;\n move = Head.next;\n while(move.next != null){\n move.next = move.next.next;\n move = move.next;\n }\n }", "public void rehash(){\n //creates a new temporary hashtable since arrays are immutable\n LLNodeHash[] temp = hashTable;\n //doubles the size of the current hashtable\n hashTable = new LLNodeHash[hashTable.length * 2];\n for (int i = 0; i < temp.length; i++){\n //if the index of the array has an element\n if (temp[i] != null){\n LLNodeHash ptr = temp[i];\n //traverse the linked list and adds each word back to the new hashtable incase they have a new position\n while (ptr.getNext() != null){\n LLNodeHash word = new LLNodeHash(ptr.getKey(), ptr.getFreq(), null);\n add(word);\n ptr = ptr.getNext();\n }\n //adds the last element to the new hashtable\n LLNodeHash word = new LLNodeHash(ptr.getKey(), ptr.getFreq(), null);\n add(word);\n }\n }\n }", "public static ListNode swapNodes(ListNode head, int k) {\n if(head == null || head.next == null){\n return head;\n }\n ListNode tail = head;\n int begin = k;\n int len = 0;\n int index = 1;\n Map<Integer,Integer> map = new HashMap<>();\n while(tail != null){\n len++;\n map.put(index++,tail.val);\n tail = tail.next;\n }\n int end = len - k + 1;\n tail = head;\n index = 1;\n while(tail != null){\n if(index == begin){\n tail.val = map.get(end);\n }\n if(index == end){\n tail.val = map.get(begin);\n }\n index++;\n tail = tail.next;\n }\n return head;\n }", "private static boolean putInHashMap(Node head) {\r\n\t\tboolean hasloop = false;\r\n\t\tHashSet<Node> nodeSet = new HashSet();\r\n\t\twhile (head != null) {\r\n\t\t\tif (nodeSet.contains(head)) {\r\n\t\t\t\thasloop = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnodeSet.add(head);\r\n\t\t\thead = head.next;\r\n\t\t}\r\n\r\n\t\treturn hasloop;\r\n\t}", "public static <T extends Comparable <? super T>> void mysterySort3(List <T> list){\r\n\t\twhile (!isSorted(list)){ // O(n)\r\n\t\t\tCollections.shuffle(list); //O(n)\r\n\t\t}\r\n\t}", "private static ListNode initializeListNode() {\n\n\t\tRandom rand = new Random();\n\t\tListNode result = new ListNode(rand.nextInt(10)+1);\n\t\t\n\t\tresult.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next.next = new ListNode(rand.nextInt(10)+1);\n\t\tresult.next.next.next.next = new ListNode(rand.nextInt(10)+1);\n\t\t\n\t\treturn result;\n\t}", "public Item sample() {\n \t if (size==0){\n \t \tthrow new NoSuchElementException();\n \t }\n \t int index = StdRandom.uniform(size);\n // System.out.println(\"The index of the number is: \" + index);\n int k = 0;\n \t Node p=sentinel.next.next;\n \t for (int i = 0; i < index; i++){\n p = p.next; \n \t }\n \t return p.item;\n }" ]
[ "0.75019324", "0.72948414", "0.71601576", "0.71527654", "0.7148385", "0.71377003", "0.7087124", "0.69704485", "0.6851057", "0.671573", "0.6713767", "0.6550145", "0.6532063", "0.65253615", "0.6430812", "0.6386549", "0.63864666", "0.6358568", "0.6279159", "0.62769747", "0.61794114", "0.6174404", "0.61697966", "0.61554354", "0.6136442", "0.6127454", "0.60948855", "0.60752636", "0.6073788", "0.607339", "0.6066423", "0.6058015", "0.60565066", "0.6030863", "0.598779", "0.5985803", "0.5980304", "0.59710807", "0.59660006", "0.5935574", "0.59346306", "0.5931955", "0.58808845", "0.58747905", "0.58716226", "0.5832315", "0.5830884", "0.58299834", "0.58213043", "0.58054805", "0.5797297", "0.5793971", "0.5770627", "0.5760784", "0.573789", "0.57305795", "0.5719415", "0.57074004", "0.5707257", "0.5703454", "0.5698356", "0.56954706", "0.5692975", "0.5687689", "0.5665352", "0.56611085", "0.56595206", "0.56263936", "0.56252354", "0.5624785", "0.5621826", "0.5613334", "0.5598993", "0.5596336", "0.5591487", "0.55847824", "0.55756986", "0.5573728", "0.5573551", "0.5573125", "0.55726385", "0.5571207", "0.5565548", "0.5564699", "0.55646026", "0.5550776", "0.55452234", "0.55436516", "0.55368686", "0.5536844", "0.55358166", "0.55332524", "0.55323154", "0.5522637", "0.5514406", "0.5510629", "0.54844195", "0.54793584", "0.5476824", "0.5473731" ]
0.70347494
7
Test if the method, getStatus, will give false or not.
@Test public void initialiseShouldGetFalseForStatus() { Task task = new Task("Test"); Assertions.assertFalse(task.getStatus()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean getStatus();", "boolean getStatus();", "boolean getStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean isValidStatus();", "@java.lang.Override\n public boolean hasStatus() {\n return status_ != null;\n }", "@java.lang.Override\n public boolean hasStatus() {\n return status_ != null;\n }", "boolean isSetStatus();", "public boolean getResponseStatus();", "public Boolean getStatus() {return status;}", "T getStatus();", "private void getStatus() {\n\t\t\n\t}", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "@Override\n\tpublic int getStatus();", "@Override\n\tpublic int getStatus();", "public Status getStatus();", "public int getStatus();", "public int getStatus();", "public int getStatus();", "public boolean returnStatus(){\n return status;\r\n }", "boolean isStatusSuspensao();", "public boolean getStatus(){\r\n\t\treturn status;\r\n\t}", "boolean getIsOk();", "public boolean is_set_status() {\n return this.status != null;\n }", "boolean hasStatusChanged();", "protected boolean statusIs(String state)\n { return call_state.equals(state); \n }", "abstract protected boolean checkMethod();", "public boolean getStatus() {\n\treturn status;\n }", "RequestStatus getStatus();", "boolean hasMethod();", "boolean hasMethod();", "boolean hasMethod();", "boolean isSetMethod();", "com.google.rpc.Status getStatus();", "com.google.rpc.Status getStatus();", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "@Override\n\tpublic boolean status() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean status() {\n\t\treturn false;\n\t}", "Integer getStatus();", "public boolean hasStatus() {\n return result.hasStatus();\n }", "public boolean hasStatus() {\n return result.hasStatus();\n }", "public boolean hasStatus() {\n return result.hasStatus();\n }", "public boolean hasStatus() {\n return result.hasStatus();\n }", "@Override\n\tpublic void getStatus() {\n\t\t\n\t}", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "boolean hasMethodName();", "boolean hasMethodName();", "boolean hasMethodName();", "public boolean getStatus()\n\t{\n\t\treturn getBooleanIOValue(\"Status\", false);\n\t}", "public StatusCode GetStatus();", "@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean checkComplete(){\n return Status;\n }", "@Test\n public void testGetStatus() {\n System.out.println(\"getStatus\");\n DataModel instance = new DataModel();\n int expResult = 0;\n int result = instance.getStatus();\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 }", "public boolean getStatus(){\n return activestatus;\n }", "public boolean verifyAndSetStatus() {\n if (status == FINISHED) {\n // No further checks needed\n return false;\n }\n \n if (Float.compare(estimation, 0f) <= 0) {\n if (status == READY_FOR_ESTIMATION) {\n return false;\n } else {\n status = READY_FOR_ESTIMATION;\n return true;\n }\n } else {\n // If no sprint was yet assigned, we must be in state\n // READY_FOR_SPRINT, otherwise in state IN_SPRINT\n if (sprint == null) {\n if (status == READY_FOR_SPRINT) {\n return false;\n } else {\n status = READY_FOR_SPRINT;\n return true;\n }\n } else {\n if (status == IN_SPRINT) {\n return false;\n } else {\n status = IN_SPRINT;\n return true;\n }\n }\n }\n }", "boolean hasChangeStatus();", "public boolean hasStatus() {\n return statusBuilder_ != null || status_ != null;\n }", "public boolean hasStatus() {\n return statusBuilder_ != null || status_ != null;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }" ]
[ "0.75921303", "0.75921303", "0.75921303", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.7436359", "0.70816684", "0.69380546", "0.69380546", "0.6917095", "0.68748885", "0.68602854", "0.68158937", "0.67344034", "0.66543084", "0.66543084", "0.66543084", "0.66543084", "0.66543084", "0.66543084", "0.66543084", "0.66543084", "0.66543084", "0.66543084", "0.66543084", "0.66522413", "0.66522413", "0.6630951", "0.65824074", "0.65824074", "0.65824074", "0.6538282", "0.65008473", "0.64740103", "0.6419235", "0.64037675", "0.63930273", "0.6384151", "0.63728637", "0.63672346", "0.6347621", "0.63445574", "0.63445574", "0.63445574", "0.63366485", "0.63183475", "0.63183475", "0.63125795", "0.63125795", "0.63125795", "0.6306747", "0.6306747", "0.6290226", "0.6282543", "0.6282543", "0.6282543", "0.6282543", "0.6252537", "0.6224537", "0.6224537", "0.6224537", "0.62244475", "0.62244475", "0.62244475", "0.6185734", "0.61832595", "0.617108", "0.61331123", "0.61331123", "0.61331123", "0.61193603", "0.6111617", "0.60992694", "0.60825914", "0.60810035", "0.60803264", "0.60803264", "0.6078572", "0.6078572", "0.6078572", "0.6078572", "0.6078572" ]
0.0
-1
Test if the method, getStatus, will return true after running setStatusDone method.
@Test public void setStatusDone_shouldReturnTrueForStatus() { Task task = new Task("Test"); task.setStatusDone(); Assertions.assertTrue(task.getStatus()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isDone(){\n return status;\n }", "public boolean getStatus() {\n return this.isDone;\n }", "public boolean checkComplete(){\n return Status;\n }", "public void doIt() {\n status = true;\n }", "private void getStatus() {\n\t\t\n\t}", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean getStatus();", "boolean getStatus();", "boolean getStatus();", "public boolean verifyAndSetStatus() {\n if (status == FINISHED) {\n // No further checks needed\n return false;\n }\n \n if (Float.compare(estimation, 0f) <= 0) {\n if (status == READY_FOR_ESTIMATION) {\n return false;\n } else {\n status = READY_FOR_ESTIMATION;\n return true;\n }\n } else {\n // If no sprint was yet assigned, we must be in state\n // READY_FOR_SPRINT, otherwise in state IN_SPRINT\n if (sprint == null) {\n if (status == READY_FOR_SPRINT) {\n return false;\n } else {\n status = READY_FOR_SPRINT;\n return true;\n }\n } else {\n if (status == IN_SPRINT) {\n return false;\n } else {\n status = IN_SPRINT;\n return true;\n }\n }\n }\n }", "@java.lang.Override\n public boolean hasStatus() {\n return status_ != null;\n }", "@java.lang.Override\n public boolean hasStatus() {\n return status_ != null;\n }", "boolean isSetStatus();", "public boolean is_set_status() {\n return this.status != null;\n }", "public void completed(final Status status);", "boolean hasStatusChanged();", "public Boolean getStatus() {return status;}", "@Override\n\tpublic int getStatus();", "@Override\n\tpublic int getStatus();", "@Override\n\tpublic void getStatus() {\n\t\t\n\t}", "public boolean returnStatus(){\n return status;\r\n }", "public boolean getStatus(){\r\n\t\treturn status;\r\n\t}", "public boolean is_completed();", "public boolean getStatus() {\n\treturn status;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }", "public boolean isSetStatus() {\n return this.status != null;\n }", "public void setStatus(TReturnStatus status) {\n\n\t\tthis.retStatus = status;\n\t}", "boolean isCompleted();", "public Status getStatus();", "public String getStatus() {\n return isDone ? \"1\" : \"0\";\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public boolean getStatus() {\n return status_;\n }", "public void setDone(){\n this.status = \"Done\";\n }", "@Test\n public void setStatus_StatusIsSet_Passes() throws Exception {\n test2JsonResponse.setStatus(test2status);\n Assert.assertEquals(test2JsonResponse.getStatus(), test2status);\n }", "public void setStatus(JobStatus status);", "public boolean isDone();", "public boolean isDone();", "public abstract void updateStatus() throws Throwable;", "public boolean getStatus() {\n\t\treturn status;\n\t}", "public void setStatus(Boolean s){ status = s;}", "public synchronized void setStatus(Status stat) {\n if (!isMutable()) {\n throw new IllegalStateException(\n \"This TestResult is no longer mutable!\");\n }\n\n if (stat == null) {\n throw new IllegalArgumentException(\n \"TestResult status cannot be set to null!\");\n }\n\n // close out message section\n sections[0].setStatus(null);\n\n execStatus = stat;\n\n if (execStatus == inProgress) {\n execStatus = interrupted;\n }\n\n // verify integrity of status in all sections\n for (Section section : sections) {\n if (section.isMutable()) {\n section.setStatus(incomplete);\n }\n }\n\n props = PropertyArray.put(props, SECTIONS,\n StringArray.join(getSectionTitles()));\n props = PropertyArray.put(props, EXEC_STATUS,\n execStatus.toString());\n\n // end time now required\n // mainly for writing in the TRC for the Last Run Filter\n if (PropertyArray.get(props, END) == null) {\n props = PropertyArray.put(props, END, formatDate(new Date()));\n }\n\n // this object is now immutable\n notifyCompleted();\n }", "public boolean getResponseStatus();", "public abstract boolean isCompleted();", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "public boolean getDoneStatus(){\n return isDone;\n }", "private void statusCheck() {\n\t\tif(status.equals(\"waiting\")) {if(waitingPlayers.size()>1) status = \"ready\";}\n\t\tif(status.equals(\"ready\")) {if(waitingPlayers.size()<2) status = \"waiting\";}\n\t\tif(status.equals(\"start\")) {\n\t\t\tif(players.size()==0) status = \"waiting\";\n\t\t}\n\t\tview.changeStatus(status);\n\t}", "RequestStatus getStatus();", "public boolean isComplete()\n {\n return getStatus() == STATUS_COMPLETE;\n }", "@Override\n public Status getStatus() {\n return status;\n }", "public void setStatus(boolean newStatus);", "@java.lang.Override\n public int getStatus() {\n return status_;\n }", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "public Status waitUntilFinished();", "T getStatus();", "com.google.rpc.Status getStatus();", "com.google.rpc.Status getStatus();", "public void setStatus(int status);", "public void setStatus(int status);", "@java.lang.Override\n public int getStatus() {\n return status_;\n }", "boolean isValidStatus();" ]
[ "0.69850147", "0.69669515", "0.68891037", "0.6804191", "0.6797834", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.6776204", "0.676417", "0.676417", "0.676417", "0.6710781", "0.66661674", "0.66661674", "0.6655152", "0.6649639", "0.65880126", "0.65711117", "0.65379554", "0.65083015", "0.65083015", "0.65052235", "0.6487611", "0.64761114", "0.6457077", "0.6413941", "0.6409349", "0.6409349", "0.6409349", "0.63736874", "0.63736874", "0.63736874", "0.63736874", "0.63736874", "0.6368272", "0.63624805", "0.6357826", "0.6356473", "0.63269407", "0.63269407", "0.63269407", "0.63244474", "0.6316758", "0.6307434", "0.6284262", "0.6284262", "0.62704754", "0.62691236", "0.6259411", "0.62517715", "0.6247812", "0.62472653", "0.62390506", "0.62390506", "0.62390506", "0.623786", "0.62173456", "0.6213459", "0.62073445", "0.61922276", "0.6190225", "0.6175798", "0.6171267", "0.6171267", "0.6171267", "0.6171267", "0.6171267", "0.6171267", "0.6171267", "0.6171267", "0.6171267", "0.6171267", "0.6171267", "0.6168083", "0.61622", "0.6151977", "0.6151977", "0.61468726", "0.61468726", "0.61428285", "0.613272" ]
0.7350396
0
Test if toString method give correct String format.
@Test public void toString_shouldReturnInCorrectFormat() { Task task = new Task("Test"); String expected = "[N] Test"; Assertions.assertEquals(expected, task.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testToString() {\n\t\tassertEquals(\"Proper string format\", basic.toString(), \"5, 5\");\n\t}", "@Test\n\tpublic void testToString_True() {\n\n\t\tString result = \"\";\n\t\tresult = \"\\n*************Title: \" + book1.getTitle();\n\t\tresult += \"\\n*************Author: \" + book1.getAuthor();\n\t\tresult += \"\\n*************Publication Year: \" + book1.getPublicationDate();\n\t\tresult += \"\\n*************ISBN: \" + book1.getIsbnNumber() + \"\\n \";\n\t\tassertEquals(result, book1.toString());\n\n\t}", "@Test\r\n\tpublic void testToString() {\r\n\t\tPerson p1 = new Person(1, \"JavaLord\", \"hunter2\", \"The Lord of Java\");\r\n\t\tString s = p1.toString();\r\n\t\tassertTrue(s.equals(\"JavaLord:hunter2:The Lord of Java\"));\r\n\t}", "public void testToString()\n {\n // An empty board\n assertEquals(b1.toString(), \"EEEEEEEEE\");\n\n // A more complex case\n b1.fromString(\"RRRBEEBBE\");\n assertEquals(b1.toString(), \"RRRBEEBBE\");\n }", "private void testToString() {\n init();\n assertTrue(\"l0.toString()\", l0.toString().equals(\"[]\"));\n assertTrue(\"l1.toString()\", l1.toString().equals(\"[5]\"));\n assertTrue(\"l2.toString()\", l2.toString().equals(\"[4, 5]\"));\n }", "@Test\r\n public void testToString() {\r\n // TODO \r\n assertTrue(true); \r\n }", "@Test\n\tpublic void testToString_False() {\n\n\t\tString result = \"\";\n\t\tresult = \"\\n*************Title: \" + book1.getTitle();\n\t\tresult += \"\\n*************Author: \" + book1.getAuthor();\n\t\tresult += \"\\n*************Publication Year: \" + book1.getPublicationDate();\n\t\tresult += \"\\n*************ISBN: \" + book1.getIsbnNumber() + \"\\n \";\n\n\t\tassertNotEquals(result, book2.toString());\n\t}", "@Test\n\tpublic void testToString() {\n\t\tString result = email + \" \" + amount;\n\t\tassertEquals(\"Test : toString()\", bid.toString(), result);\n\t}", "public static void checkToString() {\r\n\t\tSystem.out.println(\"Beginning toString test (should be [-1, 2, 5, 17] and [3, 6, 8, 42])\");\r\n\t\tSortedIntList list = new SortedIntList(5);\r\n\t\tlist.add(5);\r\n\t\tlist.add(-1);\r\n\t\tlist.add(17);\r\n\t\tlist.add(2);\r\n\t\tSystem.out.println(\" \" + list.toString());\r\n\t\t\r\n\t\tSortedIntList list2 = new SortedIntList(true);\r\n\t\tlist2.add(6);\r\n\t\tlist2.add(3);\r\n\t\tlist2.add(6);\r\n\t\tlist2.add(42);\r\n\t\tlist2.add(8);\r\n\t\tSystem.out.println(\" \" + list2.toString());\r\n\t\tSystem.out.println();\r\n\t}", "@Test\n public void testToString() {\n assertEquals(jesseOberstein.toString(),\n \"joberste\" + \"\\n\" + \"Jesse\" + \"\\n\" + \"Oberstein\" + \"\\n\"\n + \"Mazor\" + \"\\n\" + \"2017\" + \"\\n\");\n assertFalse(nathanGoodman.toString().equals(\"Nathan Goodman\"));\n }", "public void testToString()\n {\n // test making a few EthernetAddresss and check that the toString\n // gives back the same value in string form that was used to create it\n \n // test the null EthernetAddress\n EthernetAddress ethernet_address = new EthernetAddress(0L);\n assertEquals(\"null EthernetAddress string and toString did not match\",\n NULL_ETHERNET_ADDRESS_STRING.toLowerCase(),\n ethernet_address.toString().toLowerCase());\n \n // test a non-null EthernetAddress\n ethernet_address =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertEquals(\n \"EthernetAddress string and toString results did not match\",\n MIXED_CASE_VALID_ETHERNET_ADDRESS_STRING.toLowerCase(),\n ethernet_address.toString().toLowerCase());\n \n // EthernetAddress implementation returns strings all lowercase.\n // Although relying on this behavior in code is not recommended,\n // here is a unit test which will break if this assumption\n // becomes bad. This will act as an early warning to anyone\n // who relies on this particular behavior.\n ethernet_address =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"mixed case EthernetAddress string and toString \" +\n \"matched (expected toString to be all lower case)\",\n MIXED_CASE_VALID_ETHERNET_ADDRESS_STRING.equals(\n ethernet_address.toString()));\n assertEquals(\"mixed case string toLowerCase and \" +\n \"toString results did not match (expected toString to \" +\n \"be all lower case)\",\n MIXED_CASE_VALID_ETHERNET_ADDRESS_STRING.toLowerCase(),\n ethernet_address.toString());\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n String expResult = \"Name: Gates, Bill\" + \"\\n\"\n + \"Date of Birth: 09/05/1993\";\n String result = customer.toString();\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testToString() {\n\t\tSystem.out.println(\"toString\");\n\t\tDeleteTask task = new DeleteTask(1);\n\t\tassertEquals(task.toString(), \"DeleteTask -- [filePath=1]\");\n\t}", "@Test\r\n public void testToString() {\r\n System.out.println(\"*****************\");\r\n System.out.println(\"Test : toString\");\r\n Cours_Reservation instance = new Cours_Reservation();\r\n instance.setFormation(\"Miage\");\r\n instance.setModule(\"programmation\");\r\n String expResult = instance.getFormation() + \"\\n\" + instance.getModule() ;\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\r\n }", "@Test\r\n\tpublic void toStringValid() {\r\n\t\ttestObj.addNativeField(0);\r\n\t\ttestObj.addNativeField(1);\r\n\t\ttestObj.addRelatedTable(0);\r\n\t\ttestObj.addRelatedTable(1);\r\n\t\ttestObj.makeArrays();\r\n\t\ttestObj.toString();\r\n\t\tassertEquals(\"Output string should have valid data\", \"Table: 1\\r\\n{\\r\\nTableName: test\\r\\nNativeFields: 0|1\\r\\nRelatedTables: 0|1\\r\\nRelatedFields: 0|0\\r\\n}\\r\\n\", testObj.toString());\r\n\t}", "@Test\n public void toStringTest() {\n String expected = \"Pepper Potts has an hourly salary of 16.00 and has worked 152 this month\";\n\n assertEquals(\"The expected string output does not match the actual\",\n expected, e1.toString());\n\n }", "public void test_toString() {\n // ## Arrange ##\n FromToOption option = createOption();\n option.compareAsDate();\n\n // ## Act ##\n String actual = option.toString();\n\n // ## Assert ##\n log(actual);\n assertTrue(actual.contains(\"lessThan=true\"));\n }", "@Test \n\tpublic void testToString() {\n\t\t\n\t\tString saida = \"decio neto - 56554522\";\n\t\tassertEquals(contato1.toString(), saida);\n\t}", "@Test\n\tpublic void test_TCM__String_toString() {\n\t\t//expected value\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tString str= attr.toString();\n\t\tassertTrue(\"incorrect toString form\", str.equals(\"[Attribute: prefx:test=\\\"value\\\"]\"));\n\n\t}", "public void testToString() {\n }", "@Test\n\tpublic void testaToString() {\n\t\tcontato = new Contato(\"Jardely\", \"Maris\", \"984653722\");\n\t\tassertEquals(contato.toString(), \"Jardely Maris - 984653722\");\n\t}", "@Test\n public void testToString() {\n LevelReportDto body = new LevelReportDto(\"product-name\", \"key-obs\",\n ProductFamily.L0_REPORT);\n GenericMessageDto<LevelReportDto> dto =\n new GenericMessageDto<LevelReportDto>(123, \"input-key\", body);\n String str = dto.toString();\n assertTrue(\"toString should contain the identifier\",\n str.contains(\"id: 123\"));\n assertTrue(\"toString should contain the body\",\n str.contains(\"body: \" + body.toString()));\n assertTrue(\"toString should contain the input key\",\n str.contains(\"inputKey: input-key\"));\n }", "@Test\n public void testToString() {\n System.out.println(\"Animal.toString\");\n assertEquals(\"Abstract Axe (17 yo Aardvark) resides in cage #202\", animal1.toString());\n assertEquals(\"Brave Beard (3 yo Beaver) resides in cage #112\", animal2.toString());\n }", "@Test\n public void testToString() {\n Order order = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n\n Assert.assertEquals(\"Compare toString.\",\n \"Order [orderId=Test, orderTime=12:00, customerLocation=GridCoordinate [x=0, y=0]]\",\n order.toString());\n }", "@Test\n\tpublic void testToString() {\n\t\t//Assert.assertEquals(\" \",\" \",EUR0.toString()); //fixed in different way but works( finally :D )\n\t\tAssert.assertEquals(\" \", \"0 EUR\", EUR0.toString());\n\t}", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "String toString();", "@Test\r\n public void testToString() {\r\n System.out.println(\"toString\");\r\n Simulacao instance = new Simulacao(TipoDPolarizacao.ABSORCAO);\r\n String expResult = \"Simulacao{\" + \"tipoDPolarizacao=\" + instance.getTipoDPolarizacao() + '}';\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\r\n }", "@Test\n\tpublic void testToString() {\n\t\tassertEquals(\n\t\t\t\t\"SHOW: Lana Del Rey planeta Terra, R$ 100.0, Nao emprestado, 120 min, LIVRE, Lana Del Rey, 10 faixas\",\n\t\t\t\tshow.toString());\n\t}", "public void test_toString() {\n String logMessage = instance.getLogMessage();\n\n assertEquals(\"'toString' should be correct.\", logMessage, instance.toString());\n }", "@Test\r\n public void testToString() {\r\n String expected = \"3.0 + 4.0i\";\r\n Complex c = new Complex(3,4);\r\n String actual = c.toString();\r\n assertEquals(expected, actual);\r\n }", "@Test\n public void testToString()\n {\n try\n {\n Square s1 = new Square();\n assertEquals(\"_\", s1.toString());\n\n s1.setType(Square.squareType.DB_LETTER);\n assertEquals(\"2L\", s1.toString());\n\n s1.setType(Square.squareType.STAR);\n assertEquals(\"S\", s1.toString());\n\n s1.setType(Square.squareType.DB_WORD);\n assertEquals(\"2W\", s1.toString());\n\n s1.setType(Square.squareType.TR_LETTER);\n assertEquals(\"3L\", s1.toString());\n\n s1.setType(Square.squareType.TR_WORD);\n assertEquals(\"3W\", s1.toString());\n\n s1.setTile(Tile.getInstance('A'));\n assertEquals(\"A\", s1.toString());\n }\n catch(Exception ex)\n {\n fail(\"No exception should be thrown when calling toString on Square.\");\n }\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Reserva instance = new Reserva();\n String expResult = \"\";\n String result = instance.toString();\n assertEquals(expResult, result);\n \n }", "@GwtIncompatible(\"String.format()\")\n/* */ public String toString() {\n/* 171 */ return toString(4);\n/* */ }", "@Test\n\tpublic final void testToString() {\n\t\tanimal.moveTo(testForest);\n\t\t\n\t\tassertEquals(animal.toString(), \n\t\t\t\t\"[Animal: Possum, Type: Mammal, Gender: male, Legs: 4\"\n\t\t\t\t+ \" is in \" + testForest.toString() + \"]\");\n\t}", "@Test\n\tpublic void testToString() {\n\t\tassertEquals(\"C Platinum 123ABC Kate\", c1.toString());\n\t\tassertEquals(\"C None 456DEF Bender\", c2.toString());\n\t}", "@Test public void toStringTest() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n \n Assert.assertTrue(pb1.toString().contains(\"Estimated Monthly Cost: \"));\n }", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Account instance = new Account(\"Piper\", 10.0);\n String expResult = \"Piper has a total of $10.0 in their account.\";\n String result = instance.toString();\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 public void testToString() {\n Pair instance = Pair.of(\"left\", \"right\");\n String result = instance.toString();\n assertTrue(result.contains(\"left\"));\n assertTrue(result.contains(\"right\"));\n assertTrue(result.contains(\"Pair\"));\n }", "@Test\n public void testToString() {\n assertEquals(r1.toString(), \"Rectangle\");\n assertEquals(r2.toString(), \"Rectangle\");\n }", "@Test\n public void testToString() {\n LOGGER.info(\"testToString\");\n final String actual = new AtomString(\"Hello\").toString();\n final String expected = \"Hello\";\n assertEquals(expected, actual);\n }", "public void testToString() {\n\t\tNumberConverter test = new NumberConverter(436);\n\t\tNumberConverter testH = new NumberConverter(95);\n\t\tNumberConverter testT = new NumberConverter(203);\n\t\tNumberConverter testO = new NumberConverter(870);\n\t\tNumberConverter testHT = new NumberConverter(2);\n\t\tNumberConverter testHO = new NumberConverter(40);\n\t\tNumberConverter testTO = new NumberConverter(900);\n\t\tNumberConverter testH2 = new NumberConverter(13);\n\t\tNumberConverter testHTO = new NumberConverter(0);\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttest.toString(), \"four hundred and thirty six\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestH.toString(), \"ninety five\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestT.toString(), \"two hundred and three\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestO.toString(), \"eight hundred and seventy\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestHT.toString(), \"two\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestHO.toString(), \"forty\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestTO.toString(), \"nine hundred\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestH2.toString(), \"thirteen\");\n\t\tassertEquals(\"Should have had stringed together correctly\",\n\t\t\t\ttestHTO.toString(), \"\");\n\n\t}", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Library instance = new Library();\n instance.setName(\"Test\");\n instance.setSize(5);\n String expResult = \"Library{\" + \"name=\" + instance.getName() + \", size=\" + instance.getSize() + \"}\";\n String result = instance.toString();\n assertEquals(expResult, result);\n \n }", "public void testToString() {\n assertEquals(this.empty.toString(), \"[]\");\n assertEquals(this.stack.toString(), \"[9, 8, 7, 6, 5, 4, 3, 2, 1, 0]\");\n }", "@Test\r\n\tpublic void testToString() {\r\n\r\n\t\t// Create a new Notification and use accessors to set the note name\r\n\t\tINotification note = new Notification(\"TestNote\", \"1,3,5\", \"TestType\");\r\n\t\tString ts = \"Notification Name: TestNote Body:1,3,5 Type:TestType\";\r\n\r\n\t\t// test assertions\r\n\t\tAssert.assertEquals(\"Expecting note.testToString() == '\" + ts + \"'\", note.toString(), ts);\r\n\t}", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n Alumno instance = null;\n String expResult = \"\";\n String result = instance.toString();\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 }", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "public abstract String toString();", "@Test\r\n public void testToString() {\r\n System.out.println(\"toString\");\r\n RevisorParentesis instance = null;\r\n String expResult = \"\";\r\n String result = instance.toString();\r\n assertEquals(expResult, result);\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 }", "@Test\n public void testToString() {\n String result = chatMessage.toString();\n // use a regex for matching the date\n assertTrue(result.matches(\"^<[0-9:]+> \" + Pattern.quote(author) +\n \": \" + Pattern.quote(text)));\n }", "@Test\n\tpublic void test_toString() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tassertEquals(\"[Sherlock,BBC]\",t1.toString());\n }", "@Test\n void testToString() {\n // Create a new item object with the following parameters:\n // Description: \"Test Description\", Due Date: \"2022-05-30\", isComplete: \"Complete\"\n Item actualResult = new Item(\"Test Description\", \"2022-05-30\", \"Complete\");\n // Then assertEquals to see if the actual string equals \"Test Description,2022-05-30,Complete\"\n assertEquals(\"Test Description,2022-05-30,Complete\", actualResult.toString());\n }", "@Test\n\tpublic void testToString2() {\n\t\t\n\t\tString saideira = \"3 - sono infinito\";\n\t\tassertEquals(contato2.toString2(), saideira);\n\t}", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n List<Exposicao> listaExposicoes = new ArrayList<>();\n listaExposicoes.add(new Exposicao());\n RegistoExposicoes instance = new RegistoExposicoes(listaExposicoes);\n StringBuilder expResult = new StringBuilder();\n expResult.append(\"RegistoExposicoes{\");\n for (Exposicao exposicao : instance.getListaExposicoes()) {\n expResult.append(String.format(\"%s%n\", exposicao));\n }\n expResult.append(\"}\");\n String result = instance.toString();\n assertEquals(expResult.toString(), result);\n }", "@Test public void toStringTest() {\n DirectMC i = new DirectMC(\"AdMailing\", 10000.00, 3.00, 2000);\n Assert.assertTrue(\"test\", i.toString().contains(\"(class DirectMC)\"));\n }", "abstract public String toString();", "@Test\n\tpublic void componentToString()\n\t{\n\t\tString methodName = new Object()\n\t\t{}.getClass().getEnclosingMethod().getName();\n\t\t\n\t\tDate startDate = DateUtils.rightNowDate();\n\t\t\n\t\tTestUtils.logTestStart(methodName, watcher.getLogger());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tString compName = \"newComponent\";\n\t\t\tString compGroup = \"com.lmco.efoss\";\n\t\t\tString compVersion = \"1.5.1\";\n\t\t\tType compType = Component.Type.CONTAINER;\n\t\t\t\n\t\t\tComponent comp = new Component();\n\t\t\tcomp.setName(compName);\n\t\t\tcomp.setGroup(compGroup);\n\t\t\tcomp.setVersion(compVersion);\n\t\t\tcomp.setType(compType);\n\t\t\t\n\t\t\tString expectedStringWithoutTabs = \"Name:newComponent\\n\" +\n\t\t\t\t\t\"Group: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"Version: 1.5.1\\n\";\n\t\t\tString actualStringWithoutTabs = ComponentUtilities.toString(comp);\n\t\t\t\n\t\t\tif (expectedStringWithoutTabs.equals(actualStringWithoutTabs))\n\t\t\t\twatcher.getLogger()\n\t\t\t\t\t\t.info(\"Got Expected String from ComponentUtilities.toString(comp)!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithoutTabs,\n\t\t\t\t\t\tactualStringWithoutTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithoutTabs.equals(actualStringWithoutTabs));\n\t\t\t\n\t\t\tString expectedStringWithTabs = \"\tName:newComponent\\n\" +\n\t\t\t\t\t\"\tGroup: com.lmco.efoss\\n\" +\n\t\t\t\t\t\"\tVersion: 1.5.1\\n\";\n\t\t\t\n\t\t\tString actualStringWithTabs = ComponentUtilities.toString(comp, \"\t\");\n\t\t\t\n\t\t\tif (actualStringWithTabs.equals(expectedStringWithTabs))\n\t\t\t\twatcher.getLogger().info(\"Got Expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\")!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tString diff = StringUtils.difference(expectedStringWithTabs,\n\t\t\t\t\t\tactualStringWithTabs);\n\t\t\t\twatcher.getLogger().warn(\"Failed to generate the expected String from \" +\n\t\t\t\t\t\t\"ComponentUtilities.toString(comp, \\\"\t\\\"): \\n\" +\n\t\t\t\t\t\t\"Difference: \" + diff);\n\t\t\t}\n\t\t\tAssert.assertTrue(expectedStringWithTabs.equals(actualStringWithTabs));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tString error = \"Unexpected error occured while attempting ComponentUtilities.toString.\";\n\t\t\twatcher.getLogger().error(error, e);\n\t\t\tAssert.fail(error);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tTestUtils.logTestFinish(methodName, startDate, watcher.getLogger());\n\t\t}\n\t}", "@Test\n public void testToString() {\n System.out.println(\"toString\");\n String expResult = \"DetalleAhorro{codigo=1, fechaPago=Tue Jan 01 00:10:00 COT 2019, interes=0.07, saldo=600.0}\";\n String result = detalleAhorro.toString();\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 test_toString() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tassertEquals(\"[5,David Ferrer]\",c1.toString());\n }", "private static boolean testToString() {\r\n String answer = \"1 2 3 4 9 7 8 6 5 \\n\" +\r\n \"4 5 9 _ _ _ _ _ _ \\n\" +\r\n \"6 7 8 _ _ _ _ _ _ \\n\" +\r\n \"3 _ _ _ 1 _ _ _ _ \\n\" +\r\n \"2 _ _ _ _ _ _ _ _ \\n\" +\r\n \"9 _ _ _ _ 5 _ _ _ \\n\" +\r\n \"8 _ _ _ _ _ _ _ _ \\n\" +\r\n \"7 _ _ _ _ _ _ _ _ \\n\" +\r\n \"5 _ _ 9 _ _ _ _ _ \\n\";\r\n//analyze the return statement: to string of the game object passed into a \r\n//comparison function of the string object that assigned to the variable \"answer\"\r\n//and had been manually defined above (a concatenated string with line breaks to \r\n//simulate the Sudoku array), and the evaluation is all done in the return statement.\r\n return (answer.equalsIgnoreCase(game.toString()));\r\n }" ]
[ "0.7506598", "0.73452795", "0.70283955", "0.6987147", "0.6976576", "0.69523096", "0.684596", "0.68291056", "0.6808609", "0.6791182", "0.6788457", "0.6761791", "0.6735267", "0.67259175", "0.66906077", "0.6680025", "0.66695005", "0.66536987", "0.663833", "0.6622688", "0.658259", "0.65787905", "0.65677327", "0.6540364", "0.65278", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65269023", "0.65050286", "0.65043676", "0.65040416", "0.6497167", "0.647834", "0.6468259", "0.6459716", "0.64561146", "0.64508075", "0.6448933", "0.64485824", "0.64437646", "0.64151883", "0.64042753", "0.63954747", "0.63864756", "0.63830984", "0.63671744", "0.6365997", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.63658184", "0.6365575", "0.6360856", "0.63591844", "0.63413894", "0.63391113", "0.63027054", "0.62758505", "0.6273862", "0.6272353", "0.62646747", "0.62642354", "0.62579095" ]
0.70323956
2
Cleans out the promisesxml directory by removing any empty paths.
public static void removeEmptyPathsOnClient() { final File libRoot = JSurePreferencesUtility.getJSureXMLDirectory(); if (libRoot != null) { FileUtility.deleteEmptySubDirectories(libRoot); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void clean(Path path) {\n }", "public void clearPaths() {\n _thePaths.clear();\n }", "private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }", "private void clean(Path path) throws IOException {\n if (Files.exists(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<>() {\n public FileVisitResult visitFile(Path path, BasicFileAttributes attributes) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n\n public FileVisitResult postVisitDirectory(Path path, IOException exception) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n });\n }\n }", "public synchronized void cleanup() {\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) { // children will be null if the directory does\n\t\t\t\t\t\t\t\t// not exist.\n\t\t\tfor (int i = 0; i < children.length; i++) { // remove too small file\n\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\tif (!child.equals(new File(mStorageDirectory, NOMEDIA))\n\t\t\t\t\t\t&& child.length() <= MIN_FILE_SIZE_IN_BYTES) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }", "public void clean()\r\n {\r\n // DO NOT TOUCH\r\n // System.out.println(unzipedFilePath);\r\n\r\n // only clean if there was a successful unzipping\r\n if (success)\r\n {\r\n // only clean if the file path to remove matches the zipped file.\r\n if (unzippedFilePath.equals(zippedFilePath.substring(0,\r\n zippedFilePath.length() - 4)))\r\n {\r\n // System.out.println(\"to be implmented\");\r\n for (File c : outputDir.listFiles())\r\n {\r\n // System.out.println(c.toString());\r\n if (!c.delete())\r\n {\r\n System.out.println(\"failed to delete\" + c.toString());\r\n }\r\n }\r\n outputDir.delete();\r\n outputDir = null;\r\n }\r\n }\r\n }", "private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n FileUtils.deleteDirectory(file);\n log.info(\"removed temporary backup directory {}\", file.getAbsolutePath());\n } catch (IOException e) {\n log.error(\"failed to delete the temporary backup directory {}\", file.getAbsolutePath());\n }\n }\n }\n }", "private void clearPathIds(){\n synchronized (pathsToBeTraversed) {\n Iterator<Long> iterator = pathsToBeTraversed.iterator();\n while (iterator.hasNext()) {\n Long trackId = iterator.next();\n try {\n namesystem.removeXattr(trackId,\n HdfsServerConstants.XATTR_SATISFY_STORAGE_POLICY);\n } catch (IOException e) {\n LOG.debug(\"Failed to remove sps xattr!\", e);\n }\n iterator.remove();\n }\n }\n }", "public void cleanUp() {\n if (penv != null) {\n penv.cleanup();\n }\n List<ONDEXGraph> indexed = new LinkedList<ONDEXGraph>();\n Set<String> graphFolders = new HashSet<String>();\n for (Entry<ONDEXGraph, String> ent : indexedGraphs.entrySet()) {\n if (!indeciesToRetain.contains(ent.getValue())) graphFolders.add(new File(ent.getValue()).getParent());\n indexed.add(ent.getKey());\n }\n for (ONDEXGraph graph : indexed) removeIndex(graph, null);\n for (String graphDir : graphFolders) {\n try {\n DirUtils.deleteTree(graphDir);\n } catch (IOException e) {\n }\n }\n }", "public void cleanDirs() {\n\t\tfor (File f : files) {\n\t\t\tFileUtils.deleteDir(f.toString());\n\t\t}\n\t}", "private void cleanTempFolder() {\n File tmpFolder = new File(getTmpPath());\n if (tmpFolder.isDirectory()) {\n String[] children = tmpFolder.list();\n for (int i = 0; i < children.length; i++) {\n if (children[i].startsWith(TMP_IMAGE_PREFIX)) {\n new File(tmpFolder, children[i]).delete();\n }\n }\n }\n }", "public synchronized void cleanupSimple() {\n\t\tfinal int maxNumFiles = 1000;\n\t\tfinal int numFilesToDelete = 50;\n\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) {\n\t\t\tif (children.length > maxNumFiles) {\n\t\t\t\tfor (int i = children.length - 1, m = i - numFilesToDelete; i > m; i--) {\n\t\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\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}\n\t}", "@Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException {\n try {\n try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) {\n for (Path path : files)\n Files.delete(path);\n }\n }\n catch (IOException e) {\n throw new IgniteCheckedException(\"Failed to cleanup checkpoint directory from temporary files: \" + cpDir, e);\n }\n }", "private void clearClipsDirectory(){\n /* Citation : http://helpdesk.objects.com.au/java/how-to-delete-all-files-in-a-directory#:~:text=Use%20the%20listFiles()%20method,used%20to%20delete%20each%20file. */\n File directory = new File(Main.CREATED_CLIPS_DIRECTORY_PATH);\n File[] files = directory.listFiles();\n if(files != null){\n for(File file : files){\n if(!file.delete()) System.out.println(\"Failed to remove file \" + file.getName() + \" from \" + Main.CREATED_CLIPS_DIRECTORY_PATH);\n }\n }\n }", "@AfterClass\n public static void cleanup() throws Exception {\n fs.delete(new Path(baseDir), true);\n }", "private void clearFullTree()\r\n {\r\n fullXmlTree = new StringBuilder();\r\n }", "protected static void cleanUpWorkingDir() {\n final Path testControllerPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE);\n try {\n Files.deleteIfExists(testControllerPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerPath, e);\n }\n\n final Path testControllerBakPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE_BAK);\n try {\n Files.deleteIfExists(testControllerBakPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerBakPath, e);\n }\n }", "@AfterClass\n public static void teardown() {\n logger.info(\"teardown: remove the temporary directory\");\n\n // the assumption is that we only have one level of temporary files\n for (File file : directory.listFiles()) {\n file.delete();\n }\n directory.delete();\n }", "public void makeEmpty(){\n deleteAll(root);\n root = null;\n numItems = 0;\n }", "public synchronized void clearResources()\r\n {\r\n // create a new root, making old tree eligible for GCing\r\n createRootNode();\r\n\r\n // clear all registered objects\r\n unRegisterAll();\r\n }", "public void clear() {\n root = null;\n }", "public void clear() {\n root = null;\n }", "public void clean();", "public void clean();", "public void clean();", "public void clean();", "@Override\n\tpublic synchronized void clear() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files != null) {\n\t\t\tfor (File file : files) {\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t\tmEntries.clear();\n\t\tmTotalSize = 0;\n\t\tVolleyLog.d(\"Cache cleared.\");\n\t}", "private void cleanOutputFolder(String output) {\n \t\tFile[] files = new File[1];\n \t\tfiles[0] = new File(output);\n \t\tcleanFolder(files);\n \t}", "private void clean() {\n nodesToRemove.clear();\n edgesToRemove.clear();\n }", "private static void deleteEmptyParentDirs(Path pkgDirPath, Path repoPath) throws IOException {\n Path pathsInBetween = repoPath.relativize(pkgDirPath);\n for (int i = pathsInBetween.getNameCount(); i > 0; i--) {\n Path toRemove = repoPath.resolve(pathsInBetween.subpath(0, i));\n if (!Files.list(toRemove).findAny().isPresent()) {\n Files.delete(toRemove);\n }\n }\n }", "public void clean(final Path path) {\n this.recurrence(path);\n this.summary.finished();\n }", "@AfterClass\n\tpublic static void cleanup() {\n\t\ttestDir.delete();\n\t\tfile.delete();\n\t}", "public void cleanup() {\n if (cleaned) {\n return;\n }\n for (val cleanup : cleanups) {\n cleanup.accept(this);\n }\n clear(true);\n cleanups.clear();\n attributes.clear();\n if (parent != null) {\n parent.remove(this);\n }\n cleaned = true;\n }", "public void clear() {\n\t\troot = null;\n\t\tcount = 0;\n\t}", "public void clear() {\n count = 0;\n root = null;\n }", "public void clear() {\r\n\t\troot = null;\r\n\t\tsize = 0;\r\n\t}", "void deleteDirectories() {\n\n if (story_directory != null && !newStoryReady) {\n deleteStoryDirectory();\n }\n\n if (tag_directory != null && !newStoryReady) {\n deleteTagDirectory();\n }\n\n if (cover_directory != null && !newStoryReady) {\n deleteCoverDirectory();\n }\n }", "public void clear() {\n root = null;\n size = 0;\n }", "public void clear() {\n root = null;\n size = 0;\n }", "void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }", "private static void cleanAutomationResults() {\n \tLOG.info(\"Deleting unneccessary automation results.\");\n \t\n \t// Stop the graph database because it gets deleted\n \tDBUtil.closeGraph();\n \t\n \t// Remove clustering results\n \tFileUtil.deleteFileOrDirectory(clArgs.clusteringOutDir);\n \t\n \t// Remove graph database\n \tFileUtil.deleteFileOrDirectory(DBUtil.getNeo4jPath());\n }", "void deleteStoryDirectory() {\n\n try {\n\n Log.i(\"Deleting StoryDirectory\", story_directory.toString());\n FileUtils.deleteDirectory(story_directory);\n } catch (IOException e) {\n\n }\n\n }", "private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }", "public void clear(){\n root = null;\n count = 0;\n }", "protected void cleanup() {\n // if the java runtime is holding onto any files in the build dir, we\n // won't be able to delete them, so we need to force a gc here\n System.gc();\n\n if (deleteFilesOnNextBuild) {\n // delete the entire directory and all contents\n // when we know something changed and all objects\n // need to be recompiled, or if the board does not\n // use setting build.dependency\n //Base.removeDir(tempBuildFolder);\n \n // note that we can't remove the builddir itself, otherwise\n // the next time we start up, internal runs using Runner won't\n // work because the build dir won't exist at startup, so the classloader\n // will ignore the fact that that dir is in the CLASSPATH in run.sh\n Base.removeDescendants(tempBuildFolder);\n \n deleteFilesOnNextBuild = false;\n } else {\n // delete only stale source files, from the previously\n // compiled sketch. This allows multiple windows to be\n // used. Keep everything else, which might be reusable\n if (tempBuildFolder.exists()) {\n String files[] = tempBuildFolder.list();\n for (String file : files) {\n if (file.endsWith(\".c\") || file.endsWith(\".cpp\") || file.endsWith(\".s\")) {\n File deleteMe = new File(tempBuildFolder, file);\n if (!deleteMe.delete()) {\n System.err.println(\"Could not delete \" + deleteMe);\n }\n }\n }\n }\n }\n \n // Create a fresh applet folder (needed before preproc is run below)\n //tempBuildFolder.mkdirs();\n }", "private void cleanupStagingDir() {\n if (getApplicationId() != null) {\n dagUtils.cleanMr3Dir(getStagingDir(), sessionConf);\n }\n sessionScratchDir = null;\n }", "public static void cleanOldTemp(String rootOutput){\r\n\t\tif(new File(rootOutput).exists()){\r\n\t\t\tLog.log(\"cleanOldTemp \"+rootOutput);\r\n\t\t\tPath pathToBeDeleted = Paths.get(rootOutput);\r\n\t\t\ttry {\r\n\t\t\t\tFiles.walk(pathToBeDeleted)\r\n\t\t\t\t .sorted(Comparator.reverseOrder())\r\n\t\t\t\t .map(Path::toFile)\r\n\t\t\t\t .forEach(File::delete);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tLog.error(e);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void clear() {\n root = null;\n }", "static void clean(Configuration conf) throws IOException {\n if (!debug(conf)) {\n int iteration = getCurrentIteration(conf);\n for (int i = 0; i <= iteration; i++) {\n deleteIfExists(conf, OUTPUT_BASE + i);\n deleteIfExists(conf, OUTPUT_BASE + i + TEMP_SUFFIX);\n deleteIfExists(conf, SCHEMA_BASE + i);\n }\n deleteIfExists(conf, \"input\");\n }\n }", "@Test\n\tpublic void removeUnneededDirectory() throws IOException {\n\t\tfinal Path targetDir = _temp.toPath().resolve(\"target\");\n\t\tfinal Path fsTargetDir = targetDir.resolve(DIR_FIRSTSPIRIT_5);\n\t\tfinal Path installerTar = new File(getClass().getResource(TEST_INSTALLER_TAR_GZ).getFile()).toPath();\n\t\tServerInstaller.decompressInstaller(targetDir, installerTar);\n\t\tassertTrue(fsTargetDir.toFile().exists(), DIR_FIRSTSPIRIT_5 + \" dir should exist\");\n\n\t\t// test\n\t\tServerInstaller.removeUnneededDirectory(targetDir);\n\n\t\t// verify\n\t\tassertFalse(fsTargetDir.toFile().exists(), DIR_FIRSTSPIRIT_5 + \" dir should have been deleted\");\n\t}", "@Override\r\n public void clear(){\r\n root = null;\r\n }", "@Override\r\n\tpublic void remDir(String path) {\n\t\t\r\n\t}", "private void cleanReporter(){\n File file = new File(\"test-report.html\");\n file.delete();\n\n }", "@AfterClass\n\tpublic static void cleanUp() throws IOException {\n\t\tLpeFileUtils.removeDir(tempDir.getAbsolutePath());\n\t}", "static void clean(TreeDeleter treeDeleter, Path outputBase) {\n Path stashDir = getStashBase(outputBase);\n if (!stashDir.isDirectory()) {\n return;\n }\n Path stashTrashDir = stashDir.getChild(\"__trash\");\n try {\n stashDir.renameTo(stashTrashDir);\n } catch (IOException e) {\n // If we couldn't move the stashdir away for deletion, we need to delete it synchronously\n // in place, so we can't use the treeDeleter.\n treeDeleter = null;\n stashTrashDir = stashDir;\n }\n try {\n if (treeDeleter != null) {\n treeDeleter.deleteTree(stashTrashDir);\n } else {\n stashTrashDir.deleteTree();\n }\n } catch (IOException e) {\n logger.atWarning().withCause(e).log(\"Failed to clean sandbox stash %s\", stashDir);\n }\n }", "private void cleanDirectory(File dir) {\n File[] files= dir.listFiles();\n if (files!=null && files.length>0) {\n for (File file: files) {\n delete(file);\n }\n }\n }", "private void tearDown() {\n if (tempDir != null) {\n OS.deleteDirectory(tempDir);\n tempFiles.clear();\n tempDir = null;\n }\n }", "public void clean();", "void clean();", "void clean();", "void clean();", "@Override\n\tpublic void clear() {\n\t\tsize = 0;\n\t\troot = null;\n\t}", "public void makeEmpty() {\n root = null;\n }", "private void cleanupLocal() throws IOException {\n FileSystem lfs = FileSystem.getLocal(new Configuration());\n lfs.delete(new Path(\"build\"), true);\n System.setProperty(\"hadoop.log.dir\", \"logs\");\n }", "@Override\n public void clear() {\n root = null;\n size = 0;\n }", "@Override\n public void clear() {\n root = null;\n size = 0;\n }", "@Override\n public void clear() {\n root = null;\n size = 0;\n }", "public void clearChildren() {\r\n this.children = null;\r\n }", "@AfterClass\n public static void deleteOutputDir() throws OfficeException {\n\n // Delete the output directory\n FileUtils.deleteQuietly(new File(OUTPUT_DIR));\n }", "private void emptyDirectory(File dir){\n\n for (File file : Objects.requireNonNull(dir.listFiles())){\n if (file.isDirectory())\n {\n emptyDirectory(file);\n }\n file.delete();\n }\n }", "public static void cleanUpCustomTempDirectories(){\n\n\t\tif(tempDirectoryList != null){\n\t\t\tlog.info(\"Removing custom temp directories\");\n\t\t\ttry {\n\t\t\t\tfor(File tempFile : tempDirectoryList)\n\t\t\t\t\tif(tempFile.exists()){\n\t\t\t\t\t\tlog.info(\"Deleting : \" + tempFile.getCanonicalPath());\n\t\t\t\t\t\tdeleteDirectory(tempFile);\n\t\t\t\t\t}\n\t\t\t\t// also remove all file references from ArrayList\n\t\t\t\ttempDirectoryList.clear();\n\t\t\t} catch (IOException e) {e.printStackTrace();}\n\t\t}\n\t\telse\n\t\t\tlog.info(\"No custom temp directory created.\");\n\t\tlog.info(\"Finished removing custom temp directories\");\n\t}", "public void clear()\n\t\t{ while (!children.isEmpty()) remove(children.get(0)); }", "private void cleanFolder(File[] files) {\n \t\t\n \t\tif (files != null) {\n \t\t\t// Iterate the files\n \t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\tFile f = files[i];\n \t\t\t\t// If the file is a directory, remove its contents recursively\n \t\t\t\tif (f.isDirectory()) {\n \t\t\t\t\tcleanFolder(f.listFiles());\n \t\t\t\t}\n \t\t\t\t// Remove the file if it is a class file\n \t\t\t\tif (f.getName().endsWith(\".class\"))\n \t\t\t\t\tf.delete();\n \t\t\t}\n \t\t}\n \t}", "public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }", "public void makeEmpty() {\n\t\troot = null;\n\t}", "public void cleanAll() {\r\n\t\ttos.clear();\r\n\t\tbcs.clear();\r\n\t\tccs.clear();\r\n\t\tattachments.clear();\r\n\t\tinLines.clear();\r\n\t\tsubject= null;\r\n\t\ttext= null;\r\n\t\tfrom= null;\r\n\t}", "@Override\n public void clear() {\n size = 0;\n root = null;\n }", "public void deleteTmpDirectory() {\n\t\tdeleteTmpDirectory(tmpDir);\n\t}", "public void makeEmpty() {\r\n\t\troot = null;\r\n\t}", "@AfterClass\n public static void cleanup() throws IOException {\n File directory = new File(TMP_DIR_BASE);\n File dirname = directory.getParentFile();\n final String basename = directory.getName() + \"[0-9]+\";\n File[] files = dirname.listFiles(new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n return name.matches(basename);\n }\n });\n for (File file : files) {\n if (file.delete() == false) {\n throw new IOException(\"Can't delete \" + file);\n }\n }\n }", "public Builder clearPaths() {\n paths_ = com.google.protobuf.LazyStringArrayList.EMPTY;\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n return this;\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}", "void removeXML(String path)\n throws ProcessingException;", "public void makeEmpty() {\r\n\t\troot = null;\r\n\t\tleftChild = null;\r\n\t\trightChild= null;\r\n\t}", "void deleteTagDirectory() {\n\n try {\n\n Log.i(\"Deleting Tag Directory\", tag_directory.toString());\n FileUtils.deleteDirectory(tag_directory);\n } catch (IOException e) {\n\n }\n\n }", "public void clearChildren() throws RemoteException;", "private void unWatchDir(Path path) {\n watcher_service.deRegisterAll(path);\n }", "public void resetPath();", "public void ungeneratePath() {\n path = oldPaths.pop();\n }", "@Test\n public void testInitialCleanup() throws Exception{\n File f = new File(path);\n assertTrue(f.exists());\n assertTrue(f.isDirectory());\n File[] files = f.listFiles();\n // Expect all files were deleted\n assertTrue(files.length == 0);\n }", "@After\n public void removeEverything() {\n\n ds.delete(uri1);\n ds.delete(uri2);\n ds.delete(uri3);\n\n System.out.println(\"\");\n }", "public void cleanUp() {\r\n\t\tsuper.cleanUp() ;\r\n\t}", "public void clean(){\n preprocessorActionsPerFile.clear();\n }", "public void cleanUp();", "public void cleanUp();", "public void cleanUnusedResumeAndProfilePic(String addressBookXmlFilePath) {\n HashSet<String> usedFiles = new HashSet<String>();\n\n for (Person p: model.getAddressBook().getPersonList()) {\n if (p.getResume().value != null) {\n usedFiles.add(p.getResume().value.substring(5)); //\"data\\...\"\n }\n }\n for (Person p: model.getAddressBook().getPersonList()) {\n if (p.getProfileImage().value != null) {\n usedFiles.add(p.getProfileImage().value.substring(5)); //\"data\\...\"\n }\n }\n\n String userDir = System.getProperty(\"user.dir\");\n File dataDir = new File(userDir + File.separator + \"data\");\n File[] dataDirList = dataDir.listFiles();\n\n if (dataDirList == null) {\n return;\n }\n\n for (File child : dataDirList) {\n if (child.getName().lastIndexOf(\".\") == -1 && !usedFiles.contains(child.getName())) {\n child.delete();\n }\n }\n }", "public static void clearAll(Context ctx){\n \t\t// delete files\n \t\tfor( File f : getCachedFiles(ctx) ){\n \t\t\tf.delete();\n \t\t}\n \t}", "public final void clear(boolean cleanup) {\n for (val chapter : children) {\n chapter.parent = null;\n if (cleanup) {\n chapter.cleanup();\n }\n }\n children.clear();\n }", "public void clear() {\n tree.clear();\n }" ]
[ "0.6485812", "0.63754493", "0.6364128", "0.6327717", "0.6312406", "0.6249859", "0.62042433", "0.6121603", "0.6050401", "0.60426307", "0.6028437", "0.5997356", "0.5956276", "0.59164387", "0.5911308", "0.58798", "0.58653945", "0.58244413", "0.5823233", "0.5768402", "0.576451", "0.5742147", "0.5742147", "0.57238734", "0.57238734", "0.57238734", "0.57238734", "0.5710372", "0.56875443", "0.5680491", "0.56779087", "0.5671101", "0.56676793", "0.5652907", "0.56438553", "0.5632795", "0.5627908", "0.5627121", "0.5625387", "0.5625387", "0.5618292", "0.56154746", "0.56131166", "0.5608895", "0.5608442", "0.56028277", "0.55896795", "0.5583177", "0.5577983", "0.556172", "0.5555", "0.5552449", "0.5551007", "0.55484897", "0.554505", "0.5538163", "0.5535205", "0.5526089", "0.5516256", "0.5509528", "0.5509528", "0.5509528", "0.5488642", "0.5477957", "0.5462751", "0.5461871", "0.5461871", "0.5461871", "0.5442669", "0.54289657", "0.54244065", "0.54153574", "0.5406169", "0.54032", "0.54015636", "0.53991896", "0.5398303", "0.5390835", "0.5385193", "0.53829885", "0.53709835", "0.53605336", "0.53579897", "0.5353815", "0.53477454", "0.5346584", "0.5325665", "0.5325463", "0.5316408", "0.5312279", "0.5306651", "0.5300791", "0.5295632", "0.5287778", "0.528227", "0.528227", "0.528191", "0.5281134", "0.52721494", "0.5271013" ]
0.61533964
7
Merges any possible JSure release updates to local edits. All XML diff files in the workspace are updated.
public static void mergeJSureToLocal() { final File fluidRoot = PromisesXMLParser.getFluidXMLDir(); final File wsRoot = JSurePreferencesUtility.getJSureXMLDirectory(); mergeJSureToLocalHelper(wsRoot, fluidRoot); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateWorkspace()\n {\n workspace.update();\n }", "private boolean updateRepChanges(boolean sync) {\r\n\t\t\r\n\t\ttry {\t\t\t\t\r\n\t\t\t// get repository header since we need count of versions \r\n\t\t\t// i.e. headVersionNum\r\n\t\t\tString status = \"Status: [ACTION - Update Repository]...\";\r\n\t\t\t\r\n\t\t\tstatusBar.setText(status+\"Loading repository header to find headVersionNumber\");\r\n\t\t\tboolean existsRep = this.loadRepositoryHeader();\r\n\t\t\tif (!existsRep) {\r\n\t\t\t\tif (DEBUG) System.out.println(\"NOT FOUND\");\r\n\t\t\t\t// update from local Swoop log anyway if uri matches ontURI\r\n\t\t\t\tthis.updateRepFromLog(new URI(this.repBaseOntFld.getText()));\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"HeadVersionNum=\"+this.headVersionNumber);\r\n\t\t\r\n\t\t\t// note: all version commits have been made to URLs:\r\n\t\t\t// repositoryURL+\"#1\"...\"#headVersionNum\"\r\n\t\t\t// so iterate through versionCommits and see if value is null, implying it hasn't been updated\r\n\t\t\tfor (int ctr=1; ctr<=this.headVersionNumber; ctr++) {\r\n\t\t\t\tif (versionNodes[ctr]==null) {\r\n\t\t\t\t\t// form URI using ctr\r\n\t\t\t\t\tURI versionURI = new URI(this.repositoryURI+\"#\"+ctr);\r\n\t\t\t\t\tstatusBar.setText(status+\"Updating version at \"+versionURI);\r\n\t\t\t\t\tSet commitSet = client.findAnnotations(versionURI);\r\n\t\t\t\t\t// get single Description (version) at URI\r\n\t\t\t\t\tDescription version = (Description) commitSet.iterator().next();\r\n\t\t\t\t\tversionDescriptions[ctr] = version;\r\n\t\t\t\t\tTreeTableNode mainNode = this.parseSingleCommit(version);\r\n\t\t\t\t\t// set params on mainNode\r\n\t\t\t\t\tmainNode.swoopChange.isOnRepository = true;\r\n\t\t\t\t\tmainNode.location = version.getLocation();\r\n\t\t\t\t\tversionNodes[ctr] = mainNode;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// also if advanced is off, update from local copy as well\r\n//\t\t\tif (!advanced) {\r\n//\t\t\t\tthis.updateRepFromLog(new URI(this.repBaseOntFld.getText()));\r\n//\t\t\t}\r\n\t\t\t\r\n\t\t\t// resort all nodes under root\r\n\t\t\tthis.refreshRepTreeTable(true);\r\n\t\t\t\r\n\t\t\t// update version repository cache\r\n\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t\r\n\t\t\t// if sync is true, commit all changes to the synchronized ontology\r\n\t\t\tif (sync) {\r\n\t\t\t\tstatusBar.setText(status+\"Synching with Local Swoop Ontology\");\r\n\t\t\t\tthis.commitOntChanges(true);\t\t\t\t\r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"DONE\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void run()\n\t{\n\t\tString releaseFilename = null;\n\n\t\t// 1. Find the local release.xml file. Bail with exception if we cannot find it.\n\t\ttry\n\t\t{\n\t\t\treleaseFilename = _util.getLocalReleaseFile().getAbsolutePath();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\ts_log.error(\"Unexpected exception while attempting to find local release file: \"+e.getMessage(), e);\n\t\t\tif (_callback != null) {\n\t\t\t\t_callback.updateCheckFailed(e);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// 2. Load the local release.xml file as a ChannelXmlBean.\n\t\tChannelXmlBean installedChannelBean = _util.getLocalReleaseInfo(releaseFilename);\n\n\t\t// 3. & 3a. Get the release.xml file as a ChannelXmlBean from the server or\n\t\t// filesystem.\n\t\tChannelXmlBean currentChannelBean = getCurrentChannelXmlBean(installedChannelBean);\n\n\t\t// Record now as the last time we checked for updates.\n\t\t_settings.setLastUpdateCheckTimeMillis(\"\" + currentTimeMillis());\n\t\t_app.getSquirrelPreferences().setUpdateSettings(_settings);\n\n\t\t// 5. Is it the same as the local copy, which was placed either by the\n\t\t// installer or the last update?\n\t\tif (currentChannelBean == null)\n\t\t{\n\t\t\ts_log.warn(\"run: currentChannelBean was null - it is inconclusive whether or not the software \"\n\t\t\t\t+ \"is current : assuming that it is for now\");\n\t\t\tif (_callback != null) {\n\t\t\t\t_callback.updateCheckFailed(null);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tisUpToDate = currentChannelBean.equals(installedChannelBean);\n\t\t\tif (_callback != null)\n\t\t\t{\n\t\t\t\t_callback.updateCheckComplete(isUpToDate, installedChannelBean, currentChannelBean);\n\t\t\t}\n\t\t}\n\t}", "private void updateFiles() {\n\t}", "@Override\r\n\tpublic void updatePackage(PackageJour pj) {\n\t\tem.merge(pj);\r\n\t}", "@Override\r\n\tpublic void update(Resources resources) {\n\t\t\r\n\t}", "private void updateOntChanges() {\r\n\t\ttry {\r\n\t\t\tString status = \"Status: [ACTION - Update Local Ontology]...\";\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\tOWLOntology ont = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\tList changes = swoopModel.getChangesCache().getChangeList(ont.getURI());\r\n\t\t\t\tfor (int i=0; i<changes.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) changes.get(i);\r\n\t\t\t\t\tif (!isPresent(ontChanges, swc)) ontChanges.add(swc.clone());\r\n\t\t\t\t}\r\n\t\t\t\tthis.sortChanges(ontChanges);\r\n\t\t\t\tthis.refreshOntTreeTable(); \r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"DONE\");\r\n\t\t}\r\n\t\tcatch (OWLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "private void commitRepChanges() {\r\n\t\t\r\n\t\t// get repository info\r\n\t\tString repURL = repURLFld.getText();\r\n\t\tString boURI = repBaseOntFld.getText();\r\n\t\tthis.repositoryAuthor = repAuthorFld.getText();\r\n\t\tthis.reposityCreatedDate = repDateFld.getText();\r\n\t\t\r\n\t\tString status = \"Status: [ACTION - Commit to Repository]...\";\r\n\t\ttry {\r\n\t\t\tthis.repositoryURI = new URI(repURL);\r\n\t\t\tthis.baseOntologyURI = new URI(boURI);\r\n\t\t}\r\n\t\tcatch (URISyntaxException ex) {\r\n\t\t\tstatusBar.setText(status+\"Invalid Repository URL and/or Base Ontology URI\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// check if repository already exists\r\n\t\t\tboolean repExists = this.loadRepositoryHeader();\r\n\t\t\t\r\n\t\t\tif (!repExists) {\r\n\t\t\t\t// creating new repository\r\n\t\t\t\t// form repository header\r\n\t\t\t\tURI[] headerURI = new URI[1];\r\n\t\t\t\theaderURI[0] = new URI(this.repositoryURI+\"#header\");\r\n\t\t\t\t\r\n\t\t\t\tif (this.repositoryAuthor.equals(\"\") || this.reposityCreatedDate.equals(\"\")) {\r\n\t\t\t\t\tint opt = JOptionPane.showConfirmDialog(null, \"Repository Author and/or Date not specified. Continue?\", \"Creating Repository\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (opt == JOptionPane.NO_OPTION) return;\r\n\t\t\t\t}\r\n\t\t\t\t// create annotea description for header\r\n\t\t\t\tDescription header = new Description();\r\n\t\t\t\theader.setAnnotates(headerURI);\r\n\t\t\t\theader.setAuthor(this.repositoryAuthor);\r\n\t\t\t\theader.setCreated(this.reposityCreatedDate);\r\n\t\t\t\theader.setAnnotatedEntityDefinition(this.baseOntologyURI.toString());\r\n\t\t\t\tthis.headVersionNumber = 0;\r\n\t\t\t\theader.setBody(String.valueOf(this.headVersionNumber));\r\n\t\t\t\theader.setBodyType(\"text/html\");\r\n\t\t\t\theader.setAnnotationType(this.annotType);\r\n\t\t\t\tclient.post(header);\r\n\t\t\t\tstatusBar.setText(status+\"Ontology Repository Header posted at \"+headerURI[0]);\r\n\t\t\t\ttoggleRepOptions(false);\r\n\t\t\t\tversionDescriptions[0] = header;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// test changes\r\n\t\t\tboolean success = this.testChanges(true);\r\n\t\t\tif (success){\r\n\t\t\t\t// prompt user for comment on commit\r\n\t\t\t\tString commitComment = JOptionPane.showInputDialog(this, \"COMMIT New Version (Details):\");\r\n\t\t\t\t\r\n\t\t\t\tif (commitComment==null) {\r\n\t\t\t\t\tstatusBar.setText(status+\"CANCELLED\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// transform SwoopChange list to Description list (to save author, date, uris etc)\r\n\t\t\t\tList descList = transformChangeList(repChanges);\r\n\t\t\t\t// serialize each description into RDF/XML\r\n\t\t\t\t// and make it one large string with separator (\"[SWOOP-ANNOTATED-CHANGE-SET]\") in the middle\r\n\t\t\t\tString largeChangeSetString = \"\";\r\n\t\t\t\tfor (Iterator iter = descList.iterator(); iter.hasNext();) {\r\n\t\t\t\t\tDescription desc = (Description) iter.next();\r\n\t\t\t\t\tString descStr = desc.serializeIntoString(swoopModel);\t\t\t\t\t\r\n\t\t\t\t\tlargeChangeSetString += descStr + separator;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// ENCODE CDATA\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"CDATA\", \"ENCODED-CDATA\");\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"]]>\", \"]ENCODED]>\");\r\n\t\t\t\t\r\n\t\t\t\t// finally commit a single annotation with the entire changeset string in the body\r\n\t\t\t\t// also allow author to make annotation on commit\r\n\t\t\t\tDescription commit = new Description();\r\n\t\t\t\tcommit.setAuthor(swoopModel.getUserName());\r\n\t\t\t\tcommit.setCreated(swoopModel.getTimeStamp());\r\n\t\t\t\tcommit.setBody(largeChangeSetString);\r\n\t\t\t\tcommit.setBodyType(\"text/html\");\r\n\t\t\t\tcommit.setAnnotatedEntityDefinition(commitComment);\r\n\t\t\t\tcommit.setAnnotationType(this.annotType);\r\n\t\t\t\t\r\n\t\t\t\t// increment headVersionNum and write new commit\r\n\t\t\t\t// at repURL+\"#\"+headVersionNum\r\n\t\t\t\tthis.headVersionNumber++;\r\n\t\t\t\tURI[] annotates = new URI[1];\r\n\t\t\t\tannotates[0] = new URI(repositoryURI.toString()+\"#\"+String.valueOf(this.headVersionNumber));\r\n\t\t\t\tcommit.setAnnotates(annotates);\r\n\t\t\t\t// COMMIT!\r\n\t\t\t\tclient.post(commit);\r\n\t\t\t\t\r\n\t\t\t\t// post-process:\r\n\t\t\t\t// 1. rewrite rep header added newly incremented headVersionNumber \r\n\t\t\t\tthis.rewriteRepHeader();\r\n\t\t\t\t// 2. set newCommitNode params to current commit\r\n\t\t\t\tnewCommitNode.swoopChange.setAuthor(commit.getAuthor());\r\n\t\t\t\tnewCommitNode.swoopChange.setTimeStamp(commit.getCreated());\r\n\t\t\t\tnewCommitNode.swoopChange.setDescription(commit.getAnnotatedEntityDefinition());\r\n\t\t\t\t// 3. save newCommitNode in versionCommits array and Description in versionDescriptions array\r\n\t\t\t\tversionNodes[this.headVersionNumber] = newCommitNode;\r\n\t\t\t\tversionDescriptions[this.headVersionNumber] = commit;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t\t// 4. for each child of newCommitNode, set its swoopChange.onRepository value to true\r\n\t\t\t\tfor (Iterator iter3=newCommitNode.children.iterator(); iter3.hasNext();) {\r\n\t\t\t\t\tTreeTableNode child = (TreeTableNode) iter3.next();\r\n\t\t\t\t\tchild.swoopChange.isOnRepository = true;\r\n\t\t\t\t}\r\n\t\t\t\t// 5. create newCommitNode and add to root at the end\r\n\t\t\t\tnewCommitNode = new TreeTableNode(new SwoopChange(swoopModel.getUserName(), null, null, swoopModel.getTimeStamp(), \"New Version Commit\", true, false));\r\n\t\t\t\tnewCommitNode.swoopChange.isTopNode = true;\r\n\t\t\t\trepRoot.addChild(newCommitNode);\r\n\t\t\t\trepChanges = new ArrayList(); // also clear this\r\n\t\t\t\tstatusBar.setText(status+\"Committed New Version \"+this.headVersionNumber);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tstatusBar.setText(status+\"FAILED\");\r\n\t\t}\r\n\t\tthis.refreshRepTreeTable(false);\r\n\t}", "private void syncSources(String name) {\n TemplateSourceInfo info = (TemplateSourceInfo)mTemplateMap.get(name);\n Unit compUnit = (Unit)this.getCompilationUnit(name,null);\n File destFile = compUnit.getDestinationFile();\n if (destFile != null) {\n destFile.setLastModified(info.timestamp);\n }\n }", "public void update( )\n {\n JasperPortletHome.getInstance( ).update( this );\n }", "public static void status() {\n Set branchSet = commitPointers.readBranches().keySet();\n ArrayList<String> sortedBranches = (ArrayList) branchSet.stream().sorted().collect(Collectors.toList());\n String currBranch = commitPointers.readHeadCommit()[0];\n System.out.println(\"=== Branches ===\");\n for (String branch: sortedBranches) {\n if (currBranch.equals(branch)) {\n System.out.println(\"*\" + currBranch);\n } else {\n System.out.println(branch);\n }\n }\n stagingArea = Utils.readObject(STAGING_FILE, HashMap.class);\n\n ArrayList<String> sortedStaged = (ArrayList) stagingArea.keySet().stream().sorted().collect(Collectors.toList());\n System.out.println();\n System.out.println(\"=== Staged Files ===\");\n for (String staged : sortedStaged) {\n System.out.println(staged);\n }\n\n System.out.println();\n System.out.println(\"=== Removed Files ===\");\n stagingRemoveArea = Utils.readObject(STAGING_REMOVE_FILE, HashMap.class);\n ArrayList<String> sortedRemoved = (ArrayList) stagingRemoveArea.keySet().stream().sorted().collect(Collectors.toList());\n for (String removed : sortedRemoved) {\n System.out.println(removed);\n }\n System.out.println();\n\n System.out.println(\"=== Modifications Not Staged For Commit ===\");\n\n Commit Head = Utils.readObject(Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\"), Commit.class);\n //File blobs contains a SHAID + file name\n\n HashMap<String, String> modUntracked = new HashMap<>();\n\n //iterates through head Blobs\n for (HashMap.Entry<String, String> headfileBlob : Head.fileBlobs.entrySet()) {\n\n File cwdBFile = Utils.join(CWD, headfileBlob.getKey());\n\n if (!cwdBFile.exists() && !stagingRemoveArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(deleted)\");\n }\n else if (cwdBFile.exists()){\n\n Blob tempBlob = new Blob(headfileBlob.getKey(), cwdBFile);\n String tempBlobId = Utils.sha1(Utils.serialize(tempBlob));\n\n\n if(!tempBlobId.equals(headfileBlob.getValue())) {\n //if not in staging area\n if (!stagingArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n //TODO: IS THIS PART NECCESARY?\n else if (stagingArea.containsKey(headfileBlob.getKey()) && !stagingArea.get(headfileBlob.getKey()).equals(headfileBlob.getValue())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n }\n }\n }\n\n ArrayList<String> sortedModNames = (ArrayList) modUntracked.keySet().stream().sorted().collect(Collectors.toList());\n for (String modFileName : sortedModNames){\n System.out.println(modFileName + \" \" + modUntracked.get(modFileName));\n }\n System.out.println();\n\n\n\n ArrayList<String> untracked = new ArrayList<>();\n System.out.println(\"=== Untracked Files ===\");\n for (String cwdfile : CWD.list()) {\n if(!cwdfile.equals(\".gitlet\")) {\n File currfile = Utils.join(CWD, cwdfile);\n if (currfile.exists() && !Head.fileBlobs.containsKey(cwdfile)) {\n untracked.add(cwdfile);\n }\n }\n }\n\n untracked = (ArrayList) untracked.stream().sorted().collect(Collectors.toList());\n\n for (String untrackedName : untracked){\n System.out.println(untrackedName);\n }\n }", "public void mergeChanges(Gateway src) {\n if (src.genClient.getChangeLog() != null) {\n genClient.mergeChanges(new Gateway(src).getJSONObject(), src.genClient);\n }\n }", "public RelationalStatus checkCurrentVersion() {\n try {\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(url.openStream()));\n\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n String[] ver = inputLine.split(\"\\\\.\");\n RelationalStatus rs = compareVersions(ver[0], ver[1], ver[2].split(\"-\")[0]);\n if (rs == RelationalStatus.BEHIND) {\n log.log(Level.WARNING, \"[Updater] +------------------------------------------------+\");\n log.log(Level.WARNING, \"[Updater] You are running an outdated version of the plugin!\");\n log.log(Level.WARNING, \"[Updater] Most recent stable version: \" + inputLine);\n log.log(Level.WARNING, \"[Updater] Current version: \" + getVersion());\n log.log(Level.WARNING, \"[Updater] Please update from: \");\n log.log(Level.WARNING, \"[Updater] https://www.spigotmc.org/resources/tradeshop.32762/\");\n log.log(Level.WARNING, \"[Updater] +------------------------------------------------+\");\n in.close();\n return RelationalStatus.BEHIND;\n } else if (rs == RelationalStatus.AHEAD) {\n log.log(Level.WARNING, \"[Updater] +-----------------------------------------------------+\");\n log.log(Level.WARNING, \"[Updater] You are running a developmental version of the plugin!\");\n log.log(Level.WARNING, \"[Updater] Most recent stable version: \" + inputLine);\n log.log(Level.WARNING, \"[Updater] Current version: \" + getVersion());\n log.log(Level.WARNING, \"[Updater] Please notice that the build may contain critical bugs!\");\n log.log(Level.WARNING, \"[Updater] +-----------------------------------------------------+\");\n in.close();\n return RelationalStatus.AHEAD;\n } else {\n log.log(Level.INFO, \"[Updater] You are running the latest version of the plugin!\");\n in.close();\n return RelationalStatus.UP_TO_DATE;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n log.log(Level.WARNING, \"[Updater] +----------------------------------------------------+\");\n log.log(Level.WARNING, \"[Updater] Could not establish a connection to check for updates!\");\n log.log(Level.WARNING, \"[Updater] Current version: \" + getVersion());\n log.log(Level.WARNING, \"[Updater] Please check for new updates from: \");\n log.log(Level.WARNING, \"[Updater] https://www.spigotmc.org/resources/tradeshop.32762/\");\n log.log(Level.WARNING, \"[Updater] +----------------------------------------------------+\");\n }\n return RelationalStatus.UNKNOWN;\n }", "public void refresh(Document remoteDoc)\n throws PSFUDNullDocumentsException,\n PSFUDMergeDocumentsException\n {\n loadSnapshot();\n m_bOffline = false;\n if(null == remoteDoc)\n {\n if(null == m_snapshotDoc)\n {\n throw new PSFUDNullDocumentsException();\n }\n else\n {\n m_bOffline = true;\n setStatusCode(IPSFUDNode.STATUS_CODE_ABSENT);\n return;\n }\n }\n setStatusCode(IPSFUDNode.STATUS_CODE_NORMAL);\n\n //local snapshot is not available, remote is assigned to snapshot\n if(null == m_snapshotDoc)\n {\n m_snapshotDoc = remoteDoc;\n }\n //snapshot and remote are merged\n else\n {\n merge(remoteDoc);\n }\n try\n {\n save();\n }\n catch(IOException e)\n {\n throw new PSFUDMergeDocumentsException(e);\n }\n m_Element = m_snapshotDoc.getDocumentElement();\n }", "public static void updateResources(){\n for(int i = 0 ; i < releaseArr.length; i ++){\n resourceArr[i] += releaseArr[i];\n }\n }", "public void testViewDifferences() throws Exception {\n System.out.print(\".. Testing view differences ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n new Action(VERSIONING_MENU + \"|\" + DIFF, DIFF).perform(A_FileNode);\n TopComponentOperator editor = new TopComponentOperator(new EditorWindowOperator(), \"Diff: A_File.java\");\n JEditorPaneOperator headRevision = new JEditorPaneOperator(editor, 0);\n JEditorPaneOperator workingRevision = new JEditorPaneOperator(editor, 1);\n String headRevisionContents = \"/** This is testing file.\\n */\\n\\n public class Testing_File {\\n\\n }\\n\";\n String workingRevisionContents = \"/** This is testing A_File.java file.\\n */\\n\\n public class Testing_File {\\n int i;\\n }\\n\";\n if (!headRevisionContents.equals(headRevision.getText()) | !workingRevisionContents.equals(workingRevision.getText()))\n captureScreen(\"Error: Incorrect diff contents.\");\n StyledDocument headRevisionDocument = (StyledDocument) headRevision.getDocument();\n StyledDocument workingRevisionDocument = (StyledDocument) workingRevision.getDocument();\n Color headRevisionLine = (Color) headRevisionDocument.getLogicalStyle(1).getAttribute(StyleConstants.ColorConstants.Background);\n Color workingRevisionLine = (Color) workingRevisionDocument.getLogicalStyle(1).getAttribute(StyleConstants.ColorConstants.Background);\n if (!headRevisionLine.equals(MODIFIED_COLOR) | !workingRevisionLine.equals(MODIFIED_COLOR))\n captureScreen(\"Error: Incorrect color of modified line.\");\n int thirdLineHeadOffset = 30;\n int thirdLineWorkingOffset = 42;\n headRevisionLine = (Color) headRevisionDocument.getLogicalStyle(thirdLineHeadOffset).getAttribute(StyleConstants.ColorConstants.Background);\n Style lineStyle = workingRevisionDocument.getLogicalStyle(thirdLineWorkingOffset);\n if (!headRevisionLine.equals(REMOVED_COLOR) | (lineStyle != null))\n captureScreen(\"Error: Incorrect color of removed line.\");\n int fifthLineHeadOffset = 60;\n int fifthLineWorkingOffset = 72;\n lineStyle = headRevisionDocument.getLogicalStyle(fifthLineHeadOffset);\n workingRevisionLine = (Color) workingRevisionDocument.getLogicalStyle(fifthLineWorkingOffset).getAttribute(StyleConstants.ColorConstants.Background);\n if ((lineStyle != null) | !workingRevisionLine.equals(NEW_COLOR))\n captureScreen(\"Error: Incorrect color of new line.\");\n System.out.println(\". done !\");\n }", "private void checkForUpdates(){\n\t\tlong now = System.currentTimeMillis();\r\n\t\tif(propertiesMemento.getProperty(PropertiesMemento.UPDATE_STRING) != null){\r\n\t\t\tlong lastUpdateTime = Long.parseLong(propertiesMemento.getProperty(PropertiesMemento.UPDATE_STRING));\r\n\t\t\tlong day = 86400000; // milli-seconds in a day\r\n\t\t\tif((now - lastUpdateTime) < day){\r\n\t\t\t\treturn; // Don't need to check as a check has been made in the last 24hrs. \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsetStatusBarText(\"Checking for updates...\"); \r\n\t\t\r\n HttpClient webConnection = new HttpClient();\r\n \t\tProperties webSideProps; \r\n \t\ttry{\r\n \t\t\twebSideProps = webConnection.getProperties(\"http://www.zygomeme.com/version_prop.txt\");\r\n \t\t}\r\n \t\tcatch(SocketTimeoutException ste){\r\n \t\t\tlogger.debug(\"Can't connect to internet:\" + ste);\r\n \t\t\tsetStatusBarText(\"Unable to connect to internet to check for updates\");\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tcatch(UnknownHostException uhe){\r\n \t\t\tlogger.debug(\"Can't connect to internet:\" + uhe);\r\n \t\t\tsetStatusBarText(\"Unable to connect to internet to check for updates\");\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t\r\n \t\tif(webSideProps == null || webSideProps.isEmpty()){\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t\r\n \t\tint latestVersionAvailable = Integer.parseInt(webSideProps.get(\"version_number\").toString());\r\n \t\tif(latestVersionAvailable > PropertiesMemento.APP_VERSION_NUMBER){\r\n \t\t\tsetStatusBarText(\"A new version of ZygoMeme York is now available. You can now upgrade to Version \" + webSideProps.getProperty(\"version_string\") + \" \" + \r\n \t\t\t\t\twebSideProps.get(\"stage\")); \r\n \t\t}\r\n \t\telse{\r\n \t\t\tsetStatusBarText(\"Update check has been made - application is up to date.\"); \r\n \t\t}\r\n\r\n \t\t// To get here the properties will have been updated\r\n\t\tpropertiesMemento.setProperty(PropertiesMemento.UPDATE_STRING, \"\" + now);\r\n\r\n\t\t// Save the properties straight away so that the new last \"check for update\" time is recorded\r\n\t\ttry {\r\n\t\t\tpropertiesMemento.saveProperties(this);\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.warn(\"Unable to save properties\");\r\n\t\t}\r\n\t}", "private Resource deploySnapshotResource(Resource developmentResource) throws Exception {\n Version releasedBaseVersion = getReleasedBaseVersion(developmentResource);\n Resource snapshotResource = getHighestSnapshotResource(developmentResource, releasedBaseVersion);\n\n if (snapshotResource == null) {\n System.out.println(\"Uploading initial snapshot: \" + getString(developmentResource) + \" -> \" + getNextSnapshotVersion(releasedBaseVersion));\n return deploySnapshotResource(developmentResource, getNextSnapshotVersion(releasedBaseVersion));\n }\n\n System.out.println(\"Found existing snapshot: \" + getString(snapshotResource));\n if (getIdentity(developmentResource).equals(\"com.google.guava\")) {\n // FIXME workaround for BND#374\n System.out.println(\"Skipping snapshot diff on Google Guava to work around https://github.com/bndtools/bnd/issues/374\");\n return snapshotResource;\n }\n\n File developmentFile = m_developmentRepo.get(getIdentity(developmentResource), getVersion(developmentResource).toString(), Strategy.EXACT, null);\n File deployedFile = m_deploymentRepo.get(getIdentity(snapshotResource), getVersion(snapshotResource).toString(), Strategy.EXACT, null);\n\n boolean snapshotModified = false;\n if (getType(developmentResource).equals(\"osgi.bundle\")) {\n\n // Get a copy of the dep resource with the same version as the dev resource so we can diff diff.\n File comparableDeployedResource = getBundleWithNewVersion(deployedFile, getVersion(developmentResource).toString());\n\n // This may seem strange but the value in the dev resource manifest may be \"0\" which will not match\n // \"0.0.0\" during diff.\n File comparableDevelopmentResource = getBundleWithNewVersion(developmentFile, getVersion(developmentResource).toString());\n snapshotModified = jarsDiffer(comparableDeployedResource, comparableDevelopmentResource);\n }\n else {\n snapshotModified = filesDiffer(developmentFile, deployedFile);\n }\n\n if (snapshotModified) {\n System.out.println(\"Uploading new snapshot: \" + getString(developmentResource) + \" -> \" + getNextSnapshotVersion(getVersion(snapshotResource)));\n return deploySnapshotResource(developmentResource, getNextSnapshotVersion(getVersion(snapshotResource)));\n }\n else {\n System.out.println(\"Ignoring new snapshot: \" + getString(developmentResource));\n List<Resource> resultResources = findResources(m_deploymentRepo, getIdentityVersionRequirement(snapshotResource));\n if (resultResources == null || resultResources.size() == 0) {\n throw new IllegalStateException(\"Can not find target resource after put: \" + developmentResource);\n }\n return resultResources.get(0);\n }\n }", "private synchronized void refresh() {\n \t\t\tlastChangeStamp = changeStamp;\n \t\t\tlastFeaturesChangeStamp = featuresChangeStamp;\n \t\t\tlastPluginsChangeStamp = pluginsChangeStamp;\n \t\t\tchangeStampIsValid = false;\n \t\t\tfeaturesChangeStampIsValid = false;\n \t\t\tpluginsChangeStampIsValid = false;\n \t\t\tfeatures = null;\n \t\t\tplugins = null;\n \t\t}", "public void testUpdate() throws Exception {\n EntityManager manager = this.getEntityManager();\n EntityTransaction transaction = manager.getTransaction();\n\n DBUtil.initDB();\n if (transaction.isActive() == false) {\n transaction.begin();\n }\n\n\n Phase phase = manager.find(Phase.class, new Long(0));\n\n // first get a CompVersion entity.\n CompVersion compVersion = manager.find(CompVersion.class, new Long(0));\n\n CompVersionDates dates = new CompVersionDates();\n dates.setAggregationCompleteDate(new Date());\n dates.setAggregationCompleteDateComment(\"aggregationComplate\");\n dates.setCompVersion(compVersion);\n\n dates.setEstimatedDevDate(new Date());\n dates.setFinalSubmissionDate(new Date());\n dates.setFinalSubmissionDateComment(\"final\");\n dates.setInitialSubmissionDate(new Date());\n dates.setInitialSubmissionDateComment(\"initSubmission\");\n dates.setLevelId(new Long(1));\n dates.setPhase(phase);\n dates.setPhaseCompleteDate(new Date());\n dates.setPostingDate(new Date());\n dates.setPhaseCompleteDateComment(\"phaseCompleted\");\n\n dates.setWinnerAnnouncedDateComment(\"winner\");\n dates.setWinnerAnnouncedDate(new Date());\n dates.setTotalSubmissions(10);\n dates.setStatus(Status.ACTIVE);\n dates.setScreeningCompleteDateComment(\"screen\");\n dates.setScreeningCompleteDate(new Date());\n dates.setReviewCompleteDate(new Date());\n dates.setReviewCompleteDateComment(\"comment\");\n\n dates.setPrice(11.2);\n\n compVersion.getVersionDates().put(phase.getId(), dates);\n\n manager.merge(compVersion);\n\n transaction.commit();\n\n // find the entity.\n dates = compVersion.getVersionDates().get(phase.getId());\n final Long datesId = dates.getId();\n CompVersionDates ret = manager.find(CompVersionDates.class, datesId);\n\n assertNotNull(\"The CompVersionDates entity should be persisted.\", ret);\n\n // verify some field.\n assertEquals(\"Equal is expected\", \"screen\", ret.getScreeningCompleteDateComment());\n assertEquals(\"Equal is expected.\", \"comment\", dates.getReviewCompleteDateComment());\n assertEquals(\"Equal to 10.\", 10, dates.getTotalSubmissions());\n assertEquals(\"Equal to status.active.\", Status.ACTIVE, dates.getStatus());\n assertEquals(\"Equal is expected.\", new Long(1), dates.getLevelId());\n\n // update productionDateComment.\n dates.setProductionDateComment(\"update\");\n ret = manager.find(CompVersionDates.class, datesId);\n assertEquals(\"Equal is expected.\", \"update\", ret.getProductionDateComment());\n\n // update price.\n dates.setPrice(1111.0);\n ret = manager.find(CompVersionDates.class, datesId);\n assertEquals(\"Equal is expected.\", 1111.0, ret.getPrice());\n\n // update the aggregationCompleletDate.\n dates.setAggregationCompleteDate(new Date(111100000));\n ret = manager.find(CompVersionDates.class, datesId);\n assertEquals(\"Equal is expected.\", new Date(111100000), ret.getAggregationCompleteDate());\n\n // update aggregation completeDate comment\n dates.setAggregationCompleteDateComment(\"new comment\");\n ret = manager.find(CompVersionDates.class, datesId);\n assertEquals(\"Equal is expected.\", \"new comment\", ret.getAggregationCompleteDateComment());\n\n // update the level id.\n dates.setLevelId(new Long(11));\n ret = manager.find(CompVersionDates.class, datesId);\n assertEquals(\"Equal is expected.\", 11, ret.getLevelId().longValue());\n\n // update the status.\n dates.setStatus(Status.DECLINED);\n dates.setScreeningCompleteDate(new Date(111111111));\n dates.setScreeningCompleteDateComment(\"screen complete\");\n ret = manager.find(CompVersionDates.class, datesId);\n\n assertEquals(\"Equal is expected.\", Status.DECLINED, ret.getStatus());\n assertEquals(\"Equal is expected.\", \"screen complete\", ret.getScreeningCompleteDateComment());\n assertEquals(\"Equal is expected.\", new Date(111111111), ret.getScreeningCompleteDate());\n\n // update the EstimatedDevDate\n dates.setEstimatedDevDate(new Date(1111111));\n ret = manager.find(CompVersionDates.class, datesId);\n\n assertEquals(\"Equal is expected.\", new Date(1111111), ret.getEstimatedDevDate());\n\n // update FinalSubmissionDate information.\n dates.setFinalSubmissionDate(new Date());\n dates.setFinalSubmissionDateComment(\"final update\");\n ret = manager.find(CompVersionDates.class, datesId);\n assertEquals(\"Equal is expected.\", \"final update\", ret.getFinalSubmissionDateComment());\n\n // update total submission\n dates.setTotalSubmissions(111);\n ret = manager.find(CompVersionDates.class, datesId);\n assertEquals(\"Equal is expected.\", 111, ret.getTotalSubmissions());\n\n dates.setWinnerAnnouncedDate(new Date());\n dates.setWinnerAnnouncedDateComment(\"winner update\");\n ret = manager.find(CompVersionDates.class, datesId);\n\n assertEquals(\"Equal is expected.\", \"winner update\", ret.getWinnerAnnouncedDateComment());\n \n \n if (transaction.isActive() == false) {\n transaction.begin();\n }\n transaction.commit();\n }", "protected void resolveProjectDependencies() {\n // Create a set of old and new artifacts.\n final Set<String> oldReferences = new HashSet<String>();\n final Set<String> newReferences = new HashSet<String>();\n for (PropertyInfo pi:properties.values()) {\n if (pi != null) {\n if (pi.getPropertyDescriptor().getPropertyParser() == DefaultPropertyParsers.PATH_PARSER) {\n // Get original artifacts\n final List oldList = (List)pi.getOldValue();\n if ( oldList != null ) {\n final Iterator it = oldList.iterator();\n while (it.hasNext()) oldReferences.add(((VisualClassPathItem)it.next()).getRawText());\n }\n \n // Get artifacts after the edit\n final List newList = (List)pi.getValue();\n if ( newList != null ) {\n final Iterator it = newList.iterator();\n while (it.hasNext()) newReferences.add(((VisualClassPathItem)it.next()).getRawText());\n }\n } else if (pi.getPropertyDescriptor().getPropertyParser() == DefaultPropertyParsers.FILE_REFERENCE_PARSER) {\n oldReferences.add(pi.getOldRawValue());\n newReferences.add(pi.getRawValue());\n }\n }\n }\n \n // Create set of removed artifacts and remove them\n final Set<String> removed = new HashSet<String>( oldReferences );\n removed.removeAll( newReferences );\n final Set<String> added = new HashSet<String>(newReferences);\n added.removeAll(oldReferences);\n \n // 1. first remove all project references. The method will modify\n // project property files, so it must be done separately\n for ( String reference : removed ) {\n if (reference != null && !reference.startsWith(LIBS)) { //NOI18N\n refHelper.destroyReference(reference);\n }\n }\n \n // 2. now read project.properties and modify rest\n final EditableProperties ep = antProjectHelper.getProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH);\n boolean changed = false;\n \n for( final String reference:removed) {\n if (reference != null && reference.startsWith(LIBS)) { //NOI18N\n // remove helper property pointing to library jar if there is any\n ep.remove(reference.substring(2, reference.length()-1));\n changed = true;\n }\n }\n final File projDir = FileUtil.toFile(antProjectHelper.getProjectDirectory());\n for( String reference:added ) {\n if (reference != null && reference.startsWith(LIBS)) { //NOI18N\n // add property to project.properties pointing to relativized\n // library jar(s) if possible\n reference = reference.substring(2, reference.length()-1);\n final String value = relativizeLibraryClasspath(reference, projDir);\n if (value != null) {\n ep.setProperty(reference, value);\n ep.setComment(reference, new String[]{\n NbBundle.getMessage(J2MEProjectProperties.class, \"DESC_J2MEProps_CommentLine1\", reference), //NOI18N\n NbBundle.getMessage(J2MEProjectProperties.class, \"DESC_J2MEProps_CommentLine2\")}, false); //NOI18N\n changed = true;\n }\n }\n }\n if (changed) {\n antProjectHelper.putProperties(AntProjectHelper.PROJECT_PROPERTIES_PATH, ep);\n }\n \n }", "public void update() {\n \t\tissueHandler.checkAllIssues();\n \t\tlastUpdate = System.currentTimeMillis();\n \t}", "public void update(Main main);", "public void \n updateVersions\n (\n MappedSet<String,VersionID> versions,\n MappedSet<String,VersionID> offline, \n MappedSet<String,VersionID> inter,\n DoubleMap<String,VersionID,LogMessage> checkedInMessages\n )\n {\n pCheckedInMessages.clear();\n pVersionIDs.clear(); \n pVersionFields.clear(); \n pModeFields.clear(); \n pMethodFields.clear(); \n\n pVersionBox.removeAll();\n\n pMasterModeField.setSelectedIndex(1);\n pMasterMethodField.setSelectedIndex(0);\n\n if((versions == null) || (versions.isEmpty())) {\n pMasterBox.setVisible(false);\n pConfirmButton.setEnabled(false);\n }\n else {\n for(String name : versions.keySet()) {\n\tArrayList<VersionID> vids = new ArrayList<VersionID>(versions.get(name));\n\tCollections.reverse(vids);\n\tpVersionIDs.put(name, vids);\n\n\t{\n\t Component comps[] = UIFactory.createTitledPanels();\n\t JPanel tpanel = (JPanel) comps[0];\n\t JPanel vpanel = (JPanel) comps[1];\n\t\n\n\t UIFactory.createTitledTextField\n\t (tpanel, \"Latest Version:\", sTSize, \n\t vpanel, \"v\" + vids.get(0), sVSize, \n\t \"The revision number of the latest version.\");\n\n\t UIFactory.addVerticalSpacer(tpanel, vpanel, 12);\n\t \n\t {\n\t ArrayList<String> values = new ArrayList<String>();\n\t for(VersionID vid : vids) {\n\t String extra = \"\";\n\t {\n\t\tTreeSet<VersionID> ovids = offline.get(name);\n\t\tTreeSet<VersionID> ivids = inter.get(name);\n\t\tif((ovids != null) && ovids.contains(vid))\n\t\t extra = \" - Offline\";\n else if((ivids != null) && ivids.contains(vid))\n\t\t extra = \" - Intermediate\";\n\t }\n\t\t\n\t values.add(\"v\" + vid + extra);\n\t }\n\t \n\t JCollectionField field = \n\t UIFactory.createTitledCollectionField\n\t (tpanel, \"Check-Out Version:\", sTSize, \n\t vpanel, values, this, sVSize, \n\t \"The revision number of the version to check-out.\");\n\n\t ArrayList<String> messages = new ArrayList<String>();\n\t {\n\t TreeMap<VersionID,LogMessage> logHistory = checkedInMessages.get(name);\n\n\t if(logHistory != null) {\n\t\tfor(VersionID vid : vids) {\n\t\t LogMessage log = logHistory.get(vid);\n\n\t\t if(log != null)\n\t\t messages.add(log.getMessage());\n\t\t else\n\t\t messages.add(\"There is no log message for (\" + vid + \")\");\n\t\t}\n\t }\n\t }\n\n\t field.setSelectedIndex(0);\n\t field.setToolTipText(UIFactory.formatToolTip(messages.get(0), 4));\n\t field.addActionListener(this);\n\t field.setActionCommand(\"version-changed\");\n\n\t pVersionFields.put(name, field);\n\t pCheckedInMessages.put(field, messages);\n\t }\n\t \n\t UIFactory.addVerticalSpacer(tpanel, vpanel, 3);\n\n\t {\n\t JCollectionField field = \n\t UIFactory.createTitledCollectionField\n\t (tpanel, \"Check-Out Mode:\", sTSize, \n\t vpanel, CheckOutMode.titles(), sVSize, \n\t \"The criteria used to determine whether working versions should be replaced.\");\n\t \n\t field.setSelectedIndex(1);\n\t \n\t pModeFields.put(name, field);\n\t }\n\n\t UIFactory.addVerticalSpacer(tpanel, vpanel, 3);\n\t \n\t {\n\t JCollectionField field = \n\t UIFactory.createTitledCollectionField\n\t (tpanel, \"Check-Out Method:\", sTSize, \n\t vpanel, CheckOutMethod.titles(), sVSize,\n\t \"The method for replacing working files.\");\n\n\t field.setSelectedIndex(0);\n\n\t pMethodFields.put(name, field);\n\t }\n\n\t /* The 3rd parameter to the JDrawer constructor is the preferred width, \n\t which is set to the width of the title + value panels. */\n\t JDrawer drawer = new JDrawer(name + \":\", (JComponent) comps[2], \n\t sTSize+3 + sVSize, true);\n\n\t pVersionBox.add(drawer);\n\t}\n }\n \n pVersionBox.add(UIFactory.createFiller(sTSize+sVSize));\n\n boolean isSingle = (pVersionIDs.size() == 1);\n pHeaderLabel.setText(\"Check-Out \" + (isSingle ? \":\" : \"Multiple Nodes:\"));\n pMasterBox.setVisible(!isSingle);\n\n pConfirmButton.setEnabled(true);\n }\n\n pMainBox.revalidate();\n pMainBox.repaint();\n }", "public void automerge() {\n\t\tif (automerge) {\n\t\t\tfor(int i = 0; i<create_modifier+1;i++) {\n\t\t\t\tmerge();\n\t\t\t}\n\t\tif(autoidentify) {\n\t\t\tauto_identify_crystal(autoIdentifyTier); // replace this eventually\n\t\t}\n\t\t\t//collection();\n\t\t}\n\t}", "private void update() {\n\n\t\tthis.projects.clear();\n\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p instanceof Infrastructure) {\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\n\t\tfor (Project p : INSTANCE.getProjects()) {\n\t\t\tif (p instanceof Social) {\n\t\t\t\tthis.projects.addElement(p);\n\t\t\t}\n\t\t}\n\t}", "private void execute(String webContextURL) throws Exception\n {\n // process incremental synchronization\n if(!full) {\n SortedMap<String, byte[]> sourceFiles = new TreeMap<String, byte[]>();\n for(String file : FilesIterator.getRelativeNamesIterator(sourceDir)) {\n if(excludes != null && file.endsWith(excludes)) {\n continue;\n }\n if(includes != null && !file.endsWith(includes)) {\n continue;\n }\n sourceFiles.put(Files.path2unix(file), Files.getFileDigest(new File(sourceDir, file)));\n }\n\n HttpRmi rmi = new HttpRmi(webContextURL, AppsManager.class);\n rmi.setReturnType(new GType(List.class, String.class));\n rmi.setExceptions(IOException.class);\n\n final List<String> dirtyFiles = rmi.invoke(\"getDirtyFiles\", targetDir, sourceFiles, removeStaleFiles);\n if(dirtyFiles.isEmpty()) {\n return;\n }\n\n rmi = new HttpRmi(webContextURL, AppsManager.class);\n rmi.setExceptions(IOException.class);\n\n rmi.invoke(\"synchronize\", targetDir, new StreamHandler<FilesOutputStream>(FilesOutputStream.class)\n {\n @Override\n protected void handle(FilesOutputStream files) throws IOException\n {\n files.addFiles(sourceDir, dirtyFiles);\n }\n });\n }\n\n // process full synchronization\n else {\n HttpRmi rmi = new HttpRmi(webContextURL, AppsManager.class);\n rmi.setExceptions(IOException.class);\n\n rmi.invoke(\"synchronize\", targetDir, new StreamHandler<FilesOutputStream>(FilesOutputStream.class)\n {\n @Override\n protected void handle(FilesOutputStream files) throws IOException\n {\n files.addFiles(sourceDir);\n }\n });\n }\n }", "@Test\n public void testDiff() throws Exception {\n String newVersionJarPath = \"data/sample/jar/change4.jar\";\n String oldVersionJarPath = \"data/sample/jar/change3.jar\";\n String changePath = \"data/sample/changes_change4_change3.txt\";\n\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionCodePath, oldVersionCodePath, changePath, false);\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionJarPath, oldVersionJarPath, changePath, false);\n// CallRelationGraph callGraphForChangedPart = new CallRelationGraph(relationInfoForChangedPart);\n//\n// double thresholdForInitialRegion = 0.35;\n// RelationInfo oldRelationInfo = new RelationInfo(newVersionJarPath,false);\n// oldRelationInfo.setPruning(thresholdForInitialRegion);\n// RelationInfo newRelationInfo = new RelationInfo(oldVersionJarPath,false);\n// newRelationInfo.setPruning(thresholdForInitialRegion);\n//\n// CallRelationGraph oldCallGraph = new CallRelationGraph(oldRelationInfo);\n// CallRelationGraph newCallGraph = new CallRelationGraph(newRelationInfo);\n//\n// ChangedArtifacts changedArtifacts = new ChangedArtifacts();\n// changedArtifacts.parse(changePath);\n//\n// InitialRegionFetcher fetcher = new InitialRegionFetcher(changedArtifacts, newCallGraph, oldCallGraph);\n//\n// ExportInitialRegion exporter = new ExportInitialRegion(fetcher.getChangeRegion());\n\n }", "private void cleanupGitRemoteTags() {\n logger.info(\"Determine local and remote SCM-tags for SCM-repo\");\n logger.info(MOJO_LINE_BREAK);\n getRepositoryProvider().pull();\n List<Ref> refs = getRepositoryProvider().getLocalTags();\n if (!refs.isEmpty()) {\n boolean found = false;\n for (Ref ref : refs) {\n if (ref.getName().contains(preparedReleaseTag)) {\n found = true;\n logger.info(\n format(\"Delete local SCM-tag : {}\", ref.getName().substring(10)));\n getRepositoryProvider().deleteTag(ref.getName());\n logger.info(\n format(\"Delete remote SCM-tag : {}\", ref.getName().substring(10)));\n getRepositoryProvider().pushTag();\n }\n }\n if (!found) {\n logger.info(\"No local or remote prepared SCM-tags found\");\n }\n } else {\n logger.info(\"No local or remote prepared SCM-tags found\");\n }\n\n getRepositoryProvider().closeRepository();\n logger.info(MOJO_LINE_BREAK);\n }", "public void upateResources() {\r\n\t\tResourceBase resourcesBase = parent.getResources();\r\n\t\tresourcesBase.getAll().forEach((key, value) -> {\r\n\t\t\tif(resources.containsKey(key))\t//ak už je vypísaná\r\n\t\t\t\tresources.get(key).updateValue();\t//aktualizuje ju to\r\n\t\t\telse{\t//ináč\r\n\t\t\t\tint need = resourcesBase.getRequired(key);\r\n\t\t\t\tint have = resourcesBase.getOwned(key);\r\n\t\t\t\tOtherResourceViewer newViewer = new OtherResourceViewer(key,need, have, parent);\t//vytvorí nový viewer \r\n\t\t\t\tresources.put(key, newViewer);\t//pridá ho do zoznamu viewerov\r\n\t\t\t\tadd(newViewer);\t//aj do panelu\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void checkForUpdate(String currentVersion);", "public static void mergeLocalToJSure(String relativePathToFile) {\r\n\t\tfinal File fluidRoot = PromisesXMLParser.getFluidXMLDir();\r\n\t\tfinal File wsRoot = JSurePreferencesUtility.getJSureXMLDirectory();\r\n\r\n\t\tfinal File jsure = new File(fluidRoot, relativePathToFile);\r\n\t\tfinal File local = new File(wsRoot, relativePathToFile);\r\n\t\tboolean fileExistsOnDisk = local.isFile() && local.exists();\r\n\t\tif (!fileExistsOnDisk) {\r\n\t\t\tSLLogger.getLogger().log(Level.WARNING, I18N.err(239, local),\r\n\t\t\t\t\tnew Exception());\r\n\t\t\treturn; // Nothing to do\r\n\t\t}\r\n\t\tPromisesXMLMerge.mergeLocalXMLIntoJSureXML(local, jsure);\r\n\t}", "private void updateAPIResources(API api, int tenantId) throws APIManagementException {\n\n String tenantDomain = APIUtil.getTenantDomainFromTenantId(tenantId);\n APIIdentifier apiIdentifier = api.getId();\n // Get the new URI templates for the API\n Set<URITemplate> uriTemplates = api.getUriTemplates();\n // Get the existing local scope keys attached for the API\n Set<String> oldLocalScopeKeys = apiMgtDAO.getAllLocalScopeKeysForAPI(api.getUuid(), tenantId);\n // Get the existing URI templates for the API\n Set<URITemplate> oldURITemplates = apiMgtDAO.getURITemplatesOfAPI(api.getUuid());\n // Get the new local scope keys from URI templates\n Set<Scope> newLocalScopes = getScopesToRegisterFromURITemplates(api.getId().getApiName(), api.getOrganization(), uriTemplates);\n Set<String> newLocalScopeKeys = newLocalScopes.stream().map(Scope::getKey).collect(Collectors.toSet());\n // Get the existing versioned local scope keys attached for the API\n Set<String> oldVersionedLocalScopeKeys = apiMgtDAO.getVersionedLocalScopeKeysForAPI(api.getUuid(), tenantId);\n // Get the existing versioned local scope keys which needs to be removed (not updated) from the current updating\n // API and remove them from the oldLocalScopeKeys set before sending to KM, so that they will not be removed\n // from KM and can be still used by other versioned APIs.\n Iterator oldLocalScopesItr = oldLocalScopeKeys.iterator();\n while (oldLocalScopesItr.hasNext()) {\n String oldLocalScopeKey = (String) oldLocalScopesItr.next();\n // if the scope is used in versioned APIs and it is not in new local scope key set\n if (oldVersionedLocalScopeKeys.contains(oldLocalScopeKey)\n && !newLocalScopeKeys.contains(oldLocalScopeKey)) {\n //remove from old local scope key set which will be send to KM\n oldLocalScopesItr.remove();\n }\n }\n validateAndUpdateURITemplates(api, tenantId);\n apiMgtDAO.updateURITemplates(api, tenantId);\n if (log.isDebugEnabled()) {\n log.debug(\"Successfully updated the URI templates of API: \" + apiIdentifier + \" in the database\");\n }\n // Update the resource scopes of the API in KM.\n // Need to remove the old local scopes and register new local scopes and, update the resource scope mappings\n // using the updated URI templates of the API.\n deleteScopes(oldLocalScopeKeys, tenantId);\n addScopes(newLocalScopes, tenantId);\n Map<String, KeyManagerDto> tenantKeyManagers = KeyManagerHolder.getTenantKeyManagers(tenantDomain);\n for (Map.Entry<String, KeyManagerDto> keyManagerDtoEntry : tenantKeyManagers.entrySet()) {\n KeyManager keyManager = keyManagerDtoEntry.getValue().getKeyManager();\n if (keyManager != null) {\n try {\n keyManager.updateResourceScopes(api, oldLocalScopeKeys, newLocalScopes, oldURITemplates,\n uriTemplates);\n if (log.isDebugEnabled()) {\n log.debug(\"Successfully updated the resource scopes of API: \" + apiIdentifier +\n \" in Key Manager \"+ keyManagerDtoEntry.getKey()+\" .\");\n }\n } catch (APIManagementException e) {\n log.error(\"Error while updating resource to scope attachment in Key Manager \" +\n keyManagerDtoEntry.getKey(), e);\n }\n }\n }\n }", "void reloadInternal()\r\n {\r\n final ArrayList<Workspace> newWorkspaces = new ArrayList<Workspace>();\r\n\r\n final File[] files = FileUtil.getFiles(new File(FileUtil.getGenericPath(WORKSPACE_PATH)), new FileFilter()\r\n {\r\n @Override\r\n public boolean accept(File file)\r\n {\r\n // only accept xml file\r\n return FileUtil.getFileExtension(file.getPath(), true).toLowerCase().equals(EXT);\r\n }\r\n }, true, false, false);\r\n\r\n for (File file : files)\r\n {\r\n final Workspace workspace = new Workspace(file);\r\n\r\n // don't load the specific system workspace\r\n if (!workspace.getName().equals(Workspace.WORKSPACE_SYSTEM_NAME))\r\n {\r\n // empty workspace ?\r\n if (workspace.isEmpty())\r\n {\r\n // don't show this message for default workspace\r\n // if (!workspace.getName().equals(Workspace.WORKSPACE_DEFAULT_NAME))\r\n System.err.println(\"Empty workspace '\" + workspace.getName() + \"' is not loaded\");\r\n }\r\n else\r\n newWorkspaces.add(workspace);\r\n }\r\n }\r\n\r\n // sort list\r\n Collections.sort(newWorkspaces);\r\n\r\n // set workspace list\r\n workspaces = newWorkspaces;\r\n\r\n // notify change\r\n changed();\r\n }", "public void update() {\n\t\tthis.editorView.update();\n\t}", "interface Update\n extends UpdateStages.WithBranch,\n UpdateStages.WithFolderPath,\n UpdateStages.WithAutoSync,\n UpdateStages.WithPublishRunbook,\n UpdateStages.WithSecurityToken,\n UpdateStages.WithDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n SourceControl apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n SourceControl apply(Context context);\n }", "public void merge() throws Exception\n{\n Git git = getGit();\n MergeCommand merge = git.merge();\n ObjectId remoteOriginMaster = getRepo().resolve(\"refs/remotes/origin/master\");\n merge.include(remoteOriginMaster);\n MergeResult result = merge.call();\n System.out.println(\"Merge Result: \" + result.getMergeStatus());\n \n // Reset index\n getIndexSite().resetFiles(); _index = null;\n}", "private void update(VelocityContext context, String templateName)\n {\n long start = System.currentTimeMillis();\n long merged = 0;\n \n StringWriter sw = new StringWriter();\n try\n {\n final Template template = velocity.getTemplate(templateName, \"UTF-8\");\n template.merge(context, sw);\n merged = System.currentTimeMillis() - start;\n }\n catch (Exception e)\n {\n Utils.logError(\"Error while loading template\", e, true);\n return;\n }\n \n browser.setText(sw.toString());\n long displayed = System.currentTimeMillis() - start - merged;\n \n LoggerFactory.getLogger(DocumentList.class).debug(\n String.format(Locale.ENGLISH, \n \"Velocity [rendering: %.2f, display: %.2f]\",\n merged / 1000.0,\n displayed / 1000.0));\n }", "private void refresh() {\n updatePopulationInfo();\n\n // Update current production info\n updateProductionInfo();\n\n // Update the building grid\n updateBuildingInfo();\n\n // Update the warehouse display\n updateWarehouse();\n\n // Update the list of ships/carriers in port\n updateInPortInfo();\n\n // Update the list of cargo on the selected carrier\n updateCargoInfo();\n }", "private void updateVars()\n {\n\n }", "public boolean updateSoftware()\n\t{\n\t\tif (this.updater.checkNewSoftwareUpdate() == false)\n\t\t{\n\t\t\tSystem.out.println(\"Can't connect to the server\");\n\t\t}\n\t\t\n\t\tif (this.updater.isNeedUpdate() == false)\n\t\t{\n\t\t\tthis.view.setState(new String (\"There is no update\"));\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tthis.view.setState(new String(\"Need New Update\"));\n\t\tthis.view.addProgress();\n\t\t\n\t\tthis.view.setState(new String(\"Start Core Update\"));\n\t\tif (this.updater.updateCore() == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tthis.view.setState(new String(\"Core Update Done\"));\n\t\tthis.view.addProgress();\n\t\t\n\t\tthis.view.setState(new String(\"Start Navigation Update\"));\n\t\tif (this.updater.updateNavigation() == false)\n\t\t{\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t\tthis.view.addProgress();\n\t\tthis.view.setState(new String(\"Navigation Update Done\"));\n\t\t\n\t\tthis.view.setState(new String(\"Start Plugins List Update\"));\n\t\tif (this.updater.updatePluginList() == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tthis.view.addProgress();\n\t\tthis.view.setState(new String(\"Plugins List Update Done\"));\n\t\tthis.view.setState(new String(\"Start Workspace Update\"));\n\t\tif (this.updater.updateWorkspace() == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tthis.view.addProgress();\n\t\tthis.view.setState(new String(\"Workspace Update Done\"));\n\t\tthis.view.setState(new String(\"Installing Update\"));\n\t\tif (this.updater.patchUpdate() == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tthis.view.setState(new String(\"Medley Update Done\"));\n\t\tthis.view.addProgress();\n\t\tthis.view.showPopUpSucces();\n\t\treturn true;\n\t}", "public void updateContent(Map<String, ContentChange> files);", "public void performAdditionalUpdates() {\n\t\t// Default: do nothing - subclasses should override if needed\n\t}", "void update(FileInfo fileInfo);", "public void updateAllViews()\r\n { for (IView view : this.views)\r\n { view.updateView();\r\n }\r\n }", "private void setVersionsFromJiraData(TicketJira ticket, ArrayList<ReleaseJira> releases, ProportionMovingWindow proportion) {\r\n\t\t\r\n\t\tint ivIndex = 0;\r\n\t\tint ovIndex = 0;\r\n\t\tint fvIndex = 0;\r\n\t\tint index = 1;\r\n\t\tfor (ReleaseJira release: releases) {\r\n\t\t\tif(release.getName().equalsIgnoreCase(iv)) {\r\n\t\t\t\tivIndex = release.getID();\r\n\t\t\t}\r\n\t\t\tif(release.getName().equalsIgnoreCase(ov)) {\r\n\t\t\t\tovIndex = release.getID();\r\n\t\t\t}\r\n\t\t\tif(release.getName().equalsIgnoreCase(fv)) {\r\n\t\t\t\tfvIndex = release.getID();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tindex = index + 1;\r\n\t\t}\r\n\t\t\r\n\t\tif (ovIndex > fvIndex) {\r\n\t\t\tString msg = ticket.getTicketID() + ERRORMESSAGE;\r\n\t\t\tmylogger.log(Level.SEVERE, msg);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tfor (int i = ivIndex; i< fvIndex; i++) {\r\n\t\t\tav.add(ReleaseJira.getReleaseByID(releases, i).getName());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif(ovIndex != fvIndex) {\r\n\t\t\tproportion.updateWindow(ivIndex, ovIndex, fvIndex);\r\n\t\t}\r\n\t\t\r\n\t}", "boolean mergeResources() {\n return mergeResources == null ? !developerMode : mergeResources;\n }", "public void updateSource() {\n\t\t// Set the mode to recording\n\t\tmode = RECORD;\n\t\t// Traverse the source and record the architectures structure\n\t\tinspect();\n\t\t// Set the mode to code generation\n\t\tmode = GENERATE;\n\t\t// Traverse the source and calls back when key source elements are\n\t\t// missing\n\t\tinspect();\n\t\t// System.out.println(tree);\n\t\t// Add the source files that are missing\n\t\tArrayList<TagNode> tags = tree.getUnvisited();\n\t\tcreateSourceFiles(tags);\n\t}", "public void reload() {\n if ( _build_file != null ) {\n openBuildFile( _build_file );\n }\n }", "private void mergeAst(JsonObject targetCompUnit, JsonObject generatedCompUnit) {\n generatedCompUnit.getAsJsonArray(\"topLevelNodes\").forEach(item -> {\n JsonObject topLevelNode = item.getAsJsonObject();\n if (topLevelNode.get(\"kind\").getAsString().equals(\"Import\")) {\n if (!hasImport(targetCompUnit, topLevelNode)) {\n int startPosition = FormattingSourceGen.getStartPosition(targetCompUnit, \"imports\", -1);\n FormattingSourceGen.reconcileWS(topLevelNode,\n targetCompUnit.getAsJsonArray(\"topLevelNodes\"), targetCompUnit, startPosition);\n targetCompUnit.getAsJsonArray(\"topLevelNodes\").add(topLevelNode);\n }\n }\n\n if (topLevelNode.get(\"kind\").getAsString().equals(\"Service\")) {\n for (JsonElement astNode : targetCompUnit.getAsJsonArray(\"topLevelNodes\")) {\n JsonObject targetNode = astNode.getAsJsonObject();\n if (targetNode.get(\"kind\").getAsString().equals(\"Service\")) {\n if (targetNode.get(\"name\").getAsJsonObject().get(\"value\")\n .equals(topLevelNode.get(\"name\").getAsJsonObject().get(\"value\"))) {\n mergeServices(targetNode, topLevelNode, targetCompUnit);\n }\n }\n }\n }\n });\n }", "public void update(Site site);", "private static void annotateAndUploadTSVFiles(String sessionID, int updateID, int projectID, int referenceID, File[] tsvFiles, File workingDir) throws Exception {\n int[] annotationIDs = AnnotationManager.getInstance().getAnnotationIDs(sessionID, projectID, referenceID);\n CustomField[] customFields = ProjectManager.getInstance().getCustomVariantFields(sessionID, projectID, referenceID, ProjectManager.getInstance().getNewestUpdateID(sessionID, projectID, referenceID, false));\n annotateAndUploadTSVFiles(sessionID, updateID, projectID, referenceID, annotationIDs, customFields, tsvFiles, workingDir);\n }", "private void maintainMergeLocal() {\n logger.info(\"Maintaining Merge Local\");\n try {\n Bin mergeBin;\n synchronized (geometricParts) {\n mergeBin = geometricParts.findMergeCandidates();\n }\n if (!mergeBin.isEmpty()) {\n File indexShard = getNextIndexShardFolder(mergeBin.size + 1);\n // otherwise there's something to merge\n logger.info(\"Performing merge!\");\n\n\n // merge the shards\n Parameters p = this.globalParameters.clone();\n // override each of these particular parameters\n p.set(\"indexPath\", indexShard.getAbsolutePath());\n p.set(\"inputPath\", new ArrayList<>(mergeBin.getBinPaths()));\n p.set(\"renumberDocuments\", false);\n\n App.run(\"merge-index\", p, System.out);\n\n // should make sure that these two are uninteruppable\n synchronized (geometricParts) {\n geometricParts.add(mergeBin.size + 1, indexShard.getAbsolutePath());\n geometricParts.removeShards(mergeBin);\n updateIndex();\n }\n\n // now can delete the merged indexshard folders...\n for (String file : mergeBin.getBinPaths()) {\n FSUtil.deleteDirectory(new File(file));\n }\n\n logger.info(\"Done merging.\");\n }\n } catch (Exception ex) {\n Logger.getLogger(GeometricIndex.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "protected void refreshFromWorkspace() {\r\n\t\r\n\t\tif (fTreeViewer != null) {\r\n\t\t\tfTreeViewer.setInput(null);\r\n\t\t}\t\t\r\n\t\r\n\t\tif (fWorkspaceObjects == null ) {\r\n\t\t\tfWorkspaceObjects = resourceContentProvider.getElements( ResourcesPlugin.getWorkspace().getRoot() );\r\n\t\t}\t\t\r\n\t\t\t\t \t\r\n\t\tif (fFilteredList != null) {\r\n\t\t\t\r\n\t\t\tfFilteredList.setEnabled(true);\r\n\t\t\tfFilteredList.setAllowDuplicates(showDuplicates);\r\n\t\t\tfFilteredList.setElements(contentProvider.getElements( fWorkspaceObjects ));\t\t\t\t\t\t\r\n\t\t}\t\t\r\n\t}", "public void mergeConflictedFiles(final Map<String, NewData> conflictedFiles)\n \t{\n \t\tList<String> working = new LinkedList<String>();\n \t\tList<String> conflicted = new LinkedList<String>();\n \t\tString s=\"\";\n \t\tPatch diff = new Patch();\n \t\t\n \t\tfor(String str:conflictedFiles.keySet()){\n \t\t\n \t\t\tBufferedReader reader = new BufferedReader(new StringReader(conflictedFiles.get(str).getFileContent()));\n \t\t\ttry {\n \t\t\t\twhile ((s = reader.readLine()) != null)\n \t\t\t\t\tconflicted.add(s);\n \t\t\t} catch (IOException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t\t\n \t\tFile f = new File(this.getRoot() + File.separatorChar +str);\n \t\tif(!f.exists()){\n \t\t\tthis.pCreateFile(this.getRoot() + File.separatorChar +str);\t\n \t\t\tworking=conflicted;\n \t\t}\n \t\telse{\n \t\tworking = this.readFile(this.getRoot()+ File.separatorChar +str);\n \t\t\n \t\tdiff=this.getSnapshot().getDiff(working, conflicted);\n \t\t\n \t\tfor(Delta delta:diff.getDeltas()){\t\n \t\t\n\t\t\tfor(int i=delta.getRevised().getPosition(), j=0;j<delta.getRevised().getLines().size();++i,++j)\n\t\t\t\tworking.set(i, working.get(i)+\" <<<O==merge==R>>> \"+delta.getRevised().getLines().get(j));\n \t\t\t}\n \t\t}\n \t\tthis.getFilelist().get(str).putAll(conflictedFiles.get(str).getLclock());\n \t\t\n \t\tthis.writeFile(this.getRoot()+ File.separatorChar +str, working);\n \t\t\n \t\tworking.clear();\n \t\tconflicted.clear();\n \t\t}\n \t}", "void mergeFileProperties() {\n JMeterProperty fileName = getProperty(FILE_NAME);\n JMeterProperty paramName = getProperty(FILE_FIELD);\n JMeterProperty mimeType = getProperty(MIMETYPE);\n HTTPFileArg oldStyleFile = new HTTPFileArg(fileName, paramName, mimeType);\n \n HTTPFileArgs fileArgs = getHTTPFileArgs();\n \n HTTPFileArgs allFileArgs = new HTTPFileArgs();\n if (oldStyleFile.isNotEmpty()) { // OK, we have an old-style file definition\n allFileArgs.addHTTPFileArg(oldStyleFile); // save it\n // Now deal with any additional file arguments\n if (fileArgs != null) {\n HTTPFileArg[] infiles = fileArgs.asArray();\n for (HTTPFileArg infile : infiles) {\n allFileArgs.addHTTPFileArg(infile);\n }\n }\n } else {\n if (fileArgs != null) { // for new test plans that don't have FILE/PARAM/MIME properties\n allFileArgs = fileArgs;\n }\n }\n // Updated the property lists\n setHTTPFileArgs(allFileArgs);\n removeProperty(FILE_FIELD);\n removeProperty(FILE_NAME);\n removeProperty(MIMETYPE);\n }", "private void copyAndSave()\n {\n // create new branch\n if (NEW_BRANCH.equals(selectedBranch)) {\n createAndSetNewBranch();\n }\n List<String> updatePages = getAllPageIdsForUpdate();\n\n // copy current filestats entry to source target branch\n copyAndSaveFileStats(branch, selectedBranch, updatePages);\n\n // add new page information to filestats of new branch\n updateFileStats(FileState.valueOf(newPageState), selectedAssignee, selectedBranch, updatePages);\n\n // save page(s) in new branch\n wikiContext.runInTenantContext(selectedBranch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().saveElement(wikiContext, pageToUpdate, true);\n }\n return null;\n }\n });\n\n // remove page(s) in old branch\n wikiContext.runInTenantContext(branch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n for (GWikiElement pageToUpdate : getAllPagesForUpdate()) {\n wikiContext.getWikiWeb().removeWikiPage(wikiContext, pageToUpdate);\n }\n return null;\n }\n });\n }", "public static void updateRepositoryList() {\n \t\tassetLoader.removeAllRepositories();\n \t\tfor (String repo : MapTool.getCampaign().getRemoteRepositoryList()) {\n \t\t\tassetLoader.addRepository(repo);\n \t\t}\n \t}", "private void applyMerge() {\n try {\n SolutionTrajectory trajectory = solution.getShortestTrajectory();\n trajectory.setModel(this.scope);\n trajectory.doTransformation();\n applied = true;\n } catch (IncQueryException e) {\n logger.error(e.getMessage(), e);\n }\n }", "private boolean performUpdate (WFSUpdate update) throws Exception {\r\n boolean success = true;\r\n Debug.debugMethodBegin (this, \"performUpdate (WFSUpdate)\");\r\n DBAccess osa = null;\r\n java.sql.Connection con = null;\r\n org.deegree.services.wfs.configuration.Connection connect =\r\n config.getConnection();\r\n \r\n try {\r\n // get jdbc connection and access object for oracle spatial\r\n con = pool.acuireConnection (connect.getDriver (),\r\n connect.getLogon (),\r\n connect.getUser (),\r\n connect.getPassword ());\r\n osa = new DBAccess (con);\r\n osa.setAutoCommit (false);\r\n\r\n FeatureType ft = config.getFeatureType (update.getTypeName());\r\n Set fIDs = getFeatureIDs (ft, update.getFilter(), osa);\r\n if (!fIDs.isEmpty ()) {\r\n TableDescription masterTable = ft.getMasterTable ();\r\n PointRowSelector selector = new PointRowSelector (\r\n masterTable, masterTable.getIdField (), fIDs, osa, ft);\r\n\r\n // create a new HashMap that contains the table names as\r\n // keys, and an ArrayList of changes that are to be performed\r\n // in that table (String-array with 2 values)\r\n HashMap changes = new HashMap (); \r\n HashMap properties = update.getProperties();\r\n\r\n Iterator it = properties.keySet().iterator ();\r\n while (it.hasNext ()) {\r\n String name = (String) it.next ();\r\n String value = (String) properties.get (name);\r\n\r\n if (name.startsWith (\"/\")) {\r\n name = name.substring (1);\r\n }\r\n name = name.replace ('.', '/');\r\n \r\n if (!ft.isPropertyKnown (name)) {\r\n throw new Exception (\r\n \"Property '\" + name.replace ('/', '.') + \"' is not known to Feature '\"\r\n + ft.getName() + \"' (not mapped?)\");\r\n } \r\n \r\n // get the datastore-mapping of the property\r\n String mapping = null;\r\n String [] s_ = ft.getDatastoreField (name);\r\n\r\n if (s_ == null) {\r\n throw new Exception (name +\r\n \" is not known by the datastore\");\r\n } else {\r\n mapping = s_[0];\r\n }\r\n\r\n String [] parts = splitString (mapping);\r\n String tableName = parts [0].toUpperCase ();\r\n String fieldName = parts [1].toUpperCase ();\r\n \r\n ArrayList list = (ArrayList) changes.get (tableName);\r\n if (list == null) {\r\n list = new ArrayList ();\r\n }\r\n String [] change = new String [2];\r\n change [0] = fieldName;\r\n change [1] = value;\r\n list.add (change);\r\n\r\n changes.put (tableName, list);\r\n }\r\n \r\n success = performUpdate (selector, changes);\r\n osa.commit ();\r\n }\r\n } catch (Exception e) { \r\n success = false;\r\n System.out.println (\"Exception: \" + e);\r\n if (osa != null) osa.rollback ();\r\n Debug.debugException (e, \"\");\r\n }\r\n if (con != null) {\r\n pool.releaseConnection (con, connect.getDriver (),\r\n connect.getLogon (),\r\n connect.getUser (),\r\n connect.getPassword ());\r\n } \r\n\r\n Debug.debugMethodEnd ();\r\n return success;\r\n }", "void update(DiffReader diff) throws ModelRuntimeException;", "private void mergeServices(JsonObject originService, JsonObject targetService, JsonObject tree) {\n mergeAnnotations(originService, targetService, tree);\n List<JsonObject> targetServices = new ArrayList<>();\n\n for (JsonElement targetItem : targetService.getAsJsonArray(\"resources\")) {\n JsonObject targetResource = targetItem.getAsJsonObject();\n boolean matched = false;\n for (JsonElement originItem : originService.getAsJsonArray(\"resources\")) {\n JsonObject originResource = originItem.getAsJsonObject();\n if (matchResource(originResource, targetResource)) {\n matched = true;\n mergeAnnotations(originResource, targetResource, tree);\n }\n }\n\n if (!matched) {\n targetResource.getAsJsonObject(\"body\").add(\"statements\", new JsonArray());\n targetServices.add(targetResource);\n }\n }\n\n targetServices.forEach(resource -> {\n int startIndex = FormattingSourceGen.getStartPosition(originService, \"resources\", -1);\n FormattingSourceGen.reconcileWS(resource, originService.getAsJsonArray(\"resources\"), tree,\n startIndex);\n originService.getAsJsonArray(\"resources\").add(resource);\n });\n }", "public static void main(String[] args) {\n\t\t//if the first argument is \"-unittest\"\n\t\tif(args.length>0 && \"-unittest\".equalsIgnoreCase(args[0].trim())){\n\t\t\tinitSharedUpdater();\n\n\t\t\tLibraryUpdate.__testSharedUpdater();\n\t\t\ttry {\n\t\t\t\tLibraryUpdate.__testUpzipSkipPredicator();\n\t\t\t} catch (SeleniumPlusException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tLibraryUpdate._sharedUpdater.close();\n\t\t\treturn;\n\t\t}\n\n\t\tLibraryUpdate updater = null;\n\t\tint exitcode = 0;\n\t\ttry{\n\t\t\tupdater = new LibraryUpdate();\n\n\t\t\t//Sufficient valid args provided\n\t\t\tif(!updater.processArgs(args)){\n\t\t\t\tif(! updater.canceled){\n\t\t\t\t\tString message = \"Please provide all *required* parameters.\";\n\t\t\t\t\tupdater.console.println(message);\n\t\t\t\t\thelp(updater.console);\n\t\t\t\t\tif(!updater.isQuiet()) JOptionPane.showMessageDialog(null, message +\"\\n\"+ LibraryUpdate.HELP_STRING, updater.prompt, JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\texitcode = -1;\n\t\t\t\t}else{\n\t\t\t\t\tString message = \"\\nNo Download or Update will be attempted.\";\n\t\t\t\t\tupdater.console.println(message);\n\t\t\t\t\tif(!updater.isQuiet()) JOptionPane.showMessageDialog(null, message, updater.prompt, JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t\texitcode = -1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tString message = \"Modified \"+ updater.modifiedFiles +\", creating \"+ updater.backupFiles +\" backups.\";\n\t\t\t\tupdater.progressor.setProgressInfo(100,message);\n\t\t\t\tif(!updater.isQuiet()) JOptionPane.showMessageDialog(null, message, updater.prompt, JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\texitcode = updater.modifiedFiles;\n\t\t\t}\n\t\t}catch(Exception x){\n\t\t\tupdater.errors.println(x.getMessage());\n\t\t\thelp(updater.errors);\n\t\t\tupdater.progressor.setProgressInfo(100,x.getMessage(), LogConstants.ERROR);\n\t\t\tif(!updater.isQuiet()) JOptionPane.showMessageDialog(null, x.getMessage()+\"\\n\"+ LibraryUpdate.HELP_STRING, updater.prompt, JOptionPane.ERROR_MESSAGE);\n\t\t\texitcode = -2;\n\t\t}finally{\n\t\t\ttry{\n\t\t\t\tString mainclass = org.safs.tools.MainClass.deduceMainClass();\n\t\t\t\tif( LibraryUpdate.class.getName().equals(mainclass) ||\n\t\t\t\t\t\tmainclass.endsWith(\"safsupdate.jar\")\t)\n\t\t\t\t\tSystem.exit(exitcode);\n\t\t\t}catch(Throwable ignore){}\n\t\t}\n\n\t}", "public void updateResources(List<Resource> resources) {\n\t\t\n\t}", "public void update(Gedcomx doc) {\n this.doc = doc;\n sourceDescriptionMap = getSourceDescriptionMap(doc);\n personMap = getPersonMap(doc);\n recordDescriptorMap = getRecordDescriptorMap(doc);\n agentMap = getAgentMap(doc);\n placeMap = getPlaceMap(doc);\n mainSourceDescription = getSourceDescription(doc.getDescriptionRef());\n }", "public void projectModified() { }", "public void projectModified() { }", "void updateTransformQueueVersions() {\n\t}", "Snapshot.Update update();", "void update(String page, Collection<String> paths, Collection<String> refreshPaths);", "public String compareFiles(String repoName, FileDTO oldFile, FileDTO newFile) throws IOException {\r\n\t\tlogger.info(\"Comparison of \" + oldFile.getFileName());\r\n\r\n\t\tAstComparator diffTool = new AstComparator();\r\n\t\ttry {\r\n\t\t\tDiff result = diffTool.compare(storageService.getFile(repoName, oldFile.getAppFileName(), \"\"),\r\n\t\t\t\t\tstorageService.getFile(repoName, newFile.getAppFileName(), \"\"));\r\n\t\t\tlogger.info(\"Result : \" + ((result != null) ? result.getRootOperations().size() : \"empty\"));\r\n\r\n\t\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\t\tArrayNode actionsArrayNode = mapper.createArrayNode();\r\n\r\n\t\t\tfor (Operation op : result.getRootOperations()) {\r\n\r\n\t\t\t\tAction action = op.getAction();\r\n\r\n\t\t\t\tCtElement element = (CtElement) action.getNode().getMetadata(SpoonGumTreeBuilder.SPOON_OBJECT);\r\n\r\n\t\t\t\tObjectNode jsonAction = mapper.createObjectNode();\r\n\r\n\t\t\t\t// action name\r\n\t\t\t\tjsonAction.put(\"action\", action.getClass().getSimpleName());\r\n\r\n\t\t\t\t// node type\r\n\t\t\t\tString nodeType = element.getClass().getSimpleName();\r\n\t\t\t\tnodeType = nodeType.substring(2, nodeType.length() - 4);\r\n\t\t\t\tjsonAction.put(\"nodeType\", nodeType);\r\n\r\n\t\t\t\tObjectNode actionPositionJSON = mapper.createObjectNode();\r\n\t\t\t\tif (element.getPosition() != null) {\r\n\t\t\t\t\tactionPositionJSON.put(\"line\", element.getPosition().getLine());\r\n\t\t\t\t\tactionPositionJSON.put(\"sourceStart\", element.getPosition().getSourceStart());\r\n\t\t\t\t\tactionPositionJSON.put(\"sourceEnd\", element.getPosition().getSourceEnd());\r\n\t\t\t\t\tactionPositionJSON.put(\"endLine\", element.getPosition().getEndLine());\r\n\r\n\t\t\t\t}\r\n\t\t\t\tif (action instanceof Delete || action instanceof Update || action instanceof Move) {\r\n\t\t\t\t\tjsonAction.put(\"oldLocation\", actionPositionJSON);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tjsonAction.put(\"newLocation\", actionPositionJSON);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// action position\r\n\t\t\t\tif (action instanceof Move || action instanceof Update) {\r\n\t\t\t\t\tCtElement elementDest = (CtElement) action.getNode()\r\n\t\t\t\t\t\t\t.getMetadata(SpoonGumTreeBuilder.SPOON_OBJECT_DEST);\r\n\r\n\t\t\t\t\tObjectNode actionDestPositionJSON = mapper.createObjectNode();\r\n\t\t\t\t\tif (elementDest.getPosition() != null) {\r\n\t\t\t\t\t\tactionDestPositionJSON.put(\"line\", elementDest.getPosition().getLine());\r\n\t\t\t\t\t\tactionDestPositionJSON.put(\"sourceStart\", elementDest.getPosition().getSourceStart());\r\n\t\t\t\t\t\tactionDestPositionJSON.put(\"sourceEnd\", elementDest.getPosition().getSourceEnd());\r\n\t\t\t\t\t\tactionDestPositionJSON.put(\"endLine\", elementDest.getPosition().getEndLine());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjsonAction.put(\"newLocation\", actionDestPositionJSON);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if all actions are applied on the same node print only the\r\n\t\t\t\t// first action\r\n\t\t\t\tif (element.equals(element) && action instanceof Update) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tactionsArrayNode.add(jsonAction);\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(\"> Details : \" + actionsArrayNode.toString());\r\n\r\n\t\t\treturn actionsArrayNode.toString();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage(), e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public ReleaseAnalysisReport analyze(Release existingRelease, Release replacingRelease, boolean isForceUpdate,\n\t\t\tList<String> appNamesToUpdate) {\n\t\t// For now, assume single package with no deps or package with same number of deps\n\t\tList<? extends SpringCloudDeployerApplicationManifest> existingApplicationSpecList = this.applicationManifestReader\n\t\t\t\t.read(existingRelease.getManifest().getData());\n\t\tList<? extends SpringCloudDeployerApplicationManifest> replacingApplicationSpecList = this.applicationManifestReader\n\t\t\t\t.read(replacingRelease.getManifest().getData());\n\t\tif (existingRelease.getPkg().getDependencies().size() == replacingRelease.getPkg().getDependencies()\n\t\t\t\t.size()) {\n\t\t\tif (existingRelease.getPkg().getDependencies().size() == 0) {\n\t\t\t\tlogger.info(\"Existing Package and Upgrade Package both have no dependent packages.\");\n\t\t\t\treturn analyzeTopLevelPackagesOnly(existingApplicationSpecList,\n\t\t\t\t\t\treplacingApplicationSpecList,\n\t\t\t\t\t\texistingRelease, replacingRelease, isForceUpdate, appNamesToUpdate);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (existingRelease.getPkg().getTemplates().size() == 0 &&\n\t\t\t\t\t\treplacingRelease.getPkg().getTemplates().size() == 0) {\n\t\t\t\t\tlogger.info(\"Existing Package and Upgrade package both have no top level templates\");\n\t\t\t\t\treturn analyzeDependentPackagesOnly(existingApplicationSpecList,\n\t\t\t\t\t\t\treplacingApplicationSpecList,\n\t\t\t\t\t\t\texistingRelease, replacingRelease, isForceUpdate, appNamesToUpdate);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthrow new SkipperException(\n\t\t\t\t\t\t\t\"Can not yet compare package with top level templates and dependencies\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new SkipperException(\n\t\t\t\t\t\"Can not yet compare existing package and to be released packages with different sizes.\");\n\t\t}\n\t}", "private void updateRepFromLog(URI phyOntURI) {\r\n\t\t// first get ontology whose physical uri matches \r\n\t\tURI logOntURI = null;\r\n\t\tfor (Iterator iter = swoopModel.getOntologies().iterator(); iter.hasNext();) {\r\n\t\t\tOWLOntology ont = (OWLOntology) iter.next(); \r\n\t\t\ttry {\r\n\t\t\t\tif (ont.getPhysicalURI().equals(phyOntURI)) {\r\n\t\t\t\t\tlogOntURI = ont.getLogicalURI();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (OWLException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (logOntURI==null) {\r\n\t\t\tSystem.out.println(\"No Ontology in Swoop has physical URI: \"+phyOntURI);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// get changes from swoopModel.changeCache\r\n\t\tList changes = swoopModel.getChangesCache().getChangeList(logOntURI);\r\n\t\tList allRepChanges = this.getDescendantChanges(repRoot);\r\n\t\tallRepChanges.removeAll(this.getDescendantChanges(newCommitNode));\r\n\t\tfor (Iterator iter = new ArrayList(changes).iterator(); iter.hasNext();) {\r\n\t\t\tSwoopChange swc = (SwoopChange) iter.next();\r\n\t\t\tif (this.isPresent(allRepChanges, swc)) changes.remove(swc);\r\n\t\t}\r\n\t\t\r\n\t\tthis.sortChanges(changes);\r\n\t\t\r\n\t\t// add (new) repChanges to newCommit node directly\r\n\t\tnewCommitNode.children = new Vector();\r\n\t\tfor (Iterator iter = changes.iterator(); iter.hasNext();) {\r\n\t\t\tSwoopChange swc = (SwoopChange) iter.next();\r\n\t\t\tTreeTableNode swcNode = new TreeTableNode(swc);\r\n\t\t\tnewCommitNode.addChild(swcNode);\t\r\n\t\t}\t\t\t\t\t\r\n\t\tthis.refreshRepTreeTable(true);\t\r\n\t}", "private void updateAll() {\n updateAction();\n updateQueryViews();\n }", "void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);", "public void plan(String studyRepositoryURL, File exportedWorkspace, int finalConfiguration, String workspaceStudy) throws Exception {\n String url_oceano = \"http://localhost:8092/oceano/JSONServlet\";\n// String url_oceano = \"http://10.0.0.102:8092/oceano/JSONServlet\";\n// String url_oceano = \"https://gems.ic.uff.br/oceano/JSONServlet\";\n\n\n // List the repository\n list(studyRepositoryURL);\n // Create study workspace\n\n File studyWorkspace = createWorkSpace(workspaceStudy);\n // Check-out the configuration\n CheckoutCiclo checkoutCiclo = new CheckoutCiclo();\n\n CheckOut remoto = checkoutCiclo.remoto(studyRepositoryURL, \"marapa\", \"marapao\", studyWorkspace.getPath(), url_oceano);\n System.out.println(\"svn co \" + studyRepositoryURL + \" \" + studyWorkspace.getPath());\n\n\n\n if (!workspaceStudy.endsWith(\"/\")) {\n workspaceStudy += \"/\";\n }\n\n workspaceStudy += remoto.getAutobranch();\n studyWorkspace = new File(workspaceStudy);\n\n merge(exportedWorkspace, studyWorkspace);\n\n checkin(workspaceStudy);\n\n if (remoto.getAutobranch() % 20 == 0) {\n\n System.out.println(\"----------------Esperando 2 minutos---------------------------------\");\n System.gc();\n Thread.sleep(60000);\n\n\n\n File f = new File(\"/home/marapao/experiementos/scripts/reiniciaglassfish\");\n Runtime r = Runtime.getRuntime();\n Process exec = null;\n\n System.out.println(\"---------------------Reiniciando GlassFish---------------------------------------\");\n if (f.canExecute()) {\n exec = r.exec(f.getAbsolutePath());\n }\n\n exec.waitFor();\n\n System.out.println(\"----------------Esperando 1 minutos---------------------------------\");\n System.gc();\n Thread.sleep(60000);\n //reiniciar o glassfish\n ///home/marapao/glassfish/bin/asadmin stop-domain\n ///home/marapao/glassfish/bin/asadmin start-domain\n\n\n }\n\n }", "private static void checkUpdate() throws Exception {\n\t\tfinal Properties updateProperties = new CachedResource<Properties>(getApplicationProperty(\"update.url\"), Properties.class, CachedResource.ONE_DAY, 0, 0) {\n\n\t\t\t@Override\n\t\t\tpublic Properties process(ByteBuffer data) {\n\t\t\t\ttry {\n\t\t\t\t\tProperties properties = new Properties();\n\t\t\t\t\tNodeList fields = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteBufferInputStream(data)).getFirstChild().getChildNodes();\n\t\t\t\t\tfor (int i = 0; i < fields.getLength(); i++) {\n\t\t\t\t\t\tproperties.setProperty(fields.item(i).getNodeName(), fields.item(i).getTextContent().trim());\n\t\t\t\t\t}\n\t\t\t\t\treturn properties;\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}.get();\n\n\t\t// check if update is required\n\t\tint latestRev = Integer.parseInt(updateProperties.getProperty(\"revision\"));\n\t\tint currentRev = getApplicationRevisionNumber();\n\n\t\tif (latestRev > currentRev && currentRev > 0) {\n\t\t\tSwingUtilities.invokeLater(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tfinal JDialog dialog = new JDialog(JFrame.getFrames()[0], updateProperties.getProperty(\"title\"), ModalityType.APPLICATION_MODAL);\n\t\t\t\t\tfinal JPanel pane = new JPanel(new MigLayout(\"fill, nogrid, insets dialog\"));\n\t\t\t\t\tdialog.setContentPane(pane);\n\n\t\t\t\t\tpane.add(new JLabel(ResourceManager.getIcon(\"window.icon.medium\")), \"aligny top\");\n\t\t\t\t\tpane.add(new JLabel(updateProperties.getProperty(\"message\")), \"gap 10, wrap paragraph:push\");\n\t\t\t\t\tpane.add(new JButton(new AbstractAction(\"Download\", ResourceManager.getIcon(\"dialog.continue\")) {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tDesktop.getDesktop().browse(URI.create(updateProperties.getProperty(\"download\")));\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tdialog.setVisible(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}), \"tag ok\");\n\t\t\t\t\tpane.add(new JButton(new AbstractAction(\"Details\", ResourceManager.getIcon(\"action.report\")) {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tDesktop.getDesktop().browse(URI.create(updateProperties.getProperty(\"discussion\")));\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}), \"tag help2\");\n\t\t\t\t\tpane.add(new JButton(new AbstractAction(\"Ignore\", ResourceManager.getIcon(\"dialog.cancel\")) {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\t\t\t\tdialog.setVisible(false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}), \"tag cancel\");\n\n\t\t\t\t\tdialog.pack();\n\t\t\t\t\tdialog.setLocation(getOffsetLocation(dialog.getOwner()));\n\t\t\t\t\tdialog.setVisible(true);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "private void onUpdateSelected() {\r\n mUpdaterData.updateOrInstallAll_WithGUI(\r\n null /*selectedArchives*/,\r\n false /* includeObsoletes */,\r\n 0 /* flags */);\r\n }", "public void dependencyUpdateDef(Set updatingObjects);", "public void resolveRevisionStates() {\r\n\t\tboolean first = true;\r\n\t\tfor (Iterator i = getRevisions().iterator(); i.hasNext();) {\r\n\t\t\tPvcsRevision revision = (PvcsRevision) i.next();\r\n\t\t\tif (first) {\r\n\t\t\t\trevision.setState(PvcsRevisionState.ADD);\r\n\t\t\t\tfirst = false;\r\n\t\t\t} else {\r\n\t\t\t\trevision.setState(PvcsRevisionState.CHANGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void update(String sFilename)\n\t{\n\t\tVTD_XML xml;\n\t\ttry\n\t\t{\n\t\t\tLogs.log.info(\"Translations being loaded from file: \" + sFilename);\n\t\t\txml = new VTD_XML(sFilename);\n\t\t\tupdate(xml);\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\t// ex.printStackTrace();\n\t\t\tLogs.log.error(\"Exception occurred attempting to update the translations. Details below: \");\n\t\t\tLogs.log.error(ex);\n\t\t\tthrow new TranslationsUpdateException(ex.getMessage());\n\t\t}\n\t}", "private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }", "public void writeDiff (Writer w) throws IOException {\n Reader r1 = isAdded() ? new StringReader (\"\") : source.getReader (new URL (base1, getFileName()));\n Reader r2 = isRemoved () ? new StringReader (\"\") : source.getReader (new URL (base2, getFileName()));\n \n HtmlDiff[] res = HtmlDiff.diff (r1, r2);\n\n int len = 0;\n int diff = 0;\n for (int i = 0; i < res.length; i++) {\n if (res[i].isDifference()) {\n // put there both\n int oldLen = res[i].getOld ().length ();\n if (oldLen > 0) {\n w.write (\"<strike>\");\n w.write (res[i].getOld());\n len += oldLen;\n diff += oldLen;\n w.write (\"</strike>\");\n }\n int newLen = res[i].getNew ().length ();\n if (newLen > 0) {\n w.write (\"<span style=\\\"background: #FFFF00\\\">\");\n w.write (res[i].getNew());\n len += newLen;\n diff += newLen;\n w.write (\"</span>\");\n }\n } else {\n w.write (res[i].getNew ());\n len += 2 * res[i].getNew ().length();\n }\n }\n r1.close ();\n r2.close ();\n \n if (change == -1) {\n size = len;\n change = diff;\n }\n }", "public boolean updateBuild(Build build);", "public void updateScripts() {\n\t\tFile file = new File(\"updatedPrescriptions.txt\");\n\t\tBufferedWriter bw;\n\t\ttry {\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tfor (int i = 0; i < scripts.size(); i++) {\n\n\t\t\t\tbw.write(scripts.get(i).toString());\n\n\t\t\t\tbw.newLine();\n\t\t\t}\n\t\t\tbw.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void singleUpdate() {\n\t\ttry {\n\t\t\tthis.updateBy = CacheUtils.getUser().username;\n\t\t} catch (Exception e) {\n\t\t\tif (! getClass().equals(GlobalCurrencyRate.class)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.updateBy = \"super\";\n\t\t}\n\t\tthis.workspace = CacheUtils.getWorkspaceId();\n\t\tthis.updateAt = new Date();\n\n\t\tif (insertBy == null) insertBy = updateBy;\n\t\tif (insertAt == null) insertAt = updateAt;\n\n\t\tsuper.update();\n\t\tCacheUtils.cleanAll(this.getClass(), getAuditRight());\n\t}", "private void update(RequestInfo requestInfo) throws DefectException {\r\n\t\tlog.info(\"Start - update\");\r\n\t\tcreateInstance();\r\n\t\tif(CommonUtil.isNull(requestInfo)){\r\n\t\t\tlog.error(\"Request Info is null - \"+ requestInfo);\t\t\t\r\n\t\t\tthrow new DefectException(\"failed to update, request information is missing\");\r\n\t\t}\r\n try{\r\n\r\n \tString ref = requestInfo.getRefField();\r\n\r\n \t//Update\r\n \tJsonObject updateEntry = convertMapToJson(requestInfo.getEntry().get(RallyConstants.UPDATE));\t \r\n \tUpdateRequest updateRequest = new UpdateRequest(ref, updateEntry);\r\n \tUpdateResponse updateResponse = null;\r\n\r\n \ttry {\r\n \t \t\t\tupdateResponse = restApi.update(updateRequest);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tlog.error(\"failed to update, message : \" + e.toString() + \"RequestInfo -\" + requestInfo);\r\n\t \tthrow new DefectException(\"failed to update, message : \" + e.toString());\r\n\t\t\t}\r\n\r\n if (updateResponse.wasSuccessful()) {\r\n \tlog.info(String.format(\"Updated %s\", updateResponse.getObject().get(RallyConstants._REF).getAsString())); \r\n } else {\r\n List<String> lstResult = new ArrayList<String>();\r\n for (String err : updateResponse.getErrors()) {\r\n System.err.println(\"\\t\" + err);\r\n lstResult.add(err);\r\n }\r\n log.error(\"Error in updating : \" + lstResult);\r\n throw new DefectException(\"Error in updating : \" + lstResult);\r\n }\r\n } finally {\r\n \tcloseDefect();\r\n \tlog.info(\"End - update\");\r\n }\r\n \t}", "private void checkForUpdates() {\n UpdateManager.register(this);\n }", "private void checkForUpdates() {\n UpdateManager.register(this);\n }", "public void reloadDeployment(Deployment deployment) throws Exception {\n File file = new File(root, \"nxserver/dev.bundles\");\n String content = deployment.getContentAsString();\n IOUtils.writeFile(file, content);\n }", "public void transferChanges(JTreeTable source, JTreeTable target) {\r\n\t\t\r\n\t\t// add to changes in target based on source\r\n\t\tJEditorPane changePane = null;\r\n\t\tList changes = null;\r\n\t\tboolean refreshOntTT = true;\r\n\t\tif (target == ontChangeTT) {\r\n\t\t\tchanges = ontChanges;\r\n\t\t\tchangePane = ontChangeEdPane;\r\n\t\t}\r\n\t\telse {\r\n\t\t\trefreshOntTT = false;\r\n\t\t\tchanges = repChanges;\r\n\t\t\tchangePane= repChangeEdPane;\r\n\t\t}\r\n\t\t\r\n\t\t// get selected changes in source\r\n\t\tif (source.getTree().getSelectionPath()==null) return;\r\n\t\tTreePath[] paths = source.getTree().getSelectionPaths();\r\n\t\tfor (int i=0; i<paths.length; i++) {\r\n\t\t\tTreePath path = paths[i];\r\n\t\t\tTreeTableNode selNode = (TreeTableNode) path.getLastPathComponent();\r\n\t\t\tif (selNode.swoopChange.isTopNode) {\r\n\t\t\t\t// skip version top nodes, but transfer its children\r\n\t\t\t\tfor (Iterator iter = selNode.children.iterator(); iter.hasNext();) {\r\n\t\t\t\t\tTreeTableNode childNode = (TreeTableNode) iter.next();\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) childNode.swoopChange;\r\n\t\t\t\t\t// check if it already exists in changes (prevent duplicates) \r\n\t\t\t\t\tif (!isPresent(changes, swc)) changes.add(swc.clone());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse { \r\n\t\t\t\tSwoopChange swc = (SwoopChange) selNode.swoopChange;\r\n\t\t\t\t// check if it already exists in changes (prevent duplicates) \r\n\t\t\t\tif (!isPresent(changes, swc)) changes.add(swc.clone());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.sortChanges(changes);\r\n\t\t\r\n\t\t// refresh UI of target after adding changes\r\n\t\tif (refreshOntTT) this.refreshOntTreeTable();\r\n\t\telse {\r\n\t\t\t// add (new) repChanges to newCommit node directly\r\n\t\t\tnewCommitNode.children = new Vector();\r\n\t\t\tfor (Iterator iter = changes.iterator(); iter.hasNext();) {\r\n\t\t\t\tSwoopChange swc = (SwoopChange) iter.next();\r\n\t\t\t\tTreeTableNode swcNode = new TreeTableNode(swc);\r\n\t\t\t\tnewCommitNode.addChild(swcNode);\t\r\n\t\t\t}\r\n\t\t\tthis.refreshRepTreeTable(true);\r\n\t\t}\r\n\t}", "public static void updateSwagger12ResourcesForAM18(String[] docResourcePaths,\n Registry registry) throws RegistryException, ParseException {\n JSONParser parser = new JSONParser();\n for (String docResourcePath : docResourcePaths) {\n\n String resourceName = docResourcePath.substring(docResourcePath.lastIndexOf(\"/\"));\n\n //modify this if api-doc resource needed to be changed\n if (resourceName.equals(APIConstants.API_DOC_1_2_RESOURCE_NAME)) {\n continue;\n }\n\n Resource resource = registry.get(docResourcePath);\n JSONObject resourceDoc =\n (JSONObject) parser.parse(new String((byte[]) resource.getContent()));\n JSONArray apis = (JSONArray) resourceDoc.get(Constants.API_DOC_12_APIS);\n for (Object api1 : apis) {\n JSONObject api = (JSONObject) api1;\n JSONArray operations = (JSONArray) api.get(\"operations\");\n\n for (Object operation1 : operations) {\n JSONObject operation = (JSONObject) operation1;\n JSONArray parameters = (JSONArray) operation.get(\"parameters\");\n String method = (String) operation.get(\"method\");\n JSONArray parametersNew = new JSONArray();\n //remove header and body parameters\n for (Object parameter1 : parameters) {\n JSONObject parameter = (JSONObject) parameter1;\n /*\n if(parameter.get(\"paramType\").equals(\"header\") ||\n\t\t\t\t\t\t\t\tparameter.get(\"paramType\").equals(\"body\")){\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t} */\n if (parameter.get(\"paramType\").equals(\"header\")) {\n continue;\n }\n if (parameter.get(\"paramType\").equals(\"body\")) {\n\n //only remove body of a GET and DELETE\n if (\"GET\".equalsIgnoreCase(method) ||\n \"DELETE\".equalsIgnoreCase(method)) {\n continue;\n }\n }\n parametersNew.add(parameter);\n }\n operation.put(\"parameters\", parametersNew);\n }\n }\n\n resource.setContent(resourceDoc.toJSONString());\n //update the registry\n registry.put(docResourcePath, resource);\n }\n }", "public void commitChanges(){\n\t\tskipRulesView.updateSkipRule();\n\t\tvalidationRulesView.updateValidationRule();\n\t\tdynamicListsView.updateDynamicLists();\n\t}", "public void willbeUpdated() {\n\t\t\n\t}", "private DSEMergeManager(EObject original, ChangeSet local, ChangeSet remote) {\n buildScope(original, local, remote);\n configureMerge(original);\n\n dse = new DesignSpaceExplorer();\n }", "interface UpdateStages {\n /** The stage of the SourceControl update allowing to specify branch. */\n interface WithBranch {\n /**\n * Specifies the branch property: The repo branch of the source control..\n *\n * @param branch The repo branch of the source control.\n * @return the next definition stage.\n */\n Update withBranch(String branch);\n }\n /** The stage of the SourceControl update allowing to specify folderPath. */\n interface WithFolderPath {\n /**\n * Specifies the folderPath property: The folder path of the source control. Path must be relative..\n *\n * @param folderPath The folder path of the source control. Path must be relative.\n * @return the next definition stage.\n */\n Update withFolderPath(String folderPath);\n }\n /** The stage of the SourceControl update allowing to specify autoSync. */\n interface WithAutoSync {\n /**\n * Specifies the autoSync property: The auto sync of the source control. Default is false..\n *\n * @param autoSync The auto sync of the source control. Default is false.\n * @return the next definition stage.\n */\n Update withAutoSync(Boolean autoSync);\n }\n /** The stage of the SourceControl update allowing to specify publishRunbook. */\n interface WithPublishRunbook {\n /**\n * Specifies the publishRunbook property: The auto publish of the source control. Default is true..\n *\n * @param publishRunbook The auto publish of the source control. Default is true.\n * @return the next definition stage.\n */\n Update withPublishRunbook(Boolean publishRunbook);\n }\n /** The stage of the SourceControl update allowing to specify securityToken. */\n interface WithSecurityToken {\n /**\n * Specifies the securityToken property: The authorization token for the repo of the source control..\n *\n * @param securityToken The authorization token for the repo of the source control.\n * @return the next definition stage.\n */\n Update withSecurityToken(SourceControlSecurityTokenProperties securityToken);\n }\n /** The stage of the SourceControl update allowing to specify description. */\n interface WithDescription {\n /**\n * Specifies the description property: The user description of the source control..\n *\n * @param description The user description of the source control.\n * @return the next definition stage.\n */\n Update withDescription(String description);\n }\n }", "void merge();", "public void update() {}", "public void updateScene() {\n\t\t// check whether updates should be stopped\n\t\tif (simulation.isTerminated()) { \n\t\t\ttimeline.stop();\n\t\t\tsimulation.exit();\n\t\t} else {\n\t\t\t// first update the elements coordinates\n\t\t\ttry {\n\t\t\t\tsimulation.update();\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Simulation> Non-critical error: Couldn't communicate with Server.\");\n\t\t\t}\n\n\t\t\t// then update the scene graph (in a rather brutal way)\n\t\t\troot.getChildren().clear();\n\t\t\troot.getChildren().addAll(simulation.getElements());\n\t\t}\n\t}", "private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }" ]
[ "0.5619757", "0.54713535", "0.54400307", "0.53430283", "0.5141686", "0.5135254", "0.5068331", "0.5060666", "0.493513", "0.48794138", "0.4866046", "0.48478293", "0.48366377", "0.48292074", "0.48222426", "0.48136508", "0.47952408", "0.47642687", "0.47596398", "0.47382373", "0.47120655", "0.47071242", "0.47039947", "0.46818048", "0.46697626", "0.46655", "0.4643357", "0.46403915", "0.46400264", "0.4627379", "0.46111012", "0.46097896", "0.46091875", "0.460526", "0.4595386", "0.45902285", "0.4574286", "0.45734635", "0.45647442", "0.455063", "0.4538809", "0.45357156", "0.4535643", "0.45344782", "0.45314324", "0.45266274", "0.4525629", "0.45251986", "0.45243013", "0.45241386", "0.45170388", "0.45136216", "0.4505002", "0.45009753", "0.44959274", "0.44704345", "0.4465194", "0.44555935", "0.4431327", "0.44266087", "0.44260103", "0.44190842", "0.441626", "0.44137597", "0.44077644", "0.44067225", "0.44067225", "0.44064492", "0.44054478", "0.4403549", "0.4402213", "0.44014618", "0.44014344", "0.44002333", "0.4394923", "0.4392754", "0.43894196", "0.43883362", "0.43731004", "0.43715236", "0.4371315", "0.43699315", "0.4365784", "0.43603915", "0.4355748", "0.43520615", "0.434913", "0.4348432", "0.4348432", "0.43483937", "0.43460852", "0.43379346", "0.43355304", "0.43306857", "0.43277988", "0.43273127", "0.43241924", "0.43177086", "0.43160596", "0.43079776" ]
0.6132463
0
Merges the passed XML diff file into the JSure codebase (for subsequent release). Warning: This method only works if the tool user is running from source code in a metaEclipse.
public static void mergeLocalToJSure(String relativePathToFile) { final File fluidRoot = PromisesXMLParser.getFluidXMLDir(); final File wsRoot = JSurePreferencesUtility.getJSureXMLDirectory(); final File jsure = new File(fluidRoot, relativePathToFile); final File local = new File(wsRoot, relativePathToFile); boolean fileExistsOnDisk = local.isFile() && local.exists(); if (!fileExistsOnDisk) { SLLogger.getLogger().log(Level.WARNING, I18N.err(239, local), new Exception()); return; // Nothing to do } PromisesXMLMerge.mergeLocalXMLIntoJSureXML(local, jsure); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private InputStream merge(File srcFile, File deltaFile) throws IOException {\n \t\tInputStream result = null;\n \t\ttry {\n \t\t\tFileInputStream srcStream = new FileInputStream(srcFile);\n \t\t\tFileInputStream deltaStream = new FileInputStream(deltaFile);\n \t\t\tInputStream[] inputStreamArray = { srcStream, deltaStream };\n \n \t\t\tConfigurer configurer = new AttributeMergeConfigurer();\n \t\t\tresult = new ConfigurableXmlMerge(configurer).merge(inputStreamArray);\n \t\t} catch (Exception e) {\n \t\t\tlogger.error(\"Could not merge tenant configuration delta file: \" + deltaFile.getCanonicalPath(), e);\n \t\t}\n \t\t//\n \t\t// Try to save the merge output to a file that is suffixed with\n \t\t// \".merged.xml\" in the same directory\n \t\t// as the delta file.\n \t\t//\n \t\tif (result != null) {\n \t\t\tFile outputDir = deltaFile.getParentFile();\n \t\t\tString mergedFileName = outputDir.getAbsolutePath() + File.separator\n \t\t\t\t\t+ JEEServerDeployment.TENANT_BINDINGS_FILENAME_PREFIX + MERGED_SUFFIX;\n \t\t\tFile mergedOutFile = new File(mergedFileName);\n \t\t\ttry {\n \t\t\t\tFileUtils.copyInputStreamToFile(result, mergedOutFile);\n \t\t\t} catch (IOException e) {\n \t\t\t\tlogger.warn(\"Could not create a copy of the merged tenant configuration at: \" + mergedFileName, e);\n \t\t\t}\n \t\t\tresult.reset(); // reset the stream even if the file create failed.\n \t\t}\n \n \t\treturn result;\n \t}", "public String compareFiles(String repoName, FileDTO oldFile, FileDTO newFile) throws IOException {\r\n\t\tlogger.info(\"Comparison of \" + oldFile.getFileName());\r\n\r\n\t\tAstComparator diffTool = new AstComparator();\r\n\t\ttry {\r\n\t\t\tDiff result = diffTool.compare(storageService.getFile(repoName, oldFile.getAppFileName(), \"\"),\r\n\t\t\t\t\tstorageService.getFile(repoName, newFile.getAppFileName(), \"\"));\r\n\t\t\tlogger.info(\"Result : \" + ((result != null) ? result.getRootOperations().size() : \"empty\"));\r\n\r\n\t\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\t\tArrayNode actionsArrayNode = mapper.createArrayNode();\r\n\r\n\t\t\tfor (Operation op : result.getRootOperations()) {\r\n\r\n\t\t\t\tAction action = op.getAction();\r\n\r\n\t\t\t\tCtElement element = (CtElement) action.getNode().getMetadata(SpoonGumTreeBuilder.SPOON_OBJECT);\r\n\r\n\t\t\t\tObjectNode jsonAction = mapper.createObjectNode();\r\n\r\n\t\t\t\t// action name\r\n\t\t\t\tjsonAction.put(\"action\", action.getClass().getSimpleName());\r\n\r\n\t\t\t\t// node type\r\n\t\t\t\tString nodeType = element.getClass().getSimpleName();\r\n\t\t\t\tnodeType = nodeType.substring(2, nodeType.length() - 4);\r\n\t\t\t\tjsonAction.put(\"nodeType\", nodeType);\r\n\r\n\t\t\t\tObjectNode actionPositionJSON = mapper.createObjectNode();\r\n\t\t\t\tif (element.getPosition() != null) {\r\n\t\t\t\t\tactionPositionJSON.put(\"line\", element.getPosition().getLine());\r\n\t\t\t\t\tactionPositionJSON.put(\"sourceStart\", element.getPosition().getSourceStart());\r\n\t\t\t\t\tactionPositionJSON.put(\"sourceEnd\", element.getPosition().getSourceEnd());\r\n\t\t\t\t\tactionPositionJSON.put(\"endLine\", element.getPosition().getEndLine());\r\n\r\n\t\t\t\t}\r\n\t\t\t\tif (action instanceof Delete || action instanceof Update || action instanceof Move) {\r\n\t\t\t\t\tjsonAction.put(\"oldLocation\", actionPositionJSON);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tjsonAction.put(\"newLocation\", actionPositionJSON);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// action position\r\n\t\t\t\tif (action instanceof Move || action instanceof Update) {\r\n\t\t\t\t\tCtElement elementDest = (CtElement) action.getNode()\r\n\t\t\t\t\t\t\t.getMetadata(SpoonGumTreeBuilder.SPOON_OBJECT_DEST);\r\n\r\n\t\t\t\t\tObjectNode actionDestPositionJSON = mapper.createObjectNode();\r\n\t\t\t\t\tif (elementDest.getPosition() != null) {\r\n\t\t\t\t\t\tactionDestPositionJSON.put(\"line\", elementDest.getPosition().getLine());\r\n\t\t\t\t\t\tactionDestPositionJSON.put(\"sourceStart\", elementDest.getPosition().getSourceStart());\r\n\t\t\t\t\t\tactionDestPositionJSON.put(\"sourceEnd\", elementDest.getPosition().getSourceEnd());\r\n\t\t\t\t\t\tactionDestPositionJSON.put(\"endLine\", elementDest.getPosition().getEndLine());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjsonAction.put(\"newLocation\", actionDestPositionJSON);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if all actions are applied on the same node print only the\r\n\t\t\t\t// first action\r\n\t\t\t\tif (element.equals(element) && action instanceof Update) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tactionsArrayNode.add(jsonAction);\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(\"> Details : \" + actionsArrayNode.toString());\r\n\r\n\t\t\treturn actionsArrayNode.toString();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage(), e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static void mergeJSureToLocal() {\r\n\t\tfinal File fluidRoot = PromisesXMLParser.getFluidXMLDir();\r\n\t\tfinal File wsRoot = JSurePreferencesUtility.getJSureXMLDirectory();\r\n\r\n\t\tmergeJSureToLocalHelper(wsRoot, fluidRoot);\r\n\t}", "public void testViewDifferences() throws Exception {\n System.out.print(\".. Testing view differences ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n new Action(VERSIONING_MENU + \"|\" + DIFF, DIFF).perform(A_FileNode);\n TopComponentOperator editor = new TopComponentOperator(new EditorWindowOperator(), \"Diff: A_File.java\");\n JEditorPaneOperator headRevision = new JEditorPaneOperator(editor, 0);\n JEditorPaneOperator workingRevision = new JEditorPaneOperator(editor, 1);\n String headRevisionContents = \"/** This is testing file.\\n */\\n\\n public class Testing_File {\\n\\n }\\n\";\n String workingRevisionContents = \"/** This is testing A_File.java file.\\n */\\n\\n public class Testing_File {\\n int i;\\n }\\n\";\n if (!headRevisionContents.equals(headRevision.getText()) | !workingRevisionContents.equals(workingRevision.getText()))\n captureScreen(\"Error: Incorrect diff contents.\");\n StyledDocument headRevisionDocument = (StyledDocument) headRevision.getDocument();\n StyledDocument workingRevisionDocument = (StyledDocument) workingRevision.getDocument();\n Color headRevisionLine = (Color) headRevisionDocument.getLogicalStyle(1).getAttribute(StyleConstants.ColorConstants.Background);\n Color workingRevisionLine = (Color) workingRevisionDocument.getLogicalStyle(1).getAttribute(StyleConstants.ColorConstants.Background);\n if (!headRevisionLine.equals(MODIFIED_COLOR) | !workingRevisionLine.equals(MODIFIED_COLOR))\n captureScreen(\"Error: Incorrect color of modified line.\");\n int thirdLineHeadOffset = 30;\n int thirdLineWorkingOffset = 42;\n headRevisionLine = (Color) headRevisionDocument.getLogicalStyle(thirdLineHeadOffset).getAttribute(StyleConstants.ColorConstants.Background);\n Style lineStyle = workingRevisionDocument.getLogicalStyle(thirdLineWorkingOffset);\n if (!headRevisionLine.equals(REMOVED_COLOR) | (lineStyle != null))\n captureScreen(\"Error: Incorrect color of removed line.\");\n int fifthLineHeadOffset = 60;\n int fifthLineWorkingOffset = 72;\n lineStyle = headRevisionDocument.getLogicalStyle(fifthLineHeadOffset);\n workingRevisionLine = (Color) workingRevisionDocument.getLogicalStyle(fifthLineWorkingOffset).getAttribute(StyleConstants.ColorConstants.Background);\n if ((lineStyle != null) | !workingRevisionLine.equals(NEW_COLOR))\n captureScreen(\"Error: Incorrect color of new line.\");\n System.out.println(\". done !\");\n }", "public Sync(Path doc){\n\t\tmodDoc = doc;\n\t\tdmp = new diff_match_patch();\n\t\ttry {\n\t\t\tbaseString = openReadFile(modDoc);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Print to the console\n\t\t\t// \"Could not open the file: '\" + modDoc + \".\" \n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String args[]) throws FileNotFoundException, \n SAXException, IOException {\n FileInputStream fis1 = new FileInputStream(\"C:/cucumber/Source.xml\");\n FileInputStream fis2 = new FileInputStream(\"C:/cucumber/Target.xml\");\n \n // using BufferedReader for improved performance\n BufferedReader source = new BufferedReader(new InputStreamReader(fis1));\n BufferedReader target = new BufferedReader(new InputStreamReader(fis2));\n \n //configuring XMLUnit to ignore white spaces\n XMLUnit.setIgnoreWhitespace(true);\n \n //comparing two XML using XMLUnit in Java\n List differences = compareXML(source, target);\n \n //showing differences found in two xml files\n try{\n \t \n \n printDifferences(differences);\n \n }\n catch (ClassCastException e) {\n \t LOGGER.error(e);\n\t\t// TODO: handle exception\n\t}\n \n }", "@Test\n public void testDiff() throws Exception {\n String newVersionJarPath = \"data/sample/jar/change4.jar\";\n String oldVersionJarPath = \"data/sample/jar/change3.jar\";\n String changePath = \"data/sample/changes_change4_change3.txt\";\n\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionCodePath, oldVersionCodePath, changePath, false);\n// RelationInfo relationInfoForChangedPart = new RelationInfo(newVersionJarPath, oldVersionJarPath, changePath, false);\n// CallRelationGraph callGraphForChangedPart = new CallRelationGraph(relationInfoForChangedPart);\n//\n// double thresholdForInitialRegion = 0.35;\n// RelationInfo oldRelationInfo = new RelationInfo(newVersionJarPath,false);\n// oldRelationInfo.setPruning(thresholdForInitialRegion);\n// RelationInfo newRelationInfo = new RelationInfo(oldVersionJarPath,false);\n// newRelationInfo.setPruning(thresholdForInitialRegion);\n//\n// CallRelationGraph oldCallGraph = new CallRelationGraph(oldRelationInfo);\n// CallRelationGraph newCallGraph = new CallRelationGraph(newRelationInfo);\n//\n// ChangedArtifacts changedArtifacts = new ChangedArtifacts();\n// changedArtifacts.parse(changePath);\n//\n// InitialRegionFetcher fetcher = new InitialRegionFetcher(changedArtifacts, newCallGraph, oldCallGraph);\n//\n// ExportInitialRegion exporter = new ExportInitialRegion(fetcher.getChangeRegion());\n\n }", "public void changeXMLFile() throws IOException {\n File orig = new File(RunnerClass.homedir + \"launch4j.xml\");\n File custom = new File(RunnerClass.homedir + \"launch4j2.xml\");\n BufferedReader br = new BufferedReader(new FileReader(orig));\n PrintWriter pw = new PrintWriter(new FileWriter(custom));\n int line = 0;\n String s;\n //Reads all lines, and replaces 5th line with new destination file\n while ((s = br.readLine()) != null) {\n line++;\n if (line == 5)\n pw.println(\" <outfile>\" + exeF.getCanonicalPath() + \"</outfile>\");\n else if(line == 18)\n pw.println(\" <minVersion>\"+ getFullVersion(RunnerClass.mf.generalOptionalPanel.javaVersion.getText().trim()) +\"</minVersion>\");\n else\n pw.println(s);\n }\n br.close();\n pw.close();\n //Deletes original file, renames temp to original\n RunnerClass.logger.info(\"del: \" + orig.delete());\n RunnerClass.logger.info(\"ren: \" + custom.renameTo(orig));\n }", "public static void createNewBundleInternal(String patchBundleName,ZipFile source, List<ZipEntry> entryList, File target, boolean isDiff, MergeExcutorServices.PrepareCallBack prepareCallBack) throws IOException, MergeException {\n byte[] buffer = new byte[BUFFEREDSIZE];\n ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(target)));\n BufferedOutputStream bo = new BufferedOutputStream(out);\n InputStream in;\n //先写入source中未变的文件\n java.util.Enumeration e = source.entries();\n Boolean isSourceHasDex = false;\n Boolean isPatchHasDex = false;\n ZipEntry originalDex = null;\n ZipEntry patchDex = null;\n File outDex;\n\n while (e.hasMoreElements()) {\n ZipEntry zipEnt = (ZipEntry) e.nextElement();\n String name = zipEnt.getName();\n /**\n * 差量更新需要做dex merge, 过滤出classes.dex\n */\n if (isDiff && name.equals(\"classes.dex\")) {\n// originalDex = zipEnt;\n isSourceHasDex = true;\n continue;\n }\n\n boolean toBeDeleted = isBundleFileUpdated(zipEnt,entryList);\n\n if (!toBeDeleted) {\n\n ZipEntry newEntry = new ZipEntry(name);\n if (name.contains(\"raw/\")||name.contains(\"assets/\")){\n newEntry.setMethod(ZipEntry.STORED);\n newEntry.setCrc(zipEnt.getCrc());\n newEntry.setSize(zipEnt.getSize());\n }\n out.putNextEntry(newEntry);\n in = source.getInputStream(zipEnt);\n write(in, out, buffer);\n bo.flush();\n\n }\n }\n\n if (!isSourceHasDex && isDiff) {\n throw new MergeException(\"Original bundle has no dex\");\n }\n\n //最后写入patch中的内容\n// File[] patchFiles = patch.listFiles();\n// for (File patchFile : patchFiles) {\n// /**\n// * 差量更新需要做dex merge, 过滤出classes.dex\n// */\n// if (isDiff && patchFile.getName().equals(\"classes.dex\")) {\n// patchDex = patchFile;\n// isPatchHasDex = true;\n// MergeExcutorServices.needMergeCount.incrementAndGet();\n// continue;\n// }\n// zip(out, patchFile, patchFile.getName(), bo);\n//\n// }\n for(ZipEntry entry : entryList){\n if(isDiff && (entry.getName().endsWith(\"classes.dex\"))){\n patchDex = entry;\n isPatchHasDex =true;\n MergeExcutorServices.needMergeCount.incrementAndGet();\n continue;\n }\n ZipEntry newEntry = new ZipEntry(entry.getName().substring(entry.getName().indexOf(\"/\")+1));\n if (newEntry.getName().contains(\"raw/\")||newEntry.getName().contains(\"assets/\")){\n newEntry.setMethod(ZipEntry.STORED);\n newEntry.setCrc(entry.getCrc());\n newEntry.setSize(entry.getSize());\n }\n out.putNextEntry(newEntry);\n in = MergeExcutorServices.sZipPatch.getInputStream(entry);\n write(in, out, buffer);\n bo.flush();\n }\n /**\n * 差量更新需要做dex merge\n */\n if (isDiff) {\n // Merge patch dex with origin dex\n if (isPatchHasDex && isSourceHasDex) {\n //发出merge申请\n// File outDexDir = new File(patch, \"out\");\n ByteArrayOutputStream outDexStream=new ByteArrayOutputStream();\n dexMerge(patchBundleName,source, patchDex, outDexStream, prepareCallBack);\n// if (outDexStream.exists()) {\n// /**\n// * caculate the merged dex md5 and report\n// */\n// String md5 = Md5Utils.getFileMD5String(outDex);\n// MonitorReport.getInstance().trace(source.getName(), md5, \"\" + outDex.length());\n// }\n// zip(out, outDex, outDex.getName(), bo);\n ByteArrayInputStream swapStream = new ByteArrayInputStream(outDexStream.toByteArray());\n ZipEntry entry = new ZipEntry(\"classes.dex\");\n out.putNextEntry(entry);\n write(swapStream,out,buffer);\n bo.flush();\n } else if (isSourceHasDex) {\n // Patch has no classes.dex, just use the original dex\n// outDex = new File(patch, \"classes.dex\");\n// inputStreamToFile(source.getInputStream(originalDex), outDex);\n// zip(out, outDex, outDex.getName(), bo);\n ZipEntry entry = new ZipEntry(\"classes.dex\");\n out.putNextEntry(entry);\n in = source.getInputStream(source.getEntry(\"classes.dex\"));\n write(in,out,buffer);\n bo.flush();\n }\n }else {\n MergeExcutorServices.successCount.incrementAndGet();\n }\n\n closeQuitely(out);\n closeQuitely(bo);\n }", "public void mergeConflictedFiles(final Map<String, NewData> conflictedFiles)\n \t{\n \t\tList<String> working = new LinkedList<String>();\n \t\tList<String> conflicted = new LinkedList<String>();\n \t\tString s=\"\";\n \t\tPatch diff = new Patch();\n \t\t\n \t\tfor(String str:conflictedFiles.keySet()){\n \t\t\n \t\t\tBufferedReader reader = new BufferedReader(new StringReader(conflictedFiles.get(str).getFileContent()));\n \t\t\ttry {\n \t\t\t\twhile ((s = reader.readLine()) != null)\n \t\t\t\t\tconflicted.add(s);\n \t\t\t} catch (IOException e) {\n \t\t\t\t// TODO Auto-generated catch block\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t\t\n \t\tFile f = new File(this.getRoot() + File.separatorChar +str);\n \t\tif(!f.exists()){\n \t\t\tthis.pCreateFile(this.getRoot() + File.separatorChar +str);\t\n \t\t\tworking=conflicted;\n \t\t}\n \t\telse{\n \t\tworking = this.readFile(this.getRoot()+ File.separatorChar +str);\n \t\t\n \t\tdiff=this.getSnapshot().getDiff(working, conflicted);\n \t\t\n \t\tfor(Delta delta:diff.getDeltas()){\t\n \t\t\n\t\t\tfor(int i=delta.getRevised().getPosition(), j=0;j<delta.getRevised().getLines().size();++i,++j)\n\t\t\t\tworking.set(i, working.get(i)+\" <<<O==merge==R>>> \"+delta.getRevised().getLines().get(j));\n \t\t\t}\n \t\t}\n \t\tthis.getFilelist().get(str).putAll(conflictedFiles.get(str).getLclock());\n \t\t\n \t\tthis.writeFile(this.getRoot()+ File.separatorChar +str, working);\n \t\t\n \t\tworking.clear();\n \t\tconflicted.clear();\n \t\t}\n \t}", "public void writeDiff (Writer w) throws IOException {\n Reader r1 = isAdded() ? new StringReader (\"\") : source.getReader (new URL (base1, getFileName()));\n Reader r2 = isRemoved () ? new StringReader (\"\") : source.getReader (new URL (base2, getFileName()));\n \n HtmlDiff[] res = HtmlDiff.diff (r1, r2);\n\n int len = 0;\n int diff = 0;\n for (int i = 0; i < res.length; i++) {\n if (res[i].isDifference()) {\n // put there both\n int oldLen = res[i].getOld ().length ();\n if (oldLen > 0) {\n w.write (\"<strike>\");\n w.write (res[i].getOld());\n len += oldLen;\n diff += oldLen;\n w.write (\"</strike>\");\n }\n int newLen = res[i].getNew ().length ();\n if (newLen > 0) {\n w.write (\"<span style=\\\"background: #FFFF00\\\">\");\n w.write (res[i].getNew());\n len += newLen;\n diff += newLen;\n w.write (\"</span>\");\n }\n } else {\n w.write (res[i].getNew ());\n len += 2 * res[i].getNew ().length();\n }\n }\n r1.close ();\n r2.close ();\n \n if (change == -1) {\n size = len;\n change = diff;\n }\n }", "@Override\n\tpublic String reloadXml(String[] args) {\n\t\treturn null;\n\t}", "public String merge (Context context) throws Exception;", "public void showDiff(String left, String right) {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Show diff\");\n\n logger.debug(\"Left \" + left.getClass());\n logger.debug(\"Right \" + right.getClass());\n\n logger.debug(\"Left content \" + left);\n logger.debug(\"Right content \" + right);\n }\n\n int leftKey = left.hashCode();\n int rightKey = right.hashCode();\n\n File f1 = compareFiles.get(leftKey);\n File f2 = compareFiles.get(rightKey);\n\n try {\n if (f1 == null) {\n f1 = File.createTempFile(\"result_\", \".xml\");\n FileOutputStream fos = new FileOutputStream(f1);\n try {\n fos.write(((String)left).getBytes(\"UTF-8\"));\n } finally {\n fos.close();\n }\n compareFiles.put(leftKey, f1);\n }\n\n if (f2 == null) {\n f2 = File.createTempFile(\"expected_\", \".xml\");\n FileOutputStream fos2 = new FileOutputStream(f2);\n try {\n fos2.write(((String)right).getBytes(\"UTF-8\"));\n } finally {\n fos2.close();\n }\n\n compareFiles.put(rightKey, f2);\n } \n \n \n final URL url1 = f1.toURI().toURL();\n final URL url2 = f2.toURI().toURL();\n \n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n ((StandalonePluginWorkspace)pluginWorkspace).openDiffFilesApplication(url1, url2);\n }\n });\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<String> openDiffs() {\n\t\tString path = getCurrentPath()+slash+\"diffs.xml\";\n\t\tList<String> diffs = (List<String>) JavaIO.getObjectFromXML(path);\n\t\treturn diffs;\n\t}", "public static String getDiff(String file1, String file2) {\n\t OutputStream out = new ByteArrayOutputStream();\n\t try {\n\t RawText rt1 = new RawText(new File(file1));\n\t RawText rt2 = new RawText(new File(file2));\n\t EditList diffList = new EditList();\n\t //new HistogramDiff().diff(RawTextComparator.DEFAULT, rt1, rt2);\t\n\t diffList.addAll(new HistogramDiff().diff(RawTextComparator.DEFAULT, rt1, rt2));\n\t //new DiffFormatter(out).format(diffList, rt1, rt2);\n\t DiffFormatter diffFormatter = new DiffFormatter(out);\n\t diffFormatter.format(diffList, rt1, rt2);\n\t System.out.println(out.toString());\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return out.toString();\n\t}", "public void applyDiff(LinkedList<Diff> diffList, Path doc){\n\t\t// If we can't fetch the first element then the document is empty, nothing to do.\n\t\t// If there is only one element and that element is equal then no modifications have\n\t\t// been made.\n\t\tif((diffList.get(0).operation == Operation.EQUAL && diffList.get(1) == null) || (diffList.get(0) == null)){\n\t\t\tSystem.out.println(\"AHHH\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tLinkedList<Patch> patchList = dmp.patch_make(diffList);\n\t\tObject o[] = null;\n\t\ttry {\n\t\t\to = dmp.patch_apply(patchList, openReadFile(doc));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Print to the console\n\t\t\t// \"Could not apply the patch to the file: '\" + doc + \".\" \n\t\t\te.printStackTrace();\n\t\t}\n\t\tString s = (String)o[0];\n\t\ttry {\n\t\t\topenWriteFile(doc, s);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Print to the console\n\t\t\t// \"Could not open the file: '\" + doc + \". File is busy.\" \n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void mergeAst(JsonObject targetCompUnit, JsonObject generatedCompUnit) {\n generatedCompUnit.getAsJsonArray(\"topLevelNodes\").forEach(item -> {\n JsonObject topLevelNode = item.getAsJsonObject();\n if (topLevelNode.get(\"kind\").getAsString().equals(\"Import\")) {\n if (!hasImport(targetCompUnit, topLevelNode)) {\n int startPosition = FormattingSourceGen.getStartPosition(targetCompUnit, \"imports\", -1);\n FormattingSourceGen.reconcileWS(topLevelNode,\n targetCompUnit.getAsJsonArray(\"topLevelNodes\"), targetCompUnit, startPosition);\n targetCompUnit.getAsJsonArray(\"topLevelNodes\").add(topLevelNode);\n }\n }\n\n if (topLevelNode.get(\"kind\").getAsString().equals(\"Service\")) {\n for (JsonElement astNode : targetCompUnit.getAsJsonArray(\"topLevelNodes\")) {\n JsonObject targetNode = astNode.getAsJsonObject();\n if (targetNode.get(\"kind\").getAsString().equals(\"Service\")) {\n if (targetNode.get(\"name\").getAsJsonObject().get(\"value\")\n .equals(topLevelNode.get(\"name\").getAsJsonObject().get(\"value\"))) {\n mergeServices(targetNode, topLevelNode, targetCompUnit);\n }\n }\n }\n }\n });\n }", "@Override\r\n\tpublic void updatePackage(PackageJour pj) {\n\t\tem.merge(pj);\r\n\t}", "Diff() {\n\t}", "public static void main(String[] args)\n throws FileNotFoundException, XMLStreamException {\n XMLInputFactory factory = XMLInputFactory.newInstance();\n // Create XML event reader 1\n XMLEventReader r1 = \n factory.createXMLEventReader(new FileReader(\"prodList1.xml\"));\n // Create XML event reader 2\n XMLEventReader r2 = \n factory.createXMLEventReader(new FileReader(\"prodList2.xml\"));\n // Create the output factory\n XMLOutputFactory xmlof = XMLOutputFactory.newInstance();\n // Create XML event writer\n XMLEventWriter xmlw = xmlof.createXMLEventWriter(System.out);\n // Read to first <product> element in document 1\n // and output to result document\n String pid1 = readToNextElement(r1, xmlw, false);\n // Read to first <product> element in document 1\n // without writing to result document\n String pid2 = readToNextElement(r2, null, false);\n // Loop over both XML input streams\n while (pid1 != null || pid2 != null) {\n // Compare merge criteria\n if (pid2 == null || (pid1 != null && pid1.compareTo(pid2) <= 0))\n // Continue in document 1\n pid1 = readToNextElement(r1, xmlw, pid2 == null);\n else\n // Continue in document 2\n pid2 = readToNextElement(r2, xmlw, pid1 == null);\n }\n xmlw.close();\n }", "private Resource deploySnapshotResource(Resource developmentResource) throws Exception {\n Version releasedBaseVersion = getReleasedBaseVersion(developmentResource);\n Resource snapshotResource = getHighestSnapshotResource(developmentResource, releasedBaseVersion);\n\n if (snapshotResource == null) {\n System.out.println(\"Uploading initial snapshot: \" + getString(developmentResource) + \" -> \" + getNextSnapshotVersion(releasedBaseVersion));\n return deploySnapshotResource(developmentResource, getNextSnapshotVersion(releasedBaseVersion));\n }\n\n System.out.println(\"Found existing snapshot: \" + getString(snapshotResource));\n if (getIdentity(developmentResource).equals(\"com.google.guava\")) {\n // FIXME workaround for BND#374\n System.out.println(\"Skipping snapshot diff on Google Guava to work around https://github.com/bndtools/bnd/issues/374\");\n return snapshotResource;\n }\n\n File developmentFile = m_developmentRepo.get(getIdentity(developmentResource), getVersion(developmentResource).toString(), Strategy.EXACT, null);\n File deployedFile = m_deploymentRepo.get(getIdentity(snapshotResource), getVersion(snapshotResource).toString(), Strategy.EXACT, null);\n\n boolean snapshotModified = false;\n if (getType(developmentResource).equals(\"osgi.bundle\")) {\n\n // Get a copy of the dep resource with the same version as the dev resource so we can diff diff.\n File comparableDeployedResource = getBundleWithNewVersion(deployedFile, getVersion(developmentResource).toString());\n\n // This may seem strange but the value in the dev resource manifest may be \"0\" which will not match\n // \"0.0.0\" during diff.\n File comparableDevelopmentResource = getBundleWithNewVersion(developmentFile, getVersion(developmentResource).toString());\n snapshotModified = jarsDiffer(comparableDeployedResource, comparableDevelopmentResource);\n }\n else {\n snapshotModified = filesDiffer(developmentFile, deployedFile);\n }\n\n if (snapshotModified) {\n System.out.println(\"Uploading new snapshot: \" + getString(developmentResource) + \" -> \" + getNextSnapshotVersion(getVersion(snapshotResource)));\n return deploySnapshotResource(developmentResource, getNextSnapshotVersion(getVersion(snapshotResource)));\n }\n else {\n System.out.println(\"Ignoring new snapshot: \" + getString(developmentResource));\n List<Resource> resultResources = findResources(m_deploymentRepo, getIdentityVersionRequirement(snapshotResource));\n if (resultResources == null || resultResources.size() == 0) {\n throw new IllegalStateException(\"Can not find target resource after put: \" + developmentResource);\n }\n return resultResources.get(0);\n }\n }", "public static void main(String[] args) {\n\n\t\tString docBody = null;\n\t\t\n\t\ttry {\n\t\t\tdocBody = new String(Files.readAllBytes(Paths.get(\"examples/doc1.txt\")), StandardCharsets.UTF_8);\n\t\t} catch (IOException e1) {\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tSmartScriptParser parser = null;\n\t\t\n\t\ttry {\n\t\t\tparser = new SmartScriptParser(docBody);\n\t\t} catch (SmartScriptParserException e) {\n\t\t\tSystem.out.println(\"Unable to parse document!\");\n\t\t\tSystem.exit(-1);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"If this line ever executes, you have failed this class!\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\tDocumentNode document = parser.getDocumentNode();\n\t\tString originalDocumentBody = createOriginalDocumentBody(document);\n\t\tSystem.out.println(originalDocumentBody); \n\t\t\n\t\tSystem.out.println(\"==============\");\n\t\t\n\t\tSmartScriptParser parser2 = new SmartScriptParser(originalDocumentBody);\n\t\tDocumentNode document2 = parser2.getDocumentNode();\n\t\tString originalDocumentBody2 = createOriginalDocumentBody(document2);\n\t\tSystem.out.println(originalDocumentBody2);\n\t\t\n\t\tSystem.out.println(\"==============\");\n\t\t\n\t\tSystem.out.println(\"Documents are equal: \" + originalDocumentBody.equals(originalDocumentBody2));\n\n\t}", "public DefaultXmlMerge()\n {\n m_rootMergeAction.setActionFactory(new StaticOperationFactory(new FullMergeAction()));\n m_rootMergeAction.setMapperFactory(new StaticOperationFactory(new IdentityMapper()));\n m_rootMergeAction.setMatcherFactory(new StaticOperationFactory(new AttributeMatcher()));\n }", "public void testMergeOneServletIntoDocumentWithSameServlet() throws Exception\n {\n String srcXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n assertTrue(WebXmlUtils.hasServlet(srcWebXml, \"s1\"));\n }", "public void mergeChanges(Gateway src) {\n if (src.genClient.getChangeLog() != null) {\n genClient.mergeChanges(new Gateway(src).getJSONObject(), src.genClient);\n }\n }", "private void mergeprocess(String givenbranch,\n boolean conflict, Comm splitpoint) {\n ArrayList<String> modifiedincurr =\n findchanged(splitpoint, branches.get(branch));\n ArrayList<String> modifiedingiven =\n findchanged(splitpoint, branches.get(givenbranch));\n ArrayList<String> addedincurr =\n findadded(splitpoint, branches.get(branch));\n ArrayList<String> addedingiven =\n findadded(splitpoint, branches.get(givenbranch));\n Comm topofcurr = branches.get(branch);\n Comm topofgiven = branches.get(givenbranch);\n for (String file: splitpoint.getContents().keySet()) {\n\n if (!modifiedincurr.contains(file)\n && modifiedingiven.contains(file)) {\n checkoutcomm(branches.get(givenbranch).getCommitID(), file);\n add(file);\n }\n if (modifiedincurr.contains(file)\n && modifiedingiven.contains(file)) {\n if (!(topofcurr.getContents()\n .get(file).getContent().equals(topofgiven\n .getContents().get(file).getContent()))) {\n\n conflict = true;\n mergeconflict(topofcurr.getContents().get(file),\n topofgiven.getContents().get(file));\n }\n }\n if (modifiedingiven.contains(file)\n && !getandadd().contains(file) && !conflict) {\n conflict = true;\n mergeconflictgiven(new Blob(new File(file)));\n }\n if (modifiedincurr.contains(file)\n && !topofgiven.getContents().containsKey(file)\n && !conflict) {\n conflict = true;\n mergeconflictcur(new Blob(new File(file)));\n }\n if (!modifiedincurr.contains(file)\n && !topofgiven.getContents().containsKey(file)) {\n if (stagingarea.containsKey(file)\n || topofcurr.getContents().containsKey(file)) {\n rm(file);\n }\n }\n }\n for (String f :addedingiven) {\n if (!addedincurr.contains(f)) {\n checkoutcomm(branches.get(givenbranch).getCommitID(), f);\n add(f);\n } else {\n conflict = true;\n mergeconflict(topofcurr.getContents().get(f),\n topofgiven.getContents().get(f));\n }\n }\n mergecleanup(conflict, givenbranch);\n }", "void merge();", "public Map<String, Map<String, Integer>> compareCommit(RepositoryDTO repository, CommitDTO oldCommit,\r\n\t\t\tCommitDTO newCommit) {\r\n\r\n\t\tlogger.info(\"Compare commit : \" + oldCommit.getCommitDate().toString() + \" & commit : \"\r\n\t\t\t\t+ newCommit.getCommitDate().toString());\r\n\t\tif (oldCommit.getCommitDate().after(newCommit.getCommitDate())) {\r\n\t\t\t// exchange commit\r\n\t\t}\r\n\t\t;\r\n\r\n\t\tMap<String, Map<String, Integer>> statistics = new HashMap<String, Map<String, Integer>>();\r\n\r\n\t\tfor (FileDTO oldFile : oldCommit.getFiles()) {\r\n\t\t\tfor (FileDTO newFile : newCommit.getFiles()) {\r\n\t\t\t\tif (newFile.getStatus().equalsIgnoreCase(\"modified\")) {\r\n\t\t\t\t\tif (newFile.getFileName().equals(oldFile.getFileName())) {\r\n\t\t\t\t\t\tif (newFile.getFileExtension().toLowerCase().contains(\"java\")) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tMap<String, Map<String, Integer>> compareStats = compareToStats(repository.getName(),\r\n\t\t\t\t\t\t\t\t\t\toldFile, newFile);\r\n\r\n\t\t\t\t\t\t\t\tlogger.info(\"Before -I (current) : \" + statistics.toString());\r\n\t\t\t\t\t\t\t\tlogger.info(\"Before -I (new) : \" + compareStats.toString());\r\n\r\n\t\t\t\t\t\t\t\t// Node type (Method, Field, etc.)\r\n\t\t\t\t\t\t\t\tfor (String type : compareStats.keySet()) {\r\n\r\n\t\t\t\t\t\t\t\t\tMap<String, Integer> tmpTypeToAdd = compareStats.get(type);\r\n\t\t\t\t\t\t\t\t\tMap<String, Integer> currentGlobalType = statistics.get(type);\r\n\r\n\t\t\t\t\t\t\t\t\tif (currentGlobalType == null) {\r\n\t\t\t\t\t\t\t\t\t\tstatistics.put(type, tmpTypeToAdd);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t// Action (Add, Delete, Insert, Move,\r\n\t\t\t\t\t\t\t\t\t\t// Update)\r\n\t\t\t\t\t\t\t\t\t\tfor (String action : tmpTypeToAdd.keySet()) {\r\n\r\n\t\t\t\t\t\t\t\t\t\t\tint hitNumber = currentGlobalType.getOrDefault(action, 0);\r\n\t\t\t\t\t\t\t\t\t\t\tint hitToAdd = tmpTypeToAdd.getOrDefault(action, 0);\r\n\t\t\t\t\t\t\t\t\t\t\tcurrentGlobalType.put(action, hitNumber + hitToAdd);\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\tstatistics.put(type, currentGlobalType);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tlogger.info(\"After -I (current) : \" + statistics.toString());\r\n\r\n\t\t\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\t\t\tlogger.error(e.getMessage(), e);\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}\r\n\t\t}\r\n\t\treturn statistics;\r\n\t}", "@Override public void outputGlobalProgram(IvyXmlWriter xw,Collection<JflowModel.Main> merges,\n\t\t\t\t JflowModel.Editor editor)\n{\n xw.begin(\"GLOBAL\");\n Set<JflowModel.Node> states = createGlobalModel(merges,editor);\n ModelState [] starr = states.toArray(new ModelState[states.size()]);\n Arrays.sort(starr);\n\n xw.begin(\"STATES\");\n for (int i = 0; i < starr.length; ++i) {\n starr[i].outputXml(xw,this);\n }\n xw.end();\n\n xw.end(\"GLOBAL\");\n}", "public final Diff compareXML(Document control, Document test) {\n return new Diff(control, test);\n }", "private Document doMerge(Document[] docs) throws AbstractXmlMergeException\n {\n Document originalDoc = docs[0];\n\n for (int i = 1; i < docs.length; i++)\n {\n\n if (!m_rootMatcher.matches(originalDoc.getRootElement(), docs[i].getRootElement()))\n {\n throw new IllegalArgumentException(\"Root elements do not match.\");\n }\n\n Document output = new Document();\n if (originalDoc.getDocType() != null)\n {\n output.setDocType((DocType) originalDoc.getDocType().clone());\n }\n output.setRootElement(new Element(\"root\"));\n\n m_rootMergeAction.perform(originalDoc.getRootElement(), docs[i].getRootElement(),\n output.getRootElement());\n\n Element root = (Element) output.getRootElement().getChildren().get(0);\n root.detach();\n\n originalDoc.setRootElement(root);\n }\n\n return originalDoc;\n }", "public void exec() {\n\n try {\n\n String webDotXMLPath = webAppPath + \"/WEB-INF/web.xml\";\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory\n .newInstance();\n\n DocumentBuilder builder = DocumentBuilderFactory.newInstance()\n .newDocumentBuilder();\n Document doc = builder.parse(new File(webDotXMLPath));\n DocumentType docType = doc.getDoctype();\n if (docType != null) {\n doc.removeChild(docType);\n }\n Element webAppElement = (Element) doc.getFirstChild();\n webAppElement.setAttribute(\"version\", \"2.4\");\n webAppElement.setAttribute(\"xmlns\",\n \"http://java.sun.com/xml/ns/j2ee\");\n webAppElement.setAttribute(\"xmlns:xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\");\n webAppElement\n .setAttribute(\n \"xsi:schemaLocation\",\n \"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\");\n\n OutputFormat of = new OutputFormat();\n of.setIndenting(true);\n of.setIndent(4); // 2-space indention\n of.setLineWidth(16384);\n\n OutputStream outputStream = new FileOutputStream(webDotXMLPath);\n Writer writer = new OutputStreamWriter(outputStream, \"utf-8\");\n\n XMLSerializer serializer = new XMLSerializer(writer, of);\n serializer.serialize(doc);\n\n writer.close();\n\n } catch (Exception e) {\n throw new RuntimeException(\"Processing failed\", e);\n }\n\n }", "public static void main(String[] args) {\n\t\tif (args.length != 1) {\n\t\t\tSystem.out.println(\"Broj argumenata naredbenog retka mora biti 1.\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\tString filepath = args[0];\n\t\tString docBody = \"\";\n\t\t\n\t\ttry {\n\t\t\tdocBody = new String(Files.readAllBytes(Paths.get(filepath)), StandardCharsets.UTF_8);\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\tSmartScriptParser parser = null;\n\t\t\n\t\ttry {\n\t\t\tparser = new SmartScriptParser(docBody);\n\t\t} catch(SmartScriptParserException e) {\n\t\t\tSystem.out.println(\"Unable to parse document!\");\n\t\t\tSystem.exit(-1);\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"If this line ever executes, you have failed this class!\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t\t\n\t\tDocumentNode document = parser.getDocumentNode();\n\t\tString originalDocumentBody = createOriginalDocumentBody(document);\n\t\tSystem.out.println(originalDocumentBody);\n\t\t\n\t\tSmartScriptParser parser2 = new SmartScriptParser(originalDocumentBody);\n\t\tDocumentNode document2 = parser2.getDocumentNode();\n\t\tString originalDocumentBodySecond = createOriginalDocumentBody(document2);\n\t\t\n\t\tif (originalDocumentBody.equals(originalDocumentBodySecond)) {\n\t\t\tSystem.out.println(\"Identični\");\n\t\t}\n\t}", "@Test\n public void testApplyToOldFile() throws IOException, PatchFailedException {\n Path oldFile = scratch.file(\"/root/oldfile\", \"line one\");\n Path newFile = scratch.file(\"/root/newfile\", \"line one\");\n Path patchFile =\n scratch.file(\n \"/root/patchfile\",\n \"--- oldfile\",\n \"+++ newfile\",\n \"@@ -1,1 +1,2 @@\",\n \" line one\",\n \"+line two\");\n PatchUtil.apply(patchFile, 0, root);\n ImmutableList<String> newContent = ImmutableList.of(\"line one\", \"line two\");\n assertThat(FileSystemUtils.readLines(oldFile, UTF_8)).isEqualTo(newContent);\n // new file should not change\n assertThat(FileSystemUtils.readLines(newFile, UTF_8)).containsExactly(\"line one\");\n }", "void merge(String revSpec) throws GitException, InterruptedException;", "void update(DiffReader diff) throws ModelRuntimeException;", "private static void openCompareEditor(IWorkbenchPage aPage, R4EFileVersion aBaseFileVersion,\r\n \t\t\tR4EFileVersion aTargetFileVersion) {\r\n \r\n \t\t//Reuse editor if it is already open on the same input\r\n \t\tCompareEditorInput input = null;\r\n \t\tfinal IEditorPart editor = findReusableCompareEditor(aPage, aBaseFileVersion, aTargetFileVersion);\r\n \r\n \t\tif (null != editor) {\r\n \t\t\taPage.activate(editor); //Simply provide focus to editor\r\n \r\n \t\t\t//Go to the correct element in the compare editor\r\n \t\t\tUIUtils.selectElementInEditor((R4ECompareEditorInput) editor.getEditorInput());\r\n \t\t} else {\r\n \t\t\tinput = CommandUtils.createCompareEditorInput(aBaseFileVersion, aTargetFileVersion);\r\n \t\t\tinput.setTitle(R4E_COMPARE_EDITOR_TITLE); // Adjust the compare title\r\n \r\n \t\t\tR4EUIPlugin.Ftracer.traceInfo(\"Open compare editor on files \"\r\n \t\t\t\t\t+ ((null != aTargetFileVersion) ? aTargetFileVersion.getName() : \"\") + \" (Target) and \"\r\n \t\t\t\t\t+ ((null != aBaseFileVersion) ? aBaseFileVersion.getName() : \"\") + \" (Base)\");\r\n \t\t\tCompareUI.openCompareEditor(input, true);\r\n \t\t\t//NOTE: The position is set in editor in R4ECompareEditorInput#createContents\r\n \t\t}\r\n \t}", "private void buildReport() throws IOException {\n try (InputStream template = Thread.currentThread().getContextClassLoader().getResourceAsStream(TEMPLATE_DIR + \"/\" + TEMPLATE_NAME)) {\n reportDoc = Jsoup.parse(template, null, \"\");\n Element diffReportContainer = reportDoc.select(\".diffReport\").first();\n Element diffResultTable = diffReportContainer.select(\".diffResult\").first().clone();\n\n diffReportContainer.empty();\n\n for (SimpleImmutableEntry<String, List<File>> diffResult : fileDiffResults) {\n diffReportContainer.appendChild(getDiffTable(diffResultTable, diffResult));\n }\n }\n }", "public static String renderDifferencesWithPreviousVersion(boObject current, long bouiVersion, XMLDocument doc, EboContext newContext)\n {\n \ttry\n\t\t{\n \t\tif (doc == null){\n \t\t\treturn \"Não foi possível aceder ao viewer, ocorreu um erro\"; //FIXME: Internacionalizar\n \t\t}\n \t\t\n \t\t\n\t\t\tEboContext\t\teboCtx = current.getEboContext();\n\t\t\t//Boui of the Ebo_Versioning\n\t\t\t\n\t\t\tboObject\t\tobjectVersion = boObject.getBoManager().loadObject(eboCtx, bouiVersion);\n\t\t\t\n\t\t\tboVersioning\tversioningManager = new boVersioning();\n\t\t\tlong\t\t\tbouiOfObject = objectVersion.getAttribute(\"changedObject\").getValueLong();\n\t\t\tlong\t\t\tversionOfObject = objectVersion.getAttribute(\"version\").getValueLong();\n\t\t\t\n\t\t\t//Create a new context to hold the rollback version\n\t\t\t//which means the original object can be left alone\n\t\t\tversioningManager.rollbackVersion(newContext,bouiOfObject,versionOfObject, true);\n\t\t\t\n\t\t\tboObject\t\trollBackVersion = boObject.getBoManager().loadObject(newContext, bouiOfObject);\n\t\t\t\n\t\t\t//Get the difference between objects\n\t\t\tObjectDifference diffObj = new ObjectDifference(current, rollBackVersion);\n\t\t\t\n\t\t\t//Get the Map of differences of attributes\n\t\t\tHashMap<String,ObjectAttributeValuePair> diffAttributes = diffObj.getAttributeDifferencesOfObjects();\n\t\t\t\n\t\t\t//Get the Map of differences of bridges\n\t\t\tHashMap<String,GridFlashBack> diffBridges = diffObj.getBridgeDifferencesOfObjects();\n\t\t\t\n\t\t\tIterator<String> itDiffAtts = diffAttributes.keySet().iterator();\n\t\t\tElement differences = doc.createElement(\"differences\");\n\t\t\tdifferences.setAttribute(\"label\", BeansMessages.LBL_DIFFERENCES_RESUME.toString());\n\t\t\twhile (itDiffAtts.hasNext())\n\t\t\t{\n\t\t\t\tElement attribute = doc.createElement(\"attribute\");\n\t\t\t\tString attName = itDiffAtts.next();\n\t\t\t\tObjectAttributeValuePair pair = diffAttributes.get(attName);\n\t\t\t\tattribute.setAttribute(\"name\", pair.getAttName());\n\t\t\t\tattribute.setAttribute(\"oldValue\", pair.getOldVal());\n\t\t\t\tattribute.setAttribute(\"newValue\", pair.getNewVal());\n\t\t\t\tdifferences.appendChild(attribute);\n\t\t\t}\n\t\t\tdoc.getDocumentElement().appendChild(differences);\n\t\t\t\n\t\t\t//Update the XML tree with the differences in attributes and bridges\n\t\t\tupdateXMLTreeWithAttributeDifferences(doc, diffAttributes, diffBridges,differences);\n\t\t\t\n\t\t\tString xmlSourceContent = ngtXMLUtils.getXML(doc);\n\t\t\t\n\t\t\t//System.out.println(xmlSourceContent);\n\t\t\t\n\t\t\t//Apply the XSLT\n\t\t\tfinal String XSLT = \"showDifferencesVersion.xsl\";\n\t\t\tInputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream( XSLT );\n\t\t\tString finalTransformer = ngtXMLUtils.getXML(ngtXMLUtils.loadXML(in));\n\t\t\t\n\t\t\tSource xmlSource = new StreamSource(new StringReader(xmlSourceContent));\n\t Source xsltSource = new StreamSource(new StringReader(finalTransformer));\n\n\t StringWriter pw = new StringWriter();\n \t// the factory pattern supports different XSLT processors\n\t TransformerFactory transFact =\n\t TransformerFactory.newInstance();\n\t Transformer trans = transFact.newTransformer(xsltSource);\n\t trans.transform(xmlSource, new StreamResult(pw));\n\t\t\t\n\t\t\tnewContext.close();\n\t\t\t\n\t\t\treturn pw.toString();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tif (newContext != null)\n\t\t\t\tnewContext.close();\n\t\t} \n\t\t\n\t\t//Show the Logs in case of error \n\t\tString logs = getListOfLogsObject(bouiVersion, current);\n\t\t\n\t\treturn BeansMessages.MSG_ERROR_IN_DIFFERENCES_RENDER.toString()\n\t\t\t\t+ \"<br />\" + logs;\n }", "public void testMergeOneServletIntoDocumentWithAnotherServlet() throws Exception\n {\n String srcXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s1</servlet-name>\"\n + \" <servlet-class>sclass1</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml srcWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(srcXml.getBytes(StandardCharsets.UTF_8)), null);\n String mergeXml = \"<web-app>\"\n + \" <servlet>\"\n + \" <servlet-name>s2</servlet-name>\"\n + \" <servlet-class>sclass2</servlet-class>\"\n + \" </servlet>\"\n + \"</web-app>\";\n WebXml mergeWebXml = WebXmlIo.parseWebXml(\n new ByteArrayInputStream(mergeXml.getBytes(StandardCharsets.UTF_8)), null);\n WebXmlMerger merger = new WebXmlMerger(srcWebXml);\n merger.merge(mergeWebXml);\n assertTrue(WebXmlUtils.hasServlet(srcWebXml, \"s1\"));\n assertTrue(WebXmlUtils.hasServlet(srcWebXml, \"s2\"));\n }", "@Override\n public abstract NiceXWPFDocument merge(NiceXWPFDocument source, Iterator<NiceXWPFDocument> mergedIterator,\n XWPFRun location) throws Exception;", "@Test\n// @Ignore\n public void testConversion() {\n String xmlIn = XmlTool.removeNamespaces(xmlReqNoAttrs);\n // strip all the non-data whitespace\n xmlIn = xmlIn.replaceAll(\">\\\\s*<\", \"><\");\n String json = JsonUtils.xml2json(xmlReqNoAttrs);\n System.out.println(\"testConversion(): xml request to json: \" + json);\n String xmlOut = JsonUtils.json2xml(json);\n System.out.println(\"testConversion(): json request back to xml: \" + xmlOut);\n \n // strip all the non-data whitespace\n xmlOut = xmlOut.replaceAll(\">\\\\s*<\", \"><\");\n// System.out.println(\"testConversion(): xml in: \" + xmlIn);\n// System.out.println(\"testConversion(): xml out: \" + xmlOut);\n\n Diff diffXml;\n try {\n diffXml = new Diff(xmlIn, xmlOut);\n Assert.assertTrue(diffXml.similar());\n// Assert.assertTrue(diffXml.identical());\n } catch (SAXException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void automerge() {\n\t\tif (automerge) {\n\t\t\tfor(int i = 0; i<create_modifier+1;i++) {\n\t\t\t\tmerge();\n\t\t\t}\n\t\tif(autoidentify) {\n\t\t\tauto_identify_crystal(autoIdentifyTier); // replace this eventually\n\t\t}\n\t\t\t//collection();\n\t\t}\n\t}", "@Override\r\n\tpublic void merge(List<EObject> sources, List<EObject> targets) {\n\t\tcontext = targets.get(0).eResource().getResourceSet();\r\n\r\n\t\tsuper.merge(sources, targets);\r\n\t}", "public static void applyPatch(File oldFile, File patchFile, File newFile) throws IOException {\n // Figure out temp directory\n File tempFile = File.createTempFile(\"fbftool\", \"tmp\");\n File tempDir = tempFile.getParentFile();\n tempFile.delete();\n FileByFileV1DeltaApplier applier = new FileByFileV1DeltaApplier(tempDir);\n try (FileInputStream patchIn = new FileInputStream(patchFile);\n BufferedInputStream bufferedPatchIn = new BufferedInputStream(patchIn);\n FileOutputStream newOut = new FileOutputStream(newFile);\n BufferedOutputStream bufferedNewOut = new BufferedOutputStream(newOut)) {\n applier.applyDelta(oldFile, bufferedPatchIn, bufferedNewOut);\n bufferedNewOut.flush();\n }\n }", "public void reloadDeployment(Deployment deployment) throws Exception {\n File file = new File(root, \"nxserver/dev.bundles\");\n String content = deployment.getContentAsString();\n IOUtils.writeFile(file, content);\n }", "public static IEditorPart findReusableCompareEditor(IWorkbenchPage aPage, R4EFileVersion aBaseFile,\r\n \t\t\tR4EFileVersion aTargetFile) {\r\n \r\n \t\tfinal IEditorReference[] editorRefs = aPage.getEditorReferences();\r\n \t\tIEditorPart part = null;\r\n \t\tR4ECompareEditorInput input = null;\r\n \t\tITypedElement left = null;\r\n \t\tITypedElement right = null;\r\n \t\t// first loop looking for an editor with the same input\r\n \t\tfor (IEditorReference editorRef : editorRefs) {\r\n \t\t\tpart = editorRef.getEditor(false);\r\n \t\t\tif (null != part && part instanceof IReusableEditor) {\r\n \t\t\t\t// check if the editor input type complies with the types given by the caller\r\n \t\t\t\tif (R4ECompareEditorInput.class.isInstance(part.getEditorInput())) {\r\n \t\t\t\t\t//Now check if the input files are the same as with the found editor\r\n \t\t\t\t\tinput = (R4ECompareEditorInput) part.getEditorInput();\r\n \t\t\t\t\tleft = input.getLeftElement();\r\n \t\t\t\t\tright = input.getRightElement();\r\n \r\n \t\t\t\t\t//Case: No input in editor, that should never happen but guard here just in case\r\n \t\t\t\t\tif (null == left && null == right) {\r\n \t\t\t\t\t\treturn null;\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\t//Get the file versions\r\n \t\t\t\t\tR4EFileVersion leftVersion = null;\r\n \t\t\t\t\tR4EFileVersion rightVersion = null;\r\n \t\t\t\t\tif (left instanceof R4EFileRevisionTypedElement) {\r\n \t\t\t\t\t\tleftVersion = ((R4EFileRevisionTypedElement) left).getFileVersion();\r\n \t\t\t\t\t} else if (left instanceof R4EFileTypedElement) {\r\n \t\t\t\t\t\tleftVersion = ((R4EFileTypedElement) left).getFileVersion();\r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (right instanceof R4EFileRevisionTypedElement) {\r\n \t\t\t\t\t\trightVersion = ((R4EFileRevisionTypedElement) right).getFileVersion();\r\n \t\t\t\t\t} else if (right instanceof R4EFileTypedElement) {\r\n \t\t\t\t\t\trightVersion = ((R4EFileTypedElement) right).getFileVersion();\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\t//Case: No target file and base is the same\r\n \t\t\t\t\tif (null == leftVersion && null == aTargetFile && null != rightVersion && null != aBaseFile\r\n \t\t\t\t\t\t\t&& rightVersion.equals(aBaseFile)) {\r\n \t\t\t\t\t\treturn part;\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\t//Case: No base file and target is the same\r\n \t\t\t\t\tif (null == rightVersion && null == aBaseFile && null != leftVersion && null != aTargetFile\r\n \t\t\t\t\t\t\t&& leftVersion.equals(aTargetFile)) {\r\n \t\t\t\t\t\treturn part;\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\t//Case: Base and target are the same\r\n \t\t\t\t\tif (null != leftVersion && null != rightVersion && null != aBaseFile && null != aTargetFile) {\r\n \t\t\t\t\t\tif (leftVersion.equals(aTargetFile) && rightVersion.equals(aBaseFile)) {\r\n \t\t\t\t\t\t\treturn part;\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}\r\n \t\t}\r\n \t\t// no re-usable editor found\r\n \t\treturn null;\r\n \t}", "private JsonObject buildDocumentDiff(@Nonnull String revisionId, @Nonnull Instant now,\n @Nullable JsonArray diff) {\n return new JsonObject()\n .put(DocChange.REV, revisionId)\n .put(DocChange.DATE, now)\n .put(DocChange.DIFFS, diff);\n }", "private void processSingle()\n {\n boolean bResolveRefs = false;\n if ((m_iOptions & OPT_RES_REFS) != 0)\n bResolveRefs = true;\n \n OOLocaleReader reader = new OOLocaleReader(m_inFile);\n reader.readDocument(bResolveRefs);\n \n //create instance of LDMLLocaleWriterForOO which does the writing to file\n PrintStream ps = Utilities.setLocaleWriter2(m_localeStr, null, m_dest_dir);\n m_LDMLLocaleWriterForOO = new LDMLLocaleWriterForOO(ps);\n \n Hashtable aliases = OOToLDMLMapper.mapRefs(reader.m_Refs2);\n m_LDMLLocaleWriterForOO.setAliases(aliases);\n \n //start writing the LDML\n m_LDMLLocaleWriterForOO.open(XMLNamespace.OPEN_OFFICE, m_dtd_dir, \"ldmlOpenOffice.dtd\", m_cldr_ver);\n \n Hashtable data = new Hashtable();\n \n //###### write identity ######\n data.put(LDMLConstants.VERSION + \" \" + LDMLConstants.NUMBER, \"1.2\");\n data.put(LDMLConstants.GENERATION, \"Generated from ConvertOOLocale\");\n if (reader.m_LangId!=null)\n data.put(LDMLConstants.LANGUAGE + \" \" + LDMLConstants.TYPE, reader.m_LangId);\n if (reader.m_Country_CountryID!=null)\n data.put(LDMLConstants.TERRITORY + \" \" + LDMLConstants.TYPE, reader.m_Country_CountryID);\n \n //write PlatformID as special under <identity>\n if (reader.m_PlatformID != null) data.put(OpenOfficeLDMLConstants.PLATFORM_ID, reader.m_PlatformID);\n \n m_LDMLLocaleWriterForOO.writeIdentity(data);\n data.clear();\n \n //###### write localeDisplayNames ######\n //defaultNames will be written as special under localeDisplayNames\n if (reader.m_LangId!=null) data.put(LDMLConstants.LANGUAGE + \" \" + LDMLConstants.TYPE, reader.m_LangId );\n if (reader.m_Language_DefaultName!=null) data.put(OpenOfficeLDMLConstants.DEFAULT_NAME + \" \" + reader.m_LangId, reader.m_Language_DefaultName);\n if (reader.m_Country_CountryID!=null) data.put(LDMLConstants.TERRITORY + \" \" + LDMLConstants.TYPE, reader.m_Country_CountryID);\n if (reader.m_Country_DefaultName!=null) data.put(OpenOfficeLDMLConstants.DEFAULT_NAME + \" \" + reader.m_Country_CountryID , reader.m_Country_DefaultName);\n m_LDMLLocaleWriterForOO.writeLocaleDisplaynames(data);\n data.clear();\n \n //###### write delimiters ######\n Hashtable markers = OOToLDMLMapper.MapDelimiters(reader.m_Markers);\n if (markers != null) data.putAll(markers);\n m_LDMLLocaleWriterForOO.writeDelimiterss(data);\n data.clear();\n \n //###### write measurement ######\n String measSys = OOToLDMLMapper.MapMeasurementSystem(reader.m_MeasurementSystem);\n if (measSys!=null) data.put(LDMLConstants.MEASUREMENT, measSys);\n m_LDMLLocaleWriterForOO.writeMeasurement(data);\n data.clear();\n \n //###### write calendars ######\n Vector calendars = OOToLDMLMapper.MapCalendar(reader.m_Calendars);\n if (calendars!=null) data.put(LDMLConstants.CALENDAR + \" \" + LDMLConstants.TYPE, calendars);\n \n Hashtable abbrDays = OOToLDMLMapper.MapDays(reader.m_AbbrDays);\n if (abbrDays!=null) data.put(LDMLConstants.DAY_WIDTH + \" \" + LDMLConstants.ABBREVIATED, abbrDays);\n \n Hashtable wideDays = OOToLDMLMapper.MapDays(reader.m_WideDays);\n if (wideDays!=null) data.put(LDMLConstants.DAY_WIDTH + \" \" + LDMLConstants.WIDE, wideDays);\n \n Hashtable abbrMonths = OOToLDMLMapper.MapMonths(reader.m_AbbrMonths);\n if (abbrMonths!=null) data.put(LDMLConstants.MONTH_WIDTH + \" \" + LDMLConstants.ABBREVIATED, abbrMonths);\n \n Hashtable wideMonths = OOToLDMLMapper.MapMonths(reader.m_WideMonths);\n if (wideMonths!=null) data.put(LDMLConstants.MONTH_WIDTH + \" \" + LDMLConstants.WIDE, wideMonths);\n \n //reservedWords contains quarters, true/false, above/below\n /* Hashtable wideQuarters = OOToLDMLMapper.MapWideQuarters(reader.m_ReservedWords);\n if (wideQuarters != null) data.put(LDMLConstants.QUARTER_WIDTH+ \" \" + LDMLConstants.WIDE, wideQuarters);\n Hashtable abbrQuarters = OOToLDMLMapper.MapAbbrQuarters(reader.m_ReservedWords);\n if (abbrQuarters != null) data.put(LDMLConstants.QUARTER_WIDTH+ \" \" + LDMLConstants.ABBREVIATED, abbrQuarters);\n */\n Hashtable abbrEras = OOToLDMLMapper.MapEras(reader.m_AbbrEras);\n if (abbrEras!=null) data.put(LDMLConstants.ERAABBR, abbrEras);\n \n Hashtable wideEras = OOToLDMLMapper.MapEras(reader.m_WideEras);\n if (wideEras!=null) data.put(LDMLConstants.ERANAMES, wideEras);\n \n Hashtable startDayOfWeek = OOToLDMLMapper.MapStartDayOfWeek(reader.m_StartDayOfWeek);\n if (startDayOfWeek!=null) data.put(LDMLConstants.FIRSTDAY, startDayOfWeek);\n \n Hashtable minDaysInFirstWeek = OOToLDMLMapper.MapMinDaysInFirstWeek(reader.m_MinDaysInFirstweek);\n if (minDaysInFirstWeek!=null) data.put(LDMLConstants.MINDAYS, minDaysInFirstWeek);\n \n if (reader.m_TimeAM!=null) data.put(LDMLConstants.AM, reader.m_TimeAM);\n if (reader.m_TimePM!=null) data.put(LDMLConstants.PM, reader.m_TimePM);\n \n //get the DATE FormatElements\n Hashtable formatElements_date = new Hashtable();\n Hashtable formatCodes_date = new Hashtable();\n Hashtable formatDefaultNames_date = new Hashtable();\n \n OOToLDMLMapper.MapFormatElements(reader.m_FormatElements,\n reader.m_FormatCodes,\n reader.m_FormatDefaultNames,\n formatElements_date,\n formatCodes_date, //the patterns\n formatDefaultNames_date,\n OOConstants.FEU_DATE, m_localeStr, m_bConvertDateTime);\n \n data.put(LDMLConstants.DATE_FORMAT, formatElements_date);\n data.put(LDMLConstants.DATE_FORMAT + \" \" + LDMLConstants.PATTERN, formatCodes_date);\n data.put(LDMLConstants.DATE_FORMAT + OpenOfficeLDMLConstants.DEFAULT_NAME, formatDefaultNames_date);\n \n //get the TIME FormatElements\n Hashtable formatElements_time = new Hashtable();\n Hashtable formatCodes_time = new Hashtable();\n Hashtable formatDefaultNames_time = new Hashtable();\n OOToLDMLMapper.MapFormatElements(reader.m_FormatElements,\n reader.m_FormatCodes,\n reader.m_FormatDefaultNames,\n formatElements_time,\n formatCodes_time, //the patterns\n formatDefaultNames_time,\n OOConstants.FEU_TIME, m_localeStr, m_bConvertDateTime);\n \n data.put(LDMLConstants.TIME_FORMAT, formatElements_time);\n data.put(LDMLConstants.TIME_FORMAT + \" \" + LDMLConstants.PATTERN, formatCodes_time);\n data.put(LDMLConstants.TIME_FORMAT + OpenOfficeLDMLConstants.DEFAULT_NAME, formatDefaultNames_time);\n \n //get the DATE_TIME FormatElements\n Hashtable formatElements_date_time = new Hashtable();\n Hashtable formatCodes_date_time = new Hashtable();\n Hashtable formatDefaultNames_date_time = new Hashtable();\n OOToLDMLMapper.MapFormatElements(reader.m_FormatElements,\n reader.m_FormatCodes,\n reader.m_FormatDefaultNames,\n formatElements_date_time,\n formatCodes_date_time, //the patterns\n formatDefaultNames_date_time,\n OOConstants.FEU_DATE_TIME, m_localeStr, m_bConvertDateTime);\n \n data.put(LDMLConstants.DATE_TIME_FORMAT, formatElements_date_time);\n data.put(LDMLConstants.DATE_TIME_FORMAT + \" \" + LDMLConstants.PATTERN, formatCodes_date_time);\n data.put(LDMLConstants.DATE_TIME_FORMAT + OpenOfficeLDMLConstants.DEFAULT_NAME, formatDefaultNames_date_time);\n \n m_LDMLLocaleWriterForOO.writeDates(data);\n data.clear();\n \n //###### numbers ######\n Hashtable symbols = new Hashtable();\n symbols = OOToLDMLMapper.MapSymbols(reader.m_Separators);\n if (symbols != null) data.put(LDMLConstants.SYMBOLS, symbols);\n \n Hashtable currencies = new Hashtable();\n Hashtable currency = OOToLDMLMapper.MapCurrency(reader.m_Currency);\n if (currency != null) currencies.put(LDMLConstants.CURRENCY, currency);\n if (reader.m_CurrencyID != null) currencies.put(LDMLConstants.ID, reader.m_CurrencyID);\n if (reader.m_CurrencySymbol != null) currencies.put(LDMLConstants.SYMBOL, reader.m_CurrencySymbol);\n if (reader.m_CurrencyName != null) currencies.put(LDMLConstants.DISPLAY_NAME, reader.m_CurrencyName);\n data.put(LDMLConstants.CURRENCIES, currencies);\n \n //get the FIXED_NUMBER FormatElements\n //OO dtd also mentions FRACTION_NUMBER but its not used in any XML files\n Hashtable formatElements_fn = new Hashtable();\n Hashtable formatCodes_fn = new Hashtable();\n Hashtable formatDefaultNames_fn = new Hashtable();\n OOToLDMLMapper.MapFormatElements(reader.m_FormatElements,\n reader.m_FormatCodes,\n reader.m_FormatDefaultNames,\n formatElements_fn,\n formatCodes_fn,\n formatDefaultNames_fn,\n OOConstants.FEU_FIXED_NUMBER, m_localeStr, m_bConvertDateTime);\n \n data.put(LDMLConstants.DECIMAL_FORMATS, formatElements_fn);\n data.put(LDMLConstants.DECIMAL_FORMATS + \" \" + LDMLConstants.PATTERN, formatCodes_fn);\n data.put(LDMLConstants.DECIMAL_FORMATS + OpenOfficeLDMLConstants.DEFAULT_NAME, formatDefaultNames_fn);\n \n //get the SCIENTIFIC_NUMBER FormatElements\n Hashtable formatElements_sn = new Hashtable();\n Hashtable formatCodes_sn = new Hashtable();\n Hashtable formatDefaultNames_sn = new Hashtable();\n OOToLDMLMapper.MapFormatElements(reader.m_FormatElements,\n reader.m_FormatCodes,\n reader.m_FormatDefaultNames,\n formatElements_sn,\n formatCodes_sn,\n formatDefaultNames_sn,\n OOConstants.FEU_SCIENTIFIC_NUMBER, m_localeStr, m_bConvertDateTime);\n \n data.put(LDMLConstants.SCIENTIFIC_FORMATS, formatElements_sn);\n data.put(LDMLConstants.SCIENTIFIC_FORMATS + \" \" + LDMLConstants.PATTERN, formatCodes_sn);\n data.put(LDMLConstants.SCIENTIFIC_FORMATS + OpenOfficeLDMLConstants.DEFAULT_NAME, formatDefaultNames_sn);\n \n //get the PERCENT_NUMBER FormatElements\n Hashtable formatElements_pn = new Hashtable();\n Hashtable formatCodes_pn = new Hashtable();\n Hashtable formatDefaultNames_pn = new Hashtable();\n OOToLDMLMapper.MapFormatElements(reader.m_FormatElements,\n reader.m_FormatCodes,\n reader.m_FormatDefaultNames,\n formatElements_pn,\n formatCodes_pn,\n formatDefaultNames_pn,\n OOConstants.FEU_PERCENT_NUMBER, m_localeStr, m_bConvertDateTime);\n \n data.put(LDMLConstants.PERCENT_FORMATS, formatElements_pn);\n data.put(LDMLConstants.PERCENT_FORMATS + \" \" + LDMLConstants.PATTERN, formatCodes_pn);\n data.put(LDMLConstants.PERCENT_FORMATS + OpenOfficeLDMLConstants.DEFAULT_NAME, formatDefaultNames_pn);\n \n //get the CURRENCY FormatElements\n Hashtable formatElements_c = new Hashtable();\n Hashtable formatCodes_c = new Hashtable();\n Hashtable formatDefaultNames_c = new Hashtable();\n OOToLDMLMapper.MapFormatElements(reader.m_FormatElements,\n reader.m_FormatCodes,\n reader.m_FormatDefaultNames,\n formatElements_c,\n formatCodes_c,\n formatDefaultNames_c,\n OOConstants.FEU_CURRENCY, m_localeStr, m_bConvertDateTime);\n \n data.put(LDMLConstants.CURRENCY_FORMATS, formatElements_c);\n data.put(LDMLConstants.CURRENCY_FORMATS + \" \" + LDMLConstants.PATTERN, formatCodes_c);\n data.put(LDMLConstants.CURRENCY_FORMATS + OpenOfficeLDMLConstants.DEFAULT_NAME, formatDefaultNames_c);\n \n m_LDMLLocaleWriterForOO.writeNumbers(data);\n data.clear();\n \n \n //###### write remaining OpenOffice.org specials under top level <special> element ######\n \n //any containers with attribute names should undergo MapFirstCharToLowerCase\n // as in OpenOffice DTD most attribute names start with capital, whereas all attribs and eleemnts\n // in ldml for OO start with lower case\n //MapFirstCharToLowerCase not needed for containers with no attrib names in them\n \n Hashtable forbiddenChars = OOToLDMLMapper.MapFirstCharToLowerCase(reader.m_ForbiddenChars);\n if (forbiddenChars != null) data.put(OpenOfficeLDMLConstants.FORBIDDEN_CHARACTERS, forbiddenChars);\n \n //reservedWords contains quarters, true/false, above/below\n Hashtable reservedWords = OOToLDMLMapper.MapFirstCharToLowerCase(reader.m_ReservedWords);\n if (reservedWords != null) data.put(OpenOfficeLDMLConstants.RESERVED_WORDS, reservedWords);\n \n Vector numLevels = OOToLDMLMapper.MapFirstCharToLowerCase(reader.m_NumberingLevels);\n if (numLevels != null) data.put(OpenOfficeLDMLConstants.NUMBERING_LEVELS, numLevels);\n \n Vector OutlineNumberingLevels = OOToLDMLMapper.MapFirstCharToLowerCase(reader.m_OutlineNumberingLevels);\n if (OutlineNumberingLevels != null) data.put(OpenOfficeLDMLConstants.OUTLUNE_NUMBERING_LEVELS, OutlineNumberingLevels);\n \n Vector translits = OOToLDMLMapper.MapFirstCharToLowerCase(reader.m_Transliterations);\n if (translits != null) data.put(OpenOfficeLDMLConstants.TRANSLITERATIONS, translits);\n \n if (reader.m_SearchOptions != null) data.put(OpenOfficeLDMLConstants.SEARCH_OPTIONS, reader.m_SearchOptions);\n \n if (reader.m_IndexKeys != null) data.put(OpenOfficeLDMLConstants.INDEX_KEY, reader.m_IndexKeys);\n if (reader.m_IndexKeysData != null) data.put(OpenOfficeLDMLConstants.INDEX, reader.m_IndexKeysData);\n if (reader.m_UnicodeScript != null) data.put(OpenOfficeLDMLConstants.UNICODE_SCRIPT, reader.m_UnicodeScript);\n if (reader.m_FollowPageWord != null) data.put(OpenOfficeLDMLConstants.FOLLOW_PAGE_WORD, reader.m_FollowPageWord);\n \n Vector collators = OOToLDMLMapper.MapFirstCharToLowerCase(reader.m_Collators);\n if (collators != null) data.put(OpenOfficeLDMLConstants.COLLATOR, collators);\n if (reader.m_CollationOptions != null) data.put(OpenOfficeLDMLConstants.COLLATION_OPTIONS, reader.m_CollationOptions);\n \n Vector format = OOToLDMLMapper.MapFirstCharToLowerCase(reader.m_LCFormat);\n if (format != null) data.put(OpenOfficeLDMLConstants.FORMAT, format);\n \n Hashtable localeInfo = OOToLDMLMapper.mapLocaleInfo(reader.m_LocaleInfo);\n if (localeInfo != null) data.put(OpenOfficeLDMLConstants.LOCALE, localeInfo);\n \n m_LDMLLocaleWriterForOO.writeSpecial(data);\n data.clear();\n \n m_LDMLLocaleWriterForOO.close();\n \n }", "public void saveDiffs(List<String> differencesList) {\n\t\tJavaIO.saveObjectToXML(getCurrentPath(), \"diffs.xml\", differencesList, false);\n\t}", "private static void run(CmdLineParser cmdParser, Options options) throws IOException, JAXBException {\n PatchToolBuilder builder = new PatchToolBuilder();\n URL defaultRepoURL = LocalFileRepository.getDefaultRepositoryURL();\n if (defaultRepoURL != null) {\n builder.repositoryURL(defaultRepoURL);\n }\n\n if (options.configUrl != null) {\n builder.loadConfiguration(options.configUrl);\n }\n if (options.repositoryUrl != null) {\n builder.repositoryURL(options.repositoryUrl);\n }\n if (options.serverHome != null) {\n builder.serverPath(options.serverHome);\n }\n\n\t boolean opfound = false;\n\n // Query the repository\n\t\tif (options.queryRepository) {\n PatchTool patchTool = builder.build();\n printPatches(patchTool.getRepository().queryAvailable(null));\n opfound = true;\n }\n\n // Query the server\n if (options.queryServer) {\n PatchTool patchTool = builder.serverPath(options.serverHome).build();\n printPatches(patchTool.getServer().queryAppliedPatches());\n opfound = true;\n }\n\n // Query the server paths\n if (options.queryServerPaths != null) {\n PatchTool patchTool = builder.serverPath(options.serverHome).build();\n List<String> managedPaths = new ArrayList<>();\n for (ManagedPath managedPath : patchTool.getServer().queryManagedPaths(options.queryServerPaths)) {\n managedPaths.add(managedPath.toString());\n }\n printLines(managedPaths);\n opfound = true;\n }\n\n // Add to repository\n if (options.addUrl != null) {\n addArchive(builder.build(), options);\n opfound = true;\n }\n\n // Remove from repository\n if (options.removeId != null) {\n PatchTool patchTool = builder.build();\n patchTool.getRepository().removeArchive(PatchId.fromString(options.removeId));\n opfound = true;\n }\n\n // Install to server\n if (options.installId != null) {\n PatchTool patchTool = builder.serverPath(options.serverHome).build();\n patchTool.getServer().cleanUp();\n patchTool.install(PatchId.fromString(options.installId), options.force);\n opfound = true;\n }\n\n // Update the server\n if (options.updateName != null) {\n PatchTool patchTool = builder.serverPath(options.serverHome).build();\n patchTool.getServer().cleanUp();\n patchTool.update(options.updateName, options.force);\n opfound = true;\n }\n\n // Uninstall patch from server\n if (options.uninstallId != null) {\n PatchTool patchTool = builder.serverPath(options.serverHome).build();\n patchTool.getServer().cleanUp();\n patchTool.uninstall(PatchId.fromString(options.uninstallId));\n opfound = true;\n }\n\n // Print the audit log\n if (options.auditLog) {\n PatchTool patchTool = builder.serverPath(options.serverHome).build();\n printLines(patchTool.getServer().getAuditLog());\n opfound = true;\n }\n\n\t\t// Show help screen\n\t\tif (!opfound) {\n helpScreen(cmdParser);\n\t\t}\n\t}", "public CellMLDiffInterpreter (SimpleConnectionManager conMgmt, CellMLDocument cellmlDocA,\n\t\tCellMLDocument cellmlDocB)\n\t{\n\t\tsuper (conMgmt, cellmlDocA.getTreeDocument (), cellmlDocB.getTreeDocument ());\n\t\t\t//report = new SBMLDiffReport ();\n\t\t\tthis.cellmlDocA = cellmlDocA;\n\t\t\tthis.cellmlDocB = cellmlDocB;\n\t}", "public void updateSource() {\n\t\t// Set the mode to recording\n\t\tmode = RECORD;\n\t\t// Traverse the source and record the architectures structure\n\t\tinspect();\n\t\t// Set the mode to code generation\n\t\tmode = GENERATE;\n\t\t// Traverse the source and calls back when key source elements are\n\t\t// missing\n\t\tinspect();\n\t\t// System.out.println(tree);\n\t\t// Add the source files that are missing\n\t\tArrayList<TagNode> tags = tree.getUnvisited();\n\t\tcreateSourceFiles(tags);\n\t}", "public static List compareXML(Reader source, Reader target) throws\n SAXException, IOException{\n Diff xmlDiff = new Diff(source, target);\n \n //for getting detailed differences between two xml files\n DetailedDiff detailXmlDiff = new DetailedDiff(xmlDiff);\n \n return detailXmlDiff.getAllDifferences();\n }", "public static void status() {\n Set branchSet = commitPointers.readBranches().keySet();\n ArrayList<String> sortedBranches = (ArrayList) branchSet.stream().sorted().collect(Collectors.toList());\n String currBranch = commitPointers.readHeadCommit()[0];\n System.out.println(\"=== Branches ===\");\n for (String branch: sortedBranches) {\n if (currBranch.equals(branch)) {\n System.out.println(\"*\" + currBranch);\n } else {\n System.out.println(branch);\n }\n }\n stagingArea = Utils.readObject(STAGING_FILE, HashMap.class);\n\n ArrayList<String> sortedStaged = (ArrayList) stagingArea.keySet().stream().sorted().collect(Collectors.toList());\n System.out.println();\n System.out.println(\"=== Staged Files ===\");\n for (String staged : sortedStaged) {\n System.out.println(staged);\n }\n\n System.out.println();\n System.out.println(\"=== Removed Files ===\");\n stagingRemoveArea = Utils.readObject(STAGING_REMOVE_FILE, HashMap.class);\n ArrayList<String> sortedRemoved = (ArrayList) stagingRemoveArea.keySet().stream().sorted().collect(Collectors.toList());\n for (String removed : sortedRemoved) {\n System.out.println(removed);\n }\n System.out.println();\n\n System.out.println(\"=== Modifications Not Staged For Commit ===\");\n\n Commit Head = Utils.readObject(Utils.join(Commit.COMMIT_FOLDER, commitPointers.readHeadCommit()[1] + \".txt\"), Commit.class);\n //File blobs contains a SHAID + file name\n\n HashMap<String, String> modUntracked = new HashMap<>();\n\n //iterates through head Blobs\n for (HashMap.Entry<String, String> headfileBlob : Head.fileBlobs.entrySet()) {\n\n File cwdBFile = Utils.join(CWD, headfileBlob.getKey());\n\n if (!cwdBFile.exists() && !stagingRemoveArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(deleted)\");\n }\n else if (cwdBFile.exists()){\n\n Blob tempBlob = new Blob(headfileBlob.getKey(), cwdBFile);\n String tempBlobId = Utils.sha1(Utils.serialize(tempBlob));\n\n\n if(!tempBlobId.equals(headfileBlob.getValue())) {\n //if not in staging area\n if (!stagingArea.containsKey(headfileBlob.getKey())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n //TODO: IS THIS PART NECCESARY?\n else if (stagingArea.containsKey(headfileBlob.getKey()) && !stagingArea.get(headfileBlob.getKey()).equals(headfileBlob.getValue())) {\n modUntracked.put(headfileBlob.getKey(), \"(modified)\");\n }\n }\n }\n }\n\n ArrayList<String> sortedModNames = (ArrayList) modUntracked.keySet().stream().sorted().collect(Collectors.toList());\n for (String modFileName : sortedModNames){\n System.out.println(modFileName + \" \" + modUntracked.get(modFileName));\n }\n System.out.println();\n\n\n\n ArrayList<String> untracked = new ArrayList<>();\n System.out.println(\"=== Untracked Files ===\");\n for (String cwdfile : CWD.list()) {\n if(!cwdfile.equals(\".gitlet\")) {\n File currfile = Utils.join(CWD, cwdfile);\n if (currfile.exists() && !Head.fileBlobs.containsKey(cwdfile)) {\n untracked.add(cwdfile);\n }\n }\n }\n\n untracked = (ArrayList) untracked.stream().sorted().collect(Collectors.toList());\n\n for (String untrackedName : untracked){\n System.out.println(untrackedName);\n }\n }", "public void commit() {\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tStreamResult streamResult = new StreamResult(new File(fileName));\n\t\t\ttransformer.transform(domSource, streamResult);\n\t\t\t//Reload nodes list\n\t\t\tnodes = document.getDocumentElement().getChildNodes();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void transformToSecondXml();", "private boolean instrument(DymonPatchRequest pr,boolean insert)\n{\n if (pr == null) return false;\n if (!active_requests.contains(pr)) return false;\n\n pr.instrument(insert);\n\n IvyXmlWriter xw = new IvyXmlWriter();\n xw.begin(\"PATCHMODEL\");\n xw.field(\"NAME\",pr.getModelName());\n xw.field(\"INSERT\",insert);\n int ctr = 0;\n for (String s : pr.getClasses()) {\n xw.begin(\"PATCH\");\n xw.field(\"CLASS\",s);\n xw.field(\"PATCH\",pr.getPatchFile(s));\n xw.field(\"CHANGE\",pr.isPatchChanged(s));\n xw.end(\"PATCH\");\n ++ctr;\n }\n pr.addPatchCommands(xw,insert);\n xw.end(\"PATCHMODEL\");\n\n synchronized (this) {\n if (insert && !for_process.isMonitoringEnabled()) return false;\n if (ctr == 0 && !pr.allowEmptyPatch()) return false;\n }\n\n System.err.println(\"DYMON: INSTRUMENT \" + pr.getModelName() + \" \" + insert + \" \" +\n\t\t\t pr.getDuration() + \" \" + new Date());\n System.err.println(\"DYMON: Using \" + xw.toString());\n\n MintDefaultReply mr = new MintDefaultReply();\n for_process.sendDyperMessage(\"INSTRUMENT\",xw.toString(),mr,MINT_MSG_FIRST_REPLY);\n Element e = mr.waitForXml();\n if (e == null) {\n System.err.println(\"DYMON: INSTRUMENT \" + pr.getModelName() + \" FAILED\");\n return false;\n }\n\n Element e1 = IvyXml.getElementByTag(e,\"PATCH\");\n long when = IvyXml.getAttrLong(e1,\"TIME\");\n pr.handlePatchInsert(when,insert);\n\n return true;\n}", "public LinkedList<Diff> getDiff(){\t\n\t\tString modifiedString = \"\";\n\t\ttry {\n\t\t\tmodifiedString = openReadFile(modDoc);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Print to the console\n\t\t\t// \"Could not open the file: '\" + modDoc + \".\" \n\t\t\te.printStackTrace();\n\t\t}\n\t\tLinkedList<Diff> list = dmp.diff_main(baseString, modifiedString, true);\n\t\tbaseString = modifiedString;\n\t\t\n\t\treturn list;\n\t}", "private void rewriteXmlSource(){\n //Log.i(LOG_TAG, \"Updating radios.xml....\");\n String fileName = \"radios.xml\";\n String content = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\" +\n \"<playlist>\\n\";\n\n for (Radio radio : radioList) {\n content += \"<track>\\n\";\n content += \"<location>\" + radio.getUrl() + \"</location>\\n\";\n content += \"<title>\" + radio.getName() + \"</title>\\n\";\n content += \"</track>\\n\";\n }\n content += \"</playlist>\";\n\n FileOutputStream outputStream = null;\n try {\n //Log.i(LOG_TAG,\"write new radios.xml file\");\n outputStream = owner.openFileOutput(fileName, owner.getBaseContext().MODE_PRIVATE);\n outputStream.write(content.getBytes());\n outputStream.close();\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n }", "public ISVNMerger createMerger(byte[] conflictStart, byte[] conflictSeparator, byte[] conflictEnd);", "public DiffResult() {\n\t\tthis.files = new ArrayList<String>();\n\t\tthis.functionCalls = new HashMap<String, Integer>();\n\t}", "@Override\r\n\tpublic void decompile( String root, String packege, String className )\r\n\t{\r\n\t\tlog = new StringBuffer( );\r\n\t\tsource = \"\"; //$NON-NLS-1$\r\n\t\tFile workingDir = new File( root + \"/\" + packege ); //$NON-NLS-1$\r\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream( );\r\n\t\tByteArrayOutputStream errors = new ByteArrayOutputStream( );\r\n\t\tPrintWriter errorsP = new PrintWriter( new OutputStreamWriter( errors ) );\r\n\t\t// errorsP.println(\"\\n\\n\\n/***** DECOMPILE LOG *****\\n\");\r\n\t\tint status = 0;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tstart = System.currentTimeMillis( );\r\n\t\t\terrorsP.println( \"\\tJad reported messages/errors:\" ); //$NON-NLS-1$\r\n\t\t\tProcess p = Runtime.getRuntime( ).exec( buildCmdLine( className ), new String[]{}, workingDir );\r\n\t\t\tStreamRedirectThread outRedirect = new StreamRedirectThread( \"output_reader\", //$NON-NLS-1$\r\n\t\t\t\t\tp.getInputStream( ),\r\n\t\t\t\t\tbos );\r\n\t\t\tStreamRedirectThread errRedirect = new StreamRedirectThread( \"error_reader\", //$NON-NLS-1$\r\n\t\t\t\t\tp.getErrorStream( ),\r\n\t\t\t\t\terrors );\r\n\t\t\toutRedirect.start( );\r\n\t\t\terrRedirect.start( );\r\n\t\t\tstatus = p.waitFor( ); // wait for jad to finish\r\n\t\t\toutRedirect.join( ); // wait until output stream content is fully\r\n\t\t\t// copied\r\n\t\t\terrRedirect.join( ); // wait until error stream content is fully\r\n\t\t\t// copied\r\n\t\t\tif ( outRedirect.getException( ) != null )\r\n\t\t\t\texcList.add( outRedirect.getException( ) );\r\n\t\t\tif ( errRedirect.getException( ) != null )\r\n\t\t\t\texcList.add( errRedirect.getException( ) );\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\texcList.add( e );\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tbos.flush( );\r\n\t\t\t\tbos.close( );\r\n\t\t\t\terrorsP.println( \"\\tExit status: \" + status ); //$NON-NLS-1$\r\n\t\t\t\t// errorsP.print(\" *************************/\");\r\n\t\t\t\terrors.flush( );\r\n\t\t\t\terrorsP.close( );\r\n\t\t\t}\r\n\t\t\tcatch ( Exception e )\r\n\t\t\t{\r\n\t\t\t\texcList.add( e ); // will never get here...\r\n\t\t\t}\r\n\t\t\ttime = System.currentTimeMillis( ) - start;\r\n\t\t}\r\n\r\n\t\tsource = UnicodeUtil.decode( bos.toString( ) );\r\n\r\n\t\tlog = new StringBuffer( errors.toString( ) );\r\n\t\t// logExceptions();\r\n\t\t// result = new DecompiledClassFile(classFile, source.toString());\r\n\t}", "public void reload() {\n if ( _build_file != null ) {\n openBuildFile( _build_file );\n }\n }", "@SuppressWarnings(\"unused\") \n\tprivate void extractChanges(Node commit_node, RevCommit m) throws Exception\n\t{\n\n\t\tList<String> commitIds = new ArrayList<String>(); \n\n\t\tcommitIds.add(m.toObjectId().getName());\n\t\t\n\t\tCommitInfoExtractor cie = new CommitInfoExtractor();\n\t\tcie.extractFeatureChanges(commitIds);\n\t\tList<EvolutionStep>steps = cie.getSteps();\n\t\t\n\t\ttry(Transaction tx = DBConnection.getService().beginTx())\n\t\t{\n\t\t\tfor(EvolutionStep step : steps)\n\t\t\t{\n\t\t\t\tFileChangeExtractor file_changes = new FileChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> file_nodes = file_changes.addFileChangesToCommit(step.files, commit_node);\n\t\t\t\t\n\t\t\t\tVMChangeExtractor vm_changes = new VMChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> vm_nodes = vm_changes.addVMChangesToCommit(step.fm_changes, commit_node);\n\t\t\t\t\n\t\t\t\tBuildChangeExtractor build_changes = new BuildChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> build_nodes = build_changes.addBuildChangesToCommit(step.build_changes, commit_node);\n\t\t\t\t\n\t\t\t\tCodeChangeExtractor code_changes = new CodeChangeExtractor(commit_parents_list,files);\n\t\t\t\tList<Node> code_nodes = code_changes.addCodeChangesToCommit(step.impl_changes, commit_node);\n\n//\t\t\t\tList<EvolutionStep> local = new ArrayList<EvolutionStep>(); local.add(step);\n//\t\t\t\tFeatureOrientedChangeExtractor dataextractor = new FeatureOrientedChangeExtractor(local);\n//\t\t\t\tdataextractor.buildFeatureChanges();\n//\t\t\t\t\n//\t\t\t\tList<FeatureOrientedChange> changes = dataextractor.getFeatureChanges();\n//\t\n//\t\t\t\tList<Node> focs = new ArrayList<Node>();\n//\t\t\t\tfor(FeatureOrientedChange c : changes)\n//\t\t\t\t{\n//\t\t\t\t\tNode foc_node = createFeatureOrientedChangeForCommit(c);\n//\t\t\t\t\tfocs.add(foc_node);\n//\t\t\t\t\tlink_file_and_vm_changes(c,foc_node,file_nodes, vm_nodes,build_nodes,code_nodes); \n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t\tMap<String,Node> known_focs = buildFOCMap(focs);\n//\t\t\t\tlink_mapping_artefacts(known_focs,build_nodes);\n//\t\t\t\tlink_code_artefacts(known_focs,code_nodes);\n\t\t\t}\n\t\t\ttx.success();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tthrow new Exception(\"Failed to create Neo4j nodes - \", e);\n\t\t}\n\t}", "public Element reviewJSONtoXML() throws ParserConfigurationException, TransformerException\r\n\t {\r\n\t\t \t//System.out.println(subject);\r\n\t\t \t//just those reviews which have a traceable bug id in review's subject\r\n\t\t \tString BugId=regexBugId(subject);\r\n\t\t \t//System.out.println(BugId);\r\n\t\t \tif ((BugId.length()>0)&&(fileVector.size()>0)) \r\n\t\t \t{\r\n\t\t\t\t//creating BugId Element\r\n\t\t\t\tElement bug = createElementAttrib(\"BugId\", \"Id\", BugId, \"Status\",status, docnew);\r\n\t\t\t\t//rootElement.appendChild(bug);\r\n\t\t\t\t//create Elements Owner and Subject\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"Owner\", \"name\", owner, \"Date\",CreatedDate, docnew));\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"RevisionId\",\"Id\",revisionid,\"UpdatedDate\",UpdatedDate,docnew));\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"PatchSize\",\"NumberofPatches\",NumberofPatches,\"Size\",patchsize,docnew));\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"Subject\", \"text\", subject,\"number\", number, docnew));\r\n\t\t\t\tbug.appendChild(createElementAttrib(\"Project\", \"Product\", Project,\"\",\"\", docnew));\r\n\t\t\t\t// Create Element files which includes all of the files in patch set\r\n\t\t\t\tElement files = docnew.createElement(\"Files\");\r\n\t\t\t\tfor (int j = 1; j <= fileVector.size(); j++) {\r\n\t\t\t\t\tElement file = createElementAttrib(\"File\", \"path\",fileVector.get(j), \"\", \"\", docnew);\r\n\t\t\t\t\tfiles.appendChild(file);\r\n\t\t\t\t}\r\n\t\t\t\tbug.appendChild(files);\r\n\t\t\t\t//Create reviewer element + name and date attribute.\r\n\t\t\t\tElement reviewers = docnew.createElement(\"Reviewers\");\r\n\t\t\t\tfor (int k = 0; k < reviewMessageInfo.size(); k++) {\r\n\r\n\t\t\t\t\t//removing \"Hudson CI\" from reviewers which is a patch builder\r\n\t\t\t\t\tif (!(reviewMessageInfo.get(k).get(1).contains(\"Hudson CI\")))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tElement info = createElementAttrib(\"Info\", \"name\",reviewMessageInfo.get(k).get(1), \"date\",reviewMessageInfo.get(k).get(2), docnew);\r\n\t\t\t\t\t\treviewers.appendChild(info);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tbug.appendChild(reviewers);\r\n\t\t\t\t//Create Reviewer Assignee: is a list of reviewers have been invited to review the patch.\r\n\t\t\t\tElement Assignee=docnew.createElement(\"Assignee\");\r\n\t\t\t\tfor(Entry<String,String> entry:AssigneeMap.entrySet())\r\n\t\t\t\t{\r\n\t\t\t\t\tElement info=createElementAttrib(\"AssigneeInfo\", \"name\",entry.getKey(), \"date\",entry.getValue(), docnew);\r\n\t\t\t\t\tAssignee.appendChild(info);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\tbug.appendChild(Assignee);\r\n\t\t\t\t\r\n\t\t\t\treturn bug;\r\n\t\t\t}\r\n\t\t \telse\r\n\t\t \t{\r\n\t\t \t\treturn null;\r\n\t\t \t}\r\n\r\n\t\t \r\n\t }", "public static void create(File collectionsFile) throws IOException\n\t{\t\t\n\t\tHashMap books = null;\n\t\t\n\t\t// If updateOnly is true then we are only updating the existing\n\t\t// JAD/JAR files and won't be parsing the source text\n\t\tif (!updateOnly)\n\t\t{\n\t\t\t// Extract xml file from the collectionsFile property: Source-Text\n\t\t\tString sourceTextPath = extractSourceTextPath(collectionsFile);\n\n // Extract the source file type from the collectionsFile property: SourceFormat\n sourceFormatType = extractSourceFormatType(collectionsFile);\n if (sourceFormatType.equals(SourceFormatType.unknown))\n {\n //do extra testing on the file to see if the format can be determined\n //this is for backward compatibility for GBC 2.2.6 version and prior\n //which did not specify the Source-Format property\n sourceFormatType = SourceFormatTypeRetry(baseSourceDirectory, sourceTextPath);\n }\n\n\t\t\t// Base source directory can be overridden with the -d argument\n\t\t\tUpdateBaseSourceDirectory(collectionsFile);\n\t\t\t/*if (baseSourceDirectory == null)\n\t\t\t{\n\t\t\t\t// By default the sourceTextPath is relative to the collectionsFile\n\t\t\t\t//baseSourceDirectory = \"\" + collectionsFile.getParent();\n baseSourceDirectory = collectionsFile.getAbsolutePath();\n baseSourceDirectory = baseSourceDirectory.substring(0, baseSourceDirectory.length() - collectionsFile.getName().length());\n\t\t\t}*/\n\t\t\tif (sourceFormatType == SourceFormatType.osis\n || sourceFormatType == SourceFormatType.thml)\n {\n File xmlFile = new File(baseSourceDirectory, sourceTextPath);\n books = parseXml(xmlFile);\n }\n else if (sourceFormatType == SourceFormatType.usfm)\n {\n extractCommonFields(collectionsFile);\n //make sure that the file extension is retrieved\n extractUSFMfields(collectionsFile);\n books = parseUSFM(collectionsFile, baseSourceDirectory, sourceTextPath, sTitleTag);\n }\n else\n {\n //dump out message saying that it cannot determine the file format type\n System.out.println(\"Error: Could not determine Bible format type, \" + sourceFormatType + \". Please use the 'Source-Format'\");\n System.out.println(\"property in your collections file.\");\n return;\n }\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Allow the relative path in the collections file to work for updateing\n\t\t\t// the icon as well.\n\t\t\tUpdateBaseSourceDirectory(collectionsFile);\n\t\t}\n\t\t\n\t\tif (books != null || updateOnly)\n\t\t{\n\t\t\tparseUiProperties();\n\t\t\t\n\t\t\t// Parse the collections file\n\t\t\tVector collections = parseCollectionsFile(collectionsFile, books);\n\t\t\t\n\t\t\tif (customFontString != null)\n\t\t\t{\n\t\t\t\tgenerateCustomFont(customFontString, collectionsFile, books);\n\t\t\t}\n\t\t\t\n\t\t\t// Open GoBibleCore based on MIDP version \n\t\t\tString goBibleJarFileName = \"GoBibleCore/GoBibleCore2.jar\";\n\t\t\t\n\t\t\t// Set some fields based on the MIDP version\n\t\t\t// Version 2.4.0 has removed MIDP-1.0 as an option\n//\t\t\tif (midpVersion.equals(\"MIDP-1.0\"))\n//\t\t\t{\n//\t\t\t\tversionString = \"1.\" + SUB_VERSION;\n//\t\t\t\tgoBibleJarFileName = \"GoBibleCore/GoBibleCore1.jar\";\n//\t\t\t}\n\t\t\t\n\t\t\t// Work out the current directory of the GoBibleCreator.jar\n\t\t\tFile jarDirectory = getJarDirectory();\n\t\t\tFile jarFile = new File(jarDirectory, goBibleJarFileName);\n\t\t\t\n\t\t\tJarFile goBibleJar = new JarFile(jarFile);\n\t\t\t\n\t\t\t// Write out the Go Bible data files into the same directory as the collections file\n\t\t\twriteCollections(collectionsFile.getParentFile(), collections, books, goBibleJar);\n\t\t}\n\t}", "@Test\n @Ignore(\"Not necessary anymore\")\n public void doWeNeedToRepointParentOrganisationsAfterMerge() {\n String line;\n Long mergingID;\n Long survivingID;\n List<Long> mergedIds = new ArrayList<>();\n int counter = 0;\n try {\n\n File file = new File(\"OrganisationsThatHaveBeenMergedOnVertec.txt\");\n\n FileReader reader = new FileReader(file.getAbsolutePath());\n BufferedReader breader = new BufferedReader(reader);\n while ((line = breader.readLine()) != null) {\n String[] parts = line.split(\",\");\n mergingID = Long.parseLong(parts[0]);\n survivingID = Long.parseLong(parts[1]);\n mergedIds.add(mergingID);\n\n }\n for (Long id : mergedIds) {\n String uri = baseURI + \"/org/\" + id;\n JSONOrganisation org = getFromVertec(uri, JSONOrganisation.class).getBody();\n if (!org.getChildOrganisationList().isEmpty() || org.getParentOrganisationId() != null) {\n System.out.println(\"parent: \" + org.getParentOrganisationId());\n System.out.println(\"child: \" + org.getChildOrganisationList());\n System.out.println(\"Org: \" + org.getName() + \"(v_id: \" + org.getObjid() + \")\");\n\n counter++;\n }\n }\n System.out.println(\"Total nr of merged away orgs with relatives: \" + counter);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "void replaceWithHEADRevision(Collection<ChangedFile> changedFiles);", "public void testChangeZIPArchive2() throws Exception {\n IPath projectPath = env.addProject(\"Project\");\n env.addExternalJars(projectPath, Util.getJavaClassLibs());\n String internalLib = env.getProject(\"Project\").getLocation().toOSString() + File.separator + \"internalLib.abc\";\n org.eclipse.jdt.core.tests.util.Util.createJar(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \" public void foo() {\\n\" + \" }\\n\" + \"}\" }, internalLib, \"1.4\");\n env.getProject(projectPath).refreshLocal(IResource.DEPTH_INFINITE, null);\n env.addEntry(projectPath, JavaCore.newLibraryEntry(new Path(\"/Project/internalLib.abc\"), null, null));\n //$NON-NLS-1$\n IPath root = env.getPackageFragmentRootPath(projectPath, \"\");\n env.setOutputFolder(projectPath, \"\");\n IPath classY = env.addClass(root, \"q\", \"Y\", \"package q;\\n\" + \"public class Y {\\n\" + \" void bar(p.X x) {\\n\" + \" x.foo();\\n\" + \" }\\n\" + \"}\");\n fullBuild(projectPath);\n expectingNoProblems();\n org.eclipse.jdt.core.tests.util.Util.createJar(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \"}\" }, internalLib, \"1.4\");\n env.getProject(projectPath).refreshLocal(IResource.DEPTH_INFINITE, null);\n incrementalBuild(projectPath);\n expectingProblemsFor(classY, \"Problem : The method foo() is undefined for the type X [ resource : </Project/q/Y.java> range : <54,57> category : <50> severity : <2>]\");\n env.removeProject(projectPath);\n }", "void mergeFileProperties() {\n JMeterProperty fileName = getProperty(FILE_NAME);\n JMeterProperty paramName = getProperty(FILE_FIELD);\n JMeterProperty mimeType = getProperty(MIMETYPE);\n HTTPFileArg oldStyleFile = new HTTPFileArg(fileName, paramName, mimeType);\n \n HTTPFileArgs fileArgs = getHTTPFileArgs();\n \n HTTPFileArgs allFileArgs = new HTTPFileArgs();\n if (oldStyleFile.isNotEmpty()) { // OK, we have an old-style file definition\n allFileArgs.addHTTPFileArg(oldStyleFile); // save it\n // Now deal with any additional file arguments\n if (fileArgs != null) {\n HTTPFileArg[] infiles = fileArgs.asArray();\n for (HTTPFileArg infile : infiles) {\n allFileArgs.addHTTPFileArg(infile);\n }\n }\n } else {\n if (fileArgs != null) { // for new test plans that don't have FILE/PARAM/MIME properties\n allFileArgs = fileArgs;\n }\n }\n // Updated the property lists\n setHTTPFileArgs(allFileArgs);\n removeProperty(FILE_FIELD);\n removeProperty(FILE_NAME);\n removeProperty(MIMETYPE);\n }", "public static ContentDiff diff (URL base1, Set files1, URL base2, Set files2) throws IOException {\n return diff (base1, files1, base2, files2, URLSource.DEFAULT);\n }", "public void merge() throws Exception\n{\n Git git = getGit();\n MergeCommand merge = git.merge();\n ObjectId remoteOriginMaster = getRepo().resolve(\"refs/remotes/origin/master\");\n merge.include(remoteOriginMaster);\n MergeResult result = merge.call();\n System.out.println(\"Merge Result: \" + result.getMergeStatus());\n \n // Reset index\n getIndexSite().resetFiles(); _index = null;\n}", "public void testChangeZIPArchive1() throws Exception {\n String externalLib = Util.getOutputDirectory() + File.separator + \"externalLib.abc\";\n IPath projectPath = env.addProject(\"Project\");\n try {\n org.eclipse.jdt.core.tests.util.Util.createJar(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \" public void foo() {\\n\" + \" }\\n\" + \"}\" }, externalLib, \"1.4\");\n env.addExternalJars(projectPath, Util.getJavaClassLibs());\n env.addExternalJars(projectPath, new String[] { externalLib });\n //$NON-NLS-1$\n IPath root = env.getPackageFragmentRootPath(projectPath, \"\");\n env.setOutputFolder(projectPath, \"\");\n IPath classY = env.addClass(root, \"q\", \"Y\", \"package q;\\n\" + \"public class Y {\\n\" + \" void bar(p.X x) {\\n\" + \" x.foo();\\n\" + \" }\\n\" + \"}\");\n fullBuild(projectPath);\n expectingNoProblems();\n org.eclipse.jdt.core.tests.util.Util.createJar(new String[] { \"p/X.java\", \"package p;\\n\" + \"public class X {\\n\" + \"}\" }, externalLib, \"1.4\");\n IJavaProject p = env.getJavaProject(projectPath);\n p.getJavaModel().refreshExternalArchives(new IJavaElement[] { p }, null);\n incrementalBuild(projectPath);\n expectingProblemsFor(classY, \"Problem : The method foo() is undefined for the type X [ resource : </Project/q/Y.java> range : <54,57> category : <50> severity : <2>]\");\n } finally {\n new File(externalLib).delete();\n env.removeProject(projectPath);\n }\n }", "public void testMoveFileWithReplace() throws Exception {\n IPackageFragment fragment = getRoot().createPackageFragment(\"org.test\", true, null);\n IPackageFragment otherFragment = getRoot().createPackageFragment(\"org.test1\", true, null);\n IFile file = ((IFolder) fragment.getResource()).getFile(\"x.properties\");\n String content = \"A file with no references\";\n file.create(getStream(content), true, null);\n setReadOnly(file);\n IFile file2 = ((IFolder) otherFragment.getResource()).getFile(\"x.properties\");\n file2.create(getStream(content), true, null);\n setReadOnly(file2);\n IMovePolicy policy = ReorgPolicyFactory.createMovePolicy(new IResource[] { file }, new IJavaElement[] {});\n assertTrue(policy.canEnable());\n JavaMoveProcessor javaMoveProcessor = new JavaMoveProcessor(policy);\n javaMoveProcessor.setDestination(ReorgDestinationFactory.createDestination(otherFragment));\n javaMoveProcessor.setReorgQueries(new MockReorgQueries());\n RefactoringStatus status = performRefactoring(new MoveRefactoring(javaMoveProcessor), true);\n if (status != null)\n assertTrue(status.toString(), status.isOK());\n Collection<IPath> validatedEditPaths = RefactoringTestRepositoryProvider.getValidatedEditPaths(getRoot().getJavaProject().getProject());\n assertEquals(1, validatedEditPaths.size());\n // replaced\n assertTrue(validatedEditPaths.contains(file2.getFullPath()));\n }", "private void incrementalBuild(IResourceDelta delta) throws CoreException {\n \t\tIResource unsortedResource = delta.getResource();\n \t\tIPath unsortedFolderPath = getUnsortedFolder().getFullPath();\n \t\tIPath deltaPath = delta.getResource().getFullPath();\n \n \t\tboolean isUnderUnsortedFolder = unsortedFolderPath.isPrefixOf(deltaPath);\n \n \t\tboolean isOverUnsortedFolder = deltaPath.isPrefixOf(unsortedFolderPath);\n \n \t\tif (isUnderUnsortedFolder) {\n \t\t\tint status = delta.getKind();\n \t\t\tint changeFlags = delta.getFlags();\n \n \t\t\tint type = unsortedResource.getType();\n \n \t\t\tIResource sortedResource = convertToSortedResource(unsortedResource);\n \n \t\t\tif (status == IResourceDelta.REMOVED) {\n \t\t\t\tif (sortedResource.exists()) {\n \t\t\t\t\tsortedResource.delete(false, null);\n \t\t\t\t}\n \t\t\t} else if (type == IResource.FILE && status == IResourceDelta.ADDED) {\n \t\t\t\tbuild((IFile) unsortedResource);\n \t\t\t} else if (type == IResource.FILE && status == IResourceDelta.CHANGED && (changeFlags & IResourceDelta.CONTENT) != 0) {\n \t\t\t\tbuild((IFile) unsortedResource);\n \t\t\t}\n \t\t}\n \n \t\tif (isUnderUnsortedFolder || isOverUnsortedFolder) {\n \t\t\tIResourceDelta[] affectedChildren = delta.getAffectedChildren();\n \t\t\tfor (int i = 0; i < affectedChildren.length; ++i) {\n \t\t\t\tincrementalBuild(affectedChildren[i]);\n \t\t\t}\n \t\t}\n \t}", "public void transferChanges(JTreeTable source, JTreeTable target) {\r\n\t\t\r\n\t\t// add to changes in target based on source\r\n\t\tJEditorPane changePane = null;\r\n\t\tList changes = null;\r\n\t\tboolean refreshOntTT = true;\r\n\t\tif (target == ontChangeTT) {\r\n\t\t\tchanges = ontChanges;\r\n\t\t\tchangePane = ontChangeEdPane;\r\n\t\t}\r\n\t\telse {\r\n\t\t\trefreshOntTT = false;\r\n\t\t\tchanges = repChanges;\r\n\t\t\tchangePane= repChangeEdPane;\r\n\t\t}\r\n\t\t\r\n\t\t// get selected changes in source\r\n\t\tif (source.getTree().getSelectionPath()==null) return;\r\n\t\tTreePath[] paths = source.getTree().getSelectionPaths();\r\n\t\tfor (int i=0; i<paths.length; i++) {\r\n\t\t\tTreePath path = paths[i];\r\n\t\t\tTreeTableNode selNode = (TreeTableNode) path.getLastPathComponent();\r\n\t\t\tif (selNode.swoopChange.isTopNode) {\r\n\t\t\t\t// skip version top nodes, but transfer its children\r\n\t\t\t\tfor (Iterator iter = selNode.children.iterator(); iter.hasNext();) {\r\n\t\t\t\t\tTreeTableNode childNode = (TreeTableNode) iter.next();\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) childNode.swoopChange;\r\n\t\t\t\t\t// check if it already exists in changes (prevent duplicates) \r\n\t\t\t\t\tif (!isPresent(changes, swc)) changes.add(swc.clone());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse { \r\n\t\t\t\tSwoopChange swc = (SwoopChange) selNode.swoopChange;\r\n\t\t\t\t// check if it already exists in changes (prevent duplicates) \r\n\t\t\t\tif (!isPresent(changes, swc)) changes.add(swc.clone());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.sortChanges(changes);\r\n\t\t\r\n\t\t// refresh UI of target after adding changes\r\n\t\tif (refreshOntTT) this.refreshOntTreeTable();\r\n\t\telse {\r\n\t\t\t// add (new) repChanges to newCommit node directly\r\n\t\t\tnewCommitNode.children = new Vector();\r\n\t\t\tfor (Iterator iter = changes.iterator(); iter.hasNext();) {\r\n\t\t\t\tSwoopChange swc = (SwoopChange) iter.next();\r\n\t\t\t\tTreeTableNode swcNode = new TreeTableNode(swc);\r\n\t\t\t\tnewCommitNode.addChild(swcNode);\t\r\n\t\t\t}\r\n\t\t\tthis.refreshRepTreeTable(true);\r\n\t\t}\r\n\t}", "public void addFile(FileDiffFile file) {\n \t\tfiles.add(file);\n \t}", "public static void main(String[] args) {\r\n\r\n @SuppressWarnings(\"unused\")\r\n final Diff myDiff = new Diff(args);\r\n\r\n }", "boolean accept(String diffEntryPath);", "public void setUpNewXMLFile(File file) {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(file, \"UTF-8\");\n\t\t\tpw.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\\n\");\n\t\t\tpw.write(\"<\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.write(\"</\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.close();\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Error creating new XML File.\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tpw.close();\n\t\t\t} catch(Exception e) {\n\t\t\t\t//Seems like it was already closed.\n\t\t\t}\n\t\t}\n\t}", "private void updateFiles() {\n\t}", "private void assertCompareTwoXML(String path1, String path2){\n\t\tFile f1 = new File(path1);\n\t\tFile f2 = new File(path2);\n\t\tassertTrue(\"Le fichier \"+path1+\" n'existe pas.\",f1.exists());\n\t\tassertTrue(\"Le fichier \"+path2+\" n'existe pas.\",f2.exists());\n\t\t\n\t\ttry {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument doc1 = builder.parse(f1);\n\t\t\t\n\t\t\tDocumentBuilderFactory factory2 = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder2 = factory2.newDocumentBuilder();\n\t\t\tDocument doc2 = builder2.parse(f2);\n\n\t\t\tElement root1 = doc1.getDocumentElement(); //<tds> </tds>\n\t\t\tElement root2 = doc2.getDocumentElement();\n\t\t\t\n\t\t\t//Checking symboles\n\t\t\tNodeList symbs1 = root1.getElementsByTagName(\"sym\"); //Getting all <function>\n\t\t\tNodeList symbs2 = root2.getElementsByTagName(\"sym\"); //Getting all <function>\n\t\t\tUtilitaire.assertT(\"Les fichiers n'ont pas le meme nombre de symboles\",symbs1.getLength() == symbs2.getLength());\n\t\t\t\n\t\t\tfor(int symbIndex=0; symbIndex < symbs1.getLength();symbIndex++){\n\t\t\t\tboolean sameSymb = false;\n\t\t\t\tString sym1 = ((Element) symbs1.item(symbIndex)).getTextContent();\n\t\t\t\tfor(int symbIndex2=0; symbIndex2 < symbs2.getLength();symbIndex2++){\n\t\t\t\t\tString sym2 = ((Element) symbs2.item(symbIndex2)).getTextContent();\n\t\t\t\t\tif(sym1.equals(sym2)) sameSymb = true;\n\t\t\t\t}\n\t\t\t\tUtilitaire.assertT(\"Les symboles ne sont pas les memes.\",sameSymb);\n\t\t\t}\n\t\t\t\n\t\t\t//Checking functions\n\t\t\tNodeList functions1 = root1.getElementsByTagName(\"function\"); //Getting all <function>\n\t\t\tNodeList functions2 = root2.getElementsByTagName(\"function\"); //Getting all <function>\n\t\t\tUtilitaire.assertT(\"Les fichiers n'ont pas le meme nombre de fonctions\",functions1.getLength() == functions2.getLength());\n\t\t\t\t//Checking each function\n\t\t\tfor(int tmp = 0; tmp < functions1.getLength();tmp++){\n\t\t\t\tNode node1 = functions1.item(tmp);\n\t\t\t\tNode node2 = null;\n\t\t\t\t//Checking function name\n\t\t\t\tString funName1 = ((Element) node1).getElementsByTagName(\"name\").item(0).getTextContent();\n\t\t\t\tString funName2 = null;\n\t\t\t\tboolean sameFunName = false;\n\t\t\t\t//Iterate over the second file to find (eventually) the same function node\n\t\t\t\tfor(int tmp2 = 0; (tmp2 < functions2.getLength()) && !sameFunName ;tmp2++){\n\t\t\t\t\tnode2 = functions2.item(tmp2);\n\t\t\t\t\tfunName2 = ((Element) node2).getElementsByTagName(\"name\").item(0).getTextContent();\n\t\t\t\t\tif(funName1.equals(funName2)) sameFunName = true;\n\t\t\t\t\t//If a same node if found, the following tests will be with node1's function = node2's function\n\t\t\t\t}\n\t\t\t\t//If there is no node with the same function name -> fail\n\t\t\t\tassertTrue(\"Deux fonctions n'ont pas le meme nom : \"+funName1, sameFunName);\n\t\t\t\t\n\t\t\t\tNodeList vars1 = ((Element) node1).getElementsByTagName(\"var\"); //Getting <var>\n\t\t\t\tNodeList vars2 = ((Element) node2).getElementsByTagName(\"var\");\n\t\t\t\tUtilitaire.assertT(\"Il n'y a pas le meme nombre de variables pour la fonction \"+funName1,vars1.getLength() == vars2.getLength());\n\t\t\t\tfor(int varIndex = 0; varIndex < vars1.getLength();varIndex++){\n\t\t\t\t\tboolean sameVarsName = false;\n\t\t\t\t\tNode varNode1 = vars1.item(varIndex);\n\t\t\t\t\t//Checking vars name\n\t\t\t\t\tString varName1 = ((Element) varNode1).getElementsByTagName(\"vname\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t//Iterate through the vars of the second file to see if there is a same as varName1\n\t\t\t\t\tfor(int varIndex2 = 0; varIndex2 < vars2.getLength();varIndex2++){\n\t\t\t\t\t\tString varName2 = ((Element) vars2.item(varIndex2)).getElementsByTagName(\"vname\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t\tif(varName1.equals(varName2)) sameVarsName = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les variables n'ont pas le meme nom : \"+varName1, sameVarsName);\n\t\t\t\t\t//Checking vars value\n\t\t\t\t\tboolean sameVarsValue = false;\n\t\t\t\t\t//Iterate through the vars of the second file to see if there is a same as varValue1\n\t\t\t\t\tString varValue1 = ((Element) varNode1).getElementsByTagName(\"value\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\tfor(int varIndex2 = 0; varIndex2 < vars2.getLength();varIndex2++){\n\t\t\t\t\t\tString varValue2 = ((Element) vars2.item(varIndex2)).getElementsByTagName(\"value\").item(0).getTextContent(); //Writing vars names\n\t\t\t\t\t\tif(varValue1.equals(varValue2)) sameVarsValue = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les variables n'ont pas les mÍmes valeurs : \"+varValue1, sameVarsValue);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Checking calls\n\t\t\t\tNodeList calls1 = ((Element) node1).getElementsByTagName(\"f\");\n\t\t\t\tNodeList calls2 = ((Element) node2).getElementsByTagName(\"f\");\n\t\t\t\tUtilitaire.assertT(\"Le nombre d'appels de fonctions ne sont pas les memes.\",calls1.getLength() == calls2.getLength());\n\t\t\t\t\n\t\t\t\tfor(int callIndex = 0; callIndex < calls1.getLength(); callIndex++){\n\t\t\t\t\tboolean sameCalls = false;\n\t\t\t\t\tString callValue1 = ((Element) calls1.item(callIndex)).getTextContent();\n\t\t\t\t\t//Iterate through the calls of the second file to see if there is a same as callValue1\n\t\t\t\t\tfor(int callIndex2 = 0; callIndex2 < calls2.getLength(); callIndex2++){\n\t\t\t\t\t\tString callValue2 = ((Element) calls2.item(callIndex2)).getTextContent();\n\t\t\t\t\t\tif(callValue1.equals(callValue2)) sameCalls = true;\n\t\t\t\t\t}\n\t\t\t\t\tUtilitaire.assertT(\"Les functions appellees ne sont pas les memes : \"+callValue1, sameCalls);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void fileReverted(OpenDefinitionsDocument doc) { }", "public void fileReverted(OpenDefinitionsDocument doc) { }", "private void commitRepChanges() {\r\n\t\t\r\n\t\t// get repository info\r\n\t\tString repURL = repURLFld.getText();\r\n\t\tString boURI = repBaseOntFld.getText();\r\n\t\tthis.repositoryAuthor = repAuthorFld.getText();\r\n\t\tthis.reposityCreatedDate = repDateFld.getText();\r\n\t\t\r\n\t\tString status = \"Status: [ACTION - Commit to Repository]...\";\r\n\t\ttry {\r\n\t\t\tthis.repositoryURI = new URI(repURL);\r\n\t\t\tthis.baseOntologyURI = new URI(boURI);\r\n\t\t}\r\n\t\tcatch (URISyntaxException ex) {\r\n\t\t\tstatusBar.setText(status+\"Invalid Repository URL and/or Base Ontology URI\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// check if repository already exists\r\n\t\t\tboolean repExists = this.loadRepositoryHeader();\r\n\t\t\t\r\n\t\t\tif (!repExists) {\r\n\t\t\t\t// creating new repository\r\n\t\t\t\t// form repository header\r\n\t\t\t\tURI[] headerURI = new URI[1];\r\n\t\t\t\theaderURI[0] = new URI(this.repositoryURI+\"#header\");\r\n\t\t\t\t\r\n\t\t\t\tif (this.repositoryAuthor.equals(\"\") || this.reposityCreatedDate.equals(\"\")) {\r\n\t\t\t\t\tint opt = JOptionPane.showConfirmDialog(null, \"Repository Author and/or Date not specified. Continue?\", \"Creating Repository\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (opt == JOptionPane.NO_OPTION) return;\r\n\t\t\t\t}\r\n\t\t\t\t// create annotea description for header\r\n\t\t\t\tDescription header = new Description();\r\n\t\t\t\theader.setAnnotates(headerURI);\r\n\t\t\t\theader.setAuthor(this.repositoryAuthor);\r\n\t\t\t\theader.setCreated(this.reposityCreatedDate);\r\n\t\t\t\theader.setAnnotatedEntityDefinition(this.baseOntologyURI.toString());\r\n\t\t\t\tthis.headVersionNumber = 0;\r\n\t\t\t\theader.setBody(String.valueOf(this.headVersionNumber));\r\n\t\t\t\theader.setBodyType(\"text/html\");\r\n\t\t\t\theader.setAnnotationType(this.annotType);\r\n\t\t\t\tclient.post(header);\r\n\t\t\t\tstatusBar.setText(status+\"Ontology Repository Header posted at \"+headerURI[0]);\r\n\t\t\t\ttoggleRepOptions(false);\r\n\t\t\t\tversionDescriptions[0] = header;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// test changes\r\n\t\t\tboolean success = this.testChanges(true);\r\n\t\t\tif (success){\r\n\t\t\t\t// prompt user for comment on commit\r\n\t\t\t\tString commitComment = JOptionPane.showInputDialog(this, \"COMMIT New Version (Details):\");\r\n\t\t\t\t\r\n\t\t\t\tif (commitComment==null) {\r\n\t\t\t\t\tstatusBar.setText(status+\"CANCELLED\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t// transform SwoopChange list to Description list (to save author, date, uris etc)\r\n\t\t\t\tList descList = transformChangeList(repChanges);\r\n\t\t\t\t// serialize each description into RDF/XML\r\n\t\t\t\t// and make it one large string with separator (\"[SWOOP-ANNOTATED-CHANGE-SET]\") in the middle\r\n\t\t\t\tString largeChangeSetString = \"\";\r\n\t\t\t\tfor (Iterator iter = descList.iterator(); iter.hasNext();) {\r\n\t\t\t\t\tDescription desc = (Description) iter.next();\r\n\t\t\t\t\tString descStr = desc.serializeIntoString(swoopModel);\t\t\t\t\t\r\n\t\t\t\t\tlargeChangeSetString += descStr + separator;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// ENCODE CDATA\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"CDATA\", \"ENCODED-CDATA\");\r\n\t\t\t\tlargeChangeSetString = largeChangeSetString.replaceAll(\"]]>\", \"]ENCODED]>\");\r\n\t\t\t\t\r\n\t\t\t\t// finally commit a single annotation with the entire changeset string in the body\r\n\t\t\t\t// also allow author to make annotation on commit\r\n\t\t\t\tDescription commit = new Description();\r\n\t\t\t\tcommit.setAuthor(swoopModel.getUserName());\r\n\t\t\t\tcommit.setCreated(swoopModel.getTimeStamp());\r\n\t\t\t\tcommit.setBody(largeChangeSetString);\r\n\t\t\t\tcommit.setBodyType(\"text/html\");\r\n\t\t\t\tcommit.setAnnotatedEntityDefinition(commitComment);\r\n\t\t\t\tcommit.setAnnotationType(this.annotType);\r\n\t\t\t\t\r\n\t\t\t\t// increment headVersionNum and write new commit\r\n\t\t\t\t// at repURL+\"#\"+headVersionNum\r\n\t\t\t\tthis.headVersionNumber++;\r\n\t\t\t\tURI[] annotates = new URI[1];\r\n\t\t\t\tannotates[0] = new URI(repositoryURI.toString()+\"#\"+String.valueOf(this.headVersionNumber));\r\n\t\t\t\tcommit.setAnnotates(annotates);\r\n\t\t\t\t// COMMIT!\r\n\t\t\t\tclient.post(commit);\r\n\t\t\t\t\r\n\t\t\t\t// post-process:\r\n\t\t\t\t// 1. rewrite rep header added newly incremented headVersionNumber \r\n\t\t\t\tthis.rewriteRepHeader();\r\n\t\t\t\t// 2. set newCommitNode params to current commit\r\n\t\t\t\tnewCommitNode.swoopChange.setAuthor(commit.getAuthor());\r\n\t\t\t\tnewCommitNode.swoopChange.setTimeStamp(commit.getCreated());\r\n\t\t\t\tnewCommitNode.swoopChange.setDescription(commit.getAnnotatedEntityDefinition());\r\n\t\t\t\t// 3. save newCommitNode in versionCommits array and Description in versionDescriptions array\r\n\t\t\t\tversionNodes[this.headVersionNumber] = newCommitNode;\r\n\t\t\t\tversionDescriptions[this.headVersionNumber] = commit;\r\n\t\t\t\tswoopModel.updateVersionRepository(repositoryURI, versionDescriptions);\r\n\t\t\t\t// 4. for each child of newCommitNode, set its swoopChange.onRepository value to true\r\n\t\t\t\tfor (Iterator iter3=newCommitNode.children.iterator(); iter3.hasNext();) {\r\n\t\t\t\t\tTreeTableNode child = (TreeTableNode) iter3.next();\r\n\t\t\t\t\tchild.swoopChange.isOnRepository = true;\r\n\t\t\t\t}\r\n\t\t\t\t// 5. create newCommitNode and add to root at the end\r\n\t\t\t\tnewCommitNode = new TreeTableNode(new SwoopChange(swoopModel.getUserName(), null, null, swoopModel.getTimeStamp(), \"New Version Commit\", true, false));\r\n\t\t\t\tnewCommitNode.swoopChange.isTopNode = true;\r\n\t\t\t\trepRoot.addChild(newCommitNode);\r\n\t\t\t\trepChanges = new ArrayList(); // also clear this\r\n\t\t\t\tstatusBar.setText(status+\"Committed New Version \"+this.headVersionNumber);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tstatusBar.setText(status+\"FAILED\");\r\n\t\t}\r\n\t\tthis.refreshRepTreeTable(false);\r\n\t}", "private void incrementalBuild(IResourceDelta delta, IProgressMonitor monitor) throws CoreException {\n\t\tdelta.accept(new AssemblyDeltaVisitor(monitor));\n\t}", "private void loadOrRefreshXml(File file, boolean isLoad) throws Exception{\n\t\t\n\t // Remove the old content displayed\n \t\tthis.getXmlTextAreaPanel().removeAll();\n \t\t \n \t// The root node of the JTree. Is a special node that has no parent but can have childs \n \tDefaultMutableTreeNode base = new DefaultMutableTreeNode(\"XML Viewer\");\t \t\t \n\t DefaultTreeModel treeModel = new DefaultTreeModel(base);\n\t \t \n\t\txmlJTree = new JTree(treeModel);\n\t\txmlJTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);\n\t\txmlJTree.setAutoscrolls(true);\n\t\txmlJTree.setCellRenderer(new CustomCellRenderer());\n\t \t \n\t\t// Create the xml parser\n\t SAXParserFactory fact = SAXParserFactory.newInstance();\n\t\tSAXParser parser = fact.newSAXParser();\t \t\t\t\t\n\t\t\t\t \n\t\t// Set to the parser the handler (ie a class that extends the default event handler: DefaultHandler)\n\t\tFile f = new File(this.sourceXMLfileTextField.getText());\n\t\tparser.parse(file,new CustomSaxParseHandler(base,xmlJTree));\n\t\t\n\t\t// By default compact all the tree before show it\n\t\tint row = xmlJTree.getRowCount() - 1;\n\t // Note: use '2' as fix value to compact only the child and not the root\n\t while (row >= 2) {\n\t xmlJTree.collapseRow(row);\t \t \n\t row--;\n\t } \t\t\t\t \n\t\t\t \t\t\t \n\t\tthis.getXmlTextAreaPanel().add(xmlJTree);\n\t\t\t \n\t\t// Refresh (and redraw) the panel and show the tree view of the chosen XML file\n\t\tthis.revalidate();\n\t \t\n\t\tif(!isLoad) //only for refresh xml show a message\n\t\t{\n\t\t messageLabel.setForeground(Color.GREEN);\n\t\t messageLabel.setText(\"Input Reloaded successfully\");\n\t\t} \n\t}", "private DSEMergeManager(EObject original, ChangeSet local, ChangeSet remote) {\n buildScope(original, local, remote);\n configureMerge(original);\n\n dse = new DesignSpaceExplorer();\n }", "@Ignore\n\t@Test\n\tpublic void testCreateDiff() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException,\n\t\t\tNoSuchMethodException, SecurityException, IOException {\n\n\t\tFile testFile = new File(\"testdata/test_input_linux/incrementalProblems.txt\");\n\t\tDiffAnalyzer analyzer = new DiffAnalyzer(testFile);\n\t\t\n\t\tArrayList<String> diffEntries = new ArrayList<String>();\n\t\tStringJoiner joiner = new StringJoiner(\"\\n\");\n\t\tfor (String line : Files.readAllLines(testFile.toPath())) {\n\t\t\tif (line.startsWith(\"diff --git\")) {\n\t\t\t\tString currentJoinerContent = joiner.toString();\n\t\t\t\tif (!currentJoinerContent.isEmpty() && currentJoinerContent.startsWith(\"diff --git\")) {\n\t\t\t\t\tdiffEntries.add(currentJoinerContent);\n\t\t\t\t\tjoiner = new StringJoiner(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tjoiner.add(line);\n\t\t}\n\n\t\tMethod method = analyzer.getClass().getDeclaredMethod(\"createFileDiff\", String.class);\n\t\tmethod.setAccessible(true);\n\n\t\tfor (String diffEntry : diffEntries) {\n\t\t\tSystem.out.println(diffEntry);\n\t\t\tFileDiff fileDiff = (FileDiff) method.invoke(analyzer, diffEntry);\n\t\t\tAssert.assertTrue(fileDiff != null);\n\t\t}\n\t}", "public void description() throws Exception {\n PrintWriter pw = new PrintWriter(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \n \n // BufferedReader for obtaining the description files of the ontology & ODP\n BufferedReader br1 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/ontology_description\")); \n BufferedReader br2 = new BufferedReader(new FileReader(System.getProperty(\"user.dir\")+ \"/resources/odps_description.txt\")); \n String line1 = br1.readLine(); \n String line2 = br2.readLine(); \n \n // loop is used to copy the lines of file 1 to the other \n if(line1==null){\n\t \tpw.print(\"\\n\");\n\t }\n while (line1 != null || line2 !=null) \n { \n if(line1 != null) \n { \n pw.println(line1); \n line1 = br1.readLine(); \n } \n \n if(line2 != null) \n { \n pw.println(line2); \n line2 = br2.readLine(); \n } \n } \n pw.flush(); \n // closing the resources \n br1.close(); \n br2.close(); \n pw.close(); \n \n // System.out.println(\"Merged\"); -> for checking the code execution\n /* On obtaining the merged file, Doc2Vec model is implemented so that vectors are\n * obtained. And the, similarity ratio of the ontology description with the ODPs \n * can be found using cosine similarity \n */\n \tFile file = new File(System.getProperty(\"user.dir\")+ \"/resources/merged_file.txt\"); \t\n SentenceIterator iter = new BasicLineIterator(file);\n AbstractCache<VocabWord> cache = new AbstractCache<VocabWord>();\n TokenizerFactory t = new DefaultTokenizerFactory();\n t.setTokenPreProcessor(new CommonPreprocessor()); \n LabelsSource source = new LabelsSource(\"Line_\");\n ParagraphVectors vec = new ParagraphVectors.Builder()\n \t\t.minWordFrequency(1)\n \t .labelsSource(source)\n \t .layerSize(100)\n \t .windowSize(5)\n \t .iterate(iter)\n \t .allowParallelTokenization(false)\n .workers(1)\n .seed(1)\n .tokenizerFactory(t) \n .build();\n vec.fit();\n \n //System.out.println(\"Check the file\");->for execution of code\n PrintStream p=new PrintStream(new File(System.getProperty(\"user.dir\")+ \"/resources/description_values\")); //storing the numeric values\n \n \n Similarity s=new Similarity(); //method that checks the cosine similarity\n s.similarityCheck(p,vec);\n \n \n }", "@Override\n\tpublic File update(File file) {\n\t\treturn (File) this.getSession().merge(file);\n\t}", "private static void merge(Gitlet currCommit, String[] args) {\n if (!isSure()) {\n return;\n } else if (args.length != 2) {\n System.out.println(\"Please input the branch name\");\n } else if (!currCommit.tree.hasBranch(args[1])) {\n System.out.println(\"A branch with that name does not exist.\");\n } else if (args[1].equals(currCommit.tree.getCurrentBranch())) {\n System.out.println(\"Cannot merge a branch with itself.\");\n } else {\n HashMap<String, String> splitMap = findSplitBranch(currCommit, args)\n .getFileLoc();\n HashMap<String, String> headMap = currCommit.tree.getHeadCommit()\n .getFileLoc();\n HashMap<String, String> mergeMap = currCommit.tree.getHeadCommit(\n args[1]).getFileLoc();\n for (String mergeFile : mergeMap.keySet()) {\n if (splitMap.containsKey(mergeFile)\n && headMap.containsKey(mergeFile)) {\n if (splitMap.get(mergeFile).equals(headMap.get(mergeFile))\n && !headMap.get(mergeFile).equals(\n mergeMap.get(mergeFile))) {\n FileManip origin = new FileManip(\n mergeMap.get(mergeFile));\n origin.copyFile(mergeFile);\n } else if (!splitMap.get(mergeFile).equals(\n headMap.get(mergeFile))\n && !splitMap.get(mergeFile).equals(\n mergeMap.get(mergeFile))) {\n FileManip origin = new FileManip(\n mergeMap.get(mergeFile));\n origin.copyFile(mergeFile + \".conflicted\");\n }\n } else if (!splitMap.containsKey(mergeFile)\n && headMap.containsKey(mergeFile)) {\n FileManip origin = new FileManip(mergeMap.get(mergeFile));\n if (!origin.isSame(headMap.get(mergeFile))) {\n origin.copyFile(mergeFile + \".conflicted\");\n }\n }\n }\n }\n }", "public static void main(String[] args) {\n new Merge().readAndWrite();\n }", "public Map<String, Map<String, Integer>> compareToStats(String repoName, FileDTO oldFile, FileDTO newFile)\r\n\t\t\tthrows IOException {\r\n\t\tlogger.info(\"Statistics of comparison of : \" + oldFile.getFileName());\r\n\r\n\t\tMap<String, Map<String, Integer>> statsByAction = new HashMap<String, Map<String, Integer>>();\r\n\t\tAstComparator diffTool = new AstComparator();\r\n\t\ttry {\r\n\t\t\tDiff result = diffTool.compare(storageService.getFile(repoName, oldFile.getAppFileName(), \"\"),\r\n\t\t\t\t\tstorageService.getFile(repoName, newFile.getAppFileName(), \"\"));\r\n\r\n\t\t\tMap<String, Integer> hitByNodeType;\r\n\t\t\tfor (Operation op : result.getRootOperations()) {\r\n\r\n\t\t\t\tAction action = op.getAction();\r\n\r\n\t\t\t\tCtElement element = (CtElement) action.getNode().getMetadata(SpoonGumTreeBuilder.SPOON_OBJECT);\r\n\r\n\t\t\t\tString actionName = action.getClass().getSimpleName();\r\n\r\n\t\t\t\tString nodeType = element.getClass().getSimpleName();\r\n\r\n\t\t\t\tnodeType = nodeType.substring(2, nodeType.length() - 4);\r\n\r\n\t\t\t\tstatsByAction.putIfAbsent(nodeType, new HashMap<String, Integer>());\r\n\r\n\t\t\t\thitByNodeType = statsByAction.get(nodeType);\r\n\r\n\t\t\t\thitByNodeType.put(actionName, hitByNodeType.getOrDefault(actionName, 0) + 1);\r\n\r\n\t\t\t\t// if all actions are applied on the same node print only the\r\n\t\t\t\t// first action\r\n\t\t\t\tif (element.equals(element) && action instanceof Update) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tstatsByAction.put(nodeType, hitByNodeType);\r\n\r\n\t\t\t\t// add\r\n\t\t\t}\r\n\r\n\t\t\tlogger.info(\"> Details : \" + statsByAction.toString());\r\n\r\n\t\t\treturn statsByAction;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(e.getMessage(), e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Then(\"^Merge Cucumber Reports$\")\n\tpublic void merge_Cucumber_Reports() throws Throwable {\n\n\t\t// LOGGER.info(\"[CDP-TEST] Step Def : Merge Cucumber Reports\");\n\n\t\t// CdpCucumberReportUtil.generateCombinedReport();\n\n\t}", "protected String generateDiff(String oldContent, String newContent) {\n\t\tDiffMatchPatch dmp = new DiffMatchPatch();\n\t\tdmp.Diff_EditCost =\n\t\t\tConfigService.CONFIG_SERVICE\n\t\t\t\t.getConfig(ServerConfigKey.DIFF_EDIT_COST)\n\t\t\t\t.<Integer> get()\n\t\t\t\t.shortValue();\n\t\tdmp.Diff_Timeout =\n\t\t\tConfigService.CONFIG_SERVICE\n\t\t\t\t.getConfig(ServerConfigKey.DIFF_TIMEOUT)\n\t\t\t\t.<Double> get()\n\t\t\t\t.floatValue();\n\n\t\tLinkedList<Diff> diffs = dmp.diff_main(oldContent, newContent);\n\t\tboolean identical = true;\n\t\tfor (Diff diff : diffs) {\n\t\t\tif (!DiffMatchPatch.Operation.EQUAL.equals(diff.operation)) {\n\t\t\t\tidentical = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (identical) {\n\t\t\treturn null;\n\t\t}\n\n\t\tdmp.diff_cleanupEfficiency(diffs);\n\t\tString prettyHtml = dmp.diff_prettyHtml(diffs);\n\t\treturn prettyHtml;\n\t}", "protected void mergeWith(BasicBlock succ) {\n if (this.start_states[succ.getID()] == null) {\n if (TRACE_INTRA) out.println(succ+\" not yet visited.\");\n this.start_states[succ.getID()] = this.s.copy();\n this.change = true;\n } else {\n //if (TRACE_INTRA) out.println(\"merging out set of \"+bb+\" \"+Strings.hex8(this.s.hashCode())+\" into in set of \"+succ+\" \"+Strings.hex8(this.start_states[succ.getID()].hashCode()));\n if (TRACE_INTRA) out.println(\"merging out set of \"+bb+\" into in set of \"+succ);\n if (this.start_states[succ.getID()].merge(this.s)) {\n if (TRACE_INTRA) out.println(succ+\" in set changed\");\n this.change = true;\n }\n }\n }", "@Test\n\tpublic void testUpdateFile_2()\n\t\tthrows Exception {\n\t\tDLLocalServiceImpl fixture = new DLLocalServiceImpl();\n\t\tfixture.groupLocalService = new GroupLocalServiceWrapper(new GroupLocalServiceImpl());\n\t\tfixture.hook = new CMISHook();\n\t\tfixture.dlFolderService = new DLFolderServiceWrapper(new DLFolderServiceImpl());\n\t\tlong companyId = 1L;\n\t\tString portletId = \"\";\n\t\tlong groupId = 1L;\n\t\tlong repositoryId = 1L;\n\t\tString fileName = \"\";\n\t\tString fileExtension = \"\";\n\t\tboolean validateFileExtension = true;\n\t\tString versionNumber = \"\";\n\t\tString sourceFileName = \"\";\n\t\tlong fileEntryId = 1L;\n\t\tString properties = \"\";\n\t\tDate modifiedDate = new Date();\n\t\tServiceContext serviceContext = new ServiceContext();\n\t\tInputStream is = new Base64InputStream(new UnsyncByteArrayInputStream(new byte[] {}));\n\n\t\tfixture.updateFile(companyId, portletId, groupId, repositoryId, fileName, fileExtension, validateFileExtension, versionNumber, sourceFileName, fileEntryId, properties, modifiedDate, serviceContext, is);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.ClassNotFoundException: com.liferay.documentlibrary.service.impl.DLLocalServiceImpl\n\t\t// at java.net.URLClassLoader.findClass(Unknown Source)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.UserDefinedClassLoader.loadClass(UserDefinedClassLoader.java:62)\n\t\t// at java.lang.ClassLoader.loadClass(Unknown Source)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionContextImpl.getClass(ExecutionContextImpl.java:99)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.SimpleTypeExpression.execute(SimpleTypeExpression.java:205)\n\t\t// at com.instantiations.eclipse.analysis.expression.model.MethodInvocationExpression.execute(MethodInvocationExpression.java:544)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.core.ExecutionRequest.execute(ExecutionRequest.java:286)\n\t\t// at com.instantiations.assist.eclipse.junit.execution.communication.LocalExecutionClient$1.run(LocalExecutionClient.java:158)\n\t\t// at java.lang.Thread.run(Unknown Source)\n\t}" ]
[ "0.59318584", "0.5264834", "0.5150561", "0.4905033", "0.49007496", "0.48681125", "0.48628274", "0.47964022", "0.47496134", "0.47018078", "0.46341044", "0.459416", "0.4592874", "0.4556843", "0.45177826", "0.44913992", "0.44759935", "0.446668", "0.4465896", "0.4457476", "0.44501498", "0.4446025", "0.4422824", "0.44119143", "0.43978453", "0.43899617", "0.4369933", "0.43639517", "0.43457428", "0.43393853", "0.43119934", "0.42946658", "0.42876917", "0.42871648", "0.42864686", "0.42834172", "0.42827928", "0.42827246", "0.42584324", "0.42479092", "0.42464003", "0.42437446", "0.42436284", "0.42289957", "0.41993555", "0.41946784", "0.41881317", "0.41792598", "0.41789246", "0.41708365", "0.41688117", "0.4159601", "0.41574675", "0.41474852", "0.41372666", "0.4129556", "0.41294977", "0.41279876", "0.41194808", "0.41151914", "0.41145787", "0.41032094", "0.40915638", "0.40846592", "0.4084012", "0.4080961", "0.40769175", "0.40736032", "0.40700695", "0.40639907", "0.4061339", "0.4057292", "0.40535155", "0.40512615", "0.40464345", "0.40461594", "0.40445542", "0.4034648", "0.40312022", "0.40308666", "0.40279728", "0.40263075", "0.40261203", "0.4023525", "0.4016735", "0.4016735", "0.4013707", "0.40019277", "0.39975855", "0.39970577", "0.3994864", "0.39920294", "0.39898533", "0.39877453", "0.39730826", "0.3968488", "0.39646688", "0.39620864", "0.39603946", "0.39571565" ]
0.4669871
10
Rewrites a JSure release promises XML file incrementing its release version. This method may be used to update the file format after a structural change. If the passed file doesn't exist this method does nothing. Warning: This method only works if the tool user is running from source code in a metaEclipse.
public static void rewriteJSure(String relativePathToFile) { final File fluidRoot = PromisesXMLParser.getFluidXMLDir(); final File jsure = new File(fluidRoot, relativePathToFile); PromisesXMLMerge.rewriteJSureXML(jsure, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void changeXMLFile() throws IOException {\n File orig = new File(RunnerClass.homedir + \"launch4j.xml\");\n File custom = new File(RunnerClass.homedir + \"launch4j2.xml\");\n BufferedReader br = new BufferedReader(new FileReader(orig));\n PrintWriter pw = new PrintWriter(new FileWriter(custom));\n int line = 0;\n String s;\n //Reads all lines, and replaces 5th line with new destination file\n while ((s = br.readLine()) != null) {\n line++;\n if (line == 5)\n pw.println(\" <outfile>\" + exeF.getCanonicalPath() + \"</outfile>\");\n else if(line == 18)\n pw.println(\" <minVersion>\"+ getFullVersion(RunnerClass.mf.generalOptionalPanel.javaVersion.getText().trim()) +\"</minVersion>\");\n else\n pw.println(s);\n }\n br.close();\n pw.close();\n //Deletes original file, renames temp to original\n RunnerClass.logger.info(\"del: \" + orig.delete());\n RunnerClass.logger.info(\"ren: \" + custom.renameTo(orig));\n }", "void updateFile() throws IOException;", "public void incrementVersion() {\n this.version++;\n }", "public static void updateSynapseAPI(Document document, File file) throws APIMigrationException {\n try {\n updateHandlers(document, file);\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n DOMSource source = new DOMSource(document);\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n } catch (TransformerConfigurationException e) {\n handleException(\"Could not initiate TransformerFactory Builder.\", e);\n } catch (TransformerException e) {\n handleException(\"Could not transform the source.\", e);\n }\n }", "public void incrementVersion() {\n this.version += 1;\n }", "public void reload() {\n if ( _build_file != null ) {\n openBuildFile( _build_file );\n }\n }", "public void testModifyFile() throws Exception {\n System.out.print(\".. Testing file modification ..\");\n String filesystem = \"VSS \" + workingDirectory + File.separator + \"Work\";\n Node filesystemNode = new Node(new ExplorerOperator().repositoryTab().getRootNode(), filesystem);\n Node A_FileNode = new Node( filesystemNode, \"A_File [Current] (\" + userName + \")\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(workingDirectory + File.separator + \"Work\" + File.separator + \"A_File.java\"));\n writer.write(\"/** This is testing A_File.java file.\\n */\\n public class Testing_File {\\n int i;\\n }\\n\");\n writer.flush();\n writer.close();\n new OpenAction().perform(A_FileNode);\n new Action(VERSIONING_MENU + \"|\" + REFRESH, REFRESH).perform(A_FileNode);\n Thread.sleep(5000);\n A_FileNode = new Node( filesystemNode, \"A_File [Locally Modified] (\" + userName + \")\");\n System.out.println(\". done !\");\n }", "private void updateFile(CrowdinFile _file) {\n String fileN = _file.getFile().getName();\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Initializing: \" + fileN);\n // Making sure the file is a master file and not a translation\n if (_file.getClass().equals(CrowdinFile.class)) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Init dir\");\n initDir(_file.getCrowdinPath());\n try {\n if (_file.getFile().exists()) {\n \n //escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersBeforeSyncFromCodeToCrowdin\");\n \n if (!getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Add file: \" + _file.getCrowdinPath());\n String result = getHelper().addFile(_file);\n if (result.contains(\"success\")) {\n getLog().info(\"File \" + fileN + \" created succesfully.\");\n initTranslations(_file);\n } else {\n getLog().warn(\"Cannot create file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n }\n } else {\n if (getLog().isDebugEnabled()) {\n getLog().debug(\"*** Update file: \" + _file.getCrowdinPath());\n }\n String result = getHelper().updateFile(_file);\n System.out.println(result);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" updated succesfully.\");\n else\n getLog().warn(\"Cannot update file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n if (_file.isShouldBeCleaned()) {\n _file.getFile().delete();\n }\n \n //remove escape special character before sync\n FileUtils.replaceCharactersInFile(_file.getFile().getPath(), \"config/special_character_processing.properties\", \"EscapeSpecialCharactersAfterSyncFromCodeToCrowdin\");\n \n }\n } else {\n if (getHelper().elementExists(_file.getCrowdinPath())) {\n if (getLog().isDebugEnabled())\n getLog().debug(\"*** Delete file: \" + _file.getCrowdinPath());\n String result = getHelper().deleteFile(_file);\n if (result.contains(\"success\"))\n getLog().info(\"File \" + fileN + \" deleted succesfully.\");\n else\n getLog().warn(\"Cannot delete file '\" + _file.getFile().getPath() + \"'. Reason:\\n\" + result);\n }\n }\n } catch (MojoExecutionException e) {\n getLog().error(\"Error while updating file '\" + _file.getFile().getPath() + \"'. Exception:\\n\" + e.getMessage());\n }\n }\n }", "@Test\r\n public void testUpdateFile() {\r\n System.out.println(\"updateFile\");\r\n InparseManager instance = ((InparseManager) new ParserGenerator().getNewApplicationInparser());\r\n try {\r\n File file = File.createTempFile(\"TempInpFile\", null);\r\n instance.setlocalPath(file.getAbsolutePath());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ApplicationInparserTest.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n instance.updateFile();\r\n // no assertEquals needed because the method itself would throw an error\r\n // if an error occurs check your connection to the internet\r\n }", "public void write_as_xml ( File series_file, Reconstruct r ) {\n try {\n String new_path_name = series_file.getParentFile().getCanonicalPath();\n String ser_file_name = series_file.getName();\n String new_file_name = ser_file_name.substring(0,ser_file_name.length()-4) + file_name.substring(file_name.lastIndexOf(\".\"),file_name.length());\n // At this point, there should be no more exceptions, so change the actual member data for this object\n this.path_name = new_path_name;\n this.file_name = new_file_name;\n priority_println ( 100, \" Writing to Section file \" + this.path_name + \" / \" + this.file_name );\n\n File section_file = new File ( this.path_name + File.separator + this.file_name );\n\n PrintStream sf = new PrintStream ( section_file );\n sf.print ( \"<?xml version=\\\"1.0\\\"?>\\n\" );\n sf.print ( \"<!DOCTYPE Section SYSTEM \\\"section.dtd\\\">\\n\\n\" );\n\n if (this.section_doc != null) {\n Element section_element = this.section_doc.getDocumentElement();\n if ( section_element.getNodeName().equalsIgnoreCase ( \"Section\" ) ) {\n int seca = 0;\n sf.print ( \"<\" + section_element.getNodeName() );\n // Write section attributes in line\n for ( /*int seca=0 */; seca<section_attr_names.length; seca++) {\n sf.print ( \" \" + section_attr_names[seca] + \"=\\\"\" + section_element.getAttribute(section_attr_names[seca]) + \"\\\"\" );\n }\n sf.print ( \">\\n\" );\n\n // Handle the child nodes\n if (section_element.hasChildNodes()) {\n NodeList child_nodes = section_element.getChildNodes();\n for (int cn=0; cn<child_nodes.getLength(); cn++) {\n Node child = child_nodes.item(cn);\n if (child.getNodeName().equalsIgnoreCase ( \"Transform\")) {\n Element transform_element = (Element)child;\n int tfa = 0;\n sf.print ( \"<\" + child.getNodeName() );\n for ( /*int tfa=0 */; tfa<transform_attr_names.length; tfa++) {\n sf.print ( \" \" + transform_attr_names[tfa] + \"=\\\"\" + transform_element.getAttribute(transform_attr_names[tfa]) + \"\\\"\" );\n if (transform_attr_names[tfa].equals(\"dim\") || transform_attr_names[tfa].equals(\"xcoef\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \">\\n\" );\n if (transform_element.hasChildNodes()) {\n NodeList transform_child_nodes = transform_element.getChildNodes();\n for (int gcn=0; gcn<transform_child_nodes.getLength(); gcn++) {\n Node grandchild = transform_child_nodes.item(gcn);\n if (grandchild.getNodeName().equalsIgnoreCase ( \"Image\")) {\n Element image_element = (Element)grandchild;\n int ia = 0;\n sf.print ( \"<\" + image_element.getNodeName() );\n for ( /*int ia=0 */; ia<image_attr_names.length; ia++) {\n sf.print ( \" \" + image_attr_names[ia] + \"=\\\"\" + image_element.getAttribute(image_attr_names[ia]) + \"\\\"\" );\n if (image_attr_names[ia].equals(\"blue\")) {\n sf.print ( \"\\n\" );\n }\n }\n sf.print ( \" />\\n\" );\n } else if (grandchild.getNodeName().equalsIgnoreCase ( \"Contour\")) {\n Element contour_element = (Element)grandchild;\n int ca = 0;\n sf.print ( \"<\" + contour_element.getNodeName() );\n for ( /*int ca=0 */; ca<contour_attr_names.length; ca++) {\n // System.out.println ( \"Writing \" + contour_attr_names[ca] );\n if (contour_attr_names[ca].equals(\"points\")) {\n // Check to see if this contour element has been modified\n boolean modified = false; // This isn't being used, but should be!!\n ContourClass matching_contour = null;\n for (int cci=0; cci<contours.size(); cci++) {\n ContourClass contour = contours.get(cci);\n if (contour.contour_element == contour_element) {\n matching_contour = contour;\n break;\n }\n }\n if (matching_contour == null) {\n // Write out the data from the original XML\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", true) + \"\\\"\" );\n } else {\n // Write out the data from the stroke points\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(matching_contour.stroke_points,\"\\t\", true) + \"\\\"\" );\n }\n } else if (contour_attr_names[ca].equals(\"handles\")) {\n if (r.export_handles) {\n String handles_str = contour_element.getAttribute(contour_attr_names[ca]);\n if (handles_str != null) {\n handles_str = handles_str.trim();\n if (handles_str.length() > 0) {\n // System.out.println ( \"Writing a handles attribute = \" + contour_element.getAttribute(contour_attr_names[ca]) );\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + format_comma_sep(contour_element.getAttribute(contour_attr_names[ca]),\"\\t\", false) + \"\\\"\\n\" );\n }\n }\n }\n } else if (contour_attr_names[ca].equals(\"type\")) {\n if (r.export_handles) {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n } else {\n // Don't output the \"type\" attribute if not exporting handles (this makes the traces non-bezier)\n }\n } else {\n sf.print ( \" \" + contour_attr_names[ca] + \"=\\\"\" + contour_element.getAttribute(contour_attr_names[ca]) + \"\\\"\" );\n if (contour_attr_names[ca].equals(\"mode\")) {\n sf.print ( \"\\n\" );\n }\n }\n }\n sf.print ( \"/>\\n\" );\n }\n }\n }\n sf.print ( \"</\" + child.getNodeName() + \">\\n\\n\" );\n }\n }\n }\n\n // Also write out any new contours created by drawing\n\n for (int i=0; i<contours.size(); i++) {\n ContourClass contour = contours.get(i);\n ArrayList<double[]> s = contour.stroke_points;\n ArrayList<double[][]> h = contour.handle_points;\n if (s.size() > 0) {\n if (contour.modified) {\n if (contour.contour_name == null) {\n contour.contour_name = \"RGB_\";\n if (contour.r > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.g > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n if (contour.b > 0.5) { contour.contour_name += \"1\"; } else { contour.contour_name += \"0\"; }\n }\n sf.print ( \"<Transform dim=\\\"0\\\"\\n\" );\n sf.print ( \" xcoef=\\\" 0 1 0 0 0 0\\\"\\n\" );\n sf.print ( \" ycoef=\\\" 0 0 1 0 0 0\\\">\\n\" );\n String contour_color = \"\\\"\" + contour.r + \" \" + contour.g + \" \" + contour.b + \"\\\"\";\n sf.print ( \"<Contour name=\\\"\" + contour.contour_name + \"\\\" \" );\n if (contour.is_bezier) {\n sf.print ( \"type=\\\"bezier\\\" \" );\n } else {\n // sf.print ( \"type=\\\"line\\\" \" );\n }\n sf.print ( \"hidden=\\\"false\\\" closed=\\\"true\\\" simplified=\\\"false\\\" border=\" + contour_color + \" fill=\" + contour_color + \" mode=\\\"13\\\"\\n\" );\n\n if (contour.is_bezier) {\n if (h.size() > 0) {\n sf.print ( \" handles=\\\"\" );\n System.out.println ( \"Saving handles inside Section.write_as_xml\" );\n for (int j=h.size()-1; j>=0; j+=-1) {\n // for (int j=0; j<h.size(); j++) {\n double p[][] = h.get(j);\n if (j != 0) {\n sf.print ( \" \" );\n }\n System.out.println ( \" \" + p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] );\n sf.print ( p[0][0] + \" \" + p[0][1] + \" \" + p[1][0] + \" \" + p[1][1] + \",\\n\" );\n }\n sf.print ( \" \\\"\\n\" );\n }\n }\n\n sf.print ( \" points=\\\"\" );\n for (int j=s.size()-1; j>=0; j+=-1) {\n double p[] = s.get(j);\n if (j != s.size()-1) {\n sf.print ( \" \" );\n }\n sf.print ( p[0] + \" \" + p[1] + \",\\n\" );\n }\n sf.print ( \" \\\"/>\\n\" );\n sf.print ( \"</Transform>\\n\\n\" );\n }\n }\n }\n\n sf.print ( \"</\" + section_element.getNodeName() + \">\" );\n }\n }\n sf.close();\n\n } catch (Exception e) {\n }\n }", "public void setUpNewXMLFile(File file) {\n\t\tPrintWriter pw = null;\n\t\ttry {\n\t\t\tpw = new PrintWriter(file, \"UTF-8\");\n\t\t\tpw.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"no\\\" ?>\\n\");\n\t\t\tpw.write(\"<\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.write(\"</\" + defaultDocumentElement + \">\\n\");\n\t\t\tpw.close();\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Error creating new XML File.\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tpw.close();\n\t\t\t} catch(Exception e) {\n\t\t\t\t//Seems like it was already closed.\n\t\t\t}\n\t\t}\n\t}", "public void testMoveFileWithReplace() throws Exception {\n IPackageFragment fragment = getRoot().createPackageFragment(\"org.test\", true, null);\n IPackageFragment otherFragment = getRoot().createPackageFragment(\"org.test1\", true, null);\n IFile file = ((IFolder) fragment.getResource()).getFile(\"x.properties\");\n String content = \"A file with no references\";\n file.create(getStream(content), true, null);\n setReadOnly(file);\n IFile file2 = ((IFolder) otherFragment.getResource()).getFile(\"x.properties\");\n file2.create(getStream(content), true, null);\n setReadOnly(file2);\n IMovePolicy policy = ReorgPolicyFactory.createMovePolicy(new IResource[] { file }, new IJavaElement[] {});\n assertTrue(policy.canEnable());\n JavaMoveProcessor javaMoveProcessor = new JavaMoveProcessor(policy);\n javaMoveProcessor.setDestination(ReorgDestinationFactory.createDestination(otherFragment));\n javaMoveProcessor.setReorgQueries(new MockReorgQueries());\n RefactoringStatus status = performRefactoring(new MoveRefactoring(javaMoveProcessor), true);\n if (status != null)\n assertTrue(status.toString(), status.isOK());\n Collection<IPath> validatedEditPaths = RefactoringTestRepositoryProvider.getValidatedEditPaths(getRoot().getJavaProject().getProject());\n assertEquals(1, validatedEditPaths.size());\n // replaced\n assertTrue(validatedEditPaths.contains(file2.getFullPath()));\n }", "private static synchronized void changeXML(Path filepath, File conf, String name){\n try {\n // Строим объектную модель исходного XML файла\n DocumentBuilder db = DocumentBuilderFactory.newInstance()\n .newDocumentBuilder();\n Document doc = db.parse(conf);\n doc.normalize();\n \n NodeList appenders = doc.getElementsByTagName(\"appender\");\n for (int i = 0; i < appenders.getLength(); i++) {\n Node appender = appenders.item(i);\n //if this node is suitable appender, then change TextContext 'file'\n if (isMyRollingFileAppender(appender, name)) {\n NodeList childNodes = appender.getChildNodes();\n for (int j = 0; j < childNodes.getLength(); j++) {\n Node nextChild = childNodes.item(j);\n if (nextChild.getNodeName().equals(\"file\")) {\n nextChild.setTextContent(filepath.toString());\n break;\n }\n }\n break;\n }\n }\n // Write changes to XML-file\n Transformer transformer = TransformerFactory.newInstance()\n .newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(conf);\n transformer.transform(source, result);\n \n } catch (SAXException | IOException | ParserConfigurationException\n | TransformerConfigurationException ex) {\n System.out.println(\"Ошибка ввода-вывода при изменении XML-файла: \"+ex.getMessage());\n } catch (TransformerException ex) {\n System.out.println(\"Ошибка в траносформации XML \"+ex.getMessage());\n }\n }", "private void write(){\n\t\ttry {\n\t\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = transformerFactory.newTransformer();\n\t\t\tDOMSource source = new DOMSource(doc);\n\t\t\t\n\t\t\tString pathSub = ManipXML.class.getResource(path).toString();\n\t\t\tpathSub = pathSub.substring(5, pathSub.length());\n\t\t\tStreamResult result = new StreamResult(pathSub);\n\t\t\t\n\t\t\ttransformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\tpublic void publishResource(FlexoResource<?> resource, FlexoVersion newVersion) throws Exception {\n\t\t}", "private void updateFiles() {\n\t}", "public void releaseVersion(String versionValue);", "public void setFileVersion(int fileVersion) {\r\n\t\tthis.fileVersion = fileVersion;\r\n\t}", "void update(FileInfo fileInfo);", "@SuppressWarnings(\"unchecked\")\n public void execute() {\n try {\n\n DefaultArtifact artifact = new DefaultArtifact(\n getProject().getGroupId(),\n getProject().getArtifactId(),\n artifactHandlerManager\n .getArtifactHandler(getProject().getPackaging())\n .getExtension(),\n \"[0,)\");\n\n getLog().debug(\"Artifact for lookup released version: \" + artifact);\n VersionRangeRequest request =\n new VersionRangeRequest(artifact, getProject().getRemoteProjectRepositories(), null);\n\n VersionRangeResult versionRangeResult = repoSystem.resolveVersionRange(repoSession, request);\n\n getLog().debug(\"Resolved versions: \" + versionRangeResult.getVersions());\n\n DefaultArtifactVersion releasedVersion = versionRangeResult.getVersions().stream()\n .filter(v -> !ArtifactUtils.isSnapshot(v.toString()))\n .map(v -> new DefaultArtifactVersion(v.toString()))\n .max(DefaultArtifactVersion::compareTo)\n .orElse(null);\n\n getLog().debug(\"Released version: \" + releasedVersion);\n\n if (releasedVersion != null) {\n // Use ArtifactVersion.toString(), the major, minor and incrementalVersion return all an int.\n String releasedVersionValue = releasedVersion.toString();\n\n // This would not always reflect the expected version.\n int dashIndex = releasedVersionValue.indexOf('-');\n if (dashIndex >= 0) {\n releasedVersionValue = releasedVersionValue.substring(0, dashIndex);\n }\n\n defineVersionProperty(\"version\", releasedVersionValue);\n defineVersionProperty(\"majorVersion\", releasedVersion.getMajorVersion());\n defineVersionProperty(\"minorVersion\", releasedVersion.getMinorVersion());\n defineVersionProperty(\"incrementalVersion\", releasedVersion.getIncrementalVersion());\n defineVersionProperty(\"buildNumber\", releasedVersion.getBuildNumber());\n defineVersionProperty(\"qualifier\", releasedVersion.getQualifier());\n } else {\n getLog().debug(\"No released version found.\");\n }\n\n } catch (VersionRangeResolutionException e) {\n if (getLog().isWarnEnabled()) {\n getLog().warn(\"Failed to retrieve artifacts metadata, cannot resolve the released version\");\n }\n }\n }", "private void rewriteXmlSource(){\n //Log.i(LOG_TAG, \"Updating radios.xml....\");\n String fileName = \"radios.xml\";\n String content = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n\" +\n \"<playlist>\\n\";\n\n for (Radio radio : radioList) {\n content += \"<track>\\n\";\n content += \"<location>\" + radio.getUrl() + \"</location>\\n\";\n content += \"<title>\" + radio.getName() + \"</title>\\n\";\n content += \"</track>\\n\";\n }\n content += \"</playlist>\";\n\n FileOutputStream outputStream = null;\n try {\n //Log.i(LOG_TAG,\"write new radios.xml file\");\n outputStream = owner.openFileOutput(fileName, owner.getBaseContext().MODE_PRIVATE);\n outputStream.write(content.getBytes());\n outputStream.close();\n } catch (Exception e2) {\n e2.printStackTrace();\n }\n }", "private void updateFileResource(Long fileId) {\n editResourceService.getVMFile(fileId, new AsyncCallback<VMFile>() {\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(VMFile result) {\n FileTreeNode targetNode = (FileTreeNode) fileTreeNodeFactory.findTreeNode(tree, fileId);\n targetNode.setResource(result);\n }\n });\n }", "private Resource deploySnapshotResource(Resource developmentResource) throws Exception {\n Version releasedBaseVersion = getReleasedBaseVersion(developmentResource);\n Resource snapshotResource = getHighestSnapshotResource(developmentResource, releasedBaseVersion);\n\n if (snapshotResource == null) {\n System.out.println(\"Uploading initial snapshot: \" + getString(developmentResource) + \" -> \" + getNextSnapshotVersion(releasedBaseVersion));\n return deploySnapshotResource(developmentResource, getNextSnapshotVersion(releasedBaseVersion));\n }\n\n System.out.println(\"Found existing snapshot: \" + getString(snapshotResource));\n if (getIdentity(developmentResource).equals(\"com.google.guava\")) {\n // FIXME workaround for BND#374\n System.out.println(\"Skipping snapshot diff on Google Guava to work around https://github.com/bndtools/bnd/issues/374\");\n return snapshotResource;\n }\n\n File developmentFile = m_developmentRepo.get(getIdentity(developmentResource), getVersion(developmentResource).toString(), Strategy.EXACT, null);\n File deployedFile = m_deploymentRepo.get(getIdentity(snapshotResource), getVersion(snapshotResource).toString(), Strategy.EXACT, null);\n\n boolean snapshotModified = false;\n if (getType(developmentResource).equals(\"osgi.bundle\")) {\n\n // Get a copy of the dep resource with the same version as the dev resource so we can diff diff.\n File comparableDeployedResource = getBundleWithNewVersion(deployedFile, getVersion(developmentResource).toString());\n\n // This may seem strange but the value in the dev resource manifest may be \"0\" which will not match\n // \"0.0.0\" during diff.\n File comparableDevelopmentResource = getBundleWithNewVersion(developmentFile, getVersion(developmentResource).toString());\n snapshotModified = jarsDiffer(comparableDeployedResource, comparableDevelopmentResource);\n }\n else {\n snapshotModified = filesDiffer(developmentFile, deployedFile);\n }\n\n if (snapshotModified) {\n System.out.println(\"Uploading new snapshot: \" + getString(developmentResource) + \" -> \" + getNextSnapshotVersion(getVersion(snapshotResource)));\n return deploySnapshotResource(developmentResource, getNextSnapshotVersion(getVersion(snapshotResource)));\n }\n else {\n System.out.println(\"Ignoring new snapshot: \" + getString(developmentResource));\n List<Resource> resultResources = findResources(m_deploymentRepo, getIdentityVersionRequirement(snapshotResource));\n if (resultResources == null || resultResources.size() == 0) {\n throw new IllegalStateException(\"Can not find target resource after put: \" + developmentResource);\n }\n return resultResources.get(0);\n }\n }", "public static String getVersion() {\n\n try {\n //Open file\n ClassLoader classLoader = new ResourceLoader().getClass().getClassLoader();\n File file = new File(classLoader.getResource(RELEASE_NOTES).getFile());\n //Read File Content\n String content = new String(Files.readAllBytes(file.toPath()));\n content = content.split(\"VERSION \")[1]; //version number comes after VERSION\n content = content.split(\"\\n\")[0]; //and before the next new line\n return content;\n } catch (IOException ex) {\n Logger.getLogger(ResourceLoader.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n\n }", "public static void update(String sFilename)\n\t{\n\t\tVTD_XML xml;\n\t\ttry\n\t\t{\n\t\t\tLogs.log.info(\"Translations being loaded from file: \" + sFilename);\n\t\t\txml = new VTD_XML(sFilename);\n\t\t\tupdate(xml);\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\t// ex.printStackTrace();\n\t\t\tLogs.log.error(\"Exception occurred attempting to update the translations. Details below: \");\n\t\t\tLogs.log.error(ex);\n\t\t\tthrow new TranslationsUpdateException(ex.getMessage());\n\t\t}\n\t}", "@Test( expected = IllegalStateException.class )\n public void testSetResource()\n {\n PathBuilder.instance().forReleaseIndexFile().setResource( resource );\n }", "@Test\n\tpublic void testGenerateCodeAndOverwriteFormattedButUnchangedFile() throws IOException {\n\t\tFile tmpFile = File.createTempFile(\"junit\", \".tmp\");\n\t\ttmpFile.deleteOnExit();\n\n\t\tFile tmpDir = new File(tmpFile.getParentFile(), UUID.randomUUID().toString());\n\t\ttry {\n\t\t\tString filename = \"sample.xml\";\n\t\t\tFile realDir = new File(tmpDir, \"real\");\n\t\t\tFile targetDir = new File(tmpDir, \"target\");\n\t\t\tFile realFile = new File(realDir, filename);\n\n\t\t\t// generate sample1\n\t\t\tcodeGenerator.generateCode(CodeOverwritePolicy.OVERWRITE_IF_UNCHANGED, new HashMap<String, Object>(),\n\t\t\t\t\trealDir, targetDir, \"sample1.vm\", filename);\n\n\t\t\t// assert that sample1 was written\n\t\t\tAssert.assertTrue(FileUtils.readFileToString(realFile).contains(\"This is sample1\"),\n\t\t\t\t\t\"Sample 1 was not written successfully, expected text not found in the written file\");\n\n\t\t\tlong creationTime = realFile.lastModified();\n\n\t\t\tcodeGenerator.generateCode(CodeOverwritePolicy.OVERWRITE_IF_UNCHANGED, new HashMap<String, Object>(),\n\t\t\t\t\trealDir, targetDir, \"sample1-formatted.vm\", filename);\n\n\t\t\tlong lastModified = realFile.lastModified();\n\n\t\t\t// assert that sample1 was not written\n\t\t\tAssert.assertTrue(lastModified == creationTime,\n\t\t\t\t\t\"File should not have been changed because only formatting changed\");\n\t\t} finally {\n\t\t\tFileUtils.deleteDirectory(tmpDir);\n\t\t}\n\t}", "public void commit() {\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tStreamResult streamResult = new StreamResult(new File(fileName));\n\t\t\ttransformer.transform(domSource, streamResult);\n\t\t\t//Reload nodes list\n\t\t\tnodes = document.getDocumentElement().getChildNodes();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void exec() {\n\n try {\n\n String webDotXMLPath = webAppPath + \"/WEB-INF/web.xml\";\n DocumentBuilderFactory builderFactory = DocumentBuilderFactory\n .newInstance();\n\n DocumentBuilder builder = DocumentBuilderFactory.newInstance()\n .newDocumentBuilder();\n Document doc = builder.parse(new File(webDotXMLPath));\n DocumentType docType = doc.getDoctype();\n if (docType != null) {\n doc.removeChild(docType);\n }\n Element webAppElement = (Element) doc.getFirstChild();\n webAppElement.setAttribute(\"version\", \"2.4\");\n webAppElement.setAttribute(\"xmlns\",\n \"http://java.sun.com/xml/ns/j2ee\");\n webAppElement.setAttribute(\"xmlns:xsi\",\n \"http://www.w3.org/2001/XMLSchema-instance\");\n webAppElement\n .setAttribute(\n \"xsi:schemaLocation\",\n \"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd\");\n\n OutputFormat of = new OutputFormat();\n of.setIndenting(true);\n of.setIndent(4); // 2-space indention\n of.setLineWidth(16384);\n\n OutputStream outputStream = new FileOutputStream(webDotXMLPath);\n Writer writer = new OutputStreamWriter(outputStream, \"utf-8\");\n\n XMLSerializer serializer = new XMLSerializer(writer, of);\n serializer.serialize(doc);\n\n writer.close();\n\n } catch (Exception e) {\n throw new RuntimeException(\"Processing failed\", e);\n }\n\n }", "public void testChanges(String filePath) {\n Object[] fileObjectArray = fetchTextFile(filePath);\n String newFile = prepareText(fileObjectArray);\n System.out.println(newFile);\n }", "int uploadProjectedModis(File file, String project, ModisProduct product, DataDate date, DataDate updated) throws IOException, SQLException;", "@Override\n\tpublic void createRelease(Version version) {\n\n\t}", "@Test\n public void incrementalBuild_sourceModified_rerunActions() throws Exception {\n write(\"foo.in\", \"foo\");\n write(\n \"BUILD\",\n \"genrule(\",\n \" name = 'foo',\",\n \" srcs = ['foo.in'],\",\n \" outs = ['out/foo.txt'],\",\n \" cmd = 'cat $(SRCS) > $@',\",\n \")\",\n \"genrule(\",\n \" name = 'foobar',\",\n \" srcs = [':foo'],\",\n \" outs = ['out/foobar.txt'],\",\n \" cmd = 'cat $(location :foo) > $@ && echo bar >> $@',\",\n \" tags = ['no-remote'],\",\n \")\");\n\n buildTarget(\"//:foobar\");\n assertValidOutputFile(\"out/foo.txt\", \"foo\" + lineSeparator());\n assertValidOutputFile(\"out/foobar.txt\", \"foo\" + lineSeparator() + \"bar\\n\");\n\n // Act: Modify source file and run an incremental build\n write(\"foo.in\", \"modified\");\n\n ActionEventCollector actionEventCollector = new ActionEventCollector();\n getRuntimeWrapper().registerSubscriber(actionEventCollector);\n buildTarget(\"//:foobar\");\n\n // Assert: All actions transitively depend on the source file are re-executed and outputs are\n // correct.\n assertValidOutputFile(\"out/foo.txt\", \"modified\" + lineSeparator());\n assertValidOutputFile(\"out/foobar.txt\", \"modified\" + lineSeparator() + \"bar\\n\");\n assertThat(actionEventCollector.getNumActionNodesEvaluated()).isEqualTo(2);\n }", "@FXML\r\n\tprivate void newVersion(ActionEvent event) {\r\n\t\tupdateAsset(AssetOperation.NEW_VERSION);\r\n\t}", "public void testPackageRenameWithResource() throws Exception {\n IPackageFragment fragment = getRoot().createPackageFragment(\"org.test\", true, null);\n StringBuffer buf = new StringBuffer();\n buf.append(\"package org.test;\\n\");\n buf.append(\"public class MyClass {\\n\");\n buf.append(\"}\\n\");\n ICompilationUnit cu1 = fragment.createCompilationUnit(\"MyClass.java\", buf.toString(), true, null);\n setReadOnly(cu1);\n IFile file = ((IFolder) fragment.getResource()).getFile(\"x.properties\");\n String content = \"A file with no references\";\n file.create(getStream(content), true, null);\n setReadOnly(file);\n RenameJavaElementDescriptor descriptor = RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(IJavaRefactorings.RENAME_PACKAGE);\n descriptor.setJavaElement(fragment);\n descriptor.setNewName(\"org.test2\");\n descriptor.setUpdateReferences(true);\n RefactoringStatus status = performRefactoring(descriptor);\n if (status != null)\n assertTrue(status.toString(), status.isOK());\n Collection<IPath> validatedEditPaths = RefactoringTestRepositoryProvider.getValidatedEditPaths(getRoot().getJavaProject().getProject());\n assertEquals(1, validatedEditPaths.size());\n assertTrue(validatedEditPaths.contains(cu1.getPath()));\n }", "public void setUpgradeFile( UpgradeFile file ) {\r\n\t\tupgradeFile = file;\r\n\t}", "int uploadEvi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;", "void addEntry(IvyXmlWriter xw) \n{\n xw.begin(\"USERFILE\");\n xw.field(\"NAME\",access_name);\n xw.field(\"JARNAME\",context_name);\n xw.field(\"ACCESS\",file_mode);\n xw.end(\"USERFILE\");\n}", "private void updateFile() {\n try {\n this.taskStorage.save(this.taskList);\n this.aliasStorage.save(this.parser);\n } catch (IOException e) {\n System.out.println(\"Master i am unable to save the file!\");\n }\n }", "public static void rewrite(ExecutableReader reader, File file) throws Exception {\n\t\tFileInputStream fis = new FileInputStream(file);\t\t\n\t\treader.exStr = new ExecutableStream(fis);\n\t\treader.read(reader.exStr);\n\t\tfis.close();\n\t}", "protected void transform()\n\t{\n\t\tFileSummary summary = getFileSummary();\n\t\tFileCloser.close(summary.getFile());\n\n\t\tsuper.transform();\n\t}", "public static void updateSynapseAPI(File filePath, String implementation) throws APIManagementException {\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n docFactory.setNamespaceAware(true);\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = null;\n doc = docBuilder.parse(filePath.getAbsolutePath());\n Node sequence = doc.getFirstChild();\n // <handler class=\"org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler\">\n // <property name=\"inline\" value=\"endpoint\"/>\n // </handler>\n // <handler class=\"org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler\"/>\n Node handlers = doc.getElementsByTagName(\"handlers\").item(0);\n Element corsHandler = doc.createElement(\"handler\");\n corsHandler.setAttribute(\"class\", \"org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler\");\n Element property = doc.createElement(\"property\");\n property.setAttribute(\"name\", \"inline\");\n property.setAttribute(\"value\", implementation);\n corsHandler.appendChild(property);\n NodeList handlerNodes = doc.getElementsByTagName(\"handler\");\n for (int i = 0; i < handlerNodes.getLength(); i++) {\n Node tempNode = handlerNodes.item(i);\n if (\"org.wso2.carbon.apimgt.gateway.handlers.security.CORSRequestHandler\"\n .equals(tempNode.getAttributes().getNamedItem(\"class\").getTextContent())) {\n handlers.removeChild(tempNode);\n }\n handlers.insertBefore(corsHandler, handlerNodes.item(0));\n }\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n StreamResult result = new StreamResult(filePath);\n transformer.transform(source, result);\n } catch (ParserConfigurationException pce) {\n handleException(pce.getMessage());\n } catch (TransformerException tfe) {\n handleException(tfe.getMessage());\n } catch (IOException ioe) {\n handleException(ioe.getMessage());\n } catch (SAXException sae) {\n handleException(sae.getMessage());\n }\n }", "public static void mergeLocalToJSure(String relativePathToFile) {\r\n\t\tfinal File fluidRoot = PromisesXMLParser.getFluidXMLDir();\r\n\t\tfinal File wsRoot = JSurePreferencesUtility.getJSureXMLDirectory();\r\n\r\n\t\tfinal File jsure = new File(fluidRoot, relativePathToFile);\r\n\t\tfinal File local = new File(wsRoot, relativePathToFile);\r\n\t\tboolean fileExistsOnDisk = local.isFile() && local.exists();\r\n\t\tif (!fileExistsOnDisk) {\r\n\t\t\tSLLogger.getLogger().log(Level.WARNING, I18N.err(239, local),\r\n\t\t\t\t\tnew Exception());\r\n\t\t\treturn; // Nothing to do\r\n\t\t}\r\n\t\tPromisesXMLMerge.mergeLocalXMLIntoJSureXML(local, jsure);\r\n\t}", "int uploadProjectedEto(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;", "long recalculateRevision();", "private void updateDatFile() {\n\t\tIOService<?> ioManager = new IOService<Entity>();\n\t\ttry {\n\t\t\tioManager.writeToFile(FileDataWrapper.productMap.values(), new Product());\n\t\t\tioManager = null;\n\t\t} catch (Exception ex) {\n\t\t\tDisplayUtil.displayValidationError(buttonPanel, StoreConstants.ERROR + \" saving new product\");\n\t\t\tioManager = null;\n\t\t}\n\t}", "private void checkForUpgrade() {\n try {\n\n File latestReleaseFile;\n\n if (Double.valueOf(thisVersion) >= 17) {\n latestReleaseFile = new File(\"I:\\\\support_admin\\\\scripts\\\\richmon\\\\upgradeToV17.txt\");\n }\n else {\n latestReleaseFile = new File(\"I:\\\\support_admin\\\\scripts\\\\richmon\\\\upgradeToV15.txt\");\n }\n\n BufferedReader latestRelease = new BufferedReader(new FileReader(latestReleaseFile));\n\n String latest = latestRelease.readLine();\n latest = latest.trim();\n double latestVersion = Double.valueOf(latest).doubleValue();\n String version = latest.substring(0,latest.indexOf(\".\")) + latest.substring(latest.indexOf(\".\"));\n\n\n if (latestVersion > Double.valueOf(thisVersion).doubleValue()) {\n // prompt the user suggesting an upgrade\n String msg = \"An upgrade to RichMon is available\\n\\nDo you want to Upgrade to RichMonV\" + latest +\n \" now ?\";\n\n int upgrade = JOptionPane.showConfirmDialog(this,msg,\"Upgrade\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);\n\n // copy new jar file to c:\\richmon\\software\\ and name if richmon.jar\n if (upgrade == 0) {\n try {\n String sourceF = \"I:\\\\support_admin\\\\scripts\\\\richmon\\\\RichMonV\" + version + \".jar\";\n String destF;\n if (Double.valueOf(thisVersion) >= 17) {\n destF = ConnectWindow.getBaseDir() + \"\\\\Software\\\\RichMon.jar\";\n }\n else {\n destF = ConnectWindow.getBaseDir() + \"\\\\Software\\\\RichMonV15.jar\";\n }\n Process p = Runtime.getRuntime().exec(\"cmd /c copy \" + sourceF + \" \" + destF);\n\n msg = \"Upgrade complete.\\n\\nBe sure to run RichMon from a shortcut on your taskbar,\\n\" +\n \"which points to ....\\\\My Documents\\\\RichMon\\\\Software\\\\RichMon.jar. (for Version 17 and above)\\n\" +\n \"or ....\\\\MyDocuments\\\\RichMon\\\\Software\\\\RichMonV15.jar (for Version 15)\\n\\n\" +\n \"Please re-start RichMon\";\n\n JOptionPane.showMessageDialog(this,msg,\"Upgrade Complete\",JOptionPane.INFORMATION_MESSAGE);\n System.exit(0);\n }\n catch (IOException ee) {\n displayError(ee,this);\n }\n }\n }\n }\n catch (Exception e) {\n // Do not display an error here, as non vf sites will not have an i drive with this directory\n // displayError(e,this);\n }\n }", "@PUT\n @Consumes({\"application/xml\", \"application/json\"})\n @Path(\"/{version}\")\n public String commit(@PathParam(\"version\") String version) {\n throw new UnsupportedOperationException();\n }", "public void execute() throws MojoExecutionException\n \t{\n \t\tif (projectVersion == null) { throw new MojoExecutionException(\"projectVersion cannot be null.\"); }\n \n \t\tString squirrelsqlVersion = projectVersion;\n\t\tString timestampPattern = \"yyyyMMdd_kkmm\";\n \t\t\n \t\tif (!projectVersion.toLowerCase().endsWith(\"-snapshot\"))\n \t\t{\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(timestampPattern);\n \t\t\ttry\n \t\t\t{\n \t\t\t\tString date = sdf.format(new Date());\n \t\t\t\tsquirrelsqlVersion = \"Snapshot-\" + date;\n \t\t\t}\n \t\t\tcatch (IllegalStateException e)\n \t\t\t{\n\t\t\t\t\n \t\t\t\tlog.error(\"Could not convert date format pattern \" + timestampPattern);\n \t\t\t\tthrow e;\n \t\t\t}\n \t\t}\n \n \t\tProperties props = project.getProperties();\n \t\tprops.put(VERSION_PROPERTY_KEY, squirrelsqlVersion);\n\t\tSystem.setProperty(VERSION_PROPERTY_KEY, squirrelsqlVersion);\n \n \t}", "@Override\n\tpublic File update(File file) {\n\t\treturn (File) this.getSession().merge(file);\n\t}", "private void updateToFile(PQNode node) throws Exception{\n List<PQNode> nodes = retrieveWholeFile(node.getPqIndex());\n int replaceIndex = node.getPqIndex()-bufStart;\n\n nodes.set(replaceIndex,node);\n int fileId = (node.getPqIndex()-1)/ENTRY_BLOCK_SIZE;\n File file = new File(DIRECTORY + getMapFileName(NAME_PATTERN, fileId));\n storeToFile(file,nodes, false);\n }", "void changeFilePath(String newFilePath);", "@Override\n\tpublic void reportUp(MultipartFile file) {\n\t\tProjectRrepUP projectRrepUp = new ProjectRrepUP();\n\t\tList<Project> lists = projectRrepUp.check(file);\n\t\tif (lists != null) {\n\t\t\tfor (Project project : lists) {\n\t\t\t\tprojRrep.save(project);\n\t\t\t}\n\t\t}\n\n\t}", "private void renameFile() {\n ProjectFile file = (ProjectFile) viewer.getSelectedNode();\n String newName = (String)\n JOptionPane.showInputDialog(\n viewer,\n \"Enter the new name of the file:\",\n \"Rename file\",\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n file.toFile().getName()\n );\n \n if (newName != null) {\n Project p = viewer.getCurrentProject();\n \n File oldFile = file.toFile();\n\n Buffer b = jEdit.getBuffer(oldFile.getAbsolutePath());\n if (b != null) {\n jEdit.closeBuffer(viewer.getView(),b);\n }\n \n File newFile = new File(oldFile.getParent() + File.separator + newName);\n if (!oldFile.renameTo(newFile)) {\n JOptionPane.showMessageDialog(\n viewer,\n \"Could not rename selected file!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE\n );\n }\n \n if (b != null) {\n jEdit.openFile(viewer.getView(),newFile.getAbsolutePath());\n }\n \n p.removeFile(file);\n p.importFile(new ProjectFile(newFile.getAbsolutePath()));\n }\n }", "void setNewFile(File file);", "public void saveChanges() throws TransformerException {\n\t\tTransformerFactory transformerFactory = TransformerFactory.newInstance();\r\n\t\tTransformer transformer = transformerFactory.newTransformer();\r\n\t\tDOMSource source = new DOMSource(document);\r\n\t\tStreamResult result = new StreamResult(new File(path));\r\n\t\ttransformer.transform(source, result);\r\n\t}", "void changeFile()\n {\n App app = new App();\n // Loop through the read File\n for (String s : readFile) {\n if (app.containsUtilize(s)) {\n // Changes the first use of utilize with use\n String newTemp = s.replaceFirst(\"utilize\", \"use\");\n // Writes to file\n this.writeFile.add(newTemp);\n } else {\n // not utilize\n this.writeFile.add(s);\n }\n }\n }", "String buildVersion();", "@Override\n abstract public void commitPendingXmlChanges();", "@Override\n public void doReleaseFile(String filePath, MiddleObject midObj) throws ChannelReleaseException {\n }", "public org.hl7.fhir.String addNewVersion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.String target = null;\n target = (org.hl7.fhir.String)get_store().add_element_user(VERSION$4);\n return target;\n }\n }", "public void reload(String filename) throws IOException, RemoteException, Error;", "public void moveCoverageFileToLocalBase() throws IOException {\n\t\tString projectName = DataManager.getProjectVersion();\n\t\tif(projectName.contains(\"_Old\")){\n\t\t\tprojectName = projectName.replace(\"_Old\", \"\");\n\t\t}\n\t\tString origin = ajdtHandler.getFullProjectPath(projectName);\n\t\torigin += slash + \"report\" + slash;\n\t\tString destiny = DataManager.getCurrentPath();\n\t//\tJavaIO.copy(origin, destiny, \"coveragePriorJ.xml\");\n\t\tJavaIO.copyAll(new File(origin), new File(destiny), true);\n\t}", "public int getFileVersion() {\n\n return fileVersion;\n\n }", "public void xsetVersion(org.apache.xmlbeans.XmlInteger version)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_element_user(VERSION$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().add_element_user(VERSION$6);\r\n }\r\n target.set(version);\r\n }\r\n }", "ReleaseFile parse( InputStream is ) throws IOException;", "public String changeFileVersion() throws NoIndexFoundException {\r\n\t\tIrUser user = userService.getUser(userId, false);\r\n\t\tif( !item.getOwner().equals(user) && !user.hasRole(IrRole.ADMIN_ROLE) && \r\n\t\t\t\t!institutionalCollectionPermissionHelper.isInstitutionalCollectionAdmin(user, genericItemId))\r\n\t\t{\r\n\t\t return \"accessDenied\";\r\n\t\t}\r\n\t\tFileVersion fileVersion = repositoryService.getFileVersion(fileVersionId, false);\r\n\t\tItemFile itemFile = item.getItemFile(itemObjectId);\r\n\t\titemFile.setIrFile(fileVersion.getIrFile());\r\n\t\titemFile.setVersionNumber(fileVersion.getVersionNumber());\r\n\r\n\t\titemService.makePersistent(item);\r\n\r\n\t\t// Update personal item index\r\n\t\tPersonalItem personalItem = userPublishingFileSystemService.getPersonalItem(item);\r\n\r\n\t\t// Check if personal item exist for this generic item - if not it means that user is editing the institutional item\r\n\t\t// in which case we don't have to update personal item index\r\n\t\tif (personalItem != null) {\r\n\t\t\tuserWorkspaceIndexProcessingRecordService.save(personalItem.getOwner().getId(), personalItem, \r\n\t \t\t\tindexProcessingTypeService.get(IndexProcessingTypeService.UPDATE));\r\n\t\t}\r\n\t\t\r\n\t\tinstitutionalItemService.markAllInstitutionalItemsForIndexing(genericItemId, indexProcessingTypeService.get(IndexProcessingTypeService.UPDATE));\r\n\t\tinstitutionalItemVersionService.setAllVersionsAsUpdated(user, genericItemId, \"one or more files changed\");\r\n\r\n\t\treturn getFiles();\r\n\t}", "@Override\n\tpublic String reloadXml(String[] args) {\n\t\treturn null;\n\t}", "public void reloadDeployment(Deployment deployment) throws Exception {\n File file = new File(root, \"nxserver/dev.bundles\");\n String content = deployment.getContentAsString();\n IOUtils.writeFile(file, content);\n }", "int uploadEta(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;", "public static String getVersion() {\n\t\t String data = \"\";\n\t\ttry {\n\t\t File myObj = new File(rootdir+\"/version.txt\");\n\t Scanner myReader = new Scanner(myObj);\n\t while (myReader.hasNextLine()) {\n\t data = myReader.nextLine();\n\t break;\n\t }\n\t myReader.close();\n\t return data;\n\t } catch (FileNotFoundException e) {\n\t \tSystem.out.println(\"An error occurred.\");\n\t \te.printStackTrace();\n\t }\n\t\treturn null;\n\t}", "public void setReleaseVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public void printToXML() {\n String fileString = \"outputDisposal.xml\";\n //Creating the path object of the file\n Path filePath = Paths.get(fileString);\n if (Files.notExists(filePath)) {\n try {\n Files.createFile(filePath);\n } catch (IOException e1) {\n\n e1.printStackTrace();\n }\n }\n //Converting the path object to file to use in the FileWriter constructor \n File newFile = filePath.toFile();\n\n /*\n Typical try-with-resources block that features three streams: FileWriter,BufferedWriter and PrintWriter.\n The FileWriter object connects the file tho the stream.\n The BufferedWriter object \n */\n try ( PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)))) {\n for (PickUp pck : pickups) {\n out.print(pck);\n }\n\n } catch (IOException e) {\n System.err.println(e);\n }\n\n }", "int uploadSavi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;", "public void setReleaseFileXrefs (java.util.Set releaseFileXrefs) {\n\t\tthis.releaseFileXrefs = releaseFileXrefs;\n\t}", "private void updateResourceMetaInfo(COElementAbstract element) {\r\n\telement.setId(UUID.uuid());\r\n\telement.setIdParent(null);\r\n\tif (element.isCOContentResourceProxy()) {\r\n\t COContentResourceProxy coResProxy =\r\n\t\t (COContentResourceProxy) element;\r\n\t if (COContentResourceType.DOCUMENT.equals(coResProxy.getResource()\r\n\t\t .getType())) {\r\n\t\tContentResourceEdit newResource;\r\n\t\ttry {\r\n\t\t String uri =\r\n\t\t\t coResProxy.getResource().getProperty(\r\n\t\t\t\t COPropertiesType.IDENTIFIER,\r\n\t\t\t\t COPropertiesType.IDENTIFIER_TYPE_URI);\r\n\t\t newResource = contentHostingService.editResource(uri);\r\n\r\n\t\t newResource.getPropertiesEdit().addProperty(\r\n\t\t\t ResourceProperties.PROP_DESCRIPTION,\r\n\t\t\t coResProxy.getResource().getProperty(\r\n\t\t\t\t COPropertiesType.DESCRIPTION));\r\n\t\t newResource.getPropertiesEdit().addProperty(\r\n\t\t\t ResourceProperties.PROP_COPYRIGHT_CHOICE,\r\n\t\t\t coResProxy.getResource().getProperty(\r\n\t\t\t\t COPropertiesType.LICENSE));\r\n\t/*\r\n\t * SAKAI 11: check for \t ResourceProperties.PROP_TYPE_RESOURCE\r\n\t * \r\n\t * newResource.getPropertiesEdit().addProperty(\r\n\t\t\t ResourceProperties.PROP_TYPE_RESOURCE,\r\n\t\t\t coResProxy.getResource().getProperty(\r\n\t\t\t\t COPropertiesType.ASM_RESOURCE_TYPE));*/\r\n\r\n\t\t contentHostingService.commitResource(newResource,\r\n\t\t\t NotificationService.NOTI_NONE);\r\n\t\t} catch (PermissionException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (IdUnusedException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (TypeException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (InUseException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (OverQuotaException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (ServerOverloadException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t }\r\n\t} else {\r\n\t for (int i = 0; i < element.getChildrens().size(); i++) {\r\n\t\tCOElementAbstract childElement =\r\n\t\t\t(COElementAbstract) element.getChildrens().get(i);\r\n\t\tupdateResourceMetaInfo(childElement);\r\n\t }\r\n\t}\r\n }", "public static String requestAsset(String file) {\n\t\tString newFile = GEN_FOLDER + file;\n\t\tif (assetExists(newFile)){\n\t\t\treturn newFile;\n\t\t}\n\t\tif (!assetExists(file)){\n\t\t\tLog.warn(\"Error requesting asset (maybe its internal):\"+file);\n\t\t\treturn file;\n\t\t}\n\t\t\t\n\t\tif (!CRJavaUtils.isRelease()) {\n\t\t\tif (!assetExists(newFile)) {\n\t\t\t\tcopyAsset(file, newFile);\n\t\t\t}\n\t\t}\n\t\treturn newFile;\n\t}", "public void writeToGameFile(String fileName) {\n\n try {\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n Element game = doc.createElement(\"Game\");\n rootElement.appendChild(game);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(\"001\"));\n game.appendChild(id);\n Element stories = doc.createElement(\"Stories\");\n game.appendChild(stories);\n\n for (int i = 1; i < 10; i++) {\n Element cap1 = doc.createElement(\"story\");\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(\"Mwheels\"));\n Element text = doc.createElement(\"Text\");\n text.appendChild(doc.createTextNode(\"STEP \" + i + \":\\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Donec eu.\"));\n cap1.appendChild(image);\n cap1.appendChild(text);\n stories.appendChild(cap1);\n }\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.GAME_FILE_DIR + fileName + \".xml\");\n StreamResult result = new StreamResult(file);\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }", "public FileCodeGenXML(FileCodeGen fileGen)\n {\n this.fileGen = fileGen;\n }", "@Override\n public void notify(String newFileContent) {\n Repository.getRepositoryInstance().updateStockOrders(newFileContent);\n//end of modifiable zone..................E/a170c128-ca49-4fc4-abdd-43b714481007\n }", "int uploadProjectedTrmm(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;", "public void testPackageRenameWithResource2() throws Exception {\n IPackageFragment fragment = getRoot().createPackageFragment(\"org.test\", true, null);\n StringBuffer buf = new StringBuffer();\n buf.append(\"package org.test;\\n\");\n buf.append(\"public class MyClass {\\n\");\n buf.append(\"}\\n\");\n ICompilationUnit cu1 = fragment.createCompilationUnit(\"MyClass.java\", buf.toString(), true, null);\n setReadOnly(cu1);\n IFile file = ((IFolder) fragment.getResource()).getFile(\"x.properties\");\n byte[] content = \"This is about 'org.test' and more\".getBytes();\n file.create(new ByteArrayInputStream(content), true, null);\n file.refreshLocal(IResource.DEPTH_ONE, null);\n setReadOnly(file);\n RenameJavaElementDescriptor descriptor = RefactoringSignatureDescriptorFactory.createRenameJavaElementDescriptor(IJavaRefactorings.RENAME_PACKAGE);\n descriptor.setJavaElement(fragment);\n descriptor.setNewName(\"org.test2\");\n descriptor.setUpdateReferences(true);\n descriptor.setUpdateQualifiedNames(true);\n descriptor.setFileNamePatterns(\"*.properties\");\n RefactoringStatus status = performRefactoring(descriptor);\n if (status != null)\n assertTrue(status.toString(), status.isOK());\n Collection<IPath> validatedEditPaths = RefactoringTestRepositoryProvider.getValidatedEditPaths(getRoot().getJavaProject().getProject());\n assertEquals(2, validatedEditPaths.size());\n assertTrue(validatedEditPaths.contains(cu1.getPath()));\n assertTrue(validatedEditPaths.contains(file.getFullPath()));\n }", "public void updateDoc (DocFile updatefile) throws ParseException, IOException {\n\n // Check if the file extension is valid\n if (updatefile == null) return;\n if (!isValid(updatefile) || !(FileManager.fileExists(updatefile.getId(), updatefile.getFileType()) || pathExists (updatefile.getPath()))) {\n return;\n }\n\n if (FileManager.fileExists(updatefile.getId(), updatefile.getFileType())) {\n String path = FileManager.download(updatefile.getId(), updatefile.getFileType());\n updatefile.setPath(path);\n }\n\n // remove the file from the index and re-add it\n this.removeDoc(updatefile);\n this.addDoc(updatefile);\n //FileManager.cleanTemporaryDownloads();\n }", "protected abstract void processProjectFile(Path path);", "org.apache.ant.common.model.Project parseXMLBuildFile(java.io.File xmlBuildFile) throws org.apache.ant.common.util.ExecutionException;", "public String processGcfmlFile(IProject pr, IResource resource){\n\t\tResourceSet resourceSet = new ResourceSetImpl();\r\n\t\tString gcfmlOutputFile = \"\";\r\n\t\t// Get the URI of the model file.\r\n\t\t\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tURI fileURI = URI.createPlatformResourceURI(resource.getFullPath().toString(), true);\r\n\r\n\t\t\t// Create a resource for this file.\r\n\t\t\tResource gcfmlResource = resourceSet.getResource(fileURI, true);\r\n\t\t\t\r\n\t\t\t// Initialize DOM\r\n\t\t\tDOMImplementation domi = initializeDom();\r\n\t\t\tEFile gcfmlFile = (EFile) gcfmlResource.getContents().get(0); // Load gcfml contents\r\n\t\t\tEConfigurationProject project = ConfMLCore.getProjectModel(pr);\r\n\t\t\t// Go through gcfml settings\r\n\t\t\tfor (ESetting gcfmlSetting : gcfmlFile.getSetting()) {\r\n\t\t\t\t\r\n\t\t\t\tgcfmlFile.setLocation(fileURI.toPlatformString(true));\r\n\t\t\t\tSettingImplementationCollector.addImplementation(gcfmlSetting.getRef(), gcfmlFile);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tEcorePlugin.INSTANCE.log(e);\r\n\t\t}\r\n\t\treturn gcfmlOutputFile;\r\n\t}", "Object getUptodatefile();", "public void openBuildFile( final File build_file ) {\n if ( build_file == null || !build_file.exists() )\n return ;\n boolean new_file = !build_file.equals( _build_file );\n _build_file = build_file;\n try {\n // constraints for layout\n KappaLayout.Constraints con = KappaLayout.createConstraint();\n con.s = \"w\";\n con.p = 1;\n\n // set up panels\n if ( _center_panel == null ) {\n _center_panel = new DeckPanel();\n AntelopePanel.this.add( _center_panel, BorderLayout.CENTER );\n }\n else {\n _center_panel.removeAll();\n }\n if ( _button_panel == null ) {\n _button_panel = new JPanel( new KappaLayout() );\n _button_panel.setBackground( AntelopePanel.this.getBackground() );\n _button_panel.setBorder( new javax.swing.border.EmptyBorder( 3, 3, 3, 3 ) );\n _scroller = new JScrollPane( _button_panel );\n _scroller.getVerticalScrollBar().setUnitIncrement( 50 );\n _btn_container = new JPanel( new BorderLayout() );\n _btn_container.add( _scroller, BorderLayout.CENTER );\n _btn_container.add( _multi, BorderLayout.SOUTH );\n }\n else {\n _button_panel.removeAll();\n _button_panel.setLayout( new KappaLayout() );\n }\n _center_panel.add( \"panel\", _btn_container );\n\n if ( _sax_panel == null ) {\n _sax_panel = new SAXPanel( _helper );\n }\n // load the 'edit' panel\n boolean isAntBuildFile = _sax_panel.openBuildFile( _build_file );\n _center_panel.add( \"tree\", _sax_panel );\n if ( isAntBuildFile ) {\n if ( _edit_btn.isSelected() )\n _center_panel.last();\n else\n _center_panel.first();\n _run_btn.setEnabled( true );\n _trace_btn.setEnabled( true );\n _edit_btn.setEnabled( true );\n _props_btn.setEnabled( true );\n _options_btn.setEnabled( true );\n }\n else {\n _center_panel.last();\n _run_btn.setEnabled( false );\n _trace_btn.setEnabled( false );\n ///_edit_btn.setEnabled( false );\n _props_btn.setEnabled( false );\n _options_btn.setEnabled( false );\n }\n\n // create a new button panel from the build file\n // make sure the configuration settings are loaded, but first save any\n // previous settings\n try {\n Constants.PREFS.put( Constants.LAST_OPEN_FILE, build_file.getAbsolutePath() );\n }\n catch ( Throwable e ) { // NOPMD\n e.printStackTrace();\n }\n adjustRecentFiles( build_file );\n adjustRecentFilesMenu();\n saveConfigurationSettings();\n\n // create the project and set up the build logger\n if ( isAntBuildFile ) {\n try {\n\n // load the settings for the build file and create an\n // Ant project\n _project = createProject( _build_file );\n loadPropertyFiles();\n\n // set up \"Execute\" button for multiple targets\n if ( new_file ) {\n _multi.setSelected( _settings.getMultipleTargets() );\n }\n if ( _multi.isSelected() ) {\n JButton execute_btn = new JButton( \"Execute\" );\n _button_panel.add( execute_btn, con );\n execute_btn.addActionListener( _execute_listener );\n ++con.y;\n }\n\n // set the label with the name of this project\n String project_name = _project.getProperty( \"ant.project.name\" );\n if ( project_name == null || project_name.equals( \"\" ) )\n project_name = \"<unnamed project>\";\n _project_name.setText( project_name );\n\n // load the targets from the build file, only keep the targets\n // that meet the user's subtarget display settings.\n Map targets = _project.getTargets();\n if ( targets == null || targets.size() == 0 ) {\n //Log.log( \"no targets in project\" );\n return ; /// ??? really ???\n }\n\n ///\n for ( Iterator it = targets.keySet().iterator(); it.hasNext(); ) {\n Log.log( \"target in targets: \" + it.next() );\n }\n\n\n\n // Ant 1.6 has an un-named target to hold project-level tasks, so\n // find it and save it for later.\n _unnamed_target = null;\n Log.log( \"+++++ AntUtils.getAntVersion: \" + AntUtils.getAntVersion() );\n if ( AntUtils.getAntVersion() >= 1.6 ) {\n Iterator iter = targets.keySet().iterator();\n while ( iter.hasNext() ) {\n if ( iter.next().toString().equals( \"\" ) ) {\n _unnamed_target = ( Target ) targets.get( \"\" );\n }\n }\n }\n\n // make buttons by sorting the targets by name or by leaving\n // them in the order they appear in the build file\n if ( _settings.getSortTargets() )\n _targets = new TreeMap( java.text.Collator.getInstance() );\n else\n _targets = new LinkedHashMap();\n Map sax_targets = _sax_panel.getTargets();\n\n ///\n ///for (Iterator ix = sax_targets.keySet().iterator(); ix.hasNext(); ) {\n /// String key = (String)ix.next();\n /// Object value = sax_targets.get(key);\n /// Log.log(\"sax_targets: \" + key + \":\" + value);\n ///}\n ///\n\n Iterator it = sax_targets.keySet().iterator(); ///targets.keySet().iterator();\n while ( it.hasNext() ) {\n // adjust which targets are showing --\n String target_name = ( String ) it.next();\n // Ant 1.6 has an un-named target to hold project-level tasks.\n // It has no name and shouldn't be executed by itself, so\n // don't make a button for it.\n if ( target_name == null || target_name.equals( \"\" ) ) {\n continue;\n }\n\n Target target = ( Target ) targets.get( target_name );\n\n if ( target == null ) {\n SAXTreeNode node = ( SAXTreeNode ) sax_targets.get( target_name );\n if ( node.isImported() ) {\n target_name = node.getAttributeValue( \"name\" );\n target = ( Target ) targets.get( target_name );\n ///\n ///System.out.println(\"+++++ \" + node.getFile());\n ///\n }\n if ( target == null )\n continue;\n }\n String description = target.getDescription();\n if ( _settings.getShowAllTargets() ) {\n _targets.put( target_name, target );\n }\n else {\n if ( target_name.indexOf( '.' ) > 0 && _settings.getShowTargetsWDot() ) {\n // got dots and that's okay, show the target\n _targets.put( target_name, target );\n continue;\n }\n if ( target_name.indexOf( '.' ) > 0 && !_settings.getShowTargetsWDot() ) {\n // got dots and that's not okay\n continue;\n }\n if ( target_name.startsWith( \"-\" ) && _settings.getShowTargetsWDash() ) {\n // got dash and that's okay, show the target\n _targets.put( target_name, target );\n continue;\n }\n if ( target_name.startsWith( \"-\" ) && !_settings.getShowTargetsWDash() ) {\n // got dash and that's not okay\n continue;\n }\n if ( ( description == null || description.equals( \"\" ) ) && _settings.getShowTargetsWODesc() ) {\n // got no desc and that's okay, show the target\n _targets.put( target_name, target );\n continue;\n }\n if ( ( description == null || description.equals( \"\" ) ) && !_settings.getShowTargetsWODesc() ) {\n // got no desc and that's not okay\n continue;\n }\n if ( target_name.indexOf( '.' ) == -1 && description != null ) {\n // got no dots and got desc, show the target\n _targets.put( target_name, target );\n }\n }\n }\n\n if ( _unnamed_target != null ) {\n _targets.put( IMPLICIT_TARGET_NAME, _unnamed_target );\n }\n // make a new button panel and populate it with new buttons\n // for the targets for this project\n _buttons = new ArrayList();\n _execute_targets = new ArrayList();\n it = _targets.keySet().iterator();\n while ( it.hasNext() ) {\n String target_name = ( String ) it.next();\n Target target = ( Target ) _targets.get( target_name );\n if ( target == null ) {\n continue;\n }\n String description = target.getDescription();\n if ( description == null ) {\n description = target_name;\n }\n AbstractButton button;\n if ( _multi.isSelected() ) {\n if ( target_name.equals( IMPLICIT_TARGET_NAME ) )\n continue;\n SAXTreeNode node = ( SAXTreeNode ) sax_targets.get( target_name );\n button = new JCheckBox( );\n StringBuilder btn_text = new StringBuilder(\"<html>\");\n if ( node == null ) {\n btn_text.append( \"<i>\" );\n }\n else {\n if ( node.isPrivate() )\n btn_text.append(\"<i>\");\n if ( node.isDefaultTarget() )\n button.setForeground( GREEN );\n }\n btn_text.append(target_name);\n button.setText( btn_text.toString() );\n button.addActionListener( _cb_listener );\n button.setBackground( _button_panel.getBackground() );\n if ( node != null && node.isDefaultTarget() )\n _default_btn = button;\n }\n else {\n StringBuilder btn_text = new StringBuilder(\"<html>\");\n SAXTreeNode node = ( SAXTreeNode ) sax_targets.get( target_name );\n button = new JButton();\n if ( node == null ) { // this shouldn't happen\n btn_text.append(isPrivate( target ) ? \"<i>\" : \"\");\n }\n else {\n if ( node.isPrivate() )\n btn_text.append(\"<i>\");\n if ( node.isDefaultTarget() )\n button.setForeground( GREEN );\n }\n btn_text.append(target_name);\n button.setText( btn_text.toString() );\n button.addActionListener( _button_listener );\n if ( node != null && node.isDefaultTarget() )\n _default_btn = button;\n }\n button.setActionCommand( target_name );\n button.setToolTipText( description );\n _button_panel.add( button, con );\n _buttons.add( button );\n ++con.y;\n }\n // if new and was multi, restore selected targets\n if ( new_file && _multi.isSelected() ) {\n it = _settings.getMultipleTargetList().iterator();\n while ( it.hasNext() ) {\n String name = ( String ) it.next();\n Iterator itr = _buttons.iterator();\n while ( itr.hasNext() ) {\n AbstractButton btn = ( AbstractButton ) itr.next();\n if ( btn.getActionCommand().equals( name ) )\n btn.doClick();\n }\n }\n }\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n }\n\n /// not sure this is a good idea, we're calling invokeLater\n /// from within an invokeLater\n /* */\n SwingUtilities.invokeLater(\n new Runnable() {\n public void run() {\n _button_panel.validate();\n AntelopePanel.this.validate();\n AntelopePanel.this.repaint();\n }\n }\n );\n /* */\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n fireEvent( _build_file );\n\n }", "private void rewriteRepHeader() {\r\n\t\t// assume that the value of headVersionNum has been \r\n\t\t// incremented before coming here\r\n\t\ttry {\r\n\t\t\t// 1. delete current header\r\n\t\t\tif (client==null) this.initAnnoteaClient();\r\n\t\t\tclient.delete(this.repHeaderLoc);\r\n\t\t\t// 2. post new header\r\n\t\t\tDescription header = new Description();\r\n\t\t\tURI[] headerURI = new URI[1];\r\n\t\t\theaderURI[0] = new URI(this.repositoryURI.toString() + \"#header\");\r\n\t\t\theader.setAnnotates(headerURI);\r\n\t\t\theader.setAuthor(this.repositoryAuthor);\r\n\t\t\theader.setCreated(this.reposityCreatedDate);\r\n\t\t\theader.setAnnotatedEntityDefinition(this.baseOntologyURI.toString());\r\n\t\t\theader.setBody(String.valueOf(this.headVersionNumber));\r\n\t\t\theader.setBodyType(\"text/html\");\r\n\t\t\theader.setAnnotationType(this.annotType);\r\n\t\t\t// 3. update new header location URL\r\n\t\t\trepHeaderLoc = client.post(header);\r\n\t\t\t// 4. update value in versionDescriptions array and update swoopModel' versionRepository\r\n\t\t\tthis.versionDescriptions[0] = header;\r\n\t\t\tswoopModel.updateVersionRepository(this.repositoryURI, versionDescriptions);\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "@Override public void process()\n{\n readLockData(lock_file);\n\n pattern_builder = new DylockPatternBuilder(this);\n processInput();\n\n try {\n IvyXmlWriter xw = new IvyXmlWriter(output_file);\n xw.begin(\"PATTERNS\");\n pattern_builder.outputPatterns(xw);\n xw.end(\"PATTERNS\");\n xw.close();\n }\n catch (IOException e) { }\n}", "@Test\n\tpublic void testIsConsistentModifiedFile() throws Exception {\n\t\tIRodinFile rodinFile = createRodinFile(\"P/x.test\");\n\t\tRodinTestRoot root = (RodinTestRoot) rodinFile.getRoot();\n\t\tcreateNEPositive(root, \"foo\", null);\n\t\tassertFalse(\"modified file should not be consistent\", \n\t\t\t\trodinFile.isConsistent());\n\n\t\t// Should report the same after closing the file.\n\t\trodinFile.close();\n\t\tassertFalse(\"modified file should not be consistent\", \n\t\t\t\trodinFile.isConsistent());\n\t}", "private ngtXMLHandler refreshActualXml()throws boRuntimeException\n {\n String xml = xwfm.getProgram().getAttribute(\"flow\").getValueString();\n return new ngtXMLHandler(xml); \n }", "public void createVersion(final ArtifactVersion version);", "public void setJiveXmlVersion(String value) {\r\n ImportJive.addMessage(\"Jive XML version = \\\"\" + value + \"\\\"\");\r\n }", "public void generateCleanVersion(File src, File target) {\n PreprocessorAPI pp = new PreprocessorAPI(new OnlyExpandMacrosInIfsController());\n pp.setInlineIncludes(false);\n pp.setKeepIncludes(true);\n pp.setKeepDefines(true);\n\n pp.preprocess(src, target);\n }", "void setVersion(String version);", "void setVersion(String version);", "private boolean buildFile(IFile file) {\n \t\t/* \n \t\t * We want to compile each source file in .gf with these commands:\n \t\t * i --retain HelloEng.gf\n \t\t * ss -strip -save\n \t\t * \n \t\t * Shell command: echo \"ss -strip -save\" | gf -retain HelloEng.gf\n \t\t */\n \t\tString filename = file.getName();\n \t\tString buildDir = getBuildDirectory(file);\n \t\t\n \t\tArrayList<String> command = new ArrayList<String>();\n \t\tcommand.add(gfPath);\n \t\tcommand.add(\"--retain\");\n \t\tif (USE_INDIVIDUAL_FOLDERS) {\n \t\t\tcommand.add(String.format(\"..%1$s..%1$s%2$s\", java.io.File.separator, filename));\n \t\t} else {\n \t\t\tcommand.add(\"..\" + java.io.File.separator + filename);\n \t\t}\n \t\t\n \t\ttry {\n \t\t\t// Check the build directory and try to create it\n \t\t\tFile buildDirFile = new File(buildDir);\n \t\t\tif (!buildDirFile.exists()) {\n \t\t\t\tbuildDirFile.mkdir();\n \t\t\t}\n \t\t\t\n \t\t\t// Piece together our GF process\n \t\t\tProcessBuilder b = new ProcessBuilder(command);\n \t\t\tb.directory(buildDirFile);\n //\t\t\tb.redirectErrorStream(true);\n \t\t\tProcess process = b.start();\n \t\t\t\n \t\t\t// Feed it our commands, then quit\n \t\t\tBufferedWriter processInput = new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));\n \t\t\tprocessInput.write(\"ss -strip -save\");\n \t\t\tprocessInput.newLine();\n \t\t\tprocessInput.flush();\n \t\t\tprocessInput.write(\"quit\");\n \t\t\tprocessInput.newLine();\n \t\t\tprocessInput.flush();\n \t\t\t\n //\t\t\tBufferedReader processError = new BufferedReader(new InputStreamReader(process.getErrorStream()));\n //\t\t\tString err_str;\n //\t\t\twhile ((err_str = processError.readLine()) != null) {\n//\t\t\t\tSystem.out.println(err_str);\n //\t\t\t}\n \t\t\tBufferedReader processOutput = new BufferedReader(new InputStreamReader(process.getInputStream()));\n \t\t\tString out_str;\n \t\t\twhile ((out_str = processOutput.readLine()) != null) {\n\t\t\t\tSystem.out.println(out_str);\n \t\t\t}\n \t\t\t\n \t\t\t// Tidy up\n \t\t\tprocessInput.close();\n //\t\t\tprocessOutput.close();\n \t\t\tprocess.waitFor();\n \t\t\treturn true;\n \t\t\t\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t} catch (InterruptedException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\t\n \t\treturn false;\t\t\n \t}", "protected void updateMavenInfo( String path )\r\n throws Exception\r\n {\n String g = null;\r\n String a = null;\r\n String v = null;\r\n String n = null;\r\n n = path.substring( path.lastIndexOf( '/' ) + 1 );\r\n \r\n Gav gav = getGavCalculator().pathToGav( path );\r\n if ( gav != null )\r\n {\r\n g = gav.getGroupId();\r\n a = gav.getArtifactId();\r\n v = gav.getBaseVersion();\r\n }\r\n else\r\n {\r\n logger.warn( \"Unable to parse good GAV values. Path: '\" + path + \"'. GAV: '\" + g + \":\" + a + \":\" + v + \"'\" );\r\n }\r\n \r\n Model model = null;\r\n if ( path.endsWith( \"pom\" ) )\r\n {\r\n Reader reader = ReaderFactory.newXmlReader( retrieveContent( path ) );\r\n \r\n MavenXpp3Reader xpp3 = new MavenXpp3Reader();\r\n \r\n try\r\n {\r\n model = xpp3.read( reader );\r\n \r\n String mg = model.getGroupId() == null ? model.getParent().getGroupId() : model.getGroupId();\r\n String ma = model.getArtifactId();\r\n String mv = model.getVersion() == null ? model.getParent().getVersion() : model.getVersion();\r\n \r\n // if the pom could provide good values\r\n if ( !isInpropriateValue( mg ) )\r\n {\r\n g = mg;\r\n }\r\n if ( !isInpropriateValue( ma ) )\r\n {\r\n a = ma;\r\n }\r\n if ( !isInpropriateValue( mv ) )\r\n {\r\n v = mv;\r\n }\r\n }\r\n catch ( Exception e )\r\n {\r\n // quietly ignore, we still can process this using gav from path\r\n logger.debug( \"Unable to parse POM model from '\" + path + \"'.\", e );\r\n // throw new Exception( \"Unable to parse POM model from '\" + path + \"'.\", e );\r\n }\r\n finally\r\n {\r\n reader.close();\r\n \r\n reader = null;\r\n }\r\n \r\n }\r\n \r\n if ( g == null || a == null || v == null )\r\n {\r\n logger.warn( \"Unable to resolve gav for '\" + path + \"'. g:\" + g + \" a:\" + a + \" v:\" + v );\r\n return;\r\n }\r\n \r\n if ( path.endsWith( \"pom\" ) )\r\n {\r\n // G\r\n if ( model != null && model.getPackaging().equals( \"maven-plugin\" ) )\r\n {\r\n Plugin plugin = new Plugin();\r\n \r\n plugin.setArtifactId( a );\r\n \r\n plugin.setPrefix( getPluginPrefix( a ) );\r\n \r\n if ( !StringUtils.isEmpty( model.getName() ) )\r\n {\r\n plugin.setName( model.getName() );\r\n }\r\n \r\n String gPath = \"/\" + g.replace( '.', '/' );\r\n \r\n if ( gData.get( gPath ) == null )\r\n {\r\n gData.put( gPath, new ArrayList<Plugin>() );\r\n }\r\n \r\n gData.get( gPath ).add( plugin );\r\n }\r\n \r\n // GA\r\n String gaPath = \"/\" + g.replace( '.', '/' ) + \"/\" + a;\r\n \r\n if ( gaData.get( gaPath ) == null )\r\n {\r\n gaData.put( gaPath, new ArrayList<String>() );\r\n }\r\n \r\n gaData.get( gaPath ).add( v );\r\n \r\n }\r\n \r\n // GAV\r\n if ( v.endsWith( \"SNAPSHOT\" ) )\r\n {\r\n String gavPath = \"/\" + g.replace( '.', '/' ) + \"/\" + a + \"/\" + v;\r\n \r\n if ( gavData.get( gavPath ) == null )\r\n {\r\n gavData.put( gavPath, new ArrayList<String>() );\r\n }\r\n \r\n gavData.get( gavPath ).add( n );\r\n }\r\n }", "public void process(PurchaseOrder po)\n {\n File file = new File(path + \"/\" + ORDERS_XML);\n \n try\n {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n InputSource is = new InputSource();\n is.setCharacterStream(new FileReader(file));\n\n Document doc = db.parse(is);\n\n Element root = doc.getDocumentElement();\n Element e = doc.createElement(\"order\");\n\n // Convert the purchase order to an XML format\n String keys[] = {\"orderNum\",\"customerRef\",\"product\",\"quantity\",\"unitPrice\"};\n String values[] = {Integer.toString(po.getOrderNum()), po.getCustomerRef(), po.getProduct().getProductType(), Integer.toString(po.getQuantity()), Float.toString(po.getUnitPrice())};\n \n for(int i=0;i<keys.length;i++)\n {\n Element tmp = doc.createElement(keys[i]);\n tmp.setTextContent(values[i]);\n e.appendChild(tmp);\n }\n \n // Set the status to submitted\n Element status = doc.createElement(\"status\");\n status.setTextContent(\"submitted\");\n e.appendChild(status);\n\n // Set the order total\n Element total = doc.createElement(\"orderTotal\");\n float orderTotal = po.getQuantity() * po.getUnitPrice();\n total.setTextContent(Float.toString(orderTotal));\n e.appendChild(total);\n\n // Write the content all as a new element in the root\n root.appendChild(e);\n TransformerFactory tf = TransformerFactory.newInstance();\n Transformer m = tf.newTransformer();\n DOMSource source = new DOMSource(root);\n StreamResult result = new StreamResult(file);\n m.transform(source, result);\n\n }\n catch(Exception e)\n {\n System.out.println(\"Error: \" + e.getMessage());\n }\n }" ]
[ "0.61416686", "0.5342051", "0.51015365", "0.50924045", "0.5055962", "0.49931535", "0.48619604", "0.4849162", "0.48406455", "0.48245016", "0.48216337", "0.48090902", "0.4769631", "0.47405654", "0.47270042", "0.47156247", "0.4709333", "0.46710783", "0.46686816", "0.4663805", "0.45802653", "0.45710266", "0.4565949", "0.4563457", "0.45621157", "0.45549944", "0.4541175", "0.45300937", "0.45176637", "0.4517337", "0.45013934", "0.4475452", "0.4467242", "0.44577336", "0.4447377", "0.443473", "0.4432761", "0.4428334", "0.44206238", "0.44024152", "0.43949902", "0.4384336", "0.43761447", "0.43718234", "0.43626243", "0.43622315", "0.435814", "0.43530113", "0.4342589", "0.4342473", "0.43352252", "0.43248928", "0.43217367", "0.4321247", "0.42948732", "0.42916203", "0.42886364", "0.42857286", "0.42826182", "0.42792115", "0.42779654", "0.42681858", "0.42666665", "0.4248831", "0.42477903", "0.4243055", "0.4228132", "0.4226661", "0.4224235", "0.4214683", "0.42096955", "0.4209499", "0.42071718", "0.42042017", "0.4201057", "0.41987386", "0.41952488", "0.4192142", "0.41908157", "0.41904962", "0.41863635", "0.41861203", "0.41837108", "0.41828322", "0.4180788", "0.41787776", "0.41779527", "0.4177191", "0.4173349", "0.41716626", "0.41622144", "0.41590405", "0.4139385", "0.41344303", "0.41297922", "0.41295242", "0.41295242", "0.41254088", "0.41238406", "0.41183" ]
0.5400634
1
Performs a mock RESTful call to the backend to retrieve universities
private void performMockSearch(String url, long expectedStatusCode, long expectedSize, String expectedMessageBody) { RestTemplate restTemplate = new RestTemplate(); try { URI uri = new URI(url); ResponseEntity<String> result = restTemplate.getForEntity(uri, String.class); // verify request succeed Assert.assertEquals(expectedStatusCode, result.getStatusCodeValue()); try { JsonNode root = mapper.readTree(result.getBody()); Assert.assertEquals( expectedSize, root.size()); Assert.assertEquals(expectedMessageBody, result.getBody()); } catch(IOException ie) { Assert.fail(ie.getMessage()); } } catch (URISyntaxException e) { Assert.fail(e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getUniversities() {\n ProgressDialog dialog = new ProgressDialog(this, \"Caricamento...\");\n application.databaseCall(\"universities.php\", UNIVERSITY_SELECTION_TAG, dialog);\n }", "@Override\n\tpublic List<UniversityDTO> getUniversities() throws DatabaseException {\n\t\t\n\t\t con =DbUtil.getConnection();\n\t\t\n\t\t srdao=new StudentRegistrationValidationDaoimpl();\n\t\t\n\t\tList<UniversityDTO> list=srdao.getUniversities(con);\n\t\treturn list;\n\t}", "@Test\n public void employeeRetrieveTest() {\n Mockito.when(this.rolService.getRoles()).thenReturn(Arrays.asList(new Rol()));\n Assert.assertNotNull(this.rolController.retrieve(new HttpHeaders()));\n }", "@Test\n public void canGetListOfOrganisations() {\n Long orgid1 = 709814L;\n Long orgid2 = 9206250L;\n List<Long> orgids = new ArrayList<>();\n orgids.add(orgid1);\n orgids.add(orgid2);\n\n String uri = baseURI + \"/organisations/\" + idsAsString(orgids);\n\n OrganisationList organisationList = getFromVertec(uri, OrganisationList.class).getBody();\n\n assertEquals(orgids.size(), organisationList.getOrganisations().size());\n\n Organisation firstOrg = organisationList.getOrganisations().get(0);\n Organisation secOrg = organisationList.getOrganisations().get(1);\n\n assertEquals(orgids.get(0), firstOrg.getVertecId());\n assertEquals(5295L, firstOrg.getOwnerId().longValue());\n assertEquals(null, firstOrg.getParentOrganisation());\n\n assertTrue(\"Sales Team\".equals(firstOrg.getOwnedOnVertecBy()));\n assertTrue(\"Deutsche Telekom\".equals(firstOrg.getName()));\n assertTrue(\"\".equals(firstOrg.getWebsite()));\n //category not set yet\n //nor is business domain\n assertTrue(\"\".equals(firstOrg.getBuildingName()));\n assertTrue(\"\".equals(firstOrg.getStreet_no()));\n assertTrue(\"Hatfield Business Park\".equals(firstOrg.getStreet()));\n assertTrue(\"Hatfield\".equals(firstOrg.getCity()));\n assertTrue(\"United Kingdom\".equals(firstOrg.getCountry()));\n assertTrue(\"AL10 9BW\".equals(firstOrg.getZip()));\n assertTrue(\"2002-01-18T15:47:03\".equals(firstOrg.getCreated()));\n assertTrue(firstOrg.getActive());\n\n assertEquals(orgids.get(1), secOrg.getVertecId());\n }", "@Test\n\tpublic void testGetVehicleModels() throws UnirestException {\n\tHttpResponse<String> response = Unirest.get(\"http://localhost:8080/TrackingVehicle/api/service/vehicleModels\")\n\t\t\t .header(\"Cache-Control\", \"no-cache\")\n\t\t\t .header(\"Postman-Token\", \"5d15aea4-c5ba-4e67-b979-42bd52ae1ccf\")\n\t\t\t .asString();\n}", "@Test\n public void testAllUsersGET() {\n HttpAuthenticationFeature feature = \n HttpAuthenticationFeature.basic(\"admin\", \"admin\");\n Client client = ClientBuilder.newClient();\n URI uri = UriBuilder\n .fromUri(APPLICATION_NAME + APPLICATION_API_VERSION)\n .scheme(\"http\")\n .host(\"localhost\")\n .port(8080)\n .build();\n WebTarget webTarget = client\n .register(feature)\n .target(uri)\n .path(\"user\");\n Response response = webTarget\n .request(APPLICATION_JSON)\n .get();\n assertThat(response.getStatus(), is(200));\n }", "@Test\n public void test_getFacilities() throws Exception {\n ResponseEntity<FacilityResponse> response = restTemplate.getForEntity(\"/v1/facilities\", FacilityResponse.class);\n\n // assert\n Assertions.assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);\n Assertions.assertThat(Collections.singletonList(Objects.requireNonNull(response.getBody()).getFacilities()));\n Assertions.assertThat(response.getBody().getFacilities().get(0).getName()).isEqualTo(\"p1\");\n // response structure: //{\"facilities\":[{\"id\":101,\"name\":\"p1\",\"address\":\"testAddress\"}]}\n }", "public void getOrganisations(HttpServletResponse resp, OrganisationUcc organisationUcc) {\n try {\n List<OrganisationDto> organisations = new ArrayList<>();\n organisations.addAll(organisationUcc.findAllDtos());\n String json = new Genson().serialize(organisations);\n resp.setContentType(\"application/json\");\n resp.getOutputStream().write(json.getBytes());\n } catch (IOException exp) {\n exp.printStackTrace();\n } catch (TransactionErrorException exp1) {\n exp1.printStackTrace();\n } catch (InternalServerException exp2) {\n exp2.printStackTrace();\n }\n }", "@Test\n public void testACreateCity() {\n // do not replace this with a call to setUserContext,\n // the city must be stored using the client/org of the 100 user\n // this ensures that webservice calls will be able to find the city\n // again\n OBContext.setOBContext(\"100\");\n\n // first delete the current cities, as we should start fresh\n final OBCriteria<City> obc = OBDal.getInstance().createCriteria(City.class);\n for (final City c : obc.list()) {\n OBDal.getInstance().remove(c);\n }\n\n final City city = OBProvider.getInstance().get(City.class);\n city.setAreaCode(\"3941\");\n city.setCoordinates(\"00\");\n city.setCoordinates(\"lo\");\n city.setPostalCode(\"postal\");\n city.setName(\"name\");\n city.setCountry(getOneInstance(Country.class));\n city.setRegion(getOneInstance(Region.class));\n OBDal.getInstance().save(city);\n commitTransaction();\n cityId = city.getId();\n }", "@Test\n public void testAllAccountsGET() {\n HttpAuthenticationFeature feature = \n HttpAuthenticationFeature.basic(\"admin\", \"admin\");\n Client client = ClientBuilder.newClient();\n URI uri = UriBuilder\n .fromUri(APPLICATION_NAME + APPLICATION_API_VERSION)\n .scheme(\"http\")\n .host(\"localhost\")\n .port(8080)\n .build();\n WebTarget webTarget = client\n .register(feature)\n .target(uri)\n .path(\"account\");\n Response response = webTarget\n .request(APPLICATION_JSON)\n .get();\n assertThat(response.getStatus(), is(200));\n }", "@GET(\"/cities\")\n Call<List<City>> getCities();", "@Test\n\tpublic void getEntityTest() throws Exception {\n\t\tMap<String, Object> result = Maps.newHashMap();\n\t\tresult.put(\"entities\", entities);\n\t\tMockito.when(queryService.retrieveEntity(any(), any(), any(), any(), any(), anyBoolean(),any(),any(),anyBoolean(),any()))\n\t\t\t\t.thenReturn(Uni.createFrom().item(result));\n\n\t\tExtractableResponse<Response> response = given().accept(AppConstants.NGB_APPLICATION_JSONLD).request()\n\t\t\t\t.contentType(AppConstants.NGB_APPLICATION_JSON).when()\n\t\t\t\t.get(\"/ngsi-ld/v1/entities/urn:ngsi-ld:Vehicle:A101\").then().statusCode(200).extract();\n\t\tassertEquals(200, response.statusCode());\n\t\tMockito.verify(queryService).retrieveEntity(any(), any(), any(), any(), any(), anyBoolean(),any(),any(),anyBoolean(),any());\n\n\t}", "public University getalluniversitybyId(int id) {\n\t\treturn universityrespo.getOne(id);\n\n}", "public void updateUniversidades() {\n\t\t\n\t\tlistaUniversidades = (ArrayList<Universidades>)hibernateController.selectUniversidades();\n\t}", "@Test\n void getCategories() throws Exception {\n CategoryItemResponse categoryItemResponse = generateCategoryItemResponse();\n\n when(categoryService.getAllCategories()).thenReturn(Arrays.asList(categoryItemResponse));\n\n MvcResult mvcResult = mockMvc.perform(get(PATH + \"/get\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(status().is2xxSuccessful())\n .andReturn();\n\n List<CategoryItemResponse> response = objectMapper.readValue(mvcResult.getResponse().getContentAsString(), List.class);\n\n assertNotNull(response);\n assertFalse(response.isEmpty());\n verify(categoryService, times(1)).getAllCategories();\n }", "public List<City> getAll() throws Exception;", "@Test\n\tpublic void testGetAllCompaniesApi() {\n\t\tCompany company = new Company(\"DataSolutions1\", \"Marthahalli1\",\n\t\t\t\t\"Bangalore\", \"India\", \"9880440671\");\n\t\tcompany = companyRepository.save(company);\n\n\t\tCompany company1 = new Company(\"DataSolutions2\", \"Marthahalli2\",\n\t\t\t\t\"Chennai\", \"India\", \"9882440671\");\n\t\tcompany1 = companyRepository.save(company1);\n\n\t\t// Invoke the API\n\t\tCompany[] apiResponse = restTemplate.getForObject(\n\t\t\t\t\"http://localhost:8888/companies/\", Company[].class);\n\n\t\tassertEquals(2, apiResponse.length);\n\n\t\t// Delete the test data created\n\t\tcompanyRepository.delete(company.getCompanyId());\n\t\tcompanyRepository.delete(company1.getCompanyId());\n\t}", "private void populateOrganizations() {\n\t\tMatContext.get().getAdminService().getAllOrganizations(new AsyncCallback<ManageOrganizationSearchModel>() {\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onSuccess(ManageOrganizationSearchModel model) {\n\t\t\t\tList<Result> results = model.getData();\n\t\t\t\tdetailDisplay.populateOrganizations(results);\n\t\t\t\t\n\t\t\t\tMap<String, Result> orgMap = new HashMap<String, Result>();\n\t\t\t\tfor(Result organization : results) {\n\t\t\t\t\torgMap.put(organization.getId(), organization);\n\t\t\t\t}\n\t\t\t\tdetailDisplay.setOrganizationsMap(orgMap);\n\t\t\t\t\n\t\t\t\tsetUserDetailsToView();\n\t\t\t}\n\t\t});\n\t}", "@GetMapping(\"/get/{id}\")\n\tpublic universites getUniversiteById(@PathVariable Long id) {\n\t return IF.getId(id);\n\t}", "@Test\n\tpublic void testGetcompanyDetailsApi() {\n\t\tCompany company = new Company(\"DataSolutions\", \"Marthahalli\",\n\t\t\t\t\"Bangalore\", \"India\", \"9880440671\");\n\t\tcompanyRepository.save(company);\n\n\t\tInteger companyId = company.getCompanyId();\n\n\t\t// Now make a call to the API to get details of the company\n\t\tCompany apiResponse = restTemplate.getForObject(\n\t\t\t\t\"http://localhost:8888/companies/\" + companyId, Company.class);\n\n\t\t// Verify that the data from the API and data saved in the DB are same\n\t\tassertNotNull(apiResponse);\n\t\tassertEquals(company.getName(), apiResponse.getName());\n\t\tassertEquals(company.getCompanyId(), apiResponse.getCompanyId());\n\t\tassertEquals(company.getAdress(), apiResponse.getAdress());\n\t\tassertEquals(company.getCountry(), apiResponse.getCountry());\n\n\t\t// Delete the Test data created\n\t\tcompanyRepository.delete(apiResponse.getCompanyId());\n\t}", "@Test\n void get_unavailableCity_butOnAPI() throws Exception{\n cityDAO.get(\"manchester\");\n assertThat(cityDAO.get(\"manchester\")).isNotNull();\n }", "@Test\n public void testDonorRegionReturns() {\n ResponseEntity response = dataController.getDonorDataByOrgans(\"N\", \"Canterbury\", null, null);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "private void loadCityDetails() {\n\n apiCall = ApiUtils.getCityDetails();\n\n Call<CityData> call = apiCall.getCityDetails();\n\n call.enqueue(new Callback<CityData>() {\n @Override\n public void onResponse(Call<CityData> call, Response<CityData> response) {\n\n //finally we are setting the list to our MutableLiveData\n cityList.setValue(response.body());\n\n }\n\n @Override\n public void onFailure(Call<CityData> call, Throwable t) {\n System.out.println(\"is failed\");\n }\n });\n }", "@Test\r\n public void multipleCities() {\r\n // Create new list of cities\r\n Vector<City> cities = new Vector<City>();\r\n\r\n // Fill in data for each cities country, city info\r\n Country countryA = new Country(\"AAA\", \"TestCountryA\");\r\n City cityA = new City(1, \"TestCity\", \"AAA\", \"DistrictTest\", 11111);\r\n cities.add(cityA);\r\n given(countryRepository.findByCode(\"AAA\")).willReturn(countryA);\r\n\r\n Country countryB = new Country(\"BBB\", \"TestCountryB\");\r\n City cityB = new City(1, \"TestCity\", \"BBB\", \"DistrictTest2\", 22222);\r\n cities.add(cityB);\r\n given(countryRepository.findByCode(\"BBB\")).willReturn(countryB);\r\n\r\n Country countryC = new Country(\"CCC\", \"TestCountryC\");\r\n City cityC = new City(1, \"TestCity\", \"CCC\", \"DistrictTest3\", 33333);\r\n cities.add(cityC);\r\n given(countryRepository.findByCode(\"CCC\")).willReturn(countryC);\r\n\r\n // temp and the same the same for all test cities A,B, and C given the same name \"TestCity\"\r\n given(weatherService.getTempAndTime(\"TestCity\"))\r\n .willReturn(new TempAndTime(310.37, 1593964800, -14400));\r\n\r\n given(cityRepository.findByName(\"TestCity\")).willReturn(cities);\r\n\r\n CityInfo cityResult = cityService.getCityInfo(\"TestCity\");\r\n CityInfo expectedResult =\r\n new CityInfo(1, \"TestCity\", \"AAA\", \"TestCountryA\", \"DistrictTest\", 11111, 99.0, \"12:00 PM\");\r\n\r\n assertThat(cityResult).isEqualTo(expectedResult);\r\n }", "@Test\n\tpublic void testGetAllPatients() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\tHttpEntity<String> entity = new HttpEntity<String>(null, headers);\n\t\tResponseEntity<String> response = restTemplate.exchange(getRootUrl() + \"/homepage\",HttpMethod.GET, entity, String.class);\n\t\tassertEquals(200, response.getStatusCodeValue());\n\t}", "@Test\n\tpublic void testPersonGETMethod() {\n\n\t\tString emailId = \"[email protected]\";\n\t\tPerson person = null;\n\t\tClient client = Client.create();\n\t\tWebResource webResource2 = client\n\t\t\t\t.resource(\"http://localhost:8080/MeetingSchedulerProject/meeting/personservice/\"\n\t\t\t\t\t\t+ emailId);\n\t\tClientResponse response2 = webResource2.accept(\n\t\t\t\tMediaType.APPLICATION_JSON).get(ClientResponse.class);\n\t\tperson = response2.getEntity(Person.class);\n\t\tassertEquals(person.getEmailId(), \"[email protected]\");\n\t}", "@Test\r\n\tpublic void getCompanyNameTest() throws Exception {\r\n\t\tString comapanyName = \"ABC\";\r\n\t\tString uriString = \"http://localhost:8080/sample/url\";\r\n\t\tURI uri = new URI(uriString);\r\n\t\tString json = \"{\\\"query\\\":{\\\"count\\\":1,\\\"created\\\":\\\"2016-11-23T09:55:57Z\\\",\\\"lang\\\":\\\"en-US\\\",\\\"results\\\":{\\\"quote\\\":{\\\"Name\\\":\\\"ABC Corp!\\\"}}}}\";\r\n\t\tString expected = \"ABC Corp!\";\r\n\r\n\t\tPowerMockito.whenNew(RestTemplate.class).withNoArguments().thenReturn(restTemplate);\r\n\t\tPowerMockito.doReturn(json).when(restTemplate).getForObject(uri, String.class);\r\n\t\tMockito.when(uriGeneratorService.getStockRestURI(comapanyName)).thenReturn(uri);\r\n\t\tString actual = companyDetailsServiceImpl.getCompanyName(comapanyName);\r\n\r\n\t\tAssert.assertEquals(expected, actual);\r\n\t}", "@Test\n public void testGetAllLocations() throws Exception {\n\n mockMvc.perform(get(URL_PREFIX + \"/all\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(contentType))\n .andExpect(jsonPath(\"$\", hasSize(DB_LOCATION_NUMBER)))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(DB_LOCATION_ID.intValue())))\n .andExpect(jsonPath(\"$.[*].city\").value(hasItem(DB_LOCATION_CITY)))\n .andExpect(jsonPath(\"$.[*].cityArea\").value(hasItem(DB_LOCATION_CITY_AREA)))\n .andExpect(jsonPath(\"$.[*].street\").value(hasItem(DB_LOCATION_STREET)))\n .andExpect(jsonPath(\"$.[*].streetNumber\").value(hasItem(DB_LOCATION_STREET_NUMBER)))\n .andExpect(jsonPath(\"$.[*].state\").value(hasItem(DB_LOCATION_STATE)));\n }", "@Test\n public void given_devEnvironmentAndListStudent_when_callEndpointFindAll_then_returnListStudentAndStatus200() throws Exception {\n\n when(studentRepo.findAll()).thenReturn(STUDENT_LIST);\n\n RequestBuilder request = MockMvcRequestBuilders\n .get(\"/students\")\n .accept(MediaType.APPLICATION_JSON);\n\n mockMvc.perform(request)\n .andExpect(status().isOk())\n .andExpect(content().json(gson.toJson(STUDENT_LIST),true))\n .andReturn();\n }", "@Test\n void shouldReturnAllPersonsValidatingDeserializedModel() throws Exception {\n when(personDao.findAll()).thenReturn(Arrays.asList(testPersons()));\n\n MvcResult mvcResult = mockMvc.perform(get(\"/api/person\"))\n .andExpect(status().isOk())\n .andReturn();\n\n // note: we use a TypeReference to inform Jackson about the List's generic type\n SafeList<Person> persons = getObjectMapper().readValue(mvcResult.getResponse().getContentAsString(), new TypeReference<SafeList<Person>>() {});\n\n assertThat(persons.getItems()).isNotNull();\n assertThat(persons.getItems())\n .hasSize(3)\n .contains(testPersons());\n }", "@Test\r\n\tpublic void getAllIncidents() {\n\t\tRestAssured.baseURI = \"https://dev49243.service-now.com/api/now/table/incident\";\r\n\t\t\r\n\t\t// Step 2: Authentication (basic)\r\n\t\tRestAssured.authentication = RestAssured.basic(\"admin\", \"Tuna@123\");\r\n\t\t\r\n\t\t// Step 3: Request type - Get -> Response\r\n\t\tResponse response = RestAssured.get();\r\n\t\t\r\n\t\t// Step 4: Validate (Response -> Status Code : 200)\r\n\t\tSystem.out.println(response.getStatusCode());\r\n\t\t\r\n\t\t// Print the response time as well \r\n\t\t\r\n\t\t// Check what is the response format\r\n\t\tSystem.out.println(response.getContentType());\r\n\t\t\r\n\t\t// print the response\r\n\t\tresponse.prettyPrint();\r\n\t\t\r\n\t}", "@Test\n void shouldReturnAllPersonsValidatingJsonResponse() throws Exception {\n when(personDao.findAll()).thenReturn(Arrays.asList(testPersons()));\n\n mockMvc.perform(get(\"/api/person\")).andDo(print())\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$.items[0].firstName\", is(\"Jan\")))\n .andExpect(jsonPath(\"$.items[0].lastName\", is(\"Janssen\")))\n .andExpect(jsonPath(\"$.items[1].firstName\", is(\"Pieter\")))\n .andExpect(jsonPath(\"$.items[1].lastName\", is(\"Pietersen\")))\n .andExpect(jsonPath(\"$.items[2].firstName\", is(\"Erik\")))\n .andExpect(jsonPath(\"$.items[2].lastName\", is(\"Eriksen\")))\n ;\n }", "@Test\r\n\tpublic void loadTeams() {\r\n\t\tSet<Team> response = null;\r\n\t\tresponse = service.loadTeams();\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: loadTeams\r\n\t}", "@Test\n\tpublic void testShowAllUsers() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\tHttpEntity<String> entity = new HttpEntity<String>(null, headers);\n\t\tResponseEntity<String> response = restTemplate.exchange(getRootUrl() + \"/show-users\",HttpMethod.GET, entity, String.class);\n\t\tassertEquals(200, response.getStatusCodeValue());\n\t}", "private CityResponse mockCityResponse() {\n List<String> cityLocales = new ArrayList<String>(Collections.singleton(\"en\"));\n Map<String, String> cityNames = new HashMap<>();\n cityNames.put(\"en\", \"New York\");\n City city = new City(cityLocales, 1, 1, cityNames);\n\n List<String> countryNames = new ArrayList<>(Collections.singleton(\"United States\"));\n Country country = new Country(countryNames, 1, 1, \"US\", new HashMap());\n\n Location location = new Location(1, 1, 40.760498D, -73.9933D, 501, 1, \"EST\");\n\n Postal postal = new Postal(\"10036\", 1);\n\n return new CityResponse(city, new Continent(), country, location, new MaxMind(), postal,\n country, new RepresentedCountry(), new ArrayList<>(0),\n new Traits());\n }", "@Test\n public void test_getSupervisors_1() throws Exception {\n clearDB();\n\n List<User> res = instance.getSupervisors();\n\n assertEquals(\"'getSupervisors' should be correct.\", 0, res.size());\n }", "@Test\n\tpublic void testGetEmailResidentsCityGiven_whenCityIsCulver_thenGetAllEmailsOfResidentsCulverCity() {\n\t\t// GIVEN\n\t\tString city = \"Culver\";\n\t\twhen(personDAOMock.getPersons()).thenReturn(mockList);\n\t\t// WHEN\n\t\tList<String> listEmailResidentsCityCulver = personServiceTest.getEmailResidents(city);\n\t\t// THEN\n\t\t// the list obtained contain 4 elements\n\t\tverify(personDAOMock, times(1)).getPersons();\n\t\tassertEquals(4, listEmailResidentsCityCulver.size());\n\t\tassertEquals(\"[email protected]\", listEmailResidentsCityCulver.get(0));\n\t\tassertEquals(\"[email protected]\", listEmailResidentsCityCulver.get(3));\n\t}", "public String university() {\n return faker.fakeValuesService().resolve(\"educator.name\", this, faker) \n + \" \" \n + faker.fakeValuesService().resolve(\"educator.tertiary.type\", this, faker);\n }", "@Test\r\n public void testListRegistrations1() throws Throwable {\r\n // Parameters for the API call\r\n Double limit = 10d;\r\n Double offset = 20d;\r\n Options8Enum options = null;\r\n\r\n // Set callback and perform API call\r\n List<ListRegistrationsResponse> result = null;\r\n controller.setHttpCallBack(httpResponse);\r\n try {\r\n result = controller.listRegistrations(limit, offset, options);\r\n } catch(APIException e) {};\r\n\r\n // Test whether the response is null\r\n assertNotNull(\"Response is null\", \r\n httpResponse.getResponse());\r\n // Test response code\r\n assertEquals(\"Status is not 200\", \r\n 200, httpResponse.getResponse().getStatusCode());\r\n\r\n // Test whether the captured response is as we expected\r\n assertNotNull(\"Result does not exist\", \r\n result);\r\n assertTrue(\"Response body does not match in keys\", TestHelper.isArrayOfJsonObjectsProperSubsetOf(\r\n \"[ { \\\"id\\\": \\\"abcdefg\\\", \\\"description\\\": \\\"Example Context Source\\\", \\\"dataProvided\\\": { \\\"entities\\\": [ { \\\"id\\\": \\\"Bcn_Welt\\\", \\\"type\\\": \\\"Room\\\" } ], \\\"attrs\\\": [ \\\"temperature\\\" ] }, \\\"provider\\\": { \\\"http\\\": { \\\"url\\\": \\\"http://contextsource.example.org\\\" }, \\\"supportedForwardingMode\\\": \\\"all\\\" }, \\\"expires\\\": \\\"2017-10-31T12:00:00\\\", \\\"status\\\": \\\"active\\\", \\\"forwardingInformation\\\": { \\\"timesSent\\\": 12, \\\"lastForwarding\\\": \\\"2017-10-06T16:00:00.00Z\\\", \\\"lastSuccess\\\": \\\"2017-10-06T16:00:00.00Z\\\", \\\"lastFailure\\\": \\\"2017-10-05T16:00:00.00Z\\\" } }]\", \r\n TestHelper.convertStreamToString(httpResponse.getResponse().getRawBody()), \r\n false, true, false));\r\n }", "@Test\n public void testUserGET() {\n Response response = webTarget\n .path(\"user/1\")\n .request(APPLICATION_JSON)\n .get();\n User u = response.readEntity(User.class);\n assertThat(response.getStatus(), is(200));\n assertEquals(\"One\", u.getName());\n }", "@Test\n public void testGetUserInfoResponse() {\n // TODO: test GetUserInfoResponse\n }", "@Test\n public void getAllPersons() {\n List<Person> persons = personService.getAllPersons();\n\n //Assert\n assertEquals(\"Fulano\", persons.get(0).getFirstName());\n assertEquals(\"John\", persons.get(1).getFirstName());\n }", "@Test\n\tpublic void ListAllCountry() {\n\t\tRequestSpecification requestSpecification = new base().getRequestSpecification();\n\t\tString json = given().get(Endpoint.GET_COUNTRY).then().extract().asString();\n\t\tJsonPath jp = new JsonPath(json);\n\t\tList<String> list = jp.get(\"name\");\n\t\tSystem.out.println(\"Country's are -------\" + list.get(0));\n\t}", "@Test\n public void getretrieveAllOffersTest() throws IOException {\n\n ObjectMapper mapper = new ObjectMapper();\n RetrieveAllOffersgetResponse response = api.getretrieveAllOffers( null, null);\n\n String json = mapper.writerWithDefaultPrettyPrinter().writeValueAsString(response);\n System.out.println(json);\n }", "@BeforeClass\n public static void setup() throws JsonIOException, JsonSyntaxException, FileNotFoundException {\n Fixtures.deleteDatabase();\n\n JsonElement jsonUsers = new JsonParser().parse(new FileReader(new File(\"test/services/UserServiceTestUsers.json\")));\n JsonElement jsonRepo1 = new JsonParser().parse(new FileReader(new File(\"test/services/UserServiceTestRepo1.json\")));\n JsonElement jsonRepo2 = new JsonParser().parse(new FileReader(new File(\"test/services/UserServiceTestRepo2.json\")));\n\n WebServiceWrapper ws = mock(WebServiceWrapper.class);\n HttpResponse respUsers = mock(HttpResponse.class);\n when(respUsers.getJson()).thenReturn(jsonUsers);\n when(ws.get(\"www.test.com/orgs/test/members\")).thenReturn(respUsers);\n\n HttpResponse respRepo1 = mock(HttpResponse.class);\n when(respRepo1.getJson()).thenReturn(jsonRepo1);\n when(ws.get(\"bobRepoUrl\")).thenReturn(respRepo1);\n HttpResponse respRepo2 = mock(HttpResponse.class);\n when(respRepo2.getJson()).thenReturn(jsonRepo2);\n when(ws.get(\"aliceRepoUrl\")).thenReturn(respRepo2);\n\n // Run\n new GithubUserRetriever(ws, \"www.test.com\", null , null).getUsersWithRepos(\"test\");\n }", "@Test\n public void testGetCitiesList() {\n System.out.println(\"getCitiesList\");\n Set<City> expResult = new HashSet<>();\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "@Test\n void testHasCity() {\n CityList cityList = mockCityList();\n assertTrue(cityList.hasCity(mockCity()));\n }", "@Test\n @DisplayName(\"Get added test organization\")\n void getAddedOrganization(VertxTestContext testContext) {\n registrationService\n .listOrganization(testContext.succeeding(response -> testContext.verify(() -> {\n assertEquals(SUCC_TITLE_ORG_READ, response.getString(\"title\"));\n assertEquals(URN_SUCCESS, response.getString(\"type\"));\n\n @SuppressWarnings(\"unchecked\")\n List<JsonObject> list = response.getJsonArray(\"results\").getList();\n\n Boolean exists = list.stream().anyMatch(obj -> {\n return (obj.getString(\"name\").equals(name)\n && obj.getString(\"id\").equals(orgIdFut.result().toString())\n && obj.getString(\"url\").equals(url));\n });\n\n assertTrue(exists);\n testContext.completeNow();\n })));\n }", "@Test\n\tpublic void givenVendors_whenGetVendors_thenReturnJsonArray()\n\t throws Exception {\n\t \n\t Vendor vendor1 = new Vendor(\"Rackspace\",\"Produts\",\"18/09/2011\",\"10/05/2013\",25,1000.00,\"Inactive\",\"Bangalore\");\n\t Vendor vendor2 = new Vendor(\"Infoglen\",\"Services\",\"18/09/2011\",\"10/05/2013\",25,1000.00,\"Inactive\",\"Bangalore\");\n\t \n\t ArrayList<Vendor> allVendors = new ArrayList<Vendor>();\n\t allVendors.add(vendor1);\n\t allVendors.add(vendor2);\n\t \n\t when(vendorService.findAll()).thenReturn((ArrayList<Vendor>) allVendors);\n\t \n\t mvc.perform(get(\"/vendor/getAllVendors\")\n\t .contentType(MediaType.APPLICATION_JSON))\n\t .andExpect(status().isOk())\n\t .andExpect(jsonPath(\"$\", hasSize(2)))\n\t .andExpect(jsonPath(\"$[1].name\", is(vendor2.getName())));\n\t \n}", "@Test\n\tvoid testLondonUsersDataPresent() {\n\t\tassertNotNull(londonUsersList);\n\t\tassertTrue(londonUsersList.size() == 6);\n\t}", "@Test\n\t\tpublic void testGetAllOrganization() {\n\t\t\tfor (int i =0; i<10;i++){\n\t\t\t assertEquals(wraRestServer.listOrganization().get(i).getSiret(),organizationDao.getAll().get(i).getSiret());\n\t\t}\n\t\t\n\t\n\t}", "@Test\r\n\tpublic void givenResourceUrl_whenSendGetForRequestEntity_thenStatusOk() throws IOException {\n\r\n\t\tfinal Logger log = LoggerFactory.getLogger(UserDataRestTemplateTest.class);\r\n\r\n\t\tRestTemplate restTemplate = new RestTemplate();\r\n\t\tMap<String, String> response = (Map<String, String>) restTemplate\r\n\t\t\t\t.getForObject(\"http://services.groupkt.com/country/get/iso2code/IN\", Map.class);\r\n\t\tlog.info(\"==== RESTful API Response using Spring RESTTemplate START =======\");\r\n\t\tlog.info(response.toString());\r\n\t\tlog.info(\"==== RESTful API Response using Spring RESTTemplate END =======\");\r\n\r\n\t}", "@Test\n\t@WithMockUser(username=\"admin\",roles={\"ADMIN\"})\n\tpublic void getAllEmployees_AuthorisedUser_ReturnsJsonOfEmployees() throws Exception\n\t{\n\t\tString result = this.mockMvc.perform(MockMvcRequestBuilders\n\t\t\t .get(\"/api/employees\")\n\t\t\t .contentType(MediaType.APPLICATION_JSON))\n\t\t\t\t .andDo(MockMvcResultHandlers.print())\n\t\t\t\t .andExpect(MockMvcResultMatchers.status().isOk())\n\t\t\t\t .andReturn()\n\t\t\t\t .getResponse()\n\t\t\t\t .getContentAsString();\n\t\t\n\t\t//Assert\n\t\tJSONObject json = new JSONObject(result);\t\n\t\t//the json returns in an object called \"_embedded\", which then has an array of accounts\n\t\tJSONObject embedded = (JSONObject) json.get(\"_embedded\");\n\t\tJSONArray employees = embedded.getJSONArray(\"employees\");\n\t\tassertTrue(employees.length() > 0);\n\t\t\n\t}", "@Test\n public void testReceiverAgeEndpointRegion() {\n ResponseEntity response = dataController.getReceiverDataAge(null, null, \"Canterbury\");\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "@Test\n public void validPredictionWeatherConsultationUsingACityWithDataInTheDB() {\n ArrayList predictionWeatherList = new ArrayList<PredictionWeather>();\n for (int i = 0; i < 3; i++) {\n predictionWeatherList.add(new PredictionWeather());\n }\n\n when(store.giveMeTheListOfPredictionWeather(\"Castellón de la Plana\")).thenReturn(predictionWeatherList);\n\n predictionWeatherUsingCity.giveMeThePredictionToThisCity(\"Castellón de la Plana\");\n\n verify(store, times(1)).removeOldPredicionWeathers();\n verify(store, times(1)).giveMeTheListOfPredictionWeather(\"Castellón de la Plana\");\n verify(weatherService, times(0)).giveMeTheListOfPredictionsUsingACity(\"Castellón de la Plana\");\n verify(store, times(0)).addPredictionWeatherToTheDataBase(any(PredictionWeather.class));\n\n }", "@WithMockUser(username = \"employee\", roles = {\"EMPLOYEE\", \"CUSTOMERS\"})\n @Test\n void getTransactionsShouldReturnAJsonArray() throws Exception {\n when(transactionService.getAllTransactions(0, 100)).thenReturn(List.of(transaction));\n this.mvc.perform(\n get(\"/transactions\")\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(\n status().isOk());\n }", "@Test\r\n\tpublic void test_getAllEmployees() {\r\n\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)//\r\n\t\t\t\t// .pathParam(\"page\", \"0\")//\r\n\t\t\t\t.when()//\r\n\t\t\t\t.get(\"/api/v1/employees\")//\r\n\t\t\t\t.then()//\r\n\t\t\t\t.log()//\r\n\t\t\t\t.body()//\r\n\t\t\t\t.statusCode(200)//\r\n\t\t\t\t.body(\"number\", equalTo(0))//\r\n\t\t\t\t.body(\"content.size()\", equalTo(10));\r\n\r\n\t}", "@RequestMapping(value = \"/cityDetails\", method = RequestMethod.GET)\n public ResponseEntity<City> getCityDetails()\n {\n logger.info(\"Calling getCityDetails() method\");\n if(city.getCity() != null)\n {\n for (String item: city.getCity()\n ) {\n logger.debug(\"This are the cities \" + item);\n }\n }\n\n return new ResponseEntity<City>(city, HttpStatus.OK);\n }", "@Test\n public void given_devEnvironmentAndEmptyListStudent_when_callEndpointFindAll_then_returnEmptyListStudentAndStatus200() throws Exception {\n\n List<Student> studentList = new ArrayList<>();\n\n when(studentRepo.findAll()).thenReturn(studentList);\n\n RequestBuilder request = MockMvcRequestBuilders\n .get(\"/students\")\n .accept(MediaType.APPLICATION_JSON);\n\n mockMvc.perform(request)\n .andExpect(status().isOk())\n .andExpect(content().json(gson.toJson(studentList)))\n .andReturn();\n }", "@Test\n public void testGetTravel() throws Exception{\n mockMVC.perform(get(\"/user/1/travel/1\")\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(TestUtil.APPLICATION_JSON_UTF8))\n .andExpect(jsonPath(\"$.id\", is(\"1\")))\n .andExpect(jsonPath(\"$.name\", is(\"travel1\")))\n .andExpect(jsonPath(\"$.time_interval[0]\", is(\"10:15:30\")))\n .andExpect(jsonPath(\"$.time_interval[1]\", is(\"12:15:30\")))\n .andExpect(jsonPath(\"$.is_arrival_time\", is(false)))\n .andExpect(jsonPath(\"$.recurring[0]\", is(false)))\n .andExpect(jsonPath(\"$.recurring[1]\", is(false)))\n .andExpect(jsonPath(\"$.recurring[2]\", is(false)))\n .andExpect(jsonPath(\"$.recurring[3]\", is(false)))\n .andExpect(jsonPath(\"$.recurring[4]\", is(false)))\n .andExpect(jsonPath(\"$.recurring[5]\", is(false)))\n .andExpect(jsonPath(\"$.recurring[6]\", is(false)))\n .andExpect(jsonPath(\"$.startpoint.street\", is(\"teststreet\")))\n .andExpect(jsonPath(\"$.startpoint.housenumber\", is(\"1\")))\n .andExpect(jsonPath(\"$.startpoint.city\", is(\"testcity\")))\n .andExpect(jsonPath(\"$.startpoint.country\", is(\"BE\")))\n .andExpect(jsonPath(\"$.startpoint.postal_code\", is(\"1234\")))\n .andExpect(jsonPath(\"$.startpoint.coordinates.lat\", is(50.0)))\n .andExpect(jsonPath(\"$.startpoint.coordinates.lon\", is(60.0)))\n .andExpect(jsonPath(\"$.endpoint.street\", is(\"teststreet\")))\n .andExpect(jsonPath(\"$.endpoint.housenumber\", is(\"5\")))\n .andExpect(jsonPath(\"$.endpoint.city\", is(\"testcity\")))\n .andExpect(jsonPath(\"$.endpoint.country\", is(\"BE\")))\n .andExpect(jsonPath(\"$.endpoint.postal_code\", is(\"1234\")))\n .andExpect(jsonPath(\"$.endpoint.coordinates.lat\", is(55.0)))\n .andExpect(jsonPath(\"$.endpoint.coordinates.lon\", is(65.0)));\n \n verify(databaseMock, times(1)).getUser(anyInt());\n verifyNoMoreInteractions(databaseMock);\n }", "@Test\n public void testReceiverDonorEndpointCombo() {\n ResponseEntity response = dataController.getDonorDataRegion(\"F\", \"B+\", null);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "ResponseEntity<Response> users();", "@Test\n public void testSetCitiesList() {\n System.out.println(\"setCitiesList\");\n Set<City> citiesList = new HashSet<>();\n\n sn10.setCitiesList(citiesList);\n assertEquals(citiesList, sn10.getCitiesList());\n }", "@GetMapping(\"/all\")\n public List<CityInfo> getAll(){\n return service.getAll();\n }", "@Test\n public void registerInvalidCity() throws Exception {\n user.setCityId(-100);\n // when:\n MockHttpServletResponse response\n = this.mockMvc.perform(post(\"/user\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(jacksonTester.write(user).getJson()))\n .andReturn().getResponse();\n\n // then:\n assertThat(response.getStatus()).as(\"Checking HTTP status\")\n .isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR.value());\n\n // checking links:\n JSONObject responseJson = new JSONObject(response.getContentAsString());\n Assert.assertTrue(\"Checking _links is there\", responseJson.has(\"_links\"));\n JSONObject linksJson = responseJson.getJSONObject(\"_links\");\n Assert.assertTrue(\"Checking home is there\", linksJson.has(\"home\"));\n }", "@Test\n public void testReceiverDonorEndpointAge() {\n ResponseEntity response = dataController.getDonorDataRegion(null, null, \"20\");\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "@Test\npublic void verifyRegionName() {\n\t\tgiven().accept(ContentType.JSON).\n\t\twhen().get(ConfigurationReader.getProperty(\"hrapp.baseurl\")+\"/regions\")\n\t\t.then().assertThat().statusCode(200)\n\t\t.and().contentType(ContentType.JSON)\n\t\t.and().assertThat().body(\"items[1].region_name\", equalTo(\"Americas\"));\n}", "@Test\n public void testReceiverAgeEndpointCombo() {\n ResponseEntity response = dataController.getReceiverDataAge(\"M\", null, \"Canterbury\");\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "public void getCities(Integer province_id) {\n App.getInstance().getApiInterface().getCities(province_id,Constants.APPJSON).enqueue(new Callback<List<CityList>>() {\n @Override\n public void onResponse(Call<List<CityList>> call, final Response<List<CityList>> response) {\n if (response.isSuccessful()) {\n final Realm realm = Realm.getDefaultInstance();\n realm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n realm.delete(CityList.class);\n realm.copyToRealmOrUpdate(response.body());\n }\n }, new Realm.Transaction.OnSuccess() {\n @Override\n public void onSuccess() {\n realm.close();\n }\n }, new Realm.Transaction.OnError() {\n @Override\n public void onError(Throwable error) {\n realm.close();\n error.printStackTrace();\n getView().showAlert(error.getLocalizedMessage());\n }\n });\n } else {\n getView().showAlert(\"Server Error\");\n }\n }\n\n @Override\n public void onFailure(Call<List<CityList>> call, Throwable t) {\n t.printStackTrace();\n getView().showAlert(t.getLocalizedMessage());\n }\n });\n }", "@Test\n public void company() {\n System.out.println(client.companyName(1));\n }", "@Test\n public void test_getSupervisors_2() throws Exception {\n User user1 = createUser(1, false);\n createUser(2, false);\n createUser(3, true);\n\n List<User> res = instance.getSupervisors();\n\n assertEquals(\"'getSupervisors' should be correct.\", 1, res.size());\n\n User entity1 = res.get(0);\n\n assertEquals(\"'getSupervisors' should be correct.\", user1.getUsername(), entity1.getUsername());\n assertEquals(\"'getSupervisors' should be correct.\", user1.getDefaultTab(), entity1.getDefaultTab());\n assertEquals(\"'getSupervisors' should be correct.\", user1.getNetworkId(), entity1.getNetworkId());\n assertEquals(\"'getSupervisors' should be correct.\", user1.getRole().getId(), entity1.getRole().getId());\n assertEquals(\"'getSupervisors' should be correct.\", user1.getFirstName(), entity1.getFirstName());\n assertEquals(\"'getSupervisors' should be correct.\", user1.getLastName(), entity1.getLastName());\n assertEquals(\"'getSupervisors' should be correct.\", user1.getEmail(), entity1.getEmail());\n assertEquals(\"'getSupervisors' should be correct.\", user1.getTelephone(), entity1.getTelephone());\n assertEquals(\"'getSupervisors' should be correct.\", user1.getStatus().getId(), entity1.getStatus().getId());\n }", "@org.junit.Test\n\tpublic void allStatesOfCountry() {\n\t\tResponse response = given().when().get(\"http://services.groupkt.com/state/get/IND/all\");\n\n\t\tresponse.prettyPrint();\n\n\t\t/* 1. verify status code */\n\t\tresponse.then().statusCode(200);\n\n\t\t/* 2. verify countryCode */\n//\t\tresponse.then().body(\"RestResponse.result.country\", equalTo(\"IND\")).body(\"RestResponse.result.name\",\n//\t\t\t\tequalTo(\"Karnataka\"));\n//\t\t\n//\t\tresponse.then().body(\"RestResponse.result.name\", hasItems(\"Andhra Pradesh,Arunachal Pradesh\"));\n\t\t\n\t\t\n\t\tresponse.then().assertThat().body(\"RestResponse.result.name\", hasValue(\"Jammu and Kashmir\"));\n\t\t\n//\t\t\n//\t\tJsonPath jsonPath = new JsonPath(response.toString()).setRoot(\"RestResponse\");\n//\t\tJsonObject lottoId = jsonPath.getJsonObject(\"result\");\n//\t\tList<Integer> winnerIds = jsonPath.get(\"result.id\");\n\n\t}", "@Test\n @Transactional\n public void getAllContactsWithInMultiAddressBookUnique() throws Exception {\n restAddressBookMockMvc.perform(\n get(\"/api/address-books/{id}/contacts\", \"1,2\").param(\"unique\", \"true\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[3]\").exists())\n .andExpect(jsonPath(\"$.[4]\").doesNotExist())\n ;\n }", "@Test\n public void testAddTravel_InvalidCountryCodeExceptionEndpoint() throws Exception {\n dto.getEndpoint().setCountry(\"DTO\");\n \n mockMVC.perform(post(\"/user/1/travel\")\n .contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(dto))\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isInternalServerError());\n \n verify(databaseMock, times(1)).getUser(anyInt());\n verifyNoMoreInteractions(databaseMock);\n }", "@Test\n @OperateOnDeployment(\"server\")\n public void shouldGetResourceByQuery() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(200).and().expect().body(\"size\",\n equalTo(1)).and().expect().body(\"items.item.name\", hasItem(\"Technologies\")).and().expect().body(\"items.item.sort\",\n hasItem(20)).when().get(getBaseTestUrl() + \"/1/categories/get/json/query;catName=Technologies?expand=\" +\n \"{\\\"branches\\\":[{\\\"trunk\\\":{\\\"name\\\":\\\"categories\\\"}}]})\");\n }", "@Test\n public void canSetOwnedOnVertecBy() {\n Long salesTeamOwnedOrgId = 709814L;\n Long nonZUKOrg = 1359817L; //actually exists\n Long subTeamOrg = 15158065L; //actually exists\n List<Long> orgids = new ArrayList<>();\n\n orgids.add(salesTeamOwnedOrgId);\n orgids.add(subTeamOrg);\n orgids.add(TESTVertecOrganisation2);\n orgids.add(nonZUKOrg);\n\n String idsAsString = \"\";\n for (int i = 0; i < orgids.size(); i++) {\n if (i < orgids.size() - 1) {\n idsAsString += orgids.get(i) + \",\";\n } else {\n idsAsString += orgids.get(i);\n }\n }\n\n String uri = baseURI + \"/organisations/\" + idsAsString;\n\n OrganisationList organisationList = getFromVertec(uri, OrganisationList.class).getBody();\n List<Organisation> orgs = organisationList.getOrganisations();\n\n System.out.println(orgs.get(0).getOwnedOnVertecBy());\n System.out.println(orgs.get(1).getOwnedOnVertecBy());\n System.out.println(orgs.get(2).getOwnedOnVertecBy());\n System.out.println(orgs.get(3).getOwnedOnVertecBy());\n assertTrue(orgs.get(0).getOwnedOnVertecBy().equals(\"Sales Team\"));\n assertTrue(orgs.get(1).getOwnedOnVertecBy().equals(\"Not ZUK\"));\n assertTrue(orgs.get(2).getOwnedOnVertecBy().equals(\"ZUK Sub Team\"));\n assertTrue(orgs.get(3).getOwnedOnVertecBy().equals(\"No Owner\"));\n }", "@DisplayName(\"GET /drivers.json and save result to pojo\")\n @Test\n public void testDrivers(){\n JsonPath jp = get(\"/drivers.json\").jsonPath() ;\n Driver d1 = jp.getObject(\"MRData.DriverTable.Drivers[0]\", Driver.class) ;\n System.out.println(\"d1 = \" + d1);\n\n // Get all drivers as List<Driver>\n List<Driver> allDriver = jp.getList(\"MRData.DriverTable.Drivers\" , Driver.class) ;\n System.out.println(\"allDriver = \" + allDriver);\n\n // Print the name of all American drivers in this list\n for (Driver driver : allDriver) {\n if(driver.getNationality().equals(\"American\")){\n System.out.println(\"driver.getGivenName() = \" + driver.getGivenName());\n }\n }\n\n\n\n\n }", "@Test\n\tpublic void testCreateompanyApi() throws JsonProcessingException {\n\t\tMap<String, Object> requestBody = new HashMap<String, Object>();\n\t\tString companyName = \"Hemadri Software\";\n\t\trequestBody.put(\"name\", companyName);\n\t\tString addresss = \"KRPuram\";\n\t\trequestBody.put(\"adress\", addresss);\n\t\tString city = \"Bangalore\";\n\t\trequestBody.put(\"city\", city);\n\t\trequestBody.put(\"country\", \"India\");\n\t\trequestBody.put(\"phoneNumber\", \"9880440671\");\n\t\tHttpHeaders requestHeaders = new HttpHeaders();\n\t\trequestHeaders.setContentType(MediaType.APPLICATION_JSON);\n\n\t\t// Creating http entity object with request body and headers\n\t\tHttpEntity<String> httpEntity = new HttpEntity<String>(\n\t\t\t\tOBJECT_MAPPER.writeValueAsString(requestBody), requestHeaders);\n\n\t\t// Invoking the API\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tMap<String, Object> apiResponse = restTemplate.postForObject(\n\t\t\t\t\"http://localhost:8888/companies/add/\", httpEntity, Map.class,\n\t\t\t\tCollections.EMPTY_MAP);\n\n\t\tassertNotNull(apiResponse);\n\n\t\t// Asserting the response of the API.\n\t\t// String message = apiResponse.get(\"message\").toString();\n\t\tassertEquals(city, apiResponse.get(\"city\"));\n\t\tInteger companyId = (Integer) apiResponse.get(\"companyId\");\n\n\t\tassertNotNull(companyId);\n\n\t\t// Fetching the company details directly from the DB to verify the API\n\t\t// succeeded\n\t\tCompany companyFromDb = companyRepository.findOne(companyId);\n\t\tassertEquals(companyName, companyFromDb.getName());\n\t\tassertEquals(addresss, companyFromDb.getAdress());\n\t\tassertEquals(city, companyFromDb.getCity());\n\n\t\t// Delete the data added for testing\n\t\tcompanyRepository.delete(companyId);\n\n\t}", "@Test\n public void testGetTravels() throws Exception{\n\n mockMVC.perform(get(\"/user/1/travel\")\n .header(\"Authorization\", \"1\"))\n .andExpect(status().isOk())\n .andExpect(content().contentType(TestUtil.APPLICATION_JSON_UTF8))\n .andExpect(jsonPath(\"$\", hasSize(2)))\n .andExpect(jsonPath(\"$[0].id\", is(\"1\")))\n .andExpect(jsonPath(\"$[0].name\", is(\"travel1\")))\n .andExpect(jsonPath(\"$[0].time_interval[0]\", is(\"10:15:30\")))\n .andExpect(jsonPath(\"$[0].time_interval[1]\", is(\"12:15:30\")))\n .andExpect(jsonPath(\"$[0].is_arrival_time\", is(false)))\n .andExpect(jsonPath(\"$[0].recurring[0]\", is(false)))\n .andExpect(jsonPath(\"$[0].recurring[1]\", is(false)))\n .andExpect(jsonPath(\"$[0].recurring[2]\", is(false)))\n .andExpect(jsonPath(\"$[0].recurring[3]\", is(false)))\n .andExpect(jsonPath(\"$[0].recurring[4]\", is(false)))\n .andExpect(jsonPath(\"$[0].recurring[5]\", is(false)))\n .andExpect(jsonPath(\"$[0].recurring[6]\", is(false)))\n .andExpect(jsonPath(\"$[0].startpoint.street\", is(\"teststreet\")))\n .andExpect(jsonPath(\"$[0].startpoint.housenumber\", is(\"1\")))\n .andExpect(jsonPath(\"$[0].startpoint.city\", is(\"testcity\")))\n .andExpect(jsonPath(\"$[0].startpoint.country\", is(\"BE\")))\n .andExpect(jsonPath(\"$[0].startpoint.postal_code\", is(\"1234\")))\n .andExpect(jsonPath(\"$[0].startpoint.coordinates.lat\", is(50.0)))\n .andExpect(jsonPath(\"$[0].startpoint.coordinates.lon\", is(60.0)))\n .andExpect(jsonPath(\"$[0].endpoint.street\", is(\"teststreet\")))\n .andExpect(jsonPath(\"$[0].endpoint.housenumber\", is(\"5\")))\n .andExpect(jsonPath(\"$[0].endpoint.city\", is(\"testcity\")))\n .andExpect(jsonPath(\"$[0].endpoint.country\", is(\"BE\")))\n .andExpect(jsonPath(\"$[0].endpoint.postal_code\", is(\"1234\")))\n .andExpect(jsonPath(\"$[0].endpoint.coordinates.lat\", is(55.0)))\n .andExpect(jsonPath(\"$[0].endpoint.coordinates.lon\", is(65.0)))\n .andExpect(jsonPath(\"$[1].id\", is(\"2\")))\n .andExpect(jsonPath(\"$[1].name\", is(\"travel2\")))\n .andExpect(jsonPath(\"$[1].time_interval[0]\", is(\"10:15:30\")))\n .andExpect(jsonPath(\"$[1].time_interval[1]\", is(\"12:15:30\")))\n .andExpect(jsonPath(\"$[1].is_arrival_time\", is(true)))\n .andExpect(jsonPath(\"$[1].recurring[0]\", is(false)))\n .andExpect(jsonPath(\"$[1].recurring[1]\", is(false)))\n .andExpect(jsonPath(\"$[1].recurring[2]\", is(false)))\n .andExpect(jsonPath(\"$[1].recurring[3]\", is(false)))\n .andExpect(jsonPath(\"$[1].recurring[4]\", is(false)))\n .andExpect(jsonPath(\"$[1].recurring[5]\", is(false)))\n .andExpect(jsonPath(\"$[1].recurring[6]\", is(false)))\n .andExpect(jsonPath(\"$[1].endpoint.street\", is(\"teststreet\")))\n .andExpect(jsonPath(\"$[1].endpoint.housenumber\", is(\"1\")))\n .andExpect(jsonPath(\"$[1].endpoint.city\", is(\"testcity\")))\n .andExpect(jsonPath(\"$[1].endpoint.country\", is(\"BE\")))\n .andExpect(jsonPath(\"$[1].endpoint.postal_code\", is(\"1234\")))\n .andExpect(jsonPath(\"$[1].endpoint.coordinates.lat\", is(50.0)))\n .andExpect(jsonPath(\"$[1].endpoint.coordinates.lon\", is(60.0)))\n .andExpect(jsonPath(\"$[1].startpoint.street\", is(\"teststreet\")))\n .andExpect(jsonPath(\"$[1].startpoint.housenumber\", is(\"5\")))\n .andExpect(jsonPath(\"$[1].startpoint.city\", is(\"testcity\")))\n .andExpect(jsonPath(\"$[1].startpoint.country\", is(\"BE\")))\n .andExpect(jsonPath(\"$[1].startpoint.postal_code\", is(\"1234\")))\n .andExpect(jsonPath(\"$[1].startpoint.coordinates.lat\", is(55.0)))\n .andExpect(jsonPath(\"$[1].startpoint.coordinates.lon\", is(65.0)));\n \n verify(databaseMock, times(1)).getUser(anyInt());\n verifyNoMoreInteractions(databaseMock);\n }", "@Test\n public void getCaseByUPRNFound() throws Exception {\n\n when(dataRepo.readNonHILatestCollectionCaseByUprn(Long.toString(UPRN.getValue()), true))\n .thenReturn(Optional.of(collectionCase.get(0)));\n\n CollectionCase nonHICase = this.collectionCase.get(0);\n\n CaseDTO rmCase = caseSvc.getLatestValidNonHICaseByUPRN(UPRN);\n\n assertNotNull(rmCase);\n assertEquals(nonHICase.getId(), rmCase.getCaseId().toString());\n assertEquals(nonHICase.getCaseRef(), rmCase.getCaseRef());\n assertEquals(nonHICase.getCaseType(), rmCase.getCaseType());\n assertEquals(nonHICase.getAddress().getAddressType(), rmCase.getAddressType());\n assertEquals(nonHICase.getAddress().getAddressLine1(), rmCase.getAddress().getAddressLine1());\n assertEquals(nonHICase.getAddress().getAddressLine2(), rmCase.getAddress().getAddressLine2());\n assertEquals(nonHICase.getAddress().getAddressLine3(), rmCase.getAddress().getAddressLine3());\n assertEquals(nonHICase.getAddress().getTownName(), rmCase.getAddress().getTownName());\n assertEquals(nonHICase.getAddress().getRegion(), rmCase.getRegion());\n assertEquals(nonHICase.getAddress().getPostcode(), rmCase.getAddress().getPostcode());\n assertEquals(\n nonHICase.getAddress().getUprn(), Long.toString(rmCase.getAddress().getUprn().getValue()));\n }", "@Test\n public void testReceiverRegionReturns() {\n ResponseEntity response = dataController.getReceiverDataByOrgans(\"N\", \"Canterbury\", null, null);\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "@Test\n void givenUsers_whenGetUsers_thenReturnJsonArray() throws Exception {\n // given\n User user = new User();\n user.setPassword(\"Firstname Lastname\");\n user.setUsername(\"firstname@lastname\");\n user.setStatus(UserStatus.OFFLINE);\n\n List<User> allUsers = Collections.singletonList(user);\n\n // this mocks the UserService -> we define above what the userService should return when getUsers() is called\n given(loginService.getUsers()).willReturn(allUsers);\n\n // when\n MockHttpServletRequestBuilder getRequest = get(\"/users\").contentType(MediaType.APPLICATION_JSON);\n\n // then\n mockMvc.perform(getRequest).andExpect(status().isOk())\n .andExpect(jsonPath(\"$\", hasSize(1)))\n .andExpect(jsonPath(\"$[0].username\", is(user.getUsername())))\n .andExpect(jsonPath(\"$[0].status\", is(user.getStatus().toString())));\n }", "@Test\n\t// @Disabled\n\tvoid testViewCustomerbyVehicleLocation() {\n\n\t\tCustomer customer1 = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"[email protected]\");\n\t\tVehicle vehicle1 = new Vehicle(101, \"TN02J0666\", \"bus\", \"A/C\", \"prime\", \"chennai\", \"13\", 600.0, 8000.0);\n\t\tVehicle vehicle2 = new Vehicle(102, \"TN02J0776\", \"car\", \"nonA/C\", \"prime\", \"chennai\", \"13\", 600.0, 8000.0);\n\t\tList<Vehicle> vehicleList =new ArrayList<>();\n\t\tvehicleList.add(vehicle1);\n\t\tvehicleList.add(vehicle2);\n\t\tcustomer1.setVehicle(vehicleList);\n\t\tList<Customer> customerList = new ArrayList<>();\n\t\tcustomerList.add(customer1);\n\t\tMockito.when(custRep.findbyVehicleLocation(\"chennai\")).thenReturn(customerList);\n\t\tList<Customer> cust3 = custService.findbyVehicleLocation(\"chennai\");\n\t\tassertEquals(1, cust3.size());\n\t}", "@Test\n public void getBorrowers() throws Exception{\n String payload=\"[\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 121,\\n\" +\n \" \\\"name\\\": \\\"David\\\",\\n\" +\n \" \\\"address\\\": \\\"Giessen\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 161,\\n\" +\n \" \\\"name\\\": \\\"Ingo\\\",\\n\" +\n \" \\\"address\\\": \\\"Giessen\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 61,\\n\" +\n \" \\\"name\\\": \\\"Jannik\\\",\\n\" +\n \" \\\"address\\\": \\\"Darmstadt\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 101,\\n\" +\n \" \\\"name\\\": \\\"Julian\\\",\\n\" +\n \" \\\"address\\\": \\\"Giessen\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 123,\\n\" +\n \" \\\"name\\\": \\\"Karl\\\",\\n\" +\n \" \\\"address\\\": \\\"Freiburg\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 122,\\n\" +\n \" \\\"name\\\": \\\"Manfred\\\",\\n\" +\n \" \\\"address\\\": \\\"Marburg\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 64,\\n\" +\n \" \\\"name\\\": \\\"Mohamed\\\",\\n\" +\n \" \\\"address\\\": \\\"Darmstadt\\\"\\n\" +\n \" }\\n\" +\n \"]\";\n mockMvc.perform(MockMvcRequestBuilders.get(\"/getBorrowers\").content(payload)\n .contentType(MediaType.APPLICATION_JSON))\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8))\n .andExpect(status().isOk())\n .andExpect(jsonPath(\"$\",Matchers.hasSize(7))).andReturn();\n\n\n }", "@Test\n public void testFetchRoles() {\n final FetchRoleRequest request = new FetchRoleRequest(findNationalGroup(token).getGroupId());\n final FetchRoleResponse response = administration.fetchRoles(token, request);\n assertThat(response, is(not(nullValue())));\n assertThat(response.isOk(), is(true));\n // There should be a total of 4 roles for this Group\n assertThat(response.getRoles().size(), is(4));\n }", "@Test\n void getUserBy() {\n List<Role> users = (List<Role>) roleDAO.getEntityBy(\"roleName\", \"o\");\n assertEquals(1, users.size());\n }", "public void testGetAllAuthors() {\r\n //given \r\n System.out.println(\"getAllAuthors\");\r\n AuthorHibernateDao instance = new AuthorHibernateDao();\r\n \r\n //when \r\n List<Author> result = instance.getAllAuthors();\r\n \r\n //then\r\n assertEquals(result.size(), 42);\r\n assertEquals(\"Herbert George Wells\", result.get(40).getName()); \r\n }", "@Transactional\n\tpublic List<University> listAllUniversity() {\n\n\t\tCriteriaBuilder builder = getSession().getCriteriaBuilder();\n\t\tCriteriaQuery<University> criteriaQuery = builder.createQuery(University.class);\n\t\tRoot<University> root = criteriaQuery.from(University.class);\n\t\tcriteriaQuery.select(root);\n\t\tQuery<University> query = getSession().createQuery(criteriaQuery);\n\n\t\t// query.setFirstResult((page - 1) * 5);\n\t\t// query.setMaxResults(5);\n\t\treturn query.getResultList();\n\t}", "@Test\n\tpublic void test_get_all_success() {\n\t\tResponseEntity<User[]> response = template.getForEntity(REST_SERVICE_URI + ACCESS_TOKEN + token, User[].class);\n\t\tassertThat(response.getStatusCode(), is(HttpStatus.OK));\n\t\tvalidateCORSHttpHeaders(response.getHeaders());\n\t}", "@Test\n public void culturesTest(){\n RestAssured.baseURI=\"https://api.got.show/api\";\n Response responce=RestAssured.get(\"/cultures/\");\n responce.prettyPrint();\n Assert.assertTrue(responce.asString().contains(\"Crannogmen\"));\n }", "@Test\n public void getLocationById() throws Exception {\n }", "@Test\n public void test1() {\n\n Student student = given().accept(ContentType.JSON)\n .pathParam(\"id\", 23401)\n .when()\n .get(\"http://api.cybertektraining.com/student/{id}\")\n .then().statusCode(200)\n .and().contentType(\"application/json;charset=UTF-8\")\n .and().header(\"Content-Encoding\", equalTo(\"gzip\"))\n .and().header(\"Date\", notNullValue()).extract().jsonPath().getObject(\"students[0]\", Student.class);\n\n System.out.println(\"student.getFirstName() = \" + student.getFirstName());\n System.out.println(\"student.getBatch() = \" + student.getBatch());\n System.out.println(\"student.getSection() = \" + student.getSection());\n System.out.println(\"student.getContact().getEmailAddress() = \" + student.getContact().getEmailAddress());\n System.out.println(\"student.getAddress().getState() = \" + student.getCompany().getAddress().getState());\n System.out.println(\"student.getAddress().getZipCode() = \" + student.getCompany().getAddress().getZipCode());\n\n System.out.println(\"student.getCompany().getCompanyName() = \" + student.getCompany().getCompanyName());\n\n String expFirstName = \"Vera\";\n int expBatch = 14;\n int expSection = 12;\n String expEmail = \"[email protected]\";\n String expCompanyName = \"Cybertek\";\n String expState = \"IL\";\n int expZipCode = 60606;\n\n assertThat(expFirstName, equalTo(student.getFirstName()));\n assertThat(expBatch, equalTo(student.getBatch()));\n assertThat(expSection, equalTo( student.getSection()));\n assertThat(expEmail, equalTo(student.getContact().getEmailAddress()));\n assertThat(expCompanyName, equalTo(student.getCompany().getCompanyName()));\n assertThat(expState, equalTo(student.getCompany().getAddress().getState()));\n assertThat(expZipCode, equalTo(student.getCompany().getAddress().getZipCode()));\n\n\n\n\n\n\n}", "@Test\n public void apiKundenViewGetInaktiveGetTest() throws ApiException {\n List<CmplxKunden> response = api.apiKundenViewGetInaktiveGet();\n\n // TODO: test validations\n }", "@Test\n\tvoid testGetAllByName() {\n\t\tList<Plant> plant = service.getAllByName(\"Tulsi\");\n\t\tString name = plant.get(0).getName();\n\t\tassertEquals(\"Tulsi\", name);\n\t}", "@Test\n public void test_get_all_success() throws Exception {\n List<UserDto> users = Arrays.asList(new UserDto(1L, \"Daenerys\", \"Targaryen\", \"[email protected]\"),\n new UserDto(2L, \"John\", \"Snow\", \"[email protected]\"));\n\n when(userService.getAllUsers()).thenReturn(users);\n\n mockMvc.perform(get(\"/users\")).andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\", hasSize(2))).andExpect(jsonPath(\"$[0].userId\", is(1)))\n .andExpect(jsonPath(\"$[0].userFirstName\", is(\"Daenerys\"))).andExpect(jsonPath(\"$[1].userId\", is(2)))\n .andExpect(jsonPath(\"$[1].userLastName\", is(\"Snow\")));\n\n verify(userService, times(1)).getAllUsers();\n verifyNoMoreInteractions(userService);\n }", "@RequestMapping(\"/getAboutUs\")\r\n\tpublic List<AboutUs> getAboutUsList(HttpServletRequest request) throws IOException{\n\t\t\r\n\t\tList<AboutUs> aboutUsList= aboutUsService.find();\r\n\t\treturn aboutUsList;\r\n\t}", "@Test\n public void testFindAllProduct() throws Exception {\n // Mock method\n when(productRepository.findAll()).thenReturn(products);\n\n testResponseData(RequestInfo.builder()\n .request(get(PRODUCT_ENDPOINT))\n .token(memberToken)\n .httpStatus(HttpStatus.OK)\n .build());\n }", "@Test\n public void testReceiverRegionEndpointAge() {\n ResponseEntity response = dataController.getReceiverDataRegion(null, null, \"20\");\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "@Test\n public void testGetOwners() throws Exception {\n int ID_FIRST_RECORD = 1;\n this.mockMvc.perform(get(\"/owners/all\"))\n .andExpect(status().isOk())\n .andExpect(content()\n .contentType(MediaType.APPLICATION_JSON))\n // .andExpect(jsonPath(\"$\", hasSize(NRO_RECORD)))\n .andExpect(jsonPath(\"$[0].id\", is(ID_FIRST_RECORD)));\n }", "@Test\n public void testDonorAgeReturns() {\n ResponseEntity response = dataController.getDonorDataByOrgans(\"N\", null, null, \"20\");\n assertNotNull(response.getBody());\n assertEquals(HttpStatus.OK, response.getStatusCode());\n }", "@Test(priority = 1)\r\n\tpublic void setup() {\n\t\tResponse res = get(\"http://samples.openweathermap.org/data/2.5/weather?q=London,uk&appid=b6907d289e10d714a6e88b30761fae22\");\r\n\t\tint rescode = res.getStatusCode();\r\n\t\tSystem.out.println(\"Api response code \" + rescode);\r\n\t}" ]
[ "0.6569714", "0.6111635", "0.5996116", "0.5698981", "0.5678052", "0.56582135", "0.5611867", "0.5551277", "0.5510853", "0.5501258", "0.54924244", "0.54198116", "0.53923094", "0.5337417", "0.53216094", "0.5303114", "0.52951866", "0.5293021", "0.52837443", "0.52815115", "0.52800685", "0.52293503", "0.5226865", "0.52212083", "0.52043205", "0.5196246", "0.5176634", "0.51743954", "0.5173092", "0.51612335", "0.51355386", "0.51327837", "0.5094001", "0.5091264", "0.5089544", "0.5080236", "0.5071338", "0.5069216", "0.5061363", "0.50565845", "0.50564533", "0.5055767", "0.50477844", "0.50445163", "0.5041596", "0.50385916", "0.50381774", "0.50332344", "0.50297225", "0.5023413", "0.50175536", "0.50014323", "0.49987894", "0.49781448", "0.49729484", "0.49719733", "0.4967981", "0.49678642", "0.49657288", "0.49569136", "0.4944797", "0.49406067", "0.49294573", "0.4926528", "0.49250475", "0.4921454", "0.49113497", "0.49074903", "0.49058285", "0.49047202", "0.49016926", "0.49006584", "0.4899073", "0.48987406", "0.48981857", "0.48957697", "0.4893893", "0.48919302", "0.48906428", "0.48824477", "0.48769596", "0.48741233", "0.4872476", "0.48676804", "0.48637676", "0.4863714", "0.48568252", "0.48558292", "0.48509476", "0.4849608", "0.48479578", "0.48477927", "0.4847329", "0.48470178", "0.48447278", "0.48420656", "0.48382807", "0.4833901", "0.48316145", "0.48235303", "0.48133692" ]
0.0
-1
Created by DNS1 on 08.06.2017.
public interface RadiocarbonService { @GET("/search/filter_radiocarbons") Observable<List<RadiocarbonDate>> getRadiocarbons(@Query("name") String name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "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 create() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "protected void mo6255a() {\n }", "public void create() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "public Pitonyak_09_02() {\r\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\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 Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "zzang mo29839S() throws RemoteException;", "@Override\n\tpublic void create() {\n\n\t}", "public void mo55254a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private Singletion3() {}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "Petunia() {\r\n\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "public void mo4359a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n public void func_104112_b() {\n \n }", "private void init() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@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 }", "@Override\n\tprotected void getExras() {\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 }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "zzafe mo29840Y() throws RemoteException;", "@Override\n protected void initialize() {\n\n \n }", "private TMCourse() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n public void init() {}", "@Override\n public void init() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "zzana mo29855eb() throws RemoteException;", "private void kk12() {\n\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 dtd() {\n\t\t\n\t}", "public contrustor(){\r\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n\tpublic void nghe() {\n\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}", "private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}", "public void mo12930a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo21877s() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void init() {\n }" ]
[ "0.5724169", "0.55928624", "0.557632", "0.5508457", "0.54673535", "0.54673535", "0.54673535", "0.54673535", "0.54673535", "0.54673535", "0.54673535", "0.54321826", "0.54115885", "0.54069066", "0.5396923", "0.5377873", "0.53695256", "0.5359563", "0.5351041", "0.53383344", "0.53213215", "0.5320242", "0.53140587", "0.53140587", "0.53121114", "0.53095895", "0.5308805", "0.53023046", "0.5301014", "0.52985847", "0.5290581", "0.52889466", "0.5278683", "0.5272205", "0.5267233", "0.5261595", "0.5254423", "0.5243836", "0.5234081", "0.5234081", "0.5222358", "0.52205735", "0.5214464", "0.5205958", "0.5202738", "0.5193178", "0.51826775", "0.5163511", "0.51552534", "0.51549715", "0.5154256", "0.51519066", "0.51519066", "0.5144844", "0.5144844", "0.5144844", "0.5144844", "0.5144844", "0.5144844", "0.51429343", "0.51383144", "0.51383144", "0.51383144", "0.51383144", "0.51383144", "0.5136445", "0.5121359", "0.5116184", "0.5111697", "0.51048815", "0.510286", "0.51021695", "0.509709", "0.5095351", "0.5093025", "0.50828475", "0.5082393", "0.508011", "0.50753534", "0.5073837", "0.50733286", "0.5064967", "0.5063243", "0.5059215", "0.5059215", "0.5059215", "0.50499225", "0.5049076", "0.50443923", "0.5042647", "0.5039471", "0.5039471", "0.5039471", "0.50388646", "0.503632", "0.50348294", "0.5030904", "0.5022646", "0.5018796", "0.50181514", "0.501797" ]
0.0
-1
that takes an MessageListDto object as an input and saves the underlying messages into DB
void save(MessageListDto messages);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void save(List<VSTPMsg> vstpMsgList) {\n vstpMsgRepository.save(vstpMsgList);\n }", "public int insertChatMsg(List<Message> list) {\n\t\tConnection conn = getConnection();\n\t\tint result = 0;\n\t\tfor (Message msg : list) {\n\t\t\tresult = cd.insertChatMsg(conn, msg);\n\t\t\tif (result == 0) {\n\t\t\t\trollback(conn);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"여기 실행안됨??\");\n\t\tlist.clear();\n\t\tSystem.out.println(\" === 리스트 쌓인거 전송하고 클리어 Service === \");\n\t\tif (result > 0) {\n\t\t\tSystem.out.println(\"커밋 !\");\n\t\t\tcommit(conn);\n\t\t} else {\n\t\t\tSystem.out.println(\"커밋 안됨\");\n\t\t\trollback(conn);\n\t\t}\n\t\tclose(conn);\n\t\treturn result;\n\t}", "public void saveList(List<T> ListObject) throws DaoException;", "private static void storeMessage(String tokenId,String db,String user,String password){\n JSONArray jsonArray = getMailMessageList(tokenId);\n for (int i=0; i<jsonArray.length();i++)\n {\n for (int j=0;j<jsonArray.getJSONObject(i).getJSONArray(\"messages\").length();j++)\n {\n String messageId = jsonArray.getJSONObject(i).getJSONArray(\"messages\").getJSONObject(j)\n .getString(\"id\");\n addIntoDB(getMailMessage(tokenId, messageId),db,user,password);/*insert each mail details into DB */\n }\n }\n }", "@Override\n public int bathSave(List<T> entitys) throws Exception {\n return mapper.insertList(entitys);\n }", "public List<CustomersListSearchConditionsDTO> saveAll(List<CustomersListSearchConditionsDTO> cuListSearchConditionsDTOList);", "public Messages save(Messages m){\n if(m.getIdMessage() == null){\n return messageRepository.save(m);\n }else{\n Optional<Messages> evt=messageRepository.getMessage(m.getIdMessage());\n if(evt.isEmpty()){\n return messageRepository.save(m);\n }else{\n return messageRepository.save(m);\n }\n }\n }", "@Override\n\tpublic void savePengdingWaybill(List<WaybillPendingEntity> pendingList) {\n\t\t\n\t}", "@Override\n public Message saveMessage(MessageDTO message) { \n return messageRepository.save(MessageTransformer.transform(message));\n }", "List<T> saveOrUpdateList(final List<T> entitiesList);", "@Transactional\n public ApiResponse saveItems(List<Df00201VO> itemList) {\n\n List<DfDegree> dfDegreeList = ModelMapperUtils.mapList(itemList, DfDegree.class);\n\n DfDegree orgDfDegree = null;\n int degree = 0;\n\n for (DfDegree dfDegree : dfDegreeList) {\n if (dfDegree.isCreated() || dfDegree.isModified()) {\n orgDfDegree = repository.findOne(dfDegree.getId());\n\n if (mapper.checkDegree(dfDegree.getDisposalFreezeEventUuid()) >= dfDegree.getDegree()){\n if(dfDegree.isCreated()) {\n return ApiResponse.error(ApiStatus.SYSTEM_ERROR, CommonMessageUtils.getMessage(\"DF002_05\"));\n }else if(dfDegree.isModified()){\n if(orgDfDegree.getDegree() != dfDegree.getDegree()){\n return ApiResponse.error(ApiStatus.SYSTEM_ERROR, CommonMessageUtils.getMessage(\"DF002_05\"));\n }\n }\n }\n\n if(dfDegree.isCreated()){ //disposalFreezeDegreeUuid 없을때\n degree = jdbcTemplate.queryForObject(\"select FC_DF_DEGREE_NUMBER('\"+ dfDegree.getDisposalFreezeEventUuid() +\"') from dual\", Integer.class);\n dfDegree.setDegree(degree);\n dfDegree.setStatusUuid(CommonCodeUtils.getCodeDetailUuid(\"CD115\",\"Draft\"));\n }\n\n if(dfDegree.isModified()) {\n dfDegree.setInsertDate(orgDfDegree.getInsertDate());\n dfDegree.setInsertUuid(orgDfDegree.getInsertUuid());\n\n if(dfDegree.getEndYn().equals(\"Y\")){\n dfDegree.setTerminatorUuid(SessionUtils.getCurrentLoginUserUuid());\n dfDegree.setEndDate(Timestamp.valueOf(DateUtils.convertToString(LocalDateTime.now(), DateUtils.DATE_TIME_PATTERN)));\n }else{\n dfDegree.setTerminatorUuid(\"\");\n dfDegree.setEndDate(null);\n }\n }\n\n repository.save(dfDegree);\n } else if (dfDegree.isDeleted()) {\n if (mapper.checkDegree(dfDegree.getDisposalFreezeEventUuid()) > 0) {\n return ApiResponse.error(ApiStatus.SYSTEM_ERROR, CommonMessageUtils.getMessage(\"DF002_05\"));\n } else {\n repository.delete(dfDegree);\n }\n }\n\n }\n return ApiResponse.of(ApiStatus.SUCCESS, \"SUCCESS\");\n }", "@PostMapping(value = \"/all/messages\", consumes = MediaType.APPLICATION_JSON_VALUE)\n public ResponseEntity postMessage(@RequestBody Message message) {\n String messageId = UUID.randomUUID().toString();\n message.setMessageId(messageId);\n message.setDateTime(LocalDateTime.now());\n\n // save message in all data sources\n postgresDataService.saveMessage(message);\n mysqlDataService.saveMessage(message);\n return ResponseEntity.status(HttpStatus.CREATED).body(message);\n }", "public void saveAll(List list);", "public synchronized void m10414a(ArrayList<p140me.bridgefy.entities.Message> arrayList) {\n try {\n Iterator it = arrayList.iterator();\n while (it.hasNext()) {\n p140me.bridgefy.entities.Message message = (p140me.bridgefy.entities.Message) it.next();\n message.setStatus(1);\n AppEntityMessage appEntityMessage = new AppEntityMessage(message, 1);\n Builder builder = new Builder();\n builder.setReceiverId(message.getReceiver()).setContent(appEntityMessage.toHashMap());\n Message build = builder.build();\n build.setUuid(message.getOfflineId());\n if (message.getType() == 1) {\n build.setData(C3667g.m10943a(message, false, mo29428a()));\n }\n if (message.getType() == 1 && build.getData() == null) {\n message.setStatus(2);\n } else {\n String sendMessage = Bridgefy.sendMessage(build);\n message.setMessageId(sendMessage);\n message.setOfflineId(sendMessage);\n }\n this.f9294c.mo28337a(message);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return;\n }", "public List<MessageListItem> makeList(List<BMessage> list){\n return MessageListItem.makeList(mActivity, userID, list, customDateFormat);\n }", "@Override\n\tpublic void save(List<Field> entity) {\n\t\t\n\t}", "@Override\n public void saveSmsRecord(int sendId, int sendType, String content, List<String> receiveMobileList, boolean status)\n throws OperationException {\n \n }", "public void setContactsDTO(ContactListDTO dto) {\n/*Generated! Do not modify!*/ replyDTO.getDTOsToSet().add(\"contacts\");\n/*Generated! Do not modify!*/ if (dto == null){\n/*Generated! Do not modify!*/ replyDTO.getDTOValues().remove(\"contacts\");\n/*Generated! Do not modify!*/ } else {\n/*Generated! Do not modify!*/ replyDTO.getDTOValues().put(\"contacts\", dto);\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ if (recordMode){\n/*Generated! Do not modify!*/ addRecordedAction(ReplyActionType.SET_DTO, \"setContactsDTO(\", gson.toJson(dto), getClassName(dto));\n/*Generated! Do not modify!*/ }\n/*Generated! Do not modify!*/ }", "@Override\n\t@CoreTransactional\n\tpublic void write(List<? extends WrappedGenericEntityRelationship> items) throws Exception {\n\n\t\tList<CandidateWorkRequest> candidateWorkRequests = new LinkedList<>();\n\n\t\tfor (WrappedGenericEntityRelationship wrappedGenericEntityRelationship : items) {\n\t\t\tthis.recordCount++;\n\t\t\tString message = String.format(\"record=[%d],message=[%s]\",\n\t\t\t\t\t\tthis.recordCount, wrappedGenericEntityRelationship.getMessage());\n\n\t\t\tcandidateWorkRequests.add(this.earleyUploadUtils.candidateWorkRequestFrom(this.transactionId,\n\t\t\t\t\tmessage, wrappedGenericEntityRelationship.getSuccess(), this.userId));\n\n\t\t\tthis.candidateWorkRequestRepository.save(candidateWorkRequests);\n\t\t}\n\t}", "public int delegateUpdateListTx(java.util.List<LdPublisher> entityList) {\r\n assertListNotNullAndEmpty(entityList);\r\n return getMyDao().updateList(entityList);\r\n }", "int insertBatch(List<SystemRoleUserMapperMo> list);", "private void sendMsgList(String queue, List<String> listMessage) throws JMSException {\n for (String textMessage : listMessage) {\n this.sendMsg(queue, textMessage);\n }\n }", "private void saveOrUpdateNewMessageRealm(_Message message) {\r\n\r\n //realm required to submit from separate thread. IF I do operation in ui thread,\r\n //I need .allowQueriesOnUiThread(true), that's no need in my case\r\n executor.execute(() -> {\r\n // use Realm on background thread\r\n _RealmController.insertOrUpdateNewMessage(message);\r\n });\r\n }", "List<TicketEntity> toEntityList(List<TicketDto> ticketDtoList);", "public void setMessageList(List<Object> message)\r\n\t{\r\n\t\tthis.messageList = message;\r\n\t}", "@Override\r\n\tpublic void saveBatchBusiMemberInfo(List<BusiMemberInfo> busiMemberInfoLs) {\n\t\tbusiMemberInfoDao.addBacth(busiMemberInfoLs);\r\n\t}", "@Transactional\n @MessageMapping(\"/place-stone/{gameId}\")\n @SendTo(\"/topic/game/{gameId}\")\n public void sendMessage(StompSendMessage sendMessage) {\n\n\n // 1) 데이터 저장 (GameRecords Entity)\n // 게임\n // 로그인 유저\n Games game = gamesRepository.findById(sendMessage.getGameId());\n // 게임 종료 조건 시, Games 테이블의 상태 값 변경 (게임 종료 상태)\n if (sendMessage.getIsFinish() == GAME_OVER) {\n game.setGameStatus(GAME_OVER);\n }\n\n Users loginUser = usersRepository.findByNickname(sendMessage.getLoginUserNickname());\n\n GameRecords gameRecords = GameRecords.builder()\n .game(game)\n .loginUser(loginUser)\n .isFinish(sendMessage.getIsFinish())\n .x(sendMessage.getX())\n .y(sendMessage.getY())\n .unallowedList(sendMessage.getUnallowedList().toString())\n .prevStateList(sendMessage.getPrevStateList().toString())\n .stoneStatus(sendMessage.getLoginUserTurn())\n .build();\n\n // [GameRecords to game_records] Database에 저장\n gameRecordsRepository.save(gameRecords);\n\n // 2) 각 클라이언트로 착수한 돌 정보 전송 ( 돌 상태, 좌표 값 전송 )\n this.simpMessagingTemplate.convertAndSend(\"/topic/game/\"+sendMessage.getGameId(), sendMessage);\n\n }", "public void saveMessagesToGateway(Gateway gateway) {\n List<Message> messages = new ArrayList<>();\n messages.addAll(this.messageList.values());\n gateway.saveMessages(messages);\n }", "@Override\n public void onSave(MessageContainer messages) {\n }", "List<TicketDto> toDtoList(List<TicketEntity> ticketEntityList);", "@Override\n\tpublic void save(Message msg) {\n\t\tmsgdao.save(msg);\n\n\t}", "public Order save(OrderDto orderDto) throws Exception {\n\n Order order = new Order();\n order.setShopId(orderDto.getShopId());\n order.setUserId(orderDto.getUserId());\n List<OrderItem> orderItems = orderDto.getItems()\n .stream()\n .map(i -> {\n OrderItem orderItem = new OrderItem();\n orderItem.setProductId(i.getProductId());\n orderItem.setQty(i.getQty());\n orderItem.setOrder(order);\n\n return orderItem;\n }).collect(Collectors.toList());\n order.setItems(orderItems);\n order.setStatus(OrderStatus.PLACED);\n\n Order entity = orderRepository.saveAndFlush(order);\n\n // call core-service to notify the queue\n // TODO: using event-based or async request\n jmsTemplate.convertAndSend(QueueNames.QUEUE_NEW_ORDER, new Ordering(entity.getId()));\n// restTemplate.postForObject(\"http://core-service/ordering\", new Ordering(entity.getId()), Ordering.class);\n\n return orderRepository.findById(entity.getId()).orElse(null);\n\n }", "@Override\n\tpublic void updateData(List<Schedule> listData) {\n\t\tSession session = getCurrentSession();\n\t\tif (listData != null && !listData.isEmpty()) {\n\t\t\tlistData.forEach((schedule) -> {\n\t\t\t\tsession.saveOrUpdate(schedule);\n\t\t\t});\n\t\t}\n\n\t}", "public interface OmsOrderOperateHistoryDao {\n /**\n * Multiple create\n */\n int insertList(@Param(\"list\") List<OmsOrderOperateHistory> orderOperateHistoryList);\n}", "void saveContracts(List<Contract> contractList) \n throws DataAccessException, CpmBusinessException;", "public List<Member> toEntityList(List<MemberDto> dtoList) {\r\n List<Member> entityList = new ArrayList<Member>();\r\n for (MemberDto dto : dtoList) {\r\n entityList.add(copyDtoToEntity(dto, new Member()));\r\n }\r\n return entityList;\r\n }", "@Override\r\n\tpublic void batchPersist(final List<?> entityList) {\n\t\tif (CollectionUtils.isEmpty(entityList)) {\r\n\t\t\tlogger.debug(\"Persist list is empty, no entity has been persisted.\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.getJpaTemplate().execute(new JpaCallback<Object>() {\r\n\t\t\t@Override\r\n\t\t\tpublic Object doInJpa(EntityManager em) throws PersistenceException {\r\n\t\t\t\tint max = entityList.size();\r\n\t\t\t\tfor (int i = 0; i < max; i++) {\r\n\t\t\t\t\tem.persist(entityList.get(i));\r\n\t\t\t\t\tif ((i != 0 && i % DEFAULT_BATCH_SIZE == 0) || i == max - 1) {\r\n\t\t\t\t\t\tem.flush();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tlogger.debug(\"{} entities has been persisted.\", max);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}", "private String refresh(List lstDataToSave, List list, Timestamp timestamp) {\r\n StringBuffer message = new StringBuffer();\r\n BudgetSubAwardBean budgetSubAwardBean;\r\n \r\n String str = null, fileName;\r\n for(int index = 0; index < lstDataToSave.size(); index++) {\r\n budgetSubAwardBean = (BudgetSubAwardBean)lstDataToSave.get(index);\r\n \r\n //No need to update/refresh Deleted beans\r\n if((budgetSubAwardBean.getAcType() != null && budgetSubAwardBean.getAcType().equals(TypeConstants.DELETE_RECORD))\r\n || (budgetSubAwardBean.getAcType() != null && !budgetSubAwardBean.getAcType().equals(TypeConstants.INSERT_RECORD) && budgetSubAwardBean.getPdfAcType() == null && budgetSubAwardBean.getXmlAcType() == null)){\r\n continue;\r\n }\r\n \r\n if(list != null && list.size() > 0) {\r\n str = list.get(index).toString();\r\n budgetSubAwardBean.setTranslationComments(str);\r\n }\r\n \r\n //If Beans are Inserted. update AwSubAwardNumber and timestamp.\r\n if(budgetSubAwardBean.getAcType() != null && budgetSubAwardBean.getAcType().equals(TypeConstants.INSERT_RECORD)) {\r\n budgetSubAwardBean.setAwSubAwardNumber(budgetSubAwardBean.getSubAwardNumber());\r\n budgetSubAwardBean.setUpdateTimestamp(timestamp);\r\n }\r\n \r\n if(str != null && str.equals(BudgetSubAwardConstants.XML_GENERATED_SUCCESSFULLY)){\r\n if(timestamp != null) {\r\n if(budgetSubAwardBean.getAcType() != null) {\r\n budgetSubAwardBean.setUpdateUser(mdiForm.getUserId());\r\n budgetSubAwardBean.setUpdateTimestamp(timestamp);\r\n }\r\n if(budgetSubAwardBean.getPdfAcType() != null) {\r\n budgetSubAwardBean.setPdfUpdateUser(mdiForm.getUserId());\r\n budgetSubAwardBean.setPdfUpdateTimestamp(timestamp);\r\n budgetSubAwardBean.setXmlUpdateUser(mdiForm.getUserId());\r\n budgetSubAwardBean.setXmlUpdateTimestamp(timestamp);\r\n }\r\n }\r\n budgetSubAwardBean.setAcType(null);\r\n budgetSubAwardBean.setPdfAcType(null);\r\n budgetSubAwardBean.setXmlAcType(null);\r\n }else {\r\n if(message.length() != 0) {\r\n message.append(\"\\n\\n\"); //Append Next Line and an Empty Line\r\n }\r\n message.append(\"Sub Award Num:\"+budgetSubAwardBean.getSubAwardNumber());\r\n message.append(\", File Name:\");\r\n if(budgetSubAwardBean.getPdfAcType() != null) {\r\n fileName = lstFileNames.get(0).toString();\r\n lstFileNames.remove(0); //So that 0th element would be next element\r\n if(timestamp != null) {\r\n budgetSubAwardBean.setPdfUpdateUser(mdiForm.getUserId());\r\n budgetSubAwardBean.setPdfUpdateTimestamp(timestamp);\r\n }\r\n }else {\r\n fileName = budgetSubAwardBean.getPdfFileName();\r\n }\r\n message.append(fileName);\r\n message.append(\"\\n\"+str);\r\n \r\n //budgetSubAwardBean.setAcType(null);\r\n //budgetSubAwardBean.setPdfAcType(TypeConstants.UPDATE_RECORD);\r\n budgetSubAwardBean.setPdfFileName(fileName);\r\n }\r\n }//End For\r\n \r\n //refresh view of selected Sub Award\r\n displayDetails();\r\n \r\n return message.toString();\r\n }", "@Test\n public void messagesWorkflowTest() {\n ResponseEntity<List<Message>> emptyResponse = restTemplate.exchange(\n MESSAGES_ENDPOINT,\n HttpMethod.GET,\n null,\n new ParameterizedTypeReference<List<Message>>() {}\n );\n assertThat(emptyResponse.getBody()).isEmpty();\n\n // after posting a message we should receive back the persisted entity\n Message postedMessage = new Message(\"Hi!\");\n ResponseEntity<Message> newMessageResponse =\n restTemplate.postForEntity(MESSAGES_ENDPOINT, postedMessage, Message.class);\n\n assertThat(newMessageResponse).isNotNull();\n assertThat(newMessageResponse.getStatusCode()).isEqualTo(HttpStatus.CREATED);\n\n Message persistedMessage = newMessageResponse.getBody();\n assertThat(persistedMessage.getContent()).isEqualTo(postedMessage.getContent());\n assertThat(persistedMessage.getId()).isNotNull();\n\n // querying the list again, messages should contain one element\n ResponseEntity<List<Message>> oneMessageListResponse = restTemplate.exchange(\n MESSAGES_ENDPOINT,\n HttpMethod.GET,\n null,\n new ParameterizedTypeReference<List<Message>>() {}\n );\n\n List<Message> messages = oneMessageListResponse.getBody();\n assertThat(messages).hasSize(1);\n assertThat(messages.get(0)).isEqualToComparingFieldByField(persistedMessage);\n }", "public interface MessageService {\n\n ResultMsg save(MessageDto record);\n}", "private int saveOrUpdateList(List<Object> objList, String database)\n throws VizException {\n SaveOrUpdateRequest req = new SaveOrUpdateRequest();\n req.setDbName(database);\n req.setObjectsToUpdate(objList);\n\n Object result = ThriftClient.sendRequest(req);\n return (Integer) result;\n }", "public static String generateHealthMessageInsertSql(List<HealthMessageDO> healthMessageDOList) {\n StringBuilder stringBuilder = new StringBuilder();\n String insertSql = \"insert into ha_health_message (component_id, name, segment_id, service_state, collect_time, collect_count) values \";\n stringBuilder.append(insertSql);\n int size = healthMessageDOList.size();\n for (int i = 0; i < size; i++) {\n if (i != size - 1) {\n stringBuilder.append(\"(\");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getComponentId() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getName() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getSegmentId() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getServiceState() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getCollectTime() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getCollectCount() + \"'\");\n stringBuilder.append(\"),\");\n } else {\n stringBuilder.append(\"(\");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getComponentId() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getName() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getSegmentId() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getServiceState() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getCollectTime() + \"', \");\n stringBuilder.append(\"'\" + healthMessageDOList.get(i).getCollectCount() + \"'\");\n stringBuilder.append(\")\");\n }\n }\n return stringBuilder.toString();\n }", "@Override\n public boolean save(List<FeedbackResource> feedbackResourceList) throws RemoteException{\n AtomicInteger success = new AtomicInteger();\n feedbackResourceList.forEach(feedbackResource -> {\n if (feedbackRepository.save(feedbackResource))\n success.getAndIncrement();\n });\n return feedbackResourceList.size() == success.get();\n }", "public boolean enqueueDtoMessage(Object Dto) throws Exception;", "public void updateList(List<T> ListObject) throws DaoException;", "public List<GameEvents> saveGameEvents(List<GameEvents> gameEvents);", "public int delegateInsertListTx(java.util.List<LdPublisher> entityList) {\r\n assertListNotNullAndEmpty(entityList);\r\n return getMyDao().insertList(entityList);\r\n }", "@Override\r\n\tprotected void saveData(List<ApplMstHousestatus> bList, int numOfBulkRecord) {\n\t\tList<ApplMstHousestatusDest> amhdList = new ArrayList<>();\r\n\t\tfor(ApplMstHousestatus amh : bList) {\r\n\t\t\tApplMstHousestatusDest amhd = new ApplMstHousestatusDest();\r\n\t\t\ttry {\r\n\t\t\t\tBeanUtils.copyProperties(amhd, amh);\r\n\t\t\t} catch (IllegalAccessException | InvocationTargetException e) {\r\n\t\t\t\tlogger.error(e);\r\n\t\t\t}\r\n\t\t\tamhdList.add(amhd);\r\n\t\t}\r\n\t\tif(amhdList.size() > 0)\r\n\t\t\tservice2.save(amhdList, numOfBulkRecord);\r\n\t}", "protected void doSaveMessages(ActionMessages messages) {\n if (messages == null || messages.isEmpty()) { // same specification as ActionMessagesUtil\n remove(Globals.MESSAGE_KEY);\n return;\n }\n setAttribute(Globals.MESSAGE_KEY, messages);\n }", "void saveRealtimeListUsers(final RealtimeList realtimeList) {\n deleteRealtimeListUsers(realtimeList.getId());\n\n // Add in all of the entries.\n ejt.batchUpdate(\"insert into realtime_list_users values (?,?,?)\", new BatchPreparedStatementSetter() {\n @Override\n public int getBatchSize() {\n return realtimeList.getRealtimeListUsers().size();\n }\n\n @Override\n public void setValues(PreparedStatement ps, int i) throws SQLException {\n ShareUser wlu = realtimeList.getRealtimeListUsers().get(i);\n ps.setInt(1, realtimeList.getId());\n ps.setInt(2, wlu.getUserId());\n ps.setInt(3, wlu.getAccessType());\n }\n });\n }", "private void saveStoreListChangesInDb() {\n if (currentUser != null) {\n final String userId = currentUser.getUid();\n firebaseDb.collection(userId)\n .document(shoppingListName)\n .update(\"stores\", storeList)\n .addOnFailureListener(e -> Toast.makeText(getApplicationContext(),\n R.string.Update_list_error_msg, Toast.LENGTH_SHORT)\n .show());\n }\n }", "@Override\n public void writeToDb(List<String> data) {\n\n try {\n openConnection();\n if (validateData((ArrayList<String>) data)) {\n for (String datum : data) {\n bufferedWriter.write(getDate() + \" - \" + datum);\n bufferedWriter.newLine();\n }\n bufferedWriter.write(\"==================\\n\");\n System.out.println(\"All data is written to MS SQL DB\");\n closeConnection();\n }\n } catch (IOException e) {\n System.err.println(\"ERROR!!!\");\n e.printStackTrace();\n }\n\n }", "@SysLogMethod(\"测试记录上传附件\")\n @ApiOperation(\"申请单测试记录批量保存附件\")\n @PostMapping(value = \"/saveAttachmentList\")\n public Result saveAttachmentList(@RequestBody List<ApplyNoteTestRecordAttachment> applyNoteTestRecordAttachments) {\n boolean result = iApplyNoteTestRecordAttachmentService.saveAttachmentList(applyNoteTestRecordAttachments);\n if (result) {\n return OK;\n }\n return new Result(ResultCode.FAIL);\n }", "public interface EbOrderDetailDao {\n\n /**\n * 这里保存的并不是List集合,因为考虑到了并发的问题,这里最好使用单个实体\n * 即时一个订单中有多个订单项,这里使用单个实体会方便一点!\n * @param orderDetail\n */\n void saveOrderDetail(EbOrderDetail orderDetail);\n\n\n\n}", "@Override\n\tpublic void save(List<User> entity) {\n\t\t\n\t}", "void saveLineItemList(List<LineItem> lineItemList);", "@Override\n\tpublic void batchCodeProcess(ArrayList<CodeBean> codeList) {\n\t\tif(logger.isDebugEnabled()){ logger.debug(\" CodeListApplicationServiceImpl : batchCodeProcess 시작 \"); }\n\t\ttry {\n\t\t\t\n\t\t\tfor (CodeBean code : codeList) {\n\t\t\t\tswitch (code.getStatus()) {\n\t\t\t\tcase \"insert\":\n\t\t\t\t\tcodeDAO.insertCode(code); \n\t\t\t\t\tbreak;\n\t\t\t\tcase \"update\":\n\t\t\t\t\tcodeDAO.updateCode(code); \n\t\t\t\t\tbreak;\n\t\t\t\tcase \"normal\":\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"delete\":\n\t\t\t\t\tcodeDAO.deleteCode(code.getDivisionCode());\t\n\t\t\t\t}\n\t\t\t\tArrayList<DetailCodeBean> DetailcodeList = code.getCodeDetailList();\n\t\t\t\tfor (DetailCodeBean codeDetailBean : DetailcodeList) {\n\t\t\t\t\tswitch (codeDetailBean.getStatus()) {\n\t\t\t\t\tcase \"insert\":\n\t\t\t\t\t\tcodeDetailDAO.insertDetailCode(codeDetailBean);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"update\":\n\t\t\t\t\t\tcodeDetailDAO.updateDetailCode(codeDetailBean);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"delete\":\n\t\t\t\t\t\tcodeDetailDAO.deleteDetailCode(codeDetailBean.getCodeNo());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (DataAccessException e) {\n\t\t\tlogger.fatal(e.getMessage());\n\n\t\t\tthrow e;\n\t\t}\n\t\tif(logger.isDebugEnabled()){ logger.debug(\" CodeListApplicationServiceImpl : batchCodeProcess 종료 \"); }\n\t}", "@Override\n protected void saveMessageToDatabase(String conversationKey, String message) {\n String messageKey = messagesRef.push().getKey();\n HashMap<String, Object> messageInfo = buildMessageInfo(message);\n messagesRef.child(messageKey).updateChildren(messageInfo);\n\n FirebaseDatabase.getInstance().getReference().child(\"Groups\").\n child(getConversationKey()).child(\"lastMessageTime\").setValue(Calendar.getInstance().getTimeInMillis());\n }", "private void saveItems(List<ItemNews> itemList) {\n Optional<ItemNews> firstByOrderByDateTimeDesc = itemRepository.findFirstByOrderByDateTimeDesc();\n if (firstByOrderByDateTimeDesc.isPresent()) {\n itemRepository.saveAll(itemList.stream()\n .filter(o -> o.getDateTime().isAfter(firstByOrderByDateTimeDesc.get().getDateTime()))\n .collect(Collectors.toList()));\n } else {\n itemRepository.saveAll(itemList);\n }\n }", "@Override\r\n\tpublic void addBatch(List<CardApply> list) {\n\t\tfor (CardApply cardApply : list) {\r\n\t\t\tcardApplyDao.save(cardApply);\r\n\t\t}\r\n\t}", "@Transactional\n public List<Schedule> saveSchedules(List<ScheduleDTO> schedules) {\n return schedules.stream()\n .map((schedule) -> saveSchedule(schedule.getId(),\n\t\t\t\t\t\tschedule.getParentId(),\n\t\t\t\t\t\tschedule.getscheduleName(),\n\t\t\t\t\t\tschedule.getscheduleDetails(),\n\t\t\t\t\t\tschedule.getscheduleTime()\n\t\t\t\t\t ))\n .collect(Collectors.toList());\n }", "public static void saveMessages(ArrayList<Message> messages,String filename)\r\n\t{\r\n\t\t//Write to disk\r\n\t\ttry \r\n\t\t{\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File(filename)));\r\n\t\t\toos.writeObject(messages);\r\n\t\t\toos.flush();\r\n\t\t\toos.close();\r\n\t\t\tSystem.out.println(\"Saved messages to disk: \" + filename);\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tSystem.err.println(\"Could not save backup: \" + e.getMessage());\r\n\t\t}\r\n\t}", "void transferOwnerShipToUser(List<String> list, String toEmail);", "@Override\n\t\tpublic void addReportToDBMessage(ArrayList<Object> msg) {\n\t\t\tString parkName = (String) msg.get(3);\n\t\t\tint month = ((Date) msg.get(1)).getMonth() + 1;\n\t\t\tString stringToAdd = \"\";\n\t\t\tArrayList<String> DataToAddToDB = (ArrayList<String>) msg.get(2);\n\t\t\tfor (String s : DataToAddToDB)\n\t\t\t\tstringToAdd += s + \" \";\n\t\t\tstringToAdd = stringToAdd.substring(0, stringToAdd.length() - 1);\n\t\t\thashMapDB.get(parkName).put(month, stringToAdd);\n\t\t}", "@Override public void store(SQLiteDatabase db, List<TimelineItemDTOKey> items)\n {\n }", "public void saveCurrencyListToDb() {\n LOGGER.info(\"SAVING CURRENCY LIST TO DB.\");\n List<Currency> currencyList = currencyService.fetchCurrencyFromCRB();\n currencyRepository.saveAll(currencyList);\n }", "public abstract List<CustomerOrder> save(Iterable<CustomerOrder> entities);", "protected void saveMessage(HttpServletRequest request, String msg) {\r\n List messages = (List) request.getSession().getAttribute(\"messages\");\r\n if (messages == null) {\r\n messages = new ArrayList();\r\n }\r\n messages.add(msg);\r\n request.getSession().setAttribute(\"messages\", messages);\r\n }", "public List<? extends PersistableBusinessObject> save(List businessObjects) throws DataAccessException {\r\n \tif ( LOG.isDebugEnabled() ) {\r\n \t\tLOG.debug( \"About to persist the following BOs:\" );\r\n \t\tfor ( Object bo : businessObjects ) {\r\n \t\t\tLOG.debug( \" --->\" + bo );\r\n \t\t}\r\n \t}\r\n for (Iterator i = businessObjects.iterator(); i.hasNext();) {\r\n Object bo = i.next();\r\n getPersistenceBrokerTemplate().store(bo);\r\n }\r\n return businessObjects;\r\n }", "@Override\r\n\t@Transactional\r\n\tpublic void saveFile(List<MultipartFile> mpf, Board board) {\n\t\t\r\n\t\tList<File> files = new ArrayList<>();\r\n\t\t\r\n\t\tfor(MultipartFile mf : mpf) {\r\n\t\t\t\r\n\t\t\tString uuid = UUIDCreator.makeUUID();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\tFile file = File\r\n\t\t\t\t\t.builder()\r\n\t\t\t\t\t.originalName(mf.getOriginalFilename())\r\n\t\t\t\t\t.UUID(uuid)\r\n\t\t\t\t\t.path(FileUtil.parseInsertFile(mf, uuid))\r\n\t\t\t\t\t.UUID(uuid)\r\n\t\t\t\t\t.build();\r\n\t\t\t\r\n\t\t\tfiles.add(file);\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}\r\n\t\t}\r\n\t\t\r\n\t\tList<File> savedFileList = fileRepository.save(files);\r\n\t\t\r\n\t\tfor(File savedFile : savedFileList) {\r\n\t\t\tsaveService.saveSave(savedFile, board);\r\n\t\t\tSystem.out.println(savedFile.getOriginalName());\r\n\t\t}\r\n\t}", "public List<ModelEntity> induceModelFromDb(Collection<String> messages) {\n DatabaseUtil dbUtil = new DatabaseUtil(this.helperName);\n\n return dbUtil.induceModelFromDb(messages);\n }", "public void saveBid(BidListModel bidList) {\n bidListRep.save(bidList);\n }", "public boolean bulkNotificationsInsert(List<Notifications> list){\n\t\tboolean status = false;\n\t\ttry{\n\t\t\tSession session = CassandraCluster.getKeyspaceSession(Constants.CASSANDRA_KEYSPACE, Constants.CASSANDRA_PORT, Constants.CASSANDRA_HOSTS);\n\t\t\tMappingManager mappingManager = new MappingManager(session);\n\t\t\tMapper<Notifications> mapper = mappingManager.mapper(Notifications.class);\n\t\t\tBatchStatement batchStatement = new BatchStatement();\n\t\t\tfor(Notifications bean:list){\n\t\t\t\tStatement statement = mapper.saveQuery(bean);\n\t\t\t\tbatchStatement.add(statement);\n\t\t\t}\n\t\t\tsession.execute(batchStatement);\n\t\t\tstatus = true;\n\t\t}catch(Exception e){\n\t\t\tlogger.error(\"Exception Occured while performing Batch-Statement Execution Notifications Object\", e);\n\t\t}\n\t\treturn status;\n\t}", "private void saveIds(ArrayList<String> idList) {\n\n\t\ttry {\n\t\t\tFileOutputStream fileOutputStream = context.openFileOutput(\n\t\t\t\t\tSAVE_FILE, Context.MODE_PRIVATE);\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(\n\t\t\t\t\tfileOutputStream);\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tgson.toJson(idList, outputStreamWriter); // Serialize to Json\n\t\t\toutputStreamWriter.flush();\n\t\t\toutputStreamWriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public abstract int insert(Iterable<T> messages)\n throws DatabaseRequestException, DatabaseSchemaException;", "private void saveList() throws Exception {\n JournalEntries.saveList(JournalList,ReconcileCur.ReconcileNum);\n }", "Boolean updateList(List<Customer> list);", "@PostMapping(\"/sendMessage\")\r\n public String sendMessage(@ModelAttribute(\"post\") PostDTO postDTO, Model model) {\r\n try {\r\n jdbcTemplate.execute(\"INSERT INTO Posts(Nickname, Message, PostDate)\\n\" +\r\n \"VALUES ('\" + postDTO.getNickname() + \"', '\" + postDTO.getMessage() + \"', '\" +\r\n new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date()) + \"')\");\r\n } catch (DataAccessException exception) {\r\n LOGGER.warn(exception.getMessage());\r\n }\r\n return goToForumPage(model);\r\n }", "@Override\r\n\tpublic List<EmailInfoBO> mapDTOs2BOs(List<EmailInfoDTO> dtos) {\n\t\treturn null;\r\n\t}", "private List<ComentarioDTO> listEntity2DTO(List<ComentarioEntity> entityList) {\n List<ComentarioDTO> list = new ArrayList();\n for (ComentarioEntity entity : entityList) {\n list.add(new ComentarioDTO(entity));\n }\n return list;\n }", "@Override\n\tpublic void batchSave(Collection<UserOrderDetail> entities) {\n\t\t\n\t}", "private Message save(Message message) {\n\n try {\n\n statement.execute(\"insert into messages (sender_id, receiver_id, transmitted_time, text)\" +\n \"values ('\" + message.getSender_id() + \"', '\" + message.getReceiver_id()\n + \"', current_timestamp() , '\" + message.getText() + \"');\");\n ResultSet resultSet = statement.executeQuery(\n \"select * from messages \" +\n \"where messages.index = \" +\n \"(select max(messages.index) from messages);\"\n );\n\n if (resultSet.next()) {\n message.setIndex(resultSet.getLong(\"index\"));\n message.setTransmitted_time(resultSet.getTimestamp(\"transmitted_time\"));\n }\n\n message.setReadOrNot(false);\n return message;\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n\n return null;\n\n }", "private void saveChatMessagesInFile() {\n\n if (chatMessages.isEmpty()) {\n return;\n }\n chatMessageFileName = utils.getUserName() + chatPartner + \"TutorscoutChatMessages\";\n\n StringBuilder messagesString = new StringBuilder();\n\n\n for (ChatMessage message : chatMessages) {\n messagesString.append(message.toString());\n }\n\n\n try {\n\n FileOutputStream fos = getContext().openFileOutput(chatMessageFileName, Context.MODE_PRIVATE);\n fos.write(messagesString.toString().getBytes());\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public List<MemberDto> toDtoList(List<Member> entityList) {\r\n List<MemberDto> dtoList = new ArrayList<MemberDto>();\r\n for (Member entity : entityList) {\r\n dtoList.add(copyEntityToDto(entity, new MemberDto()));\r\n }\r\n return dtoList;\r\n }", "private <T> Result<T> add(List<T> list, Class<?> cn) throws IOException, CsvDataTypeMismatchException, CsvRequiredFieldEmptyException {\n initWriter(cn);\n StatefulBeanToCsv<T> beanToCsv = new StatefulBeanToCsvBuilder<T>(writer)\n .withApplyQuotesToAll(false)\n .build();\n beanToCsv.write(list);\n close();\n return new Result<>(list, ResultType.OK, Constants.INSERTED_SUCCESSFULLY);\n }", "@Override\n\tpublic String saveMsg(Map<String, Object> param) throws Exception {\n\t\tCustomerMessageVO vo = (CustomerMessageVO) param.get(\"msgVO\");\n\t\tAdminUser adminuser = (AdminUser) param.get(CommonUtil.USERKEY);\n\t\t\n\t\tCustomerUser toUser = null;\n\t\tif(!StringUtils.isEmpty(vo.getToUserName())){\n\t\t\ttoUser = userDao.queryUserByName(vo.getToUserName());\n\t\t}else{\n\t\t\ttoUser = userDao.queryById(vo.getToUserId());\n\t\t}\n\t\t\n\t\tCustomerMessage entity = new CustomerMessage();\n\t\tentity.setRefUserId(0);\n\t\tentity.setRefUserName(\"系统消息\");\n\t\tentity.setToUserId(toUser.getId());\n\t\tentity.setToUserName(toUser.getCustomerName());\n\t\tentity.setTitle(vo.getTitle());\n\t\tentity.setMessage(vo.getMessage());\n\t\tentity.setStatus(CommonUtil.MSG_STATUS_UNREAD);\n\t\tif(adminuser != null && adminuser.getUserName()!=null){\n\t\t\tentity.addInit(adminuser.getUserName());\n\t\t}else{\n\t\t\tentity.addInit(\"sys\");\n\t\t}\n\t\tmsgDao.save(entity);\n\t\tif(!vo.getMsgType().equals(\"0\")){\n\t\t\tList<CustomerUser> lowerUser = userDao.querySunUsersByParent(toUser);\n\t\t\tfor(CustomerUser customer : lowerUser){\n\t\t\t\tCustomerMessage sunEntity = new CustomerMessage();\n\t\t\t\tDozermapperUtil.getInstance().map(entity, sunEntity);\n\t\t\t\tsunEntity.setToUserId(customer.getId());\n\t\t\t\tsunEntity.setToUserName(customer.getCustomerName());\n\t\t\t\tmsgDao.save(sunEntity);\n\t\t\t}\n\t\t}\n\t\treturn \"success\";\n\t}", "public void addMessageListBeforeLastOne(List<StringAndMessage> messageList){\n if(messageList.isEmpty()){\n //do nothing\n }\n if(this.messageListExpected.isEmpty()){\n this.messageListExpected.addAll(messageList);\n }\n else{\n this.messageListExpected.addAll(this.messageListExpected.size()- 1, messageList);\n }\n\n }", "private void postMessages() {\n List<models.MessageProbe> probes = new Model.Finder(String.class, models.MessageProbe.class).where().ne(\"curr_status\", 1).findList();\n for (models.MessageProbe currProbe : probes) {\n if ((currProbe.curr_status == models.MessageProbe.STATUS.WITH_ERROR) || (currProbe.curr_status == models.MessageProbe.STATUS.NEW)) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToPost());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.POSTED;\n currProbe.curr_error = null;\n postCounter++;\n }\n currProbe.update();\n }\n }\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.DELETED) {\n currProbe.delete();\n } else if (currProbe.curr_status == models.MessageProbe.STATUS.EDITED) {\n String contextErr = MiniGate.gate.sendCommandWithCheck(\"RIBBON_NCTL_ACCESS_CONTEXT:{\" + currProbe.author + \"}\");\n if (contextErr != null) {\n synchronized (dataLock) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = contextErr;\n currProbe.update();\n errCounter++;\n }\n } else {\n String postErr = MiniGate.gate.sendCommandWithCheck(currProbe.getCsvToModify());\n synchronized (dataLock) {\n if (postErr != null) {\n currProbe.curr_status = models.MessageProbe.STATUS.WITH_ERROR;\n currProbe.curr_error = postErr;\n errCounter++;\n } else {\n currProbe.curr_status = models.MessageProbe.STATUS.WAIT_CONFIRM;\n currProbe.curr_error = null;\n editCounter++;\n }\n currProbe.update();\n }\n }\n }\n }\n }", "public void addBatch(List<Map<String, String>> batchData);", "public boolean saveCustomerFeedbackDetail(Connection con , \n\t\t\t List<Management> listManagement ,\n\t\t\t Map<Long , String> mapUserType ,\n\t\t\t List<String> listField ,\n\t\t\t String ids ) throws AncestryException\n\t{\n\t\t\tboolean flag = true;\n\t\t\tList<CustomerFeedbackDetail> listCustomer = new ArrayList<CustomerFeedbackDetail>();\n\t\t\tCustomerFeedbackDetail custDetail ;\n\t\t\ttry {\n\t\t\t\tString userType = \"\";\n\t for (Management management : listManagement) \n\t {\n\t \tuserType = mapUserType.get(management.getId());\n\t \t\t\tfor (String field : listField) \n\t \t\t\t{\n\t \t\t\t\tcustDetail = new CustomerFeedbackDetail();\n\t \t\t\t\tcustDetail.setManagement_id(management.getId());\n\t \t\t\t\tcustDetail.setImage_path(management.getFilepath());\n\t \t\t\t\tcustDetail.setImage_name(management.getFilename());\n\t \t\t\t\tcustDetail.setForm_id(management.getFormid());\n\t \t\t\t\tcustDetail.setField(field);\n\t \t\t\t\tcustDetail.setUser_type(userType);\n\t \t\t\t\tcustDetail.setGroup_field(field);\n\t \t\t\t\tcustDetail.setFailure_reason(\"PJM assign job\");\n\t \t\t\t\tcustDetail.setIs_rework_field(true);\n\t \t\t\t\tcustDetail.setRework_type(2);\n\t \t\t\t\tlistCustomer.add(custDetail);\n\t \t\t\t}\n\t\t\t\t}\n\t\t\t\tif(listCustomer.size() > 0) {\n\t\t\t\t\tcon = db.getConnectByProject(project);\n\t\t\t\t\tflag = JdbcHelper.saveListBean(con, TableName.customer_feedback_detail , CustomerFeedbackDetail.class ,listCustomer, \"id\" , true);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tflag = false;\n\t\t\t\tthrow new AncestryException(\"saveCustomerFeedbackDetail : \" + e.toString(),e);\n\t\t\t}\n\t\t\treturn flag;\n\t}", "public Builder setList(edu.usfca.cs.dfs.StorageMessages.List value) {\n if (listBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n msg_ = value;\n onChanged();\n } else {\n listBuilder_.setMessage(value);\n }\n msgCase_ = 5;\n return this;\n }", "@Override\n\tpublic String updateBatch(List<Map<String, Object>> entityMap)\n\t\t\tthrows DataAccessException {\n\t\treturn null;\n\t}", "public void setListData(List<MessageListItem> listData) {\n if (DEBUG) Timber.v(\"setListData, Size: %s\", listData == null ? \"null\" : listData.size());\n this.listData = listData;\n notifyDataSetChanged();\n }", "public void postMessage(Message message){\n messageRepository.addMessage(message);\n }", "void setListProperty(Object name, List<Object> list) throws JMSException;", "void sendToDB() {add to sell SellItem\n//\n for (int i = 0; i < menuItems.size(); i++) {\n Map<String, String> params = new HashMap<>();\n params.put(\"user_sell_it_id\", session.getshared(\"id\"));\n params.put(\"sell_menu_id\", sellMenuId);\n params.put(\"item_name\", menuItems.get(i).getItem_name());\n params.put(\"item_price\", menuItems.get(i).getItem_price().toString());\n params.put(\"item_count\", menuItems.get(i).getItem_count().toString());\n params.put(\"item_id\", menuItems.get(i).getItem_id().toString());\n params.put(\"f4\", menuItems.get(i).getF4());\n // params.put(\"item_cost\", String.valueOf(menuItems.get(i).getItem_cost());\n// SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\", Locale.getDefault());\n// String dt = sdf.format(new Date());\n// params.put(\"datetime\", dt);\n\n//\n if (menuItems.get(i).getId() == null) {\n\n sendItems(addSellMenuItemURL, params);\n\n } else {\n //updateitems using the id and count\n Map<String, String> upParams = new HashMap<>();\n upParams.put(\"id\", menuItems.get(i).getId().toString());\n upParams.put(\"item_count\", menuItems.get(i).getItem_count().toString());\n // upParams.put(\"datetime\", dt);\n sendItems(updatURL, upParams);\n }\n\n\n\n }\n\n\n show_menu(Integer.valueOf(sellMenuId));\n\n\n }", "@PUT()\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n @Path(\"/CreateMessage\")\n public Response createMessage(@FormParam(\"username\") String username,\n @FormParam(\"password\") String password,\n @FormParam(\"gson_message\") String msgJsonString)\n {\n Gson gson = new Gson();\n DTO_Message messageToCreate = gson.fromJson(msgJsonString, DTO_Message.class);\n System.out.println(messageToCreate.getTitle()+\" \"+messageToCreate.getContent()+\" \"+messageToCreate.getToUsername() +\" \"+messageToCreate.getFromId()+\" \"+messageToCreate.isRead());\n\n DB_Manager databaseManager = new DB_Manager();\n DTO_User user = databaseManager.getUserByNameAndPassword(username, password);\n if(user !=null)\n {\n boolean logList = databaseManager.createMessageByUser(messageToCreate, user);\n if(logList)\n {\n return Response.status(200).entity(RESULT_SUCCESS).build();\n }\n }\n return Response.status(403).entity(RESULT_FAILURE).build();\n\n }", "public static void guardarDatos(ArrayList<Enlace> lista_enlaces) {\n\t\tSession sesion = sf.openSession();\r\n\t\tTransaction t = sesion.beginTransaction();\r\n\t\tfor (Enlace enlace : lista_enlaces) {\r\n\t\t\tsesion.save(enlace);\r\n\t\t}\r\n\t\tt.commit();\r\n\r\n\t}", "public void writeToDatabase(List<Page> pageList) {\n\t\tDbConnector db = null;\n\t\ttry {\n\t\t\tdb = new DbConnector();\n\t\t} catch (ClassNotFoundException | SQLException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tfor (Page page : pageList) {\n\t\t\ttry {\n\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_INSERT, Arrays.asList(String.valueOf(page.getPageId()),\n\t\t\t\t\t\tpage.getTitle(), String.valueOf(page.getNs()), \"EN\"));\n\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_CONTENT_INSERT,\n\t\t\t\t\t\tArrays.asList(String.valueOf(page.getPageId()), page.getExtract()));\n\t\t\t\tint position = 0;\n\t\t\t\tfor (String key : page.getExtractMap().keySet()) {\n\t\t\t\t\tString fullText = \"\";\n\t\t\t\t\tLinkedHashMap<String, String> textMap = page.getExtractMap().get(key);\n\t\t\t\t\tfor (String textMapKey : textMap.keySet()) {\n\t\t\t\t\t\tfullText += textMap.get(textMapKey);\n\t\t\t\t\t}\n\t\t\t\t\tdb.executeUpdate(SqlConstants.PAGE_EXTRACT_INSERT,\n\t\t\t\t\t\t\tArrays.asList(String.valueOf(page.getPageId()), key, fullText, String.valueOf(position)));\n\t\t\t\t\tposition++;\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tdb.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic String saveBatch(String userInfo, String saveJsonList)\r\n\t\t\t {\n\t\treturn null;\r\n\t}" ]
[ "0.6991485", "0.6077334", "0.607236", "0.58694595", "0.586409", "0.57651675", "0.5743956", "0.5737177", "0.5724037", "0.56728756", "0.56637925", "0.5628871", "0.56145877", "0.5528841", "0.5528613", "0.54951686", "0.5491342", "0.54830444", "0.5455203", "0.54416794", "0.5433459", "0.5433117", "0.5432805", "0.54159206", "0.54015565", "0.5392002", "0.5384025", "0.53707325", "0.5339114", "0.53372824", "0.53365993", "0.53269035", "0.53135973", "0.5290991", "0.52493304", "0.52349854", "0.52295494", "0.5225062", "0.52122253", "0.51983404", "0.51971585", "0.5193202", "0.519069", "0.51878357", "0.51790094", "0.51597327", "0.51367426", "0.5130937", "0.51194924", "0.5115958", "0.51117545", "0.5100634", "0.5097406", "0.50972086", "0.5095354", "0.5094672", "0.509161", "0.50778717", "0.50745744", "0.5058954", "0.5054029", "0.5053195", "0.50388646", "0.5031083", "0.5025712", "0.5014994", "0.50043476", "0.49958143", "0.4993996", "0.4992398", "0.49903652", "0.49882588", "0.4986361", "0.49742648", "0.49727273", "0.49709398", "0.49650082", "0.49644", "0.4956347", "0.49473956", "0.49465975", "0.49456617", "0.4942303", "0.49281648", "0.491712", "0.4914736", "0.49145642", "0.49130207", "0.49097311", "0.49095103", "0.48992226", "0.4893021", "0.48908833", "0.4888399", "0.4887136", "0.48781934", "0.48716146", "0.48634365", "0.48616904", "0.48569155" ]
0.8657627
0
////////Evaluacion Plan de Vida
public void ingresarEvalPlanVida() throws SQLException { if (vistaEvaPlanVid.getTxtCedula().getText().isEmpty()) { JOptionPane.showMessageDialog(null, "Ingrese primero cédula y presione 'Enter'", "Ingrese Valores", JOptionPane.ERROR_MESSAGE); } else { if (vistaEvaPlanVid.getDtcFecha().getDate() == null) { JOptionPane.showMessageDialog(null, "Ingrese Fecha", "Ingrese Valores", JOptionPane.WARNING_MESSAGE); } else { if (vistaEvaPlanVid.getDtcFechaEval().getDate() == null) { JOptionPane.showMessageDialog(null, "Ingrese Fecha de Evaluación", "Ingrese Valores", JOptionPane.WARNING_MESSAGE); } else { evalPlModelDB.setVictima_codigo(Integer.parseInt(vistaEvaPlanVid.getTxtCodigo().getText())); evalPlModelDB.setPersonal_codigo(evalPlModelDB.verifiUserP(personal_cod)); evalPlModelDB.setEvaluacion_fecha(obtenerFecha(vistaEvaPlanVid.getDtcFecha())); evalPlModelDB.setEvaluacion_proxima(obtenerFecha(vistaEvaPlanVid.getDtcFechaEval())); if (evalPlModelDB.IngresarEvaluacionPlaVida()) { JOptionPane.showMessageDialog(null, "A continuación presione el botón guardar para completar esta sección"); vistaEvaPlanVid.getBtnObjetivoGeneral().setEnabled(true); vistaEvaPlanVid.getBtnObjetivosEspecificos().setEnabled(true); vistaEvaPlanVid.getBtnGuradrarDesa().setEnabled(true); vistaEvaPlanVid.getBtnGuradar().setEnabled(false); } else { JOptionPane.showMessageDialog(null, "Error al continuar, vuelva a intentar"); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void evaluar(int resistencia, int capacidad, int velocidad) {\n\t\t\n\t}", "public static void getValuationSlot() {\n float locX = M.evaluateLoc.x;\n float locY = M.evaluateLoc.y;\n M.lastZoneValuation = M.evaluateLoc.distanceTo(M.finalMove) * M.moveVectorStr; //Desire to move towards our main goal\n float test1;\n float test2;\n switch (angledRectangleCount) {\n default:\n case 20:\n if (M.evaluateLoc.isWithinDistance(Z20_center, Z20_maxdist)) {\n test1 = Float.sum(locX * Z20_p21x, locY * Z20_p21y);\n if (test1 >= Z20_dotsection2 && test1 <= Z20_p21MagSquared) {\n test2 = Float.sum(locX * Z20_p41x, locY * Z20_p41y);\n if (test2 >= Z20_dotsection4 && test2 <= Z20_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z20_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 19:\n if (M.evaluateLoc.isWithinDistance(Z19_center, Z19_maxdist)) {\n test1 = Float.sum(locX * Z19_p21x, locY * Z19_p21y);\n if (test1 >= Z19_dotsection2 && test1 <= Z19_p21MagSquared) {\n test2 = Float.sum(locX * Z19_p41x, locY * Z19_p41y);\n if (test2 >= Z19_dotsection4 && test2 <= Z19_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z19_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 18:\n if (M.evaluateLoc.isWithinDistance(Z18_center, Z18_maxdist)) {\n test1 = Float.sum(locX * Z18_p21x, locY * Z18_p21y);\n if (test1 >= Z18_dotsection2 && test1 <= Z18_p21MagSquared) {\n test2 = Float.sum(locX * Z18_p41x, locY * Z18_p41y);\n if (test2 >= Z18_dotsection4 && test2 <= Z18_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z18_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 17:\n if (M.evaluateLoc.isWithinDistance(Z17_center, Z17_maxdist)) {\n test1 = Float.sum(locX * Z17_p21x, locY * Z17_p21y);\n if (test1 >= Z17_dotsection2 && test1 <= Z17_p21MagSquared) {\n test2 = Float.sum(locX * Z17_p41x, locY * Z17_p41y);\n if (test2 >= Z17_dotsection4 && test2 <= Z17_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z17_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 16:\n if (M.evaluateLoc.isWithinDistance(Z16_center, Z16_maxdist)) {\n test1 = Float.sum(locX * Z16_p21x, locY * Z16_p21y);\n if (test1 >= Z16_dotsection2 && test1 <= Z16_p21MagSquared) {\n test2 = Float.sum(locX * Z16_p41x, locY * Z16_p41y);\n if (test2 >= Z16_dotsection4 && test2 <= Z16_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z16_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 15:\n if (M.evaluateLoc.isWithinDistance(Z15_center, Z15_maxdist)) {\n test1 = Float.sum(locX * Z15_p21x, locY * Z15_p21y);\n if (test1 >= Z15_dotsection2 && test1 <= Z15_p21MagSquared) {\n test2 = Float.sum(locX * Z15_p41x, locY * Z15_p41y);\n if (test2 >= Z15_dotsection4 && test2 <= Z15_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z15_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 14:\n if (M.evaluateLoc.isWithinDistance(Z14_center, Z14_maxdist)) {\n test1 = Float.sum(locX * Z14_p21x, locY * Z14_p21y);\n if (test1 >= Z14_dotsection2 && test1 <= Z14_p21MagSquared) {\n test2 = Float.sum(locX * Z14_p41x, locY * Z14_p41y);\n if (test2 >= Z14_dotsection4 && test2 <= Z14_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z14_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 13:\n if (M.evaluateLoc.isWithinDistance(Z13_center, Z13_maxdist)) {\n test1 = Float.sum(locX * Z13_p21x, locY * Z13_p21y);\n if (test1 >= Z13_dotsection2 && test1 <= Z13_p21MagSquared) {\n test2 = Float.sum(locX * Z13_p41x, locY * Z13_p41y);\n if (test2 >= Z13_dotsection4 && test2 <= Z13_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z13_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 12:\n if (M.evaluateLoc.isWithinDistance(Z12_center, Z12_maxdist)) {\n test1 = Float.sum(locX * Z12_p21x, locY * Z12_p21y);\n if (test1 >= Z12_dotsection2 && test1 <= Z12_p21MagSquared) {\n test2 = Float.sum(locX * Z12_p41x, locY * Z12_p41y);\n if (test2 >= Z12_dotsection4 && test2 <= Z12_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z12_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 11:\n if (M.evaluateLoc.isWithinDistance(Z11_center, Z11_maxdist)) {\n test1 = Float.sum(locX * Z11_p21x, locY * Z11_p21y);\n if (test1 >= Z11_dotsection2 && test1 <= Z11_p21MagSquared) {\n test2 = Float.sum(locX * Z11_p41x, locY * Z11_p41y);\n if (test2 >= Z11_dotsection4 && test2 <= Z11_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z11_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 10:\n if (M.evaluateLoc.isWithinDistance(Z10_center, Z10_maxdist)) {\n test1 = Float.sum(locX * Z10_p21x, locY * Z10_p21y);\n if (test1 >= Z10_dotsection2 && test1 <= Z10_p21MagSquared) {\n test2 = Float.sum(locX * Z10_p41x, locY * Z10_p41y);\n if (test2 >= Z10_dotsection4 && test2 <= Z10_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z10_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 9:\n if (M.evaluateLoc.isWithinDistance(Z9_center, Z9_maxdist)) {\n test1 = Float.sum(locX * Z9_p21x, locY * Z9_p21y);\n if (test1 >= Z9_dotsection2 && test1 <= Z9_p21MagSquared) {\n test2 = Float.sum(locX * Z9_p41x, locY * Z9_p41y);\n if (test2 >= Z9_dotsection4 && test2 <= Z9_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z9_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 8:\n if (M.evaluateLoc.isWithinDistance(Z8_center, Z8_maxdist)) {\n test1 = Float.sum(locX * Z8_p21x, locY * Z8_p21y);\n if (test1 >= Z8_dotsection2 && test1 <= Z8_p21MagSquared) {\n test2 = Float.sum(locX * Z8_p41x, locY * Z8_p41y);\n if (test2 >= Z8_dotsection4 && test2 <= Z8_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z8_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 7:\n if (M.evaluateLoc.isWithinDistance(Z7_center, Z7_maxdist)) {\n test1 = Float.sum(locX * Z7_p21x, locY * Z7_p21y);\n if (test1 >= Z7_dotsection2 && test1 <= Z7_p21MagSquared) {\n test2 = Float.sum(locX * Z7_p41x, locY * Z7_p41y);\n if (test2 >= Z7_dotsection4 && test2 <= Z7_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z7_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 6:\n if (M.evaluateLoc.isWithinDistance(Z6_center, Z6_maxdist)) {\n test1 = Float.sum(locX * Z6_p21x, locY * Z6_p21y);\n if (test1 >= Z6_dotsection2 && test1 <= Z6_p21MagSquared) {\n test2 = Float.sum(locX * Z6_p41x, locY * Z6_p41y);\n if (test2 >= Z6_dotsection4 && test2 <= Z6_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z6_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 5:\n if (M.evaluateLoc.isWithinDistance(Z5_center, Z5_maxdist)) {\n test1 = Float.sum(locX * Z5_p21x, locY * Z5_p21y);\n if (test1 >= Z5_dotsection2 && test1 <= Z5_p21MagSquared) {\n test2 = Float.sum(locX * Z5_p41x, locY * Z5_p41y);\n if (test2 >= Z5_dotsection4 && test2 <= Z5_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z5_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 4:\n if (M.evaluateLoc.isWithinDistance(Z4_center, Z4_maxdist)) {\n test1 = Float.sum(locX * Z4_p21x, locY * Z4_p21y);\n if (test1 >= Z4_dotsection2 && test1 <= Z4_p21MagSquared) {\n test2 = Float.sum(locX * Z4_p41x, locY * Z4_p41y);\n if (test2 >= Z4_dotsection4 && test2 <= Z4_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z4_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 3:\n if (M.evaluateLoc.isWithinDistance(Z3_center, Z3_maxdist)) {\n test1 = Float.sum(locX * Z3_p21x, locY * Z3_p21y);\n if (test1 >= Z3_dotsection2 && test1 <= Z3_p21MagSquared) {\n test2 = Float.sum(locX * Z3_p41x, locY * Z3_p41y);\n if (test2 >= Z3_dotsection4 && test2 <= Z3_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z3_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 2:\n if (M.evaluateLoc.isWithinDistance(Z2_center, Z2_maxdist)) {\n test1 = Float.sum(locX * Z2_p21x, locY * Z2_p21y);\n if (test1 >= Z2_dotsection2 && test1 <= Z2_p21MagSquared) {\n test2 = Float.sum(locX * Z2_p41x, locY * Z2_p41y);\n if (test2 >= Z2_dotsection4 && test2 <= Z2_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z2_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 1:\n if (M.evaluateLoc.isWithinDistance(Z1_center, Z1_maxdist)) {\n test1 = Float.sum(locX * Z1_p21x, locY * Z1_p21y);\n if (test1 >= Z1_dotsection2 && test1 <= Z1_p21MagSquared) {\n test2 = Float.sum(locX * Z1_p41x, locY * Z1_p41y);\n if (test2 >= Z1_dotsection4 && test2 <= Z1_p41MagSquared) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z1_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n }\n }\n case 0:\n }\n switch (circleCount) {\n case 20:\n if (M.evaluateLoc.isWithinDistance(Z20c_center, Z20c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z20c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 19:\n if (M.evaluateLoc.isWithinDistance(Z19c_center, Z19c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z19c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 18:\n if (M.evaluateLoc.isWithinDistance(Z18c_center, Z18c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z18c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 17:\n if (M.evaluateLoc.isWithinDistance(Z17c_center, Z17c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z17c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 16:\n if (M.evaluateLoc.isWithinDistance(Z16c_center, Z16c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z16c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 15:\n if (M.evaluateLoc.isWithinDistance(Z15c_center, Z15c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z15c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 14:\n if (M.evaluateLoc.isWithinDistance(Z14c_center, Z14c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z14c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 13:\n if (M.evaluateLoc.isWithinDistance(Z13c_center, Z13c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z13c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 12:\n if (M.evaluateLoc.isWithinDistance(Z12c_center, Z12c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z12c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 11:\n if (M.evaluateLoc.isWithinDistance(Z11c_center, Z11c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z11c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 10:\n if (M.evaluateLoc.isWithinDistance(Z10c_center, Z10c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z10c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 9:\n if (M.evaluateLoc.isWithinDistance(Z9c_center, Z9c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z9c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 8:\n if (M.evaluateLoc.isWithinDistance(Z8c_center, Z8c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z8c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 7:\n if (M.evaluateLoc.isWithinDistance(Z7c_center, Z7c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z7c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 6:\n if (M.evaluateLoc.isWithinDistance(Z6c_center, Z6c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z6c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 5:\n if (M.evaluateLoc.isWithinDistance(Z5c_center, Z5c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z5c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 4:\n if (M.evaluateLoc.isWithinDistance(Z4c_center, Z4c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z4c_desire);\n if (M.lastZoneValuation < cutoff) return;\n }\n case 3:\n if (M.evaluateLoc.isWithinDistance(Z3c_center, Z3c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z3c_desire);\n }\n case 2:\n if (M.evaluateLoc.isWithinDistance(Z2c_center, Z2c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z2c_desire);\n }\n case 1:\n if (M.evaluateLoc.isWithinDistance(Z1c_center, Z1c_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Z1c_desire);\n }\n case 0:\n }\n switch (vectorCircleCount) {\n case 20:\n if (M.evaluateLoc.isWithinDistance(Z20vc_center, Z20vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z20vc_baseDesire, M.evaluateLoc.distanceTo(Z20vc_center) * Z20vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 19:\n if (M.evaluateLoc.isWithinDistance(Z19vc_center, Z19vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z19vc_baseDesire, M.evaluateLoc.distanceTo(Z19vc_center) * Z19vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 18:\n if (M.evaluateLoc.isWithinDistance(Z18vc_center, Z18vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z18vc_baseDesire, M.evaluateLoc.distanceTo(Z18vc_center) * Z18vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 17:\n if (M.evaluateLoc.isWithinDistance(Z17vc_center, Z17vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z17vc_baseDesire, M.evaluateLoc.distanceTo(Z17vc_center) * Z17vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 16:\n if (M.evaluateLoc.isWithinDistance(Z16vc_center, Z16vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z16vc_baseDesire, M.evaluateLoc.distanceTo(Z16vc_center) * Z16vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 15:\n if (M.evaluateLoc.isWithinDistance(Z15vc_center, Z15vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z15vc_baseDesire, M.evaluateLoc.distanceTo(Z15vc_center) * Z15vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 14:\n if (M.evaluateLoc.isWithinDistance(Z14vc_center, Z14vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z14vc_baseDesire, M.evaluateLoc.distanceTo(Z14vc_center) * Z14vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 13:\n if (M.evaluateLoc.isWithinDistance(Z13vc_center, Z13vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z13vc_baseDesire, M.evaluateLoc.distanceTo(Z13vc_center) * Z13vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 12:\n if (M.evaluateLoc.isWithinDistance(Z12vc_center, Z12vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z12vc_baseDesire, M.evaluateLoc.distanceTo(Z12vc_center) * Z12vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 11:\n if (M.evaluateLoc.isWithinDistance(Z11vc_center, Z11vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z11vc_baseDesire, M.evaluateLoc.distanceTo(Z11vc_center) * Z11vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 10:\n if (M.evaluateLoc.isWithinDistance(Z10vc_center, Z10vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z10vc_baseDesire, M.evaluateLoc.distanceTo(Z10vc_center) * Z10vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 9:\n if (M.evaluateLoc.isWithinDistance(Z9vc_center, Z9vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z9vc_baseDesire, M.evaluateLoc.distanceTo(Z9vc_center) * Z9vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 8:\n if (M.evaluateLoc.isWithinDistance(Z8vc_center, Z8vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z8vc_baseDesire, M.evaluateLoc.distanceTo(Z8vc_center) * Z8vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 7:\n if (M.evaluateLoc.isWithinDistance(Z7vc_center, Z7vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z7vc_baseDesire, M.evaluateLoc.distanceTo(Z7vc_center) * Z7vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 6:\n if (M.evaluateLoc.isWithinDistance(Z6vc_center, Z6vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z6vc_baseDesire, M.evaluateLoc.distanceTo(Z6vc_center) * Z6vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 5:\n if (M.evaluateLoc.isWithinDistance(Z5vc_center, Z5vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z5vc_baseDesire, M.evaluateLoc.distanceTo(Z5vc_center) * Z5vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 4:\n if (M.evaluateLoc.isWithinDistance(Z4vc_center, Z4vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z4vc_baseDesire, M.evaluateLoc.distanceTo(Z4vc_center) * Z4vc_distanceDesire));\n if (M.lastZoneValuation < cutoff) return;\n }\n case 3:\n if (M.evaluateLoc.isWithinDistance(Z3vc_center, Z3vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z3vc_baseDesire, M.evaluateLoc.distanceTo(Z3vc_center) * Z3vc_distanceDesire));\n }\n case 2:\n if (M.evaluateLoc.isWithinDistance(Z2vc_center, Z2vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z2vc_baseDesire, M.evaluateLoc.distanceTo(Z2vc_center) * Z2vc_distanceDesire));\n }\n case 1:\n if (M.evaluateLoc.isWithinDistance(Z1vc_center, Z1vc_size)) {\n M.lastZoneValuation = Float.sum(M.lastZoneValuation, Float.sum(Z1vc_baseDesire, M.evaluateLoc.distanceTo(Z1vc_center) * Z1vc_distanceDesire));\n }\n case 0:\n }\n //Rarely used, should be optimized the same way if this becomes more common\n for (int i = M.squareIndexMinusOne; i >= 0; i--) {\n ZoneSquare zone = M.squares[i];\n if (zone.left < locX && locX < zone.right && locY < zone.top && locY > zone.bot) {\n M.lastZoneValuation += zone.desire;\n }\n }\n }", "public abstract double evaluer(SolutionPartielle s);", "float getEvaluationResult();", "int getEvaluations();", "abstract public Vertex getEvaluationResult();", "boolean estVide();", "private void estadoInicial(){\n double referencias[] = new double[sigmas.length];\n for(int i=0;i<sigmas.length;i++){\n referencias[i] = (ppl.limiteSuperiorR(i+1)+ppl.limiteInferiorR(i+1))/2;\n System.out.printf(\"limS:%g, limI:%g, Referencias[%d] = %g\\n\",ppl.limiteSuperiorR(i+1),ppl.limiteInferiorR(i+1),i,referencias[i]);\n }\n\n double Zc = ppl.Z(referencias[0],referencias[1]);\n TActual = Zc*0.2;\n System.out.printf(\"TActual:T%g \\n\",TActual);\n\n estadoMejor = new Estado(\n iteracionActual, \n TActual, \n referencias,\n Zc);\n\n calcularSoluciones(estadoMejor);\n calcularProbabilidadAceptacion(estadoMejor);\n\n historialEstados.add(estadoMejor);\n }", "public void calcularPesos(){\r\n StructursDecisors.weightsDecisors=new ArrayList();\r\n double [][] matrizEigenvectors=createMatriz();\r\n for(int i=0; i<Structurs.names.size();i++)\r\n for(int j=0; j<StructursDecisors.names.size(); j++)\r\n System.out.println(\"MatrizEigenvector[\"+i+\"][\"+j+\"]\"+\"=\"+matrizEigenvectors[i][j]);\r\n double eigenvectorCriterios[]=new double[Structurs.eigenvector.size()];\r\n for(int i=0; i<Structurs.eigenvector.size(); i++)\r\n eigenvectorCriterios[i]=(double) Structurs.eigenvector.get(i);\r\n double []vectorPesos=createArrayPesos(matrizEigenvectors, eigenvectorCriterios);\r\n \r\n }", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "public static void main(String[] args) {\n\t\tArrayList<Piloto> lst = new ArrayList <Piloto>();\r\n\t\tEvaluador evaluador = new Evaluador(lst);\r\n\t\t\r\n\t\tlst.add(new Piloto(\"Jorge\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Nicolas\", \"Perez\", true, 10 ));\r\n\t\tlst.add(new Piloto(\"Santiago\", \"Freire\", false, 0 ));\r\n\t\tlst.add(new Piloto(\"Ana\", \"Gutierrez\", false, 1 ));\r\n\t\tlst.add(new Piloto(\"Victoria\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Julia\", \"Freire\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Carlos\", \"Gutierrez\", true, 1 ));\r\n\t\t\r\n /*\r\n\t\t//le gusta volar y no tiene choques \r\n\t\tfor (Piloto p : evaluador.leGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n */\r\n \r\n\t\t//le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.leGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(true, true)) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))) {\r\n System.out.println(p);\r\n }\r\n \r\n lst.stream()\r\n .filter(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))\r\n .filter(p -> p.cantidadDeChoques == 10)\r\n .forEach(x -> System.out.println(x));\r\n \r\n\t\t\r\n /*\r\n\t\t//no le gusta volar y no tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t\r\n\t\t//no le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t*/\r\n\t\t\r\n\t}", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public void getResults() {\n\t\tSystem.out.println(\"|V| : \" + g.getV());\n\t\tSystem.out.println(\"|E| : \" + g.getE());\n\t\tSystem.out.println(\"Max flow : \" + g.getVertex(sink).e);\n\t\tSystem.out.println(\"Run time : \" + (System.currentTimeMillis()-timeStart) + \" ms\"+\"\\n\");\n\t}", "@Test\n\tvoid calcularSalarioSinVentasPagoPositivoTest() {\n\t\tEmpleadoPorComision empleadoPorComision = new EmpleadoPorComision(\"Hiromu Arakawa\", \"p24\", 400000, 0);\n\t\tdouble salarioEsperado = 400000;\n\t\tdouble salarioEmpleadoPorComision = empleadoPorComision.calcularSalario();\n\t\tassertEquals(salarioEsperado, salarioEmpleadoPorComision);\n\n\t}", "public void rodaAleatorio()\r\n {\r\n // Carrega os dados\r\n String ArqBD = \"Dados/Base\" + NUM_DB + \"/DADOS\" + NUM_PROV + \"x\" + NUM_PIS + \".txt\";\r\n String ArqReq = \"Requisicoes/Base\" + NUM_DB + \"/REQ\" + NUM_REQ + \"_\" + NUM_PIS + \".txt\";\r\n AvaliaFitness af = new AvaliaFitness(ArqBD, ArqReq);\r\n //af.imprime();\r\n \r\n // Variaveis\r\n int i, numIt, NUM_VARS = af.getBase_dados().getNumProvedores();\r\n long tempoInicial, tempoFinal;\r\n IndividuoBin atual;\r\n IndividuoBin melhor; \r\n IndividuoBin[] eleitos = new IndividuoBin[MAX_EXECUCOES]; \r\n double[] tempoExecusao = new double[MAX_EXECUCOES];\r\n \r\n System.out.println(\"# # # # # Algoritmo de Busca Aleatoria # # # # #\\n\"); \r\n //System.out.println(\"Espaço de busca: \" + (long)(Math.pow(2, NUM_VARS) - 1));\r\n System.out.println(\"NumProv: \" + NUM_PROV + \"\\nNumReq: \" + NUM_REQ + \"\\nNumPIs: \" + NUM_PIS + \"\\nNumDB: \" + NUM_DB);\r\n \r\n // Inicia as execuções\r\n int execucao = 1;\r\n // LOOP DE EXECUÇÕES\r\n while(execucao <= MAX_EXECUCOES)\r\n {\r\n numIt = 0; \r\n melhor = new IndividuoBin(NUM_VARS);\r\n // Inicia o cronômetro\r\n tempoInicial = System.currentTimeMillis(); \r\n // LOOP DE ITERAÇÕES\r\n while(numIt < MAX_ITERACOES)\r\n {\r\n atual = new IndividuoBin(NUM_VARS);\r\n atual.geraCodRand();\r\n //atual.imprimeCodificacao();\r\n af.fitness(atual);\r\n if(atual.getFitness() > melhor.getFitness())\r\n melhor = atual;\r\n \r\n numIt++;\r\n }\r\n // Interrompe o cronômetro\r\n tempoFinal = (System.currentTimeMillis() - tempoInicial);\r\n //System.out.println(\"\\nTempo de execução: \" + tempoFinal + \" ms ou \" + (tempoFinal/1000.0) + \" seg\\n\");\r\n \r\n // Guarda o melhor individuo e o tempo dessa execução\r\n eleitos[execucao - 1] = melhor;\r\n tempoExecusao[execucao - 1] = tempoFinal;\r\n \r\n // Imprime o melhor individuo\r\n System.out.println(\"\\nExecução \" + execucao + \": \");\r\n // Resposta\r\n if(!melhor.isPenalizado())\r\n {\r\n System.out.println(\"Melhor fitness: \" + melhor.getFitness());\r\n //System.out.print(\"Codificação: \");\r\n //melhor.imprimeCod();\r\n melhor.imprimeProvCod(); \r\n }\r\n else\r\n {\r\n System.out.println(\"Não foi encontrado um individuo valido com \" + MAX_ITERACOES + \" iterações.\"); \r\n System.out.println(\"Melhor fitness: \" + melhor.getFitness());\r\n //System.out.print(\"Codificação: \");\r\n //melhor.imprimeCod();\r\n melhor.imprimeProvCod(); \r\n }\r\n \r\n //System.out.println(\"\\nTempo da execução \" + execucao + \": \" + tempoFinal + \" ms ou \" + (tempoFinal/1000.0) + \" seg\");\r\n // Próxima execucao\r\n execucao++;\r\n } // Fim das execucoes\r\n \r\n // # # # # Estatisticas pós execuções do Aleatorio # # # #\r\n estatisticaFinais(eleitos, tempoExecusao);\r\n }", "@Test\n public void testVirement1() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(63000.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 28000.0;\n double excepted_solde_cpt1 = 35000.0;\n double excepted_solde_cpt2 = 71000.0;\n\n //Act\n assertEquals(true, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "@Override\r\n\tpublic double getVET() {\r\n\t\treturn getTMB() * getFatorAtividadeFisica();\r\n\t}", "public static Result comp2(){\n\t\t\t\n\t\t\t//Requête pour récupèrer le nombre de viols en espagne\n\t \t //requete pour recuperer les valeurs , les dates et les pays avec filtre date et pays \n\t \t// creattion d modele \n\t\t\tModel m = ModelFactory.createDefaultModel();\n\t\t\t // j'int�gre mon modele dans un autre modele inf�r� \n\t\t\tInfModel infm = ModelFactory.createRDFSModel(m);\n\t\t\t // je lis les deus fichier .RDF et .ttl pour le sujet crime \t\t\n\t\t\tString ns = \"http://www.StatisticSquade.fr#\";\n\t\t \tinfm.setNsPrefix(\"StatisticSquade\", ns);\n\t\t \t/// name space de eurostat\n\t\t \tString nsEuro = \"http://eurostat.linked-statistics.org/data/\";\n\t\t\tinfm.setNsPrefix(\"Eurostat\", nsEuro);\n\t\t\tFileManager.get().readModel(infm, rdf_file0 );\n\t\t\tFileManager.get().readModel(infm, rdf_file1 ); \n\t\t\t\n\t\t\t//Construction dynamique des requêtes\n\t\t\t/**\n\t\t\t * Récupération des pays\n\t\t\t */\n\t\t\n\t\t\t/**\n\t\t\t * \n\t\t\t * récupétation autes\n\t\t\t */\n\t\t\tString pays = Form.form().bindFromRequest().get(\"pays\");\n\t\t\tanneeDebut = Form.form().bindFromRequest().get(\"anneeDebut\");\n\t\t\tanneeFin = Form.form().bindFromRequest().get(\"anneeFin\");\n\t\t\tString sujet1 = Form.form().bindFromRequest().get(\"sujet1\");\n\t\t\tString sujet2 = Form.form().bindFromRequest().get(\"sujet2\");\n\t\t\tString [] tabAnneeDebut = anneeDebut.split(\"-\");\n\t String anneeD = tabAnneeDebut[0];\n\t int aDebut = Integer.parseInt(anneeD);\n\t String [] tabAnneeFin = anneeFin.split(\"-\");\n\t String anneeF = tabAnneeFin[0];\n\t int aFin = Integer.parseInt(anneeF);\n\t if(aFin < aDebut){\n\t \tString anneeTemp = anneeDebut;\n\t \tanneeDebut = anneeFin;\n\t \tanneeFin = anneeTemp;\n\t }\n\n\t String rdq1 = \n\t\t \t\t\t \n\t\t\t \t\t\"PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>\" +\n\t\t\t\t\t\"PREFIX property: <http://eurostat.linked-statistics.org/property#>\" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\" +\n\t\t\t\t \"PREFIX sdmx-measure: <http://purl.org/linked-data/sdmx/2009/measure#>\" +\n\t\t\t\t \"PREFIX skos: <http://www.w3.org/2004/02/skos/core#>\" +\n\t\t\t\t \"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\" +\n\t\t\t\t \"PREFIX qb: <http://purl.org/linked-data/cube#>\" +\n\t\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\" +\n\t\t\t\t \"PREFIX StatisticSquade: <http://www.StatisticSquade.fr#>\" +\n\t\t\t\t \n\t\t\t \t\t\"SELECT \" +\n\t\t\t \t\" ?Pays ?Date ?Valeur \" +\n\t\t\t\t\t \t\t\"FROM <http://eurostat.linked-statistics.org/data/crim_gen.rdf>\" +\n\t\t\t\t\t \t\t\"FROM <http://eurostat.linked-statistics.org/dsd/crim_gen.ttl>\" +\n\t\t\t \t\t\"WHERE {\" +\n\t\t\t \t\t\t\t\t\" ?x sdmx-dimension:timePeriod ?Date . \" +\n\t\t\t\t\t\t \t\t\" ?x sdmx-measure:obsValue ?Valeur .\" +\n\t\t\t\t\t \t\t \"?x property:geo ?y .\" +\n\t\t\t\t\t \t\t \"?y skos:prefLabel ?Pays .\" +\n\t\t\t\t\t\t \t\t \" ?x property:crim ?z . \" +\n\t\t\t\t\t\t \t \t \"?z skos:notation ?l . \" +\n\t\t\t\t\t\t \t\t \"FILTER regex( ?l ,\\\"\"+sujet1+\"\\\" ) . \" +\n\n\t\t\t\t\t\t \t\t\" FILTER ( ?Date >= \\\"\"+anneeDebut+\"\\\"^^xsd:date && ?Date <= \\\"\"+anneeFin+\"\\\"^^xsd:date ) .\" +\n\t\t\t\t\t\t \t\t\"FILTER regex (?Pays , \\\"\"+pays+\"\\\" ) . \" +\n\t\t\t \t\t\" } \"; \n\t\t \n\t\tString rdq2 = \n\t \t\t\t \n\t\t\t \t\t\"PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>\" +\n\t\t\t\t\t\"PREFIX property: <http://eurostat.linked-statistics.org/property#>\" +\n\t\t\t \"PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\" +\n\t\t\t\t \"PREFIX sdmx-measure: <http://purl.org/linked-data/sdmx/2009/measure#>\" +\n\t\t\t\t \"PREFIX skos: <http://www.w3.org/2004/02/skos/core#>\" +\n\t\t\t\t \"PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\" +\n\t\t\t\t \"PREFIX qb: <http://purl.org/linked-data/cube#>\" +\n\t\t\t\t \"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\" +\n\t\t\t\t \"PREFIX StatisticSquade: <http://www.StatisticSquade.fr#>\" +\n\t\t\t\t \n\t\t\t \t\t\"SELECT \" +\n\t\t\t \t\" ?Pays ?Date ?Valeur \" +\n\t\t\t\t\t \t\t\"FROM <http://eurostat.linked-statistics.org/data/crim_gen.rdf>\" +\n\t\t\t\t\t \t\t\"FROM <http://eurostat.linked-statistics.org/dsd/crim_gen.ttl>\" +\n\t\t\t \t\t\"WHERE {\" +\n\t\t\t \t\t\t\t\t\" ?x sdmx-dimension:timePeriod ?Date . \" +\n\t\t\t\t\t\t \t\t\" ?x sdmx-measure:obsValue ?Valeur .\" +\n\t\t\t\t\t \t\t \"?x property:geo ?y .\" +\n\t\t\t\t\t \t\t \"?y skos:prefLabel ?Pays .\" +\n\t\t\t\t\t\t \t\t \" ?x property:crim ?z . \" +\n\t\t\t\t\t\t \t \t \"?z skos:notation ?l . \" +\n\t\t\t\t\t\t \t\t \"FILTER regex( ?l ,\\\"\"+sujet2+\"\\\" ) . \" +\n\n\t\t\t\t\t\t \t\t\" FILTER ( ?Date >= \\\"\"+anneeDebut+\"\\\"^^xsd:date && ?Date <= \\\"\"+anneeFin+\"\\\"^^xsd:date ) .\" +\n\t\t\t\t\t\t \t\t\"FILTER regex (?Pays , \\\"\"+pays+\"\\\" ) . \" +\n\t\t\t \t\t\" } \";\n\t\t\n \n //mapping entre sujets et leurs codes\n HashMap<String,String> codeToSujet = new HashMap<String,String>();\n codeToSujet.put(\"DBURG\", \"Cambriolages dans un lieu d'habitation\");\n codeToSujet.put(\"DRUGT\", \"Trafic de stupéfiants\");\n codeToSujet.put(\"HCIDE\", \"Homicides\");\n codeToSujet.put(\"VTHFT\", \"Vols de véhicules à moteur\");\n codeToSujet.put(\"VIOLT\", \"Crimes et délits violents\");\n codeToSujet.put(\"ROBBR\", \"Vols avec violences\");\n\t\t\t\n //Execution des requêtes\n /**\n * Requête 1\n */\n Query query1 = QueryFactory.create(rdq1); \n\t QueryExecution qexec1 = QueryExecutionFactory.create(query1,m);\n\t /////////\n\t ResultSet rs1 = qexec1.execSelect() ;\n\t //Transformation en List de querySolution\n\t List<QuerySolution> liste1 = ResultSetFormatter.toList(rs1);\n\t Iterator<QuerySolution> it1 = liste1.iterator();\n \n ////////// Mise des résultats dans une hashmap\n HashMap<Integer,String> map1 = new HashMap<Integer,String>(); \n ArrayList<String> donneesString1 = new ArrayList<String>();\n while(it1.hasNext()){\n \t \n \t QuerySolution elt1 = it1.next();\n String anneeElt1 = elt1.get(\"Date\").toString();\n String valeur1 = elt1.get(\"Valeur\").toString();\n String [] tabAnnee1 = anneeElt1.split(\"-\");\n String annee1 = tabAnnee1[0];\n map1.put(Integer.parseInt(annee1), valeur1);\t \n donneesString1.add(valeur1);\n }\n //Pour ordonner la HashMap en se basant sur la clé\n TreeMap<Integer, String> mapOrd1 = new TreeMap<Integer,String>(map1);\n /**\n * Requete 2\n */\n Query query2 = QueryFactory.create(rdq2); \n\t QueryExecution qexec2 = QueryExecutionFactory.create(query2,m);\n\t /////////\n\t ResultSet rs2 = qexec2.execSelect() ;\n\t //Transformation en List de querySolution\n\t List<QuerySolution> liste2 = ResultSetFormatter.toList(rs2);\n\t Iterator<QuerySolution> it2 = liste2.iterator();\n \n ////////// Mise des résultats dans une hashmap\n HashMap<Integer,String> map2 = new HashMap<Integer,String>(); \n ArrayList<String> donneesString2 = new ArrayList<String>();\n while(it2.hasNext()){\n \t \n \t QuerySolution elt2 = it2.next();\n String anneeElt2 = elt2.get(\"Date\").toString();\n String valeur2 = elt2.get(\"Valeur\").toString();\n String [] tabAnnee2 = anneeElt2.split(\"-\");\n String annee2 = tabAnnee2[0];\n map2.put(Integer.parseInt(annee2), valeur2);\t \n donneesString2.add(valeur2);\n }\n //Pour ordonner la HashMap en se basant sur la clé\n TreeMap<Integer, String> mapOrd2 = new TreeMap<Integer,String>(map2);\n \n //////////\n JsonObject title = new JsonObject();\n title.put(\"text\", \"Nombre de \"+codeToSujet.get(sujet1)+\" et de \"+codeToSujet.get(sujet2));\n \n JsonObject subtitle = new JsonObject();\n subtitle.put(\"text\", pays);\n \n JsonObject xAxis = new JsonObject();\n xAxis.put(\"type\", \"value\");\n \n JsonObject titleY = new JsonObject();\n titleY.put(\"text\", \"valeurs :\");\n JsonObject yAxis = new JsonObject();\n yAxis.put(\"title\", titleY);\n yAxis.put(\"min\", 0);\n \n JsonArray series = new JsonArray();\n \n JsonObject objSerie1 = new JsonObject();\n objSerie1.put(\"name\", codeToSujet.get(sujet1));\n JsonArray data1 = new JsonArray();\n for(Entry<Integer, String> entry1 : mapOrd1.entrySet()){\n \t \n \t JsonArray eltData1 = new JsonArray();\n eltData1.add(entry1.getKey());\n eltData1.add(Integer.parseInt(entry1.getValue()));\n data1.add(eltData1);\n \n }\n objSerie1.put(\"data\",data1);\n series.add(objSerie1);\n \n \n \n JsonObject objSerie2 = new JsonObject();\n objSerie2.put(\"name\", codeToSujet.get(sujet2));\n JsonArray data2 = new JsonArray(); \n for(Entry<Integer, String> entry2 : mapOrd2.entrySet()){\n \t \n \t JsonArray eltData2 = new JsonArray();\n eltData2.add(entry2.getKey());\n eltData2.add(Integer.parseInt(entry2.getValue()));\n data2.add(eltData2);\n }\t \n objSerie2.put(\"data\",data2); \n series.add(objSerie2);\n \n \n //Ajouter au graphe\n JsonObject graphe = new JsonObject();\n graphe.put(\"title\", title);\n graphe.put(\"subtitle\", subtitle);\n graphe.put(\"xAxis\", xAxis);\n graphe.put(\"yAxis\", yAxis);\n graphe.put(\"series\", series);\n /**\n * \n * données statistiques\n */\n \n \n StatisticsComputation myStats = new StatisticsComputation(donneesString1, donneesString2);\n double covariance = myStats.covariance();\n\t\tdouble pearsonsCorrelation = myStats.pearsonsCorrelation();\n\t\tSystem.out.println(\"Ma covariance \" + covariance);\n\t\tSystem.out.println(\"Ma correlation \" + pearsonsCorrelation);\n\t\tdouble mean = myStats.mean();\n\t\tdouble standardDeviation = myStats.standardDeviation();\n\t\tSystem.out.println(\"Ma moyenne \" + mean);\n\t\tSystem.out.println(\"Mon écart-type \" + standardDeviation);\n\n /**\n * \n * Données statistiques fin\n */\n\t\t/**\n\t\t * Ajout au graphe\n\t\t */\n\t\tGraphCreation gc = new GraphCreation(\"crim_gen\");\n\t\tgc.postGraph(sujet1+\"-\"+sujet2+\"-\"+pays, sujet1+pays, sujet2+pays, anneeDebut, anneeFin, \n\t\t\t\t Double.toString(pearsonsCorrelation), Double.toString(mean), Double.toString(standardDeviation), \n\t\t\t\t Double.toString(covariance));\n\t\tgc.save();\n\t\t\n\t\tString ip = request().remoteAddress();\n ArrayList<String> listeComments = gc.getComments(sujet1+\"-\"+sujet2+\"-\"+pays, false); \n if(listeComments !=null){\n\t\tIterator<String> it = listeComments.iterator();\n\t\tList<Comment> listeCom = new ArrayList<Comment>();\n\t\twhile(it.hasNext()){\n\t\t\tString elt = it.next();\n\t\t\tString [] tab = elt.split(\";\");\n\t\t\tString nomRecup = tab[0];\n\t\t\tString dateRecup = tab[1];\n\t\t\tString contenuRecup = tab[2];\n\t\t\tComment comment1 = new Comment(nomRecup,dateRecup,contenuRecup);\n\t\t\tlisteCom.add(comment1);\n\t\t}\n\t\tGraphe g = new Graphe(graphe.toString(),covariance,pearsonsCorrelation,mean,standardDeviation,listeCom,ip,sujet1+\"-\"+sujet2+\"-\"+pays,null);\n\t\treturn ok(comp2.render(g));\n }else{\n \tGraphe g = new Graphe(graphe.toString(),covariance,pearsonsCorrelation,mean,standardDeviation,null,ip,sujet1+\"-\"+sujet2+\"-\"+pays,null);\n \t\treturn ok(comp2.render(g));\t\n \t\n }\n\t\t \n\t\t \n\t \t\n\t \t\n\t }", "public void evaluate() {\r\n Statistics.evaluate(this);\r\n }", "public VariableUnit solve() {\n LinkedList<VariableUnit> processor = new LinkedList<VariableUnit>();\n\n VariableUnit vu1 = new VariableUnit(250.0, 'x');\n VariableUnit vu2 = new VariableUnit('+');\n VariableUnit vu3 = new VariableUnit(250.0, 'x');\n VariableUnit vu4 = new VariableUnit(501.0, 'x');\n VariableUnit vu5 = new VariableUnit('y');\n VariableUnit vu6 = new VariableUnit('-');\n alpha_arr.get(('x' - 'a')).addLast(vu1);\n alpha_arr.get(('x' - 'a')).addLast(vu2);\n alpha_arr.get(('x' - 'a')).addLast(vu3);\n op_order.add(vu1); op_order.add(vu2); op_order.add(vu3); op_order.add(vu6);\n op_order.add(vu4); op_order.add(vu6); op_order.add(vu5);\n assignValue(2.0, 'x');\n \n System.out.print(vu1); System.out.print(vu2); System.out.print(vu3);\n System.out.print(vu6); System.out.print(vu4); System.out.print(vu6);\n System.out.print(vu5);\n System.out.println();\n System.out.println(\"------------------------------\");\n \n VariableUnit temp, temp1;\n for (int i = 0; i < op_order.size(); i++) {\n \ttemp = op_order.pollFirst();\n \t\n \t\tswitch (temp.getVariable()) {\n \tcase '+':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().add(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tcase '-':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().subtract(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tdefault:\n \t\tprocessor.push(temp);\n \t\t}\n }\n\n /*\n * System.out.println(\"This equation is currently unsolvable.\");\n \tSystem.out.println(\"Try assigning values to some of the variables.\");\n */\n while (!processor.isEmpty()) {\n \top_order.addFirst(processor.pop());\n }\n \n ListIterator<VariableUnit> iter = op_order.listIterator();\n \n while ( iter.hasNext() ) {\n \tVariableUnit iter_temp = iter.next();\n \t//System.out.print(iter_temp.hasValue());\n \tif (iter_temp.hasValue()) {\n \t\tSystem.out.print( Double.toString(iter_temp.subValue()) );\n \t}\n \telse {\n \t\tSystem.out.print(iter_temp);\n \t}\n };\n System.out.println();\n \n return new VariableUnit(Double.NaN, ' ');\n }", "@Test\n public void testVirement3() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(0.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 8000.0;\n double excepted_solde_cpt1 = 0.0;\n double excepted_solde_cpt2 = 43000.0;\n\n //Act\n assertEquals(false, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "@Override\n public void evaluate(Solution solution) throws JMException {\n\n int[] tour = new int[numberOfNodes + 1];\n int firstCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[0];\n int lastCity = ((Permutation) solution.getDecisionVariables()[0]).vector_[numberOfNodes - 1];\n\n double fitness1_td = 0.0;\n\n // Calculate fitness 1 - total distance\n for (int i = 0; i < numberOfNodes - 1; i++) {\n int x = ((Permutation) solution.getDecisionVariables()[0]).vector_[i];\n int y = ((Permutation) solution.getDecisionVariables()[0]).vector_[i+1];\n\n tour[i] = x;\n tour[i+1] = y;\n\n fitness1_td += calDistances(x, y);\n }\n // generate tour with same start city and end city\n tour[numberOfNodes] = tour[0];\n\n fitness1_td += calDistances(firstCity, lastCity);\n\n\n // Correctness check: does the tour start and end in the same city\n if(tour[0] != tour[tour.length - 1]) {\n System.err.println(\"ERROR: The last city must be the same as the first city\");\n System.exit(1);\n }\n\n /*for (int i = 0; i < tour.length; i++) {\n System.out.print(tour[i] + \" \");\n }*/\n //System.out.println(\"\\n\" + tour.length);\n\n // Calculate fitness 2 - objective value of a given tour\n ArrayInt z = (ArrayInt) solution.getDecisionVariables()[1];\n //System.out.println(z.getLength());\n\n double fitness2_ob;\n double wc = 0.0;\n double ft = 0.0;\n double fp = 0.0;\n\n //the following is used for a different interpretation of \"packingPlan\"\n int itemsPerCity = z.getLength() / (tour.length - 2);\n //System.out.println(itemsPerCity);\n\n for (int i = 0; i < tour.length - 1; i++) {\n\n int currentCityTEMP = tour[i];\n // what's the current city? --> but the items start at city 2 in the TTP file, so I have to take another 1 off!\n int currentCity = currentCityTEMP - 1;\n\n if (i > 0) {\n\n if (currentCity == -1) {\n // No items in city 1\n wc += 0.0;\n fp += 0.0;\n\n } else {\n\n for (int itemNumber = 0; itemNumber < itemsPerCity; itemNumber++) {\n\n int indexOfPackingPlan = (i-1) * itemsPerCity + itemNumber;\n // what is the next item's index in items-array?\n int itemIndex = currentCity + itemNumber * (numberOfNodes - 1);\n //System.out.println(\"i: \" + i);\n\n if (z.getValue(indexOfPackingPlan) == 1) {\n // pack item\n //System.out.println(itemIndex);\n int currentWC = items[itemIndex][2];\n wc += currentWC;\n\n int currentFP = items[itemIndex][1];\n fp += currentFP;\n }\n }\n\n }\n\n int h = (i+1) % (tour.length-1); //h: next tour city index\n //System.out.println(\"h: \" + h);\n long distance = calDistances(i, h);\n // compute the adjusted (effective) distance\n ft += (distance / (1 - wc * (maxSpeed - minSpeed) / capacityOfKnapsack));\n }\n }\n\n wendUsed = wc;\n wend = capacityOfKnapsack - wc;\n fitness2_ob = fp - ft * rentingRatio;\n\n solution.setObjective(0, fitness1_td);\n solution.setObjective(1, -fitness2_ob); // Convert from maximum objective value to minimum objective value\n }", "public void evaluate()\r\n {\r\n\tdouble max = ff.evaluate(chromos.get(0),generation());\r\n\tdouble min = max;\r\n\tdouble sum = 0;\r\n\tint max_i = 0;\r\n\tint min_i = 0;\r\n\r\n\tdouble temp = 0;\r\n\r\n\tfor(int i = 0; i < chromos.size(); i++)\r\n\t {\r\n\t\ttemp = ff.evaluate(chromos.get(i),generation());\r\n\t\tif(temp > max)\r\n\t\t {\r\n\t\t\tmax = temp;\r\n\t\t\tmax_i = i;\r\n\t\t }\r\n\r\n\t\tif(temp < min)\r\n\t\t {\r\n\t\t\tmin = temp;\r\n\t\t\tmin_i = i;\r\n\t\t }\r\n\t\tsum += temp;\r\n\t }\r\n\r\n\tbestFitness = max;\r\n\taverageFitness = sum/chromos.size();\r\n\tworstFitness = min;\r\n\tbestChromoIndex = max_i;;\r\n\tworstChromoIndex = min_i;\r\n\tbestChromo = chromos.get(max_i);\r\n\tworstChromo = chromos.get(min_i);\r\n\t\r\n\tevaluated = true;\r\n }", "public void mostrarVariablesForrester(){\n System.out.println(\"\");\n for (int i = 0; i < tam; i++) {\n if(matrizTipos[i][i].equals(\"P\")){\n System.out.println(\"[\"+i+\"] es un parametro\"); // parametro = constante\n }\n else if(matrizTipos[i][i].equals(\"V\")){\n System.out.println(\"[\"+i+\"] es un auxiliar\"); // auxiliar = constante * auxiliar (?) ó constante +/- auxiliar\n }\n else if(matrizTipos[i][i].equals(\"R\")){\n System.out.println(\"[\"+i+\"] es un flujo\"); // flujo = constante * auxiliar * nivel\n }\n else if(matrizTipos[i][i].equals(\"X\")){\n System.out.println(\"[\"+i+\"] es un nivel\");// xi(t + Δt) = xi(t) + Δt{rj - rk} rj = entrada y rk = salida, \"el - es por la salida\" (creo) \n }\n }\n }", "@Override\n\tpublic double evaluate() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testFORPLAN() {\n CuteNetlibCase.doTest(\"FORPLAN.SIF\", \"-664.2189612722054\", \"2862.4274777342266\", NumberContext.of(7, 4));\n }", "@Test\n public void verticalAdvantage() throws IOException {\n Board field0 = new Board(\"------\"\n + \"-C--P-\"\n + \"----P-\"\n + \"----P-\"\n + \"-C--P-\"\n + \"----C-\");\n\n assertTrue(field0.evaluate(false) < -50);\n assertTrue(field0.evaluate(true) < -50);\n\n // Gewinnreihe fuer Spieler wird blockiert\n // hohe Bewertung fuer Blockierung bei defensiver Strategie\n Board field2 = new Board(\"----C-\"\n + \"-C--P-\"\n + \"----P-\"\n + \"----P-\"\n + \"-C--P-\"\n + \"----C-\");\n\n assertTrue(field2.evaluate(false) > -10);\n assertTrue(field2.evaluate(false) < 10);\n assertTrue(field2.evaluate(true) > 20);\n }", "private void actualizarVisor()\n {\n visor.setText(\"\" + calc.getValorEnVisor());\n }", "public void vivir(){\r\n\t\r\n\tAtacable algo42tmp;\r\n\t\r\n\tif (!(this.muerto)){\r\n\t\tfor(int i = 0; i <= this.velY; i++){\r\n\t\t\tthis.mover();\r\n\t\t}\r\n\t\t\r\n\t\talgo42tmp = zonaDeCombate.comprobarColisionAlgo42(this);\r\n\t\tif (algo42tmp != null){\r\n\t\t\talgo42tmp.recibirDanio(20); /**hacer q se muera*/\r\n\t\t\tthis.muerto = true;\r\n\t\t}\r\n\t\t\r\n\r\n\t\t}\r\n\t}", "@Test\n public void testAnalisarPeriodo() throws Exception {\n System.out.println(\"analisarPeriodo\");\n int[][] dadosFicheiro = null;\n int lowerLimit = 0;\n int upperLimit = 0;\n int linhas = 0;\n int[] expResult = null;\n int[] result = ProjetoV1.analisarPeriodo(dadosFicheiro, lowerLimit, upperLimit, linhas);\n assertArrayEquals(expResult, result);\n\n }", "@Test\n public void testVirement2() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(63000.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 88000.0;\n double excepted_solde_cpt1 = 63000.0;\n double excepted_solde_cpt2 = 43000.0;\n\n //Act\n assertEquals(false, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "public void run() {\n PopulationFGA<Integer> poblacionActual = new PopulationFGA<>(funcionBorn,\n funcionFitness,\n problema.getDimension(),\n 1);\n poblacionActual.incializa(200);\n while(!condTerminacion.conditionReached(poblacionActual)) {\n System.out.println(\"Generacion Actual: \" + poblacionActual.getGeneracion());\n poblacionActual = iteration(poblacionActual);\n }\n ArrayList<IndividualFGA<Integer>> individuos = poblacionActual.generaIndividuos();\n IndividualFGA<Integer> mejor = individuos.get(0);\n for (IndividualFGA<Integer> e : individuos) {\n if (mejor.getFitness() <= e.getFitness())\n mejor = e;\n }\n System.out.println(\"Mejor solucion \" + '\\n' + mejor.toString());\n //System.out.println(\"Fitness \" + mejor.getFitness());\n int dim = problema.getDimension();\n int costo = 0;\n int obj1;\n int obj2;\n Phenotype<Integer> fenotipo = mejor.getRepActual();\n for (int i = 0; i < (dim - 1); i++) {\n obj1 = fenotipo.getAllele(i).intValue() - 1;\n for (int j = i + 1; j < dim; j++) {\n obj2 =fenotipo.getAllele(j).intValue() - 1; \n costo = costo + problema.getDistanciaEntre(i,j) * problema.getFlujoEntre(obj1,obj2);\n }\n }\n System.out.println(\"Costo de la solucion: \" + costo);\n\n }", "public int esquinas(){\n int v=0;\n if (fila==0 && columna==0){\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==0 && columna==15){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;}\n }\n else if(fila==15 && columna==0){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n }\n else if(fila==15 && columna==15){\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n }\n return v;\n }", "int getEvd();", "@Test\n public void testCalcularValorDeVenda() {\n System.out.println(\"CalcularValorDeVenda\");\n Telemovel instance = new Telemovel(\"Samsung Galaxy S20\",1500);\n double expResult = 1545;\n double result = instance.CalcularValorDeVenda();\n assertEquals(expResult, result, 0.0);\n \n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n // Declaración de variables\n String nombre;\n String asignatura;\n double calificacion_bim1;\n double calificacion_bim2;\n double total;\n\n // Lectura de datos\n System.out.print(\"Nombres completos del estudiante: \");\n nombre = scan.nextLine();\n System.out.print(\"Asignatura: \");\n asignatura = scan.nextLine();\n System.out.print(\"Calificación del Primer Bimestre: \");\n calificacion_bim1 = scan.nextDouble();\n System.out.print(\"Calificación del Segundo Bimestre: \");\n calificacion_bim2 = scan.nextDouble();\n\n // Creación de objeto con inicialización de variables\n EstadoEstudiante estado = new EstadoEstudiante(nombre, asignatura, calificacion_bim1, calificacion_bim2);\n\n // Salida\n System.out.println(estado.reportar(nombre, asignatura, estado.calcular_total(calificacion_bim1,\n calificacion_bim2), estado.aprobar_reprobar(estado.calcular_total(calificacion_bim1,\n calificacion_bim2))));\n }", "public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }", "@Override\r\n\tpublic int getEvaluations() {\n\t\treturn 0;\r\n\t}", "private void EstablecerVistas(TipoGestion tGestion){\n\t\tCantEjecutada=Utilitarios.round(activ.getCantidadEjecutada(),4);\n\t\n\t\tcantContratada=Utilitarios.round(activ.getCantidadContratada(),4);\n\t\t\n\t\t//CantPendienteDeEjecutar = Utilitarios.round((activ.getCantidadContratada()-activ.getCantidadEjecutada()),4);\n\n\n\t\tif ( activ.getCantidadEjecutada() > activ.getCantidadContratada()){\n\t\t\tCantPendienteDeEjecutar = 0;\n\t\t\tCantExcendete = Utilitarios.round((activ.getCantidadEjecutada()-activ.getCantidadContratada()),4);\n\t\t\tPorcExcedente = Utilitarios.round((CantExcendete / cantContratada * 100),2);\n\t\t\t((TextView) getActivity().findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadExcedente)).setTextColor(getResources().getColorStateList(R.color.graphRed));\n\t\t}\n\t\telse{\n\t\t\tCantPendienteDeEjecutar = Utilitarios.round((activ.getCantidadContratada()-activ.getCantidadEjecutada()),4);\n\t\t\t((TextView) getActivity().findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadExcedente)).setTextColor(getResources().getColorStateList(R.color.graphGreen));\n\t\t}\n\n\t\t\n\t\tif ( activ.getCantidadContratada() > 0){\n\t\t\t\tPorcEjecutado=Utilitarios.round((activ.getCantidadEjecutada()/cantContratada) * 100,2);\n\t\t\t\tPorcPendienteDeEjecutar = Utilitarios.round((CantPendienteDeEjecutar / cantContratada * 100),2);\n\t\t\t}\n\t\telse{\n\t\t\tPorcPendienteDeEjecutar\t= 0.00;\n\t\t\tPorcPendienteDeEjecutar = 0.00;\n\t\t}\n\n\t\t((TextView) getActivity()\n\t\t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_Actividad))\n\t\t\t\t.setText(String.valueOf(cantContratada));\n\n\t\t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadContratada))\n \t\t\t.setText(String.valueOf(cantContratada));\n\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadEjecutada))\n \t\t\t.setText(String.valueOf(CantEjecutada));\n\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadEjecutada))\n \t\t\t.setText( String.valueOf(PorcEjecutado) + \"%\");\n\n\n \ttvEtiquetaAgregarAvances.setText(getActivity().getString(R.string.fragment_agregar_avances_renglon_4));\n\n\t\tdesActividad.setText(\"[\" + activ.getCodigoInstitucional() + \"] - \" + activ.getDescripcion());\n \t\n\t\tif(tGestion == TipoGestion.Por_Cantidades){\n\t\t\t((TextView) getActivity()\n \t\t\t.findViewById(R.id.et_fragAgregarAvancesEtiquetaPorc))\n \t\t\t.setVisibility(0);\n \t}\n \telse{\n \t\t\n \t\t((TextView) getActivity()\n \t\t\t.findViewById(R.id.et_fragAgregarAvancesEtiquetaPorc))\n \t\t\t.setText(\"%\");\n\n \t}\n\n\t\t\n\t\t//Se deshabilitara el widget de ingreso del avance para cuando la cantidad\n\t\t//pendiente de ejecutar sea igual o menor a 0\n\t\t/*if (CantPendienteDeEjecutar>0){\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_FechaActualizo))\n \t\t\t.setText(getActivity().getResources().getString(R.string.fragment_agregar_avances_renglon_2)\n \t\t\t\t\t+ \" \" + String.valueOf(activ.getFechaActualizacion()));\n \t}\n \telse\n \t{\n \t\tToast.makeText(getActivity(), getActivity().getString(R.string.fragment_agregar_avances_renglon_5), Toast.LENGTH_LONG).show();\n \t\tetNuevoAvance.setText(\"0.00\");\n \t\tetNuevoAvance.setEnabled(false);\n \t}*/\n \t\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadPorEjecutar))\n \t\t\t.setText(String.valueOf(Utilitarios.round(CantPendienteDeEjecutar, 4)));\n \t((TextView) getActivity()\n \t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadPorEjecutar))\n \t\t\t.setText(String.valueOf(Utilitarios.round(PorcPendienteDeEjecutar, 2)) + \"%\");\n\n\t\t((TextView) getActivity()\n\t\t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_CantidadExcedente))\n\t\t\t\t.setText(String.valueOf(Utilitarios.round(CantExcendete, 4)));\n\n\t\t((TextView) getActivity()\n\t\t\t\t.findViewById(R.id.tv_fragAgregarAvancesRenglon_PorcCantidadExcedente))\n\t\t\t\t.setText(String.valueOf(Utilitarios.round(PorcExcedente, 2)) + \"%\");\n\n\t\tvalidarAvance(String.valueOf(etNuevoAvance.getText()));\n \t\n \tetNuevoAvance.addTextChangedListener(new TextWatcher() {\n \t\t\n\t\t\t@Override\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start,\n\t\t\t\t\tint count, int after) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start,\n\t\t\t\t\tint before, int count) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tvalidarAvance(s.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t}\n \t});\n\t\t\n\t}", "public void sumaPuntos() {\r\n int rojo = 0;\r\n int azul = 0;\r\n for (int i = 1; i < 10; i++) {\r\n\r\n if (tablero[1][i].getTipo().equals(\"Rojo\")) {\r\n rojo += tablero[1][i].getValor();\r\n }\r\n\r\n if (tablero[8][i].getTipo().equals(\"Azul\")) {\r\n azul += tablero[8][i].getValor();\r\n }\r\n\r\n }\r\n if (rojo > azul) {\r\n this.setResultado(\"Rojo\");\r\n this.agregarVictoria(jugadorRojo);\r\n }\r\n if (azul > rojo) {\r\n this.setResultado(\"Azul\");\r\n this.agregarVictoria(jugadorAzul);\r\n }\r\n \r\n this.setReplay(true);\r\n }", "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}", "@Test\r\n\tpublic void venderVariasPiezasReservadas() {\r\n\t\tfor (Pieza pieza : this.listadoDePiezas) {\r\n\t\t\tpieza.reservar();\r\n\t\t\tpieza.vender();\r\n\t\t\tAssert.assertTrue(\"La pieza no ha sido correctamente vendida.\",pieza.isVendida());\r\n\t\t}\r\n\t}", "protected void calculerAire() {\r\n\t\taire = Math.PI * rayonV * rayonH;\r\n\t\t\r\n\t}", "@Override\n\tpublic void getResultat() {\n\t\tcalcul();\n\t}", "@Override\n\tpublic double valuta_figli() {\n\t\treturn simple_fitness();\n\t}", "public static Resultado Def_FACA(GrafoMatriz G, Demanda demanda,ListaEnlazada [] ksp,int capacidad){\n int inicio=0, fin=0,cont; // posicion inicial y final dentro del espectro asi como el contador de FSs contiguos disponibles\n \n int demandaColocada=0; // bandera para controlar si ya se encontro espectro disponible para la demanda.\n int [] OE= new int[capacidad]; //Ocupacion de Espectro.\n ArrayList<ListaEnlazada> kspUbicados = new ArrayList<ListaEnlazada>();\n ArrayList<Integer> inicios = new ArrayList<Integer>();\n ArrayList<Integer> fines = new ArrayList<Integer>();\n ArrayList<Integer> indiceKsp = new ArrayList<Integer>();\n\n //Probamos para cada camino, si existe espectro para ubicar la damanda\n int k=0;\n\n while(k<ksp.length && ksp[k]!=null){\n //Inicializadomos el espectro, inicialmente todos los FSs estan libres\n for(int i=0;i<capacidad;i++){\n OE[i]=1;\n }\n //Calcular la ocupacion del espectro para cada camino k\n for(int i=0;i<capacidad;i++){\n for(Nodo n=ksp[k].getInicio();n.getSiguiente().getSiguiente()!=null;n=n.getSiguiente()){\n //System.out.println(\"v1 \"+n.getDato()+\" v2 \"+n.getSiguiente().getDato()+\" cant vertices \"+G.getCantidadDeVertices()+\" i \"+i+\" FSs \"+G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS().length);\n if(G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS()[i].getEstado()==0){\n OE[i]=0;\n break;\n }\n }\n }\n \n inicio=fin=cont=0;\n for(int i=0;i<capacidad;i++){\n if(OE[i]==1){\n inicio=i;\n for(int j=inicio;j<capacidad;j++){\n if(OE[j]==1){\n cont++;\n }\n else{\n cont=0;\n break;\n }\n //si se encontro un bloque valido, salimos de todos los bloques\n if(cont==demanda.getNroFS()){\n fin=j;\n fines.add(fin);\n inicios.add(inicio);\n demandaColocada=1;\n kspUbicados.add(ksp[k]);\n indiceKsp.add(k);\n //inicio=fin=cont=0;\n break;\n }\n }\n }\n if(demandaColocada==1){\n demandaColocada = 0;\n break;\n }\n }\n k++;\n }\n \n /*if(demandaColocada==0){\n return null; // Si no se encontro, en ningun camino un bloque contiguo de FSs, retorna null.\n }*/\n \n if (kspUbicados.isEmpty()){\n //System.out.println(\"Desubicado\");\n return null;\n }\n \n int [] cortesSlots = new int [2];\n double corte = -1;\n double Fcmt = 9999999;\n double FcmtAux = -1;\n \n int caminoElegido = -1;\n\n //controla que exista un resultado\n boolean nulo = true;\n\n ArrayList<Integer> indiceL = new ArrayList<Integer>();\n \n //contar los cortes de cada candidato\n for (int i=0; i<kspUbicados.size(); i++){\n cortesSlots = Utilitarios.nroCuts(kspUbicados.get(i), G, capacidad);\n if (cortesSlots != null){\n corte = (double)cortesSlots[0];\n \n indiceL = Utilitarios.buscarIndices(kspUbicados.get(i), G, capacidad);\n \n \n //contar los desalineamientos\n double desalineamiento = (double)Utilitarios.contarDesalineamiento(kspUbicados.get(i), G, capacidad, cortesSlots[1]);\n \n double capacidadLibre = (double)Utilitarios.contarCapacidadLibre(kspUbicados.get(i),G,capacidad);\n \n double saltos = (double)Utilitarios.calcularSaltos(kspUbicados.get(i));\n \n \n double vecinos = (double)Utilitarios.contarVecinos(kspUbicados.get(i),G,capacidad);\n \n\n \n FcmtAux = corte + (desalineamiento/(demanda.getNroFS()*vecinos)) + (saltos *(demanda.getNroFS()/capacidadLibre)); \n \n if (FcmtAux<Fcmt){\n Fcmt = FcmtAux;\n caminoElegido = i;\n }\n \n nulo = false;\n if (caminoElegido==-1){\n System.out.println(\"Camino Elegido = -1 ..................\");\n }\n \n }\n }\n \n if (caminoElegido==-1){\n System.out.println(\"Camino Elegido = -1 ..................\");\n }\n //caminoElegido = Utilitarios.contarCuts(kspUbicados, G, capacidad);\n \n if (nulo || caminoElegido==-1){\n return null;\n }\n \n Resultado r= new Resultado();\n /*r.setCamino(k-1);\n r.setFin(fin);\n r.setInicio(inicio);*/\n \n r.setCamino(indiceKsp.get(caminoElegido));\n r.setFin(fines.get(caminoElegido));\n r.setInicio(inicios.get(caminoElegido));\n return r;\n }", "public int getCodigoPlan() { return this.codigoPlan; }", "public void calcular()\r\n/* 530: */ {\r\n/* 531:556 */ this.facturaProveedorSRI.setMontoIva(this.facturaProveedorSRI.getBaseImponibleDiferenteCero().multiply(\r\n/* 532:557 */ ParametrosSistema.getPorcentajeIva().divide(BigDecimal.valueOf(100L))));\r\n/* 533: */ }", "@PlanBody\n public boolean body(){\n ICenterService ser = agent.getComponentFeature\n (IRequiredServicesFeature.class).searchService(ICenterService.class,RequiredServiceInfo.SCOPE_GLOBAL).get();\n\n ser.collectBallot(voter).addResultListener(new IResultListener<Boolean>() {\n @Override\n public void exceptionOccurred(Exception exception) {\n exception.printStackTrace();\n System.out.println(exception);\n }\n @Override\n public void resultAvailable(Boolean result) {\n System.out.println(voter.getId()+ \" submit result: \"+result);\n }\n });\n return true;\n }", "public VDF getVDF()\n {\n VDF vdf = getViewDefinition();\n // group view current cardinality\n vdf.getEntries()[0].getDataValue().setObject(new Integer(OutUnqassGrp_MA));\n // group view active flags\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n if ( adim0 < OutUnqassGrp_MA )\n {\n ((VDFEntryObject [])vdf.getEntries()[1].getDataValue().getObject())[\n adim0].setObject(new Character('Y'));\n }\n else \n {\n ((VDFEntryObject [])vdf.getEntries()[1].getDataValue().getObject())[\n adim0].setObject(new Character('N'));\n }\n }\n vdf.getEntries()[1].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[2].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentYear[adim0]));\n }\n vdf.getEntries()[2].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[3].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentPeriod[adim0]));\n }\n vdf.getEntries()[3].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[4].getDataValue().getObject())[adim0]\n .setObject(new Integer(OutGUniqueAssignmentUniqueNr[adim0]));\n }\n vdf.getEntries()[4].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[5].getDataValue().getObject())[adim0]\n .setObject(OutGUniqueAssignmentMkStudyUnitCode[adim0]);\n }\n vdf.getEntries()[5].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[6].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentAssignmentNr[adim0]));\n }\n vdf.getEntries()[6].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[7].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentNrOfQuestions[adim0]));\n }\n vdf.getEntries()[7].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[8].getDataValue().getObject())[adim0]\n .setObject(OutGUniqueAssignmentType[adim0]);\n }\n vdf.getEntries()[8].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[9].getDataValue().getObject())[adim0]\n .setObject(new Short(OutGUniqueAssignmentNegativeMarkFactor[adim0]));\n }\n vdf.getEntries()[9].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[10].getDataValue().getObject())[\n adim0].setObject(new Short(OutGUniqueAssignmentMaxCredits[adim0]));\n }\n vdf.getEntries()[10].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[11].getDataValue().getObject())[\n adim0].setObject(new Short(OutGUniqueAssignmentCreditSystem[adim0]));\n }\n vdf.getEntries()[11].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[12].getDataValue().getObject())[\n adim0].setObject(new Short(OutGUniqueAssignmentPassMarkPercentage[adim0]\n ));\n }\n vdf.getEntries()[12].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[13].getDataValue().getObject())[\n adim0].setObject(new Integer(OutGUniqueAssignmentClosingDate[adim0]));\n }\n vdf.getEntries()[13].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[14].getDataValue().getObject())[\n adim0].setObject(OutGUniqueAssignmentCompulsory[adim0]);\n }\n vdf.getEntries()[14].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[15].getDataValue().getObject())[\n adim0].setObject(new Integer(OutGUniqueAssignmentTsaUniqueNr[adim0]));\n }\n vdf.getEntries()[15].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[16].getDataValue().getObject())[\n adim0].setObject(OutGYearMarkCalculationType[adim0]);\n }\n vdf.getEntries()[16].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[17].getDataValue().getObject())[\n adim0].setObject(new Double(OutGYearMarkCalculationNormalWeight[adim0]))\n ;\n }\n vdf.getEntries()[17].setCountUsed((short)OutUnqassGrp_MA);\n // current cardinality group view items\n for(int adim0 = 0; adim0 < 100; adim0++)\n {\n ((VDFEntryObject [])vdf.getEntries()[18].getDataValue().getObject())[\n adim0].setObject(OutGYearMarkCalculationOptionalityGc3[adim0]);\n }\n vdf.getEntries()[18].setCountUsed((short)OutUnqassGrp_MA);\n return(vdf);\n }", "@Test\n public void testGerarAnaliseEstatisticas() {\n System.out.println(\"gerarAnaliseEstatisticas\");\n Empresa empresa = inicializarModeloTeste();\n GerarAnaliseEstatisticaRevisaoController instance = new GerarAnaliseEstatisticaRevisaoController(empresa);\n boolean expResult = true;\n boolean result = instance.gerarAnaliseEstatisticas();\n assertEquals(expResult, result);\n }", "@Test\n public void testVerser1() {\n\n //Arrange\n CompteBancaire cpt = new CompteBancaire(5000.0);\n double montant_a_verser = 1000.0;\n double excepted = 6000.0;\n\n //Act\n assertEquals(true, cpt.verser(montant_a_verser));\n\n //Assert\n assertEquals(excepted, cpt.getSolde(), 0);\n }", "public Result fun() {\n\t\tComparator<Van> c=new Comparator<Van>(){\n\t\t\tpublic int compare(Van r,Van s)\n\t\t\t{\n\t\t\t\tint l1=r.getL();\n\t\t\t\tint b1=r.getB();\n\t\t\t\tint h1=r.getH();\n\t\t\t\tint l2=s.getL();\n\t\t\t\tint b2=s.getB();\n\t\t\t\tint h2=s.getH();\n\t\t\t\tif(l1!=l2)\n\t\t\t\t\treturn (l1>l2)?-1:1;\n\t\t\t\telse if(b1!=b2)\n\t\t\t\t\treturn (b1>b2)?-1:1;\n\t\t\t\telse return (h1>h2)?-1:1;\n\t\t\t}\n\t\t};\n\t\tPriorityQueue<Van> cubes=new PriorityQueue<Van>(20,c);\n\t\tVan v1=new Van(1,1,1,30,15,15);\n\t\tVan v2=new Van(1,1,1,15,9,6);\n\t\tVan v3=new Van(1,1,1,21,15,12);\n\t\tVan v10=new Van(1,1,1,30,15,15);\n\t\tVan v5=new Van(1,1,1,15,9,6);\n\t\tVan v6=new Van(1,1,1,20,15,2);\n\t\tVan v7=new Van(1,1,1,30,15,5);\n\t\tVan v8=new Van(1,1,1,15,9,6);\n\t\tVan v9=new Van(1,1,1,21,15,12);\n\t\tVan vft;\n\t\tvft=v5;\n\t\t//System.out.println(vft.getL()+\"/\"+vft.getB()+\"/\"+vft.getH());\n\t\tcubes.offer(v1);\n\t\tcubes.offer(v2);\n\t\tcubes.offer(v3);\n\t\tcubes.offer(v10);\n\t\tcubes.offer(v5);\n\t\tcubes.offer(v6);\n\t\tcubes.offer(v7);\n\t\tcubes.offer(v8);\n\t\tcubes.offer(v9);\n\t\twhile (cubes.size()>0)\n\t\t{\n\t\t\tvft=cubes.poll();\n\t\t\tSystem.out.println(vft.getL()+\"/\"+vft.getB()+\"/\"+vft.getH());\n\t\t\t\n\t\t}\n\t\t\n\t\treturn ok();\n\t}", "Result evaluate();", "public String vaidationResults(String price, String duration, String departure, String arrival) {\n return vuelos.doValidationResults(price, duration, departure, arrival);\n }", "@Test\n public void planTest() {\n // TODO: test plan\n }", "void example9() {\n\t\t\n\t\t// an uninteresting procedure we will calculate values from\n\t\t\n\t\tProcedure2<Long,UnsignedInt12Member> proc = new Procedure2<Long, UnsignedInt12Member>()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void call(Long a, UnsignedInt12Member b) {\n\t\t\t\tb.setV((int) (long) a);\n\t\t\t}\n\t\t};\n\t\t\n\t\t// the ProcedureDataSource we will query\n\t\t\n\t\tIndexedDataSource<UnsignedInt12Member> list = new ProcedureDataSource<>(proc);\n\t\t\n\t\t// limit how much data to consider since procedures have a nearly unlimited x axis range\n\t\t\n\t\tIndexedDataSource<UnsignedInt12Member> fixedList = new FixedSizeDataSource<>(1000, list);\n\t\t\n\t\t// then calculate some values\n\t\t\n\t\tUnsignedInt12Member value = G.UINT12.construct();\n\t\t\n\t\tSum.compute(G.UINT12, fixedList, value);\n\t}", "public void calculate();", "@Test\n\tvoid calcularSalarioConMasCuarentaHorasPagoPositivoTest() {\n\t\tEmpleadoPorComision empleadoPorComision = new EmpleadoPorComision(\"Eiichiro oda\", \"p33\", 400000, 500000);\n\t\tdouble salarioEsperado = 425000;\n\t\tdouble salarioEmpleadoPorComision = empleadoPorComision.calcularSalario();\n\t\tassertEquals(salarioEsperado, salarioEmpleadoPorComision);\n\n\t}", "private void createExecutionPlan() throws OrderingConstraintException {\n executionPlan = new ExecutionPlan();\n\n // Use user preferences to decide which detectors are enabled.\n DetectorFactoryChooser detectorFactoryChooser = new DetectorFactoryChooser() {\n HashSet<DetectorFactory> forcedEnabled = new HashSet<DetectorFactory>();\n\n /*\n * (non-Javadoc)\n *\n * @see\n * edu.umd.cs.findbugs.DetectorFactoryChooser#choose(edu.umd.cs.\n * findbugs.DetectorFactory)\n */\n public boolean choose(DetectorFactory factory) {\n boolean result = FindBugs.isDetectorEnabled(FindBugs2.this, factory, rankThreshold) || forcedEnabled.contains(factory);\n if (ExecutionPlan.DEBUG)\n System.out.printf(\" %6s %s %n\", result, factory.getShortName());\n return result;\n }\n\n public void enable(DetectorFactory factory) {\n forcedEnabled.add(factory);\n factory.setEnabledButNonReporting(true);\n }\n\n };\n executionPlan.setDetectorFactoryChooser(detectorFactoryChooser);\n\n if (ExecutionPlan.DEBUG)\n System.out.println(\"rank threshold is \" + rankThreshold);\n // Add plugins\n for (Iterator<Plugin> i = detectorFactoryCollection.pluginIterator(); i.hasNext();) {\n Plugin plugin = i.next();\n if (DEBUG) {\n System.out.println(\"Adding plugin \" + plugin.getPluginId() + \" to execution plan\");\n }\n executionPlan.addPlugin(plugin);\n }\n\n // Build the execution plan\n executionPlan.build();\n\n // Stash the ExecutionPlan in the AnalysisCache.\n Global.getAnalysisCache().eagerlyPutDatabase(ExecutionPlan.class, executionPlan);\n\n if (PROGRESS) {\n System.out.println(executionPlan.getNumPasses() + \" passes in execution plan\");\n }\n }", "public void imprimirResultados(){\n System.out.println(\"t (tiempo actual) \"+t);\n \n \n System.out.println(\"\\nGanancia total: $\"+R);\n System.out.println(\"Costos por mercaderia comprada: $\"+C);\n System.out.println(\"Costos por mantenimiento inventario: $\"+H);\n System.out.println(\"Ganancia promeio de la tienda por unidad de tiempo: $\"+(R-C-H)/T);\n \n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\nfor (double b = 0.5; b < 0.51; b+=0.1) {\n for (double k = 4.40; k < 4.5; k+=0.5) {\n Machine.b = 0.5; //0.2 - ATCnon-delay\n Machine.k = 1.5; //1.4 - ATCnon delay\n int hits = 0;\n engineJob = new cern.jet.random.engine.MersenneTwister(99999);\n noise = new cern.jet.random.Normal(0, 1, engineJob);\n SmallStatistics[] result = new SmallStatistics[5];\n result[0] = new SmallStatistics();\n result[1] = new SmallStatistics();\n for (int ds = 0; ds < 2; ds++) {\n JSPFramework[] jspTesting = new JSPFramework[105];\n for (int i = 0; i < jspTesting.length; i++) {\n jspTesting[i] = new JSPFramework();\n jspTesting[i].getJSPdata(i*2 + 1);\n }\n //DMU - instances (1-80)//la - instances (81-120)\n //mt - instances (121/-123)//orb - instances (124-133)//ta -instances (134-173)\n //////////////////////////////////////////////\n for (int i = 0; i < jspTesting.length; i++) {\n double countEval = 0;\n double tempObj = Double.POSITIVE_INFINITY;\n double globalBest = Double.POSITIVE_INFINITY;\n boolean[] isApplied_Nk = new boolean[2]; //Arrays.fill(isApplied_Nk, Boolean.TRUE);\n int Nk = 0; // index of the Iterative dispatching rule to be used\n jspTesting[i].resetALL();\n boolean firstIteration = true;\n double countLargeStep = 0;\n do{\n countEval++;\n //start evaluate schedule\n jspTesting[i].reset();\n int N = jspTesting[i].getNumberofOperations();\n jspTesting[i].initilizeSchedule();\n int nScheduledOp = 0;\n\n //choose the next machine to be schedule\n while (nScheduledOp<N){\n\n Machine M = jspTesting[i].Machines[jspTesting[i].nextMachine()];\n\n jspTesting[i].setScheduleStrategy(Machine.scheduleStrategy.HYBRID );\n jspTesting[i].setPriorityType(Machine.priorityType.ATC);\n jspTesting[i].setNonDelayFactor(0.3);\n //*\n jspTesting[i].setInitalPriority(M);\n for (Job J:M.getQueue()) {\n double RJ = J.getReadyTime();\n double RO = J.getNumberRemainingOperations();\n double RT = J.getRemainingProcessingTime();\n double PR = J.getCurrentOperationProcessingTime();\n double W = J.getWeight();\n double DD = J.getDuedate();\n double RM = M.getReadyTime();\n double RWT = J.getCurrentOperationWaitingTime();\n double RFT = J.getFinishTime();\n double RNWT = J.getNextOperationWaitingTime();\n int nextMachine = J.getNextMachine();\n\n if (nextMachine==-1){\n RNWT=0;\n } else {\n RNWT = J.getNextOperationWaitingTime();\n if (RNWT == -1){\n RNWT = jspTesting[i].getMachines()[nextMachine].getQueueWorkload()/2.0;\n }\n }\n if (RWT == -1){\n RWT = M.getQueueWorkload()/2.0;\n }\n //J.addPriority((W/PR)*Math.exp(-maxPlus((DD-RM-PR-(RT-PR+J.getRemainingWaitingTime(M)))/(3*M.getQueueWorkload()/M.getNumberofJobInQueue())))); //iATC\n //J.addPriority((PR*PR*0.614577*(-RM-RM/W)-RT*PR*RT/W)\n // -(RT*PR/(W-0.5214191)-RM/W*PR*0.614577+RT*PR/(W-0.5214191)*2*RM/W));\n //J.addPriority(((W/PR)*((W/PR)/(RFT*RFT)))/(max(div((RFT-RT),(RWT/W)),IF(RFT/W-max(RFT-RT,DD),DD,RFT))+DD/RFT+RFT/W-max(RFT-RFT/W,DD))); //best TWT priorityIterative\n if (Nk==0)\n //J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((min(RT,RNWT-RFT)/(RJ-min(RWT,RFT*0.067633785)))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((div(min(RT,RNWT-RFT),(RJ-min(RWT,RFT*0.067633785))))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n else\n J.addPriority(min((((W/PR)/RFT)/(2*RNWT+max(RO,RFT)))/(PR+RNWT+max(RO,RFT)),((W/PR)/RFT)/PR)/RFT);\n }\n //jspTesting[i].calculatePriority(M);\n jspTesting[i].sortJobInQueue(M);\n Job J = M.completeJob();\n if (!J.isCompleted()) jspTesting[i].Machines[J.getCurrentMachine()].joinQueue(J);\n nScheduledOp++;\n }\n double currentObj = -100;\n currentObj = jspTesting[i].getTotalWeightedTardiness();\n if (tempObj > currentObj){\n tempObj = currentObj;\n jspTesting[i].recordSchedule();\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n //System.out.println(\"Improved!!!\");\n }\n else {\n isApplied_Nk[Nk] = true;\n if (!isNextApplied(Nk, isApplied_Nk)) Nk = circleShift(Nk, isApplied_Nk.length);\n else {\n if (globalBest>tempObj) {\n globalBest = tempObj;\n jspTesting[i].storeBestRecordSchedule();\n } jspTesting[i].restoreBestRecordSchedule();\n if (countLargeStep<1) {\n tempObj = Double.POSITIVE_INFINITY;\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n jspTesting[i].shakeRecordSchedule(noise, engineJob, globalBest);\n countLargeStep++;\n }\n else break;\n }\n }\n firstIteration = false;\n \n } while(true);\n result[ds].add(jspTesting[i].getDevREFTotalWeightedTardiness(globalBest));\n if (jspTesting[i].getDevLBCmax()==0) hits++;\n System.out.println(jspTesting[i].instanceName + \" & \"+ globalBest + \" & \" + countEval);\n }\n }\n //jsp.schedule();\n //*\n System.out.println(\"*************************************************************************\");\n System.out.println(\"[ & \" + formatter.format(result[0].getMin()) + \" & \"\n + formatter.format(result[0].getAverage()) + \" & \" + formatter.format(result[0].getMax()) +\n \" & \" + formatter.format(result[1].getMin()) + \" & \"\n + formatter.format(result[1].getAverage()) + \" & \" + formatter.format(result[1].getMax()) + \"]\");\n //*/\n System.out.print(\"\"+formatter.format(result[0].getAverage()) + \" \");\n }\n System.out.println(\"\");\n}\n }", "@Test\n public void test_distanceLinaireSurY_ParcourOptimum_Pour_4villes() {\n\n Pays pays = new Pays(4);\n\n int positionX = (int) (Math.random() * 50);\n\n pays.setPositionVille(0, new Point(positionX, 2));\n pays.setPositionVille(1, new Point(positionX, 3));\n pays.setPositionVille(2, new Point(positionX, 4));\n pays.setPositionVille(3, new Point(positionX, 5));\n\n brutForceV3.recherche(pays, 0);\n\n assertEquals(\"0>1>2>3>0\", brutForceV3.getParcours().getVillesEmprunté());\n assertEquals(brutForceV3.getParcours().getDistance(),\n parcoursVilles(pays, brutForceV3.getParcours().getVillesEmprunté(),\">\"));\n\n }", "public Calculadora(){\n this.operador1 = 0.0;\n this.operador2 = 0.0;\n this.resultado = 0.0;\n }", "public void computeWinnerDeterminationU()\r\n\t{\r\n\t\tif( _plans.size() == 0)\r\n\t\t{\r\n\t\t\t_allocation = new AllocationWoD();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t_randGenerator.setSeed(_seed);\r\n\t\t\r\n\t\tdouble maxExpectedUtility = 0.;\r\n\t\tint itsIdx = -1;\r\n\t\tint itsAtom = -1;\r\n\t\tfor(int i = 0; i < _plans.size(); ++i)\t\t\t\t\t\t\t\t\t// for every buyer\r\n\t\t\tfor(int j = 0; j < _plans.get(i).getNumberOfAtoms(); ++j)\t\t\t// for every plan he has value for\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get(i).getAtom(j));\r\n\t\t\t\tif(_paymentRule.equals(\"SecondPrice\"))\r\n\t\t\t\t\tplan.resolveWithSecondPrice();\r\n\t\t\t\telse if(_paymentRule.equals(\"FirstPrice\"))\r\n\t\t\t\t\tplan.resolveWithFirstPrice();\r\n\t\t\t\telse throw new RuntimeException(\"Cannot resolve the type: \" + _paymentRule);\r\n\t\t\t\t\r\n\t\t\t\tdouble expectedUtility = plan.computeExpectedValue() - plan.getPlanExpectedPayment();\r\n\t\t\t\t\r\n\t\t\t\tif( expectedUtility >= maxExpectedUtility )\r\n\t\t\t\t{\r\n\t\t\t\t\tmaxExpectedUtility = expectedUtility;\r\n\t\t\t\t\titsIdx = i;\r\n\t\t\t\t\titsAtom = j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t_allocation = new AllocationWoD();\r\n\r\n\t\tif(itsIdx >= 0)\r\n\t\t{\r\n\t\t\tList<Integer> allocatedBundles = new LinkedList<Integer>();\r\n\t\t\tallocatedBundles.add(itsAtom);\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tComplexSemanticWebType plan = (ComplexSemanticWebType)(_plans.get( itsIdx ).getAtom( itsAtom ));\r\n\t\t\t\t\r\n\t\t\t\tList<Integer> actuallyAllocatedTuples = new LinkedList<Integer>();\r\n\t\t\t\tfor(int i = 0; i < plan.getNumberOfFragments(); ++i)\r\n\t\t\t\t\tactuallyAllocatedTuples.add( plan.getMinNumberOfRecords(i) + _randGenerator.nextInt(plan.getMaxNumberOfRecords(i) - plan.getMinNumberOfRecords(i)) );\r\n\r\n\t\t\t\tif(plan.getAllocatedSellers().size() < 1)\r\n\t\t\t\t\tthrow new RuntimeException(\"No sellers in plan: \" + plan.toString());\r\n\t\t\t\t\r\n\t\t\t\tplan.setActuallyAllocatedRecords(actuallyAllocatedTuples);\r\n\t\t\t\tList<Integer> sellersInvolved = plan.getAllocatedSellers();\r\n\t\t\t\t\r\n\t\t\t\tList<ComplexSemanticWebType> allocatedPlans = new LinkedList<ComplexSemanticWebType>();\r\n\t\t\t\tallocatedPlans.add(plan);\r\n\t\t\t\t_allocation.addAllocatedAgent(plan.getAgentId(), sellersInvolved, allocatedBundles,\r\n\t\t\t\t\t\t\t\t\t\t\t plan.computeExpectedValue(), plan.computeExpectedCosts());\r\n\t\t\t\t_allocation.addAllocatedPlans(allocatedPlans, true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void EvalFitness(){\r\n _FitVal=0;\r\n for(int i=0; i<7;i++)\r\n for(int j=i+1;j<8;j++){\r\n if( _Data[i]==_Data[j]) _FitVal++;\r\n if(j-i==Math.abs(_Data[i]-_Data[j])) _FitVal++;\r\n }\r\n }", "@Test\n\tpublic void armarGananciasDeLosResultantes() {\n\t\t/*\n\t\t * me salieron 24 arboles, que me interesan los campos \n\t\t * NodeID_24 : para saber que hoja del arbol fue \n\t\t * PredictedProbability_2_24 : para saber que probabilidad de baja mas 2 fue \n\t\t * SampleAssignment_24 : para saber si fue tomado para test o train tengoq ue correr el script siguient para persistirlo en la DB\n\t\t * \n\t\t * los nombres de las variables van como anteriorlmente , el inicial no\n\t\t * tiene subindice, pero se lo cambi oy le pongo 0 cosa de que arranque\n\t\t * en 0\nIF (A_default_prob >= 0.025 AND clase_int=2) A_default_ganancia=7800. \nEXECUTE. \nRECODE A_default_ganancia (SYSMIS=-200). \nEXECUTE.\n\nSAVE TRANSLATE /TYPE=ODBC \n /CONNECT='DSN=dmkd-dmf;' \n /ENCRYPTED \n /MISSING=RECODE \n /SQL='CREATE TABLE historico_201503_default_tree_result (numero_de_cliente double , foto_mes double , A_default_node double , A_default_prob double, A_default_ganancia double )' \n /REPLACE \n /TABLE='SPSS_TEMP' \n /KEEP=numero_de_cliente, foto_mes, A_default_node, A_default_prob ,A_default_ganancia\n /SQL='INSERT INTO historico_201503_default_tree_result (numero_de_cliente, foto_mes, A_default_node, A_default_prob,A_default_ganancia) SELECT numero_de_cliente, foto_mes, A_default_node, A_default_prob,A_default_ganancia FROM SPSS_TEMP' \n /SQL='DROP TABLE SPSS_TEMP'. \nEXECUTE.\nDATASET CLOSE.\nEXECUTE.\n\n\nPredictedProbability_2_24\n\t\t * \n\t\t */\n\t\t// de 0 a 24\n\t\tString separator = System.getProperty(\"line.separator\");\n\t\tString outFolder = ArbolFileSources.userFolder + \"/Dropbox/julio_box/educacion/maestria_explotacion_datos_uba/materias/cuat_2_dm_finanzas/entregable/historia/\";\n\t\tString timeStampFolder = UtilidadesGenerales.getTimeStamp(null, null);\n\t\tStringBuilder build = new StringBuilder();\n\t\tfor (int i = 0; i < 25; i++) {\n\t\t\t\n\t\t\tString nombreProba = \"PredictedProbability_2_\"+i;\n\t\t\tString nombreGanancia= \"ganancia_\"+i;\n\t\t\tString nombreNodo= \"NodeID_\"+i;\n\t\t\tString nombreTrain= \"SampleAssignment_\"+i;\n\t\t\tString nombreTabla = \"corridaCiega_\"+i;\n\t\t\t\n\t\t\t/* recode de ganancia */\n\t\t\tbuild.append(\"IF (PredictedProbability_2_\").append(i).append(\" >= 0.025 AND clase_int=2 ) ganancia_\").append(i).append(\"=7800.\").append(separator);\n\t\t\tbuild.append(\"EXECUTE.\").append(separator);\n\t\t\tbuild.append(\"RECODE ganancia_\").append(i).append(\"(SYSMIS=-200).\").append(separator);\n\t\t\tbuild.append(\"EXECUTE.\").append(separator);\n\t\t\t\n\t\t\t \n\t\t\t/* save sql */\n\t\t\tbuild.append(\"SAVE TRANSLATE /TYPE=ODBC\").append(separator);\n\t\t\tbuild.append(\"/CONNECT='DSN=dmkd-dmf;'\").append(separator);\n\t\t\tbuild.append(\"/ENCRYPTED \").append(separator);\n\t\t\tbuild.append(\"/MISSING=RECODE \").append(separator);\n\t\t\tbuild.append(\"/SQL='CREATE TABLE \").append(nombreTabla).append(\" (numero_de_cliente double , foto_mes double , '+\").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" double , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" double ) '\").append(separator);\n\t\t\t\n \n\t\t\tbuild.append(\"/REPLACE \").append(separator);\n\t\t\tbuild.append(\"/TABLE='SPSS_TEMP' \").append(separator);\n\t\t\tbuild.append(\"/KEEP=numero_de_cliente, foto_mes, \").append(separator);\n\t\t\tbuild.append(nombreProba).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreGanancia).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreNodo).append(\" , \").append(separator);\n\t\t\tbuild.append(nombreTrain).append(\" \").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"/SQL='INSERT INTO \").append(nombreTabla).append(\" (numero_de_cliente, foto_mes, '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" '+\").append(separator);\n\t\t\tbuild.append(\"' ) SELECT numero_de_cliente, foto_mes, '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreProba).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreGanancia).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreNodo).append(\" , '+\").append(separator);\n\t\t\tbuild.append(\"' \").append(nombreTrain).append(\" '+\").append(separator);\n\t\t\tbuild.append(\"' FROM SPSS_TEMP'\").append(separator);\n\t\t\t\n\t\t\tbuild.append(\"/SQL='DROP TABLE SPSS_TEMP'.\").append(separator); \n\t\t\tbuild.append(\"EXECUTE.\").append(separator).append(separator);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tUtilidadesGenerales.writeToFile(build.toString(), \"UTF-8\", outFolder + timeStampFolder + \"_syntax_corridaCiega_.txt\");\n\t}", "public VampireNumberImpl findVampire(int i, int a1000, int a100, int a10, int a1) {\n boolean[] vars = new boolean[12];\n int[] firsts = new int[12];\n int[] seconds = new int[12];\n\n firsts[0] = (a1000 * 10 + a100);\n seconds[0] = (a10 * 10 + a1);\n vars[0] = firsts[0] * seconds[0] == i;\n\n firsts[1] = (a1000 * 10 + a100);\n seconds[1] = (a10 + a1 * 10);\n vars[1] = firsts[1] * seconds[1] == i;\n\n firsts[2] = (a1000 + a100 * 10);\n seconds[2] = (a10 * 10 + a1);\n vars[2] = (a1000 + a100 * 10) * (a10 * 10 + a1) == i;\n\n firsts[3] = (a1000 + a100 * 10);\n seconds[3] = (a10 + a1 * 10);\n vars[3] = (a1000 + a100 * 10) * (a10 + a1 * 10) == i;\n\n firsts[4] = (a1000 * 10 + a10);\n seconds[4] = (a100 * 10 + a1);\n vars[4] = (a1000 * 10 + a10) * (a100 * 10 + a1) == i;\n\n firsts[5] = (a1000 * 10 + a10);\n seconds[5] = (a100 + a1 * 10);\n vars[5] = (a1000 * 10 + a10) * (a100 + a1 * 10) == i;\n\n firsts[6] = (a1000 + a10 * 10);\n seconds[6] = (a100 * 10 + a1);\n vars[6] = (a1000 + a10 * 10) * (a100 * 10 + a1) == i;\n\n firsts[7] = (a1000 + a10 * 10);\n seconds[7] = (a100 + a1 * 10);\n vars[7] = (a1000 + a10 * 10) * (a100 + a1 * 10) == i;\n\n firsts[8] = (a1000 * 10 + a1);\n seconds[8] = (a100 * 10 + a10);\n vars[8] = (a1000 * 10 + a1) * (a100 * 10 + a10) == i;\n\n firsts[9] = (a1000 + a1 * 10);\n seconds[9] = (a100 * 10 + a10);\n vars[9] = (a1000 + a1 * 10) * (a100 * 10 + a10) == i;\n\n firsts[10] = (a1000 * 10 + a1);\n seconds[10] = (a100 + a10 * 10);\n vars[10] = (a1000 * 10 + a1) * (a100 + a10 * 10) == i;\n\n firsts[11] = (a1000 + a1 * 10);\n seconds[11] = (a100 + a10 * 10);\n vars[11] = (a1000 + a1 * 10) * (a100 + a10 * 10) == i;\n\n int j = 0;\n for (j = 0; j < vars.length; j++) {\n if (vars[j]) {\n break;\n }\n }\n return new VampireNumberImpl(firsts[j] * seconds[j], firsts[j], seconds[j]);\n }", "@Override\n public int[] schedule(TestInstance testInstance, int[] minizincSolution) {\n\n long start = System.currentTimeMillis();\n\n int numAgents = testInstance.numAgents;\n int numJobs = testInstance.numJobs;\n //Initialize some testers for later\n CondorcetConsistencyTester condorsetTests = new CondorcetConsistencyTester(numJobs, numAgents);\n SumOfTardinessTester sumOfTardTests = new SumOfTardinessTester(numJobs, numAgents);\n ParetoEfficiencyTester paretoTests = new ParetoEfficiencyTester(numJobs, numAgents);\n\n // Initialize the scores with all 0\n Scores scores = new Scores(numJobs);\n\n //PART 1\n // This double loop compares each job with all the others\n for(int i = 0; i < numJobs - 1; i++) {\n for (int j = i + 1; j < numJobs; j++) {\n\n int counter_i = 0;\n int counter_j = 0;\n // Now we count how many times the job with ID=i comes before the job with ID=j\n // For all preferences\n // If job with ID=i comes before the job with ID=j\n for (Preference preference : testInstance.preferences)\n if (preference.isBefore(i, j))\n counter_i++; // Increment the number of agents preferring i over j\n else counter_j++; // Increment the number of agents preferring j over i\n\n\n int p_i = testInstance.processingTimes[i];\n int p_j = testInstance.processingTimes[j];\n\n // The threshold of job i, as given by our definition\n // This rule is the main and only way the processing times of the\n // jobs are taken into account for the final \"true\" ranking\n float threshold = (float)(p_i * numAgents) / (float)(p_i + p_j);\n\n if (counter_i == threshold) { //If the number of votes equals the threshold for job i,\n // the same applies for job j and its corresponding threshold, because math, so give both of them a point\n scores.addOne(i);\n scores.addOne(j);\n } else if (counter_i > threshold) { //Give a point to job i for surpassing the threshold\n scores.addOne(i);\n } else { //Give a point to job j for surpassing its threshold (again, because math)\n scores.addOne(j);\n }\n\n // Store the votes each job got against the other\n CondorcetConsistencyTester.votes[i][j] = counter_i;\n CondorcetConsistencyTester.votes[j][i] = counter_j;\n\n }\n }\n\n //Sort the jobs in descending order, based on the score they obtained\n ArrayList scheduleArrayList = scores.sorted();\n\n //Transform the sorted list of jobs into an array\n int[] schedule = new int[numJobs];\n for(int i = 0; i < numJobs; i++){\n schedule[i] = (int)scheduleArrayList.get(i);\n }\n\n// boolean isThereWinner = condorsetTests.isThereCondorcetWinner();\n// System.out.println(\"isThereWinner: \" + isThereWinner);\n// boolean isCondorcetWinner = condorsetTests.testCondorcetWinner(schedule);\n// System.out.println(\"isCondorcetWinner: \" + isCondorcetWinner);\n// System.out.println(\"--------------------------------------------------------------------\");\n// System.out.println(\"PTA violations before: \" + condorsetTests.countPTACondorcetViolations(schedule, testInstance.processingTimes));\n// System.out.println(\"Sum of Tardiness before: \" + sumOfTardTests.calculateSumOfTardiness(schedule, testInstance.preferences, testInstance.processingTimes));\n// System.out.println(\"--------------------------------------------------------------------\");\n// int[] agentTardiness = sumOfTardTests.getAgentTardiness();\n// System.out.println(\"Tardiness per agent (before): \" + Arrays.toString(agentTardiness));\n// System.out.println(\"Gini Index (before): \" + GiniIndexTester.getIndex(agentTardiness, numAgents));\n\n\n //PART 2 - Make our schedule Condorcet-consistent\n //First cell of the \"results\" array represents consistency,\n //second cell represents index to start the next search from (optimization purposes)\n int[] results = new int[2];\n //While our schedule is not Condorcet-consistent\n while (results[0] == 0) {\n //Search for swaps that will render the schedule Condorcet-consistent\n results = condorsetTests.testCondorcetConsistency(schedule, results[1]);\n //If schedule has become Condorcet-consistent\n if (results[0] == 1)\n System.out.println(\"Schedule: \" + Arrays.toString(schedule));\n }\n\n //Runtime\n long end = System.currentTimeMillis();\n long ourRuntime = end - start;\n System.out.println(\"OUR TOTAL RUNTIME: \" + ourRuntime + \" ms\");\n\n Statistics.myRuntime.add(ourRuntime);\n Statistics.numAgents.add(testInstance.numAgents);\n Statistics.numJobs.add(testInstance.numJobs);\n\n //PTA-Violations\n double myPercPTA = ((double)condorsetTests.countPTACondorcetViolations(schedule, testInstance.processingTimes)) / (numJobs * numJobs /2);\n System.out.println(\"PTA violations % for our solution: \" + myPercPTA);\n Statistics.myPTAviolations.add(myPercPTA);\n if (minizincSolution != null) {\n double mznPercPTA = ((double) condorsetTests.countPTACondorcetViolations(minizincSolution, testInstance.processingTimes) / (numJobs * numJobs /2));\n System.out.println(\"PTA violations % for MINIZINC: \" + mznPercPTA);\n Statistics.mznPTAviolations.add(mznPercPTA);\n }\n\n //Sum-of-tardiness and tardiness per agent\n int mySum = sumOfTardTests.calculateSumOfTardiness(schedule, testInstance.preferences, testInstance.processingTimes);\n System.out.println(\"Sum of Tardiness for our solution: \" + mySum);\n int[] agentTardiness = sumOfTardTests.getAgentTardiness();\n\n int mznSum = 0;\n int[] agentTardinessMinizinc = null;\n if (minizincSolution != null) {\n mznSum = sumOfTardTests.calculateSumOfTardiness(minizincSolution, testInstance.preferences, testInstance.processingTimes);\n System.out.println(\"Sum of Tardiness for MINIZINC: \" + mznSum);\n agentTardinessMinizinc = sumOfTardTests.getAgentTardiness();\n }\n\n Statistics.mySumOfTardiness.add(mySum);\n if (minizincSolution != null) {\n Statistics.mznSumOfTardiness.add(mznSum);\n }\n\n System.out.println(\"Tardiness per agent: \" + Arrays.toString(agentTardiness));\n\n //Pareto efficiency\n System.out.println(\"Pareto Efficient schedule: \" + paretoTests.isScheduleParetoEfficient(schedule));\n //System.out.println(\"Pareto Efficiency per agent: \" + Arrays.toString(paretoTests.agentParetoEfficiency(agentTardiness)));\n\n //Gini index\n double myIndex = GiniIndexTester.getIndex(agentTardiness, numAgents);\n System.out.println(\"Gini Index for our solution: \" + myIndex);\n Statistics.myGiniIndex.add(myIndex);\n\n if (minizincSolution != null) {\n double mznIndex = GiniIndexTester.getIndex(agentTardinessMinizinc, numAgents);\n System.out.println(\"Gini Index for MINIZINC: \" + mznIndex);\n Statistics.mznGiniIndex.add(mznIndex);\n }\n\n return schedule;\n\n\n }", "@Test\n public void test_distanceLinaireSurX_distanceLinaireSurX_ParcourOptimum_Pour_4villes() {\n\n Pays pays = new Pays(4);\n\n int positionY = (int) (Math.random() * 50);\n\n pays.setPositionVille(0, new Point(2, positionY));\n pays.setPositionVille(1, new Point(3, positionY));\n pays.setPositionVille(2, new Point(4, positionY));\n pays.setPositionVille(3, new Point(5, positionY));\n\n brutForceV3.recherche(pays, 0);\n\n assertEquals(\"0>1>2>3>0\", brutForceV3.getParcours().getVillesEmprunté());\n assertEquals(brutForceV3.getParcours().getDistance(),\n parcoursVilles(pays, brutForceV3.getParcours().getVillesEmprunté(),\">\"));\n\n }", "void evaluate()\n\t{\n\t\toperation.evaluate();\n\t}", "public void mostrarVagon() {\n\t\tSystem.out.println(\"Estado actual del vagon\");\n\t\tfor (int i = 0; i < getNumeroAsientosFila(); i++) {\n\t\t\tfor (int j = 0; j < getNumeroAsientosColumna(); j++) {\n\t\t\t\tSystem.out.print(vagonVacio[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "void aprovarAnalise();", "void MontaValores(){\r\n // 0;0;-23,3154166666667;-51,1447783333333;0 // Extrai os valores e coloca no objetos\r\n // Dis;Dir;Lat;Long;Velocidade\r\n // Quebra de Rota lat=-999.999 long=-999.999 ==> Marca ...\r\n \r\n int ind=0;\r\n NMEAS=NMEA.replace(\",\" , \".\");\r\n \r\n //1)\r\n dists=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind));\r\n Distancia=Double.valueOf(dists);\r\n ind=ind+dists.length()+1;\r\n \r\n //2)\r\n dirs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Direcao=Double.valueOf(dirs);\r\n ind=ind+dirs.length()+1;\r\n \r\n //3)\r\n lats=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Lat=Double.valueOf(lats);\r\n ind=ind+lats.length()+1;\r\n \r\n //4)\r\n longs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Long=Double.valueOf(longs);\r\n ind=ind+longs.length()+1;\r\n \r\n //5)\r\n vels=NMEAS.substring(ind,NMEAS.length());\r\n // Transforma de Knots para Km/h\r\n Velocidade=Double.valueOf(vels)/100*1.15152*1.60934;\r\n vels=String.valueOf(Velocidade);\r\n ind=ind+vels.length()+1;\r\n \r\n }", "abstract int estimationParameter1();", "public int vecinos(){\n int v=0;\n if(fila<15 && columna<15 && fila>0 && columna>0){\n if(automata.getElemento(fila,columna-1)!=null && automata.getElemento(fila,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna-1)!=null && automata.getElemento(fila+1,columna-1).isVivo()){v++;}\n if(automata.getElemento(fila+1,columna)!=null && automata.getElemento(fila+1,columna).isVivo()){v++;} \n if(automata.getElemento(fila+1,columna+1)!=null && automata.getElemento(fila+1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila,columna+1)!=null && automata.getElemento(fila,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna+1)!=null && automata.getElemento(fila-1,columna+1).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna)!=null && automata.getElemento(fila-1,columna).isVivo()){v++;}\n if(automata.getElemento(fila-1,columna-1)!=null && automata.getElemento(fila-1,columna-1).isVivo()){v++;}\n }\n else{v=limitesX();}\n return v;\n }", "private void analyze() {\n\t\tdouble org = 0;\n\t\tdouble avgIndPerDoc = 0;\n\t\tdouble avgTotalPerDoc = 0;\n\n\t\tfor (Instance instance : instanceProvider.getInstances()) {\n\n\t\t\tint g = 0;\n\t\t\tSet<AbstractAnnotation> orgM = new HashSet<>();\n\n//\t\t\torgM.addAll(instance.getGoldAnnotations().getAnnotations());\n//\t\t\tg += instance.getGoldAnnotations().getAnnotations().size();\n\n\t\t\tfor (AbstractAnnotation instance2 : instance.getGoldAnnotations().getAnnotations()) {\n\n\t\t\t\tResult r = new Result(instance2);\n\n\t\t\t\t{\n////\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getTrend());\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getInvestigationMethod());\n////\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(\n////\t\t\t\t\t\t\tr.getDefinedExperimentalGroups().stream().map(a -> a.get()).collect(Collectors.toList()));\n//\n//\t\t\t\t\torgM.addAll(aa);\n//\t\t\t\t\tg += aa.size();\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * props of exp\n\t\t\t\t\t */\n\t\t\t\t\tfor (DefinedExperimentalGroup instance3 : r.getDefinedExperimentalGroups()) {\n\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getOrganismModel());\n//\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(instance3.getTreatments());\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> ab = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getDeliveryMethods().stream())\n\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n\t\t\t\t\t\taa.addAll(instance3.getTreatments().stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Treatment(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getDeliveryMethod()).filter(i -> i != null)\n\t\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getAnaesthetics().stream())\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryDevice()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\t// List<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryLocation()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\torgM.addAll(aa);\n\t\t\t\t\t\tg += aa.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tavgIndPerDoc += orgM.size();\n\t\t\tavgTotalPerDoc += g;\n\n\t\t\torg += ((double) orgM.size()) / (g == 0 ? 1 : g);\n//\t\t\tSystem.out.println(((double) orgM.size()) / g);\n\n\t\t}\n\t\tSystem.out.println(\"avgTotalPerDoc = \" + avgTotalPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"avgIndPerDoc = \" + avgIndPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"org = \" + org);\n\t\tSystem.out.println(\"avg. org = \" + (org / instanceProvider.getInstances().size()));\n\t\tSystem.out.println(new DecimalFormat(\"0.00\").format(avgTotalPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(avgIndPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(org / instanceProvider.getInstances().size()));\n\t\tSystem.exit(1);\n\n\t\tStats.countVariables(0, instanceProvider.getInstances());\n\n\t\tint count = 0;\n\t\tfor (SlotType slotType : EntityType.get(\"Result\").getSlots()) {\n\n\t\t\tif (slotType.isExcluded())\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tSystem.out.println(slotType.name);\n\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.exit(1);\n\t}", "public void affichageSolution() {\n\t\t//On commence par retirer toutes les traces pré-existantes du labyrinthe\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Trace) {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j] = new Case();\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//On parcourt toutes les cases du labyrinthe. Si on trouve un filon non extrait dont le chemin qui le sépare au mineur est plus petit que shortestPath, on enregistre la longueur du chemin ainsi que les coordonnees de ledit filon\n\t\tint shortestPath = Integer.MAX_VALUE;\n\t\tint[] coordsNearestFilon = {-1,-1};\n\t\tfor (int i=0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tfor (int j=0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Filon && ((Filon)this.laby.getLabyrinthe()[i][j]).getExtrait() == false) {\n\t\t\t\t\tif (this.laby.solve(j,i) != null) {\n\t\t\t\t\t\tint pathSize = this.laby.solve(j,i).size();\n\t\t\t\t\t\tif (pathSize < shortestPath) {\n\t\t\t\t\t\t\tshortestPath = pathSize;\n\t\t\t\t\t\t\tcoordsNearestFilon[0] = j;\n\t\t\t\t\t\t\tcoordsNearestFilon[1] = i;\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//Si il n'y a plus de filon non extrait atteignable, on cherche les coordonnes de la clef\n\t\tif (coordsNearestFilon[0] == -1) {\n\t\t\tcoordsNearestFilon = this.laby.getCoordsClef();\n\t\t\t//Si il n'y a plus de filon non extrait atteignable et que la clef a deja ouvert la porte, on cherche les coordonnes de la sortie\n\t\t\tif (coordsNearestFilon == null)\tcoordsNearestFilon = this.laby.getCoordsSortie();\n\t\t}\n\n\t\t//On cree une pile qui contient des couples de coordonnees qui correspondent a la solution, puis on depile car le dernier element est l'objectif vise\n\t\tStack<Integer[]> solution = this.laby.solve(coordsNearestFilon[0], coordsNearestFilon[1]);\n\t\tsolution.pop();\n\n\t\t//Tant que l'on n'arrive pas au premier element de la pile (cad la case ou se trouve le mineur), on depile tout en gardant l'element depile, qui contient les coordonnees d'une trace que l'on dessine en suivant dans la fenetre\n\t\twhile (solution.size() != 1) {\n\t\t\tInteger[] coordsTmp = solution.pop();\n\t\t\tTrace traceTmp = new Trace();\n\t\t\tthis.laby.getLabyrinthe()[coordsTmp[1]][coordsTmp[0]] = new Trace();\n\t\t\t((JLabel)grille.getComponents()[coordsTmp[1]*this.laby.getLargeur()+coordsTmp[0]]).setIcon(traceTmp.imageCase());\n\t\t}\n\t\tSystem.out.println(\"\\n========================================== SOLUTION =====================================\\n\");\n\t\tthis.affichageLabyrinthe();\n\t}", "private void test() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tBpmnModelInstance modelInstance = Bpmn.readModelFromFile(loadedFile);\n\t\tJsonEncoder jsonEncoder = new JsonEncoder(loadedFile.getName());\n\t\tBpmnBasicMetricsExtractor basicExtractor = new BpmnBasicMetricsExtractor(modelInstance, jsonEncoder);\n\t\tBpmnAdvancedMetricsExtractor advExtractor = new BpmnAdvancedMetricsExtractor(basicExtractor, jsonEncoder);\n\t\tlong loadTime = System.currentTimeMillis() - startTime;\n//\t\tSystem.out.println(\"Tempo load del file: \" + loadTime + \"ms\");\n\t\tbasicExtractor.runMetrics();\n\t\tlong basicTime = System.currentTimeMillis() - loadTime - startTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche di base: \" + basicTime + \"ms\");\n\t\tadvExtractor.runMetrics();\n\t\tlong advTime = System.currentTimeMillis() - basicTime - startTime - loadTime;\n//\t\tSystem.out.println(\"Tempo calcolo metriche avanzate: \" + advTime + \"ms\");\n\t\tjsonEncoder.exportJson();\n\t\tMySqlInterface db = new MySqlInterface();\n\t\tdb.connect();\n//\t\tdb.createTables(jsonEncoder);\n//\t\tdb.createAndInsertMetricsInfosTable();\n//\t\tdb.saveMetrics(jsonEncoder);\n//\t\tdb.closeConnection();\n\t}", "public static void main( String[] args ){\n //Movemos el array de electrodomesticos\n Electrodomesticos[] electrodomesticos = Ejecutable.electrodomesticosArray();\n //Haciendo las comprobaciones\n electrodomesticos = Ejecutable.asignacionElectrodomesticos(electrodomesticos);\n //Seleccion del array precio\n double precioFinal[] = Ejecutable.precioElectrodomesticos(electrodomesticos);\n System.out.println();\n System.out.println(\"Los diferentes gastos se podrian dividir en estas categorias:\");\n System.out.println();\n System.out.println(\"Televisores, con un precio total de: \" + precioFinal[2]);\n System.out.println(\"Lavadoras: con un precio total de: \" + precioFinal[1]);\n System.out.println(\"Otro tipo de electrodomésticos, con un precio total de: \" + precioFinal[0]);\n System.out.println();\n System.out.println(\"Si sumamos los diferentes costes: \"+precioFinal[0]+\" + \"+precioFinal[1] + \" + \" +precioFinal[2] + \" tenemos como resultado total: \" + (precioFinal[0]+precioFinal[1]+precioFinal[2]) );\n }", "@Test\n public void testSumPlanAddedModifiedSizeActualDevelopmentTime()\n {\n assertEquals(this.linealRegressionCalculator.sumPlanAddedModifiedSizeActualDevelopmentTime(), 503075.7, 0.01);\n }", "public static Resultado PCF(GrafoMatriz G, Demanda demanda,ListaEnlazada [] ksp,int capacidad){\n \n //*Definicion de variables las variables\n int inicio=0, fin=0,cont; // posicion inicial y final dentro del espectro asi como el contador de FSs contiguos disponibles\n \n int demandaColocada=0; // bandera para controlar si ya se encontro espectro disponible para la demanda.\n int [] OE= new int[capacidad]; //Ocupacion de Espectro.\n ArrayList<ListaEnlazada> kspUbicados = new ArrayList<ListaEnlazada>();\n ArrayList<Integer> inicios = new ArrayList<Integer>();\n ArrayList<Integer> fines = new ArrayList<Integer>();\n ArrayList<Integer> indiceKsp = new ArrayList<Integer>();\n\n //Probamos para cada camino, si existe espectro para ubicar la damanda\n int k=0;\n\n while(k<ksp.length && ksp[k]!=null){\n //Inicializadomos el espectro, inicialmente todos los FSs estan libres\n for(int i=0;i<capacidad;i++){\n OE[i]=1;\n }\n //Calcular la ocupacion del espectro para cada camino k\n for(int i=0;i<capacidad;i++){\n for(Nodo n=ksp[k].getInicio();n.getSiguiente().getSiguiente()!=null;n=n.getSiguiente()){\n //System.out.println(\"v1 \"+n.getDato()+\" v2 \"+n.getSiguiente().getDato()+\" cant vertices \"+G.getCantidadDeVertices()+\" i \"+i+\" FSs \"+G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS().length);\n if(G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS()[i].getEstado()==0){\n OE[i]=0;\n break;\n }\n }\n }\n \n inicio=fin=cont=0;\n for(int i=0;i<capacidad;i++){\n if(OE[i]==1){\n inicio=i;\n for(int j=inicio;j<capacidad;j++){\n if(OE[j]==1){\n cont++;\n }\n else{\n cont=0;\n break;\n }\n //si se encontro un bloque valido, salimos de todos los bloques\n if(cont==demanda.getNroFS()){\n fin=j;\n fines.add(fin);\n inicios.add(inicio);\n demandaColocada=1;\n kspUbicados.add(ksp[k]);\n indiceKsp.add(k);\n //inicio=fin=cont=0;\n break;\n }\n }\n }\n if(demandaColocada==1){\n demandaColocada = 0;\n break;\n }\n }\n k++;\n }\n \n /*if(demandaColocada==0){\n return null; // Si no se encontro, en ningun camino un bloque contiguo de FSs, retorna null.\n }*/\n \n if (kspUbicados.isEmpty()){\n //System.out.println(\"Desubicado\");\n return null;\n }\n \n int [] cortesSlots = new int [2];\n double corte = -1;\n double Fcmt = 9999999;\n double FcmtAux = -1;\n \n int caminoElegido = -1;\n\n //controla que exista un resultado\n boolean nulo = true;\n\n ArrayList<Integer> indiceL = new ArrayList<Integer>();\n \n //contar los cortes de cada candidato\n for (int i=0; i<kspUbicados.size(); i++){\n cortesSlots = Utilitarios.nroCuts(kspUbicados.get(i), G, capacidad);\n if (cortesSlots != null){\n \n corte = (double)cortesSlots[0];\n \n indiceL = Utilitarios.buscarIndices(kspUbicados.get(i), G, capacidad);\n \n double saltos = (double)Utilitarios.calcularSaltos(kspUbicados.get(i));\n \n double slotsDemanda = demanda.getNroFS();\n \n //contar los desalineamientos\n double desalineamiento = (double)Utilitarios.contarDesalineamiento(kspUbicados.get(i), G, capacidad, cortesSlots[1]);\n \n double capacidadLibre = (double)Utilitarios.contarCapacidadLibre(kspUbicados.get(i),G,capacidad);\n \n \n \n \n // double vecinos = (double)Utilitarios.contarVecinos(kspUbicados.get(i),G,capacidad);\n \n\n \n //FcmtAux = corte + (desalineamiento/(demanda.getNroFS()*vecinos)) + (saltos *(demanda.getNroFS()/capacidadLibre)); \n \n FcmtAux = ((saltos*slotsDemanda) + corte + desalineamiento)/capacidadLibre;\n \n if (FcmtAux<Fcmt){\n Fcmt = FcmtAux;\n caminoElegido = i;\n }\n \n nulo = false;\n if (caminoElegido==-1){\n System.out.println(\"Camino Elegido = -1 ..................\");\n }\n \n }\n }\n \n if (caminoElegido==-1){\n System.out.println(\"Camino Elegido = -1 ..................\");\n }\n //caminoElegido = Utilitarios.contarCuts(kspUbicados, G, capacidad);\n \n if (nulo || caminoElegido==-1){\n return null;\n }\n \n Resultado r= new Resultado();\n /*r.setCamino(k-1);\n r.setFin(fin);\n r.setInicio(inicio);*/\n \n r.setCamino(indiceKsp.get(caminoElegido));\n r.setFin(fines.get(caminoElegido));\n r.setInicio(inicios.get(caminoElegido));\n return r;\n }", "public double getV() {\r\n\t\treturn v;\t\r\n\t\t}", "public final void doTest() {\n\n constructTestPlan();\n calculator.start();\n resultViewer.start();\n\n // Run Test Plan\n getJmeter().configure(testPlanTree);\n ((StandardJMeterEngine)jmeter).run();\n }", "public void evaluaVisibilidad(int posX, int posY)\n {\n \n /** Contiene todas las posibles casillas visibles.\n * Si en el proceso una casilla tapa, pasa a modo 'oclusion, y ocluye las demás hasta que llega al punto final (Las quita del Array)\n */\n this.casillasVisibles=new TreeSet<>();\n \n //Realizar la interpolacion\n boolean visible=true;\n CoordCasilla origen=new CoordCasilla(posX , posY);\n CoordCasilla destino;\n List<CoordCasilla>camino;\n \n /* Cell cell = new Cell();\n cell.setTile(mapaActual.getTileSets().getTileSet(0).getTile(138));*/\n \n //Calcular las interpolaciones\n for(CoordCasilla cc:MATRIZ_INTERPOLACION)\n {\n visible=true;\n destino=new CoordCasilla(origen.x +cc.x,origen.y+cc.y);\n camino= Analizador.interpola(origen, destino);\n \n \n for(CoordCasilla casillaEstudio:camino)\n {\n //Si la celda está fuera de limites no tiene sentido realizar el analisis de las casillas siguientes\n if(casillaEstudio.x<0 || casillaEstudio.x>this.anchoMapa-1 || casillaEstudio.y<0 || casillaEstudio.y>this.altoMapa - 1)\n break;\n \n \n if(!visible ) //No hay visibilidad, quitamos la casilla si la hay del TreeSet\n {\n //posibleVisibilidad.remove(celdaEstudio);\n continue;\n }\n else if(visible && this.capaViibilidad.getCell(casillaEstudio.x,casillaEstudio.y)!=null) //La casilla es limite de visibilidad\n visible=false;\n \n //TEST: Marcamos esta casilla como visible\n //this.capaAux.setCell(celdaEstudio.x, celdaEstudio.y,cell);\n \n //Llegados a este punto, quitamos la niebla de guerra de la casilla\n quitaNieblaDeGuerra(casillaEstudio);\n \n this.casillasVisibles.add(casillaEstudio);\n }\n }\n }", "@Override\n public void tirar() {\n if ( this.probabilidad == null ) {\n super.tirar();\n this.valorTrucado = super.getValor();\n return;\n }\n \n // Necesitamos conocer la probabilidad de cada número, trucados o no, para ello tengo que saber\n // primero cuantos números hay trucados y la suma de sus probabilidades. \n // Con esto puedo calcular la probabilidad de aparición de los números no trucados.\n \n int numeroTrucados = 0;\n double sumaProbalidadesTrucadas = 0;\n double probabilidadNoTrucados = 0;\n \n for ( double p: this.probabilidad ) { // cálculo de la suma números y probabilidades trucadas\n if ( p >= 0 ) {\n numeroTrucados++;\n sumaProbalidadesTrucadas += p;\n }\n }\n \n if ( numeroTrucados < 6 ) { // por si estuvieran todos trucados\n probabilidadNoTrucados = (1-sumaProbalidadesTrucadas) / (6-numeroTrucados);\n }\n\n double aleatorio = Math.random(); // me servirá para escoger el valor del dado\n \n // Me quedo con la cara del dado cuya probabilidad de aparición, sumada a las anteriores, \n // supere el valor aleatorio\n double sumaProbabilidades = 0;\n this.valorTrucado = 0;\n do {\n ++this.valorTrucado;\n if (this.probabilidad[this.valorTrucado-1] < 0) { // no es una cara del dado trucada\n sumaProbabilidades += probabilidadNoTrucados;\n } else {\n sumaProbabilidades += this.probabilidad[this.valorTrucado-1];\n }\n \n } while (sumaProbabilidades < aleatorio && valorTrucado < 6);\n \n \n }", "ValuationMethod getValuationMethod();", "public GenerarInformePlanificacion(Curso[] cursos, Apoderado[] apoderados) {\n this.apoderados = new PlanificacionApoderado[apoderados.length];\n for (int i = 0; i < apoderados.length; i++) {\n this.apoderados[i] = new PlanificacionApoderado();\n }\n\n int cantidadCurso = 0;\n\n for (int apTotal = 0; apTotal < this.apoderados.length; apTotal++) {\n this.apoderados[apTotal].nombre = apoderados[apTotal].getNombre();\n this.apoderados[apTotal].apellido = apoderados[apTotal].getApellido();\n this.apoderados[apTotal].run = apoderados[apTotal].getRun();\n for (int cantPupilos = 0; cantPupilos < apoderados[apTotal].getPupilos().size(); cantPupilos++) {\n\n PlanificacionAlumno alumnoAgregar = new PlanificacionAlumno();\n alumnoAgregar.nombre = apoderados[apTotal].getPupilos().get(cantPupilos).getNombre();\n alumnoAgregar.apellido = apoderados[apTotal].getPupilos().get(cantPupilos).getApellido();\n alumnoAgregar.run = apoderados[apTotal].getPupilos().get(cantPupilos).getRun();\n for (int j = 0; j < 16; j++) {\n for (int alum = 0; alum < 30; alum++) {\n if (cursos[j].getAlumnos()[alum].getRun().equals(apoderados[apTotal].getPupilos().get(cantPupilos).getRun())) {\n cantidadCurso = j;\n break;\n }\n }\n }\n for (int i = 0; i < 50; i++) {\n alumnoAgregar.plan[i] = cursos[cantidadCurso].getAsignaturas()[(int) i / 10].getPlan()[i % 10];\n }\n this.apoderados[apTotal].pupilos.add(alumnoAgregar);\n\n }\n }\n\n }", "public double getBestSolutionEvaluation();", "public static Resultado Def_FA(GrafoMatriz G, Demanda demanda,ListaEnlazada [] ksp,int capacidad){\n int inicio=0, fin=0,cont; // posicion inicial y final dentro del espectro asi como el contador de FSs contiguos disponibles\n \n int demandaColocada=0; // bandera para controlar si ya se encontro espectro disponible para la demanda.\n int [] OE= new int[capacidad]; //Ocupacion de Espectro.\n ArrayList<ListaEnlazada> kspUbicados = new ArrayList<ListaEnlazada>();\n ArrayList<Integer> inicios = new ArrayList<Integer>();\n ArrayList<Integer> fines = new ArrayList<Integer>();\n ArrayList<Integer> indiceKsp = new ArrayList<Integer>();\n\n //Probamos para cada camino, si existe espectro para ubicar la damanda\n int k=0;\n\n while(k<ksp.length && ksp[k]!=null){\n //Inicializadomos el espectro, inicialmente todos los FSs estan libres\n for(int i=0;i<capacidad;i++){\n OE[i]=1;\n }\n //Calcular la ocupacion del espectro para cada camino k\n for(int i=0;i<capacidad;i++){\n for(Nodo n=ksp[k].getInicio();n.getSiguiente().getSiguiente()!=null;n=n.getSiguiente()){\n //System.out.println(\"v1 \"+n.getDato()+\" v2 \"+n.getSiguiente().getDato()+\" cant vertices \"+G.getCantidadDeVertices()+\" i \"+i+\" FSs \"+G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS().length);\n if(G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS()[i].getEstado()==0){\n OE[i]=0;\n break;\n }\n }\n }\n \n inicio=fin=cont=0;\n for(int i=0;i<capacidad;i++){\n if(OE[i]==1){\n inicio=i;\n for(int j=inicio;j<capacidad;j++){\n if(OE[j]==1){\n cont++;\n }\n else{\n cont=0;\n break;\n }\n //si se encontro un bloque valido, salimos de todos los bloques\n if(cont==demanda.getNroFS()){\n fin=j;\n fines.add(fin);\n inicios.add(inicio);\n demandaColocada=1;\n kspUbicados.add(ksp[k]);\n indiceKsp.add(k);\n //inicio=fin=cont=0;\n break;\n }\n }\n }\n if(demandaColocada==1){\n demandaColocada=0;\n break;\n }\n }\n k++;\n }\n \n /*if(demandaColocada==0){\n return null; // Si no se encontro, en ningun camino un bloque contiguo de FSs, retorna null.\n }*/\n \n if (kspUbicados.isEmpty()){\n //System.out.println(\"Desubicado\");\n return null;\n }\n \n \n \n int caminoElegido = Utilitarios.contarCuts(kspUbicados, G, capacidad);\n \n Resultado r= new Resultado();\n /*r.setCamino(k-1);\n r.setFin(fin);\n r.setInicio(inicio);*/\n \n r.setCamino(indiceKsp.get(caminoElegido));\n r.setFin(fines.get(caminoElegido));\n r.setInicio(inicios.get(caminoElegido));\n return r;\n }", "@Test\n public void shouldEvaluateWorkProperlyCase4() throws FileNotFoundException {\n Front storeFront = new ArrayFront(\"/pareto_fronts/ZDT1.pf\") ;\n\n DoubleProblem problem = new MockDoubleProblem(2) ;\n\n List<DoubleSolution> frontToEvaluate = new ArrayList<>() ;\n for (int i = 0 ; i < storeFront.getNumberOfPoints(); i++) {\n DoubleSolution solution = problem.createSolution() ;\n solution.setObjective(0, storeFront.getPoint(i).getValue(0));\n solution.setObjective(1, storeFront.getPoint(i).getValue(1));\n frontToEvaluate.add(solution) ;\n }\n\n WFGHypervolume<DoubleSolution> hypervolume = new WFGHypervolume<>() ;\n double result = hypervolume.computeHypervolume(frontToEvaluate, new ArrayPoint(new double[]{1.0, 1.0})) ;\n\n assertEquals(0.6661, result, 0.0001) ;\n }", "@Override\n public void execute(RuntimeStep exe, RuntimePlan plan) {\n }", "double getSolutionCost();", "public void setCodigoPlan(int p) { this.codigoPlan = p; }", "@Test\n public void pruebasTDD() {\n assertEquals(\"\", TransformadorRomano.calcular(0));\n assertEquals(\"I\", TransformadorRomano.calcular(1));\n assertEquals(\"II\", TransformadorRomano.calcular(2));\n assertEquals(\"III\", TransformadorRomano.calcular(3));\n assertEquals(\"IV\", TransformadorRomano.calcular(4));\n assertEquals(\"V\", TransformadorRomano.calcular(5));\n assertEquals(\"VI\", TransformadorRomano.calcular(6));\n assertEquals(\"VII\", TransformadorRomano.calcular(7));\n assertEquals(\"VIII\", TransformadorRomano.calcular(8));\n assertEquals(\"IX\", TransformadorRomano.calcular(9));\n assertEquals(\"X\", TransformadorRomano.calcular(10));\n assertEquals(\"XI\", TransformadorRomano.calcular(11));\n assertEquals(\"XII\", TransformadorRomano.calcular(12));\n assertEquals(\"XIII\", TransformadorRomano.calcular(13));\n assertEquals(\"XIV\", TransformadorRomano.calcular(14));\n assertEquals(\"XV\", TransformadorRomano.calcular(15));\n assertEquals(\"XVI\", TransformadorRomano.calcular(16));\n assertEquals(\"XVII\", TransformadorRomano.calcular(17));\n assertEquals(\"XVIII\", TransformadorRomano.calcular(18));\n assertEquals(\"XIX\", TransformadorRomano.calcular(19));\n assertEquals(\"XX\", TransformadorRomano.calcular(20));// --> XX\n assertEquals(\"XXI\", TransformadorRomano.calcular(21));// --> XXI\n assertEquals(\"XXII\", TransformadorRomano.calcular(22));\n assertEquals(\"XXIII\", TransformadorRomano.calcular(23));// --> XXIII\n assertEquals(\"XXIV\", TransformadorRomano.calcular(24));// --> XXIV\n assertEquals(\"XXV\", TransformadorRomano.calcular(25));// --> XXV\n assertEquals(\"XXVI\", TransformadorRomano.calcular(26));// --> XXVI\n assertEquals(\"XXXIV\", TransformadorRomano.calcular(34));// --> XXXIV\n assertEquals(\"XXXIX\", TransformadorRomano.calcular(39));// --> XXXIX\n assertEquals(\"XL\", TransformadorRomano.calcular(40));// --> XL\n assertEquals(\"XLVIII\", TransformadorRomano.calcular(48));// --> XLVIII\n assertEquals(\"XLIX\", TransformadorRomano.calcular(49));// --> XLIX\n assertEquals(\"L\", TransformadorRomano.calcular(50));// --> L\n assertEquals(\"LI\", TransformadorRomano.calcular(51));// --> LI\n assertEquals(\"LVIII\", TransformadorRomano.calcular(58));// --> LVIII\n assertEquals(\"LIX\", TransformadorRomano.calcular(59));// --> LIX\n assertEquals(\"LX\", TransformadorRomano.calcular(60));// --> LX\n assertEquals(\"LXIII\", TransformadorRomano.calcular(63));// --> LXIII\n assertEquals(\"LXVIII\", TransformadorRomano.calcular(68));// --> LXVIII\n assertEquals(\"LXXXIX\", TransformadorRomano.calcular(89));// --> LXXXIX\n assertEquals(\"XC\", TransformadorRomano.calcular(90));// --> XC\n assertEquals(\"XCI\", TransformadorRomano.calcular(91));// --> XCI\n assertEquals(\"XCV\", TransformadorRomano.calcular(95));// --> XCV \n assertEquals(\"XCIX\", TransformadorRomano.calcular(99)); \n assertEquals(\"C\", TransformadorRomano.calcular(100));// --> C\n assertEquals(\"CIII\", TransformadorRomano.calcular(103));// --> CIII\n assertEquals(\"CXVII\", TransformadorRomano.calcular(117));// --> CXVII\n assertEquals(\"CLI\", TransformadorRomano.calcular(151)); \n assertEquals(\"CLXX\", TransformadorRomano.calcular(170));// --> CLXX\n assertEquals(\"CC\", TransformadorRomano.calcular(200));\n assertEquals(\"CCL\", TransformadorRomano.calcular(250));// --> CCL\n assertEquals(\"CCCXCIX\", TransformadorRomano.calcular(399));// --> CCCXCIX\n assertEquals(\"CD\", TransformadorRomano.calcular(400));// --> CD \n assertEquals(\"CDX\", TransformadorRomano.calcular(410));// --> CDX\n assertEquals(\"CDL\", TransformadorRomano.calcular(450));// --> CDL\n assertEquals(\"CDLXXX\", TransformadorRomano.calcular(480));// --> CDLXXX\n assertEquals(\"CDXCIX\", TransformadorRomano.calcular(499));// --> CDXCIX\n assertEquals(\"D\", TransformadorRomano.calcular(500));// --> D\n assertEquals(\"DX\", TransformadorRomano.calcular(510));// --> DX\n assertEquals(\"DLXXX\", TransformadorRomano.calcular(580));// --> DLXXX\n assertEquals(\"DXCIX\", TransformadorRomano.calcular(599));// --> DXCIX\n assertEquals(\"DC\", TransformadorRomano.calcular(600));// --> DC\n assertEquals(\"DCX\", TransformadorRomano.calcular(610));// --> DCX\n assertEquals(\"DCL\", TransformadorRomano.calcular(650));// --> DCL\n assertEquals(\"DCXCV\", TransformadorRomano.calcular(695));// --> DCXCV\n assertEquals(\"DCC\", TransformadorRomano.calcular(700));// --> DCC\n assertEquals(\"DCCC\", TransformadorRomano.calcular(800));// --> DCCC\n assertEquals(\"DCCCXL\", TransformadorRomano.calcular(840));// --> DCCCXL\n assertEquals(\"CM\", TransformadorRomano.calcular(900));// --> CM\n assertEquals(\"CML\", TransformadorRomano.calcular(950));// --> CML\n assertEquals(\"CMXCIX\", TransformadorRomano.calcular(999));// --> CMXCIX\n assertEquals(\"M\", TransformadorRomano.calcular(1000));// --> M\n\n }", "@Override\n\tpublic void calculate(systemSelection selection) {\n\t\t\n\t\t// Get selection parameters\n\t\tVector<String> viewers = selection.getSelectedViewers();\n\t\t\t\t\n\t\t// Create Result Object\n\t\tResultObject result = new ResultObject();\n\t\t\n\t\t// Create viewers (stored in this.viewers)\n\t\tthis.setViewers(viewers);\n\t\t\t\t\n\t\t// Set Analysis Name\n\t\tresult.setName(selection.getSelectedAnalysis());\n\t\t\t\t\n\t\tfor (ConcreteViewer viewer : this.viewers) {\n\t\t\tresult.attach(viewer);\n\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t// Package data from World Bank API\n\t\t\n\t\t// Our reader\n\t\tDataReader dr = new DataReader(selection);\n\t\t\t\t\n\t\t// Retrieve cost of education\n\t\tDataObject educationCost = dr.getData(\"SE.XPD.TOTL.GD.ZS\");\n\t\tArrayList<Double> educationCostData = educationCost.getData();\n\t\t\t\t\n\t\t// Retrieve cost of healthcare\n\t\tDataObject healthCost = dr.getData(\"SH.XPD.CHEX.GD.ZS\");\n\t\tArrayList<Double> healthCostData = healthCost.getData();\n\t\t\t\t\t\n\t\t//new ArrayList holds values of the calculation\n\t\tArrayList<Double> ratioEducationHealth = new ArrayList<Double>();\n\t\t\t\t\n\t\t//perform calculation\n\t\tint maxIndex = selection.getSelectedYears()[1] - selection.getSelectedYears()[0];\n\t\tboolean allZero = true;\n\t\tfor(int i=0;i<=maxIndex;i++) {\n\t\t\tdouble ratio = educationCostData.get(i)/healthCostData.get(i);\n\t\t\tratioEducationHealth.add(ratio);\n\t\t\t\n\t\t\tif(ratio!=0 && Double.isNaN(ratio)==false) {\n\t\t\t\tallZero = false;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tif(!allZero) {\n\t\t\t\t\n\t\t\tArrayList<ArrayList<Double>> dataList = new ArrayList<ArrayList<Double>>();\n\t\t\tdataList.add(ratioEducationHealth);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\n\t\t\t// Set Analysis Name\n\t\t\tresult.setName(selection.getSelectedAnalysis());\n\t\t\t\t\t\n\t\t\t// Set years\n\t\t\tresult.setYears(selection.getSelectedYears());\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\tArrayList<String> dataNames = new ArrayList<String>();\n\t\t\tdataNames.add(\"Ratio of Government expenditure on education \"\n\t\t\t\t\t\t\t+ \"vs Current health expenditure\");\n\t\t\t\t\t\n\t\t\tresult.setDataNames(dataNames);\n\t\t\t\n\t\t\t// Set Panel that viewers will belong to\n\t\t\tSystem.out.println(\"Setting Viewer Panel\");\n\t\t\tresult.setPanel(this.viewerPanel);\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Sending Data to Result Object.\");\n\t\t\tSystem.out.println(dataList);\n\t\t\tresult.setResult(dataList);\n\t\t\ttry {\n\t\t\t\tMainUI.getInstance().errorLabel.setText(\"\");\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\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tMainUI.getInstance().errorLabel.setText(\"All data is 0!\");\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\t\n\t}", "public void run(int runIndex, String fullPath) throws ClassNotFoundException, IOException, JMException {\n long seed = (long) 100;//can be randomly seeded.\n RandomGenerator RG = new RandomGenerator(seed);\n\n MetricsUtilPlus utils_ = new MetricsUtilPlus();\n Properties config = new Properties();\n\n String configFile = \"HF_Config_Benchmark/RealProblemSetting.txt\";\n String algorithms[] = {\"NSGAII\", \"SPEA2\", \"IBEA\", \"mIBEA\", \"GDE3\"};\n\n try {\n config.load(new FileInputStream(configFile));\n } catch (IOException e) {\n e.printStackTrace();\n System.err.println(\"Failed to load configuration file!\");\n System.exit(-1);\n }\n\n int totalEval = Integer.parseInt(config.getProperty(\"MaxEvaluations\"));\n int decisionPoints = Integer.parseInt(config.getProperty(\"DecisionPoints\"));//50 iterations\n\n int arcSize = Integer.parseInt(config.getProperty(\"ArchiveSize\"));\n populationSize = Integer.parseInt(config.getProperty(\"PopulationSize\"));\n \n arcSize=100;\n populationSize=100;\n totalEval=250*100;\n totalEval=1000*100;\n \n //arcSize=30;\n //populationSize=30;\n //totalEval=30*50;\n\n //int populationSize = popSize;\n int fixedSolutionEvl = (int) (totalEval / decisionPoints);\n \n System.out.println(\"CF; decision=\"+decisionPoints+\";fixed=\"+fixedSolutionEvl+\";total=\"+totalEval);\n\n MetricsUtil util = new MetricsUtil();\n\n int maxEvals = Integer.parseInt(config.getProperty(\"MaxEvaluations\"));\n\n String SolutionType = config.getProperty(\"SolutionType\");\n int popSize = Integer.parseInt(config.getProperty(\"PopulationSize\"));\n \n popSize=100;\n //popSize=30;\n\n Problem[] problemInstances = new Problem[problemCreator.getQtdProblem()];\n int[] numberOfVar = new int[problemCreator.getQtdProblem()];\n double[] mutationProb = new double[problemCreator.getQtdProblem()];\n Operator[] mutations = new Operator[problemCreator.getQtdProblem()];\n\n //reference point for hypervolume calculation\n /*HyperVolumeMinimizationProblem hyp = new HyperVolumeMinimizationProblem();*/\n /*double[] truePFhypervolume = new double[problemCreator.getQtdProblem()];*/\n for (int problemIndex = 0; problemIndex < problemCreator.getQtdProblem(); problemIndex++) {\n\n problemInstances[problemIndex] = problemCreator.getProblemInstance(problemIndex);\n numberOfVar[problemIndex] = problemInstances[problemIndex].getNumberOfVariables();\n mutationProb[problemIndex] = (Double) 1.0 / numberOfVar[problemIndex];\n HashMap parameters = new HashMap();\n parameters.put(\"probability\", mutationProb[problemIndex]);\n double mutationDistributionIndex = Double.parseDouble(config.getProperty(\"MutationDistributionIndex\"));\n parameters.put(\"distributionIndex\", mutationDistributionIndex);\n String mutationType = config.getProperty(\"MutationType\");\n mutations[problemIndex] = new PolynomialMutation(mutationProb[problemIndex], mutationDistributionIndex);\n }\n\n LLHInterface[] algorithm = new LLHInterface[problemCreator.getQtdProblem()];\n\n System.out.println(\"Run \" + runIndex + \"....\");\n\n choiceFunction CF = new choiceFunction();\n\n for (int instanceIndex = 6; instanceIndex < problemInstances.length; instanceIndex++) {\n numberOfObj=problemInstances[instanceIndex].getNumberOfObjectives();\n reference = new double[numberOfObj];\n Arrays.fill(reference,1.0);\n minimumValues = new double[numberOfObj];\n maximumValues = new double[numberOfObj];\n\n for (int i = 0; i < numberOfObj; i++) {\n reference[i] = 1.0;\n }\n\n int remainEval = totalEval;\n List<S> inputPop = null;\n ArrayList<Integer> heuristicList = new ArrayList<Integer>();\n\n int chosenHeuristic = -1;\n\n QualityIndicators quality = new QualityIndicators();\n double[][] algorithmEffortArray = new double[algorithms.length][2];\n double[][] ROIArray = new double[algorithms.length][2];\n double[][] hyperVolumeArray = new double[algorithms.length][2];\n double[][] uniformDistributionArray = new double[algorithms.length][2];\n\n // for the purpose of computing hypervolume.\n initialiseExtremeValues();\n\n long[] elapsedTime = new long[algorithms.length];\n long[] lastInvokeTime = new long[algorithms.length];\n long[] executionTimeArray = new long[algorithms.length];\n for (int i = 0; i < algorithms.length; i++) {\n elapsedTime[i] = 0;\n }\n\n //initialise population for each instance which is used for each algorithm\n List<S> initialPopulation = ProblemCreator.generateInitialPopulation(problemInstances[instanceIndex], popSize);\n \n List[] resultSolutions = new List[algorithms.length];\n List[] inputSolutions = new List[algorithms.length];\n\n for (int i = 0; i < algorithms.length; i++) {\n inputSolutions[i] = new ArrayList(popSize);\n // at the beginning, all inputsolutions are set as the initialPopulation\n inputSolutions[i] = initialPopulation;\n resultSolutions[i] = new ArrayList(popSize);\n }\n LLHInterface eachAlgorithm = null;\n AlgorithmCreator ac = new AlgorithmCreator(problemInstances[instanceIndex]);\n System.out.println(problemInstances[instanceIndex].getName() + \" \" + problemInstances[instanceIndex].getNumberOfObjectives() + \" \" + problemInstances[instanceIndex].getNumberOfVariables());\n ac.setMaxEvaluationsAndPopulation(totalEval, populationSize);\n //Initialise the choice function matrix and get the initial algorithm\n for (int algorithmIndex = 0; algorithmIndex < algorithms.length; algorithmIndex++) {\n //initialise last invoke time (the start time of calling this algorithm) of each algorithm;\n heuristicList.add(algorithmIndex);\n lastInvokeTime[algorithmIndex] = System.currentTimeMillis();\n\n eachAlgorithm=ac.create(algorithmIndex, remainEval);\n\n long startTime = System.currentTimeMillis();\n\n try {\n resultSolutions[algorithmIndex] = eachAlgorithm.execute(/*initialPopulation*/inputSolutions[algorithmIndex], fixedSolutionEvl);\n } catch (Exception e) {\n e.printStackTrace();\n }\n //record the execution time of each algorithm\n long executionTime = System.currentTimeMillis() - startTime;\n executionTimeArray[algorithmIndex] = executionTime;\n\n remainEval -= fixedSolutionEvl;\n\n //iteration += 2;\n inputSolutions[algorithmIndex] = resultSolutions[algorithmIndex];\n //After executed the algorithm, compute the elapsed time. The end time of called this algorithm\n\n }// end algorithmIndex, executing each algorithm for initialisation the choice function matrix\n\n //update elapsed time of since the heuristic was last called.\n for (int i = 0; i < algorithms.length; i++) {\n elapsedTime[i] = System.currentTimeMillis() - lastInvokeTime[i];\n }\n\n // find worst points and best points for all the three populations\n for (int i = 0; i < algorithms.length; i++) {\n updateExtremeValues(resultSolutions[i]);\n }\n\n for (int i = 0; i < algorithms.length; i++) {\n algorithmEffortArray[i][0] = i;\n algorithmEffortArray[i][1] = quality.getAlgorithmEffort(executionTimeArray[i], fixedSolutionEvl);\n\n ROIArray[i][0] = i;\n ROIArray[i][1] = quality.getRatioOfNonDominatedIndividuals(resultSolutions[i]);\n\n hyperVolumeArray[i][0] = i;\n\n hyperVolumeArray[i][1] = computeScaledHypervolume(resultSolutions[i]);\n //hyperVolumeArray[i][1] = quality.getHyperVolume(resultSolutions[i],realReference);\n\n uniformDistributionArray[i][0] = i;\n uniformDistributionArray[i][1] = quality.getUniformDistribution(resultSolutions[i]);\n\n }\n\n int numberOfMeasures = 4;\n int alpha = 30;//alpha =100;//if turbine number is 30\n\n chosenHeuristic = CF.getMaxChoiceFunction(algorithmEffortArray, 0, ROIArray, 1, hyperVolumeArray, 1,\n uniformDistributionArray, 1, numberOfMeasures, alpha, elapsedTime);\n //start time of the chosen heuristic\n lastInvokeTime[chosenHeuristic] = System.currentTimeMillis();\n\n //the result population of the chosen heuristic is served as the input population\n inputPop = resultSolutions[chosenHeuristic];\n\n while (remainEval > 0) {\n algorithm[instanceIndex]=ac.create(chosenHeuristic, remainEval);\n\n long beginTime = System.currentTimeMillis();\n //execute the chosen algorithm\n heuristicList.add(chosenHeuristic);\n if (fixedSolutionEvl > remainEval) {\n fixedSolutionEvl = remainEval;\n }\n //warranty size. necessary for small pop\n Random rsn=new SecureRandom();\n while(inputPop.size() < populationSize){\n inputPop.add(inputPop.get(rsn.nextInt(inputPop.size())));\n }\n resultSolutions[chosenHeuristic] = algorithm[instanceIndex].execute(inputPop, fixedSolutionEvl);\n inputPop = resultSolutions[chosenHeuristic];\n \n remainEval -= fixedSolutionEvl;\n\n // update executionTimeArray\n executionTimeArray[chosenHeuristic] = System.currentTimeMillis() - beginTime;\n //update elapsed time of since the heuristic was last called.\n for (int i = 0; i < algorithms.length; i++) {\n elapsedTime[i] = System.currentTimeMillis() - lastInvokeTime[i];\n }\n\n algorithmEffortArray[chosenHeuristic][1] = quality.getAlgorithmEffort(executionTimeArray[chosenHeuristic], fixedSolutionEvl);\n\n ROIArray[chosenHeuristic][1] = quality.getRatioOfNonDominatedIndividuals(resultSolutions[chosenHeuristic]);\n\n updateExtremeValues(resultSolutions[chosenHeuristic]);\n hyperVolumeArray[chosenHeuristic][1] = computeScaledHypervolume(resultSolutions[chosenHeuristic]);\n //hyperVolumeArray[chosenHeuristic][1] = quality.getHyperVolume(resultSolutions[chosenHeuristic],realReference);\n\n uniformDistributionArray[chosenHeuristic][1] = quality.getUniformDistribution(resultSolutions[chosenHeuristic]);\n\n chosenHeuristic = CF.getMaxChoiceFunction(algorithmEffortArray, 0, ROIArray, 1, hyperVolumeArray, 1,\n uniformDistributionArray, 1, numberOfMeasures, alpha, elapsedTime);\n //start time of the chosen heuristic\n lastInvokeTime[chosenHeuristic] = System.currentTimeMillis();\n\n //heuristicList.add(chosenHeuristic);\t\t\n }//end while(remainEvl >0)\n \n String arrayListPath = fullPath+\"/\"+problemCreator.getProblemClass() + (instanceIndex + 1) + \"_ChosenHeuristic.txt\";\n utils_.printArrayListInteger(heuristicList, arrayListPath);\n List<S> obtainedSolutionSet = SolutionListUtils.getNondominatedSolutions(inputPop);\n new SolutionListOutput(obtainedSolutionSet)\n .setSeparator(\"\\t\")\n .setFunFileOutputContext(new DefaultFileOutputContext(fullPath+\"/\"+problemCreator.getProblemClass() + (instanceIndex + 1) + \"CF_FinalParetoFront\"\n + runIndex + \".txt\"))\n .print();\n //print out true front's hypervolume\n\n }//end each problem instance\n\n System.out.println(\"Finished\");\n\n }", "public void balayer()\r\n {\r\n int tot=0;\r\n for (int i=0;i<LONGUEUR;i++ )\r\n {\r\n for (int j=0; j<LARGEUR; j++ )\r\n {\r\n tot=0;\r\n Haut = lignesHor[i][j];\r\n Droite = lignesVert[i+1][j];\r\n Bas = lignesHor[i][j+1];\r\n Gauche = lignesVert[i][j];\r\n\r\n if (Haut)\r\n {\r\n tot++;\r\n Vision[i][j][1]=1;\r\n }\r\n\r\n if (Droite)\r\n {\r\n tot++;\r\n Vision[i][j][2]=1;\r\n }\r\n\r\n if (Bas)\r\n {\r\n tot++;\r\n Vision[i][j][3]=1;\r\n }\r\n\r\n\r\n if (Gauche)\r\n {\r\n tot++;\r\n Vision[i][j][4]=1;\r\n }\r\n\r\n Vision[i][j][0]=Vision[i][j][1]+Vision[i][j][2]+Vision[i][j][3]+Vision[i][j][4];\r\n }\r\n }\r\n }", "public int getEstValue(){\r\n return this.estValue;\r\n }", "@Test\n public void testVaticanReport() {\n Game game = new Game(2);\n FaithTrack faith = game.getPlayers().get(0).getFaithTrack();\n faith.increasePos(5);\n assertTrue(faith.isVatican());\n faith.vaticanReport(1);\n assertEquals(faith.getBonusPoints()[0], 2);\n faith.increasePos(5);\n faith.vaticanReport(2);\n assertEquals(faith.getBonusPoints()[0], 2);\n }" ]
[ "0.6896048", "0.6282481", "0.6175715", "0.6107869", "0.60494226", "0.5985174", "0.5979718", "0.5968486", "0.5933097", "0.58599514", "0.5849375", "0.5824645", "0.57977", "0.57596666", "0.5757355", "0.5737904", "0.5728989", "0.5694938", "0.5693111", "0.5654098", "0.5640067", "0.56368977", "0.56305057", "0.5604199", "0.5597516", "0.5593699", "0.55930096", "0.5587278", "0.5549614", "0.5546451", "0.55377805", "0.55359274", "0.5531864", "0.5522328", "0.5511503", "0.5485468", "0.54853386", "0.54835254", "0.5480861", "0.5478959", "0.5469606", "0.5450156", "0.5443941", "0.5438037", "0.54374504", "0.5430261", "0.5425151", "0.54241085", "0.5412638", "0.54118156", "0.5396019", "0.53928864", "0.53927535", "0.5386834", "0.53813183", "0.5376461", "0.53707343", "0.5358321", "0.53565794", "0.5346253", "0.5337168", "0.53353167", "0.53347254", "0.53344804", "0.5329559", "0.53248423", "0.53233063", "0.5322427", "0.5318703", "0.5315769", "0.5315145", "0.53078896", "0.5304933", "0.5302929", "0.5301673", "0.52946854", "0.5294604", "0.5291913", "0.5289071", "0.52846557", "0.52786934", "0.52775586", "0.52750546", "0.5274775", "0.5274476", "0.52729374", "0.5269824", "0.52633774", "0.5260339", "0.5256812", "0.5256165", "0.5254353", "0.5254325", "0.5253166", "0.5252125", "0.52502155", "0.5249067", "0.5248719", "0.5244234", "0.5243142" ]
0.6096943
4
Created by tom on 8/3/2016.
public interface RoleRepository extends CrudRepository<Role, Integer> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\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\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void m50366E() {\n }", "@Override\n public void init() {\n\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "public void mo38117a() {\n }", "@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 protected void initialize() {\n\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "private void poetries() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@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 }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n void init() {\n }", "public void gored() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void init() {}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n protected void initialize() \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}", "@Override\r\n\tpublic void init() {}", "public void mo4359a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tprotected void initialize() {\n\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}", "@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\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n public void initialize() { \n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\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}", "public void method_4270() {}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void m23075a() {\n }", "public void mo21877s() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tpublic void nghe() {\n\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 public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "public void mo6081a() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}" ]
[ "0.5961992", "0.5868568", "0.58043575", "0.57891333", "0.5737685", "0.57094485", "0.56713843", "0.56538063", "0.56515217", "0.56515217", "0.56249934", "0.56013", "0.55799294", "0.55684227", "0.5554764", "0.5544746", "0.55144364", "0.55007493", "0.55002356", "0.55002356", "0.55002356", "0.55002356", "0.55002356", "0.54991645", "0.54900014", "0.54771936", "0.54754287", "0.5474769", "0.5474769", "0.54741824", "0.54716414", "0.54716414", "0.54716414", "0.54716414", "0.54716414", "0.54716414", "0.5470865", "0.5463312", "0.5461041", "0.54571676", "0.5450432", "0.54481673", "0.54423004", "0.5436735", "0.54279745", "0.5412608", "0.5410991", "0.540481", "0.5401292", "0.5395999", "0.5395999", "0.5383584", "0.5382692", "0.53753203", "0.53753203", "0.5372735", "0.53718174", "0.53708744", "0.5369299", "0.5369299", "0.5369299", "0.5348099", "0.5348099", "0.5348099", "0.5346678", "0.5342626", "0.534072", "0.5340507", "0.53322065", "0.53317666", "0.53317666", "0.53317666", "0.53296363", "0.5325956", "0.5307149", "0.53034717", "0.5298025", "0.52929854", "0.5292051", "0.52881503", "0.5287879", "0.5286798", "0.5284834", "0.52825034", "0.52822095", "0.5275229", "0.5275229", "0.5261305", "0.52592427", "0.52592427", "0.52592427", "0.52592427", "0.52592427", "0.52592427", "0.52592427", "0.52539074", "0.52539074", "0.52539074", "0.5253524", "0.52487135", "0.52486956" ]
0.0
-1
If the array is empty or the index is not in array range return the original array
public static int[] removeTheElement(int[] arr, int index) { if (arr == null || index < 0 || index >= arr.length) { return arr; } // Create another array of size one less int[] anotherArray = new int[arr.length - 1]; // Copy the elements except the index // from original array to the other array for (int i = 0, k = 0; i < arr.length; i++) { // if the index is // the removal element index if (i == index) { continue; } // if the index is not // the removal element index anotherArray[k++] = arr[i]; } // return the resultant array return anotherArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IArray getArrayCurrent() throws InvalidRangeException;", "public static float[] copyOfRange(float[] original, int from, int to)\r\n\t{\r\n\t\tif (from > to)\r\n\t\t\tthrow new IllegalArgumentException(\"The initial index is after \" +\r\n\t\t\t\t\t\"the final index.\");\r\n\t\tfloat[] newArray = new float[to - from];\r\n\t\tif (to > original.length)\r\n\t\t{\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0,\r\n\t\t\t\t\toriginal.length - from);\r\n\t\t\tArrays.fill(newArray, original.length, newArray.length, 0f);\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0, to - from);\r\n\t\treturn newArray;\r\n\t}", "public static double[] copyOfRange(double[] original, int from, int to)\r\n\t{\r\n\t\tif (from > to)\r\n\t\t\tthrow new IllegalArgumentException(\"The initial index is after \" +\r\n\t\t\t\t\t\"the final index.\");\r\n\t\tdouble[] newArray = new double[to - from];\r\n\t\tif (to > original.length)\r\n\t\t{\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0,\r\n\t\t\t\t\toriginal.length - from);\r\n\t\t\tArrays.fill(newArray, original.length, newArray.length, 0d);\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0, to - from);\r\n\t\treturn newArray;\r\n\t}", "private static int[] removeTheElement(int[] arr, \n int index) \n { \n \n // If the array is empty \n // or the index is not in array range \n // return the original array \n if (arr == null\n || index < 0\n || index >= arr.length) { \n \n return arr; \n } \n \n // Create another array of size one less \n int[] anotherArray = new int[arr.length - 1]; \n \n // Copy the elements except the index \n // from original array to the other array \n for (int i = 0, k = 0; i < arr.length; i++) { \n \n // if the index is \n // the removal element index \n if (i == index) { \n continue; \n } \n \n // if the index is not \n // the removal element index \n anotherArray[k++] = arr[i]; \n } \n \n // return the resultant array \n return anotherArray; \n }", "public static int[] copyOfRange(int[] original, int from, int to)\r\n\t{\r\n\t\tif (from > to)\r\n\t\t\tthrow new IllegalArgumentException(\"The initial index is after \" +\r\n\t\t\t\t\t\"the final index.\");\r\n\t\tint[] newArray = new int[to - from];\r\n\t\tif (to > original.length)\r\n\t\t{\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0,\r\n\t\t\t\t\toriginal.length - from);\r\n\t\t\tArrays.fill(newArray, original.length, newArray.length, 0);\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0, to - from);\r\n\t\treturn newArray;\r\n\t}", "public Double[][] toPast() throws IndexOutOfBoundsException;", "@Override\n public boolean isRange() {\n return false;\n }", "public static int[] searchForRange(int[] array, int target) {\n // Write your code here.\n\t\tint[] finalRange = {-1, -1};\n\t\talteredBinarySearch(array, target, 0, array.length-1, \nfinalRange, true);\n\t\talteredBinarySearch(array, target, 0,array.length-1, \nfinalRange, false);\n return finalRange;\n }", "public static long[] copyOfRange(long[] original, int from, int to)\r\n\t{\r\n\t\tif (from > to)\r\n\t\t\tthrow new IllegalArgumentException(\"The initial index is after \" +\r\n\t\t\t\t\t\"the final index.\");\r\n\t\tlong[] newArray = new long[to - from];\r\n\t\tif (to > original.length)\r\n\t\t{\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0,\r\n\t\t\t\t\toriginal.length - from);\r\n\t\t\tArrays.fill(newArray, original.length, newArray.length, 0L);\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0, to - from);\r\n\t\treturn newArray;\r\n\t}", "@Override\n\tprotected T pickPivot(T[] array, int start, int end) {\n\t\treturn array[start];\n\t}", "public int[] searchRange(int[] nums, int target) \n{\n return helper(nums, target, 0, nums.length - 1);\n}", "public static short[] copyOfRange(short[] original, int from, int to)\r\n\t{\r\n\t\tif (from > to)\r\n\t\t\tthrow new IllegalArgumentException(\"The initial index is after \" +\r\n\t\t\t\t\t\"the final index.\");\r\n\t\tshort[] newArray = new short[to - from];\r\n\t\tif (to > original.length)\r\n\t\t{\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0,\r\n\t\t\t\t\toriginal.length - from);\r\n\t\t\tArrays.fill(newArray, original.length, newArray.length, (short)0);\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0, to - from);\r\n\t\treturn newArray;\r\n\t}", "public void removeSubArray(int start , int end ){\n\n if( !this.checkIndex(start) ) { this.raiseException(start); }\n if( !this.checkIndex(end) ) { this.raiseException(end); }\n\n int intervalLength = end - start;\n for(int i = start ; i < this.array.length - intervalLength - 1 ; i++){\n this.array[i] = this.array[i+1+intervalLength];\n }\n Object newArray[] = new Object[ this.array.length - intervalLength - 1 ];\n for(int i = 0 ; i < this.array.length - intervalLength - 1; i++){\n newArray[i] = this.array[i];\n }\n this.array = newArray;\n }", "private void checkRange(int index) {\n\t\tif (index < 0 || index >= array.length()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index \" + index + \" is out of bouds [0, \" + array.length() + \"]\");\n\t\t}\n\t}", "public static int[] range(int[] a, int low, int high) throws IllegalArgumentException {\n if (a == null || a.length == 0) {\n throw new IllegalArgumentException();\n }\n \n int increment = 0;\n \n for (int i : a) {\n if (i >= low && i <= high) {\n increment++;\n }\n }\n \n int[] array = new int[increment];\n increment = 0;\n \n //for(int i = 0; i < a.length; i++)\n for (int i : a) {\n if (i >= low && i <= high) {\n array[increment] = i;\n increment++;\n }\n }\n \n return array;\n }", "private Integer[] getNegArray(int size) {\n Integer[] toReturn = new Integer[size];\n for (int i = 0; i < size; i++) {\n toReturn[i] = -1;\n }\n return toReturn;\n }", "public int[] deepCopyRange(int[] arr, int i, int j){\n int[] result = new int[j - i + 1];\n \n for (int k = i; k <= j; k++){\n result[k - i] = arr[k];\n }\n return result;\n }", "private void rangeCheck(int index) {\n if (index >= this.values.length) {\n throw new ArrayIndexOutOfBoundsException(\"Index of out bounds!\");\n }\n }", "static int findMissing2(int arr[], int size)\n {\n int shift = segregate (arr, size);\n int arr2[] = new int[size-shift];\n int j=0;\n for(int i=shift;i<(size);i++)\n {\n arr2[j] = arr[i];\n j++;\n } \n return findMissingPositive(arr2, j);\n }", "static int minimumInRange(int a[], int from, int to){ //\"O(to-from+1)\" O(m)\n int min = from;\n for(int i = from+1; i<= to; i++){ //n times\n if(a[i]<a[min]){\n min = i;\n }\n }\n return min;\n }", "public static int[] removeTheElement(int[] arr, \r\n int index) \r\n { \r\n \r\n // If the array is empty \r\n // or the index is not in array range \r\n // return the original array \r\n if (arr == null\r\n || index < 0\r\n || index >= arr.length) { \r\n \r\n return arr; \r\n } \r\n \r\n // Create another array of size one less \r\n int[] anotherArray = new int[arr.length - 1]; \r\n \r\n // Copy the elements except the index \r\n // from original array to the other array \r\n for (int i = 0, k = 0; i < arr.length; i++) { \r\n \r\n // if the index is \r\n // the removal element index \r\n if (i == index) { \r\n continue; \r\n } \r\n \r\n // if the index is not \r\n // the removal element index \r\n anotherArray[k++] = arr[i]; \r\n } \r\n \r\n // return the resultant array \r\n return anotherArray; \r\n }", "static void rvereseArray(int arr[], int start, int end)\r\n {\r\n int temp;\r\n while(start < end){\r\n \r\n temp = arr[start];\r\n arr[start] = arr[end];\r\n arr[end] = temp;\r\n //rvereseArray(arr, start+1, end-1);\r\n // move the left and right index pointers in toward the center\r\n start++;\r\n end--;\r\n }\r\n }", "private int[] compact(int[] arr, int len) {\n assert arr != null;\n assert U.isNonDecreasingArray(arr, len);\n\n if (arr.length <= 1)\n return U.copyIfExceeded(arr, len);\n\n int newLen = 1;\n\n for (int i = 1; i < len; i++) {\n if (arr[i] != arr[newLen - 1])\n arr[newLen++] = arr[i];\n }\n\n return U.copyIfExceeded(arr, len);\n }", "static int findMissingPositive(int arr[], int size)\n {\n int i;\n for(i = 0; i < size; i++)\n {\n if(Math.abs(arr[i]) - 1 < size && arr[Math.abs(arr[i]) - 1] > 0)\n arr[Math.abs(arr[i]) - 1] = -arr[Math.abs(arr[i]) - 1];\n }\n // Return the first index value at which is positive \n for(i = 0; i < size; i++)\n if (arr[i] > 0)// 1 is added because indexes start from 0 \n return i+1;\n return size+1;\n }", "private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }", "@Override\r\n\tpublic Buffer slice(int start, int end) {\n\t\t\r\n\t\treturn null;\r\n\t}", "private T[] modifyArray(T[] array) {\n array[index] = null;\n return array;\n }", "public static int[] searchForRange(int[] array, int target) {\n int first = firstOccuranceOfNo(array,target);\n int last = lastOccuranceOfNo(array,target);\n return new int[]{first,last};\n }", "public abstract void eraseRange(int index, int count, int validSize);", "public static int range(int[] theArray) {\n\n int min = IntegerArrays.min(theArray);\n int max = IntegerArrays.max(theArray);\n return max - min;\n\n }", "float getNotIn(int index);", "public int[] searchRange(int[] nums, int target) {\r\n\r\n int[] res = {-1, -1};\r\n int left = lowerBound(nums, target);\r\n if (left != -1) {\r\n res[0] = left;\r\n res[1] = upperBound(nums, target);\r\n }\r\n return res;\r\n\r\n\r\n }", "public int[] ArrayInverso1(int[] arr){\r\n\t\tint l=arr.length;\r\n\t\t\r\n\t\tint[] arr_inv = new int[l];\r\n\t\tfor (int i=0;i<l;i++)\r\n\t\tarr_inv[i]=arr[l-1-i];\r\n\t\treturn arr_inv;\r\n\t\t\r\n\t\t\r\n\t\r\n\t}", "public static int[] removeElement ( int[] array , int x){\n\n if(x< 0 ||x >= array.length){\n System.err.println(\"Invalid Index\");\n System.exit(0);\n }\n\n int[] newArray = new int[array.length- 1];\n\n for (int i = 0, j= 0; i < array.length ; i++) {\n if(i== x){\n continue;\n }else{\n newArray [j++] = array[i];\n }\n }\n\n\n return newArray ;\n }", "static int findMissing(int arr[], int size)\n {\n \n //0 -10 1 3 -20\n int p1 = 0;\n int p2 = size-1;\n while (p1<p2) {\n if (arr[p1] > 0) {\n p1++;\n } else {\n int temp = arr[p2];\n arr[p2] = arr[p1];\n arr[p1] = temp;\n p2--;\n }\n }\n //1 3 0 -10 -20\n for (int i=0; i<=p1; i++) {\n int x = Math.abs(arr[i])-1;\n int y = arr[x];\n if (y>0 && y <= size) {\n arr[x] = y*-1;\n }\n }\n for (int i=0; i<size; i++) {\n if (arr[i] > 0) {\n return i+1;\n }\n }\n \n return p1+2;\n }", "public double[] getRange();", "public Array<T> copyOfRange(int from, int to)\n {\n assert to >= from;\n\n Array<T> out = Array.ofSize(to - from);\n out.copyFrom(this, from, 0, to - from);\n return out;\n }", "@Override\n\tpublic IDataItem getSlice(int dim, int value) throws InvalidRangeException {\n\t\treturn null;\n\t}", "public int[] eleminateNegativeNumbers(int[] arr){\n for(int i = 0; i < arr.length; i++){\n if(arr[i] < 0){\n arr[i] = 0;\n }\n }\n return arr;\n }", "public int[] helper(int[] data) {\n if (data.length < 2) {\n return data;\n }\n int mid = data.length / 2;\n\n return merge(\n helper(Arrays.copyOfRange(data, 0, mid)),\n helper(Arrays.copyOfRange(data, mid , data.length)));\n }", "public abstract double[] getLowerBound();", "public static int firstMissingEffective(int[] x){\n int i = 0;\n while(i<x.length){\n // first two conditions check that element can correspond to index of array\n // third condition checks that they are not in their required position\n // fourth condition checks that there is no duplicate already at their position\n if( x[i]>0 && x[i]<x.length && x[i]-1!=i && x[x[i]-1]!=x[i]) exch(x,i,x[i]-1);\n else i++;\n }\n\n // second pass\n for(int j=0; j < x.length; j++){\n if( x[j]-1!=j) return j+1;\n }\n return x.length+1;\n\n }", "public int[] searchRange(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return new int[] {-1, -1};\n int left = 0, right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] >= target) {\n right = mid;\n }\n else{\n left = mid;\n }\n }\n int leftBound = -1, rightBound = -1;\n if (A[left] == target)\n leftBound = left;\n else if (A[right] == target)\n leftBound = right;\n\n left = 0;\n right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] <= target) {\n left = mid;\n }\n else {\n right = mid;\n }\n }\n if (A[right] == target) rightBound = right;\n else if (A[left] == target) rightBound = left;\n return new int[] {leftBound, rightBound};\n }", "@Override\r\n\tpublic void removeRange(int first, int last) {\r\n\r\n try {\r\n super.removeRange(first, last);\r\n fireVOIremoved(null);\r\n } catch (ArrayIndexOutOfBoundsException badIndex) {\r\n throw badIndex;\r\n }\r\n }", "IArray getArrayNext() throws InvalidRangeException;", "private boolean checkRange(final int index) {\n if ((index > size) || (index < 0)) {\n return false;\n }\n return true;\n }", "private int[] blankFinder(){\n for(int x = 0; x < n; x++){\n for(int y = 0; y < n; y++){\n if(tiles[x][y] == 0){\n return new int[]{x, y};\n }\n }\n }\n return null;\n }", "@Override\n\tpublic IDataItem getASlice(int dimension, int value) throws InvalidRangeException {\n\t\treturn null;\n\t}", "public int[] ZeroOutNegs(int[] arr) {\r\n for (int x = 0; x < arr.length; x++) {\r\n if (arr[x] < 0) {\r\n arr[x] = 0;\r\n }\r\n }\r\n return arr;\r\n }", "public int[] reset() {\n return Arrays.copyOf(origin, origin.length);\n }", "private static void rangeCheck(int arrayLen, int fromIndex, int toIndex) {\n\t\tif (fromIndex > toIndex)\n\t\t\tthrow new IllegalArgumentException(\"fromIndex(\" + fromIndex +\n\t\t\t\t\t\") > toIndex(\" + toIndex+\")\");\n\t\tif (fromIndex < 0)\n\t\t\tthrow new ArrayIndexOutOfBoundsException(fromIndex);\n\t\tif (toIndex > arrayLen)\n\t\t\tthrow new ArrayIndexOutOfBoundsException(toIndex);\n\t}", "void remove(int index) {\n\t\tfor (int i = index; i < array.length - 1; i++) {\n\t\t\tarray[i] = array[i + 1];\n\t\t}\n\t\tint[] temp = new int[array.length - 1];\n\t\tfor (int i = 0; i < array.length - 1; i++) {\n\t\t\ttemp[i] = array[i];\n\t\t}\n\t\tint lastValue = array[array.length - 1];// index starts @ 0, so its the\n\t\t\t\t\t\t\t\t\t\t\t\t// array.length - 1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t// for the 0\n\t\tarray = temp;\n\n\t}", "protected double[] toArrayNotIncludingNoDataValues() {\r\n boolean handleOutOfMemoryError = false;\r\n Grids_GridDouble g = getGrid();\r\n int nrows = g.getChunkNRows(ChunkID, handleOutOfMemoryError);\r\n int ncols = g.getChunkNCols(ChunkID, handleOutOfMemoryError);\r\n double noDataValue = g.getNoDataValue(handleOutOfMemoryError);\r\n long n = getN();\r\n if (n != (int) n) {\r\n throw new Error(\"Error n != (int) n \");\r\n }\r\n double[] array = new double[(int) getN()];\r\n int row;\r\n int col;\r\n int count = 0;\r\n double value;\r\n for (row = 0; row < nrows; row++) {\r\n for (col = 0; col < ncols; col++) {\r\n value = getCell( row, col);\r\n if (value != noDataValue) {\r\n array[count] = value;\r\n count++;\r\n }\r\n }\r\n }\r\n return array;\r\n }", "public List<Integer> getRepetitiveElementsUnBounded(int[] array) {\n if (array== null) return null;\n\n List<Integer> result = new ArrayList<>();\n Arrays.sort(array); // complexity: O(nlogn)\n\n int startIndex = 0;\n // O(n)\n while (startIndex < array.length) {\n while (startIndex+1 < array.length && array[startIndex] == array[startIndex+1]){\n startIndex++;\n }\n if (startIndex-1 >= 0 && array[startIndex-1] == array[startIndex]) {\n result.add(array[startIndex]);\n }\n startIndex++;\n }\n return result;\n }", "public static <T> T[] copy(T[] array, int start, int finish) {\n return Arrays.copyOfRange(array, start, finish) ;\n }", "private int partition(int[] arr, int start, int end) {\n\t\tint bounary = arr[start];\r\n\t\twhile(start<end) {\r\n\t\t\twhile(start<end&&arr[end]>=bounary) {\r\n\t\t\t\tend--;\r\n\t\t\t}\r\n\t\t\tarr[start] = arr[end];\r\n\t\t\twhile(start<end&&arr[start]<=bounary) {\r\n\t\t\t\tstart++;\r\n\t\t\t}\r\n\t\t\tarr[end] = arr[start];\r\n\t\t}\r\n\t\tarr[start] = bounary;\r\n\t\treturn start;\r\n\t}", "public static <T> Array<T> copyOf(T[] array, int from, int to)\n {\n Array<T> out = Array.ofSize(to - from);\n out.copyFrom(array, from, to, to - from);\n return out;\n }", "public int solve1(int[] array, int from, int to) {\n HashSet<Integer> seen = new HashSet<>();\n\n for (int e : array) {\n seen.add(e);\n }\n\n for (int i = from; i <= to; i++) {\n if (!seen.contains(i)) {\n return i;\n }\n }\n\n return Integer.MAX_VALUE;\n }", "public int[] shitArrayValuesToFront(int[] arr){\n for(int i = 0; i < arr.length; i++){\n if(i == arr.length - 1){\n arr[i] = 0;\n }else{\n arr[i] = arr[i + 1];\n }\n }\n return arr;\n }", "private boolean rangeCheck(int i){\n return i >= 0 && i < size;\n }", "public int[] extractPositives(int[] intArray)\n\t{\n\t\tint[] tempArray = null;\n\t\tfor(int i=0;i<intArray.length;i++){\n\t\t\tif(intArray[i]>0){\n\t\t\t\ttempArray[i] = intArray[i];\n\n\t\t\t}\n\t\t\treturn tempArray;\n\t\t}\n\t\tSystem.out.println(\"extractPositives NOT IMPLEMENTED\");\n\t\treturn new int[0];\n\t}", "@Override\n public T get(int idx) {\n //if item is within the bounds of the array list, it is returned others null is returned\n if (idx >= 0 && idx<=size){\n return arr[idx+1];\n } else {\n return null;\n }\n\n }", "public static int argmin(double[] array, int from, int to) {\n\t\tif (from>=to) return -1;\n\t\tdouble max = array[from];\n\t\tint re = from;\n\t\tfor (int i=from+1; i<to; i++) {\n\t\t\tif (array[i]<max) {\n\t\t\t\tmax = array[i];\n\t\t\t\tre = i;\n\t\t\t}\n\t\t}\n\t\treturn re;\n\t}", "private String[] subStringArray(String[] array, int from, int to) {\r\n int length = to - from;\r\n String[] result = new String[length];\r\n for (int i = from; i < to; i++) {\r\n result[i - from] = array[i];\r\n }\r\n return result;\r\n }", "private static void fromUnsortedArray()\n\t{\n Integer[] origArray = new Integer[] { 1, 1, 2, 3, 3, 3, 4, 5, 6, 6, 6, 7, 8 };\n \n // This array has duplicate elements\n System.out.println(Arrays.toString(origArray));\n \n Integer[] tempArray = removeDuplicates2(origArray);\n \n // Verify the array content\n System.out.println(Arrays.toString(tempArray));\n\t}", "private static byte[] get(byte[] array, int offset, int length) {\n byte[] result = new byte[length];\n System.arraycopy(array, offset, result, 0, length);\n return result;\n }", "public Double[][] toPresent() throws IndexOutOfBoundsException;", "public static void mergeSortSentinel(int[] array, int from, int to) {\r\n\t\tif (from < to) {\r\n\t\t\tint middle = (from + to) / 2;\r\n\t\t\tmergeSortSentinel(array, from, middle);\r\n\t\t\tmergeSortSentinel(array, middle + 1, to);\r\n\t\t\tmergeSentinel(array, from, middle, to);\r\n\t\t}\r\n\t}", "public static int[] quickselect(int[] arr, int start, int end) {\n if(start < end) return new int[] {};\n int pivot = partition(arr, start ,end );\n //int mid = (0 + arr.length)/2;\n quickselect(arr, start, pivot);\n quickselect(arr, pivot + 1, end);\n return arr;\n }", "private int minusOne(int index) {\n if (index - 1 < 0) {\n return array.length - 1;\n } else {\n return index - 1;\n }\n }", "@Override\n public T removeFirst() {\n if (size == 0) {\n return null;\n }\n\n int position = plusOne(nextFirst);\n T itemToReturn = array[position];\n array[position] = null;\n nextFirst = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "private static int[] removeElement(int[] a, int i) {\n\t\tint[] b = new int[a.length-1];\n\t\tint k = 0;\n\t\tfor (int j = 0; j < a.length; j++) {\n\t\t\tif (j != i) {\n\t\t\t\tb[k++] = a[j];\n\t\t\t}\n\t\t}\n\t\treturn b;\n\t}", "public double[] getRange() \n{\n\treturn range;\n}", "Integer[] removeNullElements(Integer[] array);", "public static <E> UnmodifiableArrayList<E> wrap(final E[] array, final int lower, final int upper)\n throws IndexOutOfBoundsException\n {\n if (lower < 0 || upper > array.length || lower > upper) {\n throw new IndexOutOfBoundsException(Errors.format(Errors.Keys.ILLEGAL_RANGE_$2, lower, upper));\n }\n if (lower == 0 && upper == array.length) {\n return new UnmodifiableArrayList<E>(array);\n }\n return new UnmodifiableArrayList.SubList<E>(array, lower, upper - lower);\n }", "protected int[] resubset(int start, int length) {\n\t\tint[] tmp = new int[length];\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\ttmp[i] = subset[start + i];\n\t\t}\n\t\treturn tmp;\n\t}", "public static byte[] subbytesTillNull(byte[] data, int offset) {\r\n \tint new_length = 0;\r\n for (int i = offset; i < data.length; i++) {\r\n if (data[i] == 0x00) { // null\r\n \tnew_length = i;\r\n break;\r\n }\r\n }\r\n\r\n byte[] out = new byte[new_length];\r\n\r\n for (int x = offset; x < new_length; x++) {\r\n out[x - offset] = data[x];\r\n }\r\n\r\n return out;\r\n }", "public static int[] removeGetPosition(int[] unSorted, int unSortedEnd,\n\t\t\tint[] sorted) {\n\t\tint index = 0;\n\t\tint[] result = new int[unSorted.length];\n\t\tfor (int i = 0; i < unSortedEnd; i++) {\n\t\t\tint item = unSorted[i];\n\t\t\tint position = Arrays.binarySearch(sorted, item);\n\t\t\tif (position < 0) // not contained in the sorted array\n\t\t\t\tresult[index++] = i;\n\t\t}\n\t\tint[] finalResult = Arrays.copyOf(result, index);\n\t\treturn finalResult;\n\t}", "public int findUnsortedSubarray(int[] nums) {\n int[] copy = nums.clone();\n Arrays.sort(copy);\n int result = nums.length;\n for (int i = 0; i < nums.length; i++) {\n if (nums[i] == copy[i]) {\n result--;\n } else {\n break;\n }\n }\n if (result <= 2) {\n return result;\n }\n for (int i = nums.length - 1; i >= 0; i--) {\n if (nums[i] == copy[i]) {\n result--;\n } else {\n break;\n }\n }\n return result;\n }", "public abstract double[] getUpperBound();", "public Range compact() throws InvalidRangeException {\n if (stride == 1)\n return this;\n int first = first() / stride; // LOOK WTF ?\n int last = first + length() - 1;\n return new Range(name, first, last, 1);\n }", "public static void getBubbleSortwithoutOutput(int range) {\n\n Integer[] number = GetRandomArray.getIntegerArray(range);\n\n //pivot to indicate current cursor\n int pivot = 0;\n\n //get initial value of array to start\n int init = number[pivot];\n\n //first and last element of array\n int last = 0, first = 0;\n\n //length of array\n int array_lenght = number.length - 1;\n\n for (int i = 0; i < number.length; i++) {\n\n //get last number of modified array\n last = number[number.length - 1];\n\n //get first number of modified array\n first = number[0];\n\n //increase pivot by 1\n pivot = pivot + 1;\n\n //if current number is is greater than next right to it\n if (init > number[pivot]) {\n\n //swap number\n number[i] = number[pivot];\n number[pivot] = init;\n\n //set pivot to 0,init to first number,i to less than 0, if its length is equal to array size\n if (pivot == array_lenght) {\n init = first;\n pivot = 0;\n i = -1;\n }\n }\n\n //if current number is is less than next right to it\n if (init < number[pivot]) {\n //do nothing and set current number as pivot\n init = number[pivot];\n }\n\n //if init number is equal last number of array\n if (init == last) {\n\n //set pivot to 0,init to first number,i to less than 0, if its length is equal to array size\n init = first;\n pivot = 0;\n i = -1;\n }\n System.out.println(Arrays.toString(number));\n }\n }", "private static int partion(int[] arr, int lo, int hi) {\n int pivot = arr[hi];\n int i = lo;\n for (int j = lo; j <= hi; j++) {\n if (arr[j] < pivot) {\n int tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n i++;\n }\n }\n int tmp = arr[i];\n arr[i] = arr[hi];\n arr[hi] = tmp;\n return i;\n }", "public abstract ucar.array.RangeIterator getRangeIterator();", "private void RangeCheck(int index) {\r\n if (index >= size || index < 0)\r\n throw new IndexOutOfBoundsException(\"Index: \"+index+\", Size: \"+size);\r\n }", "private void reset(){\n int j=0;\n for(int i=0; i<array.length; i++){\n if(j == itemCount) {return;}\n if(array[i]!=null){\n temp[j] = array[i];\n j++;\n }\n }\n }", "public int findUnsortedSubarray(int[] nums) {\n int leftIndex = Integer.MAX_VALUE;\n int rightIndex = Integer.MIN_VALUE;\n for(int i = 1; i < nums.length; i++) {\n if(nums[i] < nums[i - 1]) {\n leftIndex = Math.min(leftIndex, nums[i - 1]);\n }\n }\n\n for(int i = nums.length - 2; i >= 0; i--) {\n if(nums[i] > nums[i + 1]) {\n rightIndex = Math.max(rightIndex, nums[i]);\n }\n }\n int left;\n int right;\n for(left = 0; left < nums.length; left++) {\n if(leftIndex < nums[left]) {\n break;\n }\n }\n for(right = nums.length - 1; right >= 0; right--) {\n if(rightIndex > nums[right]) {\n break;\n }\n }\n return (right - 1) < 0 ? 0: (right - 1 + 1);\n }", "public E uncons() throws IndexOutOfBoundsException {\n return remove(0);\n }", "public void fillArrayWithNeg1(){\n\t\t\n\t\tArrays.fill(this.theArray, \"-1\");\n\t\t\n\t}", "public U removeFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on first\r\n\t \treturn remove(0);\r\n\t }", "private static int[] copyArray(int[] array) {\n\t\tint[] copy = new int[array.length]; \n\t\tfor(int i = 0; i < array.length; i ++) {\n\t\t\tcopy[i] = array[i];\n\t\t}\n\t\treturn copy;\n\t}", "public void resetDamagedRange() {\r\n fDamagedRange[0] = Integer.MAX_VALUE;\r\n fDamagedRange[1] = Integer.MIN_VALUE;\r\n }", "public long[] toArray() {\n/* 406 */ long[] array = new long[(int)(this.max - this.min + 1L)];\n/* 407 */ for (int i = 0; i < array.length; i++) {\n/* 408 */ array[i] = this.min + i;\n/* */ }\n/* 410 */ return array;\n/* */ }", "private boolean arrayBounds (int index, int max) {\n\t\treturn (index >= 0 && index < max );\n\t}", "private void checkRange(int i) throws IndexOutOfBoundsException {\n if (i < 0 || i >= size) {\n throw new IndexOutOfBoundsException();\n }\n }", "public abstract void selectIndexRange(int min, int max);", "public interface IntegerArray {\n\t\n\tInteger[] convertIntToIntegerArray(int[] array);\t\n\t\n\t/**\n\t * Concatenates array1 and array2\n\t * @param array1 Array of Integers\n\t * @param array2 Array of Integers\n\t * @return Integer[] New array of Integers containing the elements of array1 plus the elements of array2\n\t */\n\tInteger[] concatArrays(Integer[] array1, Integer[] array2);\n\t\n\t/**\n\t * Returns a new array with no null elements\n\t * @param array Array of Integers with null values\n\t * @return Integer[] New array of Integers with no null values. If the original array contains x\n\t * null values, the new array dimension is reference.length-x. If the original array does not contain\n\t * null values, the new array returned contains the same values as the original one.\n\t */\n\tInteger[] removeNullElements(Integer[] array);\n\n}", "public static int[] copyOf(int[] original, int newLength)\r\n\t{\r\n\t\tif (newLength < 0)\r\n\t\t\tthrow new NegativeArraySizeException(\"The array size is negative.\");\r\n\t\treturn copyOfRange(original, 0, newLength);\r\n\t}", "public static int getStartIndexForRange(DataSet aDataSet, double aMin, double aMax)\n {\n int start = 0;\n int pointCount = aDataSet.getPointCount();\n while (start<pointCount && !isArrayValueAtIndexInsideOrInsideAdjacent(aDataSet, start, pointCount, aMin, aMax))\n start++;\n return start;\n }", "private static void merge(int[] inputArray, int start, int mid, int end) {\n int tempArray [] = new int[end - start + 1]; //length of array\n\n // index counter for left side of Array\n int leftSlot = start;\n\n // index counter for right side of Array\n int rightSlot = mid + 1;\n\n // index for temp array\n int k = 0;\n\n while(leftSlot <= mid && rightSlot <= end){ //loop will run till left slot is less than mid value, and right slot is less than end index\n if(inputArray[leftSlot] < inputArray[rightSlot]){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1; // incrementing the left slot\n }else {\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1; // incrementing the right slot\n }\n\n k = k+1; //need to increment the index of temp array so that value gets copied to correct place\n }\n\n /**\n * when it gets to here that means the above loop is completed and\n * both the left and right side of array are sorted\n */\n\n //there can be scenario that right array is sorted and left index is always less than right\n\n if(leftSlot <= mid){\n while(leftSlot <= mid){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1;\n k = k + 1;\n }\n }else if(rightSlot <= end){\n while(rightSlot <= end){\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1;\n k = k + 1;\n }\n }\n for(int i=0;i< tempArray.length;i++){\n inputArray[start + i] = tempArray[i]; // copying back to original array\n }\n }" ]
[ "0.618459", "0.5903051", "0.5814686", "0.5814456", "0.57772106", "0.57552797", "0.5499583", "0.54958236", "0.5491764", "0.5456074", "0.54551536", "0.5452803", "0.54402924", "0.54381895", "0.54039264", "0.5373255", "0.536544", "0.53427947", "0.53260595", "0.5322232", "0.5321396", "0.5315479", "0.5273848", "0.5266949", "0.52588296", "0.5247804", "0.523109", "0.5197783", "0.5180051", "0.5175051", "0.5168946", "0.5164162", "0.51578665", "0.51520073", "0.5145486", "0.5142965", "0.51414007", "0.51367074", "0.5134221", "0.51090217", "0.5108929", "0.5098983", "0.5095516", "0.50912154", "0.5081065", "0.50728136", "0.5059487", "0.5059213", "0.50475013", "0.5041546", "0.50382286", "0.50233823", "0.502299", "0.5020354", "0.50165516", "0.50155336", "0.50098073", "0.50047404", "0.49986583", "0.4998296", "0.4991587", "0.4985885", "0.49807826", "0.49778888", "0.49757257", "0.49510145", "0.4948602", "0.49454376", "0.49246305", "0.49026272", "0.48896766", "0.4888336", "0.48851287", "0.48848385", "0.48825395", "0.48794374", "0.48762327", "0.48652342", "0.4865213", "0.48628676", "0.4862668", "0.4859738", "0.48581776", "0.48567086", "0.4850856", "0.4844816", "0.48445815", "0.48424718", "0.48407328", "0.48303586", "0.48288983", "0.4826258", "0.48229143", "0.4814798", "0.4814135", "0.4810588", "0.48100173", "0.4808623", "0.48054314", "0.48017773" ]
0.48185995
93
TODO(sebright): Replace StatsContext with TagContext, and then this cast won't be necessary.
@Override void record(StatsContext tags, MeasureMap measurementValues) { statsManager.record((StatsContextImpl) tags, measurementValues); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "CTX_Context getContext();", "com.google.protobuf.ByteString getContext();", "Context getContext();", "@java.lang.Override public int getContextValue() {\n return context_;\n }", "@java.lang.Override public int getContextValue() {\n return context_;\n }", "java.lang.String getContext();", "Context context();", "Context context();", "RenderingContext getContext();", "ContextBucket getContext() {\n\treturn context;\n }", "public abstract void mo36027a(Context context, T t);", "public interface Context { long getNativeEglContext(); }", "@Override\n\tpublic void processContext(ServerContext arg0, TTransport arg1, TTransport arg2) {\n\n\t}", "@Override\n public AttributeValueYamlContext getContext(String nameOfSubcontext) {\n return new AttributeValueYamlContext();\n }", "public abstract void mo36026a(Context context);", "@Test\n public void operator_context() {\n OutputNode output = new OutputNode(\"testing\", typeOf(Result.class), typeOf(String.class));\n OperatorNode operator = new OperatorNode(\n classOf(SimpleOp.class), typeOf(Result.class), typeOf(String.class),\n output, new SpecialElement(VertexElement.ElementKind.CONTEXT, typeOf(ProcessorContext.class)));\n InputNode root = new InputNode(operator);\n MockContext context = new MockContext();\n testing(root, context, op -> {\n op.process(\"Hello, world!\");\n });\n assertThat(context.get(\"testing\"), contains(\"Hello, world!CONTEXT\"));\n }", "public java.lang.String getContext() {\n java.lang.Object ref = context_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n context_ = s;\n return s;\n }\n }", "ContextVariable createContextVariable();", "public java.lang.String getContext() {\n java.lang.Object ref = context_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n context_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.google.protobuf.ByteString\n getContextBytes();", "public String getContext() { return context; }", "@Override\r\n\tpublic Context getContext() {\r\n\t\treturn this.context;\r\n\t}", "void mo25261a(Context context);", "private DDSpanContext buildSpanContext() {\n final DDId traceId;\n final DDId spanId = idGenerationStrategy.generate();\n final DDId parentSpanId;\n final Map<String, String> baggage;\n final PendingTrace parentTrace;\n final int samplingPriority;\n final String origin;\n final Map<String, String> coreTags;\n final Map<String, ?> rootSpanTags;\n\n final DDSpanContext context;\n final Object requestContextData;\n\n // FIXME [API] parentContext should be an interface implemented by ExtractedContext,\n // TagContext, DDSpanContext, AgentSpan.Context\n Object parentContext = parent;\n if (parentContext == null && !ignoreScope) {\n // use the Scope as parent unless overridden or ignored.\n final AgentSpan activeSpan = scopeManager.activeSpan();\n if (activeSpan != null) {\n parentContext = activeSpan.context();\n }\n }\n\n String parentServiceName = null;\n\n // Propagate internal trace.\n // Note: if we are not in the context of distributed tracing and we are starting the first\n // root span, parentContext will be null at this point.\n if (parentContext instanceof DDSpanContext) {\n final DDSpanContext ddsc = (DDSpanContext) parentContext;\n traceId = ddsc.getTraceId();\n parentSpanId = ddsc.getSpanId();\n baggage = ddsc.getBaggageItems();\n parentTrace = ddsc.getTrace();\n samplingPriority = PrioritySampling.UNSET;\n origin = null;\n coreTags = null;\n rootSpanTags = null;\n parentServiceName = ddsc.getServiceName();\n if (serviceName == null) {\n serviceName = parentServiceName;\n }\n RequestContext<Object> requestContext = ddsc.getRequestContext();\n requestContextData = null == requestContext ? null : requestContext.getData();\n } else {\n if (parentContext instanceof ExtractedContext) {\n // Propagate external trace\n final ExtractedContext extractedContext = (ExtractedContext) parentContext;\n traceId = extractedContext.getTraceId();\n parentSpanId = extractedContext.getSpanId();\n samplingPriority = extractedContext.getSamplingPriority();\n baggage = extractedContext.getBaggage();\n } else {\n // Start a new trace\n traceId = IdGenerationStrategy.RANDOM.generate();\n parentSpanId = DDId.ZERO;\n samplingPriority = PrioritySampling.UNSET;\n baggage = null;\n }\n\n // Get header tags and set origin whether propagating or not.\n if (parentContext instanceof TagContext) {\n TagContext tc = (TagContext) parentContext;\n coreTags = tc.getTags();\n origin = tc.getOrigin();\n requestContextData = tc.getRequestContextData();\n } else {\n coreTags = null;\n origin = null;\n requestContextData = null;\n }\n\n rootSpanTags = localRootSpanTags;\n\n parentTrace = createTrace(traceId);\n }\n\n if (serviceName == null) {\n serviceName = CoreTracer.this.serviceName;\n }\n\n final CharSequence operationName =\n this.operationName != null ? this.operationName : resourceName;\n\n final int tagsSize =\n (null == tags ? 0 : tags.size())\n + defaultSpanTags.size()\n + (null == coreTags ? 0 : coreTags.size())\n + (null == rootSpanTags ? 0 : rootSpanTags.size());\n // some attributes are inherited from the parent\n context =\n new DDSpanContext(\n traceId,\n spanId,\n parentSpanId,\n parentServiceName,\n serviceName,\n operationName,\n resourceName,\n samplingPriority,\n origin,\n baggage,\n errorFlag,\n spanType,\n tagsSize,\n parentTrace,\n requestContextData);\n\n // By setting the tags on the context we apply decorators to any tags that have been set via\n // the builder. This is the order that the tags were added previously, but maybe the `tags`\n // set in the builder should come last, so that they override other tags.\n context.setAllTags(defaultSpanTags);\n context.setAllTags(tags);\n context.setAllTags(coreTags);\n context.setAllTags(rootSpanTags);\n return context;\n }", "Context createContext();", "Context createContext();", "public abstract Context context();", "public abstract ContextNode getContextNode();", "public com.google.protobuf.ByteString getContext() {\n return context_;\n }", "public com.google.protobuf.ByteString\n getContextBytes() {\n java.lang.Object ref = context_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n context_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "Map<String, Object> getContext();", "public com.google.protobuf.ByteString getContext() {\n return context_;\n }", "long getElapsedTime(Context context);", "public String getContextString();", "protected final TranslationContext context() {\n\t\treturn context;\n\t}", "public abstract T mo36028b(Context context);", "public ContextNode getContextNode();", "public Attributes getContextAttributes() {\r\n return this.atts;\r\n }", "void mo97180a(Context context);", "SimpleContextVariable createSimpleContextVariable();", "public com.google.protobuf.ByteString\n getContextBytes() {\n java.lang.Object ref = context_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n context_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Override\n public void onContext() {\n }", "@Override\r\n\tpublic Context getContext() {\n\t\treturn null;\r\n\t}", "@Override\n public Optional<TypeContext<Reference>> typeContext() {\n return wrappedSerializationContext.typeContext();\n }", "public String getContext() {\r\n\t\treturn context;\r\n\t}", "@Context\r\npublic interface ThreadContext\r\n{\r\n /**\r\n * Get the minimum thread level.\r\n *\r\n * @param min the default minimum value\r\n * @return the minimum thread level\r\n */\r\n int getMin( int min );\r\n \r\n /**\r\n * Return maximum thread level.\r\n *\r\n * @param max the default maximum value\r\n * @return the maximum thread level\r\n */\r\n int getMax( int max );\r\n \r\n /**\r\n * Return the deamon flag.\r\n *\r\n * @param flag true if a damon thread \r\n * @return the deamon thread policy\r\n */\r\n boolean getDaemon( boolean flag );\r\n \r\n /**\r\n * Get the thread pool name.\r\n *\r\n * @param name the pool name\r\n * @return the name\r\n */\r\n String getName( String name );\r\n \r\n /**\r\n * Get the thread pool priority.\r\n *\r\n * @param priority the thread pool priority\r\n * @return the priority\r\n */\r\n int getPriority( int priority );\r\n \r\n /**\r\n * Get the maximum idle time.\r\n *\r\n * @param idle the default maximum idle time\r\n * @return the maximum idle time in milliseconds\r\n */\r\n int getIdle( int idle );\r\n \r\n}", "public abstract Builder contextCount(@Nullable Integer context);", "@Override\n\t\t\t\t\tpublic FlowProcessContext getContext(Message message, KonnectorDataobject dataobject,\n\t\t\t\t\t\t\tRequestEnum request) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}", "public Class getContextType();", "public String getContext() {\n\t\treturn this.getClass().getSimpleName();\n\t}", "public Context getContext() {\n return (Context)this;\n }", "public Map<String, Object> getSamplerContext() {\n return samplerContext;\n }", "public abstract T get(String context);", "@Override\n\tpublic BaseActivity getContext() {\n\t\treturn this;\n\t}", "@Override\n\tpublic BaseActivity getContext() {\n\t\treturn this;\n\t}", "private IExtendsContext createExtendsContext() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(IExtendsContext.ELEMENT_TYPE, null, null);\n\t}", "void add(T context);", "interface Context {\r\n\r\n\t\t/**\r\n\t\t * Returns the current size of the tribe.\r\n\t\t *\r\n\t\t * @return the tribe's current size\r\n\t\t */\r\n\r\n\t\tint getTribeSize();\r\n\t}", "public String getContext() {\n\t\treturn context;\n\t}", "@Override\n public VelocityContext getContextBase() {\n VelocityContext context = new VelocityContext();\n\n if (null != testPlan) {\n context.put(\"testPlan\", testPlan);\n context.put(\"util\", TS.util());\n\n context = getContext(context);\n }\n\n return context;\n }", "Snapshot apply(Context context);", "@java.lang.Override public POGOProtos.Rpc.QuestProto.Context getContext() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.QuestProto.Context result = POGOProtos.Rpc.QuestProto.Context.valueOf(context_);\n return result == null ? POGOProtos.Rpc.QuestProto.Context.UNRECOGNIZED : result;\n }", "@Override\r\n\tpublic Node visitPipeSkel(PipeSkelContext ctx) {\n\t\treturn super.visitPipeSkel(ctx);\r\n\t}", "public Object getContextObject() {\n return context;\n }", "public Context getContext() {\r\n\t\treturn context;\r\n\t}", "public ServletContext getServletContext() {\n/* 92 */ return (ServletContext)getSource();\n/* */ }", "public int tag () { return MyTag; }", "public Context getContext() {\n\t\treturn null;\n\t}", "@java.lang.Override\n public POGOProtos.Rpc.QuestProto.Context getContext() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.QuestProto.Context result = POGOProtos.Rpc.QuestProto.Context.valueOf(context_);\n return result == null ? POGOProtos.Rpc.QuestProto.Context.UNRECOGNIZED : result;\n }", "public Context getContext() {\n\t\treturn context;\n\t}", "@Override\r\n\t\tpublic final INamedElement resolveTypeForValueContext() {\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic int compareTo(Object o)\n\t{\n\t if(o instanceof Context)\n\t {\n\t \tif (timestamp==null || ((Context) o).timestamp==null)\n\t \t\treturn 0;\n\t return timestamp.compareTo(((Context) o).timestamp);\n\t }\n\t return 0;\n\t}", "java.lang.String getSourceContext();", "@Override\n default UserpostPrx ice_context(java.util.Map<String, String> newContext)\n {\n return (UserpostPrx)_ice_context(newContext);\n }", "@Override\r\n\tpublic Node visitVarType(VarTypeContext ctx) {\n\t\treturn super.visitVarType(ctx);\r\n\t}", "public long getContext() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.conscrypt.OpenSSLBIOSource.getContext():long, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.getContext():long\");\n }", "public T caseTag(Tag object) {\n\t\treturn null;\n\t}", "public T caseTag(Tag object) {\n\t\treturn null;\n\t}", "public String getContext() {\n return context;\n }", "public String getContext() {\n return context;\n }", "public String getContext() {\n return context;\n }", "Iterator getAttributeAxisIterator(Object contextNode) throws UnsupportedAxisException;", "Object doWithContext(final Context context) throws ExceptionBase;", "long getTraceTag();", "@JsonProperty(\"context\")\n public Context getContext() {\n return context;\n }", "@Override\n\tpublic TemplateContextType getContextType(String id) {\n\t\t\n\t\treturn super.getContextType(id);\n\t}", "@Override\n public Context getContext() {\n return null;\n }", "public abstract Object getValue(ELContext context);", "public static String getEventPosContext(JCas jCas, Sentence sent, EventMention event, String marker, int contextSize) {\n \n List<String> tokens = new ArrayList<>();\n for(BaseToken baseToken : JCasUtil.selectPreceding(jCas, BaseToken.class, event, contextSize)) {\n if(sent.getBegin() <= baseToken.getBegin()) {\n tokens.add(baseToken.getPartOfSpeech()); \n }\n }\n tokens.add(\"<\" + marker + \">\");\n for(BaseToken baseToken : JCasUtil.selectCovered(jCas, BaseToken.class, event)) {\n tokens.add(baseToken.getPartOfSpeech());\n }\n tokens.add(\"</\" + marker + \">\");\n for(BaseToken baseToken : JCasUtil.selectFollowing(jCas, BaseToken.class, event, contextSize)) {\n if(baseToken.getEnd() <= sent.getEnd()) {\n tokens.add(baseToken.getPartOfSpeech());\n }\n }\n \n return String.join(\" \", tokens).replaceAll(\"[\\r\\n]\", \" \");\n }", "@Override\n public OpStatsData toOpStatsData() {\n return null;\n }", "public IRuntimeContext getContext() {\n return fContext;\n }", "@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n private void addTrafficStatsTag(Request<?> request) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n TrafficStats.setThreadStatsTag(request.getTrafficStatsTag());\n }\n }", "private Object readAttributeUsingPattern(MBeanServerConnection mbeanServer, Map<String, ?> context,\n ObjectInstance observation) throws StatsCollectionFailedException {\n return readAttributeUsingPattern(mbeanServer, context, observation, getAttributeName(), isOptional());\n }", "private void addPortMetric(Map<String, Object> context, PortStat stat) {\n Stat fePortStat = new Stat();\n fePortStat.setServiceType(Constants._Block);\n fePortStat.setTimeCollected(stat.sampleTime);\n fePortStat.setTotalIOs(stat.iops);\n fePortStat.setKbytesTransferred(stat.kbytes);\n fePortStat.setNativeGuid(stat.port.getNativeGuid());\n fePortStat.setResourceId(stat.port.getId());\n @SuppressWarnings(\"unchecked\")\n List<Stat> metrics = (List<Stat>) context.get(Constants._Stats);\n metrics.add(fePortStat);\n }", "@Override\n\tpublic ServerContext createContext(TProtocol arg0, TProtocol arg1) {\n\t\treturn null;\n\t}", "@Override\n protected void attachBaseContext(Context context) {\n super.attachBaseContext(CalligraphyContextWrapper.wrap(context));\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 237,\n FQN=\"llvm::Module::getContext\", NM=\"_ZNK4llvm6Module10getContextEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module10getContextEv\")\n //</editor-fold>\n public LLVMContext /*&*/ getContext() /*const*/ {\n return Context;\n }", "private TagsBenchmarksUtil() {}", "GraphQLResolverContext getContext();", "IContextNode wdGetContext();" ]
[ "0.55868757", "0.55178016", "0.55115294", "0.5479952", "0.5438738", "0.5402518", "0.5364209", "0.5364209", "0.5362992", "0.52427393", "0.5233737", "0.52074873", "0.5172227", "0.51477623", "0.51272136", "0.5117224", "0.510919", "0.5095947", "0.50869733", "0.50554967", "0.504093", "0.5010601", "0.49963605", "0.4965282", "0.49634367", "0.49634367", "0.49575126", "0.49491307", "0.49414244", "0.49132848", "0.49121353", "0.4900126", "0.48857343", "0.4869318", "0.4858788", "0.48534384", "0.484027", "0.4820913", "0.48177284", "0.4802007", "0.4788188", "0.47881502", "0.4732476", "0.47221833", "0.47040692", "0.46961656", "0.4694737", "0.46771267", "0.4672783", "0.46691516", "0.46679223", "0.4663145", "0.4654137", "0.4653474", "0.4653474", "0.46405363", "0.46396238", "0.46380392", "0.46367303", "0.46287522", "0.46181977", "0.4614595", "0.4611359", "0.46105808", "0.459539", "0.4593929", "0.45871353", "0.45741868", "0.45674527", "0.4564451", "0.45548555", "0.45538315", "0.45477006", "0.45470634", "0.45424163", "0.45394164", "0.4539164", "0.4539164", "0.4531759", "0.4531759", "0.4531759", "0.45288828", "0.45117974", "0.45052916", "0.45051596", "0.44953352", "0.44939536", "0.44902843", "0.44901052", "0.4487273", "0.44824058", "0.4465505", "0.4463755", "0.446216", "0.4460222", "0.44595727", "0.4458632", "0.44567233", "0.44510555", "0.44455606" ]
0.45326534
78
the offsetsForTime call needs a partition that exists else it can block forever
public static BrokerCompatibilityCheck create(final Map<String, Object> streamsConfig, final Set<String> topicNames) { if (topicNames.isEmpty()) { throw new KsqlException("Unable to check broker compatibility against a broker without any topics"); } final Map<String, Object> consumerConfigs = new StreamsConfig(streamsConfig) .getConsumerConfigs("__ksql_compatibility_check", "ksql_server"); // remove this otherwise it will try and instantiate the StreamsPartitionAssignor consumerConfigs.remove("partition.assignment.strategy"); final KafkaConsumer<String, String> consumer = new KafkaConsumer<>(consumerConfigs, new StringDeserializer(), new StringDeserializer()); return new BrokerCompatibilityCheck(consumer, new TopicPartition(topicNames.iterator().next(), 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<TopicAndPartition, Long> getOffsets() {\n Map<TopicAndPartition, Long> returnOffsetsMap = new HashMap<>();\n\n for (String topic : topicList) {\n\n Map<TopicAndPartition, Long> resMap = dao.getOffsets(groupid, topic);\n if (!resMap.isEmpty()) {\n\n Map<TopicAndPartition, Long> earliestMap = getEarliestOffsets();\n for (Map.Entry<TopicAndPartition, Long> entry : earliestMap.entrySet()) {\n\n TopicAndPartition currentTAP = entry.getKey();\n String currentEarliestTopicName = entry.getKey().topic();\n Long currentEarliestOffset = entry.getValue();\n\n /*\n Using kafka's EarliestOffsetMap, run through all TAPs.\n 1. If tap in stored offsets, and storedOffset>=earliestOffset, add to results\n else add with earliest offset\n 2. If TAP not in stored offsetMap, add from earliestMap\n */\n\n //stay on topic (lol)\n if (currentEarliestTopicName.equals(topic)) {\n\n if (resMap.containsKey(currentTAP)) {\n Long currentStoredOffset = resMap.get(currentTAP);\n if (currentStoredOffset >= currentEarliestOffset) {\n Log.debug(\"Found stored partition: {}:{}, adding to map\", currentTAP.topic(), currentTAP.partition());\n returnOffsetsMap.put(currentTAP, currentStoredOffset);\n } else {\n Log.info(\"Stored partition offset lower than earliest, adding as earliest: {}:{}\", currentTAP.topic(), currentTAP.partition());\n Log.info(\"\\tstored:{}, earliest:{}\", currentStoredOffset, currentEarliestOffset);\n returnOffsetsMap.put(currentTAP, currentEarliestOffset);\n }\n } else { // Stored offsets dit not contain this TAP at all\n Log.info(\"Found new partition: {}:{}, adding to map\", currentTAP.topic(), currentTAP.partition());\n returnOffsetsMap.put(currentTAP, currentEarliestOffset);\n }\n }\n }\n\n } else {\n //There are no offsets for this groupid/topic combo, revert to\n if (startFrom.equals(\"latest\")) {\n Log.info(\"No offsets found for {}:{}, reverting to 'latest'\", groupid, topic);\n returnOffsetsMap.putAll(getLatestOffsets(topic));\n } else if (startFrom.equals(\"earliest\")){\n Log.info(\"No offsets found for {}:{}, reverting to 'earliest'\", groupid, topic);\n returnOffsetsMap.putAll(getEarliestOffsets(topic));\n } else {\n //This sould not occur as values are checked in the builder\n throw new IllegalArgumentException(\"startFrom cannot be anything other than 'earliest' or 'latest'\");\n }\n }\n }\n return returnOffsetsMap;\n }", "<R> Map<TopicPartition, OffsetAndMetadata> findCompletedEligibleOffsetsAndRemove(boolean remove) {\n\n //\n if (!isDirty()) {\n // nothing to commit\n return UniMaps.of();\n }\n\n //\n Map<TopicPartition, OffsetAndMetadata> offsetsToSend = new HashMap<>();\n int count = 0;\n int removed = 0;\n log.trace(\"Scanning for in order in-flight work that has completed...\");\n\n //\n Set<Map.Entry<TopicPartition, PartitionState<K, V>>> set = pm.getPartitionStates().entrySet();\n for (final Map.Entry<TopicPartition, PartitionState<K, V>> partitionStateEntry : set) {\n var partitionState = partitionStateEntry.getValue();\n Map<Long, WorkContainer<K, V>> partitionQueue = partitionState.getCommitQueues();\n TopicPartition topicPartitionKey = partitionStateEntry.getKey();\n log.trace(\"Starting scan of partition: {}\", topicPartitionKey);\n\n count += partitionQueue.size();\n var workToRemove = new LinkedList<WorkContainer<K, V>>();\n var incompleteOffsets = new LinkedHashSet<Long>();\n long lowWaterMark = -1;\n var highestSucceeded = partitionState.getOffsetHighestSucceeded();\n // can't commit this offset or beyond, as this is the latest offset that is incomplete\n // i.e. only commit offsets that come before the current one, and stop looking for more\n boolean beyondSuccessiveSucceededOffsets = false;\n for (final var offsetAndItsWorkContainer : partitionQueue.entrySet()) {\n // ordered iteration via offset keys thanks to the tree-map\n WorkContainer<K, V> container = offsetAndItsWorkContainer.getValue();\n\n //\n long offset = container.getCr().offset();\n if (offset > highestSucceeded) {\n break; // no more to encode\n }\n\n //\n boolean complete = container.isUserFunctionComplete();\n if (complete) {\n if (container.getUserFunctionSucceeded().get() && !beyondSuccessiveSucceededOffsets) {\n log.trace(\"Found offset candidate ({}) to add to offset commit map\", container);\n workToRemove.add(container);\n // as in flights are processed in order, this will keep getting overwritten with the highest offset available\n // current offset is the highest successful offset, so commit +1 - offset to be committed is defined as the offset of the next expected message to be read\n long offsetOfNextExpectedMessageToBeCommitted = offset + 1;\n OffsetAndMetadata offsetData = new OffsetAndMetadata(offsetOfNextExpectedMessageToBeCommitted);\n offsetsToSend.put(topicPartitionKey, offsetData);\n } else if (container.getUserFunctionSucceeded().get() && beyondSuccessiveSucceededOffsets) {\n // todo lookup the low water mark and include here\n log.trace(\"Offset {} is complete and succeeded, but we've iterated past the lowest committable offset ({}). Will mark as complete in the offset map.\",\n container.getCr().offset(), lowWaterMark);\n // no-op - offset map is only for not succeeded or completed offsets\n } else {\n log.trace(\"Offset {} is complete, but failed processing. Will track in offset map as failed. Can't do normal offset commit past this point.\", container.getCr().offset());\n beyondSuccessiveSucceededOffsets = true;\n incompleteOffsets.add(offset);\n }\n } else {\n lowWaterMark = container.offset();\n beyondSuccessiveSucceededOffsets = true;\n log.trace(\"Offset ({}) is incomplete, holding up the queue ({}) of size {}.\",\n container.getCr().offset(),\n topicPartitionKey,\n partitionQueue.size());\n incompleteOffsets.add(offset);\n }\n }\n\n pm.addEncodedOffsets(offsetsToSend, topicPartitionKey, incompleteOffsets);\n\n if (remove) {\n removed += workToRemove.size();\n for (var workContainer : workToRemove) {\n var offset = workContainer.getCr().offset();\n partitionQueue.remove(offset);\n }\n }\n }\n\n log.debug(\"Scan finished, {} were in flight, {} completed offsets removed, coalesced to {} offset(s) ({}) to be committed\",\n count, removed, offsetsToSend.size(), offsetsToSend);\n return offsetsToSend;\n }", "@Test\n public void periodicCkpointTrimTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n CorfuRuntime rt = getNewRuntime();\n\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n PersistentCorfuTable<String, Long> tableB = openTable(rt, streamNameB);\n\n // thread 1: populates the maps with mapSize items\n scheduleConcurrently(1, ignored_task_num -> {\n populateMaps(tableSize, tableA, tableB);\n });\n\n // thread 2: periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times,\n // and immediate prefix-trim of the log up to the checkpoint position\n scheduleConcurrently(1, ignored_task_num -> {\n mapCkpointAndTrim(rt, tableA, tableB);\n });\n\n // thread 3: repeated ITERATION_LOW times starting a fresh runtime, and instantiating the maps.\n // they should rebuild from the latest checkpoint (if available).\n // performs some sanity checks on the map state\n scheduleConcurrently(PARAMETERS.NUM_ITERATIONS_LOW, ignored_task_num -> {\n validateMapRebuild(tableSize, false, true);\n });\n\n executeScheduled(PARAMETERS.CONCURRENCY_SOME, PARAMETERS.TIMEOUT_LONG);\n\n // Verify that last trim cycle completed (async task) before validating map rebuild\n Token currentTrimMark = Token.UNINITIALIZED;\n while(currentTrimMark.getSequence() != lastValidCheckpoint.getSequence() + 1L) {\n currentTrimMark = getRuntime().getAddressSpaceView().getTrimMark();\n }\n\n // finally, after all three threads finish, again we start a fresh runtime and instantiate the maps.\n // This time we check that the new map instances contain all values\n validateMapRebuild(tableSize, true, false);\n } finally {\n rt.shutdown();\n }\n }", "static <L extends Locatable> List<PartitionLocatable<SimpleInterval>> computePartitionReadExtents(JavaRDD<L> locatables, SAMSequenceDictionary sequenceDictionary, int maxLocatableLength) {\n // Find the first locatable in each partition. This is very efficient since only the first record in each partition is read.\n // If a partition is empty then set the locatable to null\n List<PartitionLocatable<L>> allSplitPoints = locatables.mapPartitions(\n (FlatMapFunction<Iterator<L>, PartitionLocatable<L>>) it -> ImmutableList.of(new PartitionLocatable<>(-1, it.hasNext() ? it.next() : null)).iterator()\n ).collect();\n List<PartitionLocatable<L>> splitPoints = new ArrayList<>(); // fill in index and remove nulls (empty partitions)\n for (int i = 0; i < allSplitPoints.size(); i++) {\n L locatable = allSplitPoints.get(i).getLocatable();\n if (locatable != null) {\n splitPoints.add(new PartitionLocatable<L>(i, locatable));\n }\n }\n List<PartitionLocatable<SimpleInterval>> extents = new ArrayList<>();\n for (int i = 0; i < splitPoints.size(); i++) {\n PartitionLocatable<L> splitPoint = splitPoints.get(i);\n int partitionIndex = splitPoint.getPartitionIndex();\n Locatable current = splitPoint.getLocatable();\n int intervalContigIndex = sequenceDictionary.getSequenceIndex(current.getContig());\n Utils.validate(intervalContigIndex != -1, \"Contig not found in sequence dictionary: \" + current.getContig());\n final Locatable next;\n final int nextContigIndex;\n if (i < splitPoints.size() - 1) {\n next = splitPoints.get(i + 1);\n nextContigIndex = sequenceDictionary.getSequenceIndex(next.getContig());\n Utils.validate(nextContigIndex != -1, \"Contig not found in sequence dictionary: \" + next.getContig());\n } else {\n next = null;\n nextContigIndex = sequenceDictionary.getSequences().size();\n }\n if (intervalContigIndex == nextContigIndex) { // same contig\n addPartitionReadExtent(extents, partitionIndex, current.getContig(), current.getStart(), next.getStart() + maxLocatableLength);\n } else {\n // complete current contig\n SAMSequenceRecord seq = sequenceDictionary.getSequence(current.getContig());\n Utils.validate(seq != null, \"Contig not found in sequence dictionary: \" + current.getContig());\n int contigEnd = seq.getSequenceLength();\n addPartitionReadExtent(extents, partitionIndex, current.getContig(), current.getStart(), contigEnd);\n // add any whole contigs up to next (exclusive)\n for (int contigIndex = intervalContigIndex + 1; contigIndex < nextContigIndex; contigIndex++) {\n SAMSequenceRecord sequence = sequenceDictionary.getSequence(contigIndex);\n Utils.validate(sequence != null, \"Contig index not found in sequence dictionary: \" + contigIndex);\n addPartitionReadExtent(extents, partitionIndex, sequence.getSequenceName(), 1, sequence.getSequenceLength());\n }\n // add start of next contig\n if (next != null) {\n addPartitionReadExtent(extents, partitionIndex, next.getContig(), 1, next.getStart() + maxLocatableLength);\n }\n }\n }\n return extents;\n }", "public void run(){\n\n for (int locIdx = begN; locIdx < endN; locIdx++) {\n\n // do mean-shift for profiles at these locations\n\n for (int profileIdx=0; profileIdx<profiles.get(locIdx).size(); profileIdx++) {\n\n // access the detection\n// int profileLength = profiles.get(locIdx).get(profileIdx).length;\n\n // calculate peaks for the ring 'profileIdx'\n ArrayList<Float> currPeaks = extractPeakIdxsList(profiles.get(locIdx).get(profileIdx), startIdx.get(profileIdx), finishIdx.get(locIdx).get(profileIdx));\n\n //if (currPeaks.size()<3) {\n // // it is not a bifurcation according to MS for this ring, don't calculate further, leave empty fields of peakIdx at this location\n // break;\n //}\n //else {\n // add those points\n for (int pp=0; pp<currPeaks.size(); pp++){\n peakIdx.get(locIdx).get(profileIdx).add(pp, currPeaks.get(pp));\n }\n //}\n\n/*\n\t\t\t\tfor (int k=0; k<nrPoints; k++) {\n start[k] = ((float) k / nrPoints) * profileLength;\n }\n\n\t\t\t\tTools.runMS( \tstart,\n \tprofiles.get(locIdx).get(profileIdx),\n \tmaxIter,\n \tepsilon,\n \th,\n\t\t\t\t\t\t\t\tmsFinish);\n*/\n\n /*\n for (int i1=0; i1<nrPoints; i1++) {\n convIdx.get(locIdx).get(profileIdx)[i1] = (float) msFinish[i1];\n }\n*/\n/*\n int inputProfileLength = profiles.get(locIdx).get(profileIdx).length;\n Vector<float[]> cls = Tools.extractClusters1(msFinish, minD, M, inputProfileLength);\n\t\t\t\textractPeakIdx(cls, locIdx, profileIdx); // to extract 3 major ones (if there are three)\n*/\n\n }\n\n }\n\n }", "@Override\n\t\t\tpublic void onPartitionsAssigned(Collection<TopicPartition> partitions) {\n\t\t\t\tconsumer.seek(tp0, 123L); //for partition 0, we want to consume starting from offset 123\n\t\t\t\tconsumer.seek(tp1, 54L); //the offset number must be in Long format\n\t\t\t\tconsumer.seek(tp2, 10000L);\n\t\t\t}", "void processScanCoordinates(List<Long> scanTimeStampList, String scanType){\n List<LatLng> scanCoordinates = new ArrayList<>();\n System.out.println(\"LENGTH BEFOREEEE\" + scanTimeStampList.size() + scanType);\n for(int i = 0; i < stepTimeStamp.size()-1;i++){\n long upperTimeBound = stepTimeStamp.get((i+1));\n long lowerTimeBound = stepTimeStamp.get(i);\n List<Integer> scanIndexWithinStep = new ArrayList<>();\n //Searches through the list of timestamps and adds the scan numbers that fall within the step to a list\n for(int j = 0; j < scanTimeStampList.size();j++){\n if(scanTimeStampList.get(j) <= upperTimeBound && scanTimeStampList.get(j)> lowerTimeBound){\n scanIndexWithinStep.add(j);\n }\n }\n if(scanIndexWithinStep.size()>0) {\n //Can loop through them as they will be sequential\n for (int k = scanIndexWithinStep.get(0); k <= scanIndexWithinStep.get(scanIndexWithinStep.size() - 1); k++) {\n //Run the algorithm for each scan that falls within the time range for each step\n double tempLat;\n double tempLong;\n //Formula from Dr. Zheng's paper\n // i here represents the number of steps as the index number in adaptiveTimeList is the step number\n if (xIncreasing) {\n tempLat = startLat + STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * yCompMotion * degToMRatio;\n } else {\n tempLat = startLat - STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * yCompMotion * degToMRatio;\n }\n if (yIncreasing) {\n tempLong = startLong + STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * xCompMotion * degToMRatio;\n } else {\n tempLong = startLong - STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * xCompMotion * degToMRatio;\n }\n scanCoordinates.add(new LatLng(tempLat, tempLong));\n }\n }\n\n }\n System.out.println(\"LENGTHHHH AFTER\" + scanCoordinates.size() + scanType);\n if(scanType == \"mag\"){\n magCoords = scanCoordinates;\n }\n else if(scanType == \"gyro\"){\n gyroCoords = scanCoordinates;\n }\n else if(scanType == \"accel\"){\n accelCoords = scanCoordinates;\n }\n else if(scanType == \"blue\"){\n blueGlobalCoords = scanCoordinates;\n }\n else if(scanType == \"red\"){\n redGlobalCoords = scanCoordinates;\n }\n }", "@Test\n public void periodicCkpointTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n CorfuRuntime rt = getNewRuntime();\n\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n PersistentCorfuTable<String, Long> tableB = openTable(rt, streamNameB);\n\n // thread 1: populates the maps with mapSize items\n scheduleConcurrently(1, ignored_task_num -> {\n populateMaps(tableSize, tableA, tableB);\n });\n\n // thread 2: periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times\n // thread 1: perform a periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times\n scheduleConcurrently(1, ignored_task_num -> {\n mapCkpoint(rt, tableA, tableB);\n });\n\n // thread 3: repeated ITERATION_LOW times starting a fresh runtime, and instantiating the maps.\n // they should rebuild from the latest checkpoint (if available).\n // performs some sanity checks on the map state\n scheduleConcurrently(PARAMETERS.NUM_ITERATIONS_LOW, ignored_task_num -> {\n validateMapRebuild(tableSize, false, false);\n });\n\n executeScheduled(PARAMETERS.CONCURRENCY_SOME, PARAMETERS.TIMEOUT_LONG);\n\n // finally, after all three threads finish, again we start a fresh runtime and instantiate the maps.\n // This time the we check that the new map instances contains all values\n validateMapRebuild(tableSize, true, false);\n\n rt.shutdown();\n }", "@Test\n public void periodicCkpointNoUpdatesTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n\n CorfuRuntime rt = getNewRuntime();\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n PersistentCorfuTable<String, Long> tableB = openTable(rt, streamNameB);\n\n // pre-populate map\n populateMaps(tableSize, tableA, tableB);\n\n // thread 1: perform a periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times\n scheduleConcurrently(1, ignored_task_num -> {\n mapCkpoint(rt, tableA, tableB);\n });\n\n // repeated ITERATIONS_LOW times starting a fresh runtime, and instantiating the maps.\n // they should rebuild from the latest checkpoint (if available).\n // this thread checks that all values are present in the maps\n scheduleConcurrently(PARAMETERS.NUM_ITERATIONS_LOW, ignored_task_num -> {\n validateMapRebuild(tableSize, true, false);\n });\n\n executeScheduled(PARAMETERS.CONCURRENCY_SOME, PARAMETERS.TIMEOUT_LONG);\n\n // Finally, after all three threads finish, again we start a fresh runtime and instantiate the maps.\n // This time we check that the new map instances contains all values\n validateMapRebuild(tableSize, true, false);\n\n rt.shutdown();\n }", "private void maybeScheduleSlice() {\n if (nextSliceRunTime > 0) {\n timer.schedule();\n nextSliceRunTime = 0;\n }\n }", "public abstract int[] findEmptyBlock(int processSize);", "@Override\n\tpublic long getLastOffset(SimpleConsumer consumer, String topic, int partition, long whichTime, String clientName) {\n\t\treturn 0;\n\t}", "public void run() {\n\t\tLOG.info(\"consumer thread started for topic: \" + topic + \" partition: \" + partition);\n\t\tSimpleConsumer consumer = getConsumer(leadBroker);\n\t\tlong readOffset = getLastOffset(consumer, topic, partition, kafka.api.OffsetRequest.EarliestTime(),\n\t\t\t\tclientName);\n\n\t\tint numErrors = 0;\n\t\twhile (!shutdown) {\n\t\t\tif (consumer == null) {\n\t\t\t\tconsumer = getConsumer(leadBroker);\n\t\t\t}\n\t\t\tFetchRequest req = new FetchRequestBuilder().clientId(clientName)\n\t\t\t\t\t.addFetch(topic, partition, readOffset, timeOut).build();\n\t\t\tFetchResponse fetchResponse = consumer.fetch(req);\n\n\t\t\tif (fetchResponse.hasError()) {\n\t\t\t\tnumErrors++;\n\t\t\t\t// Something went wrong!\n\t\t\t\tshort code = fetchResponse.errorCode(topic, partition);\n\t\t\t\tLOG.warn(\"Error fetching data from the Broker:\" + leadBroker + \" Reason: \" + code);\n\t\t\t\tif (numErrors > 5) //TODO: do i want this?? maybe throw up\n\t\t\t\t\tbreak;\n\t\t\t\tif (code == ErrorMapping.OffsetOutOfRangeCode()) {\n\t\t\t\t\t// We asked for an invalid offset. For simple case ask for\n\t\t\t\t\t// the last element to reset\n\t\t\t\t\treadOffset = getLastOffset(consumer, topic, partition, kafka.api.OffsetRequest.LatestTime(),\n\t\t\t\t\t\t\tclientName);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconsumer.close();\n\t\t\t\tconsumer = null;\n\t\t\t\tleadBroker = findNewLeader(leadBroker, topic, partition);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnumErrors = 0;\n\n\t\t\tlong numRead = 0;\n\t\t\tfor (MessageAndOffset messageAndOffset : fetchResponse.messageSet(topic,partition)) {\n\t\t\t\tlong currentOffset = messageAndOffset.offset();\n\t\t\t\tif (currentOffset < readOffset) {\n\t\t\t\t\tLOG.info(\"Found an old offset: \" + currentOffset + \" Expecting: \" + readOffset);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\treadOffset = messageAndOffset.nextOffset();\n\t\t\t\ttry {\n\t\t\t\t\tLOG.debug(\"##################### received a message! on topic: \" + topic + \" partition \" + partition);\n\t\t\t\t\tmessages.put(new Message<String, String>(\n\t\t\t\t\t\t\tconvertBytesToString(messageAndOffset.message().key()),\n\t\t\t\t\t\t\tconvertBytesToString(messageAndOffset.message().payload())));\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\tLOG.error(\"message failure to decode bytes into UTF-8 format.\",e);\n\t\t\t\t\tthrow new RuntimeException(\"Cannot decode the messages into UTF-8 format\",e);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tLOG.error(\"interupted waiting to add to the queue\",e);\n\t\t\t\t\tthrow new RuntimeException(\"Cannot add to my own queue\");\n\t\t\t\t}\n\t\t\t\tnumRead++;\n\t\t\t}\n\n\t\t\tif (numRead == 0) {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t} catch (InterruptedException ie) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (consumer != null)\n\t\t\tconsumer.close();\n\t\tLOG.info(\"shutdown complete\");\n\t}", "private void execute0()\n {\n if (logger.isDebugEnabled())\n {\n debugLogCompactingMessage(taskId);\n }\n\n long lastCheckObsoletion = startNanos;\n double compressionRatio = scanners.getCompressionRatio();\n if (compressionRatio == MetadataCollector.NO_COMPRESSION_RATIO)\n compressionRatio = 1.0;\n\n long lastBytesScanned = 0;\n\n if (!controller.cfs.getCompactionStrategyContainer().isActive())\n throw new CompactionInterruptedException(op.getProgress());\n\n estimatedKeys = writer.estimatedKeys();\n while (compactionIterator.hasNext())\n {\n if (op.isStopRequested())\n throw new CompactionInterruptedException(op.getProgress());\n\n UnfilteredRowIterator partition = compactionIterator.next();\n if (writer.append(partition))\n totalKeysWritten++;\n\n long bytesScanned = scanners.getTotalBytesScanned();\n\n // Rate limit the scanners, and account for compression\n if (compactionRateLimiterAcquire(limiter, bytesScanned, lastBytesScanned, compressionRatio))\n lastBytesScanned = bytesScanned;\n\n long now = System.nanoTime();\n if (now - lastCheckObsoletion > TimeUnit.MINUTES.toNanos(1L))\n {\n controller.maybeRefreshOverlaps();\n lastCheckObsoletion = now;\n }\n }\n\n // point of no return\n newSStables = writer.finish();\n\n\n completed = true;\n }", "public scala.Option<org.apache.spark.rdd.RDD<org.apache.spark.streaming.rdd.MapWithStateRDDRecord<K, S, E>>> compute (org.apache.spark.streaming.Time validTime) { throw new RuntimeException(); }", "@Test\n public void emptyCkpointTest() throws Exception {\n final int tableSize = 0;\n\n CorfuRuntime rt = getNewRuntime();\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n PersistentCorfuTable<String, Long> tableB = openTable(rt, streamNameB);\n\n scheduleConcurrently(1, ignored_task_num -> {\n mapCkpoint(rt, tableA, tableB);\n });\n\n // thread 2: repeat ITERATIONS_LOW times starting a fresh runtime, and instantiating the maps.\n // they should be empty.\n scheduleConcurrently(PARAMETERS.NUM_ITERATIONS_LOW, ignored_task_num -> {\n validateMapRebuild(tableSize, true, false);\n });\n\n executeScheduled(PARAMETERS.CONCURRENCY_SOME, PARAMETERS.TIMEOUT_LONG);\n\n // Finally, after the two threads finish, again we start a fresh runtime and instantiate the maps.\n // Then verify they are empty.\n validateMapRebuild(tableSize, true, false);\n\n rt.shutdown();\n }", "public void getOffset(long date, boolean local, int[] offsets) { throw new RuntimeException(\"Stub!\"); }", "public void run(String topic, int partition) {\n PartitionMetadata metadata = findLeader(seedBrokers, port, topic, partition);\n if (metadata == null) {\n LOGGER.error(\"Can't find metadata for Topic and Partition\");\n return;\n }\n if (metadata.leader() == null) {\n LOGGER.error(\"Can't find Leader for Topic and Partition\");\n return;\n }\n String leadBroker = metadata.leader().host();\n String clientName = \"Client_\" + topic + \"_\" + partition;\n\n SimpleConsumer consumer = new SimpleConsumer(leadBroker, port, 100000, 64 * 1024, clientName);\n\n long readOffset = getLastOffset(consumer, topic, partition, kafka.api.OffsetRequest.EarliestTime(), clientName);\n\n int numErrors = 0;\n while (true) {\n if (consumer == null) {\n consumer = new SimpleConsumer(leadBroker, port, 100000, 64 * 1024, clientName);\n }\n FetchRequest req = new FetchRequestBuilder()\n .clientId(clientName)\n .addFetch(topic, partition, readOffset, 100000) // Note: this fetchSize of 100000 might need to be increased if large batches are written to Kafka\n .build();\n FetchResponse fetchResponse = consumer.fetch(req);\n\n if (fetchResponse.hasError()) {\n numErrors++;\n short code = fetchResponse.errorCode(topic, partition);\n\n LOGGER.error(\"Error fetching data from the Broker:\" + leadBroker + \" Reason: \" + code);\n if (numErrors > 5) break;\n if (code == ErrorMapping.OffsetOutOfRangeCode()) {\n // We asked for an invalid offset. For simple case ask for the last element to reset\n readOffset = getLastOffset(consumer, topic, partition, kafka.api.OffsetRequest.LatestTime(), clientName);\n continue;\n }\n consumer.close();\n consumer = null;\n leadBroker = findNewLeader(leadBroker, topic, partition, port);\n continue;\n }\n numErrors = 0;\n\n long numRead = 0;\n for (MessageAndOffset messageAndOffset : fetchResponse.messageSet(topic, partition)) {\n long currentOffset = messageAndOffset.offset();\n if (currentOffset < readOffset) {\n LOGGER.error(\"Found an old offset: \" + currentOffset + \" Expecting: \" + readOffset);\n continue;\n }\n readOffset = messageAndOffset.nextOffset();\n ByteBuffer payload = messageAndOffset.message().payload();\n\n byte[] bytes = new byte[payload.limit()];\n payload.get(bytes);\n\n handleMessage(messageAndOffset.offset(), bytes);\n numRead++;\n }\n\n if (numRead == 0) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n LOGGER.error(\"Unable to sleep\", e);\n }\n }\n }\n consumer.close();\n }", "public Consumer<K, V> acquire(long maxwait, TimeUnit unit, Map<TopicPartition, Long> topicPartitionOffset) throws Exception {\n\t\tPoolableConsumer<K, V> consumer = borrowObject(unit.toMillis(maxwait));\n\t\tconsumer.assign(topicPartitionOffset.keySet());\n\t\ttopicPartitionOffset.keySet().forEach(tp -> {\n\t\t\tconsumer.seek(tp, topicPartitionOffset.get(tp));\n\t\t});\n\t\treturn consumer;\n\t}", "void setOffsets(Stream<OffsetInfo> offsetInfoStream) {\n offsetInfoStream\n .collect(groupingBy(v -> v.connectorId))\n .forEach(\n (connectorId, v) -> {\n logger.info(\"Writing offsets for \" + connectorId);\n OffsetStorageWriter offsetWriter =\n new OffsetStorageWriter(\n offsetBackingStore, connectorId, internalConverter, internalConverter);\n v.forEach(\n offsetInfo -> {\n Map<String, Object> partition =\n TopicPartitionSerDe.asMap(\n new TopicPartition(offsetInfo.topic, offsetInfo.partition.intValue()));\n Map<String, Long> offset = MirusSourceTask.offsetMap(offsetInfo.offset);\n offsetWriter.offset(partition, offset);\n });\n try {\n offsetBackingStore.start();\n offsetWriter.beginFlush();\n offsetWriter.doFlush(null).get();\n offsetBackingStore.stop();\n } catch (InterruptedException | ExecutionException e) {\n throw new RuntimeException(\"Unable to flush offsets for \" + connectorId, e);\n }\n });\n }", "private void checkPosition(String key, Long timestamp){\r\n\t\tsynchronized(keyHashMap.get(key)){\r\n\t\t\twhile(!keyHashMap.get(key).peek().equals(timestamp)){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tkeyHashMap.get(key).wait();\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}\r\n\t}", "@Override\n\tpublic void DoGoToWaiting(int offset) {\n\t\t\n\t}", "protected void afterTimeSlices()\n\t\tthrows DbCompException\n\t{\n//AW:AFTER_TIMESLICES\n // This code will be executed once after each group of time slices.\n // For TimeSlice algorithms this is done once after all slices.\n // For Aggregating algorithms, this is done after each aggregate\n // period.\n ComputationDAI compdao = tsdb.makeComputationDAO(); \n ArrayList<TimeSeriesIdentifier> tsids = new ArrayList<TimeSeriesIdentifier>();\n TimeSeriesDAI tsdai = tsdb.makeTimeSeriesDAO();\n TimeSeriesIdentifier itsid = getParmTsId(\"input\");\n CTimeSeries icts = new CTimeSeries(itsid.getKey(),itsid.getInterval(),itsid.getTableSelector());\n try {\n tsdai.fillTimeSeriesMetadata(icts);\n int fillDependentCompIds = tsdb.fillDependentCompIds(icts, comp.getAppId() );\n } catch (DbIoException ex) {\n Logger.getLogger(QueueFromFixedTS.class.getName()).log(Level.SEVERE, null, ex);\n } catch (BadTimeSeriesException ex) {\n Logger.getLogger(QueueFromFixedTS.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n HashSet<DbKey> dependentCompIds = icts.getDependentCompIds();\n for( DbKey key: dependentCompIds){\n if( !key.equals( this.comp.getKey() )){ // we don't want an endless loop\n DbComputation mycomp;\n try {\n mycomp = compdao.getComputationById(key);\n if( mycomp.hasGroupInput() && mycomp.isEnabled() ){\n for( DbCompParm parm: mycomp.getParmList() ){\n debug3(parm.getDataTypeId().toString());\n if( parm.isInput() && parm.getSiteDataTypeId().isNull() ){ \n DataType dt = parm.getDataType();\n TsGroup group = mycomp.getGroup();\n //group.addIntervalCode(parm.getInterval());\n //group.addVersion( parm.getVersion() );\n group.addOtherMember(\"version\", parm.getVersion());\n group.addDataTypeId(dt.getKey());\n group.setTransient(); \n group.clearExpandedList();\n //group.refilter(tsdb);\n tsids = tsdb.expandTsGroup(group); \n break; // we got what we need\n }\n\n }\n }\n \n CTimeSeries cts = null;\n for( TimeSeriesIdentifier tsid: tsids ){\n debug3(\"inserting data for \" + tsid.getUniqueString() );\n cts = new CTimeSeries(tsid.getKey(), tsid.getInterval(), tsid.getTableSelector() ); \n tsdai.fillTimeSeries(cts, dates);\n // a little odd, but we are just trying to requeue data\n TimedVariable tv = null;\n for( int i = 0; i < cts.size(); i++ ){\n tv = cts.sampleAt(i);\n tv.setFlags( tv.getFlags() | VarFlags.TO_WRITE );\n }\n tsdai.saveTimeSeries(cts);\n debug3(\"saved data to database\");\n \n }\n \n \n } catch (DbIoException ex) {\n warning(\"database connection failed\");\n } catch (NoSuchObjectException ex) {\n debug3(\"no comp for key \" + key);\n } catch (BadTimeSeriesException ex) {\n debug3(\"could read timeseries data\");\n }\n \n \n }\n \n }\n tsdai.close();\n compdao.close();\n \n//AW:AFTER_TIMESLICES_END\n;\n\t}", "protected boolean processSeekAdded(SeekInfoStruct seekInfo){return false;}", "public void run()\n\t{\n\t\tthis.partition();\n\t}", "private static <T> Mono<Pair<List<Range<String>>,QueryInfo>> getPartitionKeyRangesAndQueryInfo(\n DiagnosticsClientContext diagnosticsClientContext,\n IDocumentQueryClient client,\n SqlQuerySpec query,\n CosmosQueryRequestOptions cosmosQueryRequestOptions,\n String resourceLink,\n DocumentCollection collection,\n DefaultDocumentQueryExecutionContext<T> queryExecutionContext, boolean queryPlanCachingEnabled,\n Map<String, PartitionedQueryExecutionInfo> queryPlanCache) {\n if (cosmosQueryRequestOptions != null &&\n !StringUtils.isEmpty(ModelBridgeInternal.getPartitionKeyRangeIdInternal(cosmosQueryRequestOptions))) {\n\n Mono<List<PartitionKeyRange>> partitionKeyRanges = queryExecutionContext\n .getTargetPartitionKeyRangesById(\n collection.getResourceId(),\n ModelBridgeInternal.getPartitionKeyRangeIdInternal(cosmosQueryRequestOptions));\n\n return partitionKeyRanges.map(pkRanges -> {\n List<Range<String>> ranges =\n pkRanges.stream().map(PartitionKeyRange::toRange).collect(Collectors.toList());\n return Pair.of(ranges, QueryInfo.EMPTY);\n });\n }\n\n Instant startTime = Instant.now();\n Mono<PartitionedQueryExecutionInfo> queryExecutionInfoMono;\n\n if (ImplementationBridgeHelpers\n .CosmosQueryRequestOptionsHelper\n .getCosmosQueryRequestOptionsAccessor()\n .isQueryPlanRetrievalDisallowed(cosmosQueryRequestOptions)) {\n\n Instant endTime = Instant.now(); // endTime for query plan diagnostics\n\n return getTargetRangesFromEmptyQueryPlan(\n cosmosQueryRequestOptions,\n collection,\n queryExecutionContext,\n startTime,\n endTime);\n }\n\n if (queryPlanCachingEnabled &&\n isScopedToSinglePartition(cosmosQueryRequestOptions) &&\n queryPlanCache.containsKey(query.getQueryText())) {\n Instant endTime = Instant.now(); // endTime for query plan diagnostics\n PartitionedQueryExecutionInfo partitionedQueryExecutionInfo = queryPlanCache.get(query.getQueryText());\n if (partitionedQueryExecutionInfo != null) {\n logger.debug(\"Skipping query plan round trip by using the cached plan\");\n return getTargetRangesFromQueryPlan(cosmosQueryRequestOptions, collection, queryExecutionContext,\n partitionedQueryExecutionInfo, startTime, endTime);\n }\n }\n\n queryExecutionInfoMono =\n QueryPlanRetriever.getQueryPlanThroughGatewayAsync(\n diagnosticsClientContext,\n client,\n query,\n resourceLink,\n cosmosQueryRequestOptions != null ? cosmosQueryRequestOptions.getPartitionKey() : null);\n\n return queryExecutionInfoMono.flatMap(\n partitionedQueryExecutionInfo -> {\n\n Instant endTime = Instant.now();\n\n if (queryPlanCachingEnabled && isScopedToSinglePartition(cosmosQueryRequestOptions)) {\n tryCacheQueryPlan(query, partitionedQueryExecutionInfo, queryPlanCache);\n }\n\n return getTargetRangesFromQueryPlan(cosmosQueryRequestOptions, collection, queryExecutionContext,\n partitionedQueryExecutionInfo, startTime, endTime);\n });\n }", "boolean hasNextCollectTimestampMs();", "@Override\n public Future<? extends Map<Verb, Spec>> changedSpecs() {\n Map<Verb, Spec> verbSpecMap = Maps.newHashMap();\n initializeWatermarks();\n this.currentPartitionIdx = -1;\n while (!allPartitionsFinished()) {\n if (currentPartitionFinished()) {\n moveToNextPartition();\n continue;\n }\n if (this.messageIterator == null || !this.messageIterator.hasNext()) {\n try {\n this.messageIterator = fetchNextMessageBuffer();\n } catch (Exception e) {\n if (_log.isPresent()) {\n _log.get().error(String.format(\"Failed to fetch next message buffer for partition %s. Will skip this partition.\",\n getCurrentPartition()), e);\n }\n moveToNextPartition();\n continue;\n }\n if (this.messageIterator == null || !this.messageIterator.hasNext()) {\n moveToNextPartition();\n continue;\n }\n }\n while (!currentPartitionFinished()) {\n if (!this.messageIterator.hasNext()) {\n break;\n }\n\n KafkaConsumerRecord nextValidMessage = this.messageIterator.next();\n\n // Even though we ask Kafka to give us a message buffer starting from offset x, it may\n // return a buffer that starts from offset smaller than x, so we need to skip messages\n // until we get to x.\n if (nextValidMessage.getOffset() < _nextWatermark.get(this.currentPartitionIdx)) {\n continue;\n }\n\n _nextWatermark.set(this.currentPartitionIdx, nextValidMessage.getNextOffset());\n try {\n SpecExecutorInstanceDataPacket record = null;\n if (nextValidMessage instanceof ByteArrayBasedKafkaRecord) {\n record = decodeRecord((ByteArrayBasedKafkaRecord)nextValidMessage);\n } else if (nextValidMessage instanceof DecodeableKafkaRecord){\n record = ((DecodeableKafkaRecord<?, SpecExecutorInstanceDataPacket>) nextValidMessage).getValue();\n } else {\n throw new IllegalStateException(\n \"Unsupported KafkaConsumerRecord type. The returned record can either be ByteArrayBasedKafkaRecord\"\n + \" or DecodeableKafkaRecord\");\n }\n verbSpecMap.put(record._verb, record._spec);\n } catch (Throwable t) {\n throw new RuntimeException(t);\n }\n }\n }\n\n return new CompletedFuture(verbSpecMap, null);\n }", "void mapCkpointAndTrim(CorfuRuntime rt, PersistentCorfuTable<?, ?>... tables) throws Exception {\n Token checkpointAddress = Token.UNINITIALIZED;\n Token lastCheckpointAddress = Token.UNINITIALIZED;\n\n for (int i = 0; i < PARAMETERS.NUM_ITERATIONS_VERY_LOW; i++) {\n try {\n MultiCheckpointWriter<PersistentCorfuTable<?, ?>> mcw1 = new MultiCheckpointWriter<>();\n for (PersistentCorfuTable<?, ?> table : tables) {\n mcw1.addMap(table);\n }\n\n checkpointAddress = mcw1.appendCheckpoints(rt, author);\n\n try {\n Thread.sleep(PARAMETERS.TIMEOUT_SHORT.toMillis());\n } catch (InterruptedException ie) {\n //\n }\n // Trim the log\n rt.getAddressSpaceView().prefixTrim(checkpointAddress);\n rt.getAddressSpaceView().gc();\n rt.getAddressSpaceView().invalidateServerCaches();\n rt.getAddressSpaceView().invalidateClientCache();\n lastCheckpointAddress = checkpointAddress;\n lastValidCheckpoint = checkpointAddress;\n } catch (TrimmedException te) {\n // shouldn't happen\n te.printStackTrace();\n throw te;\n } catch (Exception e) {\n // We are the only thread performing trimming, therefore any\n // prior trim must have been by our own action. We assume\n // that we don't go backward, so checking for equality will\n // catch violations of that assumption.\n assertThat(checkpointAddress).isEqualTo(lastCheckpointAddress);\n }\n }\n }", "@Test\n public void undoCkpointTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n final int trimPosition = tableSize / 2;\n final int snapshotPosition = trimPosition + 2;\n\n CountDownLatch latch = new CountDownLatch(1);\n\n t(1, () -> {\n\n CorfuRuntime rt = getNewRuntime();\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n\n // first, populate the map\n for (int i = 0; i < tableSize; i++) {\n tableA.insert(String.valueOf(i), (long) i);\n }\n\n // now, take a checkpoint and perform a prefix-trim\n MultiCheckpointWriter<PersistentCorfuTable<String, Long>> mcw1 = new MultiCheckpointWriter<>();\n mcw1.addMap(tableA);\n mcw1.appendCheckpoints(rt, author);\n\n // Trim the log\n Token token = new Token(rt.getLayoutView().getLayout().getEpoch(), trimPosition);\n rt.getAddressSpaceView().prefixTrim(token);\n rt.getAddressSpaceView().gc();\n rt.getAddressSpaceView().invalidateServerCaches();\n rt.getAddressSpaceView().invalidateClientCache();\n\n latch.countDown();\n } finally {\n rt.shutdown();\n }\n });\n\n AtomicBoolean trimExceptionFlag = new AtomicBoolean(false);\n\n // start a new runtime\n t(2, () -> {\n latch.await();\n CorfuRuntime rt = getNewRuntime();\n\n PersistentCorfuTable<String, Long> localm2A = openTable(rt, streamNameA);\n\n // start a snapshot TX at position snapshotPosition\n Token timestamp = new Token(0L, snapshotPosition - 1);\n rt.getObjectsView().TXBuild()\n .type(TransactionType.SNAPSHOT)\n .snapshot(timestamp)\n .build()\n .begin();\n\n // finally, instantiate the map for the snapshot and assert is has the right state\n try {\n localm2A.get(String.valueOf(0));\n } catch (TransactionAbortedException te) {\n assertThat(te.getAbortCause()).isEqualTo(AbortCause.TRIM);\n // this is an expected behavior!\n trimExceptionFlag.set(true);\n }\n\n try {\n if (!trimExceptionFlag.get()) {\n assertThat(localm2A.size())\n .isEqualTo(snapshotPosition);\n\n // check map positions 0..(snapshot-1)\n for (int i = 0; i < snapshotPosition; i++) {\n assertThat(localm2A.get(String.valueOf(i)))\n .isEqualTo(i);\n }\n\n // check map positions snapshot..(mapSize-1)\n for (int i = snapshotPosition; i < tableSize; i++) {\n assertThat(localm2A.get(String.valueOf(i))).isNull();\n }\n }\n } finally {\n rt.shutdown();\n }\n });\n }", "public void randomize () {\n // The number of TripSchedules for which we still need to generate a random offset.\n int remaining = 0;\n\n // First, initialize all offsets for all trips and entries on this pattern with -1 (\"not yet randomized\").\n for (TIntObjectIterator<int[][]> it = offsets.iterator(); it.hasNext(); ) {\n it.advance();\n for (int[] offsetsPerEntry : it.value()) {\n // If this pattern has mixed schedule and frequency trips, and this is a scheduled trip,\n // it doesn't need to be randomized and there is no offsets array in this position.\n if (offsetsPerEntry == null) continue;\n Arrays.fill(offsetsPerEntry, -1);\n remaining += offsetsPerEntry.length;\n }\n }\n\n // If some randomized schedules are synchronized with other schedules (\"phased\") we perform multiple passes. In\n // each pass we randomize only schedules whose phasing target is already known (randomized in a previous pass).\n // This will loop forever if the phasing dependency graph has cycles - we must catch stalled progress. This is\n // essentially performing depth-first traversal of the dependency graph iteratively without materializing it.\n while (remaining > 0) {\n int remainingAfterPreviousPass = remaining;\n\n for (TIntObjectIterator<int[][]> it = offsets.iterator(); it.hasNext(); ) {\n it.advance();\n // The only thing we need from the TripPattern is the stop sequence, which is used only in phase solving.\n TripPattern pattern = data.tripPatterns.get(it.key());\n int[][] val = it.value();\n\n for (int tripScheduleIndex = 0; tripScheduleIndex < val.length; tripScheduleIndex++) {\n TripSchedule schedule = pattern.tripSchedules.get(tripScheduleIndex);\n\n // It is possible to have both frequency and non-frequency (scheduled) trips on the same pattern.\n // If this is a scheduled trip, don't set offset.\n if (schedule.headwaySeconds == null) {\n val[tripScheduleIndex] = null;\n } else {\n for (int frequencyEntryIndex = 0; frequencyEntryIndex < val[tripScheduleIndex].length; frequencyEntryIndex++) {\n if (schedule.phaseFromId == null || schedule.phaseFromId[frequencyEntryIndex] == null) {\n // This trip is not phased so does not require solving. Generate a random offset\n // immediately. Do this only once - don't overwrite with a new random number on each\n // phase solving pass, as other trips may be be phased from this one.\n if (val[tripScheduleIndex][frequencyEntryIndex] == -1) {\n val[tripScheduleIndex][frequencyEntryIndex] = mt.nextInt(schedule.headwaySeconds[frequencyEntryIndex]);\n remaining--;\n }\n }\n else {\n // This trip is phased from another.\n if (val[tripScheduleIndex][frequencyEntryIndex] != -1) {\n continue; // Offset has already have been generated.\n }\n // No random offset has been generated for this trip yet.\n // Find source phase information. TODO refactor to use references instead of ints.\n int[] source = data.frequencyEntryIndexForId.get(schedule.phaseFromId[frequencyEntryIndex]);\n // Throw a meaningful error when invalid IDs are encountered instead of NPE.\n // Really this should be done when resolving or applying the modifications rather than during search.\n if (source == null) {\n throw new RuntimeException(\"This pattern ID specified in a scenario does not exist: \"\n + schedule.phaseFromId[frequencyEntryIndex]);\n }\n int sourcePatternIdx = source[0];\n int sourceTripScheduleIdx = source[1];\n int sourceFrequencyEntryIdx = source[2];\n\n // check if it's already been randomized\n int previousOffset = offsets.get(sourcePatternIdx)[sourceTripScheduleIdx][sourceFrequencyEntryIdx];\n\n if (previousOffset != -1) {\n TripPattern phaseFromPattern = data.tripPatterns.get(sourcePatternIdx);\n TripSchedule phaseFromSchedule = phaseFromPattern.tripSchedules.get(sourceTripScheduleIdx);\n\n // figure out stop indices\n int sourceStopIndexInPattern = 0;\n int sourceStopIndexInNetwork = data.indexForStopId.get(schedule.phaseFromStop[frequencyEntryIndex]);\n\n // TODO check that stop IDs were found.\n // TODO find all stop IDs in advance when resolving/applying modifications or constructing FrequencyRandomOffsets.\n while (sourceStopIndexInPattern < phaseFromPattern.stops.length &&\n phaseFromPattern.stops[sourceStopIndexInPattern] != sourceStopIndexInNetwork) {\n sourceStopIndexInPattern++;\n }\n\n if (sourceStopIndexInPattern == phaseFromPattern.stops.length) {\n throw new IllegalArgumentException(String.format(\"Stop %s was not found in source pattern!\", schedule.phaseFromStop[frequencyEntryIndex]));\n }\n\n int targetStopIndexInPattern = 0;\n int targetStopIndexInNetwork = data.indexForStopId.get(schedule.phaseAtStop[frequencyEntryIndex]);\n\n while (targetStopIndexInPattern < pattern.stops.length &&\n pattern.stops[targetStopIndexInPattern] != targetStopIndexInNetwork) {\n targetStopIndexInPattern++;\n }\n\n // TODO This should really be checked also before modifications are applied.\n if (targetStopIndexInPattern == pattern.stops.length) {\n throw new IllegalArgumentException(String.format(\"Stop %s was not found in target pattern!\", schedule.phaseAtStop[frequencyEntryIndex]));\n }\n\n // use arrivals at last stop\n int[] sourceTravelTimes = sourceStopIndexInPattern < phaseFromPattern.stops.length - 1 ?\n phaseFromSchedule.departures : phaseFromSchedule.arrivals;\n\n // figure out the offset if they were to pass the stops at the same time\n int timeAtSourceStop = phaseFromSchedule.startTimes[sourceFrequencyEntryIdx] +\n sourceTravelTimes[sourceStopIndexInPattern] +\n previousOffset;\n\n // use arrivals at last stop\n int[] targetTravelTimes = targetStopIndexInPattern < pattern.stops.length - 1 ?\n schedule.departures : schedule.arrivals;\n\n // figure out when the target trip passes the stop if the offset were 0.\n int timeAtTargetStop = schedule.startTimes[frequencyEntryIndex] +\n targetTravelTimes[targetStopIndexInPattern];\n\n int offset = timeAtSourceStop - timeAtTargetStop;\n\n // this is the offset so the trips arrive at the same time. We now add the desired phase.\n offset += schedule.phaseSeconds[frequencyEntryIndex];\n\n // make sure it's positive\n while (offset < 0) offset += schedule.headwaySeconds[frequencyEntryIndex];\n\n // make it as small as possible...\n offset %= schedule.headwaySeconds[frequencyEntryIndex];\n\n val[tripScheduleIndex][frequencyEntryIndex] = offset;\n remaining--;\n }\n }\n }\n }\n }\n }\n if (remainingAfterPreviousPass == remaining && remaining > 0) {\n throw new IllegalArgumentException(\"Cannot solve phasing, you may have a circular reference!\");\n }\n // Copy results of randomization to a Map keyed on TripSchedules (instead of TripPattern index ints). This\n // allows looking up offsets in a context where we only have a filtered list of running frequency trips and\n // don't know the original unfiltered index of the trip within the pattern. Ideally we'd just build the\n // original map keyed on TripSchedules (or hypothetical FreqEntries) but that reqires a lot of refactoring.\n offsetsForTripSchedule.clear();\n for (TIntObjectIterator<int[][]> it = offsets.iterator(); it.hasNext(); ) {\n it.advance();\n TripPattern tripPattern = data.tripPatterns.get(it.key());\n int[][] offsetsForTrip = it.value();\n for (int ts = 0; ts < tripPattern.tripSchedules.size(); ts++) {\n TripSchedule tripSchedule = tripPattern.tripSchedules.get(ts);\n // On patterns with mixed scheduled and frequency trips, scheduled trip slots will be null.\n // Maps can store null values, but there's no point in storing them. We only store non-null arrays.\n if (offsetsForTrip[ts] != null) {\n offsetsForTripSchedule.put(tripSchedule, offsetsForTrip[ts]);\n }\n }\n }\n }\n }", "public void partition();", "private void swarmingPhase() {\n if (prevMaxTimestamp == -1 || client.player.getVs() == null) {\n return;\n }\n final Set<NodeAddress> fathers = ((GroupedOverlayModule<?>) mainOverlay).getNodeGroup(GroupedOverlayModule.fathersGroupName);\n final PrimeNodeReport alreadyRequested = new PrimeNodeReport();\n final Map<Long, Integer> howManyMissingDescriptions = new TreeMap<Long, Integer>();\n // TODO initialize, also, why in parameter and not as return value?\n initiateHowManyMissingDescriptions(howManyMissingDescriptions);\n for (final NodeAddress father : fathers) {\n if (!inboxHistory.keySet().contains(father)) {\n continue;\n }\n // Don't do swarming phase for nodes that didn't get any chunks yet.\n if (inboxHistory.get(father).getLatestTimestamp() <= client.player.getVs()\n .getAvailableDescriptions(client.player.getVs().windowOffset).getLatestTimestamp()) {\n final PrimeNodeReport availableDescriptionsAtFather = inboxHistory.get(father);\n PrimeNodeReport requestToSend = client.player.getVs().getMissingDescriptions().getIntersect(availableDescriptionsAtFather);\n requestToSend = alreadyRequested.getDelta(requestToSend);\n updateRequestAccordingThreshold(howManyMissingDescriptions, requestToSend);\n if (requestToSend.size() == 0) {\n continue;\n }\n requestToSend = requestToSend.getRandomSubset(client.player.getVs().windowOffset - 1, prevMaxTimestamp, r);\n if (requestToSend.size() != 0) {\n requestToSend.playTime = client.player.getVs().windowOffset;\n alreadyRequested.update(requestToSend);\n updateHowManyMissingDescriptions(howManyMissingDescriptions, requestToSend);\n network.send(new PrimeRequestMessage<PrimeNodeReport>(getMessageTag(), network.getAddress(), father, new PrimeNodeReport(\n requestToSend)));\n }\n }\n }\n }", "@Test\n public void repairSingleTableInSubRanges()\n {\n long startTime = System.currentTimeMillis();\n\n TableReference tableReference = myTableReferenceFactory.forTable(\"test\", \"table1\");\n\n when(mockTableStorageStates.getDataSize(eq(tableReference))).thenReturn(UnitConverter.toBytes(\"10g\"));\n injectRepairHistory(tableReference, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(2));\n\n schedule(tableReference);\n\n BigInteger numberOfRanges = BigInteger.valueOf(UnitConverter.toBytes(\"10g\"))\n .divide(BigInteger.valueOf(UnitConverter.toBytes(\"100m\"))); // 102\n\n Set<LongTokenRange> expectedRanges = splitTokenRanges(tableReference, numberOfRanges);\n\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS)\n .until(() -> isRepairedSince(tableReference, startTime, expectedRanges));\n\n verifyTableRepairedSinceWithSubRangeRepair(tableReference, startTime, expectedRanges);\n verify(mockFaultReporter, never())\n .raise(any(RepairFaultReporter.FaultCode.class), anyMap());\n }", "private TaskLocation[] getPreferredLocsInternal(RDD<?> rdd,\n int partition,\n HashSet<Tuple2<RDD<?>, Integer>> visited) {\n if (!visited.add(new Tuple2<>(rdd, partition))) {\n return new TaskLocation[0];\n }\n\n // If the partition is cached, return the cache locations\n TaskLocation[] taskLocation = getCacheLocs(rdd)[partition];\n if (taskLocation != null && taskLocation.length > 0) {\n return taskLocation;\n }\n\n // If the RDD has some placement preferences (as is the case for input RDDs), get those\n String[] rddPrefs = rdd.preferredLocations(rdd.partitions()[partition]);\n if (rddPrefs != null && rddPrefs.length > 0) {\n TaskLocation[] locations = new TaskLocation[rddPrefs.length];\n for (int i = 0; i < rddPrefs.length; ++i) {\n locations[i] = TaskLocation.apply(rddPrefs[i]);\n }\n return locations;\n }\n\n // If the RDD has narrow dependencies, pick the first partition of the first narrow dependency\n // that has any placement preferences. Ideally we would choose based on transfer sizes,\n // but this will do for now.\n List<Dependency<?>> dependencies = rdd.dependencies();\n if (dependencies == null) {\n return new TaskLocation[0];\n }\n for (Dependency<?> dep : dependencies) {\n if (dep instanceof NarrowDependency) {\n int[] parents = ((NarrowDependency) dep).getParents(partition);\n for (int inPart : parents) {\n TaskLocation[] locs = getPreferredLocsInternal(dep.rdd(), inPart, visited);\n if (locs != null) {\n return locs;\n }\n }\n }\n }\n return new TaskLocation[0];\n }", "private void seekToInternal(SeekPosition seekPosition) throws ExoPlaybackException {\n long j;\n long j2;\n MediaSource.MediaPeriodId mediaPeriodId;\n boolean z;\n int i;\n Throwable th;\n long j3;\n long j4;\n this.playbackInfoUpdate.incrementPendingOperationAcks(1);\n Pair<Object, Long> resolveSeekPosition = resolveSeekPosition(seekPosition, true);\n if (resolveSeekPosition == null) {\n mediaPeriodId = this.playbackInfo.getDummyFirstMediaPeriodId(this.shuffleModeEnabled, this.window, this.period);\n j2 = -9223372036854775807L;\n j = -9223372036854775807L;\n z = true;\n } else {\n Object obj = resolveSeekPosition.first;\n long longValue = ((Long) resolveSeekPosition.second).longValue();\n MediaSource.MediaPeriodId resolveMediaPeriodIdForAds = this.queue.resolveMediaPeriodIdForAds(obj, longValue);\n if (resolveMediaPeriodIdForAds.isAd()) {\n j2 = 0;\n j = longValue;\n z = true;\n } else {\n j2 = ((Long) resolveSeekPosition.second).longValue();\n j = longValue;\n z = seekPosition.windowPositionUs == -9223372036854775807L;\n }\n mediaPeriodId = resolveMediaPeriodIdForAds;\n }\n try {\n if (this.mediaSource != null) {\n if (this.pendingPrepareCount <= 0) {\n if (j2 == -9223372036854775807L) {\n setState(4);\n i = 2;\n try {\n resetInternal(false, false, true, false, true);\n j3 = j2;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j3, j);\n if (z) {\n this.playbackInfoUpdate.setPositionDiscontinuity(i);\n return;\n }\n return;\n } catch (Throwable th2) {\n th = th2;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j2, j);\n if (z) {\n this.playbackInfoUpdate.setPositionDiscontinuity(i);\n }\n throw th;\n }\n } else {\n i = 2;\n if (mediaPeriodId.equals(this.playbackInfo.periodId)) {\n MediaPeriodHolder playingPeriod = this.queue.getPlayingPeriod();\n j4 = (playingPeriod == null || !playingPeriod.prepared || j2 == 0) ? j2 : playingPeriod.mediaPeriod.getAdjustedSeekPositionUs(j2, this.seekParameters);\n if (C.usToMs(j4) == C.usToMs(this.playbackInfo.positionUs)) {\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, this.playbackInfo.positionUs, j);\n if (z) {\n this.playbackInfoUpdate.setPositionDiscontinuity(2);\n return;\n }\n return;\n }\n } else {\n j4 = j2;\n }\n long seekToPeriodPosition = seekToPeriodPosition(mediaPeriodId, j4);\n z |= j2 != seekToPeriodPosition;\n j3 = seekToPeriodPosition;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j3, j);\n if (z) {\n }\n }\n }\n }\n i = 2;\n this.pendingInitialSeekPosition = seekPosition;\n j3 = j2;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j3, j);\n if (z) {\n }\n } catch (Throwable th3) {\n th = th3;\n i = 2;\n this.playbackInfo = copyWithNewPosition(mediaPeriodId, j2, j);\n if (z) {\n }\n throw th;\n }\n }", "@Test\n public void testGetTimeUntilEJQuotaConsumedLocked_BeginningOfTime() {\n // Set time to 3 minutes after boot.\n advanceElapsedClock(-JobSchedulerService.sElapsedRealtimeClock.millis());\n advanceElapsedClock(3 * MINUTE_IN_MILLIS);\n\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(MINUTE_IN_MILLIS, MINUTE_IN_MILLIS, 2), true);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(150 * SECOND_IN_MILLIS, 15 * SECOND_IN_MILLIS, 5), true);\n\n final long[] limits = mQuotaController.getEJLimitsMs();\n for (int i = 0; i < limits.length; ++i) {\n setStandbyBucket(i);\n assertEquals(\"Got wrong time until EJ quota consumed for bucket #\" + i,\n limits[i], // All existing sessions will phase out\n mQuotaController.getTimeUntilEJQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }", "@Deprecated\npublic interface SeekMap {\n\n /** A {@link SeekMap} that does not support seeking. */\n class Unseekable implements SeekMap {\n\n private final long durationUs;\n private final SeekPoints startSeekPoints;\n\n /**\n * @param durationUs The duration of the stream in microseconds, or {@link C#TIME_UNSET} if the\n * duration is unknown.\n */\n public Unseekable(long durationUs) {\n this(durationUs, 0);\n }\n\n /**\n * @param durationUs The duration of the stream in microseconds, or {@link C#TIME_UNSET} if the\n * duration is unknown.\n * @param startPosition The position (byte offset) of the start of the media.\n */\n public Unseekable(long durationUs, long startPosition) {\n this.durationUs = durationUs;\n startSeekPoints =\n new SeekPoints(startPosition == 0 ? SeekPoint.START : new SeekPoint(0, startPosition));\n }\n\n @Override\n public boolean isSeekable() {\n return false;\n }\n\n @Override\n public long getDurationUs() {\n return durationUs;\n }\n\n @Override\n public SeekPoints getSeekPoints(long timeUs) {\n return startSeekPoints;\n }\n }\n\n /** Contains one or two {@link SeekPoint}s. */\n final class SeekPoints {\n\n /** The first seek point. */\n public final SeekPoint first;\n /** The second seek point, or {@link #first} if there's only one seek point. */\n public final SeekPoint second;\n\n /**\n * @param point The single seek point.\n */\n public SeekPoints(SeekPoint point) {\n this(point, point);\n }\n\n /**\n * @param first The first seek point.\n * @param second The second seek point.\n */\n public SeekPoints(SeekPoint first, SeekPoint second) {\n this.first = Assertions.checkNotNull(first);\n this.second = Assertions.checkNotNull(second);\n }\n\n @Override\n public String toString() {\n return \"[\" + first + (first.equals(second) ? \"\" : (\", \" + second)) + \"]\";\n }\n\n @Override\n public boolean equals(@Nullable Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null || getClass() != obj.getClass()) {\n return false;\n }\n SeekPoints other = (SeekPoints) obj;\n return first.equals(other.first) && second.equals(other.second);\n }\n\n @Override\n public int hashCode() {\n return (31 * first.hashCode()) + second.hashCode();\n }\n }\n\n /**\n * Returns whether seeking is supported.\n *\n * @return Whether seeking is supported.\n */\n boolean isSeekable();\n\n /**\n * Returns the duration of the stream in microseconds.\n *\n * @return The duration of the stream in microseconds, or {@link C#TIME_UNSET} if the duration is\n * unknown.\n */\n long getDurationUs();\n\n /**\n * Obtains seek points for the specified seek time in microseconds. The returned {@link\n * SeekPoints} will contain one or two distinct seek points.\n *\n * <p>Two seek points [A, B] are returned in the case that seeking can only be performed to\n * discrete points in time, there does not exist a seek point at exactly the requested time, and\n * there exist seek points on both sides of it. In this case A and B are the closest seek points\n * before and after the requested time. A single seek point is returned in all other cases.\n *\n * @param timeUs A seek time in microseconds.\n * @return The corresponding seek points.\n */\n SeekPoints getSeekPoints(long timeUs);\n}", "static <T> void performEviction(List<T> source, TimestampSelector<T> selector, long startTime) {\n if(source != null) {\n int from = 0, to = 0;\n boolean clear = false;\n while (to < source.size()) {\n if (selector.select(source.get(to)) < startTime) {\n to++;\n clear = true;\n } else {\n break;\n }\n }\n\n if (clear)\n source.subList(from, to).clear();\n }\n }", "@Test\n public void testGetTimeUntilQuotaConsumedLocked_EqualTimeRemaining() {\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n setStandbyBucket(FREQUENT_INDEX);\n\n // Overlap boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (24 * HOUR_IN_MILLIS + 11 * MINUTE_IN_MILLIS),\n 4 * HOUR_IN_MILLIS,\n 5), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (8 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5),\n false);\n\n synchronized (mQuotaController.mLock) {\n // Both max and bucket time have 8 minutes left.\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n // Max time essentially free. Bucket time has 2 min phase out plus original 8 minute\n // window time.\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Overlap boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (24 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS), 2 * MINUTE_IN_MILLIS, 5),\n false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (20 * HOUR_IN_MILLIS),\n 3 * HOUR_IN_MILLIS + 48 * MINUTE_IN_MILLIS,\n 5), false);\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (8 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5),\n false);\n\n synchronized (mQuotaController.mLock) {\n // Both max and bucket time have 8 minutes left.\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n // Max time only has one minute phase out. Bucket time has 2 minute phase out.\n assertEquals(9 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }", "@Test\n public void testHardClustersWithOverlappingPartitions()\n {\n check(hardClustersWithOverlappingPartitions(), 0.0, 1.0);\n }", "public List<WorkContainer<K, V>> maybeGetWork(int requestedMaxWorkToRetrieve) {\n int workToGetDelta = requestedMaxWorkToRetrieve;\n\n // optimise early\n if (workToGetDelta < 1) {\n return UniLists.of();\n }\n\n tryToEnsureAvailableCapacity(requestedMaxWorkToRetrieve);\n\n //\n List<WorkContainer<K, V>> work = new ArrayList<>();\n\n //\n LoopingResumingIterator<Object, NavigableMap<Long, WorkContainer<K, V>>> it =\n sm.getIterator(iterationResumePoint);\n\n var staleWorkToRemove = new ArrayList<WorkContainer<K, V>>();\n\n var slowWorkCount = 0;\n var slowWorkTopics = new HashSet<String>();\n\n //\n for (var shard : it) {\n log.trace(\"Looking for work on shard: {}\", shard.getKey());\n if (work.size() >= workToGetDelta) {\n this.iterationResumePoint = Optional.of(shard.getKey());\n log.debug(\"Work taken is now over max, stopping (saving iteration resume point {})\", iterationResumePoint);\n break;\n }\n\n ArrayList<WorkContainer<K, V>> shardWork = new ArrayList<>();\n SortedMap<Long, WorkContainer<K, V>> shardQueue = shard.getValue();\n\n // then iterate over shardQueue queue\n Set<Map.Entry<Long, WorkContainer<K, V>>> shardQueueEntries = shardQueue.entrySet();\n for (var queueEntry : shardQueueEntries) {\n int taken = work.size() + shardWork.size();\n if (taken >= workToGetDelta) {\n log.trace(\"Work taken ({}) exceeds max ({})\", taken, workToGetDelta);\n break;\n }\n\n var workContainer = queueEntry.getValue();\n\n {\n if (checkEpochIsStale(workContainer)) {\n // this state should never happen, as work should get removed from shards upon partition revocation\n log.debug(\"Work is in queue with stale epoch. Will remove now. Was it not removed properly on revoke? Or are we in a race state? {}\", workContainer);\n staleWorkToRemove.add(workContainer);\n continue; // skip\n }\n }\n\n // TODO refactor this and the rest of the partition state monitoring code out\n // check we have capacity in offset storage to process more messages\n TopicPartition topicPartition = workContainer.getTopicPartition();\n boolean notAllowedMoreRecords = pm.isBlocked(topicPartition);\n // If the record is below the highest succeeded offset, it is already represented in the current offset encoding,\n // and may in fact be the message holding up the partition so must be retried, in which case we don't want to skip it.\n // Generally speaking, completing more offsets below the highest succeeded (and thus the set represented in the encoded payload),\n // should usually reduce the payload size requirements\n boolean representedInEncodedPayloadAlready = workContainer.offset() < pm.getState(topicPartition).getOffsetHighestSucceeded();\n if (notAllowedMoreRecords && !representedInEncodedPayloadAlready && workContainer.isNotInFlight()) {\n log.debug(\"Not allowed more records for the partition ({}) as set from previous encode run (blocked), that this \" +\n \"record ({}) belongs to due to offset encoding back pressure, is within the encoded payload already (offset lower than highest succeeded, \" +\n \"not in flight ({}), continuing on to next container in shard.\",\n topicPartition, workContainer.offset(), workContainer.isNotInFlight());\n continue;\n }\n\n // check if work can be taken\n boolean hasNotSucceededAlready = !workContainer.isUserFunctionSucceeded();\n boolean delayHasPassed = workContainer.hasDelayPassed(clock);\n if (delayHasPassed && workContainer.isNotInFlight() && hasNotSucceededAlready) {\n log.trace(\"Taking {} as work\", workContainer);\n workContainer.queueingForExecution();\n shardWork.add(workContainer);\n } else {\n Duration timeInFlight = workContainer.getTimeInFlight();\n String msg = \"Can't take as work: Work ({}). Must all be true: Delay passed= {}. Is not in flight= {}. Has not succeeded already= {}. Time spent in execution queue: {}.\";\n if (toSeconds(timeInFlight) > toSeconds(thresholdForTimeSpentInQueueWarning)) {\n slowWorkCount++;\n slowWorkTopics.add(workContainer.getCr().topic());\n log.trace(\"Work has spent over \" + thresholdForTimeSpentInQueueWarning + \" in queue! \"\n + msg, workContainer, delayHasPassed, workContainer.isNotInFlight(), hasNotSucceededAlready, timeInFlight);\n } else {\n log.trace(msg, workContainer, delayHasPassed, workContainer.isNotInFlight(), hasNotSucceededAlready, timeInFlight);\n }\n }\n\n ProcessingOrder ordering = options.getOrdering();\n if (ordering == UNORDERED) {\n // continue - we don't care about processing order, so check the next message\n continue;\n } else {\n // can't take any more from this partition until this work is finished\n // processing blocked on this partition, continue to next partition\n log.trace(\"Processing by {}, so have cannot get more messages on this ({}) shard.\", this.options.getOrdering(), shard.getKey());\n break;\n }\n }\n work.addAll(shardWork);\n }\n\n if (slowWorkCount > 0) {\n final int finalSlowWorkCount = slowWorkCount;\n slowWarningRateLimit.performIfNotLimited(() -> log.warn(\"Warning: {} records in the queue have been \" +\n \"waiting longer than {}s for following topics {}.\",\n finalSlowWorkCount, toSeconds(thresholdForTimeSpentInQueueWarning), slowWorkTopics));\n }\n\n // remove found stale work outside of loop\n for (final WorkContainer<K, V> kvWorkContainer : staleWorkToRemove) {\n sm.removeWorkFromShard(kvWorkContainer);\n }\n\n log.debug(\"Got {} records of work. In-flight: {}, Awaiting in commit queues: {}\", work.size(), getNumberRecordsOutForProcessing(), getNumberOfEntriesInPartitionQueues());\n numberRecordsOutForProcessing += work.size();\n\n return work;\n }", "@Test\n public void testGetTimeUntilQuotaConsumedLocked_BucketWindow() {\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Close to RARE boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS - 30 * SECOND_IN_MILLIS),\n 30 * SECOND_IN_MILLIS, 5), false);\n // Far away from FREQUENT boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (7 * HOUR_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5), false);\n // Overlap WORKING_SET boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (2 * HOUR_IN_MILLIS + MINUTE_IN_MILLIS),\n 3 * MINUTE_IN_MILLIS, 5), false);\n // Close to ACTIVE boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (9 * MINUTE_IN_MILLIS), 3 * MINUTE_IN_MILLIS, 5), false);\n\n setStandbyBucket(RARE_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(30 * SECOND_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n setStandbyBucket(FREQUENT_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(5 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(7 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n // ACTIVE window = allowed time, so jobs can essentially run non-stop until they reach the\n // max execution time.\n setStandbyBucket(ACTIVE_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(7 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(mQcConstants.MAX_EXECUTION_TIME_MS - 9 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }", "@Test\n public void testGetTimeUntilQuotaConsumedLocked_EdgeOfWindow_BucketWindow() {\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS),\n 10 * MINUTE_IN_MILLIS, 5), false);\n setStandbyBucket(RARE_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(0,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (8 * HOUR_IN_MILLIS), 10 * MINUTE_IN_MILLIS, 5), false);\n setStandbyBucket(FREQUENT_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(0,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (2 * HOUR_IN_MILLIS),\n 10 * MINUTE_IN_MILLIS, 5), false);\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(0,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (10 * MINUTE_IN_MILLIS), 10 * MINUTE_IN_MILLIS, 5),\n false);\n // ACTIVE window = allowed time, so jobs can essentially run non-stop until they reach the\n // max execution time.\n setStandbyBucket(ACTIVE_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(0,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(mQcConstants.MAX_EXECUTION_TIME_MS - 30 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }", "private void maybeScheduleSlice(double when) {\n if (nextSliceRunTime > when) {\n timer.schedule(when);\n nextSliceRunTime = when;\n }\n }", "@Test\n public void testCompactRangeIndex() {\n // Create a Local Region.\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(0);\n setCacheInVMs(vm0);\n vm0.invoke(helper.getCacheSerializableRunnableForReplicatedRegionCreation(regionName));\n\n vm0.invoke(helper.getCacheSerializableRunnableForPRIndexCreate(regionName, indexName,\n indexedExpression, fromClause, alias));\n\n AsyncInvocation<?>[] asyncInvs = new AsyncInvocation[2];\n\n asyncInvs[0] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[1] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n ThreadUtils.join(inv, 30 * 000);\n }\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n if (inv.exceptionOccurred()) {\n Assert.fail(\"Random region operation failed on VM_\" + inv.getId(), inv.getException());\n }\n }\n\n vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n }", "@Test\n public void testScanTokensInterleavedRangePartitionDrops() throws Exception {\n Schema schema = getBasicSchema();\n CreateTableOptions createOptions = new CreateTableOptions();\n createOptions.addHashPartitions(ImmutableList.of(\"key\"), 2);\n\n final int numRows = 30;\n PartialRow lower0 = schema.newPartialRow();\n PartialRow upper0 = schema.newPartialRow();\n lower0.addInt(\"key\", 0);\n upper0.addInt(\"key\", numRows / 3);\n createOptions.addRangePartition(lower0, upper0);\n\n PartialRow lower1 = schema.newPartialRow();\n PartialRow upper1 = schema.newPartialRow();\n lower1.addInt(\"key\", numRows / 3);\n upper1.addInt(\"key\", 2 * numRows / 3);\n createOptions.addRangePartition(lower1, upper1);\n\n PartialRow lower2 = schema.newPartialRow();\n PartialRow upper2 = schema.newPartialRow();\n lower2.addInt(\"key\", 2 * numRows / 3);\n upper2.addInt(\"key\", numRows);\n createOptions.addRangePartition(lower2, upper2);\n\n KuduTable table = client.createTable(testTableName, schema, createOptions);\n KuduSession session = client.newSession();\n for (int i = 0; i < numRows; i++) {\n session.apply(createBasicSchemaInsert(table, i));\n }\n\n // Build the scan tokens.\n List<KuduScanToken> tokens = client.newScanTokenBuilder(table).build();\n assertEquals(6, tokens.size());\n\n // Drop the range partition [10, 20).\n AlterTableOptions dropMiddleOptions = new AlterTableOptions();\n dropMiddleOptions.dropRangePartition(lower1, upper1);\n client.alterTable(table.getName(), dropMiddleOptions);\n\n // Rehydrate the tokens.\n List<KuduScanner> scanners = new ArrayList<>();\n for (KuduScanToken token : tokens) {\n scanners.add(token.intoScanner(client));\n }\n\n // Drop the range partition [20, 30).\n AlterTableOptions dropEndOptions = new AlterTableOptions();\n dropEndOptions.dropRangePartition(lower2, upper2);\n client.alterTable(table.getName(), dropEndOptions);\n\n // Check the scanners work. The scanners for the tablets in the range [10, 20) definitely won't\n // see any rows. The scanners for the tablets in the range [20, 30) might see rows.\n int scannedRows = 0;\n for (KuduScanner scanner : scanners) {\n scannedRows += countRowsInScan(scanner);\n }\n assertTrue(String.format(\"%d >= %d / 3?\", scannedRows, numRows),\n scannedRows >= numRows / 3);\n assertTrue(String.format(\"%d <= 2 * %d / 3?\", scannedRows, numRows),\n scannedRows <= 2 * numRows / 3);\n }", "public static void getItemsPerLevelUpTo64New(long[] I0, long[] IStar,byte[] offsets, int bucketId)\n\t{\n\t\toffsets[0] = (byte) Long.bitCount(I0[bucketId]);\n\n\n\t\tbyte offset = 0;\n\t\tint i =1;\n\t\twhile(true)\n\t\t{ \n\t\t\tlong tempMask = (1l<<(offsets[0]+offset))-1;\n\t\t\tbyte nextOffset = (byte) Long.bitCount(IStar[bucketId]&tempMask);\n\t\t\t\t\t\n\t\t\t\t\t//Long.bitCount(IStar&((1l<<(offsets[0]+offset)-1));\n\t\t\t\t\t\n//\t\t\t\t\trank(IStar,offsets[0]+offset);\n\t\t\toffsets[i] = (byte) (nextOffset-offset);\n\t\t\tif ( offsets[i++]<=0)\n\t\t\t\tbreak;\n//\t\t\tif(nextOffset == offset)\n//\t\t\t\tbreak;\n\t\t\toffset= nextOffset;\n\t\t}\n\t\treturn ;\n\n\n\t}", "@Override\r\n public void extractEventsBetween(Destination<LogEvent> visitor, long start, long end) {\n historicalBuffersLock.lock();\r\n try {\r\n for (Block block : historicalBlocks) {\r\n\r\n if (TimeUtils.overlaps(block.startTime, block.endTime, start, end)) {\r\n\r\n byte[] data = block.buffer.array();\r\n ByteBuffer compressed = ByteBuffer.wrap(data);\r\n compressed.limit(block.watermark);\r\n\r\n logger.fine(\"Visiting block with data from '{}' to '{}' : search criteria from '{}' to '{}' : block is '{}'\",\r\n Logger.toDateString(block.startTime),\r\n Logger.toDateString(block.endTime),\r\n Logger.toDateString(start),\r\n Logger.toDateString(end),\r\n compressed);\r\n\r\n ByteBuffer decompress = compressionStrategy.decompress(compressed);\r\n extractEventsBetween(visitor, decompress, start, end);\r\n }\r\n }\r\n } finally {\r\n historicalBuffersLock.unlock();\r\n }\r\n\r\n if (currentBlock != null) {\r\n ByteBuffer readBuffer;\r\n // currentBufferLock.writeLock().lock();\r\n try {\r\n // Now have a look in the current buffer\r\n // int position = currentBlock.buffer.position();\r\n readBuffer = ByteBuffer.wrap(currentBlock.buffer.array());\r\n readBuffer.limit(currentBufferPosition);\r\n } finally {\r\n // currentBufferLock.writeLock().unlock();\r\n }\r\n\r\n try {\r\n extractEventsBetween(visitor, readBuffer, start, end);\r\n } catch (BufferUnderflowException e) {\r\n logger.warn(\"Failed to read current buffer, buffer is '{}'\", readBuffer);\r\n throw e;\r\n }\r\n }\r\n }", "boolean isOffsetProcessed(String sourceTable, String sourceOffset, boolean isSnapshot);", "public void prefetch () throws IOException {\n\t\t\tlong latestEpoch = -1;\n\t\t\t\tbyte[] latestEpochBytes = cloudBlockSnapshotStore.get(\"EpochCount\");\n\t\t\t\tif (latestEpochBytes == null) {\n\t\t\t\t\tif (debugPrintoutFlag) {\n\t\t\t\t\t\tSystem.out.println(\"Prefetcher thread gets interrupted, exit the main loop here\");\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlatestEpoch = ByteUtils.bytesToLong(latestEpochBytes);\n\t\t\t\tif (debugPrintoutFlag) {\n\t\t\t\t\tSystem.out.println(\"latestEpoch=\" + latestEpoch);\n\t\t\t\t}\n\t\t\t\t//byte[] myPrefetchedEpochBytes = blockDataStore.get(\"PrefetchedEpoch-\" + RockyController.nodeID);\n\t\t\t\t//if (myPrefetchedEpochBytes == null) {\n\t\t\t\t//\tblockDataStore.put(\"PrefetchedEpoch-\" + RockyController.nodeID, ByteUtils.longToBytes(myPrefetchedEpoch));\n\t\t\t\t//}\n\t\t\t\t//myPrefetchedEpoch = ByteUtils.bytesToLong(myPrefetchedEpochBytes);\n\t\t\tif (debugPrintoutFlag) { \n\t\t\t\tSystem.out.println(\"prefetchedEpoch=\" + RockyStorage.prefetchedEpoch);\n\t\t\t\tSystem.out.println(\"epochCnt=\" + epochCnt);\n\t\t\t}\n\t\t\tif (latestEpoch > RockyStorage.prefetchedEpoch) { // if I am nonOwner with nothing more to prefetch, I don't prefetch\n\t\t\t\t// Get all epoch bitmaps\n\t\t\t\t//List<BitSet> epochBitmapList = fetchNextEpochBitmaps(latestEpoch, myPrefetchedEpoch);\n\t\t\t\tList<BitSet> epochBitmapList = fetchNextEpochBitmaps(latestEpoch, RockyStorage.prefetchedEpoch);\n\t\t\t\t\n\t\t\t\t// Get a list of blockIDs to prefetch\n\t\t\t\tHashSet<Integer> blockIDList = getPrefetchBlockIDList(epochBitmapList);\n\t\t\t\n\t\t\t\tif (blockIDList != null) { // if blockIDList is null, we don't need to prefetch anything\n\t\t\t\t\t// Prefetch loop\n\t\t\t\t\tprefetchBlocks(this, blockIDList);\n\t\t\t\t\t\n\t\t\t\t\t// Update PrefetchedEpoch-<nodeID> on cloud and prefetchedEpoch\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcloudBlockSnapshotStore.put(\"PrefetchedEpoch-\" + RockyController.nodeID, ByteUtils.longToBytes(latestEpoch));\n\t\t\t\t\t} catch (IOException 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\tprefetchedEpoch = latestEpoch;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}", "@Test\n public void prefixTrimNotReachingSequencer() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n CorfuRuntime rt = getNewRuntime();\n\n TestRule dropSequencerTrim = new TestRule()\n .requestMatches(msg -> msg.getPayload().getPayloadCase()\n .equals(CorfuMessage.RequestPayloadMsg.PayloadCase.SEQUENCER_TRIM_REQUEST))\n .drop();\n addClientRule(rt, dropSequencerTrim);\n\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n PersistentCorfuTable<String, Long> tableB = openTable(rt, streamNameB);\n\n // thread 1: populates the maps with mapSize items\n scheduleConcurrently(1, ignored_task_num -> {\n populateMaps(tableSize, tableA, tableB);\n });\n\n // thread 2: periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times,\n // and immediate prefix-trim of the log up to the checkpoint position\n scheduleConcurrently(1, ignored_task_num -> {\n mapCkpointAndTrim(rt, tableA, tableB);\n });\n\n // thread 3: repeated ITERATION_LOW times starting a fresh runtime, and instantiating the maps.\n // they should rebuild from the latest checkpoint (if available).\n // performs some sanity checks on the map state\n\n // In this test checkpoints and trims are happening in a loop for several iterations,\n // so a trim exception can occur if after loading from the latest checkpoint,\n // updates to the stream have been already trimmed (1st trimmedException), the stream\n // is reset, and on the second iteration the same scenario can happen (2nd trimmedException)\n // which is the total number of retries.\n scheduleConcurrently(PARAMETERS.NUM_ITERATIONS_LOW, ignored_task_num -> {\n validateMapRebuild(tableSize, false, true);\n });\n\n executeScheduled(PARAMETERS.CONCURRENCY_SOME, PARAMETERS.TIMEOUT_LONG);\n\n // Verify that last trim cycle completed (async task) before validating map rebuild\n Token currentTrimMark = Token.UNINITIALIZED;\n while(currentTrimMark.getSequence() != lastValidCheckpoint.getSequence() + 1L) {\n currentTrimMark = getNewRuntime().getAddressSpaceView().getTrimMark();\n }\n\n // finally, after all three threads finish, again we start a fresh runtime and instantiate the maps.\n // This time we check that the new map instances contain all values\n validateMapRebuild(tableSize, true, false);\n } finally {\n rt.shutdown();\n }\n }", "@Test\n public void testBlocking() throws Exception {\n FutureRecordMetadata future = new FutureRecordMetadata(asyncRequest(baseOffset, null, 50L),\n relOffset, RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);\n assertEquals(baseOffset + relOffset, future.get().offset());\n }", "@Test\n public void repairSingleTableInSubRanges()\n {\n long startTime = System.currentTimeMillis();\n\n TableReference tableReference = new TableReference(\"ks\", \"tb\");\n\n when(myTableStorageStates.getDataSize(eq(tableReference))).thenReturn(UnitConverter.toBytes(\"10g\"));\n\n createKeyspace(tableReference.getKeyspace(), 3);\n injectRepairHistory(tableReference, System.currentTimeMillis() - TimeUnit.HOURS.toMillis(2));\n createTable(tableReference);\n\n BigInteger numberOfRanges = BigInteger.valueOf(UnitConverter.toBytes(\"10g\")).divide(BigInteger.valueOf(UnitConverter.toBytes(\"100m\"))); // 102\n\n Set<LongTokenRange> expectedRanges = splitTokenRanges(tableReference, numberOfRanges);\n\n await().pollInterval(1, TimeUnit.SECONDS).atMost(90, TimeUnit.SECONDS).until(() -> isRepairedSince(tableReference, startTime, expectedRanges));\n\n verifyTableRepairedSinceWithSubRangeRepair(tableReference, startTime, expectedRanges);\n verify(myFaultReporter, never()).raise(any(RepairFaultReporter.FaultCode.class), anyMapOf(String.class, Object.class));\n }", "public static void main(String args[]) throws Exception\r\n {\r\n System.out.println(\"start\");\r\n final Map<String, LogData> timeInHoursMinsAndLogDataMap = new LinkedHashMap();\r\n final Scanner input = new Scanner(System.in);\r\n int totalRecords = 0;\r\n final List<String> keysToRemove = new ArrayList<>(2);\r\n Set<String> processed = new HashSet<>();\r\n\r\n while (input.hasNext())\r\n {\r\n System.out.println(\"while\");\r\n Long time = Long.parseLong(input.next());\r\n Double processingTime = Double.parseDouble(input.next());\r\n\r\n boolean process = true;\r\n final Date date = new Date(time * 1000);\r\n final String key = String.valueOf(date.getHours()) + \":\" + String.valueOf(date.getMinutes());\r\n if (processed.contains(key))\r\n continue;\r\n if (timeInHoursMinsAndLogDataMap.size() > 0)\r\n {\r\n keysToRemove.clear();\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n final int diffSeconds = getDiffBetweenCurrentAndMapSeconds(key, entry.getKey(), date.getSeconds(),\r\n entry.getValue().maxSeconds);\r\n if (diffSeconds > 60)\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n keysToRemove.add(entry.getKey());\r\n processed.add(entry.getKey());\r\n }\r\n else if (diffSeconds < -60)\r\n {\r\n process = false;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (!process)\r\n continue;\r\n\r\n removeKeyFromMap(timeInHoursMinsAndLogDataMap, keysToRemove);\r\n\r\n LogData logData = timeInHoursMinsAndLogDataMap.get(key);\r\n if (logData == null)\r\n {\r\n logData = new LogData();\r\n logData.setTimeStamp(time);\r\n }\r\n logData.updateBuckets(processingTime);\r\n logData.updateMaxSeconds(date.getSeconds());\r\n timeInHoursMinsAndLogDataMap.put(key, logData);\r\n\r\n }\r\n\r\n for (Map.Entry<String, LogData> entry : timeInHoursMinsAndLogDataMap.entrySet())\r\n {\r\n System.out.println(entry.getValue().getResult());\r\n }\r\n \r\n System.out.println(\"end\");\r\n }", "public int modifyHourIdxForDST(final TimeZone userTimeZone, final int blocksSize, final Calendar appointmentDate) {\n int hourIdx = appointmentDate.get(Calendar.HOUR_OF_DAY);\n\n //OC-18562 due to the daylight saving, March will have one hour less and Nov has one hour more in the blocks\n //final int blocksSize = blocks.size();\n //In March x of DST changing day, there is no 2:00 am\n if (blocksSize == DST_HOUR_BLOCK_NUMBER_IN_MARCH && hourIdx >= 2) {\n hourIdx--;\n } else if (blocksSize == DST_HOUR_BLOCK_NUMBER_IN_NOV) {\n //In Nov x of DST changing day, there are two 1:00 am.\n final boolean isDaylightTime = userTimeZone.inDaylightTime(appointmentDate.getTime());\n if ((hourIdx == 1 && !isDaylightTime) || hourIdx >= 2) {\n hourIdx++;\n }\n }\n return hourIdx;\n }", "private long getByteOffsetForRecordingNanos(long nanos) throws HNStreamingException, HNStreamingRangeException\n {\n try\n {\n RecordedService[] segments = getSegmentedRecordedService().getSegments();\n //not pending, no need to check for null\n RecordedService thisSegment = recordingItem.getRecording(nanos);\n long recordingSize = 0L;\n long recordingNanos = 0L;\n for (int i = 0;i<segments.length;i++)\n {\n HNStreamContentDescription thisDescription = recordingItem.getContentDescription((OcapRecordedServiceExt) segments[i]);\n\n long thisRecordingSize = HNAPIImpl.nativeServerGetNetworkContentItemSize(contentLocationType, thisDescription,\n protocolInfo.getProfileId(), protocolInfo.getContentFormat(), request.getTransformation() );\n // If native returns unknown size for this content, byte offset cannot\n // be determined. Return from here.\n if(thisRecordingSize < 0)\n {\n return -1;\n }\n if (segments[i] == thisSegment)\n {\n try\n {\n long thisNanosOffset = nanos - recordingNanos;\n long thisByteOffset = HNAPIImpl.nativeServerGetNetworkBytePositionForMediaTimeNS(contentLocationType, thisDescription,\n protocolInfo.getProfileId(), protocolInfo.getContentFormat(), request.getTransformation(), thisNanosOffset);\n // If native returns unknown byte offset for given time, overall byte offset cannot\n // be determined. Return from here.\n if(thisByteOffset < 0)\n {\n return -1;\n }\n return recordingSize + thisByteOffset;\n }\n catch (MPEMediaError err)\n {\n throw new HNStreamingException(\"Failed to retrieve network byte position \", err);\n }\n }\n recordingSize += thisRecordingSize;\n //recorded duration is millis\n recordingNanos += (segments[i].getRecordedDuration() * NANOS_PER_MILLI);\n }\n throw new HNStreamingRangeException(\"getByteOffsetForRecordingNanos - segment not found for nanos: \" + nanos + \", recording nanos: \" + recordingNanos);\n }\n catch (MPEMediaError err)\n {\n throw new HNStreamingException(\"Failed to retrieve byte offset for recording nanos: \" + nanos, err);\n }\n }", "@VulkanAPIFunctionType(vulkanFunction = \"vkFlushMappedMemoryRanges\")\n void flushRange(\n long offset,\n long size)\n throws VulkanException;", "public void prepareForSnapshot() {\n if (readMap != null)\n return;\n\n readMap = new TreeMap<>();\n\n for (Map.Entry<GroupPartitionId, PagesAllocationRange> entry : writeMap.entrySet()) {\n if (!skippedParts.contains(entry.getKey()))\n readMap.put(entry.getKey(), entry.getValue());\n }\n\n skippedParts.clear();\n writeMap.clear();\n }", "public Map<TopicAndPartition, Long> getEarliestOffsets(String topic) {\n\n Map<TopicAndPartition, Long> returnOffsetsMap = new HashMap<>();\n\n Log.info(\"Getting earliest offsets for, topic: '{}'\", topic);\n\n scala.collection.immutable.Set<TopicAndPartition> topicPartitionSet = getPartitionsForTopcic(topic);\n Either<ArrayBuffer<Throwable>, scala.collection.immutable.Map<TopicAndPartition, KafkaCluster.LeaderOffset>> results = kc.getEarliestLeaderOffsets(topicPartitionSet);\n\n\n if (results.isRight()) {\n\n for (Map.Entry<TopicAndPartition, KafkaCluster.LeaderOffset> entry : JavaConverters.asJavaMapConverter(results.right().get()).asJava().entrySet()) {\n returnOffsetsMap.put(new TopicAndPartition(entry.getKey().topic(), entry.getKey().partition()), entry.getValue().offset());\n }\n\n } else {\n Log.warn(\"Problem getting Offsets for this topic and groupid: {}\", topic);\n }\n return returnOffsetsMap;\n }", "private void calculatePeakHour() {\n\t\tint sum = 0;\n\t\t// sum up all the tasks that are waiting in queues\n\t\tfor (int i = 0; i < this.numberOfServers; i++) {\n\t\t\tsum += this.scheduler.getServers().get(i).getTasks().length;\n\t\t}\n\n\t\tif (sum > peakHourClients) {\n\t\t\tpeakHourClients = sum;\n\t\t\tpeakHour = currentTime;\n\t\t}\n\t}", "public Object mo13024a(TimeKey timeKey, Continuation<? super Unit> continuation) {\n C0837c.f761k.mo12913a(this.f1030a, (Key) timeKey);\n C0959a aVar = new C0959a(this.f1030a);\n C0960b bVar = aVar.f1026a;\n String id = timeKey.getId();\n if (bVar != null) {\n Intrinsics.checkNotNullParameter(id, \"timeKeyId\");\n SharedPreferences sharedPreferences = bVar.f1029a.getSharedPreferences(\"FREE_WATCHER_ID_STORAGE\", 0);\n Intrinsics.checkNotNullExpressionValue(sharedPreferences, \"keyWatcherIdStorage\");\n int i = sharedPreferences.getInt(\"FREE_KEY_WATCHER_ID\", 0);\n sharedPreferences.edit().putInt(\"FREE_KEY_WATCHER_ID\", i + 1).apply();\n int i2 = sharedPreferences.getInt(\"FREE_KEY_WATCHER_ID\", 0);\n sharedPreferences.edit().putInt(\"FREE_KEY_WATCHER_ID\", i2 + 1).apply();\n SharedPreferences sharedPreferences2 = bVar.f1029a.getSharedPreferences(\"KEY_START_STORAGE\", 0);\n Intrinsics.checkNotNullExpressionValue(sharedPreferences2, \"context.keyStartStorage()\");\n sharedPreferences2.edit().putInt(id, i).apply();\n SharedPreferences sharedPreferences3 = bVar.f1029a.getSharedPreferences(\"KEY_END_STORAGE\", 0);\n Intrinsics.checkNotNullExpressionValue(sharedPreferences3, \"context.keyEndStorage()\");\n sharedPreferences3.edit().putInt(id, i2).apply();\n aVar.mo13021a(timeKey, new Pair(Integer.valueOf(i), Integer.valueOf(i2)));\n Object b = mo13033b(timeKey, continuation);\n return b == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? b : Unit.INSTANCE;\n }\n throw null;\n }", "@Override\n public void scanActuatorsParked() {\n }", "@Test\n public void invalidTableOffset() throws InterruptedException {\n this.sfcOfRendererDataListener.onDataTreeChanged(createSfcOfRendererConfig(0, 100));\n Thread.sleep(SLEEP); // otherwise the failure is not detected\n verifySettersNotCalled();\n\n // Table Offset must be greater than 1\n this.sfcOfRendererDataListener.onDataTreeChanged(createSfcOfRendererConfig(1, 100));\n Thread.sleep(SLEEP); // otherwise the failure is not detected\n verifySettersNotCalled();\n\n // Table Offset must be less than 246 (255-maxTableOffset())\n this.sfcOfRendererDataListener.onDataTreeChanged(createSfcOfRendererConfig(250, 100));\n Thread.sleep(SLEEP); // otherwise the failure is not detected\n verifySettersNotCalled();\n }", "private void makeSubPlan(Plan plan,Time currentTime,ArrayList<POI> POIs,Time timeEnd,Trip trip,Plan mPlan,boolean skip){\n if(mPlan!=null) \n plan.makeCalculations(trip.getStartTime(),trip.getEndTime(),mPlan.getFullCost(),mPlan);\n else\n plan.makeCalculations(trip.getStartTime(),trip.getEndTime(),0,mPlan);\n POI last=plan.getLastPOI();\n for(int i=0; i< POIs.size();i++){\n // Check if iam in Time range or not\n if(!currentTime.compare(timeEnd))\n break;\n else{\n if(canInsertLast(plan, POIs.get(i), trip, currentTime,mPlan,skip)){\n // update current time & plan\n Time from = new Time (0,0);\n Time to = new Time (0,0);\n if(last!=null){\n // cal travel time\n currentTime.add(last.getShortestPath(POIs.get(i).getId()));\n // cal waste time\n int x = Time.substract(currentTime, POIs.get(i).getOpenTime());\n if(skip&&x!=-1)\n currentTime.add(x);\n \n from.hour = currentTime.hour;\n from.min = currentTime.min;\n // cal poi duration \n currentTime.add(POIs.get(i).getDuration());\n to.hour = currentTime.hour;\n to.min = currentTime.min;\n }\n else{\n if(mPlan==null){\n int x = Time.substract(currentTime, POIs.get(i).getOpenTime());\n if(skip&&x!=-1)\n currentTime.add(x);\n from.hour = currentTime.hour;\n from.min = currentTime.min;\n currentTime.add(POIs.get(i).getDuration());\n to.hour = currentTime.hour;\n to.min = currentTime.min;\n }\n else{\n POI mLast = mPlan.getLastPOI();\n if(mLast!=null)\n currentTime.add(mLast.getShortestPath(POIs.get(i).getId()));\n int x = Time.substract(currentTime, POIs.get(i).getOpenTime());\n if(skip&&x!=-1)\n currentTime.add(x);\n from.hour = currentTime.hour;\n from.min = currentTime.min;\n currentTime.add(POIs.get(i).getDuration());\n to.hour = currentTime.hour;\n to.min = currentTime.min;\n }\n }\n plan.insert(POIs.get(i), plan.getNOV(),from,to,null);\n if(mPlan!=null)\n plan.makeCalculations(trip.getStartTime(), trip.getEndTime(),mPlan.getFullCost(),mPlan);\n else\n plan.makeCalculations(trip.getStartTime(),trip.getEndTime(),0,mPlan);\n last=POIs.get(i);\n // Remove poi from POIs\n POIs.remove(i);\n i--;\n }\n }\n }\n }", "@Test\n public void testGetTimeUntilQuotaConsumedLocked_MaxExecution() {\n final long now = JobSchedulerService.sElapsedRealtimeClock.millis();\n // Overlap boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (24 * HOUR_IN_MILLIS + 8 * MINUTE_IN_MILLIS), 4 * HOUR_IN_MILLIS, 5),\n false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(8 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n // Max time will phase out, so should use bucket limit.\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Close to boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(now - (24 * HOUR_IN_MILLIS - MINUTE_IN_MILLIS),\n 4 * HOUR_IN_MILLIS - 5 * MINUTE_IN_MILLIS, 5), false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(5 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(10 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n\n mQuotaController.getTimingSessions(SOURCE_USER_ID, SOURCE_PACKAGE).clear();\n // Far from boundary.\n mQuotaController.saveTimingSession(SOURCE_USER_ID, SOURCE_PACKAGE,\n createTimingSession(\n now - (20 * HOUR_IN_MILLIS), 4 * HOUR_IN_MILLIS - 3 * MINUTE_IN_MILLIS, 5),\n false);\n\n setStandbyBucket(WORKING_INDEX);\n synchronized (mQuotaController.mLock) {\n assertEquals(3 * MINUTE_IN_MILLIS,\n mQuotaController.getRemainingExecutionTimeLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n assertEquals(3 * MINUTE_IN_MILLIS,\n mQuotaController.getTimeUntilQuotaConsumedLocked(\n SOURCE_USER_ID, SOURCE_PACKAGE));\n }\n }", "private long newBufferAndOffset(E[] nextBuffer, long index)\r\n/* 222: */ {\r\n/* 223:475 */ this.consumerBuffer = nextBuffer;\r\n/* 224:476 */ this.consumerMask = (LinkedArrayQueueUtil.length(nextBuffer) - 2 << 1);\r\n/* 225:477 */ return LinkedArrayQueueUtil.modifiedCalcElementOffset(index, this.consumerMask);\r\n/* 226: */ }", "boolean reachedBeginning(TopicPartition partition);", "private long nextArrayOffset(long mask)\r\n/* 195: */ {\r\n/* 196:446 */ return LinkedArrayQueueUtil.modifiedCalcElementOffset(mask + 2L, 9223372036854775807L);\r\n/* 197: */ }", "public void checkpointRecoveryPointOffsets() {\n Table<String, TopicAndPartition, Log> recoveryPointsByDir = Utils.groupBy(this.logsByTopicPartition(), new Function2<TopicAndPartition, Log, String>() {\n @Override\n public String apply(TopicAndPartition _1, Log _2) {\n return _2.dir.getParent();\n }\n });\n for (File dir : logDirs) {\n Map<TopicAndPartition, Log> recoveryPoints = recoveryPointsByDir.row(dir.toString());\n if (recoveryPoints != null)\n this.recoveryPointCheckpoints.get(dir).write(Utils.map(recoveryPoints, new Function2<TopicAndPartition, Log, Tuple2<TopicAndPartition, Long>>() {\n @Override\n public Tuple2<TopicAndPartition, Long> apply(TopicAndPartition arg1, Log log) {\n return Tuple2.make(arg1, log.recoveryPoint);\n }\n }));\n }\n }", "private static OffsetResult lookupByInstantOffsetDst(long timeMillis, int utcOffsetMillis,\n @Nullable Boolean isDst) {\n String[] zones = java.util.TimeZone.getAvailableIDs();\n TimeZone match = null;\n boolean isOnlyMatch = true;\n for (String zone : zones) {\n TimeZone tz = TimeZone.getFrozenTimeZone(zone);\n if (offsetMatchesAtTime(tz, utcOffsetMillis, isDst, timeMillis)) {\n if (match == null) {\n match = tz;\n } else {\n isOnlyMatch = false;\n break;\n }\n }\n }\n\n if (match == null) {\n return null;\n }\n return new OffsetResult(match, isOnlyMatch);\n }", "@Test\n public void testCompactRangeIndexOnPR() {\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(0);\n VM vm1 = host.getVM(1);\n VM vm2 = host.getVM(2);\n VM vm3 = host.getVM(3);\n setCacheInVMs(vm0, vm1, vm2, vm3);\n vm0.invoke(helper.getCacheSerializableRunnableForPRAccessorCreate(regionName, redundancy,\n Portfolio.class));\n\n vm1.invoke(\n helper.getCacheSerializableRunnableForPRCreate(regionName, redundancy, Portfolio.class));\n\n vm2.invoke(\n helper.getCacheSerializableRunnableForPRCreate(regionName, redundancy, Portfolio.class));\n\n vm3.invoke(\n helper.getCacheSerializableRunnableForPRCreate(regionName, redundancy, Portfolio.class));\n\n vm0.invoke(helper.getCacheSerializableRunnableForPRIndexCreate(regionName, indexName,\n indexedExpression, fromClause, alias));\n\n\n AsyncInvocation<?>[] asyncInvs = new AsyncInvocation[12];\n\n asyncInvs[0] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[1] = vm1.invokeAsync(\n helper.getCacheSerializableRunnableForPRRandomOps(regionName, stepSize, (2 * stepSize)));\n\n asyncInvs[2] = vm2.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (2 * stepSize), (3 * stepSize)));\n\n asyncInvs[3] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (3 * (stepSize)), totalDataSize));\n\n asyncInvs[4] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[5] = vm1.invokeAsync(\n helper.getCacheSerializableRunnableForPRRandomOps(regionName, stepSize, (2 * stepSize)));\n\n asyncInvs[6] = vm2.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (2 * stepSize), (3 * stepSize)));\n\n asyncInvs[7] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (3 * (stepSize)), totalDataSize));\n\n asyncInvs[8] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[9] = vm1.invokeAsync(\n helper.getCacheSerializableRunnableForPRRandomOps(regionName, stepSize, (2 * stepSize)));\n\n asyncInvs[10] = vm2.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (2 * stepSize), (3 * stepSize)));\n\n asyncInvs[11] = vm3.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName,\n (3 * (stepSize)), totalDataSize));\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n ThreadUtils.join(inv, 60 * 000);\n }\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n if (inv.exceptionOccurred()) {\n Assert.fail(\"Random region operation failed on VM_\" + inv.getId(), inv.getException());\n }\n }\n vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n vm1.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n vm2.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n vm3.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n }", "@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}", "@Override\r\n public void extractIndexBetween(List<HistoricalIndexElement> index, long start, long end) {\n historicalBuffersLock.lock();\r\n try {\r\n for (Block block : historicalBlocks) {\r\n HistoricalIndexElement[] elements = block.index.toSortedElements();\r\n for (HistoricalIndexElement historicalIndexElement : elements) {\r\n long time = historicalIndexElement.getTime();\r\n if (time >= start && time < end) {\r\n index.add(historicalIndexElement);\r\n }\r\n }\r\n }\r\n } finally {\r\n historicalBuffersLock.unlock();\r\n }\r\n\r\n if (currentBlock != null) {\r\n // Now the current block\r\n HistoricalIndexElement[] elements = currentBlock.index.toSortedElements();\r\n for (HistoricalIndexElement historicalIndexElement : elements) {\r\n long time = historicalIndexElement.getTime();\r\n if (time >= start && time < end) {\r\n index.add(historicalIndexElement);\r\n }\r\n }\r\n }\r\n\r\n }", "public void testSeekLocationNotOnCacheBoundary() throws Exception {\n \tTmfContext tmpContext = fTrace.seekEvent(new TmfTimestamp(10, SCALE, 0));\n TmfContext context = fTrace.seekLocation(tmpContext.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n TmfEvent event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 10, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 10, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n \t// Position trace at event rank 999\n tmpContext = fTrace.seekEvent(new TmfTimestamp(1000, SCALE, 0));\n context = fTrace.seekLocation(tmpContext.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \t\n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 1000, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \t\n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 1000, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n \t// Position trace at event rank 1001\n tmpContext = fTrace.seekEvent(new TmfTimestamp(1002, SCALE, 0));\n context = fTrace.seekLocation(tmpContext.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \t\n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 1002, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \t\n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 1002, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n \t// Position trace at event rank 4500\n tmpContext = fTrace.seekEvent(new TmfTimestamp(4501, SCALE, 0));\n context = fTrace.seekLocation(tmpContext.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \t\n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 4501, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \t\n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 4501, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n }", "boolean hasPartitionLimit();", "private void advanceAndSchedule(IntList next, int threadId, int pointer, int inputIndex, Runtime runtime)\n {\n // avoid empty loop\n if (runtime.steps[pointer] == runtime.step) {\n // thread already exists at this point for the current input, so no need to schedule a new one\n runtime.killThread(threadId);\n return;\n }\n\n runtime.steps[pointer] = runtime.step;\n\n Instruction instruction = program.at(pointer);\n switch (instruction.type()) {\n case MATCH_START:\n if (inputIndex == 0 && runtime.matchingAtPartitionStart) {\n advanceAndSchedule(next, threadId, pointer + 1, inputIndex, runtime);\n }\n else {\n runtime.killThread(threadId);\n }\n break;\n case MATCH_END:\n if (inputIndex == runtime.inputLength) {\n advanceAndSchedule(next, threadId, pointer + 1, inputIndex, runtime);\n }\n else {\n runtime.killThread(threadId);\n }\n break;\n case JUMP:\n advanceAndSchedule(next, threadId, ((Jump) instruction).getTarget(), inputIndex, runtime);\n break;\n case SPLIT:\n int forked = runtime.forkThread(threadId);\n advanceAndSchedule(next, threadId, ((Split) instruction).getFirst(), inputIndex, runtime);\n advanceAndSchedule(next, forked, ((Split) instruction).getSecond(), inputIndex, runtime);\n break;\n case SAVE:\n runtime.captures.save(threadId, inputIndex);\n advanceAndSchedule(next, threadId, pointer + 1, inputIndex, runtime);\n break;\n default:\n runtime.threads[threadId] = pointer;\n next.add(threadId);\n break;\n }\n }", "@Test\n public void testPartialCheckpointNewIndexRows() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 100_000, false);\n\n String idxName = \"IDX0\";\n SlowdownBuildIndexConsumer slowdownIdxCreateConsumer = addSlowdownIdxCreateConsumer(n, idxName, 10);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n slowdownIdxCreateConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n String reason = getTestIgniteInstanceName();\n IgniteInternalFuture<Void> awaitBeforeCpBeginFut = awaitBeforeCheckpointBeginAsync(n, reason);\n IgniteInternalFuture<Void> disableCpFut = enableCheckpointsAsync(n, reason, false);\n\n awaitBeforeCpBeginFut.get(getTestTimeout());\n slowdownIdxCreateConsumer.finishBuildIdxFut.onDone();\n\n disableCpFut.get(getTestTimeout());\n slowdownIdxCreateConsumer.sleepTime.set(0);\n\n createIdxFut.get(getTestTimeout());\n\n checkCompletedStatus(n, cacheName);\n\n stopGrid(0);\n\n IndexesRebuildTaskEx.prepareBeforeNodeStart();\n StopBuildIndexConsumer stopRebuildIdxConsumer = addStopRebuildIndexConsumer(n, cacheName);\n\n n = startGrid(0);\n stopRebuildIdxConsumer.startBuildIdxFut.get(getTestTimeout());\n\n IgniteInternalFuture<?> rebIdxFut = indexRebuildFuture(n, CU.cacheId(cacheName));\n assertNotNull(rebIdxFut);\n\n checkInitStatus(n, cacheName, true, 0);\n assertTrue(allIndexes(n).containsKey(new QueryIndexKey(cacheName, idxName)));\n\n stopRebuildIdxConsumer.finishBuildIdxFut.onDone();\n rebIdxFut.get(getTestTimeout());\n\n forceCheckpoint();\n\n checkNoStatus(n, cacheName);\n assertEquals(100_000, selectPersonByName(n.cache(cacheName)).size());\n }", "public void Inverse_macroblock_partition_scanning_process(){\n\t\tx=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,0);\n\t\ty=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,1);\n\n\t}", "public void testSeekLocationOnCacheBoundary() throws Exception {\n \n \t// Position trace at event rank 0\n \tTmfContext context = fTrace.seekLocation(null);\n TmfEvent event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 1, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", 0, context.getRank());\n \n context = fTrace.seekLocation(context.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 1, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 1, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n \t// Position trace at event rank 1000\n TmfContext tmpContext = fTrace.seekEvent(new TmfTimestamp(1001, SCALE, 0));\n context = fTrace.seekLocation(tmpContext.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 1001, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 1001, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n \t// Position trace at event rank 4000\n tmpContext = fTrace.seekEvent(new TmfTimestamp(4001, SCALE, 0));\n context = fTrace.seekLocation(tmpContext.getLocation());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.parseEvent(context);\n assertEquals(\"Event timestamp\", 4001, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n \n event = fTrace.getNextEvent(context);\n assertEquals(\"Event timestamp\", 4001, event.getTimestamp().getValue());\n assertEquals(\"Event rank\", ITmfContext.UNKNOWN_RANK, context.getRank());\n }", "private void checkRequests()\n\t{\n\t\t// to be honest I don't see why this can't be 5 seconds, but I'm trying 1 second\n\t\t// now as the existing 0.1 second is crazy given we're checking for events that occur\n\t\t// at 60+ second intervals\n\n\t\tif ( mainloop_loop_count % MAINLOOP_ONE_SECOND_INTERVAL != 0 ){\n\n\t\t\treturn;\n\t\t}\n\n\t\tfinal long now =SystemTime.getCurrentTime();\n\n\t\t//for every connection\n\t\tfinal ArrayList peer_transports = peer_transports_cow;\n\t\tfor (int i =peer_transports.size() -1; i >=0 ; i--)\n\t\t{\n\t\t\tfinal PEPeerTransport pc =(PEPeerTransport)peer_transports.get(i);\n\t\t\tif (pc.getPeerState() ==PEPeer.TRANSFERING)\n\t\t\t{\n\t\t\t\tfinal List expired = pc.getExpiredRequests();\n\t\t\t\tif (expired !=null &&expired.size() >0)\n\t\t\t\t{ // now we know there's a request that's > 60 seconds old\n\t\t\t\t\tfinal boolean isSeed =pc.isSeed();\n\t\t\t\t\t// snub peers that haven't sent any good data for a minute\n\t\t\t\t\tfinal long timeSinceGoodData =pc.getTimeSinceGoodDataReceived();\n\t\t\t\t\tif (timeSinceGoodData <0 ||timeSinceGoodData >60 *1000)\n\t\t\t\t\t\tpc.setSnubbed(true);\n\n\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\tDiskManagerReadRequest request =(DiskManagerReadRequest) expired.get(0);\n\n\t\t\t\t\tfinal long timeSinceData =pc.getTimeSinceLastDataMessageReceived();\n\t\t\t\t\tfinal boolean noData =(timeSinceData <0) ||timeSinceData >(1000 *(isSeed ?120 :60));\n\t\t\t\t\tfinal long timeSinceOldestRequest = now - request.getTimeCreated(now);\n\n\n\t\t\t\t\t//for every expired request \n\t\t\t\t\tfor (int j = (timeSinceOldestRequest >120 *1000 && noData) ? 0 : 1; j < expired.size(); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//get the request object\n\t\t\t\t\t\trequest =(DiskManagerReadRequest) expired.get(j);\n\t\t\t\t\t\t//Only cancel first request if more than 2 mins have passed\n\t\t\t\t\t\tpc.sendCancel(request);\t\t\t\t//cancel the request object\n\t\t\t\t\t\t//get the piece number\n\t\t\t\t\t\tfinal int pieceNumber = request.getPieceNumber();\n\t\t\t\t\t\tPEPiece\tpe_piece = pePieces[pieceNumber];\n\t\t\t\t\t\t//unmark the request on the block\n\t\t\t\t\t\tif ( pe_piece != null )\n\t\t\t\t\t\t\tpe_piece.clearRequested(request.getOffset() /DiskManager.BLOCK_SIZE);\n\t\t\t\t\t\t// remove piece if empty so peers can choose something else, except in end game\n\t\t\t\t\t\tif (!piecePicker.isInEndGameMode())\n\t\t\t\t\t\t\tcheckEmptyPiece(pieceNumber);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "private void diffusionPhase() {\n if (prevMaxTimestamp == -1 || currMaxTimestamp == -1 || prevMaxTimestamp == currMaxTimestamp) {\n return;\n }\n final Set<NodeAddress> fathers = ((GroupedOverlayModule<?>) mainOverlay).getNodeGroup(GroupedOverlayModule.fathersGroupName);\n final PrimeNodeReport alreadyRequested = new PrimeNodeReport();\n for (final NodeAddress father : fathers) {\n if (!inboxHistory.keySet().contains(father)) {\n continue;\n }\n if (client.player.getVs() == null\n || inboxHistory.get(father).getLatestTimestamp() > client.player.getVs()\n .getAvailableDescriptions(client.player.getVs().windowOffset).getLatestTimestamp()) {\n final PrimeNodeReport availableDescriptionsAtFather = inboxHistory.get(father);\n PrimeNodeReport requestToSend = (client.player.getVs() == null) ? availableDescriptionsAtFather : (client.player.getVs()\n .getAvailableDescriptions(prevMaxTimestamp)).getDelta(availableDescriptionsAtFather);\n requestToSend = alreadyRequested.getDelta(requestToSend);\n if (requestToSend.size() == 0) {\n continue;\n }\n requestToSend = requestToSend.getRandomSubset(prevMaxTimestamp, currMaxTimestamp, r);\n if (requestToSend.size() != 0) {\n if (client.player.getVs() != null) {\n requestToSend.playTime = client.player.getVs().windowOffset;\n }\n alreadyRequested.update(requestToSend);\n network.send(new PrimeRequestMessage<PrimeNodeReport>(getMessageTag(), network.getAddress(), father, new PrimeNodeReport(\n requestToSend)));\n }\n }\n }\n }", "public Map<String, ExecutionContext> partition(int gridSize) {\n\n\t\tMap<String, ExecutionContext> partitionMap = new HashMap<String, ExecutionContext>();\n\n\t\tString partitionerQuery =this.getPrimaryKeyQuery();\n\t\t\n\t\tResultSetExtractor<List<Object>> resultSetExtractor = new ResultSetExtractor<List<Object>>() {\n\n\t\t\t@Override\n\t\t\tpublic List<Object> extractData(ResultSet rs)\n\t\t\t\t\tthrows SQLException, DataAccessException {\n\t\t\t\tList<Object> listOfIds = new ArrayList<Object>();\n\t\t\t\twhile(rs.next()){\n\n\t\t\t\t\tlistOfIds.add(rs.getObject(1));\n\t\t\t\t}\n\t\t\t\treturn listOfIds;\n\t\t\t}\n\t\t};\n\t\t\n\t\tList<Object> keys = query(partitionerQuery, resultSetExtractor);\n\n\t\tint recordsToProcess = keys.size();\n\t\tlogger.info(\"-------------------- Total records to process: \" + recordsToProcess);\n\n\t\tint partitionSize = (int) (Math.ceil((float) recordsToProcess / (float) gridSize));\n\n\t\tif (partitionSize < skipGridSizeForRecordsLessThenCount) {\n\t\t\tpartitionSize = skipGridSizeForRecordsLessThenCount;\n\t\t}\n\n\t\tlogger.info(\"--------------------- Total records per Partition: \" + partitionSize);\n\n\t\tint startKey = 0;\n\t\tint endKey = startKey + partitionSize - 1;\n\t\tint partitionId = 1;\n\n\t\twhile (startKey < recordsToProcess) {\n\t\t\tif (endKey > recordsToProcess - 1) {\n\t\t\t\tendKey = recordsToProcess - 1;\n\t\t\t}\n\t\t\tExecutionContext context = new ExecutionContext();\n\n\t\t\tlogger.info(\"-------------------- Start index(\" + partitionId + \"): \" + keys.get(startKey));\n\t\t\tlogger.info(\"-------------------- End index(\" + partitionId + \"): \" + keys.get(endKey));\n\n\t\t\tpartitionMap.put(\"partition-\" + partitionId, context);\n\t\t\tcontext.put(\"startKey\", keys.get(startKey));\n\t\t\tcontext.put(\"endKey\", keys.get(endKey));\n\t\t\tcontext.put(\"partitionId\", partitionId);\n\t\t\tcontext.put(\"partitionSize\", partitionSize);\n\t\t\tcontext.put(\"totalRecords\", keys.size());\n\n\t\t\tstartKey += partitionSize;\n\t\t\tendKey += partitionSize;\n\t\t\tpartitionId++;\n\t\t}\n\n\t\tlogger.info(\"Total no. of Partitions: \" + partitionMap.size());\n\t\treturn partitionMap;\n\t}", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n Range range0 = Range.of(1002L, 2447L);\n range0.spliterator();\n List<Range> list0 = range0.split(1002L);\n assertFalse(list0.contains(range0));\n assertEquals(2, list0.size());\n }", "public void writeFileOffsets(Map<SystemStreamPartition, String> lastProcessedOffsets) {\n storeToSSps.entrySet().stream()\n .filter(entry -> isPersistedStore(entry.getKey())) // filter out in-memory side input stores\n .forEach((entry) -> {\n String storeName = entry.getKey();\n Map<SystemStreamPartition, String> offsets = entry.getValue().stream()\n .filter(lastProcessedOffsets::containsKey)\n .collect(Collectors.toMap(Function.identity(), lastProcessedOffsets::get));\n\n try {\n File taskStoreDir = storageManagerUtil.getTaskStoreDir(storeBaseDir, storeName, taskName, taskMode);\n storageManagerUtil.writeOffsetFile(taskStoreDir, offsets, true);\n } catch (Exception e) {\n throw new SamzaException(\"Failed to write offset file for side input store: \" + storeName, e);\n }\n });\n }", "private static List<ArrivalRateTuple> readRequestTimeStamps(BufferedReader br, double offset) throws IOException {\r\n\t\tArrayList<ArrivalRateTuple> timeStamps = new ArrayList<ArrivalRateTuple>();\r\n\t\tString line = br.readLine();\r\n\t\twhile (line != null) {\r\n\t\t\tline = line.trim();\r\n\t\t\tif (!line.isEmpty()) {\r\n\t\t\t\tdouble ts;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tts = Double.parseDouble(line);\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tts = (Double.parseDouble(line.substring(0, line.length() - 1)));\r\n\t\t\t\t}\r\n\t\t\t\ttimeStamps.add(new ArrivalRateTuple(ts - offset, -1.0));\r\n\t\t\t}\r\n\t\t\tline = br.readLine();\r\n\t\t}\r\n\t\treturn timeStamps;\r\n\t}", "@Override\n public SplitResult<ByteKeyRange> trySplit(double fractionOfRemainder) {\n if (NO_KEYS.equals(range)\n || (!range.getEndKey().isEmpty() && range.getStartKey().equals(range.getEndKey()))) {\n return null;\n }\n // There is no more remaining work after the entire range has been claimed.\n if (lastAttemptedKey != null && lastAttemptedKey.isEmpty()) {\n return null;\n }\n\n ByteKey unprocessedRangeStartKey =\n (lastAttemptedKey == null) ? range.getStartKey() : next(lastAttemptedKey);\n ByteKey endKey = range.getEndKey();\n // There is no more space for split.\n if (!endKey.isEmpty() && unprocessedRangeStartKey.compareTo(endKey) >= 0) {\n return null;\n }\n\n // Treat checkpoint specially because {@link ByteKeyRange#interpolateKey} computes a key with\n // trailing zeros when fraction is 0.\n if (fractionOfRemainder == 0.0) {\n // If we haven't done any work, we should return the original range we were processing\n // as the checkpoint.\n if (lastAttemptedKey == null) {\n // We update our current range to an interval that contains no elements.\n ByteKeyRange rval = range;\n range =\n range.getStartKey().isEmpty()\n ? NO_KEYS\n : ByteKeyRange.of(range.getStartKey(), range.getStartKey());\n return SplitResult.of(range, rval);\n } else {\n range = ByteKeyRange.of(range.getStartKey(), unprocessedRangeStartKey);\n return SplitResult.of(range, ByteKeyRange.of(unprocessedRangeStartKey, endKey));\n }\n }\n\n ByteKeyRange unprocessedRange = ByteKeyRange.of(unprocessedRangeStartKey, range.getEndKey());\n ByteKey splitPos;\n try {\n // The interpolateKey shouldn't return empty key. Please refer to {@link\n // ByteKeyRange#interpolateKey}.\n splitPos = unprocessedRange.interpolateKey(fractionOfRemainder);\n checkState(!splitPos.isEmpty());\n } catch (Exception e) {\n // There is no way to interpolate a key based on provided fraction.\n return null;\n }\n // Computed splitPos is out of current tracking restriction.\n if (!range.getEndKey().isEmpty() && splitPos.compareTo(range.getEndKey()) >= 0) {\n return null;\n }\n\n range = ByteKeyRange.of(range.getStartKey(), splitPos);\n return SplitResult.of(range, ByteKeyRange.of(splitPos, endKey));\n }", "protected long getRemoteReadTime(long rowCount) throws ExecutionException{\n int fetchSampleSize=EngineDriver.driver().getConfiguration().getIndexFetchSampleSize();\n Timer remoteReadTimer = Metrics.newWallTimer();\n DataScan scan = SIDriver.driver().getOperationFactory().newDataScan(txn);\n scan.startKey(SIConstants.EMPTY_BYTE_ARRAY).stopKey(SIConstants.EMPTY_BYTE_ARRAY);\n int n =2;\n long totalOpenTime = 0;\n long totalCloseTime = 0;\n int iterations = 0;\n try(Partition table = SIDriver.driver().getTableFactory().getTable(Long.toString(tableConglomerateId))){\n while(n<fetchSampleSize){\n scan.batchCells(n).cacheRows(n);\n long openTime=System.nanoTime();\n long closeTime;\n try(DataResultScanner scanner=table.openResultScanner(scan)){\n totalOpenTime+=(System.nanoTime()-openTime);\n int pos=0;\n remoteReadTimer.startTiming();\n DataResult result;\n while(pos<n && (result=scanner.next())!=null){\n pos++;\n }\n remoteReadTimer.tick(pos);\n closeTime=System.nanoTime();\n }\n totalCloseTime+=(System.nanoTime()-closeTime);\n iterations++;\n n<<=1;\n }\n\n }catch(IOException e){\n throw new ExecutionException(e);\n }\n //stash the scanner open and scanner close times\n openScannerTimeMicros=totalOpenTime/(1000*iterations);\n closeScannerTimeMicros=totalCloseTime/(1000*iterations);\n double latency=((double)remoteReadTimer.getTime().getWallClockTime())/remoteReadTimer.getNumEvents();\n return Math.round(latency*rowCount);\n }", "private void initializeSlotMapForQueue() throws AndesException, ConnectionException {\n int databaseReadsCounter = 0;\n int restoreMessagesCounter = 0;\n long messageCountOfQueue = messageStore.getMessageCountForQueue(queueName);\n\n LongArrayList messageIdList = messageStore.getNextNMessageIdsFromQueue(queueName, 0, slotSize);\n int numberOfMessages = messageIdList.size();\n\n databaseReadsCounter++;\n restoreMessagesCounter = restoreMessagesCounter + messageIdList.size();\n\n long lastMessageID;\n long firstMessageID;\n long lastStatPublishTime = System.currentTimeMillis();\n\n while (numberOfMessages > 0) {\n int lastMessageArrayIndex = numberOfMessages - 1;\n lastMessageID = messageIdList.get(lastMessageArrayIndex);\n firstMessageID = messageIdList.get(0);\n\n if (log.isDebugEnabled()) {\n log.debug(\"Created a slot with \" + messageIdList.size() + \" messages for queue (\" + queueName + \")\");\n }\n\n if (AndesContext.getInstance().isClusteringEnabled()) {\n SlotManagerClusterMode.getInstance().updateMessageID(queueName,\n AndesContext.getInstance().getClusterAgent().getLocalNodeIdentifier(), firstMessageID,\n lastMessageID, lastMessageID);\n } else {\n SlotManagerStandalone.getInstance().updateMessageID(queueName, lastMessageID);\n }\n\n long currentTimeInMillis = System.currentTimeMillis();\n if (currentTimeInMillis - lastStatPublishTime > STAT_PUBLISHING_INTERVAL) {\n // messageCountOfQueue is multiplied by 1.0 to convert it to double\n double recoveredPercentage = (restoreMessagesCounter / (messageCountOfQueue * 1.0)) * 100.0;\n log.info(restoreMessagesCounter + \"/\" + messageCountOfQueue + \" (\" + Math.round(recoveredPercentage)\n + \"%) messages recovered for queue \\\"\" + queueName + \"\\\"\");\n lastStatPublishTime = currentTimeInMillis;\n }\n\n // We need to increment lastMessageID since the getNextNMessageMetadataFromQueue returns message list\n // including the given starting ID.\n messageIdList = messageStore.getNextNMessageIdsFromQueue(queueName, lastMessageID + 1, slotSize);\n numberOfMessages = messageIdList.size();\n //increase value of counters\n databaseReadsCounter++;\n restoreMessagesCounter = restoreMessagesCounter + messageIdList.size();\n }\n\n log.info(\"Recovered \" + restoreMessagesCounter + \" messages for queue \\\"\" + queueName + \"\\\" using \"\n + databaseReadsCounter + \" database calls\");\n }", "private void fillTimeEntry(int offset, int length)\n throws RedmineException\n {\n getData(\"/time_entries\",\"time_entry\",offset,length,new ParseElementHandler<TimeEntry>()\n {\n public void data(Element element)\n {\n//Dprintf.dprintf(\"element=%s projectId=%d issueId=%d userId=%d spentOn=%s\",element,getIntAttribute(element,\"project\",\"id\"),getIntAttribute(element,\"issue\",\"id\"),getIntAttribute(element,\"user\",\"id\"),getDateValue(element,\"spent_on\"),getDoubleValue(element,\"hours\"));\n TimeEntry timeEntry = new TimeEntry(getIntValue(element,\"id\"),\n getIntAttribute(element,\"project\",\"id\"),\n getIntAttribute(element,\"issue\",\"id\"),\n getIntAttribute(element,\"user\",\"id\"),\n getIntAttribute(element,\"activity\",\"id\"),\n getDoubleValue(element,\"hours\"),\n getValue(element,\"comments\"),\n getDateValue(element,\"spent_on\"),\n getDateValue(element,\"created_on\"),\n getDateValue(element,\"updated_on\")\n );\n store(timeEntry);\n }\n public void store(int index, TimeEntry timeEntry)\n {\n//Dprintf.dprintf(\"index=%d id=%d: %s\",index,timeEntry.id,timeEntry);\n timeEntryIdMap.put(timeEntry.id,index);\n if (!timeEntrySpentOnMap.containsKey(timeEntry.spentOn)) timeEntrySpentOnMap.put(timeEntry.spentOn,index);\n timeEntries.set(index,new SoftReference<TimeEntry>(timeEntry));\n }\n },\n \"sort:desc=spent_on\");\n }", "@Test\n public void testMultiLevelPartitionPruning() throws SqlParseException {\n\n val project = \"multi_level_partition\";\n val dfId = \"747f864b-9721-4b97-acde-0aa8e8656cba\";\n val expectedRanges = Lists.<Pair<String, String>> newArrayList();\n val segmentRange1 = Pair.newPair(\"2012-01-01\", \"2012-01-02\");\n val segment1Uuid = \"8892fa3f-f607-4eec-8159-7c5ae2f16942\";\n val segmentRange2 = Pair.newPair(\"2012-01-02\", \"2012-01-03\");\n val segment2Uuid = \"d75a822c-788a-4592-a500-cf20186dded1\";\n val segmentRange3 = Pair.newPair(\"2012-01-03\", \"2012-01-04\");\n val segment3Uuid = \"54eaf96d-6146-45d2-b94e-d5d187f89919\";\n val segmentRange4 = Pair.newPair(\"2012-01-04\", \"2012-01-05\");\n val segment4Uuid = \"411f40b9-a80a-4453-90a9-409aac6f7632\";\n val segmentRange5 = Pair.newPair(\"2012-01-05\", \"2012-01-06\");\n val segment5Uuid = \"a8318597-cb75-416f-8eb8-96ea285dd2b4\";\n val expectedPartitionMap = Maps.<String, List<Long>> newHashMap();\n\n val sqlBase = \"select cal_dt, sum(price) from test_kylin_fact inner join test_account on test_kylin_fact.seller_id = test_account.account_id \";\n\n // no filter\n val noFilterSql = sqlBase + \"group by cal_dt\";\n expectedRanges.add(segmentRange1);\n expectedRanges.add(segmentRange2);\n expectedRanges.add(segmentRange3);\n expectedRanges.add(segmentRange4);\n expectedRanges.add(segmentRange5);\n expectedPartitionMap.put(segment1Uuid, Lists.newArrayList(0L, 1L, 2L, 3L));\n expectedPartitionMap.put(segment2Uuid, Lists.newArrayList(0L, 1L, 2L));\n expectedPartitionMap.put(segment3Uuid, Lists.newArrayList(1L, 2L, 3L));\n expectedPartitionMap.put(segment4Uuid, Lists.newArrayList(0L, 1L));\n expectedPartitionMap.put(segment5Uuid, Lists.newArrayList(2L, 3L));\n assertPrunedSegmentsRange(project, noFilterSql, dfId, expectedRanges, 1L, expectedPartitionMap);\n\n val andSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-04' and lstg_site_id = 1 group by cal_dt\";\n val andMappingSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-04' and lstg_format_name = 'FP-non GTC' group by cal_dt\";\n val andMixSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-04' and lstg_site_id = 1 and lstg_format_name = 'FP-non GTC' group by cal_dt\";\n expectedRanges.clear();\n expectedRanges.add(segmentRange1);\n expectedRanges.add(segmentRange2);\n expectedRanges.add(segmentRange3);\n expectedPartitionMap.clear();\n expectedPartitionMap.put(segment1Uuid, Lists.newArrayList(1L));\n expectedPartitionMap.put(segment2Uuid, Lists.newArrayList(1L));\n expectedPartitionMap.put(segment3Uuid, Lists.newArrayList(1L));\n assertPrunedSegmentsRange(project, andSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, andMappingSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, andMixSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n\n val notInSql0 = sqlBase\n + \"where cal_dt > '2012-01-02' and cal_dt < '2012-01-04' and lstg_site_id not in (0, 2, 3) group by cal_dt\";\n val notInMappingSql0 = sqlBase\n + \"where cal_dt > '2012-01-02' and cal_dt < '2012-01-04' and lstg_format_name not in ('FP-GTC', 'ABIN', 'Auction') group by cal_dt\";\n val notInMixSql0 = sqlBase\n + \"where cal_dt > '2012-01-02' and cal_dt < '2012-01-04' and lstg_site_id not in (0, 2, 3) and lstg_format_name not in ('FP-GTC', 'ABIN', 'Auction') group by cal_dt\";\n expectedRanges.clear();\n expectedRanges.add(segmentRange2);\n expectedRanges.add(segmentRange3);\n expectedPartitionMap.clear();\n expectedPartitionMap.put(segment2Uuid, Lists.newArrayList(1L));\n expectedPartitionMap.put(segment3Uuid, Lists.newArrayList(1L));\n assertPrunedSegmentsRange(project, notInSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, notInMappingSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, notInMixSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n\n // return empty data case\n val emptyData = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_site_id = 5 group by cal_dt\";\n val emptyDataMapping = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_format_name = 'not_exist_name' group by cal_dt\";\n val emptyDataMix = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_site_id = 5 and lstg_format_name = 'not_exist_name' group by cal_dt\";\n expectedRanges.clear();\n expectedPartitionMap.clear();\n assertPrunedSegmentsRange(project, emptyData, dfId, expectedRanges, -1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, emptyDataMapping, dfId, expectedRanges, -1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, emptyDataMix, dfId, expectedRanges, -1L, expectedPartitionMap);\n\n // query data out of current built segments range\n val inSql0 = sqlBase\n + \"where cal_dt > '2011-12-30' and cal_dt < '2012-01-03' and lstg_site_id in (1, 2) group by cal_dt\";\n val inMappingSql0 = sqlBase\n + \"where cal_dt > '2011-12-30' and cal_dt < '2012-01-03' and lstg_format_name in ('FP-non GTC', 'ABIN') group by cal_dt\";\n val inMixSql0 = sqlBase\n + \"where cal_dt > '2011-12-30' and cal_dt < '2012-01-03' and lstg_site_id in (1, 2) and lstg_format_name in ('FP-non GTC', 'ABIN') group by cal_dt\";\n expectedRanges.add(segmentRange1);\n expectedRanges.add(segmentRange2);\n expectedPartitionMap.put(segment1Uuid, Lists.newArrayList(1L, 2L));\n expectedPartitionMap.put(segment2Uuid, Lists.newArrayList(1L, 2L));\n assertPrunedSegmentsRange(project, inSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, inMappingSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n assertPrunedSegmentsRange(project, inMixSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n\n val pushDownSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_site_id = 3 group by cal_dt\";\n assertNoRealizationFound(project, pushDownSql0);\n\n val pushDownMappingSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_format_name = 'Auction' group by cal_dt\";\n assertNoRealizationFound(project, pushDownMappingSql0);\n\n val pushDownMixSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-03' and lstg_site_id = 3 and lstg_format_name = 'Auction' group by cal_dt\";\n assertNoRealizationFound(project, pushDownMixSql0);\n\n // return empty result\n val wrongMapping0 = sqlBase\n + \"where cal_dt between '2012-01-01' and '2012-01-02' and lstg_site_id = 0 and lstg_format_name = 'FP-non GTC' group by cal_dt\";\n assertPrunedSegmentsRange(project, wrongMapping0, dfId, null, -1L, null);\n\n val orSql0 = sqlBase\n + \"where cal_dt > '2012-01-01' and cal_dt < '2012-01-02' and (lstg_site_id = 0 or lstg_format_name = 'FP-non GTC') group by cal_dt\";\n expectedRanges.clear();\n expectedPartitionMap.clear();\n expectedRanges.add(segmentRange1);\n expectedPartitionMap.put(segment1Uuid, Lists.newArrayList(0L, 1L));\n assertPrunedSegmentsRange(project, orSql0, dfId, expectedRanges, 1L, expectedPartitionMap);\n }", "private int indexUntilCheckpointCount() {\n int total = 0;\n for (int i = 0; i < MAX_CHECKPOINTS_BEHIND; i++) {\n final int numDocs = randomIntBetween(1, 5);\n for (int j = 0; j < numDocs; ++j) {\n indexDoc();\n }\n total += numDocs;\n refresh(INDEX_NAME);\n }\n return total;\n }", "@Override\n abstract public int peekIndex (ThreadInfo ti);", "long getTimeUntilNextSet(Coordinates coord, double horizon, long time) throws AstrometryException;", "@Override\n public long getTimeBucket(long time)\n {\n if (time < start) {\n return -1;\n }\n long diffFromStart = time - fixedStart;\n long key = diffFromStart / bucketSpanMillis;\n if (time >= end) {\n long diffInBuckets = (time - end) / bucketSpanMillis;\n long move = (diffInBuckets + 1) * bucketSpanMillis;\n start += move;\n end += move;\n // trigger purge when lower bound changes\n triggerPurge = (move > 0);\n if (triggerPurge) {\n lowestPurgeableTimeBucket = ((start - fixedStart) / bucketSpanMillis) - 2;\n }\n }\n return key;\n\n }", "@Override\n public void forEachRemaining(Consumer<? super InternalCacheEntry<K, V>> action) {\n long now = timeService.wallClockTime();\n\n while (spliterator.tryAdvance(consumer)) {\n InternalCacheEntry<K, V> currentEntry = current;\n if (currentEntry.canExpire() && currentEntry.isExpired(now) &&\n expirationManager.entryExpiredInMemoryFromIteration(currentEntry, now).join() == Boolean.TRUE) {\n continue;\n }\n action.accept(currentEntry);\n }\n }", "private int offerSlowPath(long mask, long pIndex, long producerLimit)\r\n/* 165: */ {\r\n/* 166:395 */ long cIndex = lvConsumerIndex();\r\n/* 167:396 */ long bufferCapacity = getCurrentBufferCapacity(mask);\r\n/* 168:398 */ if (cIndex + bufferCapacity > pIndex)\r\n/* 169: */ {\r\n/* 170:400 */ if (!casProducerLimit(producerLimit, cIndex + bufferCapacity)) {\r\n/* 171:403 */ return 1;\r\n/* 172: */ }\r\n/* 173:408 */ return 0;\r\n/* 174: */ }\r\n/* 175:412 */ if (availableInQueue(pIndex, cIndex) <= 0L) {\r\n/* 176:415 */ return 2;\r\n/* 177: */ }\r\n/* 178:418 */ if (casProducerIndex(pIndex, pIndex + 1L)) {\r\n/* 179:421 */ return 3;\r\n/* 180: */ }\r\n/* 181:426 */ return 1;\r\n/* 182: */ }", "@Test\n public void testScanRequestTimeout() throws IOException {\n final int NUM_ROWS_DESIRED = 100;\n final int SCAN_REQUEST_TIMEOUT_MS = 20;\n KuduTable table = createDefaultTable(client, testTableName);\n loadDefaultTable(client, testTableName, NUM_ROWS_DESIRED);\n KuduScanToken.KuduScanTokenBuilder builder =\n new KuduScanToken.KuduScanTokenBuilder(asyncClient, table);\n builder.scanRequestTimeout(SCAN_REQUEST_TIMEOUT_MS);\n List<KuduScanToken> tokens = builder.build();\n for (KuduScanToken token : tokens) {\n byte[] serialized = token.serialize();\n KuduScanner scanner = KuduScanToken.deserializeIntoScanner(serialized, client);\n assertEquals(SCAN_REQUEST_TIMEOUT_MS, scanner.getScanRequestTimeout());\n }\n }", "boolean hasCompletePartition();", "private void resize(long oldMask, E[] oldBuffer, long pIndex, E e)\r\n/* 389: */ {\r\n/* 390:680 */ int newBufferLength = getNextBufferSize(oldBuffer);\r\n/* 391:681 */ E[] newBuffer = CircularArrayOffsetCalculator.allocate(newBufferLength);\r\n/* 392: */ \r\n/* 393:683 */ this.producerBuffer = newBuffer;\r\n/* 394:684 */ int newMask = newBufferLength - 2 << 1;\r\n/* 395:685 */ this.producerMask = newMask;\r\n/* 396: */ \r\n/* 397:687 */ long offsetInOld = LinkedArrayQueueUtil.modifiedCalcElementOffset(pIndex, oldMask);\r\n/* 398:688 */ long offsetInNew = LinkedArrayQueueUtil.modifiedCalcElementOffset(pIndex, newMask);\r\n/* 399: */ \r\n/* 400:690 */ UnsafeRefArrayAccess.soElement(newBuffer, offsetInNew, e);\r\n/* 401:691 */ UnsafeRefArrayAccess.soElement(oldBuffer, nextArrayOffset(oldMask), newBuffer);\r\n/* 402: */ \r\n/* 403: */ \r\n/* 404:694 */ long cIndex = lvConsumerIndex();\r\n/* 405:695 */ long availableInQueue = availableInQueue(pIndex, cIndex);\r\n/* 406:696 */ RangeUtil.checkPositive(availableInQueue, \"availableInQueue\");\r\n/* 407: */ \r\n/* 408: */ \r\n/* 409: */ \r\n/* 410:700 */ soProducerLimit(pIndex + Math.min(newMask, availableInQueue));\r\n/* 411: */ \r\n/* 412: */ \r\n/* 413:703 */ soProducerIndex(pIndex + 2L);\r\n/* 414: */ \r\n/* 415: */ \r\n/* 416: */ \r\n/* 417: */ \r\n/* 418:708 */ UnsafeRefArrayAccess.soElement(oldBuffer, offsetInOld, JUMP);\r\n/* 419: */ }", "private void initReadBlockingTask(int size){ \n for (int i=0; i < size; i++){\n getReadTasks().offer(newReadBlockingTask(false));\n }\n }" ]
[ "0.6147972", "0.6043465", "0.56288934", "0.5369917", "0.5362013", "0.5354984", "0.52950406", "0.52340406", "0.52193624", "0.5130767", "0.5116505", "0.5079216", "0.50323635", "0.50115955", "0.49976948", "0.49921256", "0.48620024", "0.48611784", "0.48469898", "0.48414284", "0.48389757", "0.48275062", "0.48259142", "0.482391", "0.4818563", "0.48043713", "0.47836757", "0.47779226", "0.47660467", "0.4739555", "0.47319406", "0.47288448", "0.4727712", "0.46965453", "0.46962386", "0.4685472", "0.4682082", "0.4677111", "0.467457", "0.46649927", "0.465769", "0.46562842", "0.4649801", "0.46474215", "0.46471772", "0.46415886", "0.46397322", "0.4638448", "0.46328712", "0.46317378", "0.46253842", "0.46216103", "0.4621264", "0.46182722", "0.46182308", "0.4617543", "0.4615377", "0.46043086", "0.4603837", "0.45999256", "0.45959383", "0.45940277", "0.4586221", "0.4578762", "0.4576382", "0.4575951", "0.45616433", "0.45614642", "0.45605743", "0.45604092", "0.45582125", "0.45555565", "0.4535758", "0.4534411", "0.45300996", "0.45279723", "0.45272136", "0.4521756", "0.45087796", "0.45034695", "0.45002553", "0.45000166", "0.44981804", "0.44977513", "0.44935772", "0.44922638", "0.44848794", "0.44801608", "0.44785658", "0.44710255", "0.44710025", "0.44674176", "0.44633472", "0.44617587", "0.44528824", "0.44459456", "0.4440644", "0.44405407", "0.4435848", "0.44335613", "0.44311947" ]
0.0
-1
Check if the used brokers have version 0.10.1.x or higher. Note during an upgrade this check may pass or fail depending on which broker is the leader for the partition, i.e, if an old broker is the leader the check would fail. If a new broker is the leader it will pass. This is only a temporary situation and will naturally rectify itself.
void checkCompatibility() throws StreamsException { try { consumer.offsetsForTimes(Collections.singletonMap(topicPartition, 0L)); } catch (final UnsupportedVersionException e) { throw new KsqlException("The kafka brokers are incompatible with. " + "KSQL requires broker versions >= 0.10.1.x"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasOldVersionNumber() {\n return (getVersionNumber() < CURRENT_VERSION_NO);\n }", "public boolean upgrades(Version version) {\n return platform.map(version::compareTo).orElse(0) < 0;\n }", "@Override\n\tpublic boolean getCheckOlderVersion()\n\t{\n\t\treturn false;\n\t}", "public boolean upgrades(ApplicationVersion version) {\n return application.map(version::compareTo).orElse(0) < 0;\n }", "public boolean validateVersion(TradeModel tradeModel)\n {\n Integer version = tradeRepository.findMaxVersion(tradeModel.getTradeId());\n if (version == null)\n return true;\n else {\n if (tradeModel.getVersion() >= version)\n return true;\n else\n return false;\n }\n }", "public boolean downgrades(Version version) {\n return platform.map(version::compareTo).orElse(0) > 0;\n }", "@Override\n public void checkVersion() {\n }", "boolean hasRpcVersion();", "boolean hasRpcVersion();", "protected boolean upgradeCluster() throws Throwable {\n \n // need to ping hcdev from master before and after\n if (!pingFromMaster(hostname))\n return false;\n \n String minorVersion = null;\n String currentVersion = null;\n String s = null;\n Log.INFO(\"Getting Minor Version...\");\n runSystemCommand(MINOR_VERSION_COMMAND);\n while ((s = stdout.readLine()) != null) {\n minorVersion = s.trim();\n Log.INFO(s);\n }\n Log.INFO(\"Getting Major Version...\");\n runSystemCommand(\n PRE_VERSION_COMMAND + minorVersion + POST_VERSION_COMMAND);\n while ((s = stdout.readLine()) != null) {\n currentVersion = s.trim();\n Log.INFO(\"Current Version: \" + currentVersion);\n }\n String url =\n \"http://\" + UPGRADE_DOMAIN + \"/~hcbuild/repository/releases/1.1/\"\n + currentVersion + \"/AUTOBUILT/pkgdir/st5800_\"\n + currentVersion + \".iso\";\n Log.INFO(\"Validating URL...\");\n runSystemCommand(\"wget -O - -q \" + url + \" 2>&1 >> /dev/null\");\n while ((s = stdout.readLine()) != null)\n Log.INFO(s);\n\n if (currentVersion != null) {\n stdout = cli.runCommand(\n \t\t\"upgrade -c \" + masterCell + \" -F download \" + url);\n String line;\n while ((line = stdout.readLine()) != null) {\n if (line.contains(\"bytes successfully\")) {\n Log.INFO(\" ---> \" + line);\n return pingFromMaster(hostname);\n }\n }\n Log.ERROR(\"Problem with upgrade detected... failing test\");\n }\n return false;\n }", "private void checkHighVersion2() throws Exception {\n\t\tBigDecimal version = editData.getVersion();\r\n\t\tString versionGroup = editData.getVersionGroup();\r\n\t\t//String oql = \"where version = '\".concat(version.toString()).concat(\"' and versionGroup = '\").concat(versionGroup).concat(\"'\");\r\n\t\tString oql = \"where version > \".concat(version.toString()).concat(\" and versionGroup = '\").concat(versionGroup).concat(\"'\");\r\n\t\t/* modified by zhaoqin for R140507-0295 on 2014/05/14 end */\r\n\t\t\r\n\t\tif (getBizInterface().exists(oql)) {\r\n\t\t\tthrow new EASBizException(new NumericExceptionSubItem(\"1\", \"存在更高版本不能进行此操作\"));\r\n\t\t}\r\n\t}", "@Override\n public boolean shouldProceedToUpgrade(String newVersion, String previousVersion) {\n return VersionComparator.isAfter(newVersion, previousVersion);\n }", "private void checkUpdateAvailability() {\n\t\t\n\t\t// Grab the data from the device and manifest\n\t\tString currentVersion = Utils.getProp(\"ro.ota.version\");\n\t\tcurrentVersion = currentVersion.replaceAll(\"[^0-9]\", \"\"); // Strip anyhting not a number\n\t\tString manifestVer = results.getVersion();\n\t\tmanifestVer = manifestVer.replaceAll(\"[^0-9]\", \"\");\n\n\t\t// Parse ints\n\t\tint manifestNumber = Integer.parseInt(manifestVer);\n\t\tint currentNumber = Integer.parseInt(currentVersion);\n\t\t\n\t\t// Pad out to be at least 5 digits long\n\t\t// That way, 1.2 shows bigger than 1.1.1\n\t\t// Because 12000 > 11100\n\t\t// Without this it would show 12 > 111\n\t\tif(manifestVer.length() <= 2){\n\t\t\tmanifestNumber *= 1000;\n\t\t} else if(manifestVer.length() <= 3) {\n\t\t\tmanifestNumber *= 100;\n\t\t} else if(manifestVer.length() <= 4) {\n\t\t\tmanifestNumber *= 10;\n\t\t}\n\t\t\n\t\t// Same again\n\t\tif(currentVersion.length() <= 2){\n\t\t\tcurrentNumber *= 1000;\n\t\t} else if(currentVersion.length() <= 3) {\n\t\t\tcurrentNumber *= 100;\n\t\t} else if(currentVersion.length() <= 4) {\n\t\t\tcurrentNumber *= 10;\n\t\t}\n\t\t\n\t\t// Set pref\n\t\tPreferences.setUpdateAvailable(mContext, manifestNumber > currentNumber);\n\t}", "public boolean newer(KernelVersion kv)\n {\n if (version > kv.version)\n return true;\n else if (version < kv.version)\n return false;\n if (patchLevel > kv.patchLevel)\n return true;\n else if (patchLevel < kv.patchLevel)\n return false;\n if (subLevel > kv.subLevel)\n return true;\n else if (subLevel < kv.subLevel)\n return false;\n if (isFedora && kv.isFedora)\n {\n\tif (fedoraRelease > kv.fedoraRelease)\n\t return true;\n\telse\n\t return false;\n }\n else if (isVanilla && kv.isVanilla)\n {\n\treturn extraLevel > kv.extraLevel;\n }\n else\n {\n\t// Can't tell\n\treturn false;\n }\n }", "private boolean requiresUpgrade(TableInfo tableInfo) {\n if (tableInfo.isBackedByDataset()) {\n String cdapVersion = tableInfo.getParameters().get(Constants.Explore.CDAP_VERSION);\n // for now, good enough to check if it contains the version or not.\n // In the future we can actually do version comparison with ProjectInfo.Version\n return cdapVersion == null;\n }\n return false;\n }", "boolean hasCurrentVersion();", "public void checkVersion() throws Exception {\n Version loadedVersion = getConfStoreVersion();\n LOG.info(\"Loaded configuration store version info \" + loadedVersion);\n if (loadedVersion != null && loadedVersion.equals(getCurrentVersion())) {\n return;\n }\n // if there is no version info, treat it as CURRENT_VERSION_INFO;\n if (loadedVersion == null) {\n loadedVersion = getCurrentVersion();\n }\n if (loadedVersion.isCompatibleTo(getCurrentVersion())) {\n LOG.info(\"Storing configuration store version info \"\n + getCurrentVersion());\n storeVersion();\n } else {\n throw new RMStateVersionIncompatibleException(\n \"Expecting configuration store version \" + getCurrentVersion()\n + \", but loading version \" + loadedVersion);\n }\n }", "public boolean isNewerVersionAvailable() {\n\t\tString url = \"https://raw.githubusercontent.com/kleekru/RoboTarPC/master/currentversion\";\n\t\tLOG.info(\"checking for new version at address: {}\", url);\n\t\tthis.remoteVersion = getRemoteVersion(url);\n\t\treturn isNewerVersion(remoteVersion);\n\t}", "private boolean isBadVersion(int version) {\n return false;\n }", "private boolean checkBrokers ()\n {\n if (game.getAgentMap().size() < 1) {\n log.info(String.format(\"Game: %s (round %s) reports no brokers \"\n + \"registered\",\n game.getGameId(), game.getRound().getRoundId()));\n return false;\n }\n\n for (Agent agent: game.getAgentMap().values()) {\n Broker broker = agent.getBroker();\n // Check if any broker is disabled in the interface\n if (!MemStore.getBrokerState(broker.getBrokerId())) {\n log.info(String.format(\"Not starting game %s : broker %s is disabled\",\n game.getGameId(), broker.getBrokerId()));\n return false;\n }\n\n // Check if any broker is already running the maxAgent nof agents\n if (!broker.hasAgentsAvailable(game.getRound())) {\n log.info(String.format(\"Not starting game %s : broker %s doesn't have \"\n + \"enough available agents\",\n game.getGameId(), broker.getBrokerId()));\n return false;\n }\n\n brokers += broker.getBrokerName() + \"/\" + agent.getBrokerQueue() + \",\";\n }\n brokers = brokers.substring(0, brokers.length() - 1);\n return true;\n }", "private boolean isNewerVersion(String remoteVersion) {\r\n\t\tString pluginVersion = plugin.getDescription().getVersion();\r\n\t\t\r\n\t\tif (pluginVersion == null || !pluginVersion.matches(\"v?[0-9\\\\.]+\")) {\r\n\t\t\t// Do not throw exceptions, just consider it as v0.\r\n\t\t\tpluginVersion = \"0\";\r\n\t\t}\r\n\t\t\r\n\t\tif (!remoteVersion.matches(\"v?[0-9\\\\.]+\")) {\r\n\t\t\t// Should always be checked before by this class.\r\n\t\t\tthrow new IllegalArgumentException(\"fetched version's format is incorrect\");\r\n\t\t}\r\n\t\t\r\n\t\t// Remove all the \"v\" from the versions, replace multiple full stops with a single full stop, and split them.\r\n\t\tString[] pluginVersionSplit = pluginVersion.replace(\"v\", \"\").replaceAll(\"[\\\\.]{2,}\", \".\").split(\"\\\\.\");\r\n\t\tString[] remoteVersionSplit = remoteVersion.replace(\"v\", \"\").replaceAll(\"[\\\\.]{2,}\", \".\").split(\"\\\\.\");\r\n\t\t\r\n\t\tint longest = Math.max(pluginVersionSplit.length, remoteVersionSplit.length);\r\n\t\t\r\n\t\tint[] pluginVersionArray = new int[longest];\r\n\t\tint[] remoteVersionArray = new int[longest];\r\n\t\t\r\n\t\tfor (int i = 0; i < pluginVersionSplit.length; i++) {\r\n\t\t\tpluginVersionArray[i] = Integer.parseInt(pluginVersionSplit[i]);\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < remoteVersionSplit.length; i++) {\r\n\t\t\tremoteVersionArray[i] = Integer.parseInt(remoteVersionSplit[i]);\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 0; i < longest; i++) {\r\n\t\t\tint diff = remoteVersionArray[i] - pluginVersionArray[i];\r\n\t\t\tif (diff > 0) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else if (diff < 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Continue the loop until diff = 0.\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public static boolean has22() {\n return getVersion() >= 22;\n }", "@AnonymousAllowed\n private boolean checkUPMVersion() {\n boolean result = false;\n Plugin plugin = pluginAccessor\n .getPlugin(\"com.atlassian.upm.atlassian-universal-plugin-manager-plugin\");\n if (plugin == null) {\n result = false;\n } else {\n Version upmVersion = Versions.fromPlugin(plugin, false);\n String upmVersion_str = upmVersion.toString();\n StringTokenizer st = new StringTokenizer(upmVersion_str, \".\");\n int first_index = Integer.parseInt((String) st.nextElement());\n if (first_index >= 2) {\n result = true;\n }\n }\n return result;\n }", "boolean hasVersion();", "boolean hasVersion();", "public boolean meetsConstraint(String version) {\n return (matches(version, this.version) && isEarlier(version, latest) && isLater(version,\n earliest));\n }", "public static void checkVersion(byte[] buffer) throws TopicException {\n StringBuilder string = new StringBuilder();\n byte curr = buffer[0];\n\n for (int i = Constants.SEVEN; i> Constants.THREE; i--){\n string.append(getMybit(curr, i));\n }\n if(!TopicConstants.VERSION.contentEquals(string)){\n throw new TopicException(ErrorCode.BADVERSION);\n }\n }", "public boolean hasNewVersion() {\n String newVersion = newVersionName();\r\n if(TextUtils.isEmpty(newVersion)) {\r\n return false;\r\n }\r\n\r\n if(newVersion.indexOf('.') == -1) {\r\n return false;\r\n }\r\n String[] newVerNums = newVersion.split(\"\\\\.\");\r\n if(newVerNums.length != 2) {\r\n return false;\r\n }\r\n\r\n int newMajorVersion = 0;\r\n try {\r\n newMajorVersion = Integer.valueOf(newVerNums[0]);\r\n } catch (NumberFormatException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n\r\n int newMinorVersion = 0;\r\n\r\n try {\r\n newMinorVersion = Integer.valueOf(newVerNums[1]);\r\n } catch (NumberFormatException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n\r\n if(newMajorVersion > mMajorVersion) {\r\n Log.i(LOG_TAG, \"find new major version update + \" + newVersionUrl());\r\n return true;\r\n } else if(newMajorVersion == mMajorVersion) {\r\n if(newMinorVersion > mMinorVersion) {\r\n Log.i(LOG_TAG, \"find new minor version update + \" + newVersionUrl());\r\n return true;\r\n }\r\n }\r\n Log.i(LOG_TAG, \"no new version found.\");\r\n\r\n return false;\r\n }", "public boolean isSchemaOld() {\n return getVersionForSchema() < latestCodeVersion;\n }", "boolean hasVersionNumber();", "private boolean handleAvailableVersions(final Properties props, final String availableVersions) {\n final String[] versions = SPACE_CONTAINING.split(availableVersions, 0);\n\n log.debug(\"Plugin {}: available versions : {} \", plugin.getPluginId(), availableVersions);\n for (final String version:versions) {\n log.debug(\"Plugin {} : considering {}\", plugin.getPluginId(), version);\n if (!handleAvailableVersion(props, version)) {\n return false;\n }\n }\n return true;\n }", "boolean isBadVersion(int version) {\n return true;\n }", "public boolean isSchemaVersionMatch() {\n return getVersionForSchema() == latestCodeVersion;\n }", "private static boolean isSupportedVersion(IndexMetaData indexMetaData) {\n return indexMetaData.minimumCompatibleVersion() != null &&\n indexMetaData.minimumCompatibleVersion().luceneVersion.onOrAfter(Version.V_0_90_0_Beta1.luceneVersion);\n }", "private boolean isBadVersion(int n) {\n\t\treturn false;\n\t}", "public static boolean isWekaVersionOK() {\n Version version = new Version();\n if (version.isOlder(\"3.7.1\")) {\n System.err.println();\n System.err.println(Globals.getWorkbenchInfoString());\n System.err.println();\n System.err.print(\"Weka 3.7.1 or higher is required to run MOA. \");\n System.err.println(\"Weka version \" + Version.VERSION + \" found\");\n return false;\n } else {\n return true;\n }\n }", "public boolean downgrades(ApplicationVersion version) {\n return application.map(version::compareTo).orElse(0) > 0;\n }", "private static boolean isAcceptableVersion(NetworkParameters params, int version) {\n\t\tfor (int v : params.getAcceptableAddressCodes()) {\n\t\t\tif (version == v) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test\n\tpublic void testReasonerVersionOld() throws Exception {\n\t\tIPRProof proof1 = prRoot.createChild(IPRProof.ELEMENT_TYPE, null, null);\n\n\t\tfinal IProofTree proofTree = makeVersionProof(OLD_VERSION, IConfidence.DISCHARGED_MAX);\n\t\tfinal IProofTree expectedDeserialized = makeVersionProof(OLD_VERSION, IConfidence.UNCERTAIN_MAX);\n\t\tcheckProofTreeSerialization(proof1, proofTree, expectedDeserialized, true);\n\t\t// check stability for deserialized proof tree\n\t\tcheckProofTreeSerialization(proof1, expectedDeserialized, true);\n\t}", "protected boolean checkCompatibility() {\n IDatabaseAdapter adapter = getDbAdapter(dbType, connectionPool);\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n return adapter.checkCompatibility(this.adminSchemaName);\n }\n }", "private boolean handleAvailableVersion(final Properties props, final String version) {\n final PluginVersion theVersion = new PluginVersion(version);\n if (theVersion.getMajor() == 0 && theVersion.getMinor() == 0 && theVersion.getPatch() == 0) {\n log.warn(\"Plugin {}: improbable version {}\", plugin.getPluginId(), version);\n }\n if (versionInfo.containsKey(theVersion)) {\n log.warn(\"Plugin {}: Duplicate version {}\", plugin.getPluginId(), version);\n }\n\n final String maxVersionInfo = StringSupport.trimOrNull(\n props.getProperty(plugin.getPluginId() + PluginSupport.MAX_IDP_VERSION_INTERFIX + version));\n if (maxVersionInfo == null) {\n log.warn(\"Plugin {}, Version {} : Could not find max idp version.\", plugin.getPluginId(), version);\n return false;\n }\n\n final String minVersionInfo = StringSupport.trimOrNull(\n props.getProperty(plugin.getPluginId() + PluginSupport.MIN_IDP_VERSION_INTERFIX + version));\n if (minVersionInfo == null) {\n log.warn(\"Plugin {}, Version {} : Could not find min idp version.\", plugin.getPluginId(), version);\n return false;\n }\n\n final String supportLevelString = StringSupport.trimOrNull(\n props.getProperty(plugin.getPluginId()+ PluginSupport.SUPPORT_LEVEL_INTERFIX + version));\n PluginSupport.SupportLevel supportLevel;\n if (supportLevelString == null) {\n log.debug(\"Plugin {}, Version {} : Could not find support level for {}.\", plugin.getPluginId(), version);\n supportLevel = SupportLevel.Unknown;\n } else {\n try {\n supportLevel = Enum.valueOf(SupportLevel.class, supportLevelString);\n } catch (final IllegalArgumentException e) {\n log.warn(\"Plugin {}, Version {} : Invalid support level {}.\",\n plugin.getPluginId(), version, supportLevelString);\n supportLevel = SupportLevel.Unknown;\n }\n }\n\n log.debug(\"Plugin {}: MaxIdP {}, MinIdP {}, Support Level {}\", \n plugin.getPluginId(), maxVersionInfo, minVersionInfo, supportLevel);\n final VersionInfo info; \n info = new VersionInfo(new PluginVersion(maxVersionInfo), new PluginVersion(minVersionInfo), supportLevel);\n versionInfo.put(theVersion, info);\n if (myPluginVersion.equals(theVersion)) {\n myVersionInfo = info;\n }\n final String downloadURL = StringSupport.trimOrNull(\n props.getProperty(plugin.getPluginId() + PluginSupport.DOWNLOAD_URL_INTERFIX + version));\n final String baseName = StringSupport.trimOrNull(\n props.getProperty(plugin.getPluginId() + PluginSupport.BASE_NAME_INTERFIX + version));\n if (baseName != null && downloadURL != null) {\n try {\n final URL url = new URL(downloadURL);\n downloadInfo.put(theVersion, new Pair<>(url, baseName));\n log.trace(\"Plugin {}, version {} : Added download URL {} baseName {} for {}\",\n plugin.getPluginId(), theVersion, url, baseName);\n } catch (final MalformedURLException e) {\n log.warn(\"Plugin {}, version {} : download URL '{}' could not be constructed\",\n plugin.getPluginId(), theVersion, downloadURL, e);\n }\n } else {\n log.info(\"Plugin {}, version {} : no download information present\", plugin.getPluginId(), theVersion);\n }\n return true;\n }", "@Test\n public void testMinimumCloudSdkVersion() {\n assertTrue(CloudSdk.MINIMUM_VERSION.getMajorVersion() > 170);\n }", "@Override\n public final void ensureSupported() {\n ensureDatabaseIsRecentEnough(\"2.0\");\n /**\n * Ensures this database it at least as recent as this version otherwise suggest upgrade to this higher edition of\n * Flyway.\n *\n * @param oldestSupportedVersionInThisEdition The oldest supported version of the database by this edition of Flyway.\n * @param editionWhereStillSupported The edition of Flyway that still supports this version of the database,\n * in case it's too old.\n */\n recommendFlywayUpgradeIfNecessary(\"2.7\");\n }", "void checkTapDbVersion() throws ConfigurationException;", "private static boolean isSupportedPlatform(String versionString) {\n boolean isSupportedPlatform = true;\n Matcher pre223Matcher = PRE_223_PATTERN.matcher(versionString);\n if (pre223Matcher.matches()) {\n int majorVersion = Integer.parseInt(pre223Matcher.group(\"major\"));\n int updateVersion = Integer.parseInt(pre223Matcher.group(\"update\"));\n if (majorVersion != 8) {\n logger.warn(\"Skipping tests because JDK is unsupported: \" + versionString);\n isSupportedPlatform = false;\n }\n if (updateVersion < 272) {\n logger.warn(\"Skipping tests because JDK is unsupported: \" + versionString);\n isSupportedPlatform = false;\n }\n } else {\n int majorVersion = 0;\n /* Handle versions like 11.0.9, 16-internal, 16 */\n int dotIndex = versionString.indexOf('.');\n if (dotIndex > 0) {\n majorVersion = Integer.parseInt(versionString.substring(0, dotIndex));\n } else {\n int dashIndex = versionString.indexOf('-');\n if (dashIndex > 0) {\n majorVersion = Integer.parseInt(versionString.substring(0, dashIndex));\n } else {\n majorVersion = Integer.parseInt(versionString);\n }\n }\n if (majorVersion < 11) {\n logger.warn(\"Skipping tests because JDK is unsupported: \" + versionString);\n isSupportedPlatform = false;\n }\n }\n return isSupportedPlatform;\n }", "public static final boolean shouldUseVersions() {\n return true;\n }", "public static boolean has21() {\n return getVersion() >= 21;\n }", "public void checkForUpdate(String currentVersion);", "protected void checkVersion(long clientVersion) throws IOException {\n if (mServiceVersion == Constants.UNKNOWN_SERVICE_VERSION) {\n mServiceVersion = getRemoteServiceVersion();\n if (mServiceVersion != clientVersion) {\n throw new IOException(ExceptionMessage.INCOMPATIBLE_VERSION.getMessage(getServiceName(),\n clientVersion, mServiceVersion));\n }\n }\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public synchronized boolean checkVersion(String strInstallDir)\n {\n int installMajorVersion = -1;\n int installMinorVersion = -1;\n int installMicroVersion = -1;\n int installBuild = -1;\n\n if (m_versionProps == null)\n {\n InputStream ins = null;\n try\n {\n if (strInstallDir == null)\n return false;\n\n if (!strInstallDir.endsWith(File.separator))\n strInstallDir += File.separator;\n\n // check if the \"version.properties\" file exists under the Rhythmyx\n // root directory\n File propFile = new File(strInstallDir +\n RxFileManager.PREVIOUS_VERSION_PROPS_FILE);\n if (propFile.exists() && propFile.isFile())\n {\n // load the version.properties file\n ins = new FileInputStream(propFile);\n m_versionProps = new Properties();\n m_versionProps.load(ins);\n }\n }\n catch(Exception e)\n {\n PSLogger.logInfo(\"ERROR : \" + e.getMessage());\n PSLogger.logInfo(e);\n return false;\n }\n finally\n {\n if (ins != null)\n {\n try\n {\n ins.close();\n }\n catch(IOException e)\n {\n }\n }\n }\n }\n\n if (m_versionProps != null)\n {\n installMajorVersion = getRequiredProperty(\n \"majorVersion\", m_versionProps);\n\n installMinorVersion = getRequiredProperty(\n \"minorVersion\", m_versionProps);\n\n installMicroVersion = getRequiredProperty(\n \"microVersion\", m_versionProps);\n \n installBuild = getRequiredProperty(\n \"buildNumber\", m_versionProps);\n }\n\n if ((installMajorVersion == -1) ||\n (installMinorVersion == -1) ||\n (installBuild == -1))\n return false;\n\n if (installMajorVersion < majorVersionFrom)\n return false;\n\n if (installMajorVersion == majorVersionFrom)\n {\n // check the minor version in this case\n if (installMinorVersion < minorVersionFrom)\n return false;\n\n if (installMinorVersion == minorVersionFrom)\n {\n \n if (installMicroVersion < microVersionFrom)\n return false;\n\n if (microVersionFrom<=0 || installMicroVersion == microVersionFrom)\n {\n \n // check the build number in this case\n if (installBuild < buildFrom)\n return false;\n }\n }\n }\n\n if (installMajorVersion > majorVersionTo)\n return false;\n\n if (installMajorVersion == majorVersionTo)\n {\n // check the minor version in this case\n if (installMinorVersion > minorVersionTo)\n return false;\n\n if (installMinorVersion == minorVersionTo)\n {\n \n // check the minor version in this case\n if (installMicroVersion > microVersionTo)\n return false;\n\n if (installMinorVersion == microVersionTo)\n {\n \n if (microVersionTo==-1 || installMinorVersion > microVersionTo)\n // check the build number in this case\n if ((buildTo != -1) && (installBuild > buildTo))\n return false;\n }\n }\n }\n\n return true;\n }", "public static boolean has10() {\n return getVersion() >= Build.VERSION_CODES.GINGERBREAD_MR1;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "boolean hasAndroidKtxVersion();", "@Override\n public boolean isApplicableFor(final RobotVersion robotVersion) {\n return robotVersion.isOlderThan(new RobotVersion(3, 1));\n }", "public static boolean has27() {\n return getVersion() >= 27;\n }", "public static boolean has18() {\n return getVersion() >= 18;\n }", "@Test\n public void testCanRun() {\n final int oldestSupported = AccumuloDataVersion.ROOT_TABLET_META_CHANGES;\n final int currentVersion = AccumuloDataVersion.get();\n IntConsumer shouldPass = ServerContext::ensureDataVersionCompatible;\n IntConsumer shouldFail = v -> assertThrows(IllegalStateException.class,\n () -> ServerContext.ensureDataVersionCompatible(v));\n IntStream.rangeClosed(oldestSupported, currentVersion).forEach(shouldPass);\n IntStream.of(oldestSupported - 1, currentVersion + 1).forEach(shouldFail);\n }", "@SuppressWarnings(\"unused\")\n private static boolean buildingToPreviousVersion(DdlVersionBean ddlVersionBean) {\n int buildingToVersion = ddlVersionBean.getBuildingToVersion();\n \n boolean buildingToPreviousVersion = GrouperDdl.V44.getVersion() > buildingToVersion;\n\n return buildingToPreviousVersion;\n }", "private void checkForUpdate() {\n\t\tdouble updateversion = Double.parseDouble(MySoup.getUpdateVersion(SITE));\n\t\tdouble currentversion = Double.parseDouble(VERSION);\n\t\tif (updateversion > currentversion) {\n\t\t\tdisplayAlert(\"\", \"Update available, would you like to install it?\", this);\n\t\t}\n\t}", "public static boolean isMlCompatible(Version version) {\n Version glibcVersion = Optional.ofNullable(System.getenv(GLIBC_VERSION_ENV_VAR))\n .map(v -> Version.fromString(v, Version.Mode.RELAXED))\n .orElse(null);\n\n // glibc version 2.34 introduced incompatibilities in ML syscall filters that were fixed in 7.17.5+ and 8.2.2+\n if (glibcVersion != null && glibcVersion.onOrAfter(Version.fromString(\"2.34\", Version.Mode.RELAXED))) {\n if (version.before(Version.fromString(\"7.17.5\"))) {\n return false;\n } else if (version.getMajor() > 7 && version.before(Version.fromString(\"8.2.2\"))) {\n return false;\n }\n }\n\n return true;\n }", "public void checkVersion() {\r\n \ttry {\r\n \t\tURL versionInfo = new URL(versionURL);\r\n \t\tURLConnection versionInfoConnection = versionInfo.openConnection();\r\n \t\tBufferedReader inputStream = new BufferedReader(new InputStreamReader(versionInfoConnection.getInputStream()));\r\n \t\tString remoteVersion = inputStream.readLine();\r\n \t\tif(remoteVersion.equals(version))\r\n \t\t\tmessage.setText(\"VERSION: \" + version +\"\\nYou have the most current release.\");\r\n \t\telse {\r\n \t\t\tString[] versionList = version.split(\"\\\\.\");\r\n \t\t\tString[] remoteVersionList = remoteVersion.split(\"\\\\.\");\r\n \t\t\tif(versionList.length < 3 || remoteVersionList.length < 3) {\r\n \t\t\t\tmessage.setText(\"VERSION: \" + version +\"\\nUnable to confirm if updates are availble,\\nclick UPDATE to get the most recent release or visit:\\n\" + downloadURL);\r\n \t\t\t\tupdateButton.setEnabled(true);\r\n \t\t\t\tdisplay();\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(Integer.parseInt(versionList[0]) < Integer.parseInt(remoteVersionList[0])) {\r\n \t\t\t\tmessage.setText(\"VERSION: \" + version +\"\\nA newer release is available,\\nclick UPDATE to get the most recent release or visit:\\n\" + downloadURL);\r\n \t\t\t\tupdateButton.setEnabled(true);\r\n \t\t\t\tdisplay();\r\n \t\t\t}\r\n \t\t\telse if(Integer.parseInt(versionList[1]) < Integer.parseInt(remoteVersionList[1])) {\r\n \t\t\t\tmessage.setText(\"VERSION: \" + version +\"\\nA newer release is available,\\nclick UPDATE to get the most recent release or visit:\\n\" + downloadURL);\r\n \t\t\t\tupdateButton.setEnabled(true);\r\n \t\t\t\tdisplay();\r\n \t\t\t}\r\n \t\t\telse if(Integer.parseInt(versionList[2]) < Integer.parseInt(remoteVersionList[2])) {\r\n \t\t\t\tmessage.setText(\"VERSION: \" + version +\"\\nA newer release is available,\\nclick UPDATE to get the more recent release or visit:\\n\" + downloadURL);\r\n \t\t\t\tupdateButton.setEnabled(true);\r\n \t\t\t\tdisplay();\r\n \t\t\t}\r\n \t\t\telse if(versionList.length < remoteVersionList.length) {\r\n \t\t\t\tmessage.setText(\"VERSION: \" + version +\"\\nA newer release is available,\\nclick UPDATE to get the more recent release or visit:\\n\" + downloadURL);\r\n \t\t\t\tupdateButton.setEnabled(true);\r\n \t\t\t\tdisplay();\r\n \t\t\t}\r\n \t\t\telse {\r\n \t\t\t\tmessage.setText(\"VERSION: \" + version +\"\\nYou have the most current release.\");\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \tcatch(NumberFormatException e) {\r\n\t\t\tmessage.setText(\"VERSION: \" + version +\"\\nUnable to confirm if updates are availble,\\nclick UPDATE to get the more recent release or visit:\\n\" + downloadURL);\r\n\t\t\tupdateButton.setEnabled(true);\r\n \t}\r\n \tcatch(Exception e){\r\n \t\tmessage.setText(\"VERSION: \" + version +\"\\nUnable to connect to server to check version\");\r\n \t}\r\n }", "@java.lang.Override\n public boolean hasVersion() {\n return instance.hasVersion();\n }", "public boolean isLastVersion();", "public static boolean buildingToThisVersionAtLeast(DdlVersionBean ddlVersionBean) {\n int buildingToVersion = ddlVersionBean.getBuildingToVersion();\n \n boolean buildingToThisVersionAtLeast = GrouperDdl.V44.getVersion() <= buildingToVersion;\n\n return buildingToThisVersionAtLeast;\n }", "public boolean hasCurrentVersion() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "private IndexMetaData checkSupportedVersion(IndexMetaData indexMetaData) throws Exception {\n if (indexMetaData.getState() == IndexMetaData.State.OPEN && isSupportedVersion(indexMetaData) == false) {\n throw new IllegalStateException(\"The index [\" + indexMetaData.getIndex() + \"] was created before v0.90.0 and wasn't upgraded.\"\n + \" This index should be open using a version before \" + Version.CURRENT.minimumCompatibilityVersion()\n + \" and upgraded using the upgrade API.\");\n }\n return indexMetaData;\n }", "public static boolean isAtLeast(JavaVersion version) {\n return isAtLeast(CURRENT_VERSION, version);\n }", "public void checkCompatibility() {\n Utils.LOGGER.info(\"Checking compatibility...\");\n\n checkServerVersion();\n checkServerSoftware();\n\n if (incompatibilities.size() == 0) {\n Utils.LOGGER.info(\"Compatibility checks completed, no possible incompatibilities found.\");\n } else {\n Utils.LOGGER.warning(\"Compatibility checks completed, &b\" + incompatibilities.size() + \"&7 possible incompatibilities were found:\");\n incompatibilities.forEach(incompatibility -> Utils.LOGGER.warning(\"&8 - &b\" + incompatibility.getType().toString() + \"&7 check flagged: \" + incompatibility.getReason()));\n }\n }", "public boolean isVersion()\n {\n return !getVersion().isNull();\n }", "public static boolean isJavaVersionOK() {\n boolean isJavaVersionOK = true;\n String version = System.getProperty(\"java.version\");\n char minor = version.charAt(2);\n char point = version.charAt(4);\n if (minor < '6' || point < '0') {\n isJavaVersionOK = false;\n System.err.println();\n System.err.println(Globals.getWorkbenchInfoString());\n System.err.println();\n System.err.print(\"JDK 1.6.0 or higher is required to run MOA. \");\n System.err.println(\"JDK version \" + version + \" found\");\n }\n return isJavaVersionOK;\n }", "public static boolean has25() {\n return getVersion() >= 25;\n }", "@Override\n\tpublic void setCheckOlderVersion(boolean paramBoolean)\n\t{\n\n\t}", "@Test(expected = AssertionError.class)\n public void testSchemaVersionMismatch() {\n PowerMock.replayAll();\n Map<String, String> sampleConfig = new HashMap<>();\n sampleConfig.put(SCHEMA_VERSION, \"1\");\n Map<String, Object> checkConfig = connector.config().parse(sampleConfig);\n assertEquals(2, checkConfig.get(SCHEMA_VERSION));\n PowerMock.verifyAll();\n }", "protected boolean ensureBalance(BigInteger value)\n {\n String account = appContext.getSettingProvider().getSelectedAccount();\n\n BigInteger balance = appContext.getServiceProvider().getAccountService().getAccountBalance(account).get();\n if(balance == null)\n {\n appContext.getMessageService().showErrorMessage(\"Cannot reach the exchange service. Try again later.\");\n return false;\n }\n\n if(balance.compareTo(value) < 0)\n {\n appContext.getMessageService().showErrorMessage(\"You need at least \" + value.toString() + \" wei to do that!\");\n return false;\n }\n\n return true;\n }", "public static String checkVersion() {\n GhostMute plugin = getPlugin(GhostMute.class);\n String cVersion;\n String lineWithVersion;\n try {\n URL githubUrl = new URL(\"https://raw.githubusercontent.com/Rsl1122/GhostMute/master/GhostMute/src/plugin.yml\");\n lineWithVersion = \"\";\n Scanner websiteScanner = new Scanner(githubUrl.openStream());\n while (websiteScanner.hasNextLine()) {\n String line = websiteScanner.nextLine();\n if (line.toLowerCase().contains(\"version\")) {\n lineWithVersion = line;\n break;\n }\n }\n String versionString = lineWithVersion.split(\": \")[1];\n int newestVersionNumber = parseVersionNumber(versionString);\n cVersion = plugin.getDescription().getVersion();\n int currentVersionNumber = parseVersionNumber(cVersion);\n if (newestVersionNumber > currentVersionNumber) {\n return \"New Version (\" + versionString + \") is availible at https://www.spigotmc.org/resources/ghostmute-fake-blocked-messages.33880/\";\n } else {\n return \"You're running the latest version\";\n }\n } catch (Exception e) {\n plugin.logError(\"Failed to compare versions.\");\n }\n return \"Failed to get newest version number.\";\n }", "@Override\n public boolean isVersionCodeCompatible(int version) {\n return true;\n }", "public boolean isValid() {\n return (identifier != null) || version.getVersion().equals(\"0.1\");\n }", "@Override\n public boolean isCompatibleForStreaming()\n {\n return isCompatible() && version.charAt(0) == current_version.charAt(0);\n }", "protected void checkLatestVersion() throws ReadonlyVersionException {\r\n final String thisVersion = getContentModel().getVersionNumber();\r\n if (thisVersion != null && !thisVersion.equals(getContentModel().getLatestVersionNumber())) {\r\n throw new ReadonlyVersionException(\"Only latest version can be modified.\");\r\n }\r\n }", "public static void crdHasV1Beta2Only(KubernetesClient client) {\n for (String kind : AbstractCommand.STRIMZI_KINDS) {\n String crdName = CrdUpgradeCommand.CRD_NAMES.get(kind);\n CustomResourceDefinition crd = client.apiextensions().v1beta1().customResourceDefinitions().withName(crdName).get();\n\n if (kind.equals(\"KafkaTopic\") || kind.equals(\"KafkaUser\")) {\n // KafkaTopic and KafkaUser resources have even in CRD v1 also the old versions v1alpha1 and v1beta1.\n // This is in order to allow smooth migration for the Topic and User Operators without users or topics\n // deleted when the CRDs are upgraded from apiextensions/v1beta1 to apiextensions/v1.\n assertThat(crd.getSpec().getVersions().size(), is(3));\n assertThat(crd.getSpec().getVersions().stream().map(CustomResourceDefinitionVersion::getName).collect(toList()), containsInAnyOrder(\"v1alpha1\", \"v1beta1\", \"v1beta2\"));\n } else {\n assertThat(crd.getSpec().getVersions().size(), is(1));\n assertThat(crd.getSpec().getVersions().stream().map(CustomResourceDefinitionVersion::getName).collect(toList()), contains(\"v1beta2\"));\n }\n }\n }", "public static void checkVersion(FileSystem fs, Path rootdir, boolean message, int wait,\n int retries) throws IOException, DeserializationException {\n String version = getVersion(fs, rootdir);\n String msg;\n if (version == null) {\n if (!metaRegionExists(fs, rootdir)) {\n // rootDir is empty (no version file and no root region)\n // just create new version file (HBASE-1195)\n setVersion(fs, rootdir, wait, retries);\n return;\n } else {\n msg = \"hbase.version file is missing. Is your hbase.rootdir valid? \"\n + \"You can restore hbase.version file by running 'HBCK2 filesystem -fix'. \"\n + \"See https://github.com/apache/hbase-operator-tools/tree/master/hbase-hbck2\";\n }\n } else if (version.compareTo(HConstants.FILE_SYSTEM_VERSION) == 0) {\n return;\n } else {\n msg = \"HBase file layout needs to be upgraded. Current filesystem version is \" + version\n + \" but software requires version \" + HConstants.FILE_SYSTEM_VERSION\n + \". Consult http://hbase.apache.org/book.html for further information about \"\n + \"upgrading HBase.\";\n }\n\n // version is deprecated require migration\n // Output on stdout so user sees it in terminal.\n if (message) {\n System.out.println(\"WARNING! \" + msg);\n }\n throw new FileSystemVersionException(msg);\n }", "public boolean hasCurrentVersion() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "public boolean canUpgrade(){\n\t\treturn level < 2;\n\t}", "boolean hasOperatingSystemVersionConstant();", "private void assertVersion(Versioned vers)\n {\n final Version v = vers.version();\n assertFalse(\"Should find version information (got \"+v+\")\", v.isUnknownVersion());\n assertEquals(PackageVersion.VERSION, v);\n }", "boolean hasCompatibilityState();", "@java.lang.Override\n public boolean hasRpcVersion() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "@java.lang.Override\n public boolean hasRpcVersion() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public boolean hasVersion() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public static boolean has20() {\n return getVersion() >= 20;\n }", "public boolean getIsSupportedBackendBrowserVersion() {\n final FxRequest req = FxJsfUtils.getRequest();\n switch( req.getBrowser() ) {\n case FIREFOX:\n return req.getBrowserVersion() >= 2.0d;\n case IE:\n return req.getBrowserVersion() >= 7.0d;\n case GECKO:\n return req.getBrowserVersion() >= 1.8; // firefox 2.0 upwards\n case SAFARI:\n return req.getBrowserVersion() >= 530; // safari 4.0+ - http://en.wikipedia.org/wiki/Safari_version_history\n default:\n return false;\n }\n }", "public boolean hasVersion() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "@java.lang.Override\n public boolean hasRpcVersion() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "@java.lang.Override\n public boolean hasRpcVersion() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public boolean isSetVersion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(VERSION$4) != 0;\n }\n }", "@Test\n public void version() {\n String version = System.getProperty(\"java.version\");\n Assert.assertEquals(\"11\", version.split(\"\\\\.\")[0]);\n }", "@Test\n public void testSaltUpgrade() {\n assertTrue(underTest.permitSaltUpgrade(\"2017.7.5\", \"2017.7.5\"));\n assertTrue(underTest.permitSaltUpgrade(\"2017.7.5\", \"2017.7.7\"));\n assertTrue(underTest.permitSaltUpgrade(\"2017.7.7\", \"2017.7.5\"));\n\n assertTrue(underTest.permitSaltUpgrade(\"2017.7.7\", \"2017.8.0\"));\n assertFalse(underTest.permitSaltUpgrade(\"2017.7.7\", \"2019.7.0\"));\n\n // Allow upgrade between 3000.*, according to new Salt versioning scheme (since then, version numbers are in the format MAJOR.PATCH)\n assertTrue(underTest.permitSaltUpgrade(\"3000.2\", \"3000.2\"));\n assertTrue(underTest.permitSaltUpgrade(\"3000.2\", \"3000.3\"));\n assertFalse(underTest.permitSaltUpgrade(\"3000.2\", \"3001.3\"));\n assertFalse(underTest.permitSaltUpgrade(\"3000\", \"3001\"));\n\n // Do not allow if no Salt version\n assertFalse(underTest.permitSaltUpgrade(\"2017.7.7\", null));\n }", "@Test\n\tpublic void testResolveOldAPIVersionByPlatformVersion()\n\t\t\tthrows Exception {\n\t\tAPIVersionResolver fixture = new APIVersionResolver();\n\n\t\tfinal String sysPropBefore = System.getProperty(CloudifyConstants.SYSTEM_PROPERTY_CLI_OLD_REST_API_VERSION);\n\t\tSystem.clearProperty(CloudifyConstants.SYSTEM_PROPERTY_CLI_OLD_REST_API_VERSION);\n\n\t\tString result = fixture.resolveOldAPIVersion();\n\t\ttry {\n\t\t\tAssert.assertEquals(PlatformVersion.getVersionNumber(), result);\n\t\t} finally {\n\t\t\tif (sysPropBefore == null) {\n\t\t\t\tSystem.clearProperty(CloudifyConstants.SYSTEM_PROPERTY_CLI_OLD_REST_API_VERSION);\n\t\t\t} else {\n\t\t\t\tSystem.setProperty(CloudifyConstants.SYSTEM_PROPERTY_CLI_OLD_REST_API_VERSION, sysPropBefore);\n\t\t\t}\n\n\t\t}\n\t}", "public static boolean has26() {\n return getVersion() >= 26;\n }" ]
[ "0.6529191", "0.6486774", "0.6131628", "0.6075813", "0.6044963", "0.60423714", "0.60091764", "0.59849936", "0.59849936", "0.59730023", "0.58843356", "0.58841515", "0.587788", "0.5822817", "0.58142453", "0.5807369", "0.57635367", "0.5752579", "0.5746982", "0.5715474", "0.57135", "0.56825376", "0.5670276", "0.56676805", "0.56676805", "0.56573814", "0.5647619", "0.564152", "0.5638502", "0.563671", "0.56111217", "0.55981904", "0.5515258", "0.5497883", "0.54914826", "0.5477392", "0.5468935", "0.5460365", "0.5446901", "0.5442322", "0.5430516", "0.541106", "0.5408686", "0.5399858", "0.5398091", "0.53951406", "0.53724223", "0.53629357", "0.5359989", "0.5317324", "0.53131056", "0.5307007", "0.52818197", "0.5233823", "0.51915044", "0.5187616", "0.5181575", "0.5180861", "0.51761967", "0.51672447", "0.5152583", "0.51262623", "0.5113713", "0.5101421", "0.50947773", "0.50594485", "0.50537115", "0.503898", "0.50389695", "0.5018196", "0.5015966", "0.49832067", "0.49744964", "0.49663365", "0.49655512", "0.49635985", "0.49614957", "0.4956356", "0.4947524", "0.4944064", "0.4941019", "0.49342465", "0.49342433", "0.4928481", "0.4924579", "0.491835", "0.48894456", "0.48863193", "0.48863193", "0.4884756", "0.48786202", "0.4878234", "0.4875583", "0.48713684", "0.48713684", "0.48603818", "0.4844911", "0.48448363", "0.48432606", "0.4839969" ]
0.6200709
2
Get the current session
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { HttpSession session = request.getSession(); // Invalidate the session session.invalidate(); // Redirect the user to the login page response.sendRedirect("Login"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Session getCurrentSession();", "Session getCurrentSession();", "public String getSession() {\n return session;\n }", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,300));\n return getCurrentSession();\n }\n }", "public static synchronized Session getCurrentSession(Context context) {\n \tif (Session.currentSession == null) {\n Session.sessionFromCurrentSession(context);\n \t}\n\n \t\treturn Session.currentSession;\n }", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "public String getSession() {\n return this.session;\n }", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "public Session getCurrentSession() {\r\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "public static Session getCurrentSession() {\r\n //LOG.debug(MODULE + \"Get CurrentSession\");\r\n\r\n /* This code is to find who has called the method only for debugging and testing purpose.\r\n try {\r\n throw new Exception(\"Who called Me : \");\r\n } catch (Exception e) {\r\n //LOG.debug(\"I was called by \" + e.getStackTrace()[2].getClassName() + \".\" + e.getStackTrace()[2].getMethodName() + \"()!\");\r\n LOG.debug(\"I was called by : \", e);\r\n }\r\n */\r\n return openSession();\r\n //return sessionFactory.getCurrentSession();\r\n }", "public static Session getSession() {\n return session;\n }", "public SESSION getCurrentSessionForTest() {\n return currentSession;\n }", "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "protected abstract SESSION getThisAsSession();", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "public String getSessionContext() {\n return this.SessionContext;\n }", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "public User getSession(){\n\t\treturn this.session;\n\t}", "public HttpSession getHttpSession() {\n return servletRequest.getSession();\n }", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "final protected RobotSessionGlobals getSession() {\n return mSession;\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public SessionInfo getSessionInfo() {\n\t\treturn sessionInfo;\n\t}", "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public String getSessionID() {\n\t\treturn sessionId;\n\t}", "public String getSessionID ()\n\t{\n\t\treturn sessionID;\n\t}", "public Session getSession() {\n return session;\n }", "public java.lang.String getSessionToken() {\r\n return sessionToken;\r\n }", "public LocalSession session() { return session; }", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "public Session session() {\n return session;\n }", "public Session getSession()\n {\n return session;\n }", "public Session getSession() { return session; }", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public Session getSession() {\n return session;\n }", "public PSUserSession getSession();", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "String getAssociatedSession();", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n if (sessionBuilder_ == null) {\n return session_;\n } else {\n return sessionBuilder_.getMessage();\n }\n }", "synchronized public String getSessionId()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getSessionID();\n\t\t\t\n\t\treturn null;\n\t}", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public AbstractSession getSession() {\n return session;\n }", "Object getNativeSession();", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "public String getSessionKey() {\n return sessionKey;\n }", "private TwitterSession getTwitterSession() {\n TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();\n\n return session;\n }", "public String getSessionId() {\n return super.getSessionId();\n }", "protected Session getSession() { return session; }", "public Session getSession();", "SessionManager get();", "AuthenticationSessionModel getAuthenticationSession();", "Session getValidSession() {\n final Session session = sessionProvider.getActiveSession();\n // Only use session if it has auth token.\n if (session != null && session.getAuthToken() != null &&\n !session.getAuthToken().isExpired()) {\n return session;\n } else {\n return null;\n }\n }", "DefaultSession getSession(String id);", "private String getTopcatSessionId() {\r\n HttpServletRequest request = this.getThreadLocalRequest();\r\n HttpSession session = request.getSession();\r\n String sessionId = null;\r\n if (session.getAttribute(\"SESSION_ID\") == null) { // First time login\r\n try {\r\n sessionId = userManager.login();\r\n session.setAttribute(\"SESSION_ID\", sessionId);\r\n } catch (AuthenticationException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n } else {\r\n sessionId = (String) session.getAttribute(\"SESSION_ID\");\r\n }\r\n return sessionId;\r\n }", "Session getSession();", "Session getSession();", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n if (sessionBuilder_ != null) {\n return sessionBuilder_.getMessageOrBuilder();\n } else {\n return session_;\n }\n }", "public Session getSession(@NotNull Http.Request request) {\n Session session;\n String sessionKey = request.getHeader(SESSION_FIELD_NAME);\n\n // Check Session Key\n if (sessionKey == null || sessionKey.isEmpty()) {\n return null;\n }\n\n // Get Session by Key & check a session was found\n session = this.sessionRepository.getById(sessionKey);\n if (session == null || !session.isValid()) {\n return null;\n }\n\n return session;\n }", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public String getSessionId() {\n return this.sessionid;\n }", "private TwitterSession getTwitterSession() {\n TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();\n\n //NOTE : if you want to get token and secret too use uncomment the below code\n /*TwitterAuthToken authToken = session.getAuthToken();\n String token = authToken.token;\n String secret = authToken.secret;*/\n\n return session;\n }", "@Override\n\tpublic UtenteBase getSessionUser() {\n\t\tUtenteBase user = (UtenteBase) getThreadLocalRequest().getSession().getAttribute(\"user\");\n\t\treturn user;\n\t}", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n return session_;\n }", "protected Session getSession() {\r\n if (session == null || !session.isOpen()) {\r\n LOG.debug(\"Session is null or not open...\");\r\n return HibernateUtil.getCurrentSession();\r\n }\r\n LOG.debug(\"Session is current...\");\r\n return session;\r\n }", "public JavabotSession getQuickStartSession()\n {\n return (JavabotSession)getSession();\n }", "protected DatabaseSession getDbSession() {\n if(dbSession == null) {\n dbSession = getServerSession();\n }\n return dbSession;\n }", "private UserID getCurrentUser()\n\t{\n\t return (UserID)request.getSession().getAttribute(\"userID\");\n\t}", "public String sessionId() {\n\t\treturn sessionId;\n\t}", "public static UserSession getUserSession(HttpServletRequest request) {\n return (UserSession) request.getSession().getAttribute(Constants.USER_SESSION_KEY);\n }", "public static Session getSession(SlingHttpServletRequest request) {\n ResourceResolver resourceResolver = request.getResourceResolver();\n return resourceResolver.adaptTo(Session.class);\n }", "public FlexSession getFlexSession()\n {\n synchronized (lock)\n {\n return flexSession;\n }\n }", "public String getSessionName();", "public SessionService session() {\n return service;\n }", "public int getClientSessionID() {\n return clientSessionID_;\n }", "public final String getSessionId() {\n return sessionId;\n }", "public String getSessionId() {\n HttpSession session = (HttpSession) _currentSession.get();\n if (session == null) {\n return null;\n }\n return session.getId();\n }", "protected final SessionState getSessionState() {\n Session currentSession = sessionTracker.getSession();\n return (currentSession != null) ? currentSession.getState() : null;\n }", "public String getSessionId()\r\n\t{\r\n\t\treturn sessionId;\r\n\t}", "public int getClientSessionID() {\n return clientSessionID_;\n }", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "public GameSession getGameSession()\n {\n return gameSession;\n }", "public IoSession getChatSession() {\n\t\treturn m_chatSession;\n\t}", "java.lang.String getSessionID();", "private Session getSession (String sessionID) {\n\t\tSession session;\n\t\tif (get(sessionID) != null) {\n\t\t\tsession = get(sessionID);\n\t\t} else {\n\t\t\tsession = new Session();\n\t\t\tput(session.getId(), session);\n\t\t}\n\t\treturn session;\n\t}" ]
[ "0.83053285", "0.83053285", "0.8068643", "0.80437994", "0.803164", "0.7945229", "0.7919536", "0.77921015", "0.776479", "0.7687001", "0.76770586", "0.76734704", "0.76734704", "0.76714545", "0.7652687", "0.7597095", "0.75847477", "0.7576359", "0.755017", "0.7546516", "0.7498326", "0.7495", "0.74838805", "0.74838805", "0.74838805", "0.7483696", "0.7477768", "0.7452576", "0.74480027", "0.7443553", "0.74432623", "0.7416615", "0.74043655", "0.7392264", "0.7388436", "0.7388415", "0.73793936", "0.7367488", "0.7350875", "0.7347107", "0.7305173", "0.72950613", "0.7225341", "0.72175616", "0.72068924", "0.72040004", "0.7199133", "0.71820575", "0.71721065", "0.71484923", "0.71277344", "0.71222126", "0.71131176", "0.7112137", "0.70962447", "0.70881975", "0.7088068", "0.70855445", "0.70852953", "0.7085016", "0.70823437", "0.70761824", "0.7059589", "0.70007485", "0.7000649", "0.69848627", "0.6959094", "0.69378954", "0.69033426", "0.6902105", "0.69009835", "0.69009835", "0.689213", "0.6861342", "0.6842909", "0.6834201", "0.67922336", "0.6791093", "0.6777775", "0.6777548", "0.67770845", "0.6762559", "0.67375654", "0.6732035", "0.6723686", "0.67232007", "0.67192835", "0.67086554", "0.6684909", "0.6682274", "0.6679367", "0.66784793", "0.66730636", "0.66716564", "0.66708124", "0.66631573", "0.66561174", "0.6652204", "0.66365534", "0.6634609", "0.66315186" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.id
public Long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String inventoryItemId() {\n return this.innerProperties() == null ? null : this.innerProperties().inventoryItemId();\n }", "public Number getInventoryItemId() {\n return (Number)getAttributeInternal(INVENTORYITEMID);\n }", "public Number getInventoryItemId() {\n return (Number)getAttributeInternal(INVENTORYITEMID);\n }", "public int getM_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "public long getItemShopBasketId();", "public long getShopBasketId();", "public Integer getSourceID()\r\n\t\t{ return mapping.getSourceId(); }", "int getSourceSnId();", "public Long getSnacksInfoId() {\n return snacksInfoId;\n }", "@Override\r\n public int getsaleId() {\n return this.saleId;\r\n }", "public Integer getsId() {\n return sId;\n }", "public Integer getInsid() {\n return insid;\n }", "@Override\n\tpublic Integer getInventoryForAIngredient(Ingredient ingredient){\n\t\treturn beverageInventoryMap.get(ingredient);\n\t}", "public Integer getId_inventario() {\r\n return id_inventario;\r\n }", "int getSnId();", "int getSnId();", "int getSnId();", "int getSnId();", "public Integer getShuxingid() {\n return shuxingid;\n }", "public Integer getId()\r\n\t\t{ return mapping.getId(); }", "@Override\n\tpublic Integer getId() {\n\t\treturn this.id;\n\t}", "public Integer getGoodsId() {\n return goodsId;\n }", "public Integer getGoodsId() {\n return goodsId;\n }", "public Integer getGoodsId() {\n return goodsId;\n }", "public Integer getGoodsId() {\n return goodsId;\n }", "public Integer getGoodsId() {\n return goodsId;\n }", "public Integer getGoodsId() {\n return goodsId;\n }", "public Integer getGoodsId() {\n return goodsId;\n }", "public int getVoid_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"Void_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "Long getInvoiceId();", "public Integer getId() { return this.id; }", "public Integer getStockId() {\r\n\t\treturn stockId;\r\n\t}", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getId()\n\t{\n\t\treturn this.id; \n\t}", "public Integer getId() {\r\n return this.id;\r\n }", "long getSourceId();", "public Integer getId(){\n\t\treturn id;\n\t}", "@Override\n\tpublic long getId() {\n\t\treturn _buySellProducts.getId();\n\t}", "public Integer getId() {\n return (Integer) get(\"id\");\n }", "public int getSalesRep_ID();", "public int getSalesRep_ID();", "public java.lang.String getSoldToId() {\n return soldToId;\n }", "public int getKeyInventory() {\r\n return Input.Keys.valueOf(keyInventoryName);\r\n }", "@Override\r\n\tpublic Long getID(ProductIngredientParam param) {\n\t\treturn param.getId();\r\n\t}", "public Integer getStock(int ID) {\r\n\t\treturn inventory.get(ID);\r\n\t}", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public Integer getInspartid() {\n return inspartid;\n }", "public Integer getId() {\n\t\treturn this.id;\n\t}", "public Integer getId() { return id; }", "@Override\r\n\tpublic String getId() {\n\t\treturn mProductionId;\r\n\t}", "public int getReservationId() { return reservationId; }", "public int getStockId() {\r\n\t\treturn stockId;\r\n\t}", "public Integer getId() \r\n\t{\r\n\t\treturn id;\r\n\t}", "public int getId() {\n\t\treturn Integer.parseInt(Id);\n\t}", "@Override\n public int getVisaIdByName(String name) throws SQLException, ClassNotFoundException {\n return dao.getId(name);\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public long getSuburItemId();", "public int getSnId() {\n return snId_;\n }", "public int getSnId() {\n return snId_;\n }", "public int getSnId() {\n return snId_;\n }", "public int getSnId() {\n return snId_;\n }", "public Integer getId() {\n return id;\n }", "public Integer getId() {\n return id;\n }", "public Integer getGoodsPkId() {\n\t\treturn goodsPkId;\n\t}", "public String getIdForRow(int row);", "@Override\n\tpublic Integer getId() {\n return id;\n }", "public Integer getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\r\n\t\treturn id;\r\n\t}" ]
[ "0.61989367", "0.56734973", "0.56734973", "0.5605727", "0.5582979", "0.5549767", "0.55185056", "0.54987425", "0.5464569", "0.5460688", "0.54025716", "0.5392813", "0.53654003", "0.5348929", "0.53326285", "0.53326285", "0.53326285", "0.53326285", "0.53070384", "0.5294364", "0.5272742", "0.5265205", "0.5265205", "0.5265205", "0.5265205", "0.5265205", "0.5265205", "0.5265205", "0.5233124", "0.5231063", "0.5202811", "0.5180988", "0.5180236", "0.5180236", "0.51744884", "0.5165998", "0.51651084", "0.51585025", "0.515163", "0.51388204", "0.51295084", "0.51295084", "0.51255083", "0.51229274", "0.5121552", "0.51145905", "0.51113683", "0.51113683", "0.51113683", "0.51113683", "0.5107067", "0.5103369", "0.5093934", "0.5091317", "0.5087469", "0.5081119", "0.50751394", "0.5065854", "0.50647193", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50632215", "0.50567204", "0.5052804", "0.5052804", "0.5052804", "0.5052804", "0.50468093", "0.50468093", "0.50411874", "0.50383186", "0.5037763", "0.50347525", "0.50347525" ]
0.0
-1
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.id
public void setId(Long id) { this.id = id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setInventory(int inventory){\r\n inventoryNumber += inventory;\r\n }", "public void setsId(Integer sId) {\n this.sId = sId;\n }", "public void setInventoryItemId(Number value) {\n setAttributeInternal(INVENTORYITEMID, value);\n }", "public void setInventoryItemId(Number value) {\n setAttributeInternal(INVENTORYITEMID, value);\n }", "public InventoryEntity(int id) {\n\t\tthis.id = id;\n\t}", "@Override\r\n public void setsaleId(int saleid) {\n this.saleId = saleid;\r\n }", "public void setId_inventario(Integer id_inventario) {\r\n this.id_inventario = id_inventario;\r\n }", "public void setM_Inventory_ID (int M_Inventory_ID)\n{\nif (M_Inventory_ID <= 0) set_Value (\"M_Inventory_ID\", null);\n else \nset_Value (\"M_Inventory_ID\", new Integer(M_Inventory_ID));\n}", "@Override\r\n\tpublic void setId(String id) {\n\t\tmProductionId = id;\r\n\t}", "public void setM_Production_ID (int M_Production_ID);", "public void setSalesRep_ID (int SalesRep_ID);", "public void setSalesRep_ID (int SalesRep_ID);", "@Override\n\tpublic void setId(long id) {\n\t\t_buySellProducts.setId(id);\n\t}", "public void setReservationId(int i) { reservationId = i; }", "@JsonSetter(\"deliveryId\")\r\n public void setDeliveryId (int value) { \r\n this.deliveryId = value;\r\n }", "public void setShuxingid(Integer shuxingid) {\n this.shuxingid = shuxingid;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setId( Integer id )\n {\n this.id = id ;\n }", "void updateInventory(String busNumber, String tripDate, int inventory) throws NotFoundException;", "public void setId(long id) {\n id_ = id;\n }", "public String inventoryItemId() {\n return this.innerProperties() == null ? null : this.innerProperties().inventoryItemId();\n }", "public Builder setSnId(int value) {\n \n snId_ = value;\n onChanged();\n return this;\n }", "public Builder setSnId(int value) {\n \n snId_ = value;\n onChanged();\n return this;\n }", "public Builder setSnId(int value) {\n \n snId_ = value;\n onChanged();\n return this;\n }", "public Builder setSnId(int value) {\n \n snId_ = value;\n onChanged();\n return this;\n }", "private void setId(Integer id) { this.id = id; }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "protected void setId(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{\n\t\t\n\t\tString id = rs.getString(UiActionTable.COLUMN_ID);\n\t\t\n\t\tif(id == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tuiAction.setId(id);\n\t}", "public void setId(String idIn) {\n this.id = idIn;\n }", "public void setId(int id){ this.id = id; }", "@Override\n public void setId(Integer id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Integer id) {\n this.id = id;\n }", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void setId(String id) {\r\n\t\tsId = id;\r\n\t}", "@Override\n public void setId(int id) {\n this.id = id;\n }", "public void setId(int value) {\r\n this.id = value;\r\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "public void setID(String idIn) {this.id = idIn;}", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public void setIdSucursal(int idSucursal)\r\n/* 105: */ {\r\n/* 106:134 */ this.idSucursal = idSucursal;\r\n/* 107: */ }", "@Override\r\n\tpublic void setId(String id) {\n\t\tmWarehouseId = id;\r\n\t}", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "public void setId(Integer id) {\r\n this.id = id;\r\n }", "@Override\n\tpublic void setId(int id) {\n\t\tthis.ID = id;\n\t}", "public void setId(int id) {\r\n\t\t_id = id;\r\n\t}", "public void setId(long id) {\n\t\t_tempNoTiceShipMessage.setId(id);\n\t}", "public void setId(int id) {\n\tthis.id = id;\n}", "public void setId(Integer value) {\n this.id = value;\n }", "public void setId(Integer id) {\n this.id = id;\n }", "public void setId(Integer id){\n\t\tthis.id = id;\n\t}", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "@Override\n\tpublic void setId(Integer arg0) {\n\n\t}", "public void setId(int value) {\n this.id = value;\n }" ]
[ "0.5627424", "0.5513178", "0.55074334", "0.55074334", "0.5466007", "0.54631555", "0.54064864", "0.53999203", "0.53721243", "0.53309184", "0.5328978", "0.5328978", "0.5267262", "0.52604395", "0.52419764", "0.5216643", "0.5160987", "0.51452965", "0.51452965", "0.51073104", "0.50991964", "0.50946516", "0.5093513", "0.5091439", "0.5091439", "0.5091439", "0.5091439", "0.50849634", "0.50822914", "0.5078749", "0.50747406", "0.50747406", "0.50747406", "0.50747406", "0.50747406", "0.50747406", "0.50747406", "0.5070532", "0.5061957", "0.505544", "0.50516695", "0.5048845", "0.50481963", "0.50481963", "0.50439095", "0.50381166", "0.50304645", "0.50300467", "0.50240093", "0.5017439", "0.5016425", "0.50155395", "0.5006852", "0.5006065", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49969304", "0.49911693", "0.49895254", "0.4988246", "0.49830586", "0.4982684", "0.4978962", "0.49779817", "0.49704802", "0.49704802", "0.49704802", "0.49704802", "0.49704802", "0.49704802", "0.49704802", "0.49593362", "0.4956451" ]
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.snacks_info_id
public Long getSnacksInfoId() { return snacksInfoId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSnacksInfoId(Long snacksInfoId) {\n this.snacksInfoId = snacksInfoId;\n }", "public String getInfoPkid() {\n return infoPkid;\n }", "java.lang.String getDataInfoId();", "public java.lang.String getInfoId() {\n return infoId;\n }", "public long getShopBasketId();", "public long getItemShopBasketId();", "organize_infoBean selectByPrimaryKey(Integer id);", "int getSnId();", "int getSnId();", "int getSnId();", "int getSnId();", "public Integer getMemberInfoId() {\n return memberInfoId;\n }", "public Integer getShopid() {\n return shopid;\n }", "public int getSnackIdentifier() {\n\t\treturn snackIdentifier;\n\t}", "int getSourceSnId();", "public int getSnId() {\n return snId_;\n }", "public int getSnId() {\n return snId_;\n }", "public int getSnId() {\n return snId_;\n }", "public int getSnId() {\n return snId_;\n }", "public Integer getsId() {\n return sId;\n }", "public void setInfoPkid(String infoPkid) {\n this.infoPkid = infoPkid == null ? null : infoPkid.trim();\n }", "public int getSnId() {\n return snId_;\n }", "public int getSnId() {\n return snId_;\n }", "public int getSnId() {\n return snId_;\n }", "public int getSnId() {\n return snId_;\n }", "java.lang.String getMessageInfoID();", "public Long getSellerItemInfoId() {\r\n return sellerItemInfoId;\r\n }", "@Override\r\n public int getsaleId() {\n return this.saleId;\r\n }", "public String getIdNo() {\n return idNo;\n }", "public String getIdNo() {\n return idNo;\n }", "public Integer getInsid() {\n return insid;\n }", "IrpSignInfo selectByPrimaryKey(Long signinfoid) throws SQLException;", "public Integer getNoticeId() {\n return noticeId;\n }", "int getPrimarySnId();", "int getPrimarySnId();", "public Integer getPassengerInfoId() {\n return passengerInfoId;\n }", "public Integer getShuxingid() {\n return shuxingid;\n }", "public Integer getId()\r\n\t\t{ return mapping.getId(); }", "public Long getDiscountpriceinfoId() {\r\n return discountpriceinfoId;\r\n }", "public static native String getSatId(int satNo);", "public Integer getItemDetailId() {\n return itemDetailId;\n }", "public long getId() {\n\t\treturn _tempNoTiceShipMessage.getId();\n\t}", "com.google.protobuf.ByteString getDataInfoIdBytes();", "public Integer getInspartid() {\n return inspartid;\n }", "public com.google.protobuf.ByteString\n getMessageInfoIDBytes() {\n java.lang.Object ref = messageInfoID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n messageInfoID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Integer getCarparksurveyinfoid() {\n return carparksurveyinfoid;\n }", "public void setInfoId(java.lang.String infoId) {\n this.infoId = infoId;\n }", "public java.lang.String getMessageInfoID() {\n java.lang.Object ref = messageInfoID_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n messageInfoID_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Integer getId() {\n return (Integer) get(\"id\");\n }", "public Integer getNoticeId() {\n\t\treturn noticeId;\n\t}", "public String getId() {\r\n\t\treturn sId;\r\n\t}", "public java.lang.String getMessageInfoID() {\n java.lang.Object ref = messageInfoID_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n messageInfoID_ = s;\n }\n return s;\n }\n }", "public Number getDetailId() {\n return (Number)getAttributeInternal(DETAILID);\n }", "public Integer getId(){\n\t\treturn id;\n\t}", "SysNotice selectByPrimaryKey(Integer id);", "public Integer getId() { return id; }", "public Integer getId() { return this.id; }", "public Integer getSourceID()\r\n\t\t{ return mapping.getSourceId(); }", "public int getId() {\n\t\treturn Integer.parseInt(Id);\n\t}", "public Integer getnId() {\n return nId;\n }", "public com.google.protobuf.ByteString\n getMessageInfoIDBytes() {\n java.lang.Object ref = messageInfoID_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n messageInfoID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getPrimarySnId() {\n return primarySnId_;\n }", "public int getPrimarySnId() {\n return primarySnId_;\n }", "public String getCardIdInfo(String pCardNumber){\n \n TypedQuery<Long> getCardIdQuery = em.createQuery(\"SELECT c.cardId FROM Cards c WHERE c.cardNumber = :vCardNumber \", Long.class);\n getCardIdQuery.setParameter(\"vCardNumber\", pCardNumber);\n // Long cardId = getCardIdQuery.getSingleResult();\n Long cardId = 0l;\n List<Long> results = getCardIdQuery.getResultList();\n if(!results.isEmpty()){\n \n cardId = results.get(0);\n }\n TypedQuery<BigInteger> getCustomerIdQuery = em.createQuery(\"SELECT c.customerId FROM Cards c WHERE c.cardNumber = :vCardNumber \", BigInteger.class);\n getCustomerIdQuery.setParameter(\"vCardNumber\", pCardNumber);\n // BigInteger customerId = getCustomerIdQuery.getSingleResult();\n BigInteger customerId = BigInteger.valueOf(0);\n List<BigInteger> results1 = getCustomerIdQuery.getResultList();\n if(!results1.isEmpty()){\n \n customerId = results1.get(0);\n }\n \n String cardIdInfo = cardId + \"/\" + customerId;\n \n return cardIdInfo;\n }", "public Integer getId() \r\n\t{\r\n\t\treturn id;\r\n\t}", "public Integer getId() {\n return this.id;\n }", "public Integer getId() {\n return this.id;\n }", "public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}", "public Integer getId()\n\t{\n\t\treturn this.id; \n\t}", "public String getInoId();", "public Integer processInfoId() {\n return this.processInfoId;\n }", "com.google.protobuf.ByteString\n getMessageInfoIDBytes();", "public Integer getSupplierid() {\r\n return supplierid;\r\n }", "public Integer getId() {\r\n return this.id;\r\n }", "public java.lang.Integer getMetaId();", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }", "public Integer getId() {\r\n return id;\r\n }" ]
[ "0.64461225", "0.6382099", "0.58960485", "0.58576405", "0.55108523", "0.54062355", "0.5348676", "0.5275919", "0.5275919", "0.5275919", "0.5275919", "0.527567", "0.5274254", "0.52291214", "0.5228345", "0.52258074", "0.52258074", "0.52258074", "0.52258074", "0.52036864", "0.51573086", "0.51472753", "0.51472753", "0.51472753", "0.51472753", "0.51243275", "0.5087808", "0.5068836", "0.50643194", "0.50643194", "0.5061504", "0.5058529", "0.50276923", "0.50115", "0.50115", "0.5002525", "0.49848306", "0.4965669", "0.49590313", "0.49532345", "0.49529186", "0.49499905", "0.49442723", "0.49070153", "0.49067754", "0.48905104", "0.4889046", "0.48848718", "0.48748818", "0.4873016", "0.4870591", "0.48613685", "0.48610848", "0.4861067", "0.48518324", "0.48444298", "0.48422047", "0.4832847", "0.4831125", "0.4829941", "0.48272333", "0.482678", "0.482678", "0.48021552", "0.47956267", "0.4792615", "0.4792615", "0.47845143", "0.4780432", "0.47760746", "0.4773361", "0.47729412", "0.4769021", "0.4764037", "0.47568598", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369", "0.4756369" ]
0.7393922
0
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.snacks_info_id
public void setSnacksInfoId(Long snacksInfoId) { this.snacksInfoId = snacksInfoId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getSnacksInfoId() {\n return snacksInfoId;\n }", "public void setInfoPkid(String infoPkid) {\n this.infoPkid = infoPkid == null ? null : infoPkid.trim();\n }", "public void setInfoId(java.lang.String infoId) {\n this.infoId = infoId;\n }", "public Builder setSnId(int value) {\n \n snId_ = value;\n onChanged();\n return this;\n }", "public Builder setSnId(int value) {\n \n snId_ = value;\n onChanged();\n return this;\n }", "public Builder setSnId(int value) {\n \n snId_ = value;\n onChanged();\n return this;\n }", "public Builder setSnId(int value) {\n \n snId_ = value;\n onChanged();\n return this;\n }", "public void setsId(Integer sId) {\n this.sId = sId;\n }", "public String getInfoPkid() {\n return infoPkid;\n }", "@Override\n\tpublic int updateBookshelfinfo(BookshelfinfoEntity bookshelfinfoEntity) {\n\t\treturn this.sqlSessionTemplate.update(\"bookshelfinfo.update\", bookshelfinfoEntity);\n\t}", "@Override\r\n public void setsaleId(int saleid) {\n this.saleId = saleid;\r\n }", "public void setSnackIdentifier(int snackIdentifier) {\n\t\tthis.snackIdentifier = snackIdentifier;\n\t}", "public void setIdSucursal(int idSucursal)\r\n/* 123: */ {\r\n/* 124:135 */ this.idSucursal = idSucursal;\r\n/* 125: */ }", "public void setIdSucursal(int idSucursal)\r\n/* 105: */ {\r\n/* 106:134 */ this.idSucursal = idSucursal;\r\n/* 107: */ }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public void setIdCardNo(String idCardNo) {\n this.idCardNo = idCardNo;\n }", "public void setShopid(Integer shopid) {\n this.shopid = shopid;\n }", "UserInfo setId(long id);", "public void setSellerItemInfoId(Long sellerItemInfoId) {\r\n this.sellerItemInfoId = sellerItemInfoId;\r\n }", "public void setIdSucursal(int idSucursal)\r\n/* 109: */ {\r\n/* 110:179 */ this.idSucursal = idSucursal;\r\n/* 111: */ }", "public void setSalesRep_ID (int SalesRep_ID);", "public void setSalesRep_ID (int SalesRep_ID);", "public void setShuxingid(Integer shuxingid) {\n this.shuxingid = shuxingid;\n }", "public void setShopBasketId(long shopBasketId);", "public void setDetailId(Number value) {\n setAttributeInternal(DETAILID, value);\n }", "public void setIdCardNo(String idCardNo) {\n\t\tthis.idCardNo = idCardNo;\n\t}", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setBookingId(int value) {\n this.bookingId = value;\n }", "public void setIdSucursal(int idSucursal)\r\n/* 98: */ {\r\n/* 99:176 */ this.idSucursal = idSucursal;\r\n/* 100: */ }", "@Override\n\tpublic int addBookshelfinfo(BookshelfinfoEntity bookshelfinfoEntity) {\n\t\treturn this.sqlSessionTemplate.insert(\"bookshelfinfo.add\", bookshelfinfoEntity);\n\t}", "private void setId(int value) {\n \n id_ = value;\n }", "public Builder setPrimarySnId(int value) {\n \n primarySnId_ = value;\n onChanged();\n return this;\n }", "public Builder setPrimarySnId(int value) {\n \n primarySnId_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic void setId(long value) {\n super.setId(value);\n }", "public void setId(int value) {\r\n this.id = value;\r\n }", "public void setID(String idIn) {this.id = idIn;}", "public void setSpid(int param){\n localSpidTracker = true;\n \n this.localSpid=param;\n \n\n }", "organize_infoBean selectByPrimaryKey(Integer id);", "public static void setIdNumber(int idNumber) {\n catalogue.idNumber = idNumber;\n }", "public void setSupplierid(Integer supplierid) {\r\n this.supplierid = supplierid;\r\n }", "private void rsSetInfo(ResultSet rs,ContractNumberInfo info) throws SQLException {\n\n info.setKindId(rsGetLong(rs, \"kind_id\"));\n info.setContractNumber(rsGetLong(rs, \"contract_number\"));\n }", "public void setDiscountpriceinfoId(Long discountpriceinfoId) {\r\n this.discountpriceinfoId = discountpriceinfoId;\r\n }", "public void setId(short value) {\n this.id = value;\n }", "@Override\r\n public int getsaleId() {\n return this.saleId;\r\n }", "public void setId(Integer value) {\n this.id = value;\n }", "@JsonSetter(\"product_id\")\n public void setProductId (Integer value) { \n this.productId = value;\n }", "public Builder setSourceSnId(int value) {\n \n sourceSnId_ = value;\n onChanged();\n return this;\n }", "public void setFlyerId(Integer value) {\n this.flyer_id = value;\n }", "@JsonSetter(\"deliveryId\")\r\n public void setDeliveryId (int value) { \r\n this.deliveryId = value;\r\n }", "public void setItemShopBasketId(long itemShopBasketId);", "void setIdNumber(String idNumber);", "protected void setId(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{\n\t\t\n\t\tString id = rs.getString(UiActionTable.COLUMN_ID);\n\t\t\n\t\tif(id == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tuiAction.setId(id);\n\t}", "public void setId(Integer value) {\n this.id = value;\n }", "public void setId(Integer value) {\n this.id = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(Integer id) { this.id = id; }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(String idIn) {\n this.id = idIn;\n }", "public void setPassengerInfoId(Integer passengerInfoId) {\n this.passengerInfoId = passengerInfoId;\n }", "public void setId(int value) {\n this.id = value;\n }", "private void setSeenInfo(\n int index, SeenInfo value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureSeenInfoIsMutable();\n seenInfo_.set(index, value);\n }", "public void setIdNumber(String idNumber) {\n this.idNumber = idNumber;\n }", "public void setMsisdnId(int value) {\n this.msisdnId = value;\n }", "public Long getSellerItemInfoId() {\r\n return sellerItemInfoId;\r\n }", "@Override\n public final void setItsId(final Long pId) {\n //stub\n }", "public java.lang.String getInfoId() {\n return infoId;\n }", "@Transactional\n public int updateSupContractInfoByPKSelective(SupContractInfo supContractInfo) {\n \n int result = supContractInfoMapper.updateSupContractInfoByPKSelective(supContractInfo);\n return result;\n }", "public void setId( Integer id )\n {\n this.id = id ;\n }", "public void setId(String key, Object value) {\n // remove ID, if empty/0/null\n // if we only skipped it, the existing entry will stay although someone changed it to empty.\n String v = String.valueOf(value);\n if (\"\".equals(v) || \"0\".equals(v) || \"null\".equals(v)) {\n ids.remove(key);\n }\n else {\n ids.put(key, value);\n }\n firePropertyChange(key, null, value);\n\n // fire special events for our well known IDs\n if (Constants.TMDB.equals(key) || Constants.IMDB.equals(key) || Constants.TVDB.equals(key) || Constants.TRAKT.equals(key)) {\n firePropertyChange(key + \"Id\", null, value);\n }\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(long id) {\n id_ = id;\n }", "public void setId_inventario(Integer id_inventario) {\r\n this.id_inventario = id_inventario;\r\n }", "public Builder setHealSnId(int value) {\n \n healSnId_ = value;\n onChanged();\n return this;\n }", "public void setIdOrganizacion(int idOrganizacion)\r\n/* 88: */ {\r\n/* 89:157 */ this.idOrganizacion = idOrganizacion;\r\n/* 90: */ }", "public void setnId(Integer nId) {\n this.nId = nId;\n }", "@Override\n\t\tpublic void setId(final String identifier) {\n\t\t}", "public void setReservationId(int i) { reservationId = i; }", "public void setId(long value) {\r\n this.id = value;\r\n }", "public void setId(long value) {\r\n this.id = value;\r\n }", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "public void setM_Production_ID (int M_Production_ID);", "public void setId(long id) {\n\t\t_tempNoTiceShipMessage.setId(id);\n\t}", "public Integer getShopid() {\n return shopid;\n }", "public void setId(Long value) {\r\n this.id = value;\r\n }", "public void setId( Integer id ) {\n this.id = id ;\n }", "public void setId( Integer id ) {\n this.id = id ;\n }" ]
[ "0.6808763", "0.5721883", "0.5338838", "0.53045523", "0.53045523", "0.53045523", "0.53045523", "0.5257053", "0.51966965", "0.5166445", "0.5142891", "0.49948058", "0.4964125", "0.49247992", "0.48728994", "0.48607445", "0.48489958", "0.4837016", "0.48365226", "0.48351964", "0.48188508", "0.48188508", "0.48072037", "0.47921398", "0.47886416", "0.4758502", "0.47459784", "0.47459784", "0.47361183", "0.4732017", "0.4719144", "0.47179192", "0.47179192", "0.47162515", "0.47143018", "0.47052112", "0.4702298", "0.4700028", "0.46915177", "0.46914306", "0.4681901", "0.4674746", "0.46736538", "0.46725848", "0.467232", "0.4670644", "0.4664995", "0.4662828", "0.46572107", "0.46534228", "0.46517926", "0.46466464", "0.46451786", "0.46451786", "0.4643967", "0.46325067", "0.4627782", "0.4627782", "0.4627782", "0.4627782", "0.4627782", "0.4627782", "0.4627782", "0.4627782", "0.4627782", "0.46273336", "0.4624777", "0.46111643", "0.46107396", "0.4603459", "0.460308", "0.46016836", "0.4590144", "0.45708337", "0.45706874", "0.45697242", "0.45649177", "0.456478", "0.456478", "0.456478", "0.456478", "0.456478", "0.456478", "0.456478", "0.45587987", "0.4558709", "0.45570794", "0.45567587", "0.45509553", "0.4544346", "0.45443", "0.45414233", "0.45414233", "0.4541238", "0.4539596", "0.45267165", "0.45235935", "0.45225105", "0.45221817", "0.45221817" ]
0.7357007
0
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.quantity
public Integer getQuantity() { return quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getQuantity() {\n return this.quantity;\n }", "public Integer getQuantity() {\r\n return this.quantity;\r\n }", "public Integer getQuantity() {\n return this.quantity;\n }", "@Override\n\tpublic int getNoofQuantity() {\n\t String sql=\"SELECT SUM(quantity) FROM supplier_product\";\n\t int total=this.getJdbcTemplate().queryForObject(sql, Integer.class);\n\t\treturn total;\n\t}", "public int getQuantity() {\r\n\t\treturn this.quantity;\r\n\t}", "public Integer getQuantity();", "public int getQuantity() {\r\n\t\treturn quantity;\r\n\t}", "public int getQuantity() {\n return this.quantity;\n }", "String getQuantity() {\n return Integer.toString(quantity);\n }", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public Long getQuantity() {\n return quantity;\n }", "public int getQuantity(){\n\t\treturn quantity;\n\t}", "public int getQuantity() \n\t{\n\t\treturn quantity;\n\t}", "BigDecimal getQuantity();", "public Long getQuantity() {\r\n return quantity;\r\n }", "public int getQuantity() {\r\n return quantity;\r\n }", "public String getQuantity() {\n return quantity;\n }", "public int getQuantity() {\r\n return quantity;\r\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity()\n {\n \treturn quantity;\n }", "public java.math.BigDecimal getQuantity() {\n return quantity;\n }", "public java.math.BigDecimal getQuantity() {\r\n return quantity;\r\n }", "public int getQty() {\n return qty;\n }", "Quantity getQuantity();", "public int getQuantity()\n {\n return quantity;\n }", "public long getQuantity() {\n return quantity_;\n }", "public long getQuantity() {\n return quantity_;\n }", "public long getQuantity() {\n return quantity_;\n }", "public long getQuantity() {\n return quantity_;\n }", "@Schema(description = \"Number of units consumed\")\n public Long getQuantity() {\n return quantity;\n }", "public int getQuantity();", "public int getQuantity() {\r\n return quantity;\r\n }", "int getQuantity();", "public int getQuantity()\r\n {\r\n return _quantity;\r\n }", "long getQuantity();", "long getQuantity();", "int getSellQuantity();", "public float getQuantity() {\n return quantity;\n }", "public double getQuantity() {\n return quantity;\n }", "public int getQuantity() { \n return myOrderQuantity;\n }", "public java.math.BigDecimal getQty() throws java.rmi.RemoteException;", "public Number getQuantity() {\n return (Number) getAttributeInternal(QUANTITY);\n }", "public int getTotalQuantity() {\n\t\treturn totalQuantity;\n\t}", "public Float getQuantity() {\n return quantity;\n }", "public Integer getpQuantity() {\n return pQuantity;\n }", "public int getQty() {\n return (isReturn ? qty * -1 : qty);\n }", "@Override\n\tpublic int getNoofQuantity(String supplierName) {\n\t\tString sql=\"SELECT SUM(h.quantity) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id WHERE supplier_name=?\";\n\t\tint total=this.getJdbcTemplate().queryForObject(sql, Integer.class, supplierName);\n\t\treturn total;\n\t}", "public int getItemQty() {\n return itemQty;\n }", "public org.hl7.fhir.Integer getQuantity()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.Integer target = null;\n target = (org.hl7.fhir.Integer)get_store().find_element_user(QUANTITY$10, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public int getCartQuantity() {\n return cartQuantity;\n }", "public BigDecimal getQtyEntered();", "@Override\r\n public int getItemQuantity() {\n return this.quantity;\r\n }", "public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(Integer quantity) {\r\n this.quantity = quantity;\r\n }", "int getBuyQuantity();", "public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }", "BigDecimal getOriginalQuantity();", "public void setQuantity(String quantity) {\n this.quantity = quantity;\n }", "public BigDecimal getScrappedQty() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"ScrappedQty\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}", "BigDecimal getDisplayQuantity();", "public void setQuantity(int quantity) {\r\n this.quantity = quantity;\r\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public int getBeverageQty() {\n return beverageQty;\n }", "public String getSelectQuantity() {\n\t\tactionStartTime = new Date();\n\t\ttry {\n\t\t\tInteger quantityUnit = promotionProgramMgr.getSelectQuantity(groupKMId, levelKMId);\n\t\t\tresult.put(ERROR, false);\n\t\t\tresult.put(\"quantityUnit\", quantityUnit);\n\t\t} catch (Exception e) {\n\t\t\tLogUtility.logErrorStandard(e, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.getMaxOrderNumber\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn SUCCESS;\n\t}", "public void setQuantity(int qty) {\r\n\t\tthis.quantity = qty;\r\n\t}", "public int getSoupKitchenCount() {\n\n MapSqlParameterSource params = new MapSqlParameterSource();\n //here we want to get total from food pantry table\n String sql = \"SELECT COUNT(*) FROM cs6400_sp17_team073.Soup_kitchen\";\n\n Integer skcount = jdbc.queryForObject(sql,params,Integer.class);\n\n return skcount;\n }", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "@JsonProperty(\"LowQuantity\")\n\tpublic Integer getLowQuantity() {\n\t\treturn lowQuantity;\n\t}", "public Number getInseamQty() {\n return (Number)getAttributeInternal(INSEAMQTY);\n }", "public void setQuantity(int quantity) {\r\n\t\tthis.quantity = quantity;\r\n\t}", "public int getQuantity(String code) {\n if(itemExists(code)) {\n return cart.get(code);\n }\n return 0;\n }", "public void setQuantity(int quantity) {\n\t\tthis.quantity = quantity;\n\t}", "protected Double getQuantity() {\n return quantity;\n }", "public int getpQuantity() {\n return pQuantity;\n }", "public int getAgentsQty();", "public void setQuantity(int quantity)\n\t{\n\t\tthis.quantity = quantity;\n\t}", "public int reduceProductStock(Integer product_id, Integer quantity) throws ProductException {\n\t\tSqlSessionFactory factory=MyBatisUtils.getSqlSessionFactory();\n\t\tSqlSession session=factory.openSession();\n\t\tMap<String,Integer> map=new HashMap<String,Integer>();\n\t\tmap.put(\"quantity\", quantity);\n\t\tmap.put(\"productid\", product_id);\n\t\tint row=session.update(\"com.liangyu.entity.Product.reduceProductStock\",map);\n\t\tsession.commit();\n\t\t\n\t\tsession.close();\n\t\t\n\t\t\n\t\treturn row;\n\t}", "private int getFromSellableInventoryService() {\n Map<String, String> pathVars = Maps.newHashMap();\n pathVars.put(\"location\", LOCATION);\n pathVars.put(\"sku\", SKU);\n try {\n InventoryDto inventory = restTemplate.getForObject(\n \"http://localhost:9093/inventory/locations/{location}/skus/{sku}\", InventoryDto.class, pathVars);\n\n return inventory.getCount();\n } catch (RestClientException e) {\n return 0;\n }\n }", "public BigDecimal getMovementQty() {\n\t\tBigDecimal bd = (BigDecimal) get_Value(\"MovementQty\");\n\t\tif (bd == null)\n\t\t\treturn Env.ZERO;\n\t\treturn bd;\n\t}", "org.hl7.fhir.Quantity getValueQuantity();", "public BigDecimal getMinQuantity() {\n return _minQuantity;\n }", "public int adjustQuantitiesInDB(Ingredient ingredient, int givenQuantity)throws SQLException{ //adds a current type of ingredient to database takes in quantity and ingredient object \r\n\t\tint newQuantity;\r\n\t\tString requiredIngredientName = ingredient.getName();\r\n\t\tString sqlUpdate = \"update stock_ingredients set quantity = quantity + \" + givenQuantity + \" where name = \" + \"'\" + requiredIngredientName + \"'\";\r\n\t\t\t\r\n\t\t//find correct syntax for increasing the quantity by x amount\r\n\r\n\t\tConnection connection = connectToDB(databaseUser, databasePass);\r\n\r\n\t\tPreparedStatement ps = connection.prepareStatement(sqlUpdate);\r\n\r\n\t\tps.executeUpdate();\r\n\r\n\t\tnewQuantity = checkCurrentStockLevels(ingredient);\r\n\r\n\t\tconnection.close();\r\n\t\t\r\n\t\treturn newQuantity;\r\n\r\n\t}", "public void setQuantity(java.math.BigDecimal quantity) {\r\n this.quantity = quantity;\r\n }", "public void setQuantity(java.math.BigDecimal quantity) {\n this.quantity = quantity;\n }", "public double getFruitQuantity() {\r\n\t\treturn fruitQuantity;\r\n\t}", "public void setQuantity(Long quantity) {\r\n this.quantity = quantity;\r\n }" ]
[ "0.6888039", "0.6869323", "0.68669695", "0.6803984", "0.6695879", "0.66547745", "0.6602455", "0.6584102", "0.6558731", "0.65557694", "0.65557694", "0.65557694", "0.65557694", "0.65557694", "0.6545207", "0.6539934", "0.65381324", "0.6535116", "0.65276015", "0.65259504", "0.65198565", "0.64979017", "0.64852875", "0.64852875", "0.64852875", "0.64852875", "0.64852875", "0.64852875", "0.6485255", "0.64759016", "0.64541626", "0.6432004", "0.64011437", "0.63894075", "0.6378016", "0.6378016", "0.63709813", "0.63709813", "0.63369864", "0.6321955", "0.63102835", "0.6293121", "0.6278193", "0.62660736", "0.62660736", "0.61642134", "0.61139965", "0.6079181", "0.6042427", "0.60271716", "0.6023079", "0.6015495", "0.59891206", "0.598314", "0.59537774", "0.59392035", "0.5930834", "0.59221953", "0.5915154", "0.5897619", "0.58656067", "0.5852093", "0.581734", "0.58152336", "0.5805346", "0.5805346", "0.5797869", "0.5774342", "0.57448506", "0.5737965", "0.57116437", "0.57058686", "0.57058686", "0.57058686", "0.5698756", "0.5693149", "0.5688356", "0.5672525", "0.5669922", "0.5669922", "0.5669251", "0.5662188", "0.5657212", "0.5648313", "0.5636567", "0.5636198", "0.56228876", "0.55711347", "0.5564539", "0.55543274", "0.5543671", "0.5536265", "0.5533371", "0.55209666", "0.5498617", "0.5492191", "0.54771525", "0.5467197", "0.5458807" ]
0.6773432
4
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.quantity
public void setQuantity(Integer quantity) { this.quantity = quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int value) {\n this.quantity = value;\n }", "public void setQuantity(int quantity) {\r\n this.quantity = quantity;\r\n }", "public void setQuantity(Integer quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(Integer quantity) {\r\n this.quantity = quantity;\r\n }", "public void setQuantity(int qty) {\r\n\t\tthis.quantity = qty;\r\n\t}", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(int quantity) {\r\n\t\tthis.quantity = quantity;\r\n\t}", "public void setQuantity(int quantity) {\n\t\tthis.quantity = quantity;\n\t}", "public void setQuantity(int quantity)\n\t{\n\t\tthis.quantity = quantity;\n\t}", "@Override\r\n public void ItemQuantity(int quantity) {\n this.quantity = quantity;\r\n }", "public void setQuantity(java.math.BigDecimal quantity) {\r\n this.quantity = quantity;\r\n }", "public void setQuantity(java.math.BigDecimal quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(String quantity) {\n this.quantity = quantity;\n }", "public void setQty(int qty) {\n this.qty = qty;\n }", "public void setQuantity(Long quantity) {\r\n this.quantity = quantity;\r\n }", "public void setQuantity(int quantity) {\n this.quantity = quantity;\n this.updateTotalPrice();\n }", "public void setQuantity(Long quantity) {\n this.quantity = quantity;\n }", "public void setProductStock(int qty){\n\t\tstockQuantity = qty;\r\n\t}", "void setValueQuantity(org.hl7.fhir.Quantity valueQuantity);", "public void setQuantity(int quantity) {\r\n if (quantity >= 0) {\r\n this.quantity = quantity;\r\n }\r\n else {\r\n System.out.print(\"Sorry no negative quantities -- setting to 1\");\r\n this.quantity = 1;\r\n }\r\n }", "public Integer getQuantity() {\n return this.quantity;\n }", "public void setInventory(int inventory){\r\n inventoryNumber += inventory;\r\n }", "public Integer getQuantity() {\r\n return this.quantity;\r\n }", "public Integer getQuantity() {\n return this.quantity;\n }", "public void setQuantity(int quantity) {\n\t\tthis.quantity = quantity;\n\t\tif(this.quantity>0){\n\t\t\tthis.setItemState(false);\n\t\t}\n\t\telse{\n\t\t\tthis.setItemState(false);\n\t\t}\n\t}", "public Integer getQuantity() {\n return quantity;\n }", "public Integer getQuantity() {\n return quantity;\n }", "public void setQuantity(Float quantity) {\n this.quantity = quantity;\n }", "public void setQuantity(float value) {\n this.quantity = value;\n }", "public void setCartQuantity(int cartQuantity) {\n this.cartQuantity = cartQuantity;\n }", "public int getQuantity() {\r\n\t\treturn quantity;\r\n\t}", "public void setpQuantity(Integer pQuantity) {\n this.pQuantity = pQuantity;\n }", "public int getQuantity() {\r\n\t\treturn this.quantity;\r\n\t}", "public void setQuantity(int quant){\n\t\t// store into the instance variable quantity the value of the parameter quant\n\t\tquantity = quant;\n\t}", "public void setQuantity(org.hl7.fhir.Integer quantity)\n {\n generatedSetterHelperImpl(quantity, QUANTITY$10, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public int getQuantity(){\n\t\treturn quantity;\n\t}", "public int getQuantity() {\r\n return quantity;\r\n }", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n\t\treturn quantity;\n\t}", "public int adjustQuantitiesInDB(Ingredient ingredient, int givenQuantity)throws SQLException{ //adds a current type of ingredient to database takes in quantity and ingredient object \r\n\t\tint newQuantity;\r\n\t\tString requiredIngredientName = ingredient.getName();\r\n\t\tString sqlUpdate = \"update stock_ingredients set quantity = quantity + \" + givenQuantity + \" where name = \" + \"'\" + requiredIngredientName + \"'\";\r\n\t\t\t\r\n\t\t//find correct syntax for increasing the quantity by x amount\r\n\r\n\t\tConnection connection = connectToDB(databaseUser, databasePass);\r\n\r\n\t\tPreparedStatement ps = connection.prepareStatement(sqlUpdate);\r\n\r\n\t\tps.executeUpdate();\r\n\r\n\t\tnewQuantity = checkCurrentStockLevels(ingredient);\r\n\r\n\t\tconnection.close();\r\n\t\t\r\n\t\treturn newQuantity;\r\n\r\n\t}", "void setDisplayQuantity(BigDecimal inDisplayQuantity);", "public int getQuantity() {\n return this.quantity;\n }", "public Long getQuantity() {\r\n return quantity;\r\n }", "public Long getQuantity() {\n return quantity;\n }", "public int getQuantity() {\r\n return quantity;\r\n }", "public void setItemsQuantity(Integer itemsQuantity) {\r\n this.itemsQuantity = itemsQuantity;\r\n }", "public int getQuantity() \n\t{\n\t\treturn quantity;\n\t}", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public int getQuantity() {\n return quantity;\n }", "public String getQuantity() {\n return quantity;\n }", "public int getQty() {\n return qty;\n }", "void setQuantity(int quantity) {\n mQuantityTextView.setText(String.valueOf(quantity));\n }", "public void setpQuantity(int pQuantity) {\n this.pQuantity = pQuantity;\n }", "public void setQuantity(Number value) {\n setAttributeInternal(QUANTITY, value);\n }", "public int getQuantity() {\r\n return quantity;\r\n }", "public void updateQuantityOnCommissionPosition(int sessionId, int commissionPositionId, int quantity);", "public void setQtyEntered (BigDecimal QtyEntered);", "public int getQuantity()\n {\n \treturn quantity;\n }", "public int getQuantity()\n {\n return quantity;\n }", "public void setTruckQuantity(int truckQuantity) \n {\n this.truckQuantity = truckQuantity;\n }", "public long getQuantity() {\n return quantity_;\n }", "public long getQuantity() {\n return quantity_;\n }", "protected void setQuantity(Double quantity) {\n this.quantity = quantity;\n }", "public void setQty(java.math.BigDecimal newQty)\n\t\tthrows java.rmi.RemoteException;", "public long getQuantity() {\n return quantity_;\n }", "public long getQuantity() {\n return quantity_;\n }", "public int getQuantity()\r\n {\r\n return _quantity;\r\n }", "@NonNull\n public BasketItemBuilder incrementQuantity() {\n this.quantity++;\n return this;\n }", "public void setShrinkQty (BigDecimal ShrinkQty)\n{\nset_Value (\"ShrinkQty\", ShrinkQty);\n}", "BigDecimal getQuantity();", "@Schema(description = \"Number of units consumed\")\n public Long getQuantity() {\n return quantity;\n }", "public java.math.BigDecimal getQuantity() {\n return quantity;\n }", "public java.math.BigDecimal getQuantity() {\r\n return quantity;\r\n }", "public void setInseamQty(Number value) {\n setAttributeInternal(INSEAMQTY, value);\n }", "public void setCurrentQuantity(int currentQuantity) {\n this.currentQuantity = currentQuantity;\n }", "void setQuantity(int quantity) throws NegativeNumberException {\n if (quantity <= 0) {\n throw new NegativeNumberException(\"Negative number.Try again.\");\n }\n this.quantity = quantity;\n }", "public void setScrappedQty(BigDecimal ScrappedQty) {\n\t\tset_Value(\"ScrappedQty\", ScrappedQty);\n\t}", "public Integer getQuantity();", "public Builder setQuantity(long value) {\n \n quantity_ = value;\n onChanged();\n return this;\n }", "public Builder setQuantity(long value) {\n \n quantity_ = value;\n onChanged();\n return this;\n }", "@Override\r\n public int getItemQuantity() {\n return this.quantity;\r\n }", "@Override\n\tpublic int reduceStock(Integer id, Integer quantity) {\n\t\tConnection conn=null;\n\t\tPreparedStatement pst=null;\n\t\t \n\t\ttry {\n\t\t\tconn=DBUtils.getConnection();\n\t\t\tpst=conn.prepareStatement(\"update product set stock=stock-? where id=?\");\n\t\t\tpst.setInt(1,quantity);\n\t\t\tpst.setInt(2, id);\n\t\t\t\n\t\n\t\t\treturn pst.executeUpdate();\n\t\t\t\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tDBUtils.Close(conn, pst);\n\t\t\t} catch (SQLException 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\treturn 0;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "org.hl7.fhir.Quantity addNewValueQuantity();", "public float getQuantity() {\n return quantity;\n }", "Quantity getQuantity();", "@Override\n\tpublic int getNoofQuantity() {\n\t String sql=\"SELECT SUM(quantity) FROM supplier_product\";\n\t int total=this.getJdbcTemplate().queryForObject(sql, Integer.class);\n\t\treturn total;\n\t}", "String getQuantity() {\n return Integer.toString(quantity);\n }", "public void setInventoryItemId(Number value) {\n setAttributeInternal(INVENTORYITEMID, value);\n }", "public void setInventoryItemId(Number value) {\n setAttributeInternal(INVENTORYITEMID, value);\n }" ]
[ "0.68641686", "0.68641686", "0.68641686", "0.6825052", "0.6803291", "0.6772514", "0.67591757", "0.6750462", "0.6750462", "0.6742993", "0.66965497", "0.6691084", "0.66152483", "0.65829855", "0.6553533", "0.65339047", "0.6359784", "0.63165575", "0.6307378", "0.62914723", "0.6227999", "0.622248", "0.6120587", "0.60975784", "0.6061604", "0.6053566", "0.60342586", "0.60296685", "0.6027519", "0.6027519", "0.6025283", "0.60216373", "0.5978321", "0.597051", "0.5957518", "0.59566635", "0.5950508", "0.5940731", "0.5922528", "0.59044886", "0.5902837", "0.5902837", "0.5902837", "0.5902837", "0.5902837", "0.5902611", "0.58844477", "0.5879859", "0.58698726", "0.5869328", "0.5864882", "0.5851136", "0.58494294", "0.5840104", "0.5840104", "0.5840104", "0.5840104", "0.5840104", "0.5840104", "0.5831657", "0.5828622", "0.5810615", "0.58021337", "0.57915634", "0.5779992", "0.5770047", "0.57695276", "0.5755685", "0.5729158", "0.57199687", "0.5712607", "0.5712607", "0.57061696", "0.57051647", "0.5699011", "0.5699011", "0.56717575", "0.5667398", "0.56638056", "0.56479615", "0.5642938", "0.56114316", "0.5609396", "0.5606928", "0.5606458", "0.5598953", "0.5589607", "0.55825764", "0.5550739", "0.5550739", "0.55455726", "0.55285645", "0.5508766", "0.55060047", "0.54375386", "0.5436462", "0.5428405", "0.54236937", "0.54236937" ]
0.6745209
9
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.receive_time
public Date getReceiveTime() { return receiveTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getReceiveTime() {\n return receiveTime;\n }", "public Date getReceiveTime() {\r\n return receiveTime;\r\n }", "public long getReceiveTimeL() {\n\t\treturn Long.parseLong(receiveTime);\n\t}", "public java.sql.Date getReceiveDate () {\r\n\t\treturn receiveDate;\r\n\t}", "public void setReceiveTime(Date receiveTime) {\n this.receiveTime = receiveTime;\n }", "public void setReceiveTime(Date receiveTime) {\r\n this.receiveTime = receiveTime;\r\n }", "public void setReceiveTime(Date receiveTime) {\n this.receiveTime = receiveTime;\n }", "public Date getSendTime() {\n return sendTime;\n }", "public int getMatchTime() {\n return getIntegerProperty(\"Time\");\n }", "public Date getRptrecvtime() {\n return rptrecvtime;\n }", "com.google.protobuf.Timestamp getSendTime();", "public Date getSendingTime() {\n return sendingTime;\n }", "public Integer getTradeTime() {\n return tradeTime;\n }", "public Integer getShippingTime() {\n return shippingTime;\n }", "java.lang.String getArrivalTime();", "java.lang.String getArrivalTime();", "public long getSentTime();", "public Date getActualSellingTime() {\n return actualSellingTime;\n }", "public Date getTimeSend() {\n return timeSend;\n }", "public String getReservationTime() {\n return reservationTime;\n }", "public long getSendTime() {\n return sendTime_;\n }", "public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}", "public Date getRecvdatetime() {\n\t\treturn recvdatetime;\n\t}", "public long getDropTime() {\n\t\treturn dropTime;\n\t}", "public String getArriveTime() {\n return arriveTime;\n }", "public int getArrivalTime()\n {\n return arrivalTime;\n }", "public Integer getDealTime() {\r\n return dealTime;\r\n }", "public int getArrivalTime(){return arrivalTime;}", "private Time getTimeValueFromRecordBean(RecordBean recordBean){\n DateFormat formatter = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\n Time timeValue = null;\n try {\n timeValue = new Time(formatter.parse((String)recordBean.getValues().get(\"_timestamp\")).getTime());\n\n if (timeValue == null) {\n List<String> items = Arrays.asList(((String)recordBean.getValues().get(\"_message\")).split(\"\\\\s*,\\\\s*\"));\n timeValue = new Time(formatter.parse(items.get(0)).getTime());\n\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return timeValue;\n }", "public Date getOrderTime();", "long getRetrievedTime();", "public long getSendTime() {\n return sendTime_;\n }", "public String getSettlementTime() {\n return this.settlementTime;\n }", "public Date getBuy_time() {\r\n\t\treturn buy_time;\r\n\t}", "public Date getReceiveFileEndTime() {\n return receiveFileEndTime;\n }", "public Timestamp getTransactionTime() {\r\n return (Timestamp) getAttributeInternal(TRANSACTIONTIME);\r\n }", "public int getTime() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getTime();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"time\"));\n }\n }", "public Date getReceiveFileStartTime() {\n return receiveFileStartTime;\n }", "public long getArrivalTime()\n {\n return arrivalTime;\n }", "public Integer getReceiveid() {\n return receiveid;\n }", "private void gettime(){\n\t\t String depart_time = view.shpmTable.getSelection()[0].getAttribute(\"DEPART_TIME\");\n\t\t String unload_time = view.panel.getValue(\"UNLOAD_TIME\").toString();\n\t\t if(!DateUtil.isAfter(unload_time, depart_time)){\n\t\t\t\tdoConfirm(view.panel.getValue(\"UNLOAD_TIME\").toString());\n\t\t\t}else {\n\t\t\t\tMSGUtil.sayWarning(\"到货签收时间不能小于实际发货时间!\");\n\t\t\t}\n\t\t /*Util.db_async.getSingleRecord(\"MAX(DEPART_TIME)\", \"V_SHIPMENT_HEADER\", \" WHERE LOAD_NO='\"+load_no+\"'\", null, new AsyncCallback<HashMap<String,String>>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onSuccess(HashMap<String, String> result) {\n\t\t\t\tString depart_time = result.get(\"MAX(DEPART_TIME)\");\n\t\t\t\tString unload_time = view.panel.getValue(\"UNLOAD_TIME\").toString();\n//\t\t\t\tboolean x =DateUtil.isAfter(unload_time, depart_time);\n\t\t\t\tif(!DateUtil.isAfter(unload_time, depart_time)){\n\t\t\t\t\tdoConfirm(view.panel.getValue(\"UNLOAD_TIME\").toString());\n\t\t\t\t}else {\n\t\t\t\t\tMSGUtil.sayWarning(\"到货签收时间不能小于实际发货时间!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t});*/\n\t}", "Long getMessageSentTimestamp(String msgId);", "public int getRecitationTime(){\n\t\treturn this.recitationTime;\n\t}", "public long getReceivedSecondsTimestamp() {\n try {\n return Long.parseLong(receivedSecondsTimestamp);\n } catch (Exception anyE) {\n final String errorMessage = \"Error parsing received timestamp to long value\";\n log.error(errorMessage, anyE);\n throw new RuntimeException(errorMessage, anyE);\n }\n }", "public void setReceiveDate (java.sql.Date receiveDate) {\r\n\t\tthis.receiveDate = receiveDate;\r\n\t}", "public java.lang.String getSentTime() {\n return sentTime;\n }", "public String getSendTime() {\r\n\t\treturn m_timeSent;\r\n\t}", "public java.math.BigDecimal getReceiveAmount() {\r\n return receiveAmount;\r\n }", "public Time getTime(int columnIndex) throws SQLException {\n\n try {\n debugCodeCall(\"getTime\", columnIndex);\n return get(columnIndex).getTime();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public java.lang.Long getConsumerTime() {\n return consumer_time;\n }", "com.google.protobuf.TimestampOrBuilder getSendTimeOrBuilder();", "DateTime getTransactionTime() {\n assertInTransaction();\n return TRANSACTION_INFO.get().transactionTime;\n }", "public String getTime()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"HH:mm\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "private long getTime(LogModel logModel) throws FieldNotFoundException, ParseException {\n try {\n String timeStr = logModel.getProcedureEndTime();\n long time = Long.parseLong(timeStr);\n if (logModel.getProcedureEndTime().startsWith(\"20\") && timeStr.length() == 14) {\n time = TimeConvertor.convertTime(logModel.getProcedureEndTime(), \"yyyyMMddHHmmss\");\n return time;\n }\n if (time > 4000000000L) {\n // ms\n return time / 1000;\n }\n return time;\n } catch (NumberFormatException e) {\n try {\n long time = TimeConvertor.convertTime(logModel.getProcedureEndTime());\n return time;\n } catch (ParseException ex) {\n throw ex;\n }\n }\n }", "long getTimeBoltDBoltH();", "public Long getReceiveNum() {\r\n return receiveNum;\r\n }", "public Date getActualBuyingTime() {\n return actualBuyingTime;\n }", "public java.sql.Time getTime(int columnIndex) throws SQLException\n {\n return m_rs.getTime(columnIndex);\n }", "public List<Integer> getBlockPlacedDurations() {\n Result<Record1<LocalDateTime>> result = jooq.select(GAME_LOGS.TIMESTAMP)\n .from(GAME_LOGS)\n .where(GAME_LOGS.GAMEID.equal(gameId))\n .and(GAME_LOGS.MESSAGE_TYPE.equal(\"BlockPlacedMessage\"))\n .orderBy(GAME_LOGS.ID.asc())\n .fetch();\n\n List<Integer> durations = new ArrayList<>();\n if (result.isNotEmpty()) {\n // add duration until first block placed\n durations.add((int) getStartTime().until(result.getValue(0, GAME_LOGS.TIMESTAMP), MILLIS));\n for (int i = 1; i < result.size(); i++) {\n durations.add((int) result.getValue(i - 1, GAME_LOGS.TIMESTAMP)\n .until(result.getValue(i, GAME_LOGS.TIMESTAMP), MILLIS));\n }\n }\n return durations;\n }", "boolean hasReceiveTime();", "public Time getTime(String columnName) throws SQLException {\n\n try {\n debugCodeCall(\"getTime\", columnName);\n return get(columnName).getTime();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public java.sql.Time getTime(String columnName) throws SQLException\n {\n return m_rs.getTime(columnName);\n }", "public java.lang.String getSentTime() {\n return sentTime;\n }", "Long getMessageTimestamp(String msgId);", "public String getEventTime2()\n {\n EventTime2 = timeField2.getText();\n return EventTime2;\n }", "com.google.protobuf.StringValue getTransactionDateTime();", "public long getPlayerTimeOffset ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTimeOffset ( ) );\n\t}", "public java.lang.Long getConsumerTime() {\n return consumer_time;\n }", "int getUpdateTriggerTime();", "public int getEventTime() {\n\t\treturn scheduledTime;\n\t}", "public Date getRepairTime() {\n return repairTime;\n }", "public Date getLastReceiveSuccessRequestTime()\r\n {\r\n return lastReceiveSuccessRequestTime;\r\n }", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public Date getSendEmailTime() {\n return sendEmailTime;\n }", "public java.util.Date getShippingTime () {\r\n\t\treturn shippingTime;\r\n\t}", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public long getEventTime();", "long getTimeBoltABoltB();", "java.lang.String getWaitTime();", "public String getEventTime() {\r\n return eventTime;\r\n }", "public Date getEventTime() {\n\t\treturn time;\n\t}", "public String getStopTime() {\n\t\treturn (new Parser(value)).skipString().getString();\n\t}", "public Long getSunsetTime(){\n return sunsetTime;\n }", "@RequestMapping(path = \"/last24hDeliveredItems\", method = RequestMethod.GET)\n public List<DeliveredItem> getLast24hDeliveredItems() {\n Query queryObject = new Query(\"Select * from delivery_item\", \"blablamove\");\n QueryResult queryResult = BlablamovebackendApplication.influxDB.query(queryObject);\n\n InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();\n System.out.println(\"queryResult : \" + queryResult);\n List<DeliveredItem> deliveredItemList = resultMapper\n .toPOJO(queryResult, DeliveredItem.class);\n\n LocalDateTime stop = LocalDateTime.now().minusHours(0);\n LocalDateTime start = LocalDateTime.now().minusHours(24).withSecond(0).withMinute(0).withNano(0);\n\n return deliveredItemList.stream().filter(deliveredItem -> instantIsBetweenDates(deliveredItem.getTime(), start, stop)).collect(Collectors.toList());\n }", "public Long getCreatetime() {\n return createtime;\n }", "public Date getUnbindTime() {\n return unbindTime;\n }", "public String getTime() {\n return this.time;\n }", "long getTimeBoltCBoltD();", "public java.sql.Time getTime(String attr) {\n return (java.sql.Time) super.get(attr);\n }", "public String endTime(){\r\n\t\tsaleEnded = Calendar.getInstance().getTime();\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-mm-dd HH:mm:ss\");\r\n\t\tString endTime = dateFormat.format(time);\r\n\t\treturn endTime;\r\n\t}", "public Date getLastReceiveSuccessResponseTime()\r\n {\r\n return lastReceiveSuccessResponseTime;\r\n }", "public int getArrivalTime() {\r\n\t\treturn arrivalTime;\r\n\t}", "public String getEventTime() {\r\n\t\treturn eventTime;\r\n\t}", "public Long getTime() {\n return time;\n }", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "@Override\n\tpublic List<SendRecord> getSRAfterSendTime(Date sendTime, int c_id) {\n\t\tSession ss =sf.getCurrentSession();\n\t\tString hql=\"from SendRecord sr where sr.sendTime>:sendTime and sr.CId=:c_id\";\n\t\tQuery query=ss.createQuery(hql);\n\t\tquery.setParameter(\"sendTime\", sendTime);\n\t\tquery.setParameter(\"c_id\", c_id);\n\t\treturn query.list();\n\t}", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }" ]
[ "0.66115385", "0.6575475", "0.61791867", "0.58444273", "0.5691323", "0.56633264", "0.5622417", "0.557084", "0.5568241", "0.5551549", "0.5404838", "0.5401532", "0.54002124", "0.5347978", "0.52856165", "0.52856165", "0.52824664", "0.527855", "0.5250315", "0.5238911", "0.5236861", "0.5209336", "0.52076423", "0.51854104", "0.5136069", "0.5131461", "0.5126978", "0.51243234", "0.51082253", "0.51075804", "0.50903004", "0.50784874", "0.50518566", "0.50515336", "0.50466424", "0.50369954", "0.5023929", "0.5020679", "0.50180167", "0.5012209", "0.49883547", "0.49813312", "0.49791768", "0.49783644", "0.49633634", "0.49580684", "0.49542964", "0.49476448", "0.49459785", "0.49455506", "0.49371934", "0.49237296", "0.49165866", "0.49031615", "0.48949847", "0.4883538", "0.48783383", "0.48720813", "0.48639816", "0.48627684", "0.48605755", "0.4860065", "0.4855588", "0.48535725", "0.48445055", "0.48440638", "0.48428112", "0.48412964", "0.4829102", "0.48267505", "0.48173088", "0.48030436", "0.48011097", "0.48011097", "0.47936615", "0.47910526", "0.4775404", "0.4775404", "0.47675225", "0.47653303", "0.47621474", "0.47584185", "0.47442186", "0.47441077", "0.47420192", "0.47407293", "0.473864", "0.47360396", "0.472926", "0.47256508", "0.4723951", "0.47215644", "0.4719479", "0.4717449", "0.47123107", "0.47089815", "0.47029865", "0.47015336", "0.4700343", "0.4700343" ]
0.65464604
2
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.receive_time
public void setReceiveTime(Date receiveTime) { this.receiveTime = receiveTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setReceiveTime(Date receiveTime) {\n this.receiveTime = receiveTime;\n }", "public void setReceiveTime(Date receiveTime) {\r\n this.receiveTime = receiveTime;\r\n }", "public void setReceiveDate (java.sql.Date receiveDate) {\r\n\t\tthis.receiveDate = receiveDate;\r\n\t}", "public Date getReceiveTime() {\n return receiveTime;\n }", "public Date getReceiveTime() {\r\n return receiveTime;\r\n }", "public void setRptrecvtime(Date rptrecvtime) {\n this.rptrecvtime = rptrecvtime;\n }", "public Date getReceiveTime() {\n return receiveTime;\n }", "public void setSendTime(Date sendTime) {\n this.sendTime = sendTime;\n }", "public Builder setSendTime(long value) {\n \n sendTime_ = value;\n onChanged();\n return this;\n }", "public void setSendingTime(Date sendingTime) {\n this.sendingTime = sendingTime;\n }", "public void setTimeSend(Date timeSend) {\n this.timeSend = timeSend;\n }", "public void setReceiveFileEndTime(Date receiveFileEndTime) {\n this.receiveFileEndTime = receiveFileEndTime;\n }", "public void setReceiveFileStartTime(Date receiveFileStartTime) {\n this.receiveFileStartTime = receiveFileStartTime;\n }", "public void setSentTime(Date v) \n {\n \n if (!ObjectUtils.equals(this.sentTime, v))\n {\n this.sentTime = v;\n setModified(true);\n }\n \n \n }", "void setRetrievedTime(long retrievedTime);", "public void setReceiveAmount(java.math.BigDecimal receiveAmount) {\r\n this.receiveAmount = receiveAmount;\r\n }", "public void setActualSellingTime(Date actualSellingTime) {\n this.actualSellingTime = actualSellingTime;\n }", "public void setConsumerTime(java.lang.Long value) {\n this.consumer_time = value;\n }", "private static void fillReserveTime(ResultSet resultSet, ReserveTime reserveTime){\n\t\ttry {\n\t\t\treserveTime.setID(resultSet.getInt(1));\n\t\t\treserveTime.setUnitID(resultSet.getInt(2));\n\t\t\treserveTime.setDateID(resultSet.getInt(3));\n\t\t\treserveTime.setMiddayID(MiddayID.getByValue(resultSet.getInt(4)));\n\t\t\treserveTime.setStartTime(resultSet.getObject(5, LocalTime.class));\n\t\t\treserveTime.setDuration(resultSet.getInt(6));\n\t\t\treserveTime.setStatus(ReserveTimeStatus.getByValue(resultSet.getInt(7)));\n\t\t\treserveTime.setClientID(resultSet.getInt(8));\n\t\t\treserveTime.setResCodeID(resultSet.getString(9));\n\t\t\treserveTime.setReserveTimeGRDateTime(resultSet.getObject(10, LocalDateTime.class));\n\t\t}catch (SQLException e){\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "public java.sql.Date getReceiveDate () {\r\n\t\treturn receiveDate;\r\n\t}", "public void setDeliveryTime(String pDeliveryTime) {\n mDeliveryTime = pDeliveryTime;\n }", "public cz.muni.fi.sdipr.kafka.latency.avro.Payload.Builder setConsumerTime(long value) {\n validate(fields()[2], value);\n this.consumer_time = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "public void setLastReceiveSuccessRequestTime(Date lastReceiveSuccessRequestTime)\r\n {\r\n this.lastReceiveSuccessRequestTime = lastReceiveSuccessRequestTime;\r\n }", "public void setSendEmailTime(Date sendEmailTime) {\n this.sendEmailTime = sendEmailTime;\n }", "public Date getSendTime() {\n return sendTime;\n }", "public org.djbikeshop.www.repairtransportationservice.UpdateDeliveryTimeResponse updateDeliveryTime\n (\n org.djbikeshop.www.repairtransportationservice.UpdateDeliveryTime updateDeliveryTime\n )\n ;", "public void setReceiveNum(Long receiveNum) {\r\n this.receiveNum = receiveNum;\r\n }", "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setRecvdatetime(Date recvdatetime) {\n\t\tthis.recvdatetime = recvdatetime;\n\t}", "public void setReceiveTimeout(long receiveTimeout) {\n\t\tthis.receiveTimeout = receiveTimeout;\n\t}", "public long getReceiveTimeL() {\n\t\treturn Long.parseLong(receiveTime);\n\t}", "public void set(final long timeValue) {\n stamp = timeValue;\n }", "public void setModifiyTime(Date modifiyTime) {\n this.modifiyTime = modifiyTime;\n }", "public void setShipped(){\n this.shipped = new Date();\n }", "public void setMovementDate (Timestamp MovementDate);", "@Override\r\n\tpublic void addMessage(Integer receive_id, Integer send_id, String content,Timestamp createtime) {\n\t\tString sql=\"insert into message(receive_id,send_id,content,createtime,isread,result) values(?,?,?,?,?,?)\";\r\n\t\tObject[] args=new Object[] {receive_id,send_id,content,createtime,0,0};\r\n\t\ttry {\r\n\t\t\tupdate(conn, sql, args);\r\n\t\t} catch (SQLException 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 void setDropTime(long dropTime) {\n\t\tthis.dropTime = dropTime;\n\t}", "public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }", "void setFetchedDate(long time);", "public void setTradeTime(Integer tradeTime) {\n this.tradeTime = tradeTime;\n }", "void setReportTime(long time);", "public void setReceiveid(Integer receiveid) {\n this.receiveid = receiveid;\n }", "public Date getActualSellingTime() {\n return actualSellingTime;\n }", "public void setReceiveTimeout(int receiveTimeout){\n return; //TODO codavaj!!\n }", "public void setActualBuyingTime(Date actualBuyingTime) {\n this.actualBuyingTime = actualBuyingTime;\n }", "public Date getSendingTime() {\n return sendingTime;\n }", "public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }", "public void setReservationTime(String reservationTime) {\n this.reservationTime = reservationTime;\n }", "public com.opentext.bn.converters.avro.entity.DocumentEvent.Builder setSentTime(java.lang.String value) {\n validate(fields()[22], value);\n this.sentTime = value;\n fieldSetFlags()[22] = true;\n return this;\n }", "public void setSigntime(LocalDateTime signtime) {\n this.signtime = signtime;\n }", "Order setDeliveredStatus(Order order, User user, Date deliveredTime);", "public void setTransactionTime(Timestamp value) {\r\n setAttributeInternal(TRANSACTIONTIME, value);\r\n }", "public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }", "public void setBlacklistTime(long blacklistTime) {\n\t\tthis.blacklistTime = blacklistTime;\n\t}", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public Date getRptrecvtime() {\n return rptrecvtime;\n }", "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setTime(String time) {\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "public void setShippingTime(Integer shippingTime) {\n this.shippingTime = shippingTime;\n }", "public void setProvisionTime(java.util.Calendar param){\n localProvisionTimeTracker = true;\n \n this.localProvisionTime=param;\n \n\n }", "public void setTime(long time)\n {\n this.time = time;\n\n }", "public void setReceiveAgentID(java.lang.String receiveAgentID) {\r\n this.receiveAgentID = receiveAgentID;\r\n }", "public void setLastReceiveSuccessResponseTime(Date lastReceiveSuccessResponseTime)\r\n {\r\n this.lastReceiveSuccessResponseTime = lastReceiveSuccessResponseTime;\r\n }", "public void setModifiTime(Date modifiTime) {\n this.modifiTime = modifiTime;\n }", "public void setRepairTime(Date repairTime) {\n this.repairTime = repairTime;\n }", "public void setARRIVAL_AT_LOC_TIME(java.sql.Time value)\n {\n if ((__ARRIVAL_AT_LOC_TIME == null) != (value == null) || (value != null && ! value.equals(__ARRIVAL_AT_LOC_TIME)))\n {\n _isDirty = true;\n }\n __ARRIVAL_AT_LOC_TIME = value;\n }", "public void setTime(long time) {\r\n this.time = time;\r\n }", "public int getArrivalTime(){return arrivalTime;}", "public void setShippingTime (java.util.Date shippingTime) {\r\n\t\tthis.shippingTime = shippingTime;\r\n\t}", "@Override\n\tpublic boolean updateProductReceiveTimeStamp(RetailerInventoryDTO queryArguments) throws RetailerException, ConnectException {\n\t\tboolean receiveTimestampUpdated = false;\n\t\t/*\n\t\t * required arguments in `queryArguments`\n\t\t * productUIN, productRecieveTime\n\t\t * \n\t\t * un-required\n\t\t * productDispatchTime, productShelfTimeOut, productCategory, retailerUserId\n\t\t */\n\t\tRetailerInventoryEntity newItem = new RetailerInventoryEntity();\n\t\tnewItem.setProductUniqueId(queryArguments.getProductUIN());\n\t\tnewItem.setProductReceiveTimestamp(queryArguments.getProductRecieveTime());\n\t\t\n\t\tTransaction transaction = null;\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n transaction = session.beginTransaction();\n List<RetailerInventoryEntity> itemList = session.createQuery(\"from RetailerInventoryEntity\", RetailerInventoryEntity.class).list();\n boolean productNotFound = true;\n for (RetailerInventoryEntity item : itemList) {\n \tif (item.getProductUniqueId().equals(newItem.getProductUniqueId())) {\n \t\tnewItem.setRetailerId(item.getRetailerId());\n \t\tnewItem.setProductCategory(item.getProductCategory());\n \t\tnewItem.setProductDispatchTimestamp(item.getProductDispatchTimestamp());\n \t\tproductNotFound = false;\n \t\tbreak;\n \t}\n }\n if (productNotFound) {\n \tGoLog.logger.error(\"Product is not a part of the Inventory\");\n \tthrow new RetailerException (\"Product is not a part of the Inventory\");\n } else {\n \tsession.merge(newItem);\n }\n transaction.commit();\n } catch (IllegalStateException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Method has been invoked at an illegal or inappropriate time\");\n } catch (RollbackException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"Could not Commit changes to Retailer Inventory\");\n } catch (PersistenceException error) {\n \tGoLog.logger.error(error.getMessage());\n \tthrow new RetailerException (\"The item is already present in the inventory\");\n } finally {\n \tsession.close();\n }\n receiveTimestampUpdated = true;\n\t\treturn receiveTimestampUpdated;\n\t}", "public void setClosedTime(Date closedTime) {\n this.closedTime = closedTime;\n }", "public void setReceiverId(int v) \n {\n \n if (this.receiverId != v)\n {\n this.receiverId = v;\n setModified(true);\n }\n \n \n }", "public String getSettlementTime() {\n return this.settlementTime;\n }", "public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }", "public void setTime(long time) {\n this.time = time;\n }", "public void setArrivalTime(int arrivalTime)\n\t{\n\t\tthis.arrivalTime = arrivalTime;\n\t}", "public void xsetStopTime(org.landxml.schema.landXML11.GPSTime stopTime)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.landxml.schema.landXML11.GPSTime target = null;\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().find_attribute_user(STOPTIME$24);\r\n if (target == null)\r\n {\r\n target = (org.landxml.schema.landXML11.GPSTime)get_store().add_attribute_user(STOPTIME$24);\r\n }\r\n target.set(stopTime);\r\n }\r\n }", "public void setTime(long time) {\r\n\t\tthis.time = time;\r\n\t}", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ }", "private static void fillClientReserveTime(ResultSet resultSet\n\t\t\t, ClientReservedTime clientReservedTime) {\n\t\ttry {\n\t\t\tclientReservedTime.setReserveTimeID(resultSet.getInt(\"id\"));\n\t\t\tclientReservedTime.setDayID(resultSet.getInt(\"dayID\"));\n\t\t\tclientReservedTime.setStartTime(resultSet.getObject(\"startTime\", LocalTime.class));\n\t\t\tclientReservedTime.setDuration(resultSet.getInt(\"duration\"));\n\t\t\tclientReservedTime.setReserveCodeID(resultSet.getString(\"reserveCode\"));\n\t\t\tclientReservedTime.setGregorianDateTime(resultSet.getObject(\"gregorianDate\", LocalDateTime.class));\n\t\t\tclientReservedTime.setClientID(resultSet.getInt(\"clientID\"));\n\t\t\tclientReservedTime.setCompanyID(resultSet.getInt(\"companyID\"));\n\t\t\tclientReservedTime.setCompanyName(resultSet.getString(\"companyName\"));\n\t\t\tclientReservedTime.setUnitID(resultSet.getInt(\"unitID\"));\n\t\t\tclientReservedTime.setUnitName(resultSet.getString(\"unitName\"));\n\t\t\tclientReservedTime.setCost(resultSet.getInt(\"cost\"));\n\t\t\tclientReservedTime.setCompanyCover(resultSet.getString(\"companyCover\"));\n\t\t\tclientReservedTime.setServices(TableReserveTimeServices\n\t\t\t\t\t.getServices(clientReservedTime.getReserveTimeID()));\n\t\t}catch (SQLException e) {\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "public void setSit_time(int time)\n\t{\n\t\tsit_time = time - enter_time;\t\n\t}", "public void setUnbindTime(Date unbindTime) {\n this.unbindTime = unbindTime;\n }", "public void setLastSendRequestTime(Date lastSendRequestTime)\r\n {\r\n this.lastSendRequestTime = lastSendRequestTime;\r\n }", "private static void fillBriefServerTimes(ResultSet resultSet, List<ReserveTime> reserveTimes) {\n\t\ttry {\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tReserveTime reserveTime = new ReserveTime();\n\t\t\t\treserveTime.setID(resultSet.getInt(1));\n\t\t\t\treserveTime.setDateID(resultSet.getInt(2));\n\t\t\t\treserveTime.setResCodeID(resultSet.getString(3));\n\t\t\t\treserveTime.setStartTime(resultSet.getObject(4, LocalTime.class));\n\t\t\t\treserveTimes.add(reserveTime);\n\t\t\t}\n\t\t}catch (SQLException e){\n\t\t\tLogger.getLogger(\"Exception\").log(Level.SEVERE, \"Exception \" + e);\n\t\t}\n\t}", "public Gateway setClosingTime(java.lang.String closingTime) {\n return genClient.setOther(closingTime, CacheKey.closingTime);\n }", "public void setStopTime(double stopTime)\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(STOPTIME$24);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STOPTIME$24);\r\n }\r\n target.setDoubleValue(stopTime);\r\n }\r\n }", "private void setTime()\n\t{\n\t\t//local variable \n\t\tString rad = JOptionPane.showInputDialog(\"Enter the time spent bicycling: \"); \n\t\t\n\t\t//convert to int\n\t\ttry {\n\t\t\tbikeTime = Integer.parseInt(rad);\n\t\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input.\");\n\t\t\t}\n\t}", "public void setCloseTime(Long closeTime) {\n this.closeTime = closeTime;\n }", "public void setCreatetime(String createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(String createtime) {\n this.createtime = createtime;\n }", "private void setCreateTime(long createTime) {\n this.createTime = createTime;\n }" ]
[ "0.6780583", "0.6756326", "0.59828633", "0.56861293", "0.56580585", "0.56092876", "0.55643", "0.5522273", "0.5415515", "0.53838277", "0.53746456", "0.53604", "0.53415596", "0.5294321", "0.5264244", "0.51285154", "0.49901593", "0.49788228", "0.49481234", "0.49430475", "0.4920733", "0.4895307", "0.48869258", "0.48764604", "0.48621643", "0.4858939", "0.48558968", "0.48411986", "0.48411986", "0.48316774", "0.4802114", "0.47935468", "0.4771984", "0.4764397", "0.47541133", "0.4730416", "0.471854", "0.47155976", "0.4704931", "0.4700359", "0.46972394", "0.46958768", "0.46929044", "0.46881723", "0.46577767", "0.46536982", "0.46412706", "0.46330407", "0.46292767", "0.46241087", "0.46197417", "0.46112096", "0.46089083", "0.46065167", "0.46033093", "0.46011466", "0.46011466", "0.45964852", "0.45888293", "0.45888293", "0.45877865", "0.45764622", "0.45764622", "0.45764622", "0.45613655", "0.4546605", "0.45369676", "0.45210898", "0.4510722", "0.45048913", "0.4503547", "0.45006734", "0.44990185", "0.4496834", "0.4496072", "0.44932407", "0.4493109", "0.4490288", "0.44832158", "0.44815776", "0.44810322", "0.44779506", "0.44712335", "0.44631135", "0.44559062", "0.44559062", "0.44559062", "0.44541302", "0.44513717", "0.44489393", "0.44473884", "0.44446406", "0.44438964", "0.4440818", "0.44331652", "0.44317508", "0.44228292", "0.44210455", "0.44210455", "0.44202378" ]
0.67010486
2
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.deleted
public Byte getDeleted() { return deleted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getDeleted() {\n return deleted;\n }", "public Long deleted() {\n return this.deleted;\n }", "public Integer getIsdeleted() {\n return isdeleted;\n }", "public Integer getIsDeleted() {\n return isDeleted;\n }", "public java.lang.Boolean getDeleted();", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\r\n\t\treturn deleted;\r\n\t}", "public String getIsDeleted() {\n return isDeleted;\n }", "public String getIsDeleted() {\n return isDeleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public boolean getDeleted() {\n return deleted;\n }", "public Integer getIsDeleted() {\r\n\t\treturn isDeleted;\r\n\t}", "@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }", "public Byte getIsDeleted() {\n return isDeleted;\n }", "public Byte getIsDeleted() {\n return isDeleted;\n }", "public Byte getIsDeleted() {\r\n return isDeleted;\r\n }", "@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }", "public String getIsDeleted() {\n\t\treturn isDeleted;\n\t}", "public String getDeleteStatus() {\n return deleteStatus;\n }", "public Boolean getDeleted() {\n return mDeleted;\n }", "public Boolean getIsDeleted() {\r\n return isDeleted;\r\n }", "public Boolean getIsDeleted() {\n return isDeleted;\n }", "@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tboolean deleted();", "@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGTShipPosition.getIsDelete();\n\t}", "public void setDeleted(Integer deleted) {\n this.deleted = deleted;\n }", "public Date getDeletedAt() {\n return deletedAt;\n }", "public Integer getDeleteflag() {\n return deleteflag;\n }", "@Override\n \t\t\t\tpublic boolean isDeleted() {\n \t\t\t\t\treturn false;\n \t\t\t\t}", "public Integer getIsdelete() {\n return isdelete;\n }", "public boolean isDeleted()\r\n {\r\n return getSemanticObject().getBooleanProperty(swb_deleted);\r\n }", "public Integer getIsdelete() {\r\n return isdelete;\r\n }", "public Boolean getIsDeleted() {\n\t\treturn isDeleted;\n\t}", "public boolean getDeleted() {\n\t\treturn _primarySchoolStudent.getDeleted();\n\t}", "@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGtStatus.getIsDelete();\n\t}", "@Override\r\n\tpublic int deletedCheck(CookVO vo) throws Exception {\n\t\treturn session.update(\"com.mapper.cook.deleted\",vo);\r\n\t}", "public java.lang.Boolean getIsDeleted() {\r\n return isDeleted;\r\n }", "public Boolean getDeleted() throws NotLoadedException {\n return deleted.getValue();\n }", "@Override\n\tpublic int getMarkedAsDelete() {\n\t\treturn _dmGTShipPosition.getMarkedAsDelete();\n\t}", "public CustomSql getCustomSqlDelete();", "public DateTime deletedAt() {\n return this.deletedAt;\n }", "public Integer getDeleteTag() {\n return deleteTag;\n }", "@java.lang.Override\n public boolean hasDeletedItemKey() {\n return inventoryItemCase_ == 2;\n }", "@ApiModelProperty(value = \"True if campaign/flow has been archived\")\r\n public Boolean isDeleted() {\r\n return deleted;\r\n }", "@java.lang.Override\n public boolean hasDeletedItemKey() {\n return inventoryItemCase_ == 2;\n }", "public Integer getIsdelete() {\n\t\treturn isdelete;\n\t}", "public boolean isDeleted() {\r\n\treturn isDeleted;\r\n}", "public boolean isDeleted();", "public Boolean isDeleted() {\n\t\treturn this.deleted;\n\t\t\n\t}", "@Column(name = \"isDelete\")\r\n\tpublic Boolean getIsDelete() {\r\n\t\treturn this.isDelete;\r\n\t}", "public String getIsdelete() {\n return isdelete;\n }", "public String getIsdelete() {\n return isdelete;\n }", "public String getIs_delete() {\n return is_delete;\n }", "@Override\n\tpublic int getMarkedAsDelete() {\n\t\treturn _dmGtStatus.getMarkedAsDelete();\n\t}", "public String deletedBy() {\n return this.deletedBy;\n }", "public String getDeleteFlag() {\r\n return deleteFlag;\r\n }", "public boolean isDeleted() {\n return deleted;\n }", "public String getDeleteFlag() {\n return deleteFlag;\n }", "public void setDeleted(boolean deleted) {\n this.deleted = deleted;\n }", "public Set getDeleted() {\r\n return Collections.unmodifiableSet(deleted);\r\n }", "@ApiModelProperty(value = \"True if this gift certificate was deleted.\")\n public Boolean isDeleted() {\n return deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "@Schema(example = \"1592180992\", required = true, description = \"Time when labeling was deleted (timestamp); 0 if it was not removed\")\n public Long getDeletedAt() {\n return deletedAt;\n }", "boolean isDeleted();", "public int deleteOrderItem(int d) {\n int ok = 0;\n try {\n String query = \"DELETE FROM order_Item WHERE id_Order_Item = ?;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, d);\n\n ok = st.executeUpdate(); //Execute the Delete\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "protected String getDeleteSQL() {\n\t\treturn queryData.getString(\"DeleteSQL\");\n\t}", "public void setDeleted(Byte deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\r\n\t\tthis.deleted = deleted;\r\n\t}", "public void setIsdeleted(Integer isdeleted) {\n this.isdeleted = isdeleted;\n }", "public boolean isDeleted() {\n\t\treturn deleted;\n\t}", "public java.lang.String getDelete() {\n return instance.getDelete();\n }", "@IcalProperty(pindex = PropertyInfoIndex.DELETED)\n public void setDeleted(final boolean val) {\n deleted = val;\n }", "@java.lang.Override\n public POGOProtos.Rpc.HoloInventoryKeyProto getDeletedItemKey() {\n if (inventoryItemCase_ == 2) {\n return (POGOProtos.Rpc.HoloInventoryKeyProto) inventoryItem_;\n }\n return POGOProtos.Rpc.HoloInventoryKeyProto.getDefaultInstance();\n }", "public boolean isDeleted()\r\n\t{\r\n\t\treturn deletedFlag;\r\n\t}", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "public Delete getDelete() {\n\t\treturn this.delete;\n\t}", "@DISPID(75)\r\n\t// = 0x4b. The runtime will prefer the VTID if present\r\n\t@VTID(80)\r\n\tboolean isDeleted();", "public boolean getDelete() {\n\t\treturn delete;\n\t}", "public void setDeleted(boolean deleted) {\n\t\tthis.deleted = deleted;\n\t}", "@java.lang.Override\n public POGOProtos.Rpc.HoloInventoryKeyProtoOrBuilder getDeletedItemKeyOrBuilder() {\n if (inventoryItemCase_ == 2) {\n return (POGOProtos.Rpc.HoloInventoryKeyProto) inventoryItem_;\n }\n return POGOProtos.Rpc.HoloInventoryKeyProto.getDefaultInstance();\n }", "public String getDeleteFlag() {\r\n\t\treturn deleteFlag;\r\n\t}", "public void setDeleted(boolean deleted);", "public Boolean getIsdelete() {\r\n return isdelete;\r\n }", "public void setDeleted(java.lang.Boolean deleted);", "public TagEvent getTagDeletedEvent() {\n return deletedEvent;\n }", "public boolean isIsDeleted() {\n return isDeleted;\n }", "public Byte getDeleteFlag() {\n return deleteFlag;\n }", "@Nullable\n public TupleExpr getDeleteExpr() {\n return this.deleteExpr;\n }", "public int getIsDelete() {\n\t\treturn _dmHistoryMaritime.getIsDelete();\n\t}", "public boolean getDelete() {\n\t\t\treturn delete.get();\n\t\t}", "public Byte getIsDelete() {\n return isDelete;\n }", "public Byte getIsDelete() {\n return isDelete;\n }", "public void setIsDeleted(Integer isDeleted) {\r\n\t\tthis.isDeleted = isDeleted;\r\n\t}", "public DateTime getDeletionTime() {\n return deleted;\n }" ]
[ "0.6651239", "0.6633179", "0.6414577", "0.6268867", "0.6222504", "0.6210904", "0.61728626", "0.6166923", "0.6166923", "0.61435395", "0.61435395", "0.61435395", "0.61435395", "0.6088394", "0.6058042", "0.60321856", "0.5997703", "0.5997703", "0.59792674", "0.5966518", "0.59385854", "0.5920363", "0.59096324", "0.58822644", "0.5847838", "0.58244413", "0.57045126", "0.5664123", "0.5663875", "0.5656493", "0.5652187", "0.5649109", "0.5646879", "0.5644918", "0.56429005", "0.56281865", "0.56264746", "0.56209356", "0.5611795", "0.5607453", "0.55926275", "0.5552778", "0.5543794", "0.55435866", "0.553532", "0.5534926", "0.5505286", "0.55035704", "0.5502347", "0.5497757", "0.5474834", "0.5474435", "0.54741645", "0.54741645", "0.54641825", "0.5460378", "0.5443477", "0.5439059", "0.54296535", "0.54197073", "0.54189074", "0.5400372", "0.5387787", "0.5380935", "0.5380935", "0.5380935", "0.5380935", "0.5380935", "0.5372749", "0.53662515", "0.5354337", "0.5351227", "0.534818", "0.5345749", "0.53428227", "0.53424877", "0.5342346", "0.5340526", "0.53383756", "0.5337104", "0.5333799", "0.53294677", "0.53287345", "0.53243613", "0.5316576", "0.53098226", "0.53060013", "0.5304272", "0.5299325", "0.5298339", "0.5288049", "0.5254229", "0.5249032", "0.52419865", "0.52411246", "0.52383107", "0.5215538", "0.5215538", "0.52095515", "0.52070224" ]
0.6114874
13
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.deleted
public void setDeleted(Byte deleted) { this.deleted = deleted; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDeleted(Integer deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(java.lang.Boolean deleted);", "public void setIsdeleted(Integer isdeleted) {\n this.isdeleted = isdeleted;\n }", "public void setDeleted(boolean deleted);", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(Boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted();", "@IcalProperty(pindex = PropertyInfoIndex.DELETED)\n public void setDeleted(final boolean val) {\n deleted = val;\n }", "public void setDeleted(Boolean deleted) {\r\n\t\tthis.deleted = deleted;\r\n\t}", "public void setIsDeleted(Integer isDeleted) {\r\n\t\tthis.isDeleted = isDeleted;\r\n\t}", "public void setIsDeleted(Integer isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setIsdeleted( Boolean isdeleted )\n {\n this.isdeleted = isdeleted;\n }", "public void setDeleted(boolean deleted) {\n\t\tthis.deleted = deleted;\n\t}", "public void setDeleted(final boolean deleted) {\n this.deleted = deleted;\n }", "public void setDeleted(boolean deleted) {\n\t\t_primarySchoolStudent.setDeleted(deleted);\n\t}", "public void setDeleted(final Boolean deleted) {\n\t\tthis.deleted = deleted;\n\t}", "public void setDeleted(boolean value)\r\n {\r\n getSemanticObject().setBooleanProperty(swb_deleted, value);\r\n }", "public void setIsDeleted(Byte isDeleted) {\r\n this.isDeleted = isDeleted;\r\n }", "public void setIsDeleted(String isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setIsDeleted(Byte isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setIsDeleted(Byte isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setIsDeleted(String isDeleted) {\n\t\tthis.isDeleted = isDeleted;\n\t}", "public void setIsDeleted(Boolean isDeleted) {\r\n this.isDeleted = isDeleted;\r\n }", "public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}", "public void setIsDeleted(Boolean isDeleted) {\n this.isDeleted = isDeleted;\n }", "public void setIsDeleted(boolean isDeleted) {\n this.isDeleted = isDeleted;\n }", "@Override\r\n\tpublic int deletedCheck(CookVO vo) throws Exception {\n\t\treturn session.update(\"com.mapper.cook.deleted\",vo);\r\n\t}", "public void setIsDeleted(Boolean isDeleted) {\n\t\tthis.isDeleted = isDeleted;\n\t}", "public void setIsDeleted(java.lang.Boolean isDeleted) {\r\n this.isDeleted = isDeleted;\r\n }", "@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(24)\n\tvoid deleted(boolean pVal);", "public void setIsDeleted(String isDeleted) {\n this.isDeleted = isDeleted == null ? null : isDeleted.trim();\n }", "public void markAsDeleted() {\n\t\tthis.setDeleted(true);\t\t\n\t}", "@Override\n\tpublic void setIsDelete(int isDelete) {\n\t\t_dmGTShipPosition.setIsDelete(isDelete);\n\t}", "public Long deleted() {\n return this.deleted;\n }", "public Integer getDeleted() {\n return deleted;\n }", "public void setIsdelete(Integer isdelete) {\n\t\tthis.isdelete = isdelete;\n\t}", "public void setDeletedAt(Date deletedAt) {\n this.deletedAt = deletedAt;\n }", "public Integer getIsdeleted() {\n return isdeleted;\n }", "@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tboolean deleted();", "public void setIsdelete(Integer isdelete) {\r\n this.isdelete = isdelete;\r\n }", "public void setIsDelete( Integer isDelete ) {\n this.isDelete = isDelete;\n }", "public void setIsdelete(Integer isdelete) {\n this.isdelete = isdelete;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "@Override\n\tpublic void setIsDelete(int isDelete) {\n\t\t_dmGtStatus.setIsDelete(isDelete);\n\t}", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public Boolean getDeleted() {\n return deleted;\n }", "public int deleteOrderItem(int d) {\n int ok = 0;\n try {\n String query = \"DELETE FROM order_Item WHERE id_Order_Item = ?;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, d);\n\n ok = st.executeUpdate(); //Execute the Delete\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "public java.lang.Boolean getDeleted();", "@Override\n\tpublic int delete(List<OrderItem> objectsToDelete) throws SQLException {\n\t\treturn 0;\n\t}", "public Boolean getDeleted() {\r\n\t\treturn deleted;\r\n\t}", "public void andLogicalDeleted(boolean deleted) {\n setIsDelete(deleted ? IS_DELETED : NOT_DELETED);\n }", "public void setDelete(boolean d) {\n\t\t\tdelete.set(d);\n\t\t}", "public Integer getIsDeleted() {\n return isDeleted;\n }", "@java.lang.Override\n public boolean hasDeletedItemKey() {\n return inventoryItemCase_ == 2;\n }", "@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }", "@java.lang.Override\n public boolean hasDeletedItemKey() {\n return inventoryItemCase_ == 2;\n }", "public Builder setDeleted(boolean value) {\n\n deleted_ = value;\n bitField0_ |= 0x00000040;\n onChanged();\n return this;\n }", "@Override\n \t\t\t\tpublic boolean isDeleted() {\n \t\t\t\t\treturn false;\n \t\t\t\t}", "public boolean getDeleted() {\n return deleted;\n }", "public void setDeleteStatus(String deleteStatus) {\n this.deleteStatus = deleteStatus;\n }", "public Boolean getIsDeleted() {\r\n return isDeleted;\r\n }", "CamelJpaConsumerBindingModel setConsumeDelete(Boolean consumeDelete);", "public void setDeleteflag(Integer deleteflag) {\n this.deleteflag = deleteflag;\n }", "public String getIsDeleted() {\n return isDeleted;\n }", "public String getIsDeleted() {\n return isDeleted;\n }", "public void setIs_delete(String is_delete) {\n this.is_delete = is_delete;\n }", "@Override\n public void delete(SideDishEntity entity) {\n\n }", "@ApiModelProperty(value = \"True if campaign/flow has been archived\")\r\n public Boolean isDeleted() {\r\n return deleted;\r\n }", "public void setIsDelete(int isDelete) {\n\t\t_dmHistoryMaritime.setIsDelete(isDelete);\n\t}", "public void deleteFoodBill(Bill deleteFood) {\nString sql =\"DELETE FROM bills WHERE Id_food = ?\";\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tpreparedStatement.setInt(1, deleteFood.getId());\n\t\tpreparedStatement.execute();\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n}", "public void setIsdelete(Boolean isdelete) {\r\n this.isdelete = isdelete;\r\n }", "public void delete() {\n\t\tdeleted = true;\n\t}", "public void delete(UsStatePk pk) throws UsStateDaoException;", "public Byte getIsDeleted() {\r\n return isDeleted;\r\n }", "public void andLogicalDeleted(boolean deleted) {\n setIsDeleted(deleted ? DELETED : NOT_DELETED);\n }", "public Boolean getIsDeleted() {\n return isDeleted;\n }", "public void setIsDelete(Byte isDelete) {\n this.isDelete = isDelete;\n }", "public void setIsDelete(Byte isDelete) {\n this.isDelete = isDelete;\n }", "public Byte getIsDeleted() {\n return isDeleted;\n }", "public Byte getIsDeleted() {\n return isDeleted;\n }", "@java.lang.Override\n public boolean getDeleted() {\n return deleted_;\n }", "public void andLogicalDeleted(boolean deleted) {\n setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());\n }", "public void andLogicalDeleted(boolean deleted) {\n setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());\n }", "public void andLogicalDeleted(boolean deleted) {\n setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());\n }", "public void setDeletedDateTime(LocalDateTime deletedDateTime) {\n\t\tthis.deletedDateTime = deletedDateTime;\n\t}", "@Override\n\tpublic void setMarkedAsDelete(int markedAsDelete) {\n\t\t_dmGTShipPosition.setMarkedAsDelete(markedAsDelete);\n\t}", "public void setDelete(boolean delete) {\n\t\tthis.delete = delete;\n\t}", "public Byte getDeleted() {\n return deleted;\n }", "@Override\n\tpublic int setDelete(BoardVO boardVO) throws Exception {\n\t\treturn qnaMapper.setDelete(boardVO);\n\t}", "public Integer getIsDeleted() {\r\n\t\treturn isDeleted;\r\n\t}", "public Builder setDeletedItemKey(POGOProtos.Rpc.HoloInventoryKeyProto value) {\n if (deletedItemKeyBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n inventoryItem_ = value;\n onChanged();\n } else {\n deletedItemKeyBuilder_.setMessage(value);\n }\n inventoryItemCase_ = 2;\n return this;\n }", "public void deleteCardInventory() {\n try {\n System.out.println(\"********************ServiceBean=>deleteCardInventory********\");\n if (cardInventoryDataBean != null) {\n cardInventoryTransformerBean.deleteCardInventory(cardInventoryDataBean);\n retrieveCardInventoryList();\n System.out.println(\"CardInventory Delete Sussesfully\");\n messageDataBean.setMessage(\"CardInventory deleted successfully.\");\n messageDataBean.setIsSuccess(Boolean.TRUE);\n }\n } catch (Exception e) {\n System.out.println(e);\n messageDataBean.setMessage(\"Error in Deleting CardInventory.\");\n messageDataBean.setIsSuccess(Boolean.FALSE);\n }\n }", "public Boolean getDeleted() {\n return mDeleted;\n }", "@Override\r\n\t@Transactional\r\n\tpublic void delete(FmtEstado fmtestado){\r\n\t\t\r\n\t}" ]
[ "0.62542105", "0.6136145", "0.61116165", "0.6068621", "0.6016291", "0.6016291", "0.6016291", "0.6016291", "0.6016291", "0.59933054", "0.5982472", "0.5958655", "0.59503955", "0.5893895", "0.5888073", "0.5878588", "0.5864083", "0.5813749", "0.5754476", "0.57443726", "0.57423145", "0.56764257", "0.5669903", "0.5669659", "0.5669659", "0.56374764", "0.56297666", "0.5570545", "0.5556559", "0.55443746", "0.5522213", "0.55052394", "0.54771477", "0.54522717", "0.5386481", "0.53228426", "0.53067255", "0.53066903", "0.5289897", "0.528287", "0.5280873", "0.5270808", "0.52632606", "0.5261557", "0.5248262", "0.5246727", "0.5203384", "0.5200507", "0.5140358", "0.5140358", "0.5140358", "0.5140358", "0.5138701", "0.5138251", "0.5129407", "0.5104826", "0.5103928", "0.50961715", "0.5088501", "0.5078681", "0.5045801", "0.5040101", "0.50232005", "0.50159854", "0.5015574", "0.5010837", "0.49923623", "0.49876395", "0.49872586", "0.49766377", "0.49766377", "0.49756253", "0.49741298", "0.4963317", "0.496179", "0.49613568", "0.4957577", "0.4954562", "0.49469095", "0.494422", "0.49393693", "0.49250945", "0.49237013", "0.49237013", "0.4918491", "0.4918491", "0.49178255", "0.4905338", "0.4905338", "0.4905338", "0.490299", "0.4898834", "0.48977372", "0.4896642", "0.4887957", "0.4879076", "0.48760045", "0.48749667", "0.4861399", "0.48531583" ]
0.5938841
13
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.update_time
public Date getUpdateTime() { return updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public String getUpdatetime() {\n\t\treturn updatetime;\n\t}", "public java.lang.Long getTsUpdate() {\n return ts_update;\n }", "public java.sql.Timestamp getUpdateTime () {\r\n\t\treturn updateTime;\r\n\t}", "public java.lang.Long getTsUpdate() {\n return ts_update;\n }", "public Date getUpdateDatetime();", "public Date getTimeUpdate() {\n return timeUpdate;\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdateDatime() {\r\n return updateDatime;\r\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public Date getUpdatedTime() {\n return updatedTime;\n }", "public long getTsUpdate() {\n return tsUpdate_;\n }", "public Date getUpdateDatetime() {\r\n\t\treturn updateDatetime;\r\n\t}", "public long getTsUpdate() {\n return tsUpdate_;\n }", "public String getUpdTime() {\n return updTime;\n }", "public Long getUpdateAt() {\n return updateAt;\n }", "public Date getUpdateTime()\n {\n return data.updateTime;\n }", "int getUpdateTriggerTime();", "long getTsUpdate();", "public com.flexnet.opsembedded.webservices.DateTimeQueryType getUpdateTime() {\n return updateTime;\n }", "public Date getUpdateTimestamp() {\n return updateTimestamp;\n }", "public Integer getUpdateTime() {\n return updateTime;\n }", "public Date getUpdateTimestamp() {\r\n return updateTimestamp;\r\n }", "public Timestamp getUpdateDate() {\n return updateDate;\n }", "public DateTime getUpdatedTimestamp() {\n\t\treturn getDateTime(\"sys_updated_on\");\n\t}", "public Timestamp getUpdateTime() {\n return updateTime;\n }", "public int getUpdateTriggerTime() {\n return updateTriggerTime_;\n }", "public String getUpdateTime() {\r\n return updateTime;\r\n }", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public Timestamp getUpdated();", "public int getUpdateTriggerTime() {\n return instance.getUpdateTriggerTime();\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "public String getUpdateTime() {\n return updateTime;\n }", "@ApiModelProperty(value = \"修改时间\")\n public Date getRowUpdateTime() {\n return rowUpdateTime;\n }", "public Date getUpdateTime() {\n return this.updateTime;\n }", "public Date getUpdateTime()\n/* */ {\n/* 191 */ return this.updateTime;\n/* */ }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\r\n return updateTime;\r\n }", "public Date getUpdateTime() {\n\t\treturn this.updateTime;\n\t}", "public Long getUpdateTime() {\n return updateTime;\n }", "public Long getUpdateTime() {\n return updateTime;\n }", "public Long getUpdateTime() {\n\t\treturn updateTime;\n\t}", "public String getUpdateTime() {\n\t\t\treturn updateTime;\n\t\t}" ]
[ "0.6917626", "0.6917626", "0.68105626", "0.6808815", "0.6808815", "0.6808333", "0.6763876", "0.6763876", "0.65933025", "0.65698653", "0.655637", "0.6530119", "0.6516303", "0.6484625", "0.6484625", "0.6462945", "0.6462945", "0.6462945", "0.64616215", "0.6460251", "0.6454581", "0.642112", "0.64090157", "0.6384689", "0.63532966", "0.63420206", "0.6340738", "0.63120836", "0.62969667", "0.6290665", "0.6272486", "0.62593037", "0.6250045", "0.62058204", "0.620353", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.61808056", "0.617404", "0.6166795", "0.6166795", "0.6166795", "0.6166795", "0.616287", "0.6161446", "0.61432487", "0.6139523", "0.6139523", "0.6139523", "0.6139523", "0.6132964", "0.6124516", "0.6124516", "0.6110845", "0.6102816" ]
0.610271
96
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.update_time
public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdate_time(Date update_time) {\n this.update_time = update_time;\n }", "public void setUpdatetime(Date updatetime) {\r\n this.updatetime = updatetime;\r\n }", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public void setUpdatetime(Date updatetime) {\n this.updatetime = updatetime;\n }", "public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }", "public void setUpdateTime (java.sql.Timestamp updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}", "public void setUpdateTime(Date updateTime)\n/* */ {\n/* 198 */ this.updateTime = updateTime;\n/* */ }", "public void setUpdateDatetime(Long updateDatetime) {\n this.updateDatetime = updateDatetime;\n }", "public void setUpdateDatetime(Date updateDatetime);", "public void setUpdateTime(DateTime updateTime) {\n this.updated = updateTime;\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n this.updateTime = updateTime;\r\n }", "public void setUpdateTime(Integer updateTime) {\n this.updateTime = updateTime;\n }", "@Override\n\tpublic void setUpdateTime(Date updateTime) {\n\t\t\n\t}", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdatedTime(Date updatedTime) {\n this.updatedTime = updatedTime;\n }", "public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }", "public void setUpdateDatime(Date updateDatime) {\r\n this.updateDatime = updateDatime;\r\n }", "public void setUpdateTime(Date updateTime) {\r\n\t\tthis.updateTime = updateTime;\r\n\t}", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(String updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(Date updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateDatetime(Date updateDatetime) {\r\n\t\tthis.updateDatetime = updateDatetime;\r\n\t}", "public void setUpdateTime(Timestamp updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(LocalDateTime updateTime) {\n this.updateTime = updateTime;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public Date getUpdate_time() {\n return update_time;\n }", "public void setUpdTime(String updTime) {\n this.updTime = updTime;\n }", "private void setUpdateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(UPDATETIME_PROP.get(), value);\n }", "public Date getUpdatetime() {\r\n return updatetime;\r\n }", "public Long getUpdateDatetime() {\n return updateDatetime;\n }", "public void setUpdateTimestamp(Date updateTimestamp) {\r\n this.updateTimestamp = updateTimestamp;\r\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public Date getUpdatetime() {\n return updatetime;\n }", "public void setUpdateTime(String updateTime) {\n\t\t\tthis.updateTime = updateTime;\n\t\t}", "public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(Long updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTime(java.util.Date updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateTimestamp(Date updateTimestamp) {\n this.updateTimestamp = updateTimestamp;\n }", "public void setUpdateAt(Long updateAt) {\n this.updateAt = updateAt;\n }", "public void setTsUpdate(java.lang.Long value) {\n this.ts_update = value;\n }", "public void setUpdateAt( Date updateAt ) {\n this.updateAt = updateAt;\n }", "public void setUpdateTime(Long updateTime) {\n\t\tthis.updateTime = updateTime;\n\t}", "public void setUpdateTime(com.flexnet.opsembedded.webservices.DateTimeQueryType updateTime) {\n this.updateTime = updateTime;\n }", "public void setUpdateDate(Timestamp updateDate) {\n this.updateDate = updateDate;\n }", "public void setUpdatedOn(Date updatedOn);", "public void setUpdateTime(Date updateTime) {\n\t\tsetField(\"updateTime\", updateTime);\n\t}", "public void setUpdatetime(String updatetime) {\n\t\tthis.updatetime = updatetime == null ? null : updatetime.trim();\n\t}", "public void setUpdatetime(String updatetime) {\n\t\tthis.updatetime = updatetime == null ? null : updatetime.trim();\n\t}" ]
[ "0.66784245", "0.66784245", "0.6452078", "0.64210343", "0.64210343", "0.63630694", "0.62050575", "0.6197819", "0.6197259", "0.6189378", "0.61137027", "0.6027614", "0.6027614", "0.6027614", "0.6027614", "0.59785455", "0.5975395", "0.59640205", "0.59640205", "0.59640205", "0.5956814", "0.5956814", "0.5952952", "0.59112495", "0.59112495", "0.5897717", "0.5897717", "0.5897717", "0.588948", "0.5888872", "0.58809215", "0.58809215", "0.58809215", "0.5874606", "0.5874606", "0.586717", "0.5841731", "0.5839438", "0.58367366", "0.5803378", "0.5792751", "0.5792751", "0.5786308", "0.57777643", "0.57777643", "0.5775877", "0.5771042", "0.5768851", "0.5749469", "0.57418007", "0.5728404", "0.5718271", "0.5717942", "0.5715878", "0.5695133", "0.56926864", "0.56926864" ]
0.59593123
60
This method was generated by MyBatis Generator. This method returns the value of the database column snacks_inventory.create_time
public Date getCreateTime() { return createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCreatetime() {\n return createtime;\n }", "public Integer getCreateTime() {\r\n return createTime;\r\n }", "public Integer getCreateTime() {\n return createTime;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public String getCreatetime() {\r\n return createtime;\r\n }", "public String getCreatetime() {\n return createtime;\n }", "public String getCreatetime() {\n return createtime;\n }", "public java.sql.Timestamp getCreateTime () {\r\n\t\treturn createTime;\r\n\t}", "public Timestamp getCreateTime() {\n return createTime;\n }", "public Long getCreateTime() {\n return createTime;\n }", "public Date getCreateTime() {\n return createTime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\r\n return createtime;\r\n }", "public Date getCreatetime() {\r\n return createtime;\r\n }", "public Date getCreatetime() {\r\n return createtime;\r\n }", "public Date getCreateTime() {\n return this.createTime;\n }", "public Date getCreateTime() {\n return this.createTime;\n }", "public String getCreatetime() {\n\t\treturn createtime;\n\t}", "public String getCreatetime() {\n\t\treturn createtime;\n\t}", "public long getCreateTime() {\n return this.createTime;\n }", "public Long getCreateTime() {\n\t\treturn createTime;\n\t}", "public String getCreateTime() {\r\n return createTime;\r\n }" ]
[ "0.6591621", "0.65437096", "0.6521659", "0.6468533", "0.6468533", "0.6414042", "0.6388565", "0.6388565", "0.6352692", "0.6351124", "0.6345387", "0.63277596", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.63167155", "0.63122237", "0.63122237", "0.63122237", "0.62827396", "0.62827396", "0.6279164", "0.6279164", "0.62686425", "0.6235054", "0.6214675" ]
0.6209033
97
This method was generated by MyBatis Generator. This method sets the value of the database column snacks_inventory.create_time
public void setCreateTime(Date createTime) { this.createTime = createTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreate_time(Date create_time) {\n this.create_time = create_time;\n }", "public void setCreateTime(Date createTime)\n/* */ {\n/* 184 */ this.createTime = createTime;\n/* */ }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "public void setCreatetime(Date createtime) {\r\n this.createtime = createtime;\r\n }", "private void setCreateTime(long createTime) {\n this.createTime = createTime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Date createtime) {\n this.createtime = createtime;\n }", "private void setCreatedTime(int value) {\n \n createdTime_ = value;\n }", "public void setCreatetime(String createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(String createtime) {\n this.createtime = createtime;\n }", "public void setCreatetime(Long createtime) {\n this.createtime = createtime;\n }", "public void setTimeCreate(Date timeCreate) {\n this.timeCreate = timeCreate;\n }", "public void setCreateTime(Integer createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime (java.sql.Timestamp createTime) {\r\n\t\tthis.createTime = createTime;\r\n\t}", "public void setCreateTime(LocalDateTime timestamp) \n {\n createTime = timestamp;\n }", "public void setCreateTime(Integer createTime) {\n this.createTime = createTime;\n }", "public void setCreateTime(Date createTime) {\n this.createTime = createTime;\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "public void setCreateTime(Date createTime) {\r\n this.createTime = createTime;\r\n }", "private void setCreateTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(CREATETIME_PROP.get(), value);\n }", "public void setCreateTime(String createTime) {\n this.createTime = createTime;\n }", "public void setCreateTime(String createTime) {\n this.createTime = createTime;\n }" ]
[ "0.6368124", "0.6368124", "0.61569726", "0.6125718", "0.6125718", "0.6125718", "0.6120668", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6074369", "0.6072463", "0.605671", "0.605671", "0.6039038", "0.6037871", "0.59803313", "0.5965778", "0.5958967", "0.59311867", "0.590849", "0.5854388", "0.5854388", "0.5854388", "0.5854388", "0.5854388", "0.5854388", "0.5826736", "0.5793731", "0.5793731" ]
0.0
-1
Creates new form AreaOfRectangleGUI
public AreaOfRectangleGUI() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AREA createAREA();", "public RectangleProgram(){\r\n //Esto metodos los heredamos de JFrame este es el constructor\r\n\t\tsetTitle(\"Area and Perimeter of a Rectangle\");\r\n\t\tsetSize(ANCHO, ALTO);\r\n\t\tsetVisible(true);\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE); //La aplicacion sale cuando la cerramos\r\n\t}", "public abstract Area newArea();", "AreaResource panelArea();", "private static void createGUI(){\n DrawingArea drawingArea = new DrawingArea();\n ToolSelect utilityBar = new ToolSelect();\n MenuBar menuBar = new MenuBar();\n JFrame.setDefaultLookAndFeelDecorated(true);\n JFrame frame = new JFrame(\"GUIMk1\");\n frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n frame.setLayout(new BorderLayout());\n frame.getContentPane().add(utilityBar, BorderLayout.WEST);\n frame.getContentPane().add(menuBar,BorderLayout.NORTH);\n frame.getContentPane().add(drawingArea);\n frame.setLocationRelativeTo( null );\n frame.setVisible(true);\n frame.pack();\n\n }", "void createRectangles();", "private void createAreaWithoutBorder(){\n image.setColor(backgroundColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n }", "public void showRectangleSizeSetup() {\n sizeArea.removeAllViewsInLayout();\n sizeArea.addView(heightEdit);\n sizeArea.addView(widthEdit);\n }", "protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}", "Rectangle(int width, int height){\n area = width * height;\n }", "public Rectangle getBounds () {\r\n\tcheckWidget();\r\n\tPhArea_t area = new PhArea_t ();\r\n\tOS.PtWidgetArea (handle, area);\r\n\treturn new Rectangle (area.pos_x, area.pos_y, area.size_w, area.size_h);\r\n}", "public Area() {\n\t}", "public Area() {\n }", "protected void createComponents() {\n sampleText = new JTextField(20);\n displayArea = new JLabel(\"\");\n displayArea.setPreferredSize(new Dimension(200, 75));\n displayArea.setMinimumSize(new Dimension(200, 75));\n }", "Rectangle(){\n width = 5;\n height = 3;\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }", "Rectangle(){\n width = 5;\n height = 3;\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }", "Rectangle(int width, int height){\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }", "public CustomRectangle() { }", "public frmRectangulo() {\n initComponents();\n }", "private void makeGUI() {\n //Create the canvas and Components for GUI.\n canvas = new Canvas();\n\n canvas.setBounds(0, 0, getWidth(), getHeight());\n getContentPane().setBackground(DrawAttribute.whiteblue);\n searchArea = new JTextField();\n searchArea.setForeground(Color.GRAY);\n searchArea.setText(promptText);\n\n //Make the components for the frame.\n makeComponents();\n addComponentsToLayers();\n }", "public RectangleClicker() {\n JFrame myFrame = new JFrame();\n myFrame.setSize(myWindowWidth, myWindowHeight);\n myFrame.add(this);\n myFrame.setVisible(true);\n myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n addMouseListener(this);\n }", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n jButton1 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n jTextArea1 = new javax.swing.JTextArea();\n\n getContentPane().setLayout(new java.awt.GridBagLayout());\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Creation\");\n setBackground(new java.awt.Color(255, 255, 204));\n setForeground(java.awt.Color.red);\n jButton1.setFont(new java.awt.Font(\"Arial Black\", 0, 14));\n jButton1.setText(\"create world\");\n jButton1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jButton1MouseClicked(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridwidth = 5;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.ipadx = 5;\n gridBagConstraints.ipady = 5;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\n getContentPane().add(jButton1, gridBagConstraints);\n\n jLabel1.setOpaque(true);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = 5;\n gridBagConstraints.gridheight = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.ipady = 33;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\n getContentPane().add(jLabel1, gridBagConstraints);\n\n jPanel1.setLayout(null);\n\n jPanel1.setBackground(new java.awt.Color(255, 102, 0));\n jPanel1.setOpaque(false);\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\n getContentPane().add(jPanel1, gridBagConstraints);\n\n jTextArea1.setDisabledTextColor(new java.awt.Color(102, 204, 0));\n jTextArea1.setNextFocusableComponent(jButton1);\n jTextArea1.setPreferredSize(new java.awt.Dimension(50, 17));\n jTextArea1.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyTyped(java.awt.event.KeyEvent evt) {\n jTextArea1KeyTyped(evt);\n }\n });\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = 5;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.ipadx = 6;\n gridBagConstraints.ipady = 6;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\n getContentPane().add(jTextArea1, gridBagConstraints);\n\n java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n setBounds((screenSize.width-400)/2, (screenSize.height-300)/2, 400, 300);\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\tint x = e.getX();\n\t\t\tint y = e.getY();\n\n\t\t\t// selected area is highlighted by drawing a rectangle around it\n\t\t\t// areaLabel flashes the name of the area selected\n\t\t\tif ((x >= 230 && x <= 329) && (y >= 155 && y <= 295)) {\n\n\t\t\t\tsection = new Rectangle(230, 155, 99, 140);\n\t\t\t\trepaint();\n\t\t\t\tsectionLabel.setText(\"TOILET 1\");\n\n\t\t\t\tid = 1;\n\n\t\t\t} else if ((x >= 319 && x <= 480) && (y >= 225 && y <= 507)) {\n\t\t\t\tsection = new Rectangle(319, 225, 161, 282);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"BEDROOM 1\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 2;\n\n\t\t\t} else if ((x >= 478 && x <= 651) && (y >= 226 && y <= 437)) {\n\t\t\t\tsection = new Rectangle(478, 226, 173, 211);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"LIVING ROOM\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 3;\n\n\t\t\t} else if ((x >= 478 && x <= 686) && (y >= 450 && y <= 581)) {\n\t\t\t\tsection = new Rectangle(478, 450, 208, 131);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"DINING ROOM\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 4;\n\n\t\t\t} else if ((x >= 654 && x <= 779) && (y >= 227 && y <= 405)) {\n\t\t\t\tsection = new Rectangle(654, 227, 125, 178);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"KITCHEN\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 5;\n\n\t\t\t} else if ((x >= 776 && x <= 929) && (y >= 225 && y <= 404)) {\n\t\t\t\tsection = new Rectangle(776, 225, 153, 179);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"BEDROOM 2\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 6;\n\n\t\t\t} else if ((x >= 688 && x <= 782) && (y >= 460 && y <= 589)) {\n\t\t\t\tsection = new Rectangle(688, 460, 94, 129);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"TOILET 2\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 7;\n\t\t\t} else if ((x >= 929 && x <= 1094) && (y >= 226 && y <= 486)) {\n\t\t\t\tsection = new Rectangle(929, 224, 165, 262);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"MASTER BEDROOM\");\n\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 8;\n\n\t\t\t} else if ((x >= 958 && x <= 1095) && (y >= 489 && y <= 590)) {\n\t\t\t\tsection = new Rectangle(958, 489, 137, 101);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"TOILET 3\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 9;\n\n\t\t\t} else if ((x >= 346 && x <= 1095) && (y >= 138 && y <= 223)) {\n\t\t\t\tsection = new Rectangle(346, 138, 748, 85);\n\t\t\t\trepaint();\n\n\t\t\t\tsectionLabel.setText(\"BALCONY\");\n\t\t\t\tsectionLabel.revalidate();\n\n\t\t\t\tid = 10;\n\t\t\t} else {\n\t\t\t\tsection = null;\n\t\t\t\tsectionLabel.setText(\"\");\n\n\t\t\t\tid = 0;\n\t\t\t}\n\n\t\t}", "private void makeGUI()\n {\n mainFrame = new JFrame();\n mainFrame.setPreferredSize(new Dimension(750,400));\n aw = new AccountWindow();\n mainFrame.add(aw);\n mainFrame.setVisible(true);\n mainFrame.pack();\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder() {\n return getAreaFieldBuilder().addBuilder(\n com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder() {\n return getAreaFieldBuilder().addBuilder(\n com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder() {\n return getAreaFieldBuilder().addBuilder(\n com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "private static void addRectangle(String[] input) throws NumberFormatException, IncorrectParametersException{\n if (input.length == 5){\n try{\n int x1 = Integer.parseInt(input[1]); \n int y1 = Integer.parseInt(input[2]);\n int x2 = Integer.parseInt(input[3]); \n int y2 = Integer.parseInt(input[4]);\n try{\n canvas.createRectangle(x1, y1, x2, y2);\n System.out.println(canvas.render());\n } catch (NullPointerException ex) {\n System.out.println(\"Initialise a new canvas first!\");\n }\n } catch (NumberFormatException ex) {\n System.out.println(\"HELP: to create a new rectangle enter `R x1 y1 x2 y2`, with (x1,y1) being the upper left corner and (x2,y2) the lower right one.\");\n }\n } else {\n System.out.println(\"HELP: to create a new rectangle enter `R x1 y1 x2 y2`, with (x1,y1) being the upper left corner and (x2,y2) the lower right one.\");\n throw new IncorrectParametersException(\"\");\n }\n }", "PlotAreaType createPlotAreaType();", "@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 titleLabel = new javax.swing.JLabel();\n lenLabel = new javax.swing.JLabel();\n widLabel = new javax.swing.JLabel();\n widthInput = new javax.swing.JTextField();\n lengthInput = new javax.swing.JTextField();\n calcButton = new javax.swing.JButton();\n outputLabel = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n setForeground(new java.awt.Color(255, 255, 255));\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 255));\n\n titleLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n titleLabel.setText(\"Area of a Rectangle\");\n\n lenLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n lenLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n lenLabel.setText(\"Length:\");\n\n widLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n widLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n widLabel.setText(\"Width:\");\n\n widthInput.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n\n lengthInput.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n\n calcButton.setText(\"Calculate\");\n calcButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n calcButtonActionPerformed(evt);\n }\n });\n\n outputLabel.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\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 .addComponent(titleLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(105, 105, 105)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(calcButton, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(widLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27)\n .addComponent(widthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(lenLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(93, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(outputLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(203, Short.MAX_VALUE)\n .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(92, 92, 92)))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(48, 48, 48)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(lenLabel)\n .addGap(66, 66, 66)\n .addComponent(widLabel))\n .addComponent(widthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(35, 35, 35)\n .addComponent(calcButton, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26)\n .addComponent(outputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(40, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(127, 127, 127)\n .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(255, 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 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void setArea() {\n\t\tthis.area= height*width;\n\t}", "public CreateGUI() throws IOException{\r\n\t\tthis.setFocusable(false);\r\n\t\tthis.setTitle(\"Dance Dance Revolution - 201B Edition\");\r\n\t\tthis.setSize(800, 600);\t\t \t\r\n\t\tthis.setLocation(100, 100); \t\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tthis.setResizable(false);\r\n\t\tcp = getContentPane();\r\n\t\tcp.setBackground(Color.black);\r\n\t\tarrowlistener = new ArrowListener();\r\n\t\tscore = new Score();\r\n\t\tcombo = new ComboImage();\r\n\t}", "public intrebarea() {\n initComponents();\n }", "public OrgaPanel(Frame frame){\r\n\t\tsuper();\r\n\t\tthis.frame = frame;\r\n\r\n\t\tthis.removeAll();\r\n\t\tthis.setBackground(Color.WHITE);\r\n\t\tthis.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\r\n\t\tthis.add(Box.createRigidArea(new Dimension(0,5)));\r\n\r\n\t\t// Le panel titre et son label\r\n\t\tthis.orgaNamePanel = new JPanel();\r\n\t\torgaNamePanel.setBackground(Frame.colorEventary);\r\n\t\torgaNamePanel.setMaximumSize(new Dimension(800,30));\r\n\t\tthis.organisationName = new JLabel(\"\");\r\n\t\tthis.orgaNamePanel.add(organisationName);\r\n\t\tthis.add(orgaNamePanel);\r\n\t\tthis.add(Box.createRigidArea(new Dimension(0,10)));\r\n\r\n\t\t// Pour l'ajout d'un nouveau membre\r\n\t\tthis.inscriptionPan = new JPanel();\r\n\t\tthis.inscriptionPan.setBackground(Color.WHITE);\r\n\t\tthis.inscriptionPan.setMaximumSize(new Dimension(800,30));\r\n\t\tthis.inscriptionPan.setLayout(new BoxLayout(inscriptionPan, BoxLayout.X_AXIS));\r\n\t\tthis.add(this.inscriptionPan);\r\n\r\n\t\tJPanel inscriptionTitrePan = new JPanel();\r\n\t\tinscriptionTitrePan.setBackground(Frame.colorEventary);\r\n\t\tinscriptionTitrePan.setMaximumSize(new Dimension(200,30));\r\n\t\tinscriptionTitrePan.add(new JLabel(\"Ajouter un nouveau membre\"));\r\n\t\tinscriptionPan.add(inscriptionTitrePan);\r\n\r\n\t\tJPanel inscriptionBoxPan = new JPanel();\r\n\t\tinscriptionBoxPan.setMaximumSize(new Dimension(450,30));\r\n\t\tinscriptionBoxPan.setBackground(Color.WHITE);\r\n\t\tinscriptionBoxPan.add(new JLabel(\"Saisir Numéro Etudiant \"));\r\n\t\tthis.loginBox = new EventaryComboBox<String>();\r\n\t\tthis.loginBoxModel = new DefaultComboBoxModel<String>();\r\n\t\tthis.loginBox.setEditable(true);\r\n\t\tinscriptionBoxPan.add(this.loginBox);\r\n\t\tinscriptionPan.add(inscriptionBoxPan);\r\n\r\n\t\tthis.valider = new JButton();\r\n\t\tthis.valider.setMaximumSize(new Dimension(150,30));\r\n\t\tthis.valider.setBackground(new Color(139,233,120));\r\n\t\tthis.inscriptionPan.add(this.valider);\r\n\r\n\t\tthis.add(Box.createRigidArea(new Dimension(0,10)));\r\n\r\n\t\t// Pour la liste des membres\r\n\t\tJPanel listeTitrePan = new JPanel();\r\n\t\tlisteTitrePan.setBackground(Frame.colorEventary);\r\n\t\tlisteTitrePan.setMaximumSize(new Dimension(800,30));\r\n\t\tlisteTitrePan.add(new JLabel(\"Liste des Membres\"));\r\n\t\tthis.add(listeTitrePan);\r\n\r\n\t\tthis.listePan = new JPanel();\r\n\t\tthis.listePan.setMaximumSize(new Dimension(800,500));\r\n\t\tthis.listePan.setLayout(new BoxLayout(this.listePan, BoxLayout.Y_AXIS));\r\n\t\tthis.add(this.listePan);\r\n\r\n\t}", "private void generateTextArea()\n {\n //Clear the textArea\n textArea.selectAll();\n textArea.replaceSelection(\"\");\n\n MyCircle circle = panel.getCircle();\n\n //Add all of the required information to the textarea\n textArea.append(String.format(\"AREA: %.2f %n\", circle.getArea()));\n textArea.append(\"RADIUS: \"+circle.getRadius()+\"\\n\");\n textArea.append(\"DIAMETER: \"+circle.getDiameter()+\"\\n\");\n textArea.append(String.format(\"CIRCUMFERENCE: %.2f %n\", circle.getCircumference()));\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setIconImage(Toolkit.getDefaultToolkit().getImage(ModifyRoomBorder.class.getResource(\"/images/ktv2.jpg\")));\n\t\tframe.setTitle(\"\\u4FEE\\u6539\\u623F\\u95F4\\u754C\\u9762\");\n\t\tframe.getContentPane().setBackground(new Color(255, 204, 204));\n\t\tframe.setBounds(800, 200, 450, 300);\n\t\tframe.setVisible(true);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tcomboBox = new JComboBox<String>();\n\t\tcomboBox.setFont(new Font(\"华文楷体\", Font.BOLD, 20));\n\t\tcomboBox.setBackground(Color.WHITE);\n\t\tcomboBox.setBounds(48, 119, 127, 43);\n\t\tframe.getContentPane().add(comboBox);\n\t\t\n\t\ttextField = new JTextField();\n\t\ttextField.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttextField.setFont(new Font(\"微软雅黑 Light\", Font.BOLD, 16));\n\t\ttextField.setColumns(10);\n\t\ttextField.setBounds(261, 119, 113, 43);\n\t\tframe.getContentPane().add(textField);\n\t\t\n\t\tJButton button = new JButton(\"\\u6539\\u623F\\u95F4\\u53F7\");\n\t\tbutton.addActionListener(\n\t\t\t\tnew ModifyRoomBorder_event()\n\t\t\t\t);\n\t\tbutton.setFont(new Font(\"微软雅黑\", Font.BOLD, 18));\n\t\tbutton.setBackground(Color.WHITE);\n\t\tbutton.setBounds(63, 197, 113, 43);\n\t\tframe.getContentPane().add(button);\n\t\t\n\t\tJButton button_1 = new JButton(\"\\u8FD4\\u56DE\\r\\n\");\n\t\tbutton_1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tbutton_1.setFont(new Font(\"微软雅黑\", Font.BOLD, 18));\n\t\tbutton_1.setBackground(Color.WHITE);\n\t\tbutton_1.setBounds(261, 197, 113, 43);\n\t\tframe.getContentPane().add(button_1);\n\t\t\n\t\tlabel = new JLabel(\"\\u65B0\\u623F\\u95F4\\u53F7\");\n\t\tlabel.setForeground(new Color(255, 255, 204));\n\t\tlabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabel.setFont(new Font(\"楷体\", Font.BOLD, 18));\n\t\tlabel.setBounds(277, 79, 97, 27);\n\t\tframe.getContentPane().add(label);\n\t\t\n\t\tlabel_1 = new JLabel(\"\\u65E7\\u623F\\u95F4\\u53F7\");\n\t\tlabel_1.setForeground(new Color(255, 255, 204));\n\t\tlabel_1.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabel_1.setFont(new Font(\"楷体\", Font.BOLD, 18));\n\t\tlabel_1.setBounds(57, 79, 97, 27);\n\t\tframe.getContentPane().add(label_1);\n\t\t\n\t\tlabel_2 = new JLabel(\"\\u89C4\\u5B9A:\\u623F\\u95F4\\u53F7\\u5728101~399\\u4E4B\\u95F4\");\n\t\tlabel_2.setFont(new Font(\"楷体\", Font.BOLD, 18));\n\t\tlabel_2.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlabel_2.setBounds(82, 24, 271, 42);\n\t\tframe.getContentPane().add(label_2);\n\t}", "protected void createContents() {\n\t\tMonitor primary = this.getDisplay().getPrimaryMonitor();\n\t\tRectangle bounds = primary.getBounds();\n\t\tRectangle rect = getBounds();\n\t\tint x = bounds.x + (bounds.width - rect.width) / 2;\n\t\tint y = bounds.y + (bounds.height - rect.height) / 2;\n\t\tsetLocation(x, y);\n\t}", "public Rectangle(Integer width, Integer height) {\n super(300, 100, \"red\",null);\n this.width = width;\n this.height = height;\n control = new Control(this);\n }", "private static void createAndShowGUI() {\n //Create and set up the window.\n //JFrame frame = new JFrame(\"Basics of Color\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n //Add content to the window.\n frame.add(new ColorBasics(), BorderLayout.CENTER);\n Menu menu = new Menu();\n frame.setJMenuBar(menu.createMenuBar());\n \n //Display the window.\n frame.pack();\n frame.setVisible(true);\n frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n }", "private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Combo box editabel\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //2. kreirati kontrole i pobacati kako nam kaže neki manager LayoutManager\n JComponent comboBoxPanel = new ComboBoxPanel2();\n comboBoxPanel.setOpaque(true);\n frame.setContentPane(comboBoxPanel);\n\n //3. prikazati prozor\n frame.pack();\n frame.setVisible(true);\n }", "public adivinaGUI() {\n initComponents();\n }", "private void createAreaWithBorder(int borderWidth, int borderHeight){\n image.setColor(borderColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n \n image.setColor(backgroundColor);\n image.fillRect(borderWidth, borderHeight, fieldWidth - (borderWidth * 2), fieldHeight - (borderHeight * 2));\n }", "private static void createAndShowGUI() {\r\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLayout(new BorderLayout());\r\n\r\n JPanel parametersPanel = new JPanel();\r\n parametersPanel.setPreferredSize(new Dimension(preferredWidth, 50));\r\n \r\n addComponentsToPane(parametersPanel);\r\n \r\n frame.add(parametersPanel, BorderLayout.PAGE_START);\r\n \r\n schedulePanel.add(monLabel);\r\n schedulePanel.add(tueLabel);\r\n schedulePanel.add(wedLabel);\r\n schedulePanel.add(thuLabel);\r\n schedulePanel.add(friLabel);\r\n schedulePanel.setPreferredSize(new Dimension(preferredWidth, 500));\r\n JScrollPane scrollPane = new JScrollPane();\r\n scrollPane.setViewportView(schedulePanel);\r\n JPanel bigPanel = new JPanel(); \r\n bigPanel.setLayout(new BorderLayout());\r\n bigPanel.setPreferredSize(schedulePanel.getPreferredSize());\r\n bigPanel.add(scrollPane, BorderLayout.CENTER);\r\n frame.add(bigPanel, BorderLayout.CENTER);\r\n\r\n frame.setJMenuBar(createMenu());\r\n \r\n frame.pack();\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n frame.setVisible(true);\r\n frame.setResizable(false);\r\n }", "void createGUI(JFrame f) {\n TabbedSplitPanel centrePanel = new TabbedSplitPanel(new JPanel(),TabbedSplitPanel.RIGHT);\n centrePanel.addMenuPanel(new MenuPanel(\"Right Menu\", new JTextArea(\"Menu panel for right tabbed split panel\"),true));\n\n TabbedSplitPanel bottomPanel = new TabbedSplitPanel(centrePanel,SplitPanel.BOTTOM);\n MenuPanel mainBottomMenuPanel = new MenuPanel(\"Main bottom menu\", new JTextArea(\"Contents of bottom menu\"), true);\n bottomPanel.addMenuPanel(mainBottomMenuPanel);\n\n // A panel with a button in it\n JPanel panel = createAMenuView();\n\n TabbedSplitPanel leftPanel = new TabbedSplitPanel(bottomPanel, SplitPanel.LEFT);\n leftPanel.addMenuPanel(new MenuPanel(\"Left1\", panel, true));\n leftPanel.addMenuPanel(new MenuPanel(\"Left2\", new JTextArea(\"Left 2 text area\"),true));\n\n // A nested TabbedSplitPanel\n TabbedSplitPanel nestedPanel = new TabbedSplitPanel(new JTextArea(\"Panel Containing a Nested panel\"),SplitPanel.BOTTOM);\n nestedPanel.addMenuPanel(new MenuPanel(\"Nested bottom menu\",new JTextArea(\"Nested menu panel\"),true));\n centrePanel.addMenuPanel(new MenuPanel(\"Nested\",nestedPanel,true));\n\n f.setContentPane(leftPanel);\n\n }", "Rectangle(){\n height = 1;\n width = 1;\n }", "public void createRectangle(double x, double y, double width, double height) {\r\n GRect rectangle = new GRect(x, y, width, height);\r\n rectangle.setFilled(true);\r\n rectangle.setFillColor(Color.GRAY);\r\n rectangle.setColor(Color.WHITE);\r\n add(rectangle);\r\n }", "public Rectangulo()\n\t{\n\t\tthis.alto = 0;\n\t\tthis.ancho = 0;\n\t\tthis.area = 0;\n\t}", "private void makeComponents() {\n Font font = new Font(\"Open Sans\", Font.PLAIN, 14);\n\n //Create The buttons and configure their visual design.\n searchArea.setFont(font);\n searchArea.setBorder(new CompoundBorder(BorderFactory.createMatteBorder(4, 7, 4, 7, DrawAttribute.lightblue), BorderFactory.createRaisedBevelBorder()));\n searchArea.setBounds(20, 20, 300, 37);\n searchArea.setActionCommand(\"searchAreaInput\");\n\n makeFrontGUIButtons();\n }", "public ClientSideImageMap addRectangleArea(AbstractLink link, int x1, int y1, int x2, int y2)\r\n\t{\r\n\t\tareas.add(link);\r\n\t\tlink.add(new Area(rectangleCoordinates(x1, y1, x2, y2), RECTANGLE));\r\n\t\treturn this;\r\n\t}", "private void geometry()\n\t\t{\n\t\tgridLayout = new GridLayout(2, -1);\n\n\t\tthis.setLayout(gridLayout);\n\n\t\tadd(component1);\n\t\tadd(component2);\n\t\t}", "public TextArea makeInputArea (double height, double width) {\r\n TextArea cmdBox = new TextArea();\r\n cmdBox.setPrefColumnCount(INPUT_FIELD_WIDTH);\r\n cmdBox.setPrefHeight(height);\r\n cmdBox.setPrefWidth(width);\r\n return cmdBox;\r\n }", "public void init(){\n\t\tsetSize (800,600);\n\t\t//el primer parametro del rectangulo en el ancho\n\t\t//y el alto\n\t\trectangulo = new GRect(120,80);\n\t\t\n\t}", "@Override\r\n protected Control createDialogArea(Composite parent) {\r\n Composite area = (Composite) super.createDialogArea(parent);\r\n container = createContainer(area);\r\n createField(container);\r\n return area;\r\n }", "private Rect createRect(final Camera.Size size, final IdAreaField idAreaField) {\n final int offsetWidth = (int) (size.width * 0.2);\n final int idCardWidth = (int) (size.width * 0.6);\n final int idCardHeight = (int) (idCardWidth / 1.58);\n final int topIdCardHeight = idCardWidth / 2 - idCardHeight / 2;\n final int bottomIdCardHeight = idCardWidth / 2 + idCardHeight / 2;\n final Rect parentRect = new Rect(offsetWidth, topIdCardHeight, size.width - offsetWidth, bottomIdCardHeight);\n final int left = parentRect.left + idAreaField.getPercentageFromParentLeft() * parentRect.width() / 100;\n final int top = parentRect.top + idAreaField.getPercentageFromParentTop() * parentRect.height() / 100;\n final int right = left + idAreaField.getPercentageWidth() * parentRect.width() / 100;\n final int bottom = top + idAreaField.getPercentageHeight() * parentRect.height() / 100;\n return new Rect(left, top, right, bottom);\n }", "private static void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n //Create and set up the window.\r\n frame = new JFrame(\"ATC simulator\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n atcscreen = new AtcScreen();\r\n atcscreen.setOpaque(true);\r\n frame.setContentPane(atcscreen);\r\n \r\n //Display the window.\r\n frame.setSize(1000,1000);\r\n //atcscreen.setSize(300,300);\r\n //frame.pack();\r\n frame.setVisible(true);\r\n }", "ObjectProperty<Bounds> drawAreaBoundsProperty();", "@SuppressWarnings(\"unchecked\")\n private void create() {\n components.clear();\n\n if (content != null) {\n content.clearChildren();\n }\n else {\n content = new Container();\n content.setInsets(INSETS);\n }\n\n GuiComponent guiComponent = (GuiComponent) getReflectedItem().getValue();\n\n // let the user choose which type of backgroundComponent they want.\n Label label = content.addChild(new Label(\"Type\"), 0, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n Container backgroundTypeContainer = content.addChild(new Container(), 0, 1);\n\n ColorRGBA oldColor = BackgroundUtils.getBackgroundColor(guiComponent);\n\n Button colorOnlyBgButton = backgroundTypeContainer.addChild(new Button(\"Color Only\"), 0, 0);\n colorOnlyBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof QuadBackgroundComponent)) {\n setValue(new QuadBackgroundComponent(oldColor));\n create();\n }\n });\n\n Button colorAndImageBgButton = backgroundTypeContainer.addChild(new Button(\"Color and Image\"), 0, 1);\n colorAndImageBgButton.addClickCommands(source -> {\n if (!(guiComponent instanceof TbtQuadBackgroundComponent)) {\n setValue(BackgroundComponents.gradient(oldColor));\n create();\n }\n });\n\n if (guiComponent instanceof QuadBackgroundComponent) {\n\n try {\n\n Method getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n // margin\n getter = QuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = QuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 2, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 2, 1);\n components.add(marginComponent);\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n else if (guiComponent instanceof TbtQuadBackgroundComponent) {\n\n TbtQuadBackgroundComponent backgroundComponent = (TbtQuadBackgroundComponent) guiComponent;\n\n try {\n Method getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getColor\");\n Method setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setColor\", ColorRGBA.class);\n\n label = content.addChild(new Label(\"Color\"), 1, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(guiComponent, getter, setter);\n content.addChild(bgColorComponent.getPanel(), 1, 1);\n components.add(bgColorComponent);\n\n label = content.addChild(new Label(\"Image\"), 2, 0);\n label.setTextHAlignment(HAlignment.Right);\n label.setInsets(INSETS);\n\n Button browseImageButton = content.addChild(new Button(\"Select Background Image...\"), 2, 1);\n browseImageButton.setTextVAlignment(VAlignment.Center);\n browseImageButton.addClickCommands(source -> {\n\n JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n jfc.setDialogTitle(\"Select a Background Image...\");\n jfc.setMultiSelectionEnabled(false);\n jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n jfc.setAcceptAllFileFilterUsed(false);\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n jfc.addChoosableFileFilter(filter);\n int returnValue = jfc.showOpenDialog(null);\n\n if (returnValue == JFileChooser.APPROVE_OPTION) {\n\n File file = jfc.getSelectedFile();\n\n\n try {\n\n byte[] imageData = Files.readAllBytes(file.toPath());\n byte[] stringData = Base64.getEncoder().encode(imageData);\n\n String imageString = new String(stringData);\n\n // PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n // panelBackground.setBase64Image(imageString);\n\n Texture texture = new TextureUtils().fromBase64(imageString);\n\n backgroundComponent.setTexture(texture);\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n });\n\n // margin\n getter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"getMargin\");\n setter = TbtQuadBackgroundComponent.class.getDeclaredMethod(\"setMargin\", Vector2f.class);\n\n label = content.addChild(new Label(\"Margin\"), 3, 0);\n Vector2fComponent marginComponent = new Vector2fComponent(guiComponent, getter, setter);\n content.addChild(marginComponent.getPanel(), 3, 1);\n components.add(marginComponent);\n\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n }\n\n//\n// this.content = new RollupPanel(\"\", contentContainer, null);\n// this.content.setOpen(false);\n//\n// // background Image\n// Container bgImageContainer = contentContainer.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.Last, FillMode.Last)), 0, 0);\n// Label bgImageLabel = bgImageContainer.addChild(new Label(\"Background Image\"), 0, 0);\n// bgImageLabel.setTextVAlignment(VAlignment.Center);\n// bgImageLabel.setInsets(new Insets3f(0.0F, 2.0F, 0.0F, 5.0F));\n// Button browseImageButton = bgImageContainer.addChild(new Button(\"Browse...\"), 0, 1);\n// Button removeImageButton = bgImageContainer.addChild(new Button(\"Remove\"), 0, 2);\n// bgImageContainer.addChild(new Container(), 0, 3);\n//\n// browseImageButton.addClickCommands(source -> {\n//\n// JFileChooser jfc = new JFileChooser(FileSystemView.getFileSystemView().getHomeDirectory());\n// jfc.setDialogTitle(\"Select a Background Image...\");\n// jfc.setMultiSelectionEnabled(false);\n// jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n// jfc.setAcceptAllFileFilterUsed(false);\n// FileNameExtensionFilter filter = new FileNameExtensionFilter(\"PNG Images\", \"png\");\n// jfc.addChoosableFileFilter(filter);\n// int returnValue = jfc.showOpenDialog(null);\n//\n// if (returnValue == JFileChooser.APPROVE_OPTION) {\n//\n// File file = jfc.getSelectedFile();\n//\n// try {\n// byte[] imageData = Files.readAllBytes(file.toPath());\n// byte[] stringData = Base64.getEncoder().encode(imageData);\n//\n// String imageString = new String(stringData);\n//\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(imageString);\n//\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n// }\n//\n// });\n//\n// removeImageButton.addClickCommands(source -> {\n// PanelBackground panelBackground = (PanelBackground) getReflectedProperty().getValue();\n// panelBackground.setBase64Image(\"\");\n// });\n//\n//\n// try {\n//\n// // color\n// Method get = PanelBackground.class.getMethod(\"getColor\");\n// Method set = PanelBackground.class.getMethod(\"setColor\", ColorRGBA.class);\n//\n// ColorRGBAComponent bgColorComponent = new ColorRGBAComponent(getReflectedProperty().getValue(), get, set);\n// bgColorComponent.setPropertyName(\"Color\");\n// contentContainer.addChild(bgColorComponent.getPanel());\n// components.add(bgColorComponent);\n//\n// // insetTop\n// get = PanelBackground.class.getMethod(\"getInsetTop\");\n// set = PanelBackground.class.getMethod(\"setInsetTop\", int.class);\n//\n// IntComponent insetTopComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetTopComponent.setPropertyName(\"Inset Top\");\n// contentContainer.addChild(insetTopComponent.getPanel());\n// components.add(insetTopComponent);\n//\n// // insetLeft\n// get = PanelBackground.class.getMethod(\"getInsetLeft\");\n// set = PanelBackground.class.getMethod(\"setInsetLeft\", int.class);\n//\n// IntComponent insetLeftComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetLeftComponent.setPropertyName(\"Inset Left\");\n// contentContainer.addChild(insetLeftComponent.getPanel());\n// components.add(insetLeftComponent);\n//\n// // insetBottom\n// get = PanelBackground.class.getMethod(\"getInsetBottom\");\n// set = PanelBackground.class.getMethod(\"setInsetBottom\", int.class);\n//\n// IntComponent insetBottomComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetBottomComponent.setPropertyName(\"Inset Bottom\");\n// contentContainer.addChild(insetBottomComponent.getPanel());\n// components.add(insetBottomComponent);\n//\n// // insetRight\n// get = PanelBackground.class.getMethod(\"getInsetRight\");\n// set = PanelBackground.class.getMethod(\"setInsetRight\", int.class);\n//\n// IntComponent insetRightComponent = new IntComponent(getReflectedProperty().getValue(), get, set);\n// insetRightComponent.setPropertyName(\"Inset Right\");\n// contentContainer.addChild(insetRightComponent.getPanel());\n// components.add(insetRightComponent);\n//\n// // zOffset\n// get = PanelBackground.class.getMethod(\"getzOffset\");\n// set = PanelBackground.class.getMethod(\"setzOffset\", float.class);\n//\n// FloatComponent zOffsetComponent = new FloatComponent(getReflectedProperty().getValue(), get, set);\n// zOffsetComponent.setPropertyName(\"Z-Offset\");\n// contentContainer.addChild(zOffsetComponent.getPanel());\n// components.add(zOffsetComponent);\n//\n// } catch (NoSuchMethodException e) {\n// e.printStackTrace();\n// }\n\n\n }", "@Override\n public Control createDialogArea(Composite parent) {\n Composite top = (Composite) super.createDialogArea(parent);\n\n /*\n * Create the main layout for the shell.\n */\n GridLayout mainLayout = new GridLayout(1, false);\n mainLayout.verticalSpacing = 15;\n top.setLayout(mainLayout);\n GridData mainLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true);\n top.setLayoutData(mainLayoutData);\n\n createStormTypeArea(top);\n createViewerArea(top);\n createTransmitArea(top);\n\n /*\n * Sets dialog title\n */\n getShell().setText(\"View/Send PSH\");\n\n // Update GUI from PshData.\n updateGui(pshData);\n\n return top;\n }", "public NewRoomFrame() {\n initComponents();\n }", "public Cool303ComponentsPastel()\n {\n super();\n Dimension size = getPreferredSize();\n size.width = size.height = Math.max(size.width, size.height);\n setPreferredSize(size);\n setContentAreaFilled(false);\n\n }", "public Rectangle getArea() {\n return area;\n }", "public Parent creatPanel() {\r\n\t\t\r\n\t\thlavniPanel = new BorderPane();\r\n\t\thlavniPanel.setCenter(creatGameDesk());\r\n\t\thlavniPanel.setTop(createMenuBar());\r\n\t\t\r\n\t\thlavniPanel.setBackground(new Background(new BackgroundFill(Color.BURLYWOOD, CornerRadii.EMPTY, Insets.EMPTY)));\r\n\t\thlavniPanel.setPadding(new Insets(8));\r\n\t\treturn hlavniPanel;\r\n\t}", "public OPTION() {\n initComponents();\n setVisible(true);\n setBounds(500,190,575,400);\n }", "void paintMainArea(Graphics g);", "public Rectangle() {\n\t\tthis.corner = new Point();\n\t\tthis.size = new Point();\n\t}", "private void createRectangle() {\n int x = 0;\n int y = 270;\n int x1 = 230;\n for(int index = 0; index < 10; index++){\n rec[index] = new JLabel();\n doublyrec[index] = new JLabel();\n circularrec[index] = new JLabel();\n arrowLabel[index] = new JLabel();\n doublyarrowLabel[index] = new JLabel();\n circulararrowLabel[index] = new JLabel();\n rec[index].setBackground(new java.awt.Color(0, 0, 255));\n rec[index].setLocation(x,y);\n rec[index].setVisible(false);\n rec[index].setSize(80,40);\n rec[index].setOpaque(true);\n rec[index].setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n singlyPracticalPanel.add(rec[index]);\n doublyrec[index].setBackground(new java.awt.Color(0, 0, 255));\n doublyrec[index].setLocation(x,y);\n doublyrec[index].setVisible(false);\n doublyrec[index].setSize(80,40);\n doublyrec[index].setOpaque(true);\n doublyrec[index].setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n doublyPracticalPanel.add(doublyrec[index]);\n circularrec[index].setBackground(new java.awt.Color(0, 0, 255));\n circularrec[index].setLocation(x,y);\n circularrec[index].setVisible(false);\n circularrec[index].setSize(80,40);\n circularrec[index].setOpaque(true);\n circularrec[index].setFont(new java.awt.Font(\"Tahoma\", 1, 14));\n circularPracticalPanel.add(circularrec[index]);\n y -= 20;\n arrowLabel[index].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/DataStructure/22312.png\")));\n singlyPracticalPanel.add(arrowLabel[index]);\n arrowLabel[index].setBounds(x1, 210, 20, 20);\n arrowLabel[index].setVisible(false);\n \n doublyarrowLabel[index].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/DataStructure/doubly.png\")));\n doublyPracticalPanel.add(doublyarrowLabel[index]);\n doublyarrowLabel[index].setBounds(x1, 210, 20, 20);\n doublyarrowLabel[index].setVisible(false);\n \n circulararrowLabel[index].setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/DataStructure/22312.png\")));\n circularPracticalPanel.add(circulararrowLabel[index]);\n circulararrowLabel[index].setBounds(x1, 210, 20, 20);\n circulararrowLabel[index].setVisible(false);\n \n x1 += 100;\n }\n }", "void setBounds(Rectangle rectangle);", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder(\n int index) {\n return getAreaFieldBuilder().addBuilder(\n index, com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder(\n int index) {\n return getAreaFieldBuilder().addBuilder(\n index, com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "public com.example.grpc.SimpleServiceOuterClass.Area.Builder addAreaBuilder(\n int index) {\n return getAreaFieldBuilder().addBuilder(\n index, com.example.grpc.SimpleServiceOuterClass.Area.getDefaultInstance());\n }", "protected Control createDialogArea(Composite parent) {\n\t\t//Composite composite = (Composite) super.createDialogArea(parent);\n\t\tComposite composite = new Composite(parent, SWT.NULL);\n\t\t\n\t\tGridLayout layout = new GridLayout(5, false);\n\t\tlayout.marginWidth = 15;\n\t\tlayout.marginHeight = 10;\n\t\tlayout.verticalSpacing = 8;\n\t\tcomposite.setLayout(layout);\n\t\t\n\t\tLabel l;\n\t\tGridData gridData;\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Fecha:\");\n\t\ttxtFecha = new Text(composite, SWT.BORDER);\n\t\tgridData = new GridData(60,15);\n\t\ttxtFecha.setLayoutData(gridData);\n\t\t//txtFecha.addKeyListener(this.crearKeyAdapter(txtFecha)); // calendar ya incluye esto\n\t\t\n\t\tbFecha = new Button(composite, SWT.NONE);\n\t\tgridData = new GridData(16,16);\n\t\t//gridData.horizontalSpan = 2;\n\t\tbFecha.setLayoutData(gridData);\n\t\timage = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, IImageKeys.CALENDARIO);\n\t\tbFecha.setImage(image.createImage());\n\t\tbFecha.addSelectionListener(this.crearCalendario(shell, txtFecha));\n\n\t\tfinal Label labelNoches = new Label(composite, SWT.NONE);\n\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\n\t\tComposite compQty = new Composite(composite, SWT.NONE);\n\t\tlayout = new GridLayout(3, false);\n\t\tlayout.marginWidth = 0;\n\t\tcompQty.setLayout(layout);\n\t\t\n\t\ttxtCantidad = new Text(compQty, SWT.BORDER);\n\t\tgridData = new GridData(25,15);\n\t\ttxtCantidad.setLayoutData(gridData);\n\t\t\n\t\tfinal Label labelEspacios = new Label(compQty, SWT.NONE);\n\t\tlabelEspacios.setText(\"PAX(s):\");\n\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\tgridData = new GridData(45, 15);\n\t\tgridData.horizontalIndent = 10;\n\t\tlabelEspacios.setLayoutData(gridData);\n\t\ttxtEspacios = new Text(compQty, SWT.BORDER);\n\t\ttxtEspacios.setLayoutData(new GridData(25,15));\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Tipo:\");\n\t\tcomboTipo = new Combo(composite, SWT.READ_ONLY);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 120;\n\t\tgridData.horizontalSpan = 2;\n\t\tcomboTipo.setLayoutData(gridData);\n\t\tcdTipoProductos = cdController.getComboDataTipoProductos();\n\t\tcomboTipo.setItems(cdTipoProductos.getTexto());\n\t\tcomboTipo.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint indice = comboTipo.getSelectionIndex();\n\t\t\t\tif (indice != -1) {\n\t\t\t\t\tLong seleccionado = cdTipoProductos.getKeyAsLongByIndex(indice);\n\t\t\t\t\tproductos.filtrarByTipo(seleccionado, true); // eliminamos cualquier filtro previo\n\t\t\t\t}\n\t\t\t\tcomboProducto.setItems(productos.getTexto());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Actividad:\");\n\t\tcomboProducto = new Combo(composite, SWT.READ_ONLY);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 150;\n\t\tcomboProducto.setLayoutData(gridData);\n\t\t/*\n\t\tcomboProducto.addSelectionListener(new SelectionListener() {\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"widgetDefSel: \" + comboProducto.getText());\n\t\t\t}\n\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"widgetSelected: \" + comboProducto.getText());\t\n\t\t\t}\n\t\t});\n\t\tcomboProducto.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tSystem.out.println(\"modifyText: \" + comboProducto.getText());\t\n\t\t\t}\n\t\t});\n\t\t*/\n\t\t\n\t\tcomboProducto.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tif (!comboProducto.getText().equals(\"\")) {\n\t\t\t\t\tLong idProducto = productos.getIdProductoByName(comboProducto.getText());\n\t\t\t\t\tProducto p = productos.getProductoByIdProducto(idProducto);\n\t\t\t\t\tString tipoReserva = p.getTipoReserva();\n\t\t\t\t\tisRecursoAEP = p.isHotelAEP();\n\t\t\t\t\tisModificable = p.isModificable();\n\t\t\t\t\tprecioMinimo = p.getPrecioMinimo();\n\t\t\t\t\tSystem.out.println(\"Minimo: \" + precioMinimo);\n\t\t\t\t\tif (tipoReserva.equals(\"Hotel\") || tipoReserva.equals(\"Hospedaje\")) {\n\t\t\t\t\t\tlabelNoches.setText(\"Noche(s):\");\n\t\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\t\tlabelEspacios.setText(\"Room(s):\");\n\t\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\t\tlabelEspacios.setText(\"PAX(s):\");\n\t\t\t\t\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t\t}\n\t\t\t\t\tlistaTipoPrecio.setEnabled(true);\n\t\t\t\t\tlistaTipoPrecio.deselectAll();\n\t\t\t\t\ttxtPrecio.setText(\"\");\n\t\t\t\t\ttxtPrecio.setEditable(isModificable == null ? false : isModificable.booleanValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\tcomboProducto.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint idProducto = productos.getIdProductoByName(comboProducto.getText());\n\t\t\t\tProducto p = productos.getProductoByIdProducto(idProducto);\n\t\t\t\tString tipoReserva = p.getTipoReserva();\n\t\t\t\tif (tipoReserva.equals(\"Hotel\") || tipoReserva.equals(\"Hospedaje\")) {\n\t\t\t\t\tlabelNoches.setText(\"Noche(s):\");\n\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\tlabelEspacios.setText(\"Room(s):\");\n\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t} else {\n\t\t\t\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\tlabelEspacios.setText(\"PAXs:\");\n\t\t\t\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t}\n\t\t\t\tlistaTipoPrecio.setEnabled(true);\n\t\t\t\tlistaTipoPrecio.deselectAll();\n\t\t\t\ttxtPrecio.setText(\"\");\n\t\t\t}\n\t\t});\n\t\t*/\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Tipo de precio:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 75;\n\t\tgridData.horizontalSpan = 2;\n\n\t\tlistaTipoPrecio = new List(composite, SWT.SINGLE | SWT.BORDER);\n\t\tlistaTipoPrecio.setLayoutData(gridData);\n\t\tlistaTipoPrecio.setItems(new String[] {\"Comisionable\", \"Operador\", \"Público\"});\n\t\tlistaTipoPrecio.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tobtenerPrecio(listaTipoPrecio.getSelection()[0]);\n\t\t\t}\n\t\t});\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Precio:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\t\n\t\tComposite compPrecio = new Composite(composite, SWT.NONE);\n\t\tlayout = new GridLayout(3, false);\n\t\tlayout.marginWidth = 0;\n\t\tlayout.marginHeight = 0;\n\t\tcompPrecio.setLayout(layout);\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tcompPrecio.setLayoutData(gridData);\n\t\t\n\t\ttxtPrecio = new Text(compPrecio, SWT.BORDER);\n\t\ttxtPrecio.setEditable(false);\n\t\tgridData = new GridData(50,15);\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\ttxtPrecio.setLayoutData(gridData);\n\n\t\tButton bCuadrar = new Button(compPrecio, SWT.PUSH);\n\t\tgridData = new GridData(12,16);\n\t\tbCuadrar.setLayoutData(gridData);\n\t\timage = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, \"icons/cuadrar.gif\");\n\t\tbCuadrar.setImage(image.createImage());\n\t\tbCuadrar.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"Botón de cuadrar...\");\n\t\t\t\tcuadrarCotizacion();\n\t\t\t}\n\t\t});\t\n\t\t\n\t\tbVisible = new Button(compPrecio, SWT.CHECK);\n\t\tbVisible.setText(\"Visible\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalIndent = 15;\n\t\tbVisible.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Comentarios:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\ttxtComentario = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);\n\t\tgridData = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgridData.horizontalSpan = 4;\n\t\tgridData.heightHint = 40;\n\t\ttxtComentario.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Un \\\"*\\\" al inicio del comentario mostrará el mismo en el PDF de la cotización.\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalSpan = 4;\n\t\tl.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\t\n\t\tl = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t gridData = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgridData.heightHint = 10;\n\t\tgridData.horizontalSpan = 5;\n\t\tl.setLayoutData(gridData);\n\n\t\tllenarCampos();\n\t\t\n\t\treturn composite;\n\t}", "public TelaAbigo() {\n initComponents();\n setLocationRelativeTo(null);\n setResizable(false);\n }", "Rectangle(double newWidth, double newHeight){\n height = newHeight;\n width = newWidth;\n }", "public static void main(String[] args) {\n\t\tRectangleArea ra = new RectangleArea();\r\n\t\tra.readInput();\r\n\t\tra.display();\r\n\t}", "private JMenuBar createbar(){\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t//Add a JMenu\n\t\tJMenu c = new JMenu(\"Create\");\n\t\tJMenu m = new JMenu(\"Manipulate\"); \n\t\tJMenu o = new JMenu(\"Other\");\n\n\t\tmenuBar.add(c);\n\t\tmenuBar.add(m);\n\t\tmenuBar.add(o);\n\n\t\t//Create menu\n\t\tJMenuItem cPyramid = new JMenuItem(\"Pyramid\");\n\t\tJMenuItem cSquare = new JMenuItem(\"Square\");\n\t\tJMenuItem cStar = new JMenuItem(\"Star\");\n\t\tJMenuItem cSphere = new JMenuItem(\"Sphere\");\n\t\tJMenuItem cCube = new JMenuItem(\"Cube\");\n\t\tJMenuItem cLight = new JMenuItem(\"Light\");\n\n\t\tc.add(cPyramid);\n\t\tc.add(cSquare);\n\t\tc.add(cStar);\n\t\tc.add(cSphere);\n\t\tc.add(cCube);\n\t\tc.add(cLight);\n\t\t\n\n\t\t//Manipulate menu\n\t\tJMenuItem mModify = new JMenuItem(\"Modify\");\n\t\tJMenuItem mDelete = new JMenuItem(\"Delete\");\n\n\t\tm.add(mModify);\n\t\tm.add(mDelete);\n\n\t\tJMenuItem oDeleteAll = new JMenuItem(\"Delete All (lights remain but will be overwritten)\"); \n\t\tJMenuItem oPrint = new JMenuItem(\"Print Structure\");\n\n\t\to.add(oPrint);\n\t\to.add(oDeleteAll);\n\n\n\t\tcPyramid.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Pyramid, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\n\t\t});\n\n\t\tcSquare.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Square, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcStar.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Star, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcSphere.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Sphere, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\t\t\n\t\tcCube.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Cube, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcLight.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Light, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tmModify.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfor (Figure_deployment_type fig: draw.figurelist) {\n\t\t\t\t\tif (fig.getId()==draw.picked_figure){\n\t\t\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, fig.type, draw.picked_figure);\n\t\t\t\t\t\tif (cdialog.getAnswer()!=null){\n\t\t\t\t\t\t\tfig.modify(cdialog.getModify());\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\tmDelete.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint n =-1;\n\t\t\t\tfor (int i = 0; i < draw.figurelist.size(); i++) {\n\t\t\t\t\tif(draw.figurelist.get(i).getId()==draw.picked_figure)\n\t\t\t\t\t\tn=i;\n\t\t\t\t}\n\t\t\t\tif (n!=-1)\n\t\t\t\tdraw.figurelist.remove(n);\n\t\t\t}\n\t\t});\n\n\t\toDeleteAll.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdraw.figurelist.clear();\n\t\t\t}\n\t\t});\n\n\t\toPrint.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nArrayList<Figure_deployment_type> : {\");\n\t\t\t\tfor (Figure_deployment_type fig : draw.figurelist) {\n\t\t\t\t\tSystem.out.print(\"[ \");\n\t\t\t\t\tSystem.out.print(fig.toString());\n\t\t\t\t\tSystem.out.println(\" ]\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"}\");\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\treturn menuBar;\n\t}", "public void addBoundingBox() {\n abstractEditor.drawNewShape(new EBoundingBoxDT());\n }", "public void createGui(){\n\t\twindow = this.getContentPane(); \n\t\twindow.setLayout(new FlowLayout());\n\n\t\t//\tAdd \"panel\" to be used for drawing \n\t\t_panel = new ResizableImagePanel();\n\t\tDimension d= new Dimension(1433,642);\n\t\t_panel.setPreferredSize(d);\t\t \n\t\twindow.add(_panel);\n\n\t\t// A menu-bar contains menus. A menu contains menu-items (or sub-Menu)\n\t\tJMenuBar menuBar; // the menu-bar\n\t\tJMenu menu; // each menu in the menu-bar\n\n\t\tmenuBar = new JMenuBar();\n\t\t// First Menu\n\t\tmenu = new JMenu(\"Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A); // alt short-cut key\n\t\tmenuBar.add(menu); // the menu-bar adds this menu\n\n\t\tmenuItem1 = new JMenuItem(\"Fruit\", KeyEvent.VK_F);\n\t\tmenu.add(menuItem1); // the menu adds this item\n\n\t\tmenuItem2 = new JMenuItem(\"Pacman\", KeyEvent.VK_S);\n\t\tmenu.add(menuItem2); // the menu adds this item\n\t\tmenuItem3 = new JMenuItem(\"Run\");\n\t\tmenu.add(menuItem3); // the menu adds this item \n\t\tmenuItem4 = new JMenuItem(\"Save Game\");\n\t\tmenu.add(menuItem4); // the menu adds this item\n\n\t\tmenuItem5 = new JMenuItem(\"Open Game\");\n\t\tmenu.add(menuItem5); // the menu adds this item\n\t\tmenuItem6 = new JMenuItem(\"Clear Game\");\n\t\tmenu.add(menuItem6); // the menu adds this item\n\t\tmenuItem1.addActionListener(this);\n\t\tmenuItem2.addActionListener(this);\n\t\tmenuItem3.addActionListener(this);\n\t\tmenuItem4.addActionListener(this);\n\t\tmenuItem5.addActionListener(this);\n\t\tmenuItem6.addActionListener(this);\n\n\t\tsetJMenuBar(menuBar); // \"this\" JFrame sets its menu-bar\n\t\t// panel (source) fires the MouseEvent.\n\t\t//\tpanel adds \"this\" object as a MouseEvent listener.\n\t\t_panel.addMouseListener(this);\n\t}", "public static void main(String[] args) {\n Rectangle myRect; //ISSUE 2: No existe la clase Rectangle\n //SOLVE 2: Se creo la clase Rectangle dentro del mismo paquete\n //ISSUE 2.1: No se ha instanciado myRectangle\n myRect = new Rectangle();//SOLVE 2.1: Se instancio my Rect\n myRect.width = 40; //ISSUE 3: No existe un atributo que se llame width dentro de la clase Rectangle\n //SOLVE 3: Se creo la propiedad width a la clase rectangle\n myRect.height = 50; //ISSUE 4: No existe un atributo que se llame height dentro de la clase Rectangle\n //SOLVE 4: Se creo la propiedad hright a la clase rectangle\n System.out.println(\"myRect's area is \" + myRect.area()); //ISSUE 5: No existe el metodo Area dentro de la clase Rectangle\n //SOLVE 5: Se creo el metodo Area en la clase rectangle que multiplica width por height\n }", "private void createGUI() {\n ResizeGifPanel newContentPane = new ResizeGifPanel();\n newContentPane.setOpaque(true); \n setContentPane(newContentPane); \n }", "Rectangle(int l, int w)\n {\n\tlength = l;\n\twidth = w;\n }", "private void buildGui() {\r\n mainPanel = \r\n new JPanel(new BorderLayout()) {\r\n public void updateUI() {\r\n super.updateUI();\r\n BorderLayout layout = (BorderLayout) getLayout();\r\n int gap = 1 + getFont().getSize() / 2;\r\n layout.setHgap(gap);\r\n layout.setVgap(gap);\r\n setBorder(BorderFactory.createEmptyBorder(gap, gap,\r\n gap, gap));\r\n }\r\n };\r\n displayPanel = \r\n new JPanel() {\r\n public Dimension getPreferredSize() {\r\n return new Dimension(0, 0);\r\n }\r\n \r\n public void paintComponent(final Graphics g) {\r\n paintDisplay(g);\r\n }\r\n };\r\n displayPanel.addMouseMotionListener(\r\n new MouseMotionAdapter() {\r\n public void mouseMoved(final MouseEvent e) {\r\n handleMouseMove(e.getX(), e.getY());\r\n }\r\n });\r\n displayPanel.addMouseListener(\r\n new MouseAdapter() {\r\n public void mouseExited(final MouseEvent e) {\r\n mouseOut = true;\r\n if (topBounds == null) {\r\n textArea.setText(\"\");\r\n }\r\n else {\r\n textArea.setText(topBounds.toString());\r\n }\r\n }\r\n });\r\n JSplitPane splitPane = new JSplitPane();\r\n splitPane.setResizeWeight(.5);\r\n mainPanel.add(splitPane, \"Center\");\r\n splitPane.setTopComponent(displayPanel);\r\n textArea = new JTextArea();\r\n textArea.setEditable(false);\r\n splitPane.setBottomComponent(textArea);\r\n \r\n GridBagConstraints constraints = new GridBagConstraints();\r\n Insets insets = constraints.insets;\r\n int spacing = 4;\r\n constraints.weightx = .001;\r\n constraints.weighty = .001;\r\n insets.top = spacing;\r\n insets.bottom = spacing;\r\n insets.right = spacing;\r\n insets.left = spacing;\r\n constraints.gridwidth = GridBagConstraints.REMAINDER;\r\n constraints.fill = GridBagConstraints.NONE;\r\n //constraints.anchor = GridBagConstraints.WEST;\r\n \r\n if (topBounds != null) {\r\n textArea.setText(topBounds.toString());\r\n }\r\n }", "public DrawingArea(int width, int height) {\n\t\tthis.initialize(width, height);\n\t}", "private void makeRooms(){\n roomPanel = new JPanel(new GridLayout(2,3,2,2));\n\n //rooms\n prison = new JTextArea(\"Prison\",10,20);\n embassy = new JTextArea(\"Embassy\",10,20);\n academy = new JTextArea(\"Academy\",10,20);\n treasury = new JTextArea(\"Treasury\",10,20);\n altar = new JTextArea(\"Altar\",10,20);\n market = new JTextArea(\"Market\",10,20);\n\n roomPanel.add(prison);\n roomPanel.add(embassy);\n roomPanel.add(academy);\n roomPanel.add(treasury);\n roomPanel.add(altar);\n roomPanel.add(market);\n }", "public BoardGUI()\n {\n setBackground(Color.GRAY);\n setLayout(null);\n }", "private void geometry()\n\t\t{\n\t\tjLabelNickName = new JLabel(\"Pseudo: \");\n\t\tjLabelPort = new JLabel(\"Port: \");\n\t\tjNickname = new JTextField();\n\t\tjIPLabel = new JIPLabel();\n\t\tjIP = new JTextField();\n\t\tjPort = new JSpinner();\n\t\tjButtonConnection = new JButton(\"Connexion\");\n\n\t\tthis.setLayout(new GridLayout(-1, 1));\n\n\t\tthis.add(jLabelNickName);\n\t\tthis.add(jNickname);\n\t\tthis.add(jIPLabel);\n\t\tthis.add(jIP);\n\t\tthis.add(jLabelPort);\n\t\tthis.add(jPort);\n\t\tthis.add(Box.createVerticalStrut(SPACE));\n\t\tthis.add(jButtonConnection);\n\t\tthis.add(Box.createVerticalGlue());\n\t\t}", "private void buildGUI() {\r\n textArea = new JTextArea(20, 50);\r\n textArea.setEditable(false);\r\n textArea.setLineWrap(true);\r\n add(new JScrollPane(textArea), BorderLayout.CENTER);\r\n\r\n Box box = Box.createHorizontalBox();\r\n add(box, BorderLayout.SOUTH);\r\n inputTextField = new JTextField();\r\n sendButton = new JButton(\"Send\");\r\n box.add(inputTextField);\r\n box.add(sendButton);\r\n\r\n // Action for the inputTextField and the goButton\r\n ActionListener sendListener = new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n String str = inputTextField.getText();\r\n if (str != null && str.trim().length() > 0) {\r\n chatAccess.send(str);\r\n }\r\n inputTextField.selectAll();\r\n inputTextField.requestFocus();\r\n inputTextField.setText(\"\");\r\n }\r\n };\r\n inputTextField.addActionListener(sendListener);\r\n sendButton.addActionListener(sendListener);\r\n\r\n this.addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n chatAccess.close();\r\n }\r\n });\r\n }", "public FINALROOM() {\n initComponents();\n this.setLocationRelativeTo(null);\n\n }", "Rectangle getRect(){\n \treturn new Rectangle(x,y,70,25);\n }", "private static void createGUI(){\r\n\t\tframe = new JFrame(\"Untitled\");\r\n\r\n\t\tBibtexImport bib = new BibtexImport();\r\n\t\tbib.setOpaque(true);\r\n\r\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tframe.setContentPane(bib);\r\n\t\tframe.setJMenuBar(bib.menu);\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "public static void main(String[] args)\r\n\t{\n\t Area_1 rectangle = new Area_1(6, 6);\r\n\t rectangle.getArea();\r\n\r\n\t}", "@Override\n protected ActiveAreaPresenter createPresenter() {\n return new ActiveAreaPresenter(this);\n }", "@Override\r\n\tpublic String toString() {\r\n\r\n\t\treturn \"My rectangle's Areas is \"+area();\r\n\t}", "public static void createAndShowGUI() {\n windowContent.add(\"Center\",p1);\n\n //Create the frame and set its content pane\n JFrame frame = new JFrame(\"GridBagLayoutCalculator\");\n frame.setContentPane(windowContent);\n\n // Set the size of the window to be big enough to accommodate all controls\n frame.pack();\n\n // Display the window\n frame.setVisible(true);\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public void claShapeArea(){\r\n\t\tshape.calArea();\r\n\t}", "public RIAComboboxPanel()\n {\n super();\n initialize();\n }", "public void setArea(String area) {\n this.area = area;\n }", "public void createMainGame() {\n\t\tpanelIntro.setVisible(false);\n\t\tintroButtonPanel.setVisible(false);\n\t\t\n\t\tpanelMain = new JPanel();\n\t\t\n\t\tcon.add(panelMain);\n\t\t\n\t\tplayerPanel = new JPanel();\n\t\tplayerPanel.setBounds(50, 25, 924, 50);\n\t\tplayerPanel.setBackground(Color.DARK_GRAY);\n\t\tplayerPanel.setLayout(new GridLayout(1,4));\n\t\tpanelMain.add(playerPanel);\n\t\tcon.add(playerPanel);\n\t\t\n\t\tenergyLabel = new JLabel(\" Energie: \");\n\t\tenergyLabel.setFont(playerInfo);\n\t\tenergyLabel.setForeground(Color.LIGHT_GRAY);\n\t\tplayerPanel.add(energyLabel);\n\t\t\n\t\tenergyLabelNumber = new JLabel();\n\t\tenergyLabelNumber.setFont(playerInfo);\n\t\tenergyLabelNumber.setForeground(Color.LIGHT_GRAY);\n\t\tplayerPanel.add(energyLabelNumber);\n\t\t\n\t\tdoubtLevelLabel = new JLabel(\"Misstrauen: \");\n\t\tdoubtLevelLabel.setFont(playerInfo);\n\t\tdoubtLevelLabel.setForeground(Color.LIGHT_GRAY);\n\t\tplayerPanel.add(doubtLevelLabel);\n\t\t\n\t\tdLLNumber = new JLabel();\n\t\tdLLNumber.setFont(playerInfo);\n\t\tdLLNumber.setForeground(Color.LIGHT_GRAY);\n\t\tplayerPanel.add(dLLNumber);\n\t\tplayerPanel.add(Box.createRigidArea(new Dimension(50, 50)));\n\t\tplayerPanel.add(Box.createRigidArea(new Dimension(50, 50)));\n\t\tplayerPanel.add(Box.createRigidArea(new Dimension(50, 50)));\n\t\tplayerPanel.add(Box.createRigidArea(new Dimension(50, 50)));\n\t\t\n\t\tbirdText = new JTextArea();\n\t\tbirdText.setBackground(Color.BLACK);\n\t\tbirdText.setFont(dialogueText);\n\t\tbirdText.setForeground(Color.white);\n\t\tbirdText.setLineWrap(true);\n\t\tbirdText.setWrapStyleWord(true);\n\t\tbirdText.setBounds(354, 200, 250, 150);\n\t\tbirdText.setVisible(false);\n\t\tcon.add(birdText);\n\t\t\n\t\tbirdPanel = new JPanel();\n\t\tbirdPanel.setBounds(354, 387, 60, 82);\n\t\tbirdPanel.setBackground(Color.BLACK);\n\t\tbirdPanel.addMouseListener(new birdListener());\n\t\ttry {\n\t\t\tBufferedImage birdPicture = ImageIO.read(new File(\".//res//bird_kleiner.jpg\"));\n\t\t\tJLabel birdLabel = new JLabel(new ImageIcon(birdPicture));\n\t\t\tbirdPanel.add(birdLabel);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tcon.add(birdPanel);\n\t\t\n\t\thereComesTheText = new JTextArea();\n\t\thereComesTheText.setBounds(55, 100, 285, 370);\n\t\thereComesTheText.setBackground(Color.BLACK);\n\t\thereComesTheText.setForeground(Color.LIGHT_GRAY);\n\t\thereComesTheText.setFont(dialogueText);\n\t\thereComesTheText.setLineWrap(true);\n\t\thereComesTheText.setWrapStyleWord(true);\n\t\tpanelMain.add(hereComesTheText);\n\t\tcon.add(hereComesTheText);\n\t\t\n\t\timagePanel.setBounds(427, 95, 546, 375);\n\t\timagePanel.setBackground(Color.black);\n\t\tpanelMain.add(imagePanel);\n\t\tcon.add(panelMain);\n\t\t\n\t\timagePanel.add(imageLabel);\n\t\t\n\t\tcon.add(imagePanel);\n\t\t\n\t\tpanelButtons = new JPanel();\n\t\tpanelButtons.setBounds(50, 510, 924, 200);\n\t\tpanelButtons.setBackground(Color.black);\n\t\tpanelButtons.setLayout(new GridLayout(2, 2));\n\t\tcon.add(panelButtons);\n\t\t\n\t\tfor(int i=1; i<5; i++) {\n\t\t\tbuttons.get(i).setBackground(Color.black);\n\t\t\tbuttons.get(i).setForeground(Color.LIGHT_GRAY);\n\t\t\tbuttons.get(i).setFont(runningText);\n\t\t\tbuttons.get(i).setFocusPainted(false);\n\t\t\tpanelButtons.add(buttons.get(i));\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\r\n\t\t\r\n\t\tJLabel welcome = new JLabel(\"WELCOME\");\r\n\t\twelcome.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t\twelcome.setFont(welcome.getFont().deriveFont(25.0f));\r\n panel.add(welcome);\r\n \r\n JLabel toThe = new JLabel(\"to the\");\r\n toThe.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n \t \ttoThe.setFont(toThe.getFont().deriveFont(17.0f));\r\n \t \tpanel.add(toThe);\r\n \t \t\r\n \t \tJLabel colourGame = new JLabel(\"Colour Game\");\r\n \t colourGame.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n \t \tcolourGame.setFont(colourGame.getFont().deriveFont(25.0f));\r\n \t \tcolourGame.setForeground(Color.RED);\r\n \t \tpanel.add(colourGame);\r\n \t \t\r\n \t \t// Adds empty space to the panel\r\n \t panel.add(Box.createRigidArea(new Dimension(0, 100)));\r\n \t \r\n \t JLabel text = new JLabel(\"> Choose the colour of the provided items\");\r\n\t text.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n\t panel.add(text);\r\n\t \r\n\t panel.add(Box.createRigidArea(new Dimension(0, 40)));\r\n\t\t\r\n\t JButton startButton = new JButton(\"Start\");\r\n startButton.setAlignmentX(Component.CENTER_ALIGNMENT);\r\n startButton.setMaximumSize(new Dimension(600, 60));\r\n startButton.setBackground(Color.WHITE);\r\n panel.add(startButton);\r\n\r\n // Set up frame\r\n\t\tJFrame frame = new JFrame(\"Colour Game\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n //Set up content pane\r\n frame.getContentPane().add(panel);\r\n \r\n //Display window\r\n frame.setVisible(true);\r\n frame.setResizable(false);\r\n frame.setSize(700, 360);\r\n frame.setLocationRelativeTo(null);\r\n\t}", "private void initialize() {\n\n\t\t//Frame operations\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 1030, 700);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(new BoxLayout(frame.getContentPane(), BoxLayout.X_AXIS));\n\t\tframe.setTitle(\"Get There\");\n\t\tframe.setResizable(false);\n\t\tframe.setVisible(true);\n\n\t\t//Panel Operations\n\t\tuiPanel = new JPanel();\n\t\tframe.getContentPane().add(uiPanel);\n\t\tuiPanel.setLayout(null);\n\n\t\tmapPanel = new JPanel();\n\t\tmapPanel.setBounds(5, 5, 750, 620);\n\t\tuiPanel.add(mapPanel);\n\t\tmapPanel.add(new MyGraphics());\n\n\t\t//Creating Labels\n\t\tstartPoint = new JLabel(\"FROM\");\n\t\tstartPoint.setBounds(780, 6, 132, 29);\n\n\t\tbuildingStart = new JLabel(\"Select Building:\");\n\t\tbuildingStart.setBounds(762, 26, 132, 29);\n\n\t\troomStart = new JLabel(\"Select Room:\");\n\t\troomStart.setBounds(900, 26, 132, 29);\n\n\t\tendPoint = new JLabel(\"TO\");\n\t\tendPoint.setBounds(780, 72, 132, 29);\n\n\t\tbuildingEnd = new JLabel(\"Select Building:\");\n\t\tbuildingEnd.setBounds(762, 92, 132, 29);\n\n\t\troomEnd = new JLabel(\"Select Room:\");\n\t\troomEnd.setBounds(900, 92, 132, 29);\n\n\n\t\t//Add Labels to the uiPanel\n\t\tuiPanel.add(startPoint);\n\t\tuiPanel.add(buildingStart);\n\t\tuiPanel.add(roomStart);\n\t\tuiPanel.add(endPoint);\n\t\tuiPanel.add(buildingEnd);\n\t\tuiPanel.add(roomEnd);\n\n\t\tstartRoomSEL.setModel(new DefaultComboBoxModel(new String[]{}));\n\t\tstartRoomSEL.setBounds(893, 50, 132, 29);\n\t\tstartRoomSEL.setEditable(false);\n\t\tstartRoomSEL.setVisible(true);\n\t\tstartRoomSEL.setName(\"Start\");\n\t\t\n\t\tmapNumber = new JTextPane();\n\t\tmapNumber.setBounds(360, 634, 47, 20);\n\t\tmapNumber.setEditable(false);\n\t\tmapNumber.setFont(new Font(\"Helvetica Neue\", Font.BOLD, 14));\n\t\tmapNumber.setAlignmentX(StyleConstants.ALIGN_CENTER);\n\t\tmapNumber.setAlignmentY(StyleConstants.ALIGN_CENTER);\n\t\tuiPanel.add(mapNumber);\n\n\t\t//Construct Combo boxes to select start point\n\t\tstartBuildingSEL = new JComboBox<String>();\n\t\tstartBuildingSEL.setBounds(755, 50, 132, 29);\n\t\tstartBuildingSEL.setEditable(false);\n\t\tstartBuildingSEL.setVisible(true);\n\t\tstartBuildingSEL.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdatePath = false;\n\t\t\t\tmapNumber.setText(\"\");\n\t\t\t\tstartRoomSELLaunched = false;\n\t\t\t\tendRoomSELLaunched = false;\n\t\t\t\trepaint();\n\t\t\t\trevalidate();\n\t\t\t\tint indexOfCurrentMap;\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tJComboBox<String> cb = (JComboBox<String>)e.getSource();\n\t\t\t\tbuildingSelectedSTART = (String)cb.getSelectedItem();\n\t\t\t\tfor(indexOfCurrentMap = 0; indexOfCurrentMap < maps.size(); ++indexOfCurrentMap){\n\t\t\t\t\tif(buildingSelectedSTART.equals(maps.get(indexOfCurrentMap).getMapName()))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcurrentStartNodes = maps.get(indexOfCurrentMap).getNodes();\n startRooms = new String[currentStartNodes.size()];\n\t\t\t\tcurrentStartEdges = maps.get(indexOfCurrentMap).getEdges();\n\t\t\t\tcurrentMapFile = maps.get(indexOfCurrentMap).getImage();\n\t\t\t\tcurrentlyShownMap = maps.get(indexOfCurrentMap);\n\t\t\t\tarrowCounter = 0;\n\t\t\t\tmapsForPaths = null;\n\t\t\t\tstartRoomSEL.removeAllItems();\n\t\t\t\tfor(int i = 0; i < currentStartNodes.size(); ++i){\n\t\t\t\t\tstartRooms[i] = currentStartNodes.get(i).getName();\n\t\t\t\t\tif(startRooms[i] != \"\" && currentStartNodes.get(i).getType() != NodeType.NOTYPE)\n\t\t\t\t\t\tstartRoomSEL.addItem(startRooms[i]);\n\t\t\t\t}\n\t\t\t\tstartHoverFlag = false;\n\t\t\t\tuiPanel.repaint();\n\t\t\t\tframe.repaint();\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = 0; i < maps.size(); i++) {\n\t\t\tif(maps.get(i).getMapName() != null)\n\t\t\t\tstartBuildingSEL.addItem(maps.get(i).getMapName());\n\t\t}\n\n\t\tendRoomSEL.setModel(new DefaultComboBoxModel(new String[]{}));\n\t\tendRoomSEL.setBounds(893, 116, 132, 29);\n\t\tendRoomSEL.setEditable(false);\n\t\tendRoomSEL.setVisible(true);\n\t\tendRoomSEL.setName(\"End\");\n\n\t\t//Construct Combo boxes to select end point\n\t\tendBuildingSEL = new JComboBox<String>();\n\t\tendBuildingSEL.setBounds(755, 116, 132, 29);\n\t\tendBuildingSEL.setEditable(false);\n\t\tendBuildingSEL.setVisible(true);\n\t\tendBuildingSEL.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdatePath = false;\n\t\t\t\tint indexOfCurrentMap;\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tJComboBox<String> cb = (JComboBox<String>)e.getSource();\n\t\t\t\tbuildingSelectedEND = (String)cb.getSelectedItem();\n\t\t\t\tfor(indexOfCurrentMap = 0; indexOfCurrentMap < maps.size(); ++indexOfCurrentMap){\n\t\t\t\t\tif(buildingSelectedEND.equals(maps.get(indexOfCurrentMap).getMapName()))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcurrentEndNodes = maps.get(indexOfCurrentMap).getNodes();\n currentMapFile = maps.get(indexOfCurrentMap).getImage();\n\t\t\t\tcurrentlyShownMap = maps.get(indexOfCurrentMap);\n\t\t\t\tendRoomSEL.removeAllItems();\n\t\t\t\tarrowCounter = 0;\n\t\t\t\tmapsForPaths = null;\n\t\t\t\tfor(int i = 0; i < currentEndNodes.size(); ++i){\n\t\t\t\t\tendRooms[i] = currentEndNodes.get(i).getName();\n\t\t\t\t\tif(endRooms[i] != \"\" && currentEndNodes.get(i).getType() != NodeType.NOTYPE)\n\t\t\t\t\t\tendRoomSEL.addItem(endRooms[i]);\n\t\t\t\t}\n\t\t\t\tendHoverFlag = false;\n\t\t\t\tuiPanel.repaint();\n\t\t\t\tframe.repaint();\n\t\t\t}\n\t\t});\n\n\t\tfor (int i = 0; i < maps.size(); i++) {\n\t\t\tif(maps.get(i).getMapName() != null)\n\t\t\t\tendBuildingSEL.addItem(maps.get(i).getMapName());\n\t\t}\n\n\n\n\t\t//Add Combo Boxes to UIPanel\n\n\t\tuiPanel.add(startBuildingSEL);\n\t\tuiPanel.add(startRoomSEL);\n\t\tuiPanel.add(endBuildingSEL);\n\t\tuiPanel.add(endRoomSEL);\n\n\t\t//Construct button and add button to uiPanel\n\t\tsearchButton = new JButton (\"Search\");\n\t\tsearchButton.setBounds(891, 150, 132, 30);\n\t\tuiPanel.add(searchButton);\n\n\t\tclearButton = new JButton (\"Clear\");\n clearButton.setBounds(753, 150, 132, 30);\n uiPanel.add(clearButton);\n clearButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e)\n {\n updatePath = false;\n startClicked = false;\n endClicked = false;\n endNode = null;\n directions.setText(\"\");\n mapsForPaths = null;\n mapNumber.setText(\"\");\n }\n });\n\t\t\n\t\tleftArrow = new JButton(\"<<\");\n\t\tleftArrow.setBounds(275, 630, 80, 29);\n\t\tuiPanel.add(leftArrow);\n\t\tif(arrowCounter == 0){\n\t\t\tleftArrow.setEnabled(false);\n\t\t}\n\n\n\n\t\trightArrow = new JButton(\">>\");\n\t\trightArrow.setBounds(412, 630, 80, 29);\n\t\tuiPanel.add(rightArrow);\n\t\trightArrow.setEnabled(false);\n\n\t\tJLabel instructions = new JLabel(\"How to get there?\");\n\t\tinstructions.setBounds(820, 180, 132, 29);\n\t\tuiPanel.add(instructions);\n\n\t\tdirections = new JTextArea();\n\t\tdirections.setBounds(762, 210, 255, 420);\n\t\tdirections.setFont(new Font(\"Helvetica Neue\", Font.PLAIN, 13));\n\t\tdirections.setLineWrap(true);\n\t\tdirections.setEditable(false);\n\t\tJScrollPane scrollDire = new JScrollPane(directions);\n\t\tscrollDire.setBounds(762, 210, 255, 420);\n\t\tscrollDire.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\n\t\tuiPanel.add(scrollDire);\n\n\t\temergencyIcon = new ImageIcon(\"IconImages/emergencyIcon.png\");\n\t\tIcon emergencyIconBIG = new ImageIcon(\"IconImages/emergencyIconBIG.png\");\n\t\temergency = new JButton();\n\t\temergency.setToolTipText(\"Emergency Information\");\n\t\temergency.setIcon(emergencyIcon);\n\t\temergency.setBounds(790, 632, 40, 40);\n\t\tuiPanel.add(emergency);\n\t\tString emergencyInfo = \"Call Campus Police:\" + \"\\n\" + \"508-831-5555\";\n\t\temergency.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\tJOptionPane.showMessageDialog(null, emergencyInfo, \"Incase of emergency\", JOptionPane.PLAIN_MESSAGE, emergencyIconBIG);\n\t\t\t}\n\t\t});\n\n\t\temailIcon = new ImageIcon(\"IconImages/emailIcon.png\");\n\t\temail = new JButton();\n\t\temail.setToolTipText(\"Send Directions via Email\");\n\t\temail.setIcon(emailIcon);\n\t\temail.setBounds(840, 632, 40, 40);\n\t\tuiPanel.add(email);\n\t\temail.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tif(emailDirections != null) {\n\t\t\t\t\tEMailDialogue em = new EMailDialogue(frame, emailDirections);\n\t\t\t\t\tem.setVisible(true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttransportIcon = new ImageIcon(\"IconImages/transportIcon.png\");\n\t\tIcon transportIconBIG = new ImageIcon(\"IconImages/transportIconBIG.png\");\n\t\tIcon gatewaySchedule = new ImageIcon(\"IconImages/gatewaySchedule.png\");\n\t\tIcon eveningSchedule = new ImageIcon(\"IconImages/eveningSchedule.png\");\n\t\tIcon wpiumassSchedule = new ImageIcon(\"IconImages/wpi-umassSchedule.png\");\n\t\tIcon snapSchedule = new ImageIcon(\"IconImages/snapSchedule.png\");\n\t\ttransport = new JButton();\n\t\ttransport.setToolTipText(\"View Transport Schedule\");\n\t\ttransport.setIcon(transportIcon);\n\t\ttransport.setBounds(890, 632, 40, 40);\n\t\tuiPanel.add(transport);\n\t\ttransport.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\tString[] schedules = {\"Gateway Shuttle\", \"Evening Shuttle\", \"WPI-Umass Shuttle\", \"SNAP\"};\n\t\t\t\tObject selectedValue = JOptionPane.showInputDialog(null, \"Which transport would you like to use?\", \"Select Transport type\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE, transportIconBIG,schedules, schedules[0]);\n\t\t\t\tif(selectedValue != null){\n\t\t\t\t\tswitch((String) selectedValue){\n\t\t\t\t\tcase \"Gateway Shuttle\":\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, null, \"Gateway Shuttle Schedule\", JOptionPane.INFORMATION_MESSAGE, gatewaySchedule);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Evening Shuttle\":\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, null, \"Evening Shuttle Schedule\", JOptionPane.INFORMATION_MESSAGE, eveningSchedule);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"WPI-Umass Shuttle\":\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, null, \"WPI-Umass Shuttle Schedule\", JOptionPane.INFORMATION_MESSAGE, wpiumassSchedule);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"SNAP\":\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, null, \"SNAP Shuttle\", JOptionPane.INFORMATION_MESSAGE, snapSchedule);\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\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\thistoryIcon = new ImageIcon(\"IconImages/historyIcon.png\");\n\t\tImageIcon historyIconBIG = new ImageIcon(\"IconImages/historyIconBIG.png\");\n\t\thistory = new JButton();\n\t\thistory.setToolTipText(\"...Coming Soon\");\n\t\thistory.setIcon(historyIcon);\n\t\thistory.setBounds(940, 632, 40, 40);\n\t\tuiPanel.add(history);\n\t\thistory.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"....Coming Soon\", \"...Coming Soon\", JOptionPane.PLAIN_MESSAGE, historyIconBIG);\n\t\t\t}\n\t\t});\n\n\t\t//Construct buttons and add action listener\n\t\tsearchButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tint i;\n\t\t\t\tupdatePath = true;\n\t\t\t\tuiPanel.setVisible(true);\n\t\t\t\tframe.setVisible(true);\n\t\t\t\tpathCalc = new Djikstra();\n\t\t\t\tif(!startClicked && !endClicked){\n\t\t\t\t\tfor (i = 0; i < currentStartNodes.size(); i++){\n\t\t\t\t\t\tif(startRoomSEL.getSelectedItem() == currentStartNodes.get(i).getName())\n\t\t\t\t\t\t\tstartNode = currentStartNodes.get(i);\n\t\t\t\t\t}\n\t\t\t\t\tfor(i = 0; i < currentEndNodes.size(); i++){\n\t\t\t\t\t\tif(endRoomSEL.getSelectedItem() == currentEndNodes.get(i).getName())\n\t\t\t\t\t\t\tendNode = currentEndNodes.get(i);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(startClicked && !endClicked){\n\t\t\t\t\tdirections.setText(\"Please Select End point\");\n\t\t\t\t\tupdatePath = false;\n\t\t\t\t}\n\t\t\t\tif(updatePath && startNode != null && endNode != null){\n\t\t\t\t\tSystem.out.println(startBuildingSEL.getSelectedItem());\n\t\t\t\t\tSystem.out.println(floor);\n\t\t\t\t\tlistPath = pathCalc.navigate(startNode, endNode);\n\t\t\t\t\tmapsForPaths = new LinkedList<Map>();\n\t\t\t\t\tSystem.out.println(listPath.size());\n\t\t\t\t\tfor (i = 0; i < listPath.size(); i++){\n\t\t\t\t\t\tfor (int j = 0; j < maps.size(); j++){\n\t\t\t\t\t\t\tnodesInMap = maps.get(j).getNodes();\n\t\t\t\t\t\t\tfor(int k = 0; k<nodesInMap.size(); k++){\n\t\t\t\t\t\t\t\tif(listPath.get(i) == nodesInMap.get(k)){\n\t\t\t\t\t\t\t\t\tif(!mapsForPaths.contains(maps.get(j))){\n\t\t\t\t\t\t\t\t\t\tmapsForPaths.add(maps.get(j));\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}\n\t\t\t\t\t\tcurrentMapFile = mapsForPaths.getFirst().getImage();\n\t\t\t\t\t\tcurrentlyShownMap = mapsForPaths.getFirst();\n\t\t\t\t\t\ttotalMaps = mapsForPaths.size();\n\n\t\t\t\t\t\tif(mapsForPaths.size() > 1){\n\t\t\t\t\t\t\trightArrow.setEnabled(true);\n\t\t\t\t\t\t\tmapNumber.setText(String.valueOf(1) + \" of \" + String.valueOf(totalMaps));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\temailDirections = \"From: \" + startBuildingSEL.getSelectedItem() + \", \" + startRoomSEL.getSelectedItem() + \"\\n\" + \"to \"\n + endBuildingSEL.getSelectedItem() + \", \" + endRoomSEL.getSelectedItem() + \"\\n\" + \"\\n\" +\n pathCalc.gpsInstructions(pathCalc.navigate(startNode, endNode));\n\t\t\t\t\tdirections.setText(emailDirections);\n\t\t\t\t\tSystem.out.println(\"check List: \" + listPath.size());\n\t\t\t\t\trepaint();\n\t\t\t\t\trevalidate();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tleftArrow.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\tif(mapsForPaths!= null){\n\t\t\t\t\tif(arrowCounter != 0){\n\t\t\t\t\t\trightArrow.setEnabled(true);\n\t\t\t\t\t\tarrowCounter -= 1;\n\t\t\t\t\t\tmapNumber.setText(String.valueOf(arrowCounter + 1) + \" of \" + String.valueOf(totalMaps));\n\t\t\t\t\t\tcurrentMapFile = mapsForPaths.get(arrowCounter).getImage();\n\t\t\t\t\t\tcurrentlyShownMap = mapsForPaths.get(arrowCounter);\n\t\t\t\t\t}else if (arrowCounter == 0){\n\t\t\t\t\t\tleftArrow.setEnabled(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\trightArrow.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\tif(mapsForPaths != null){\n\t\t\t\t\tif(arrowCounter != totalMaps-1){\n\t\t\t\t\t\tleftArrow.setEnabled(true);\n\t\t\t\t\t\tarrowCounter += 1;\n\t\t\t\t\t\tmapNumber.setText(String.valueOf(arrowCounter + 1) + \" of \" + String.valueOf(totalMaps));\n\t\t\t\t\t\tcurrentMapFile = mapsForPaths.get(arrowCounter).getImage();\n\t\t\t\t\t\tcurrentlyShownMap = mapsForPaths.get(arrowCounter);\n\t\t\t\t\t}else if (arrowCounter == totalMaps-1){\n\t\t\t\t\t\trightArrow.setEnabled(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tuiPanel.setVisible(true);\n\t\tframe.setVisible(true);\n\t}", "private void initialize() {\n\t\tfrmChoseTheObject = new JFrame();\n\t\tfrmChoseTheObject.setIconImage(Toolkit.getDefaultToolkit().getImage(TestWindow.class.getResource(\"/uni/fmi/masters/Resourses/radar_128.png\")));\n\t\tfrmChoseTheObject.setTitle(\"What Objects Are\");\n\t\tfrmChoseTheObject.setBounds(100, 100, 731, 347);\n\t\tfrmChoseTheObject.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tlblTheObjectYou = new JLabel(\"The Object You Are Looking For:\");\n\t\tlblTheObjectYou.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));\n\t\t\n\t\ttxtPutYouEver = new JTextField();\n\t\ttxtPutYouEver.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\n\t\ttxtPutYouEver.setText(\"put your credit card number here :) ...\");\n\t\ttxtPutYouEver.setColumns(10);\n\t\t\n\t\tbtnPushTheButton = new JButton(\"Push the button..\");\n\t\tbtnPushTheButton.setBorder(new BevelBorder(BevelBorder.RAISED, null, null, null, null));\n\t\t\n\t\t\n\t\tclassTextArea = new JTextArea();\n\t\tclassTextArea.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\n\t\t\n\t\ttextArea = new JTextArea();\n\t\ttextArea.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));\n\t\t\n\t\tlblNewLabel = new JLabel(\"Class of the Object\");\n\t\tlblNewLabel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Properties of the Object\");\n\t\tlblNewLabel_1.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));\n\t\tGroupLayout groupLayout = new GroupLayout(frmChoseTheObject.getContentPane());\n\t\tgroupLayout.setHorizontalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addComponent(lblTheObjectYou)\n\t\t\t\t\t\t.addComponent(lblNewLabel)\n\t\t\t\t\t\t.addComponent(lblNewLabel_1))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(btnPushTheButton, GroupLayout.PREFERRED_SIZE, 99, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(txtPutYouEver, GroupLayout.DEFAULT_SIZE, 533, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(classTextArea, GroupLayout.DEFAULT_SIZE, 533, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(textArea, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 533, Short.MAX_VALUE))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgroupLayout.setVerticalGroup(\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(lblTheObjectYou)\n\t\t\t\t\t\t.addComponent(txtPutYouEver, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t.addComponent(btnPushTheButton)\n\t\t\t\t\t.addGap(33)\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(lblNewLabel)\n\t\t\t\t\t\t.addComponent(classTextArea, GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(lblNewLabel_1)\n\t\t\t\t\t\t.addComponent(textArea, GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tfrmChoseTheObject.getContentPane().setLayout(groupLayout);\n\t}" ]
[ "0.72790354", "0.7026607", "0.6925131", "0.68662673", "0.67656213", "0.6510648", "0.64141136", "0.6337476", "0.63138396", "0.6184099", "0.6160847", "0.61563176", "0.61434025", "0.6119546", "0.60635287", "0.60635287", "0.6045832", "0.6009875", "0.60076773", "0.592283", "0.59049726", "0.5899297", "0.5891329", "0.58836037", "0.58761275", "0.58761275", "0.58761275", "0.5843201", "0.58287406", "0.5825759", "0.5825265", "0.58010876", "0.57976836", "0.57913566", "0.579085", "0.5787477", "0.57867193", "0.57804126", "0.57675904", "0.57610166", "0.5751854", "0.5750031", "0.5743486", "0.57396066", "0.5737594", "0.5723774", "0.5719133", "0.5718363", "0.5711484", "0.5705355", "0.5697047", "0.56963384", "0.56851155", "0.5677876", "0.5674513", "0.56690425", "0.56682795", "0.56649685", "0.5661241", "0.565879", "0.56480783", "0.5647116", "0.56454974", "0.5644298", "0.56426775", "0.5640856", "0.56355095", "0.5628085", "0.5628085", "0.5628085", "0.56260014", "0.5623251", "0.56209147", "0.5619541", "0.56128466", "0.5608693", "0.5601434", "0.5597951", "0.5596217", "0.55902666", "0.5587347", "0.55870914", "0.55835927", "0.55779517", "0.557173", "0.5566641", "0.55609953", "0.55572915", "0.55495524", "0.5549018", "0.554048", "0.55398965", "0.5535757", "0.5535082", "0.55293673", "0.5525727", "0.55247784", "0.5523335", "0.5516384", "0.551558" ]
0.84203637
0
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() { jPanel1 = new javax.swing.JPanel(); titleLabel = new javax.swing.JLabel(); lenLabel = new javax.swing.JLabel(); widLabel = new javax.swing.JLabel(); widthInput = new javax.swing.JTextField(); lengthInput = new javax.swing.JTextField(); calcButton = new javax.swing.JButton(); outputLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(255, 255, 255)); setForeground(new java.awt.Color(255, 255, 255)); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); titleLabel.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); titleLabel.setText("Area of a Rectangle"); lenLabel.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N lenLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); lenLabel.setText("Length:"); widLabel.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N widLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); widLabel.setText("Width:"); widthInput.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N lengthInput.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N calcButton.setText("Calculate"); calcButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { calcButtonActionPerformed(evt); } }); outputLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(titleLabel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(105, 105, 105) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(calcButton, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(widLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(27, 27, 27) .addComponent(widthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(lenLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(93, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(outputLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(203, Short.MAX_VALUE) .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(92, 92, 92))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(33, 33, 33) .addComponent(titleLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(48, 48, 48) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(lenLabel) .addGap(66, 66, 66) .addComponent(widLabel)) .addComponent(widthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(35, 35, 35) .addComponent(calcButton, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(26, 26, 26) .addComponent(outputLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(40, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(127, 127, 127) .addComponent(lengthInput, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(255, Short.MAX_VALUE))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); 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 RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\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 BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\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 MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\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 MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\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 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 FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\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 }", "@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 sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\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 JFrmPrincipal() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\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 CreateAccount_GUI() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public POS1() {\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.731952", "0.72909003", "0.72909003", "0.72909003", "0.72862417", "0.7248404", "0.7213685", "0.72086793", "0.7195972", "0.71903807", "0.71843296", "0.7158833", "0.71475875", "0.70933676", "0.7081167", "0.7056787", "0.69876975", "0.6977383", "0.6955115", "0.6953839", "0.69452274", "0.6942602", "0.6935845", "0.6931919", "0.6928187", "0.6925288", "0.69251484", "0.69117147", "0.6911646", "0.6892842", "0.68927234", "0.6891408", "0.68907607", "0.68894386", "0.68836755", "0.688209", "0.6881168", "0.68787616", "0.68757504", "0.68741524", "0.68721044", "0.685922", "0.68570775", "0.6855737", "0.6855207", "0.68546575", "0.6853559", "0.6852262", "0.6852262", "0.68443567", "0.6837038", "0.6836797", "0.68291426", "0.6828922", "0.68269444", "0.6824652", "0.682331", "0.68175536", "0.68167555", "0.6810103", "0.6809546", "0.68085015", "0.68083894", "0.6807979", "0.68027437", "0.67950374", "0.67937446", "0.67921823", "0.67911226", "0.67900467", "0.6788873", "0.67881", "0.6781613", "0.67669237", "0.67660683", "0.6765841", "0.6756988", "0.675558", "0.6752552", "0.6752146", "0.6742482", "0.67395985", "0.673791", "0.6736197", "0.6733452", "0.67277217", "0.6726687", "0.67204696", "0.67168", "0.6714824", "0.6714823", "0.6708782", "0.67071444", "0.670462", "0.67010295", "0.67004406", "0.6699407", "0.6698219", "0.669522", "0.66916007", "0.6689694" ]
0.0
-1
Constructor for this instance
public ImageLevel(Context context, AttributeSet attr) { super(context, attr); Resources res = getResources(); // Acquiring image dimension from resources mThumbnailWidth = (int)res.getDimension(R.dimen.thumbnailWidth); mThumbnailHeight = (int)res.getDimension(R.dimen.thumbnailHeight); mMemberLevel = MemberLevel.MemberLevels.eMemberLevelBase; mCurrentImage = new ImageView(getContext()); mCurrentImage.setScaleType(ImageView.ScaleType.FIT_CENTER); mCurrentImage.setMaxWidth(mThumbnailWidth); mCurrentImage.setMaxHeight(mThumbnailHeight); // Acquiring first image from resource mBackImage = ((BitmapDrawable)res.getDrawable(R.drawable.smiley)).getBitmap(); if (mBackImage != null) { Log.v(LOG_TAG, "Drawing image."); drawThumbnail(); } else { Log.e(LOG_TAG, "Initial bitmap not found"); } addView(mCurrentImage , new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public PSRelation()\n {\n }", "public Coche() {\n super();\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public CyanSus() {\n\n }", "public Chick() {\n\t}", "public Trening() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Cohete() {\n\n\t}", "public Chauffeur() {\r\n\t}", "private Instantiation(){}", "public Property() {\n this(0, 0, 0, 0);\n }", "public Curso() {\r\n }", "public Pasien() {\r\n }", "public ContasCorrentes(){\n this(0,\"\",0.0,0.0,0);\n }", "public Orbiter() {\n }", "public Lanceur() {\n\t}", "public Catelog() {\n super();\n }", "public Anschrift() {\r\n }", "public Aanbieder() {\r\n\t\t}", "public CSSTidier() {\n\t}", "Composite() {\n\n\t}", "public AirAndPollen() {\n\n\t}", "public Phl() {\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "public Tbdtokhaihq3() {\n super();\n }", "public SgaexpedbultoImpl()\n {\n }", "public Waschbecken() {\n this(0, 0);\n }", "@Override public void init()\n\t\t{\n\t\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public mapper3c() { super(); }", "public Generic(){\n\t\tthis(null);\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public AntrianPasien() {\r\n\r\n }", "public Mitarbeit() {\r\n }", "public Parameters() {\n\t}", "public Rol() {}", "public Node(){\n\n\t\t}", "public Data() {\n \n }", "public Pitonyak_09_02() {\r\n }", "private TMCourse() {\n\t}", "public Instance() {\n }", "private Composite() {\n }", "public Parent() {\n super();\n }", "public _355() {\n\n }", "public Content() {\n\t}", "public BaseParameters(){\r\n\t}", "public Data() {\n }", "public Data() {\n }", "public Supercar() {\r\n\t\t\r\n\t}", "public PjxParser()\r\n {\r\n LOG.info(this + \" instantiated\");\r\n }", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "public Self__1() {\n }", "public TTau() {}", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {}", "public SimOI() {\n super();\n }", "public Job() {\n\t\t\t\n\t\t}", "public Cgg_jur_anticipo(){}", "public Achterbahn() {\n }", "public EnsembleLettre() {\n\t\t\n\t}", "public SlanjePoruke() {\n }", "public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }", "public Data() {}", "public Vector() {\n construct();\n }", "public AllOne() {\n \n }", "public Libro() {\r\n }", "public Magazzino() {\r\n }", "public RngObject() {\n\t\t\n\t}", "protected Asignatura()\r\n\t{}", "public Clade() {}", "protected Settlement() {\n // empty constructor\n }", "private Converter()\n\t{\n\t\tsuper();\n\t}", "public DetArqueoRunt () {\r\n\r\n }", "protected VoltexGroup() {\n\t\tsuper();\n\t}", "public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }", "public ContentKj () {\n\t\tsuper();\n\t}", "public Tigre() {\r\n }", "public JSFOla() {\n }", "public Crate(){}", "public Livro() {\n\n\t}", "public Goodsinfo() {\n super();\n }", "public TRIP_Sensor () {\n super();\n }", "public Odontologo() {\n }", "public Alojamiento() {\r\n\t}", "public Card() { this(12, 3); }", "public InitialData(){}", "protected Tile() {\n super();\n }", "public Sequence(){\n\n }", "public ThisKeyword(){\n this(1.0);\n }", "public void init() {\n \n }", "public Webinar() {\n\t\t\n\t}", "public AvaliacaoRisco() {\n }", "public Carrera(){\n }", "public Complex(){\r\n\t this(0,0);\r\n\t}", "public SPIEL() \n {\n this( 800 , 600 , false , false , false );\n }", "private Row() {\n }", "public Item(){}", "@Override\n public void init() {\n }" ]
[ "0.79906523", "0.7493084", "0.6989801", "0.6831124", "0.6699213", "0.6697316", "0.669265", "0.6677111", "0.66439754", "0.6640215", "0.6634273", "0.66274804", "0.6616414", "0.6586076", "0.6572645", "0.6570536", "0.65601873", "0.65578437", "0.65565705", "0.65557057", "0.654874", "0.6538428", "0.6526093", "0.6505287", "0.6504061", "0.6503781", "0.6499901", "0.64964736", "0.6491464", "0.6487404", "0.64831257", "0.6480538", "0.64721835", "0.6465737", "0.6465612", "0.64629", "0.6459915", "0.6457075", "0.6456028", "0.64497733", "0.6449028", "0.6445517", "0.6437422", "0.64372087", "0.64348674", "0.64305717", "0.64248055", "0.6424207", "0.6414326", "0.6413984", "0.6413984", "0.64018565", "0.639408", "0.63940233", "0.639217", "0.6377076", "0.63734925", "0.6369913", "0.63698035", "0.636966", "0.6356736", "0.63515806", "0.6350255", "0.63450843", "0.63424885", "0.6342411", "0.63356537", "0.6335568", "0.6333905", "0.6333236", "0.63330495", "0.63249695", "0.6316925", "0.63132715", "0.6312343", "0.6307787", "0.63066334", "0.630323", "0.62995213", "0.62962604", "0.6289935", "0.6289474", "0.6285768", "0.62746036", "0.62727576", "0.62709767", "0.6264368", "0.62607855", "0.6257451", "0.6256329", "0.6256251", "0.6255767", "0.6254168", "0.625211", "0.625047", "0.625047", "0.62490505", "0.62485695", "0.62431854", "0.62425846", "0.6240553" ]
0.0
-1
Sets the member level and redraw the thumbnail
public void setMemberlLevel(MemberLevel.MemberLevels mMemberlLevel) { this.mMemberLevel = mMemberlLevel; drawThumbnail(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void setLevel(int level) {\n if (level > 1) {\n this.level = level;\n scaleUp();\n percentageScaling();\n }\n }", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "public void setLevel(int newlevel)\n {\n level = newlevel; \n }", "private void setZoomLevel() {\n final float oldMaxScale = photoView.getMaximumScale();\n photoView.setMaximumScale(oldMaxScale *2);\n photoView.setMediumScale(oldMaxScale);\n }", "private void setLevel(int level) {\n setStat(level, currentLevel);\n }", "public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}", "protected void setLevel(int level)\n {\n this.level = level;\n }", "public LevelPicker(LEVEL level) {\n\t\tcircleImage = new ImageView(circleNotChoosen);\n\t\tfrogLevelImage= new ImageView(level.getUrl());\n\t\tthis.level= level;\n\t\tisCircleChoosen= false; //at the start the button is not choosen \n\t\t\n\t\tthis.setAlignment(Pos.CENTER);\n\t\tthis.setSpacing(20);\n\t\t\n\t\tthis.getChildren().add(frogLevelImage); //adding images to the vbox\n\t\tthis.getChildren().add(circleImage);\n\t\t\n\t\tthis.getChildren().add(setNormalInfoLabel(level.toString(), false));\n\t}", "public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }", "public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}", "public void setMipLevel(int level) {\r\n if (mipLevel != level) {\r\n synchronized (bitmaps) {\r\n if (getDrawable() != null && ((BitmapDrawable) getDrawable()).getBitmap() != null) {\r\n if (!((BitmapDrawable) getDrawable()).getBitmap().isRecycled())\r\n ((BitmapDrawable) getDrawable()).getBitmap().recycle();\r\n bitmaps.remove(((BitmapDrawable) getDrawable()).getBitmap());\r\n super.setImageBitmap(null);\r\n }\r\n this.mipLevel = Math.max(0, Math.min(level, mipLevels - 1));\r\n }\r\n }\r\n }", "public void setLevel(int level) {\n \t\tthis.level = level;\n \t}", "public void setLevel(int level){\n\t\tthis.level = level;\n\t}", "@Override\n public void Run() {\n\n DrawSprite(\"pic\", 10, \"sprite/ch1\", new Rect(0, 100, 200, 300)).Show();\n DrawSprite(\"pic\", 11, \"sprite/ch2\", new Rect(100, 100, 300, 300)).Show();\n\n //자식이 부모보다 위에 있을수도 있고 밑에있을 수도 있어야됨.\n\n\n\n\n //Level로 설정하자\n //Level(0)Root\n //Level(1)그아래오브젝트...\n //같은레벨끼리 경쟁\n /*\n\n Level(0)기준\n -(아래로)\n\n */\n }", "public void setLevel(Level level) { this.currentLevel = level; }", "public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}", "public void setLevel(int v)\n {\n m_level = v;\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}", "public void setLevel(String level);", "public Level(){\n\t\tlevel_image_pattern = \"default\";\n\t\t\n\t\timages = new HashMap <String, Image>();\n\t\tpickables = new ArrayList<Pickable>();\n\t\tplayer_initial_position = new int[2];\n\t\tplayer_initial_position[0] = 0;\n\t\tplayer_initial_position[1] = 0;\n\t\t\n\t\tconfig = Config.getInstance();\n\t\t\n\t}", "public void zoomToLevel(int level) {\n \t\tfloat scale = getScaleFromZoom(level);\n \t\tzoomToScale(scale);\n \t}", "public void setLevel(int level) {\n filename = evaluate(getLat(), getLon(), level);\n }", "public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "public void newlevel() {\n\t\tblack = new Background(COURT_WIDTH, COURT_HEIGHT); // reset background\n\t\tcannon = new Cannon(COURT_WIDTH, COURT_HEIGHT); // reset cannon\n\t\tdeadcannon = null;\n\t\tbullet = null;\n\t\tshot1 = null;\n\t\tshot2 = null;\n\t\t// reset top row\n\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\talien1[i] = new Alien(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien1[i].pos_x = alien1[i].pos_x + 30*i;\n\t\t\talien1[i].v_x = level + alien1[i].v_x;\n\t\t}\n\t\t// reset second row\n\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\talien2[i] = new Alien2(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien2[i].pos_x = alien2[i].pos_x + 30*i;\n\t\t\talien2[i].v_x = level + alien2[i].v_x;\n\t\t}\n\t\t// reset third row\n\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\talien3[i] = new Alien3(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien3[i].pos_x = alien3[i].pos_x + 30*i;\n\t\t\talien3[i].v_x = level + alien3[i].v_x;\n\t\t}\n\t}", "public void Setlevels(int lvl)\r\n {\r\n level = lvl;\r\n }", "public void setLevel(Level level) {\n\t\tthis.level = level;\n\t}", "public void setLevelInfo(){\n setTitle(\"\");\n Objects.requireNonNull(getSupportActionBar()).setElevation(0);\n// SET LEVEL TITLE\n String levelTitleString = (getString(R.string.level) + \" \" + String.valueOf(level));\n levelTitle.setText(levelTitleString);\n// todo: underline guessesleft\n guessesLeft = guessesLeft + 10;\n String guessesLeftString = (\"You have \" + String.valueOf(guessesLeft) + \" guesses.\");\n guessesLeftView.setText(guessesLeftString);\n }", "public ImageLevel(Context context, AttributeSet attr) \n\t{\n\t\tsuper(context, attr);\n\t\t\n\t\tResources res = getResources();\n\t\t\n\t\t// Acquiring image dimension from resources\n\t\tmThumbnailWidth = (int)res.getDimension(R.dimen.thumbnailWidth);\n\t\tmThumbnailHeight = (int)res.getDimension(R.dimen.thumbnailHeight);\n\t\t\n\t\tmMemberLevel = MemberLevel.MemberLevels.eMemberLevelBase;\n\t\tmCurrentImage = new ImageView(getContext());\n\t\tmCurrentImage.setScaleType(ImageView.ScaleType.FIT_CENTER);\n\t\tmCurrentImage.setMaxWidth(mThumbnailWidth);\n\t\tmCurrentImage.setMaxHeight(mThumbnailHeight);\n\t\t\n\t\t// Acquiring first image from resource\n\t\tmBackImage = ((BitmapDrawable)res.getDrawable(R.drawable.smiley)).getBitmap();\n\t\t\n\t\tif (mBackImage != null)\n\t\t{\n\t\t\tLog.v(LOG_TAG, \"Drawing image.\");\n\t\t\tdrawThumbnail();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tLog.e(LOG_TAG, \"Initial bitmap not found\");\n\t\t}\n\t\t\n\t\taddView(mCurrentImage\n\t\t\t , new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT)\n\t\t\t );\t\t\n\t\t\n\t}", "void levelanzeigen(){\n if(level==levelold){\n //TODO HARDWARE this.systeminterface.tab.setcolor(255,0,0);\n //TODO HARDWARE this.systeminterface.ledFeld.zahl(0,2,level);\n }else{\n //TODO HARDWARE this.systeminterface.ledFeld.setcolor(0,0,0);\n //TODO HARDWARE this.systeminterface.ledFeld.zahl(0,2,levelold);\n //TODO HARDWARE this.systeminterface.ledFeld.setcolor(255,0,0);\n //TODO HARDWARE this.systeminterface.ledFeld.zahl(0,2,level);\n levelold=level;\n }\n //TODO HARDWARE this.systeminterface.ledFeld.show();\n //TODO HARDWARE this.systeminterface.ledFeld.setRotation(1);\n }", "public void setCurrentLevel(Level level){\r\n currentLevel = level;\r\n currentLevel.setObserver(this);\r\n }", "public void updateDisplay() {\n imageCutLevels.updateDisplay();\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(int value) {\n this.level = value;\n }", "private void displayFloorImage() {\n SitumSdk.communicationManager().fetchFloorsFromBuilding(selectedBuilding, new Handler<Collection<Floor>>() {\n @Override\n public void onSuccess(Collection<Floor> floors) {\n Log.i(TAG, \"onSuccess: received levels: \" + floors.size());\n Floor floor = new ArrayList<>(floors).get(0);\n //Get the floor image bitmap\n SitumSdk.communicationManager().fetchMapFromFloor(floor, new Handler<Bitmap>() {\n @Override\n public void onSuccess(Bitmap bitmap) {\n imageViewLevel.setImageBitmap(bitmap);\n }\n\n @Override\n public void onFailure(Error error) {\n Log.e(TAG, \"onFailure: fetching floor map: \" + error);\n }\n });\n }\n\n @Override\n public void onFailure(Error error) {\n Log.e(TAG, \"onFailure: fetching floors: \" + error);\n }\n });\n }", "public void setupLevelAndPoints(){\r\n \t\tint[] levelAndPoints = new int[]{0, 0, 0};\r\n \t\tlevelAndPoints = DashboardActivity.getLevelAndPoints();\r\n \t\tLog.i(\"levelAndPoints content\", levelAndPoints.toString());\r\n\t\t\r\n \t\t//Setting up level\r\n \t\tlevelImage = (ImageView) findViewById(R.id.levelImageView);\r\n \t\tif(levelAndPoints[0] == 1){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_one));\r\n \t\t}else if(levelAndPoints[0] == 2){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_two));\r\n \t\t}else if(levelAndPoints[0] == 3){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_three));\r\n \t\t}else if(levelAndPoints[0] == 4){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_four));\r\n \t\t}else if(levelAndPoints[0] == 5){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_five));\r\n \t\t}else if(levelAndPoints[0] == 6){\r\n \t\t\tlevelImage.setImageDrawable(getResources().getDrawable(R.drawable.profile_level_six));\r\n \t\t}\r\n \t\t\r\n \t\t//Setting up progressbar and points above bar\r\n \t\tlevelProgressBar = (ProgressBar) findViewById(R.id.levelProgressBar);\r\n \t\tlevelProgressBar.setVisibility(ProgressBar.VISIBLE);\r\n \t\tlevelProgressBar.setMax(levelAndPoints[2]);\r\n \t\tlevelProgressBar.setProgress(levelAndPoints[1]);\r\n \r\n \t\tshowPointsAboveProgressBar = (TextView) findViewById(R.id.pointsInProgressBar);\r\n \t\tshowPointsAboveProgressBar.setText(levelAndPoints[1] + \"/\" + levelAndPoints[2]);\r\n \t}", "public Level()\n {\n //Initialise Tile Types\n try \n {\n //Dynamically assign texture paints\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/surface.jpg\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/rover.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/rock.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/mineral.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/target.png\")), tile));\n texturePaints.add(new TexturePaint(ImageIO.read(new File(\"Images/warning.png\")), tile));\n } catch(FileNotFoundException fnfe) {\n System.out.println(\"ERROR: Invalid texture paint, file not found\" + fnfe);\n }\n catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public Level(String levelToEdit)\r\n\t{\r\n\t\tmakeCommonObjects();\r\n\t\tgrid = new Grid(levelToEdit);//CHANGE GRID COORDINATES WHILE MAKING A NEW LEVEL\r\n\t\tmakeButton = new GameSprite(Player.filename);\r\n\t\tmakeButton.setPosition(0,0);\r\n\t\tplayer = new Player(100, 420);\r\n\t\tbackground = new Background(1, grid);\r\n\t}", "public final void setLevel(final int level) {\n\t\tthis.level = level;\n\t}", "public void level1() {\n\t\tlevel = new Level(1); //Create Level object, passing 1 to constructor for level 1\n\t\tplayer = new Player(100, 100); //Set player y position); //Create player object, place in middle of screen, position will later be determined by level png\n\t}", "public void setScalePosition(int level) throws RemoteException, IllegalParamException {\n io.scaleRMI(number, level);\n }", "public void setDataLevel(int dataLevel);", "protected void setPic() {\n }", "public void status(){\n lblStats.setText(\"\"+level+\"L\");\n }", "public static void setLevel(int level) {\n Game.level = level;\n movingSpeed = level * 5;\n }", "@Override\n protected boolean onLevelChange(int level) {\n boolean patternLevelChange = patternDrawable.setLevel(level);\n return super.onLevelChange(level) | patternLevelChange;\n }", "public void setLvl(int lvl) {\r\n\t\tfor(int i = this.nivelArma; i < lvl; i++) {\r\n\t\t\tstatsLvlUp();\r\n\t\t\tnivelArma += 1;\r\n\t\t}\r\n\t}", "public void setLevel(String newLevel) {\n level = newLevel;\n }", "public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }", "public Group renderLevel() {\n\t\tGroup levelGroup = new Group();\n\t\tNode background = renderBackground(level);\n\t\tlevelGroup.getChildren().add(background);\n\t\tList<Sprite> textSpriteList = level.sprites().stream().filter(sprite -> sprite.isText()).collect(Collectors.toList());\n\t\ttextSpriteList.stream().forEach(textSprite -> levelGroup.getChildren().add(renderText(textSprite)));\n\t\tList<Sprite> imageSpriteList = level.sprites().stream().filter((sprite -> !sprite.isText())).collect(Collectors.toList());\n\t\timageSpriteList.stream().filter(sprite -> sprite.isActive()).forEach(sprite -> levelGroup.getChildren().add(renderSprite(sprite)));\n\t\treturn levelGroup;\n\t}", "private void setLevel(){\n\t\tif(getD(y) <= T)\n\t\t\tlevel = \"lower\";\n\t\telse\n\t\t\tlevel = \"higher\";\n\t}", "public void setLevel(int level) {\n if (level < 1)\n throw new IllegalArgumentException(\"Cannot be a level less than 0\");\n\n this.level = level;\n }", "private void initLevel(){\r\n\t\tBetterSprite doodleSprite = (BetterSprite)(getGroup(\"doodleSprite\").getSprites()[0]);\r\n\t\tinitControls(doodleSprite);\r\n\t\tinitEvents();\r\n\t}", "public LevelEditor(Level level) {\n\t\tsuper();\n\t\tmyLevel = level;\n\t\t// hide null pointer exceptions if needed\n\t\tdbgShowMessagesInPf(false);\n\t\tobjectID = 0;\n\t\tdbgIsEmbedded(true);\n\t\tinitEngine((int) SCREEN_WIDTH, SCREEN_HEIGHT);\n\t\t\n\t\tdefineMedia(\"projectresources/tempTable.tbl\");\n\t\tdefineImage(SRBALL_STRING, \"n\", 0, defaultImage, \"-\");\n\t\tmyMover = new LevelMover(this);\n\t\tmyResourcesForImageToObject = ResourceBundle\n\t\t\t\t.getBundle(GAME_AUTHORING_ENVIRONMENT_RESOURCE_PACKAGE\n\t\t\t\t\t\t+ IMAGE_TO_OBJECT_RESOURCES);\n\t\tmyImageToObjectStatsMap = new HashMap<String, ObjectStats>();\n\t\tfillImageToObjectStatsMap();\n\t\tsetBGImage(myLevel.getBackground());\n\t}", "void setThumbnail(boolean thumbnail);", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void levelChanger(Level level) {\n\t\tlevel.addKeyListener(inputHandler);\n\t\tlevel.addMouseListener(inputHandler);\n\t\t//resets the mouse input so points are reset\n\t\tinputHandler.mouseReset();\n\t\tcontainer.add(level, level.getComponentName());\n\t\tlayout.show(container, level.getComponentName());\n\t\tcurrentLevel = level;\n\t\tcurrentLevel.setFocusable(true);\n\t\tcurrentLevel.requestFocus();\n\t}", "public static void setLevel(int current)\r\n\t{\r\n\t\tGame.level = current;\r\n\t}", "private void constructLevel(int level){\n gamePanel.removeAll();\n GridLayout layout = new GridLayout(grid.length,grid[0].length);\n gamePanel.setLayout(layout);\n gamePanel.setBackground(Color.BLACK);\n gamePanel.setFocusable(true);\n gamePanel.requestFocusInWindow();\n gamePanel.updateUI();\n }", "void createNewLevel(int level);", "private void updateGroup(String newGroupName, int level) {\r\n Equals levelFilter = new Equals(fieldName[level], previousNodeValue);\r\n CoeusVector cvFilteredData = (CoeusVector)cvHierarchyData.filter(levelFilter);\r\n if(cvFilteredData != null && cvFilteredData.size()>0) {\r\n for (int index=0; index < cvFilteredData.size(); index++) {\r\n sponsorHierarchyBean = (SponsorHierarchyBean)cvFilteredData.get(index);\r\n sponsorHierarchyBean.setAcType(TypeConstants.UPDATE_RECORD);\r\n switch(level) {\r\n case 1:\r\n sponsorHierarchyBean.setLevelOne(newGroupName);\r\n break;\r\n case 2:\r\n sponsorHierarchyBean.setLevelTwo(newGroupName);\r\n break;\r\n case 3:\r\n sponsorHierarchyBean.setLevelThree(newGroupName);\r\n break;\r\n case 4:\r\n sponsorHierarchyBean.setLevelFour(newGroupName);\r\n break;\r\n case 5:\r\n sponsorHierarchyBean.setLevelFive(newGroupName);\r\n break;\r\n case 6:\r\n sponsorHierarchyBean.setLevelSix(newGroupName);\r\n break;\r\n case 7:\r\n sponsorHierarchyBean.setLevelSeven(newGroupName);\r\n break;\r\n case 8:\r\n sponsorHierarchyBean.setLevelEight(newGroupName);\r\n break;\r\n case 9:\r\n sponsorHierarchyBean.setLevelNine(newGroupName);\r\n break;\r\n case 10:\r\n sponsorHierarchyBean.setLevelTen(newGroupName);\r\n break;\r\n }\r\n }\r\n }\r\n }", "public void setItemLevel(int level) { this.level = level; }", "public void setLevel ( int level ) {\n\t\texecute ( handle -> handle.setLevel ( level ) );\n\t}", "public LevelView(Level level, EditMode editMode) {\n\n\t\tthis(level, editMode, DOUBLE.DEFAULT_LENGTH_SIDE_PIXEL);\n\n\t}", "public void changeLevel(Level level) {\n if (Consts.TEST) {\n this.level = level;\n return;\n }\n\n try {\n level.validate();\n } catch (Exception e) {\n e.printStackTrace();\n level = this.level;\n }\n this.level = level;\n entities.clear();\n pacman.respawn(level.getRandomPacmanSpawn());\n // items spawnen\n for (int y = 0; y < level.getHeight(); y++) {\n for (int x = 0; x < level.getWidth(); x++) {\n if (level.getField(x, y) == MapModule.DOT)\n entities.add(new Dot(x, y));\n else if (level.getField(x, y) == MapModule.POWERUP)\n entities.add(new PowerUp(x, y));\n else if (level.getField(x, y) == MapModule.SPEEDUP)\n entities.add(new SpeedUp(x, y));\n else if (level.getField(x, y) == MapModule.TELEPORT)\n entities.add(new Teleporter(x, y));\n }\n }\n\n // 4 Geister im normalen Spiel, 1 Geist fuer Tests\n for (int i = 0; i < (Consts.TEST ? 1 : Consts.NUM_GHOSTS); i++) {\n Ghost g = new Ghost(i);\n g.respawn(level.getNextGhostSpawn());\n entities.add(g);\n }\n }", "private void createLevelBoxes() {\n int totalRows = (LEVELS / LEVEL_COLUMNS_PER_SCREEN) + 1;\n \n // Calculate space between each level square\n int spaceBetweenRows = (CAMERA_HEIGHT / LEVEL_ROWS_PER_SCREEN) - LEVEL_PADDING;\n int spaceBetweenColumns = (CAMERA_WIDTH / LEVEL_COLUMNS_PER_SCREEN) - LEVEL_PADDING;\n \n //Current Level Counter\n int iLevel = 1;\n //Create the Level selectors, one row at a time.\n int boxX = LEVEL_PADDING, boxY = LEVEL_PADDING;\n for (int y = 0; y < totalRows; y++) {\n for (int x = 0; x < LEVEL_COLUMNS_PER_SCREEN; x++) {\n \n //On Touch, save the clicked level in case it's a click and not a scroll.\n final int levelToLoad = iLevel;\n \n if(iLevel >= mMaxLevelReached) {\n \t dotLevel = new Sprite(boxX, boxY, resourcesManager.level_dot_red_region, vbom) {\n @Override\n public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n if (levelToLoad >= mMaxLevelReached)\n iLevelClicked = -1;\n else\n iLevelClicked = levelToLoad;\n return false;\n }\n };\n }\n else {\n \tdotLevel = new Sprite(boxX, boxY, resourcesManager.level_dot_green_region, vbom) {\n @Override\n public boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n if (levelToLoad >= mMaxLevelReached)\n iLevelClicked = -1;\n else\n iLevelClicked = levelToLoad;\n return false;\n }\n };\n }\n \n this.attachChild(dotLevel);\n \n this.attachChild(new Text(boxX, boxY - 5, resourcesManager.font, String.valueOf(iLevel), vbom));\n \n \n this.registerTouchArea(dotLevel);\n \n iLevel++;\n boxX += spaceBetweenColumns + LEVEL_PADDING;\n \n if (iLevel > LEVELS)\n break;\n }\n \n if (iLevel > LEVELS)\n break;\n \n boxY += spaceBetweenRows + LEVEL_PADDING;\n boxX = 50;\n }\n }", "public void setFrogLevel(int level){\n\t\tthis.frogLevel = level;\n\t}", "private void initLevel () \n {\n score = 0;\n scoreVisual = score;\n level = new Level(Constants.LEVEL_01);\n cameraHelper.setTarget(level.bird);\n initPhysics();\n }", "@Override\n public void update() {\n selectedLevel.update();\n }", "@Override\n\tpublic void settings() {\n\t\tpreviewRect = WallGeometry.scaleRectangleRounded(WallGeometry.getInstance().getWallGeometry(), Preview.SCALE);\n\t\tsize(previewRect.width, previewRect.height, P3D);\n\t}", "public void incLevel(int lvl){this.Level=this.XP/(100);}", "private void setLevel(int level){\r\n\t\tswitch(level){\r\n\t\t\tcase Game.LEVEL_ONE:\r\n\t\t\tcase Game.LEVEL_TWO:\r\n\t\t\tcase Game.LEVEL_THREE:\r\n\t\t\t\tthis.level = level;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.err.println(\"Improper level input, use 'Game.LEVEL_#' to accurately input a level into this method\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void setUserLevel(Integer userLevel) {\n this.userLevel = userLevel;\n }", "public void updateZoom() {\n camera.zoom = zoomLevel;\n }", "public void levelUp1()\r\n {\r\n this.health = 900;\r\n Story.levelUp1Text();\r\n }", "public void setZoomLevel(int index) {\n if (index >= 0 && index < zoomLevels.length) {\n this.zoomLevel = index;\n this.setZoom(zoomLevels[index]);\n }\n }", "public MiniBossLevel() {\r\n super(\"background_final.png\");\r\n setStatDisplay();\r\n generateWorld(world);\r\n }", "void setThumbSizeX(long thumbSizeX);", "void setThumbnail(Bitmap thumbnail) {\n\t\tthis.mThumbnail = thumbnail;\n\t}", "public void setMlevel(Integer mlevel) {\n this.mlevel = mlevel;\n }", "public static void setLevel(Level level) {\r\n\t\tGameplay.getInstance().setLevel(level);\r\n\t}", "private void setEliteMobLevel(int newLevel) {\n if (newLevel < 1)\n newLevel = 1;\n this.eliteMobLevel = newLevel;\n }", "public void drawLevelNumber(int lvl){\n Graphics2D g2d = (Graphics2D) infoCanvas.getGraphics();\n g2d.setColor(Color.BLACK);\n g2d.fillRect(infoCanvas.getWidth() / 3 + 4, infoCanvas.getHeight() / 10 + 6, infoCanvas.getWidth() / 3 - 8, infoCanvas.getHeight() / 10 - 8);\n Font f = new Font(\"Font.PLAIN\", Font.BOLD, infoCanvas.getHeight() / 12);\n g2d.setFont(f);\n g2d.setColor(Color.GREEN);\n int startX = infoCanvas.getWidth() / 3 + 4;\n int startY = infoCanvas.getHeight() / 10 + 10;\n int stringX = startX + (infoCanvas.getWidth() / 3 - 8)/3 * 2;\n g2d.drawString(String.valueOf(lvl), stringX, startY + infoCanvas.getHeight() / 10 - 18);\n }", "public void setLevelLimit(Integer levelLimit) {\n\t\tthis.levelLimit = levelLimit;\r\n\t}", "public void loadLevel(int level)\n {\n loadTilemap(new File(\"Levels/level\" + level + \".txt\"));\n loadFrames(level);\n Rover.getRover().reset();\n }", "public void setProfileImg() {\n }", "public void setLevel(String value) {\n this.level = value;\n }", "public void setLevel(double amt) {\n\t\tlevel += amt;\n\t}", "protected void setLevelSize(int w, int h) {\n\t\twidth = w;\n\t\theight = h;\n\n\t\t// build it\n\t\tlevelTiled = new ArrayList<ArrayList<ArrayList<Integer>>>();\n\t\tlevelTyp = new HashMap<String, TYPE>();\n\n\t\t// run over\n\t\tfor (int i = 0; i < w; i++) {\n\t\t\tlevelTiled.add(new ArrayList<ArrayList<Integer>>());\n\t\t\tfor (int j = 0; j < h; j++) {\n\t\t\t\tlevelTiled.get(i).add(new ArrayList<Integer>());\n\t\t\t}\n\t\t}\n\t}", "public void setLevel(Level mLevel) {\n this.level = mLevel;\n level.increaseChamberCount();\n }", "public void setLevel(int level) {\r\n\t\tthis.level = Math.max(0, level);\r\n\t}" ]
[ "0.6387171", "0.6030628", "0.59556633", "0.594402", "0.59098524", "0.5878118", "0.58560926", "0.58541095", "0.5843083", "0.5808969", "0.5794599", "0.5777209", "0.5766106", "0.57629234", "0.57020485", "0.56914794", "0.5685639", "0.5674342", "0.5674342", "0.5613483", "0.5592099", "0.55668676", "0.5564568", "0.55585194", "0.55481267", "0.5514414", "0.5514414", "0.55090207", "0.5507704", "0.550593", "0.54932755", "0.5464846", "0.5461199", "0.5451488", "0.5442073", "0.54420584", "0.54420584", "0.54420584", "0.54420584", "0.54420584", "0.54301196", "0.5424607", "0.5404209", "0.53929573", "0.5389169", "0.5372341", "0.5360326", "0.5349137", "0.53486633", "0.5334338", "0.53329724", "0.5330538", "0.53286487", "0.5321364", "0.5305775", "0.53012764", "0.5299898", "0.52902746", "0.5260576", "0.52572495", "0.52538115", "0.5246924", "0.52426565", "0.5229937", "0.5229937", "0.5212193", "0.52049315", "0.5195895", "0.5193878", "0.51912194", "0.51791215", "0.5178571", "0.51678777", "0.51448834", "0.51445514", "0.5139046", "0.5120347", "0.51123685", "0.51103747", "0.5106712", "0.51007056", "0.5086376", "0.50702286", "0.5066149", "0.5064371", "0.505789", "0.50478196", "0.50477993", "0.50324976", "0.5031794", "0.50282145", "0.5020071", "0.50118625", "0.50112075", "0.50111294", "0.50045985", "0.49990657", "0.49977675", "0.49954525", "0.4984249" ]
0.7736676
0
Sets the background image and call redraw
public void setBackgroundImage(String imagePath) { try { Context context = this.getContext(); if (context != null) { FileInputStream wFile = new FileInputStream(imagePath); BufferedInputStream wBuffer = new BufferedInputStream(wFile); mBackImage = BitmapFactory.decodeStream(wBuffer); if (wFile != null) { wFile.close(); } if (wBuffer != null) { wBuffer.close(); } } if (mBackImage != null) { drawThumbnail(); } } catch(FileNotFoundException e) { Log.e(LOG_TAG, "The file '" + imagePath + "' does not exists."); } catch(Exception e) { Log.e(LOG_TAG, e.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setBackground() throws IOException{\n\t\tBufferedImage backgroundBufferedImage = ImageLoader.getBufferedImage(backgroundImagePath);\n\t\tmainWindow.setBackgroundImage(backgroundBufferedImage);\n\t}", "@Override\r\n public void paintComponent(Graphics g) {\r\n\r\n //Paint background\r\n g.drawImage (background, 0, 0, null);\r\n }", "public void changeBackground(Bitmap bg){\n Drawable newbackground = new BitmapDrawable(getResources(), bg);\n this.setBackground(newbackground);\n\n }", "public void setBackground(){\r\n Image background = new Image(\"Cards/table.jpg\", 192, 80, false, true);\r\n BackgroundImage backgroundImg = new BackgroundImage(background, BackgroundRepeat.REPEAT, BackgroundRepeat.REPEAT,BackgroundPosition.DEFAULT, null);\r\n mainPane.setBackground(new Background(backgroundImg));\r\n }", "public void setBackgroundImage(BackgroundImage image) {\n this.backgroundImage = image;\n }", "public void setBackgroundImage(BufferedImage backgroundImage){\n\t\tcurrentBackgroundImage = backgroundImage;\n\t\tbackgroundPanel.changeBackground(backgroundImage);\n\t}", "@Override\n protected void paintBackground(Graphics2D g) {\n g.drawImage(image, 0, 0, this);\n }", "private void drawBackground() {\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(0,0,512, 512);\n\t\t\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(128, 0, 256, 512);\n\t}", "@Override\r\n\tpublic void paintComponent (Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawImage(background, 0, 0, 800, 660, null);\r\n\t}", "protected void drawForegroundToBackground() {\n if (backgroundColor == null) { return; }\n\n final BufferedImage backgroundBufferedImage = new BufferedImage(dimension.width, dimension.height, this.bufferedImage.getType());\n final Graphics graphics = backgroundBufferedImage.getGraphics();\n\n // draw current color\n graphics.setColor(backgroundColor);\n graphics.fillRect(0, 0, dimension.width, dimension.height);\n graphics.drawImage(bufferedImage, 0, 0, null);\n\n // draw back to original\n final Graphics graphics2 = bufferedImage.getGraphics();\n graphics2.drawImage(backgroundBufferedImage, 0, 0, null);\n }", "@Override\n\t\t\tpublic void paintControl(PaintEvent arg0) {\n\t\t\t\tgc.drawImage(background,0,0);\n\t\t\t}", "public void setBackground(Paint background) {\r\n Paint old = getBackground();\r\n this.background = background;\r\n firePropertyChange(\"background\", old, getBackground());\r\n }", "private void initBackground() throws IOException{\n\t\tBufferedImage backgroundImage = ImageLoader.getBufferedImage(BACKGROUND_IMAGE_PATH);\n\t\tmainWindow.setBackgroundImage(backgroundImage);\n\t}", "private void drawBG(Batch batch) {\n\t\tbackgroundSprite.setRegion(baybayinAnimation.getKeyFrame(animationCounter, true));\n\t}", "public void paintComponent(Graphics graphics) {\n graphics.drawImage(background, 0, 0, null);\n }", "public void setImageBackground(Image img){\n\t\timage = img;\n\t\tif(image != null)\n\t\t{\n\t\t\tScaleImage();\n\t\t\tDimension size = new Dimension(img.getWidth(null), img.getHeight(null));\n\t\t setPreferredSize(size);\n\t\t setMinimumSize(size);\n\t\t setMaximumSize(size);\n\t\t setSize(size);\n\t\t setLayout(null);\n\t\t repaint();\n\t\t}\n\t}", "public void setBackground(Image i)\n {\n background=i;\n imageLabel.setIcon(new ImageIcon(i));\n imageLabel.setBounds(0,0,700,600);\n add(imageLabel);\n }", "public void setBackground(String imagePath) {\n\t\ttry {\n\t\t\timagePath = imagePath.replace(\"\\\\\", \"/\");\n\t\t\tString pathString = new File(imagePath).toURI().toURL().toString();\n\t\t\tbackgroundImagePane.setStyle(\"-fx-background-image:url(\\\"\" + pathString + \"\\\");\");\n\t\t} catch (MalformedURLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void setBGImage(Img i) {\n\t\tif (background == null) {\n\t\t\tthis.background = NullImg.getInstance();\n\t\t} else {\n\t\t\tthis.background = i;\n\t\t}\n\t}", "private void loadImage() {\r\n\t\tthis.background = GraphicsUtil.resize(ImageLoader.getImage(\"resources/img/loginScreen/LoginBackground.jpg\"),\r\n\t\t\t\tFRAME_X, FRAME_Y);\r\n\t}", "public void setBg(){\n this.setBackground(color);\n }", "public void setBackgroundToDefault(){\n\t\tcurrentBackgroundImage = defaultBackgroundImage;\n\t\tbackgroundPanel.changeBackground(defaultBackgroundImage);\n\t}", "private void setUpBackGround() {\n try {\n setBackGround(new Image(new FileInputStream(\"images/backgrounds/[email protected]\")));\n } catch (FileNotFoundException ignored) {\n }\n\n\n try {\n ImageView middleGround = new ImageView(new Image(new FileInputStream(\"images/gameIcons/middleGround/battlemap0_middleground.png\")));\n middleGround.setFitHeight(windowHeight);\n middleGround.setFitWidth(windowWidth);\n addComponent(new NodeWrapper(middleGround));\n } catch (FileNotFoundException ignored) {\n }\n\n try {\n ImageView foreGround = new ImageView(new Image(new FileInputStream(\"images/foregrounds/[email protected]\")));\n foreGround.setPreserveRatio(true);\n foreGround.setFitWidth(windowHeight / 3);\n foreGround.relocate(windowWidth - foreGround.getFitWidth(), windowHeight - foreGround.getFitWidth() * foreGround.getImage().getHeight() / foreGround.getImage().getWidth());\n addComponent(new NodeWrapper(foreGround));\n } catch (FileNotFoundException ignored) {\n }\n }", "private void setBackgrond(){\t\n this.background = new JLabel();\n this.background.setIcon(backgrondP);\n this.background.setVisible(true);\n this.background.setLocation(0, 0);\n this.background.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.add(background);\n\t}", "protected void drawGUI() {\n batch.draw(background, 0, 0);\n }", "public void setBackgroundColor(Color background)\n {\n backgroundColor = background;\n paintAllObjects();\n }", "private void setBackground() {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n String status = city.getStatus();\n switch (status) {\n case \"Clear\":\n background.setBackgroundResource(R.drawable.sunny_day);\n break;\n case\"Rain\":\n case \"Drizzle\":\n case \"Thunderstorm\":\n background.setBackgroundResource(R.drawable.rainy_day);\n break;\n default:\n background.setBackgroundResource(R.drawable.cloudy_day);\n }\n }\n });\n }", "public void setBgImage (final TextureRegion bgImage, final boolean isDisposeBGImgWhenDone) {\n\t\tif (this.isDisposeBGImgWhenDone && this.bgImage != null) {\n\t\t\tthis.bgImage.getTexture().dispose();\n\t\t}\n\n\t\tif (this.bgColor != null) {\n\t\t\tthis.bgColor.dispose();\n\t\t}\n\n\t\tthis.bgImage = bgImage;\n\t\tthis.bgColor = EasyGL.getPixelTexture(Color.BLACK, 1, 1);\n\n\t\tthis.isDisposeBGImgWhenDone = isDisposeBGImgWhenDone;\n\t}", "public void setBackgroundImage(String url) {\n\t\t this.backgroundImage=url;\n\t}", "public void redraw() {\n\t\timgDisplay = null;\n\t\trepaint();\n\t}", "@Override\r\n\tpublic void setBackgroundResource(int resid) {\n\t\tsuper.setBackgroundResource(resid);\r\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\tg.drawImage(Game.background, 0, 0, 5200, 700, null);\n\t}", "public void paintComponent(Graphics g) {\n\t\tImage bg1 = null;\r\n\t\ttry {\r\n\t\t\t bg1 = ImageIO.read(new File(\"background.png\"));\r\n\t\t\t} catch (IOException 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\r\n\t\tg.drawImage(bg1,0,0,null);\r\n\t\trepaint();\t\r\n\t\r\n\t}", "public void preGameMode(){\n\n ImageIcon icon = new ImageIcon(getClass().getResource(\"/title.jpg\"));\n Image image=icon.getImage();\n background = new PBackground(image);\n this.repaint();\n background.setLayout(null);\n this.add(background);\n\n\n // Prepare the body container\n container = new PanelContainer();\n container.setBounds(230,170, 700, 400);\n background.add(container);\n\n this.setVisible(true);\n }", "private void drawBackground(Graphics2D g2d, ScreenParameters screenParameters) {\n Composite defaultComposite = g2d.getComposite();\n g2d.setComposite(LOW_OPACITY);\n g2d.drawImage(background, 0, 0, screenParameters.x, screenParameters.y, null);\n g2d.setComposite(defaultComposite);\n }", "@Override\n public void paint(Graphics g) {\n\tsuper.paint(g);\n\t// getContentPane().setBackground(Color.orange);\n\timg = Util.createImage(getContentPane());\n\tbackColor = new Color(img.getRGB(3, 3));\n\t// img.getGraphics().setColor(Color.blue);\n\t// img.getGraphics().fillRect(0, 0, img.getWidth(), img.getHeight());\n\tdrawEntrance(new Point(557, 70), 0, img.getGraphics());\n\tgetContentPane().getGraphics().drawImage(img, 0, 0, null);\n\tanimate(g);\n\t// img = Util.createImage(getContentPane());\n\n }", "public void redraw() {\n\t\tif(this.getGraphics() != null){\n\t\t\tthis.getGraphics().drawImage(imageBuffer, 0, 0, this); // Swap\n\t\t}\n\t}", "void backgroundRefresh();", "public void setBgImage (final String path, final boolean isDisposeBGImgWhenDone) {\n\t\tif (this.isDisposeBGImgWhenDone && this.bgImage != null) {\n\t\t\tthis.bgImage.getTexture().dispose();\n\t\t}\n\n\t\tif (this.bgColor != null) {\n\t\t\tthis.bgColor.dispose();\n\t\t}\n\n\t\tthis.bgImage = VictusLudusGame.resources.getTextureAtlasCosmos().findRegion(path);\n\t\tthis.bgColor = EasyGL.getPixelTexture(Color.BLACK, 1, 1);\n\t\tthis.isDisposeBGImgWhenDone = isDisposeBGImgWhenDone;\n\t}", "private void draw() {\n Graphics2D g2 = (Graphics2D) image.getGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);\n\n AffineTransform transform = AffineTransform.getTranslateInstance(0, height);\n transform.concatenate(AffineTransform.getScaleInstance(1, -1));\n g2.setTransform(transform);\n\n int width = this.width;\n int height = this.height;\n if (scale != 1) {\n g2.scale(scale, scale);\n width = (int) Math.round(width / scale);\n height = (int) Math.round(height / scale);\n }\n AbstractGraphics g = new GraphicsSWT(g2);\n\n g.setScale(scale);\n if (background != null) {\n g.drawImage(background, 0, 0, width, height);\n }\n\n synchronized (WFEventsLoader.GLOBAL_LOCK) {\n for (Widget widget : widgets) {\n if (widget != null) widget.paint(g, width, height);\n }\n }\n // draw semi-transparent pixel in top left corner to workaround famous OpenGL feature\n g.drawRect(0, 0, 1, 1, Color.WHITE, .5, PlateStyle.RectangleType.SOLID);\n\n g2.dispose();\n }", "public Texture setBackgroundImage(){\n\t\tList<String> backgroundSelection = new ArrayList<String>();\n\t\t\n//\t\tAdds the universal background images to the List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"Universal\");\n\t\tArray<Element> backgroundArray = selection.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tUse of xml file readers to add strings to the balls List\n\t\ttry{Element root = new XmlReader().parse(Gdx.files.internal(\"gameImages.xml\"));\n\t\tElement selection = root.getChildByName(\"artist\");\n\t\tElement artist = selection.getChildByName(formatName(game.getArtist()));\n\t\tArray<Element> backgroundSelectArray = artist.getChildrenByName(\"background\");\n\t\tfor (int i = 0; i < backgroundSelectArray.size; i++)\n\t\t\tbackgroundSelection.add(backgroundSelectArray.get(i).getText());\n\t\t}\n\t\tcatch(IOException e){\n\t\t}\n\t\t\n//\t\tRandom number generator to choose a random image as the ball image\n\t\tint randomBackground = (int) Math.random() * backgroundSelection.size();\n\t\tFileHandle backgroundImage = Gdx.files.internal(backgroundSelection.get(randomBackground));\n\t\treturn new Texture(backgroundImage) ;\n\t}", "private void createBackground()\n {\n GreenfootImage background = getBackground();\n background.setColor(Color.BLACK);\n background.fill();\n }", "private void drawBackground(int position) {\n Background bg = backgrounds.get(position);\n\n // define what portion of images to capture and\n // what coordinates of screen to draw them at\n\n // For the regular bitmap\n Rect fromRect1 = new Rect(0, 0, bg.width - bg.xClip, bg.height);\n Rect toRect1 = new Rect(bg.xClip, bg.startY, bg.width, bg.endY);\n\n // For the reversed background\n Rect fromRect2 = new Rect(bg.width - bg.xClip, 0, bg.width, bg.height);\n Rect toRect2 = new Rect(0, bg.startY, bg.xClip, bg.endY);\n\n //draw the two background bitmaps\n if (!bg.reversedFirst) {\n canvas.drawBitmap(bg.bitmap, fromRect1, toRect1, paint);\n canvas.drawBitmap(bg.bitmapReversed, fromRect2, toRect2, paint);\n } else {\n canvas.drawBitmap(bg.bitmap, fromRect2, toRect2, paint);\n canvas.drawBitmap(bg.bitmapReversed, fromRect1, toRect1, paint);\n }\n\n }", "@Override\n protected void paintBackground(Graphics2D g) {\n super.paintBackground(g);\n if (Game.level == 0) {\n g.drawImage(bg, 0, 0, this);\n } else if (Game.level == 1) {\n g.drawImage(bg, 0, 0, this);\n } else if (Game.level == 2) {\n g.drawImage(bg2, 0, 0, this);\n } else if (Game.level == 3) {\n g.drawImage(bg3, 0, 0, this);\n }\n\n }", "public void updateBackgroundForAnimator() {\n resetAnimationBackgroundAnimator();\n forAllWindows(this.mUpdateWallpaperForAnimator, true);\n }", "@Override\r\n\tpublic void renderBackground() {\n\r\n\t}", "private void drawBackground() {\r\n\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tthis.mc.renderEngine.bindTexture(BACKGROUND_RESOURCE);\r\n\t\tString text = \"Nitro Teleport Waypoints\";\r\n\t\tint posX = (width - SIZE_X) / 2;\r\n\t\tint posY = (height - SIZE_Y) / 2;\r\n\t\tint strWidth = this.fontRendererObj.getStringWidth(text);\r\n\r\n\t\tthis.drawTexturedModalRect(posX, posY, 0, 0, SIZE_X, SIZE_Y);\r\n\t\tthis.drawCenteredString(this.fontRendererObj, text, width / 2, posY - 17, 0xFFFFFF);\r\n\t}", "public void loadBackground() {\n try {\n File file = new File(\"src/resources/fondo.png\");\n this.background = ImageIO.read(file);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void resetBackgroundSprite(Texture newSpriteTexture) {\n backgroundSprite = new Sprite(newSpriteTexture);\n backgroundSprite.setSize(screenWidth, screenHeight);\n backgroundSprite.setPosition(0, 0);\n }", "public void render() {\n backGraphics.drawImage(background, backgroundX, backgroundY, null);\n\n GameObject.renderAll(backGraphics);\n\n //2. Call repaint\n repaint();\n }", "void updateBackground() {\n float f = this.getDimension(R.dimen.fab_stroke_width);\n float f2 = f / 2.0f;\n Resources resources = this.getResources();\n int n = this.mSize == 0 ? R.drawable.fab_bg_normal : R.drawable.fab_bg_mini;\n resources = new LayerDrawable(new Drawable[]{resources.getDrawable(n), this.createFillDrawable(f), this.createOuterStrokeDrawable(f), this.getIconDrawable()});\n n = (int)(this.mCircleSize - this.getDimension(R.dimen.fab_icon_size)) / 2;\n int n2 = (int)this.mShadowRadius;\n int n3 = (int)(this.mShadowRadius - this.mShadowOffset);\n int n4 = (int)(this.mShadowRadius + this.mShadowOffset);\n resources.setLayerInset(1, n2, n3, n2, n4);\n resources.setLayerInset(2, (int)((float)n2 - f2), (int)((float)n3 - f2), (int)((float)n2 - f2), (int)((float)n4 - f2));\n resources.setLayerInset(3, n2 + n, n3 + n, n2 + n, n4 + n);\n this.setBackgroundCompat((Drawable)resources);\n }", "private void drawBackground(Graphics g){\r\n g.setColor(Colors.ColorAlpha(Colors.blacks,a1));\r\n g.fillRect(0,0,w,h);\r\n if(moving){\r\n g.drawImage(Assets.burst.get((int)((game.counter%8)*0.625)),(int)(w*0.472),(int)(h*0.455),null);\r\n g.drawImage(Assets.sparks.get(((game.counter%20)/2)),(int)(w*0.465),(int)(h*0.345),null);\r\n }\r\n drawWires(g);\r\n }", "public void setBgColor (final Color bgColor) {\n\t\tif (this.isDisposeBGImgWhenDone && this.bgImage != null) {\n\t\t\tthis.bgImage.getTexture().dispose();\n\t\t}\n\n\t\tif (this.bgColor != null) {\n\t\t\tthis.bgColor.dispose();\n\t\t}\n\n\t\tthis.bgColor = EasyGL.getPixelTexture(bgColor, 1, 1);\n\t\tthis.bgImage = null;\n\t}", "public void processSetImageBackground() {\n AppYesNoDialogSingleton dialog = AppYesNoDialogSingleton.getSingleton();\n \n // POP UP THE DIALOG\n dialog.show(\"Set Image Background\", \"Would you like to have a background image?\");\n \n // IF USER CHOSE YES\n if (dialog.getSelection()) {\n // WE'LL NEED TO GET CUSTOMIZED STUFF WITH THIS\n PropertiesManager props = PropertiesManager.getPropertiesManager();\n\n // AND NOW ASK THE USER FOR THE FILE TO OPEN\n FileChooser fc = new FileChooser();\n fc.setInitialDirectory(new File(PATH_WORK));\n fc.setTitle(props.getProperty(LOAD_WORK_TITLE));\n File selectedFile = fc.showOpenDialog(app.getGUI().getWindow());\n \n // SET THE BACKGROUND IMAGE\n dataManager.setImageBackground(selectedFile);\n }\n else {\n // REMOVE THE BACKGROUND IMAGE\n dataManager.removeImageBackground();\n } \n }", "public void renderBackground(Graphics g)\n\t{\n\t\tg.drawImage(Drawing.getImage(\"backgrounds/sky1.png\"), 0, 0, null);\n\t\tg.drawImage(Drawing.getImage(\"backgrounds/grass1.png\"), 0, 530, null);\n\t}", "private void updateBackground() {\n \t\t\t\ttextRed.setText(\"\" + redBar.getProgress());\n \t\t\t\ttextGreen.setText(\"\" + greenBar.getProgress());\n \t\t\t\ttextBlue.setText(\"\" + blueBar.getProgress());\n \t\t\t\ttextAlpha.setText(\"\" + alphaBar.getProgress());\n \t\t\t\tcolorTest.setBackgroundColor(Color.argb(alphaBar.getProgress(), redBar.getProgress(), greenBar.getProgress(), blueBar.getProgress()));\n \t\t\t}", "public void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\ttry {\r\n\t\t\tBufferedImage image = ImageIO.read(new File(\r\n\t\t\t\t\tGraphicalParameters.BACKGROUND_IMAGE_PATH_NAME));\r\n\t\t\tg.drawImage(image, 0, 0, null);\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void setBackground(int index){\r\n\t\tsuper.setBackground(myBackgrounds.get(index));\r\n\t}", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tg.drawImage(BG_LIST.get(this.dto.getNowlevel()%BG_LIST.size()), 0, 0,1200,700, null);\r\n\t\t\r\n\r\n\t}", "public void draw() {\n background(0);\n}", "private void setButtonBackground(Button button, String bgImgName) {\n BackgroundImage backgroundImage = new BackgroundImage(\n new Image( getClass().getResource(\"resources/\" + bgImgName).toExternalForm()),\n BackgroundRepeat.NO_REPEAT,\n BackgroundRepeat.NO_REPEAT,\n BackgroundPosition.CENTER,\n BackgroundSize.DEFAULT);\n Background background = new Background(backgroundImage);\n button.setBackground(background);\n }", "public void Draw() {\n\t\timgIcon = new ImageIcon(imgUrl);\n\t}", "public static void drawBackground(MatrixStack matrices, ContainerScreen<?> screen, ResourceLocation background) {\n RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);\n screen.getMinecraft().getTextureManager().bindTexture(background);\n screen.blit(matrices, screen.guiLeft, screen.guiTop, 0, 0, screen.xSize, screen.ySize);\n }", "private void loadBackground() {\n RelativeLayout thisRL = (RelativeLayout) findViewById(R.id.relativeLayout);\n\n // randomly chooses a background image for the splash screen\n int r = new Random().nextInt(NUM_BACKGROUNDS);\n switch (r) {\n case 0:\n thisRL.setBackgroundResource(R.drawable.splash_cliff);\n break;\n case 1:\n thisRL.setBackgroundResource(R.drawable.splash_notebook);\n break;\n case 2:\n thisRL.setBackgroundResource(R.drawable.splash_map);\n break;\n default:\n thisRL.setBackgroundResource(R.drawable.splash_notebook);\n }\n }", "@Override\r\n\tpublic void drawBackground(Graphics g, ImageObserver observer) {\n\t\tfor (int i = 0; i < buttons.length; i++) {\r\n\t\t\tbuttons[i].drawBackground(g, observer);\r\n\t\t}\r\n\t\t\r\n\t\t// draw selected screen background\r\n\t\tthis.screens[this.selectedIndex].drawBackground(g, observer);\r\n\t}", "public MainSlot_JPanel(){\n //load background image\n try {\n Image img = ImageIO.read(getClass()\n .getResource(\"./graphics/slot_BackGround.jpg\"));\n backgroundImg = img\n .getScaledInstance(800,580,java.awt.Image.SCALE_SMOOTH );\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "public void setBackgroundPainted(boolean backPainted) {\r\n boolean old = isBackgroundPainted();\r\n this.backPainted = backPainted;\r\n firePropertyChange(\"backgroundPainted\", old, isBackgroundPainted());\r\n }", "public void enterBackground();", "public void createBackground() {\n Sprite bg = this.levelInfo.getBackground();\n this.sprites.addSprite(bg);\n }", "private void redraw() {\r\n for (int row = 0; row < maxRows; row++) {\r\n for (int column = 0; column < maxColumns; column++) {\r\n grid[row][column].setBackground(SQUARE_COLOR);\r\n }\r\n }\r\n grid[snake[HEAD].row][snake[HEAD].column].setBackground(\r\n SNAKE_HEAD_COLOR);\r\n for (int i = 1; i < length; i++) {\r\n grid[snake[i].row][snake[i].column].setBackground(SNAKE_BODY_COLOR);\r\n }\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }", "public void scrollBG(){\n\n\t\t//Moves First BG Image\n\t\tif(background1.getX() > -700){\n\t\t\tbackground1.setX(background1.getX() - 1);\n\t\t} else { background1.setX(700);\t}\n\t\t\n\t\t//Moves Second BG Image\n\t\tif(background2.getX() > -700){\n\t\t\tbackground2.setX(background2.getX() -1);\n\t\t} else { background2.setX(700);\t}\n\n\t}", "public void affiche() {\n\t\tcontroller.image.repaint();\n\t}", "private static void drawUniverse(String background) {\n StdDraw.picture(0.0, 0.0, background);\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g); // paint parent's background\n setBackground(Color.WHITE); // set background color for this JPanel\n if (img != null) {\n g.drawImage(img, 100, 100, this);\n }\n }", "public void setSelectionBackground( final Image image ) {\n checkWidget();\n selectionBgImage = image;\n }", "private void drawBackground(Graphics2D g2) {\n\t\t\tg2.fillRect(0, 0, WIDTHBG, HEIGHTBG);\n\t\t}", "protected void paintBackground(Graphics g){\n Dimension size = getSize();\n\n g.setColor(properties.backgroundColor);\n g.fillRect(0,0,size.width,size.height);\n\n }", "private void loadBackground() {\n\t\ttry {\n\t\t\timgBackground[0] = ImageIO.read(new File(System.getProperty(\"user.dir\")+\"/assets/Background1.jpg\")); // attempts to load the three\n\t\t\timgBackground[1] = ImageIO.read(new File(System.getProperty(\"user.dir\")+\"/assets/Background2.jpg\")); // default backgrounds from the\n\t\t\timgBackground[2] = ImageIO.read(new File(System.getProperty(\"user.dir\")+\"/assets/Background3.jpg\")); // assets folder\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setBackgroundImage(BufferedImage inputImage) {\r\n\t\tif (inputImage == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Background image is null!\");\r\n\t\t} else {\r\n\t\t\tthis.backgroundImage = imageBlur.averageBlur(inputImage, blurRadius);\r\n\t\t}\r\n\t}", "public void paint(Graphics g){\r\n \t/*\r\n \t * override default paint to draw \r\n \t * screen image in panel using current\r\n \t * scn_background.\r\n \t */\r\n \tg.drawImage(scn_image,0,0,scn_width,scn_height,scn_background_color,this);\r\n }", "private void clearbackground() {\n\t\tfive_direct_single.setBackgroundResource(0);\r\n\t\tfour_direct_single.setBackgroundResource(0);\r\n\t\ttopthree_group_three_single.setBackgroundResource(0);\r\n\t\ttopthree_group_six_single.setBackgroundResource(0);\r\n\t\ttopthree_direct_single.setBackgroundResource(0);\r\n\t\tbottomthree_direct_single.setBackgroundResource(0);\r\n\t\tbottompthree_group_three_single.setBackgroundResource(0);\r\n\t\tbottompthree_group_six_single.setBackgroundResource(0);\r\n\t\ttwo_direct_toptwo_single.setBackgroundResource(0);\r\n\t\ttwo_group_toptwo_single.setBackgroundResource(0);\r\n\t\ttwo_group_bottomtwo_single.setBackgroundResource(0);\r\n\t\ttwo_direct_bottomtwo_single.setBackgroundResource(0);\r\n\t\ttopthree_mix_group.setBackgroundResource(0);\r\n\t\tbottompthree_mix_group.setBackgroundResource(0);\r\n\t\tfive_direct_double.setBackgroundResource(0);\r\n\t\tfive_group_120.setBackgroundResource(0);\r\n\t\tfive_group_60.setBackgroundResource(0);\r\n\t\tfive_group_30.setBackgroundResource(0);\r\n\t\tfive_group_20.setBackgroundResource(0);\r\n\t\tfive_group_10.setBackgroundResource(0);\r\n\t\tfive_group_5.setBackgroundResource(0);\r\n\t\tfour_direct_double.setBackgroundResource(0);\r\n\t\tfour_group_24.setBackgroundResource(0);\r\n\t\tfour_group_12.setBackgroundResource(0);\r\n\t\ttopthree_direct_double.setBackgroundResource(0);\r\n\t\ttopthree_group_three.setBackgroundResource(0);\r\n\t\ttopthree_group_six.setBackgroundResource(0);\r\n\t\ttopthree_group_sum.setBackgroundResource(0);\r\n\t\ttopthree_group_container.setBackgroundResource(0);\r\n\t\tbottomthree_direct_double.setBackgroundResource(0);\r\n\t\tbottomthree_group_span.setBackgroundResource(0);\r\n\t\tbottomthree_group_three.setBackgroundResource(0);\r\n\t\tbottomthree_group_six.setBackgroundResource(0);\r\n\t\tbottomthree_group_sum.setBackgroundResource(0);\r\n\t\tbottomthree_group_container.setBackgroundResource(0);\r\n\t\ttwo_direct_bottomtwo_double.setBackgroundResource(0);\r\n\t\ttwo_direct_bottomtwo_sum.setBackgroundResource(0);\r\n\t\ttwo_direct_bottomtwo_span.setBackgroundResource(0);\r\n\t\ttwo_direct_toptwo_double.setBackgroundResource(0);\r\n\t\ttwo_direct_toptwo_span.setBackgroundResource(0);\r\n\t\ttwo_group_bottomtwo_double.setBackgroundResource(0);\r\n\t\ttwo_group_toptwo_double.setBackgroundResource(0);\r\n\t\tfixed_position.setBackgroundResource(0);\r\n\t\tthree_bottomthree_one_notposition.setBackgroundResource(0);\r\n\t\tthree_bottomthree_two_notposition.setBackgroundResource(0);\r\n\t\tthree_topthree_one_notposition.setBackgroundResource(0);\r\n\t\tthree_topthree_two_notposition.setBackgroundResource(0);\r\n\t\tfour_bottomfour_two_notposition.setBackgroundResource(0);\r\n\t\tfive_bottomfive_two_notposition.setBackgroundResource(0);\r\n\t\tfive_bottomfive_three_notposition.setBackgroundResource(0);\r\n\t\ttwo_group_toptwo_sum.setBackgroundResource(0);\r\n\t\tfour_group_6.setBackgroundResource(0);\r\n\t\tfour_group_4.setBackgroundResource(0);\r\n\t\tbottomthree_direct_sum.setBackgroundResource(0);\r\n\t\ttopthree_direct_sum.setBackgroundResource(0);\r\n\t\ttopthree_direct_span.setBackgroundResource(0);\r\n\t\ttopthree_sum_end.setBackgroundResource(0);\r\n\t\tbottomthree_sum_end.setBackgroundResource(0);\r\n\t\ttwo_direct_toptwo_sum.setBackgroundResource(0);\r\n\t\ttwo_group_toptwo_container.setBackgroundResource(0);\r\n\t\ttwo_group_bottomtwo_container.setBackgroundResource(0);\r\n\t\ttwo_group_bottomtwo_sum.setBackgroundResource(0);\r\n\t\tfour_bottomfour_one_notposition.setBackgroundResource(0);\r\n\t\tmaxmin_bottomtwo.setBackgroundResource(0);\r\n\t\tmaxmin_bottomthree.setBackgroundResource(0);\r\n\t\tmaxmin_toptwo.setBackgroundResource(0);\r\n\t\tmaxmin_topthree.setBackgroundResource(0);\r\n\t}", "public BackgroundRenderer (final GameDimensions dimensions, final String path, final boolean isDisposeBGImgWhenDone) {\n\t\tthis.dimensions = dimensions;\n\t\tthis.isDisposeBGImgWhenDone = isDisposeBGImgWhenDone;\n\t\tthis.bgImage = VictusLudusGame.resources.getTextureAtlasGUI().findRegion(path);\n\t\tthis.bgColor = EasyGL.getPixelTexture(Color.BLACK, 1, 1);\n\t}", "private void updateBackgroundID() {\n if ((x + 1) % 2 == (y + 1) % 2) {\n switch (c) {\n case BLACK:\n background = R.drawable.pawngame_black_black;\n break;\n case WHITE:\n background = R.drawable.pawngame_black_white;\n break;\n default:\n background = R.drawable.pawngame_black_empty;\n }\n } else {\n switch (c) {\n case BLACK:\n background = R.drawable.pawngame_white_black;\n break;\n case WHITE:\n background = R.drawable.pawngame_white_white;\n break;\n default:\n background = R.drawable.pawngame_white_empty;\n }\n }\n }", "public void paint() {\n BufferStrategy bs;\n bs = this.getBufferStrategy();\n\n Graphics g = bs.getDrawGraphics();\n g.drawImage(background, 0, 0, this.getWidth(), this.getHeight(), null);\n if (this.blackHoles != null) {\n for (BlackHole blackHole : this.blackHoles) {\n blackHole.paint(g);\n }\n }\n if (this.balls != null) {\n for (int i = 0; i <this.balls.size() ; i++) {\n this.balls.get(i).paint(g);\n }\n\n }\n\n bs.show();\n g.dispose();\n\n }", "public void setBackground(String texture)\r\n {\r\n \tFileInputStream inFile = null;\r\n \t try\r\n \t {\r\n \t inFile = new FileInputStream(texture);\r\n \t JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(inFile);\r\n \t BufferedImage bgBuffImg = decoder.decodeAsBufferedImage();\r\n \t ImageComponent2D bgImange = new ImageComponent2D(BufferedImage.TYPE_INT_RGB, bgBuffImg);\r\n \t bg.setImage(bgImange);\r\n \t inFile.close();\r\n \t }\r\n \t catch (Exception e)\r\n\t\t{\r\n \t \tSystem.out.println(e + \"\\n\" + \"Texture Import failed!\");\r\n \t }\r\n }", "public void repaint() {\n setBackground(Color.white);\n super.repaint();\n setVisible(true);\n\n }", "protected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tImageIcon background = new ImageIcon(\"pictures\\\\到达单填写right.png\");\n\t\tImage bg = background.getImage();\n\t\tg.drawImage(bg, 0, 0, frameWidth / 4 * 3, frameHeight, null);\n\t}", "private void resizeImage() {\r\n\t\tloading = new ImageIcon(background);\r\n\t\tImage newing = background.getScaledInstance(FRAME_X, FRAME_Y, java.awt.Image.SCALE_SMOOTH);\r\n\t\tloading = new ImageIcon(newing);\r\n\t}", "public void setBackground(Background bgFront, Background bgBack) {\n\t\tthis.bgFront = bgFront;\n\t\tthis.bgBack = bgBack;\n\t}", "private void redraw(JFrame container) \n\t{\n\t\tfor (int i = 0; i < images.length; i++)\n\t\t{\n\t\t\tfor (int j = 0; j < images.length; j++)\n\t\t\t{\n\t\t\t\timages[i][j].setIcon(UNSET);;\n\t\t\t}\n\t\t}\t\t\n\t}", "public void requestBackgroundChange()\n\t\t{\n\t\t\tisBackgroundChangeRequested = true;\n\t\t\trequestRender();\n\t\t}", "public void repaint (Graphics g){\r\n g.drawLine(10,10,150,150); // Draw a line from (10,10) to (150,150)\r\n \r\n g.setColor(Color.darkGray);\r\n g.fillRect( 0 , 0 , \r\n 4000 , 4000 ); \r\n \r\n g.setColor(Color.BLACK);\r\n \r\n BufferedImage image;\r\n \r\n for(int h = 0; h < 16; h++){\r\n for(int w =0; w< 16; w++){\r\n //g.drawImage(image.getSubimage(w *16, h*16, 16, 16), 0+(32*w),0 +(32*h), 32,32,this);\r\n g.drawRect(w *32, h*32, 32, 32);\r\n \r\n if(coord.xSelected >=0){\r\n g.setColor(Color.WHITE);\r\n g.drawRect(coord.xSelected *32, coord.ySelected *32, 32, 32);\r\n g.setColor(Color.BLACK);\r\n }\r\n }\r\n }\r\n \r\n \r\n }", "public void loadSkin()\n {\n try\n {\n bgImage = ImageIO.read(BrandingActivator.getResources().\n getImageURL(\"plugin.branding.ABOUT_WINDOW_BACKGROUND\"));\n\n this.setPreferredSize(new Dimension(bgImage.getWidth(this),\n bgImage.getHeight(this)));\n }\n catch (IOException e)\n {\n logger.error(\"Error cannot obtain background image\", e);\n bgImage = null;\n }\n }", "public void redraw(Graphics g)\n {\n g.drawImage(img, (int)x, (int)y, this);\n }", "@Override\n public void setBackgroundPattern(Pattern pattern) {\n }", "public void updateLayer() {\n bufferedImage = null;\n repaint();\n panelResized();\n }", "private Texture createBackground() {\n Pixmap backgroundPixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);\n backgroundPixmap.setColor(0, 0, 0, 0.3f);\n backgroundPixmap.fill();\n Texture texture = new Texture(backgroundPixmap);\n backgroundPixmap.dispose();\n return texture;\n }", "private boolean initBackgroundImage(MinesweeperView frame) {\r\n try {\r\n int width = (int) frame.getDim().getWidth();\r\n int height = (int) frame.getDim().getHeight();\r\n Background image = new Background(new File(\"../Asset/explosion.jpg\"), 0, 0, width, height);\r\n frame.add(image);\r\n } catch (IOException event) {\r\n System.err.println(\"Image Not Found\");\r\n return false;\r\n }\r\n return true;\r\n }", "public void resetBG() {\n\t\t\tfor(int i = 0; i < colonnes.size(); i++) {\n\t\t\t\tcolonnes.get(i).resetBG();\n\t\t\t}\n\t\t}", "private void loadImage() {\n try {\n background = ImageIO.read(new File(\"src/main/resources/background.jpg\"));\n } catch (IOException e) {\n System.out.println(\"Cannot load background image!\");\n }\n }" ]
[ "0.747725", "0.7080215", "0.7039537", "0.7029211", "0.7010016", "0.69933283", "0.6966123", "0.6954248", "0.694392", "0.69387907", "0.69107205", "0.677011", "0.6668946", "0.66537654", "0.66485155", "0.66392195", "0.6623627", "0.65445435", "0.6532458", "0.6491358", "0.64880455", "0.6485976", "0.64541215", "0.6451844", "0.6381555", "0.638047", "0.6375767", "0.63752776", "0.6342105", "0.6337968", "0.6336637", "0.6328635", "0.6318711", "0.6302303", "0.6299129", "0.62958854", "0.628787", "0.6282252", "0.62590146", "0.62475824", "0.62460434", "0.62228537", "0.6214583", "0.620091", "0.6199643", "0.6198882", "0.61873287", "0.61802465", "0.6176078", "0.61713314", "0.6144162", "0.6133284", "0.61299425", "0.6117778", "0.6115647", "0.611531", "0.61100477", "0.6108967", "0.61083364", "0.60880864", "0.60734564", "0.6064382", "0.6062787", "0.60393673", "0.6030975", "0.6020603", "0.60174215", "0.60087067", "0.59907895", "0.5988935", "0.59791493", "0.59775", "0.59737337", "0.59730047", "0.5969273", "0.5966605", "0.59634775", "0.5959207", "0.59413403", "0.59240294", "0.5919643", "0.5916379", "0.59133977", "0.59031314", "0.58986706", "0.589713", "0.5888258", "0.5884425", "0.58774006", "0.5849323", "0.5846182", "0.58450747", "0.58433884", "0.58272403", "0.58060694", "0.58004725", "0.5791866", "0.5784274", "0.5784008", "0.5753081" ]
0.6479666
22
Draws the image with the border.
private void drawThumbnail() { int wCurrentWidth = mBackImage.getWidth(); int wCurrentHeight = mBackImage.getHeight(); float scaleWidth = ((float) mThumbnailWidth) / wCurrentWidth; float scaleHeight = ((float) mThumbnailHeight) / wCurrentHeight; Matrix matrix = new Matrix(); matrix.postScale(scaleWidth, scaleHeight); // create the new Bitmap object Bitmap resizedBitmap = Bitmap.createBitmap(mBackImage, 0, 0 , wCurrentWidth, wCurrentHeight, matrix, true); Bitmap output = Bitmap.createBitmap(resizedBitmap.getWidth()+(2*cmColorPadding+2*cmBorderPadding), resizedBitmap.getHeight()+(2*cmColorPadding+2*cmBorderPadding), Config.ARGB_8888); Canvas canvas = new Canvas(output); final int wRectBorderLeft = 0; final int wRectColorLeft = wRectBorderLeft + cmBorderPadding; final int wRectThumbnailLeft = wRectColorLeft + cmColorPadding; final int wRectBorderTop = 0; final int wRectColorTop = wRectBorderTop + cmBorderPadding; final int wRectThumbnailTop = wRectColorTop + cmColorPadding; final int wRectThumbnailRight = wRectThumbnailLeft + resizedBitmap.getWidth(); final int wRectColorRight = wRectThumbnailRight + cmColorPadding; final int wRectBorderRight = wRectColorRight + cmBorderPadding; final int wRectThumbnailBottom = wRectThumbnailTop + resizedBitmap.getHeight(); final int wRectColorBottom = wRectThumbnailBottom + cmColorPadding; final int wRectBorderBottom = wRectColorBottom + cmBorderPadding; final int wThumbColor = 0xff424242; final int wBorderColor = 0xffBBBBBB; final Paint paint = new Paint(); final Rect wThumbRectangle = new Rect(wRectThumbnailLeft, wRectThumbnailTop, wRectThumbnailRight, wRectThumbnailBottom); final Rect wColorRectangle = new Rect(wRectColorLeft, wRectColorTop, wRectColorRight, wRectColorBottom); final Rect wBorderRectangle = new Rect(wRectBorderLeft, wRectBorderTop, wRectBorderRight, wRectBorderBottom); final RectF wThumbRoundRectangle = new RectF(wThumbRectangle); final RectF wColorRoundRectangle = new RectF(wColorRectangle); final RectF wBorderRoundRectangle = new RectF(wBorderRectangle); final float roundPx = 3.0f; paint.setAntiAlias(true); canvas.drawARGB(0, 0, 0, 0); paint.setColor(wBorderColor); canvas.drawRoundRect(wBorderRoundRectangle, roundPx, roundPx, paint); paint.setColor(getLevelColor()); canvas.drawRoundRect(wColorRoundRectangle, roundPx, roundPx, paint); paint.setColor(wThumbColor); canvas.drawRoundRect(wThumbRoundRectangle, roundPx, roundPx, paint); paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN)); canvas.drawBitmap(resizedBitmap, null, wThumbRectangle, paint); BitmapDrawable bmd = new BitmapDrawable(output); mCurrentImage.setImageDrawable(bmd); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void draw() {\n Graphics2D g2 = (Graphics2D) image.getGraphics();\n\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB);\n\n AffineTransform transform = AffineTransform.getTranslateInstance(0, height);\n transform.concatenate(AffineTransform.getScaleInstance(1, -1));\n g2.setTransform(transform);\n\n int width = this.width;\n int height = this.height;\n if (scale != 1) {\n g2.scale(scale, scale);\n width = (int) Math.round(width / scale);\n height = (int) Math.round(height / scale);\n }\n AbstractGraphics g = new GraphicsSWT(g2);\n\n g.setScale(scale);\n if (background != null) {\n g.drawImage(background, 0, 0, width, height);\n }\n\n synchronized (WFEventsLoader.GLOBAL_LOCK) {\n for (Widget widget : widgets) {\n if (widget != null) widget.paint(g, width, height);\n }\n }\n // draw semi-transparent pixel in top left corner to workaround famous OpenGL feature\n g.drawRect(0, 0, 1, 1, Color.WHITE, .5, PlateStyle.RectangleType.SOLID);\n\n g2.dispose();\n }", "public native MagickImage borderImage(Rectangle borderInfo)\n\t\t\tthrows MagickException;", "public void draw(){\n StdDraw.picture(this.xCoordinate,this.yCoordinate,this.img);\n }", "@Override\r\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\r\n\t\tsetRedBorder(decoratedShape);\r\n\t}", "public void draw(){\n\t\tString filename = \"images/\" + this.imgFileName;\n\t\tStdDraw.picture(this.xxPos, this.yyPos, filename);\n\t}", "public void draw(){\n\t\tStdDraw.picture(this.xxPos,this.yyPos,\"images/\"+this.imgFileName);\n\t}", "@Override\n public void draw(Canvas onCanvas) {\n Paint border = new Paint();\n border.setColor(Color.BLACK);\n border.setStyle(Paint.Style.STROKE);\n border.setStrokeWidth(1);\n\n // -1 on width and height because the 1st pixel (0 index) is included\n // Java's placement on the border lines are really weird...\n //\n // It draws the top and left borders on the 0 pixel\n // BUT it draws the right and bottom ones PAST the last pixel\n // WHY U DO DIS\n onCanvas.drawRect(0, 0, getW() - 1, getH() - 1, border);\n\n super.draw(onCanvas);\n }", "private void drawIconBorder(Graphics g) {\n }", "public void drawImage(float x, float y, float width, float height);", "private void drawImage(){\n Integer resourceId = imageId.get(this.name);\n if (resourceId != null) {\n drawAbstract(resourceId);\n } else {\n drawNone();\n }\n }", "protected void paintBorder (Graphics g)\r\n {\n }", "private void renderBorder() {\n\t\trenderHorizontalLine(0, BORDER_SIGN_HORIZONTAL);\n\t\trenderHorizontalLine(this.output.length - 1, BORDER_SIGN_HORIZONTAL);\n\t\trenderVerticalLine(0, BORDER_SIGN_VERTICAL);\n\t\trenderVerticalLine(this.output[0].length - 1, BORDER_SIGN_VERTICAL);\n\n\t\tthis.output[0][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[0][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t}", "private void createAreaWithoutBorder(){\n image.setColor(backgroundColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n }", "public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }", "private void createAreaWithBorder(int borderWidth, int borderHeight){\n image.setColor(borderColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n \n image.setColor(backgroundColor);\n image.fillRect(borderWidth, borderHeight, fieldWidth - (borderWidth * 2), fieldHeight - (borderHeight * 2));\n }", "public void render() { image.drawFromTopLeft(getX(), getY()); }", "private void paintTheImage() {\n SPainter klee = new SPainter(\"Red Cross\", 600,600);\n SRectangle rectangle = new SRectangle(500, 100);\n klee.setColor(Color.RED);\n klee.paint(rectangle);\n klee.tl();\n klee.paint(rectangle);\n }", "public void draw(){\n\t\tif(selected){\n\t\t\timg.draw(xpos,ypos,scale,Color.blue);\n\t\t}else{\n\t\t\timg.draw(xpos, ypos, scale);\n\t\t}\n\t}", "@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg.drawImage(image, 310, 40, 200, 150, this);\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制圆形\");\n\t}", "private void drawImages() {\n\t\t\r\n\t}", "private void paintOriginalImage() {\r\n Graphics g = originalImage.getGraphics();\r\n // Erase to black\r\n g.setColor(Color.BLACK);\r\n g.fillRect(0, 0, FULL_SIZE, FULL_SIZE);\r\n \r\n // RGB quadrant\r\n for (int i = 0; i < QUAD_SIZE; i += 3) {\r\n int x = i;\r\n g.setColor(Color.RED);\r\n g.drawLine(x, 0, x, QUAD_SIZE);\r\n x++;\r\n g.setColor(Color.GREEN);\r\n g.drawLine(x, 0, x, QUAD_SIZE);\r\n x++;\r\n g.setColor(Color.BLUE);\r\n g.drawLine(x, 0, x, QUAD_SIZE);\r\n }\r\n \r\n // Picture quadrant\r\n try {\r\n URL url = getClass().getResource(\"images/BBGrayscale.png\");\r\n BufferedImage picture = ImageIO.read(url);\r\n // Center picture in quadrant area\r\n int xDiff = QUAD_SIZE - picture.getWidth();\r\n int yDiff = QUAD_SIZE - picture.getHeight();\r\n g.drawImage(picture, QUAD_SIZE + xDiff/2, yDiff/2, null);\r\n } catch (Exception e) {\r\n System.out.println(\"Problem reading image file: \" + e);\r\n }\r\n \r\n // Vector drawing quadrant\r\n g.setColor(Color.WHITE);\r\n g.fillRect(0, QUAD_SIZE, QUAD_SIZE, QUAD_SIZE);\r\n g.setColor(Color.BLACK);\r\n g.drawOval(2, QUAD_SIZE + 2, QUAD_SIZE-4, QUAD_SIZE-4);\r\n g.drawArc(20, QUAD_SIZE + 20, (QUAD_SIZE - 40), QUAD_SIZE - 40, \r\n 190, 160);\r\n int eyeSize = 7;\r\n int eyePos = 30 - (eyeSize / 2);\r\n g.fillOval(eyePos, QUAD_SIZE + eyePos, eyeSize, eyeSize);\r\n g.fillOval(QUAD_SIZE - eyePos - eyeSize, QUAD_SIZE + eyePos, \r\n eyeSize, eyeSize);\r\n \r\n // B&W grid\r\n g.setColor(Color.WHITE);\r\n g.fillRect(QUAD_SIZE + 1, QUAD_SIZE + 1, QUAD_SIZE, QUAD_SIZE);\r\n g.setColor(Color.BLACK);\r\n for (int i = 0; i < QUAD_SIZE; i += 4) {\r\n int pos = QUAD_SIZE + i;\r\n g.drawLine(pos, QUAD_SIZE + 1, pos, FULL_SIZE);\r\n g.drawLine(QUAD_SIZE + 1, pos, FULL_SIZE, pos);\r\n }\r\n \r\n originalImagePainted = true;\r\n }", "private void drawBackground() {\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(0,0,512, 512);\n\t\t\n\t\timgG2.setColor(Color.BLACK);\n\t\timgG2.fillRect(128, 0, 256, 512);\n\t}", "@Override\n protected void paintComponent(final Graphics g) {\n super.paintComponent(g);\n g.drawImage(image, 0, 0, this);\n }", "@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tg.drawImage(image, 0, 0, getWidth(), getHeight(), null);\n\t}", "@Override\r\n public void Draw(Graphics g)\r\n {\r\n g.drawImage(image, (int)x, (int)y, width, height, null);\r\n\r\n\r\n ///doar pentru debug daca se doreste vizualizarea dreptunghiului de coliziune altfel se vor comenta urmatoarele doua linii\r\n //g.setColor(Color.blue);\r\n //g.fillRect((int)(x + bounds.x), (int)(y + bounds.y), bounds.width, bounds.height);\r\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(img, 0, 0, null);\n }", "private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int width, int height)\r\n/* 89: */ {\r\n/* 90:133 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 91: */ \r\n/* 92: */ \r\n/* 93:136 */ g2.drawRect(x, y, width, height);\r\n/* 94: */ }", "@Override\n protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 15, 50);\n }", "@Override \n public void paintBorder(Component c, Graphics g, int x, int y, int width, int height){ \n g.setColor( c.getForeground() ); \n g.drawLine(0, height - 1, width, height - 1); //Border Bottom \n }", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t\t\tg2d.translate(this.getWidth() / 2, this.getHeight() / 2);\n\t\t\t\tg2d.translate(-image.getWidth(null) / 2, -image.getHeight(null) / 2);\n\t\t\t\tg2d.drawImage(image, 0, 0, null);\n\t\t\t}", "@Override\r\n public void paintComponent(Graphics2D g) {\r\n g.drawImage(img, x, y, null);\r\n }", "public void drawImage() {\n mTextureRender.drawFrame(mSurfaceTexture);\n }", "private void drawBorder(Graphics2D g2, boolean enabled, int x, int y, int w, int h)\r\n/* 193: */ {\r\n/* 194:228 */ g2.setColor(enabled ? PlasticLookAndFeel.getControlDarkShadow() : MetalLookAndFeel.getControlDisabled());\r\n/* 195: */ \r\n/* 196: */ \r\n/* 197:231 */ g2.drawOval(x, y, w, h);\r\n/* 198: */ }", "public void draw(PApplet p){\n p.image(img, x, y, width, height);\n }", "public void render () {\n image (img, xC, yC, xLength * getPixelSize(), yLength * getPixelSize());\n }", "public void drawImage(Graphics gameImage){\n AffineTransform currRotation = AffineTransform.getTranslateInstance(x, y);\n currRotation.rotate(Math.toRadians(angle),this.objectImg.getWidth() / 2.0, this.objectImg.getHeight() /2.0);\n Graphics2D currImage = (Graphics2D) gameImage;\n currImage.drawImage(this.objectImg, currRotation, null);\n\n if(drawHitBox){\n gameImage.setColor(Color.GREEN);\n gameImage.drawRect(x,y,this.objectImg.getWidth(),this.objectImg.getHeight());\n }\n }", "public void paint(Graphics g){\n\n // Draw our Image object.\n\n \nimage = Toolkit.getDefaultToolkit().getImage(\"D:\\\\screenShot.jpg\");\n g.drawImage(image,i,j,k,l, this); // at location 50,10\n System.out.print(\"inside\");\n g.drawString(\"hello\",500,500);\n \n // 200 wide and high\n }", "@Override\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponents(g);\n\t\tg.drawImage(img, 0, 0, sizeX, sizeY, this);\n\t}", "public boolean drawImage(Image img, int x, int y, int width, int height,\r\n\t\t\tColor bgcolor, ImageObserver observer)\r\n\t{\r\n\t\t// System.out.println(\"drawImage\");\r\n\t\treturn false;\r\n\t}", "public Image drawOnImage(Mat binary, Mat image) {\n Raster binaryRaster = toBufferedImage(binary).getData();\n int radius = 6;\n int diameter = radius * 2;\n\n BufferedImage imageBI = toBufferedImage(image);\n int width = imageBI.getWidth();\n int height = imageBI.getHeight();\n Graphics2D g2d = (Graphics2D) imageBI.getGraphics();\n g2d.setColor(Color.WHITE);\n\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n int v = binaryRaster.getSample(x, y, 0);\n if (v == 0) {\n g2d.draw(new Ellipse2D.Double(x - radius, y - radius, diameter, diameter));\n }\n }\n }\n\n return imageBI;\n }", "@Override\n protected void paintBackground(Graphics2D g) {\n g.drawImage(image, 0, 0, this);\n }", "@Override\n\tpublic void draw(Graphics g) {\n\t\tthis.canvas.drawImage(g, this.image.getImage(), this.position.x, this.position.y);\n\t}", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\t\n\t\tg.drawImage(bi, 0, 0, this.getWidth(), this.getHeight(), null);\n\t}", "public void draw(Graphics g) {\n image.paintIcon(null, g, xPos, yPos);\n }", "@Override\n public void paint(Graphics g) {\n g.drawImage(imgFond.getImage(), 0, 0, getWidth(), getHeight(),this);\n setOpaque(false);\n super.paint(g);\n }", "public void draw() {\n \n // TODO\n }", "@Override\n\tpublic void draw(){\n\t\tif( HighGui.queryFrame(capture, im) ){\n\t\t\tbackground(70);\n\n\t\t\t// Draw it\n\t\t\timage(PUtils.getPImage(im), 0, 0);\n\n\t\t\tSmoothType type = SmoothType.CV_BLUR;\n\t\t\tif( r.value() != -1) type = SmoothType.values()[(int)r.value()-1];\n\n\t\t\tint size1 = (int)size1_slider.value();\n\t\t\tif( size1%2 == 0 ) size1++;\n\t\t\tint size2 = (int)size2_slider.value();\n\t\t\tif( size2%2 == 0 ) size2++;\n\n\t\t\tImgProc.smooth(im, im_smooth, type, size1, size2, param3_slider.value(), param4_slider.value());\n\t\t\timage(PUtils.getPImage(im_smooth), w, 0);\n\t\t}\n\t}", "@Override\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\n\t\t\tg.drawImage(photoImage, 10, 2, 110, 130, this);\t\t\n\t\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制矩形\");\n\t\t\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n if (this.backImg != null) {\n g.drawImage(backImg, 0, 0, null);\n }\n\n if (this.img != null) {\n int x = getWidth() / 2 - img.getWidth() / 2;\n int y = getHeight() / 2 - img.getHeight() / 2;\n g.drawImage(img, x, y, null);\n }\n\n }", "public void drawImage(float x, float y, float width, float height,\n\t\t\tColor color);", "@Override\n\t\tpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n\t\t\tsuper.paintBorder(c, g, x - 1, y, width + 5, height);\n\t\t}", "private void draw() {\n\tSurfaceHolder holder = getSurfaceHolder();\n\tCanvas canvas = null;\n\ttry {\n\t\tcanvas = holder.lockCanvas();\n\t\tif (canvas != null) {\n\t\t\tif (bitmap == null) {\n\t\t\t\tbitmap = iniBitmap(canvas.getWidth(), canvas.getHeight());\n\t\t\t}\n\t\t\tcanvas.drawBitmap(bitmap.getBitmap(), 0, 0, paint);\n\t\t}\n\t} finally {\n\t\tif (canvas != null) holder.unlockCanvasAndPost(canvas);\n\t}\n}", "@Override\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\n\t}", "public void paint(Graphics g)\r\n { \r\n g.drawImage(image, 0, 0, null); \r\n }", "public void paint() {\n BufferStrategy bs;\n bs = this.getBufferStrategy();\n\n Graphics g = bs.getDrawGraphics();\n g.drawImage(background, 0, 0, this.getWidth(), this.getHeight(), null);\n if (this.blackHoles != null) {\n for (BlackHole blackHole : this.blackHoles) {\n blackHole.paint(g);\n }\n }\n if (this.balls != null) {\n for (int i = 0; i <this.balls.size() ; i++) {\n this.balls.get(i).paint(g);\n }\n\n }\n\n bs.show();\n g.dispose();\n\n }", "public void Draw() {\n\t\timgIcon = new ImageIcon(imgUrl);\n\t}", "private void drawBackground() {\n g2.setColor(SquareRenderer.BLANK_CELL_COLOR);\n g2.fillRect(BORDER_SIZE, BORDER_SIZE, BOARD_SIZE, BOARD_SIZE);\n }", "@Override\n\tpublic void draw(Graphics g) {\n\n\t\tg.drawImage(MyImages.img_me, x, y, null);\n\t\t// g.drawRect(this.pos.x, this.pos.y, this.pos.width, this.pos.height);\n\t\t// this.pos.width+ rect_space_x, this.pos.height + rect_space_y);\n\n\t}", "private void paintTheImage() {\n SPainter bruhmoment = new SPainter(\"Kanizsa Square\" ,400,400);\n\n SCircle dot = new SCircle(75);\n paintBlueCircle(bruhmoment,dot);\n paintRedCircle(bruhmoment,dot);\n paintGreenCircles(bruhmoment,dot);\n\n SSquare square= new SSquare(200);\n paintWhiteSquare(bruhmoment,square);\n\n\n }", "@Override\n\tpublic void draw(Graphics2D g) {\n\t\tImage pic = Toolkit.getDefaultToolkit().getImage(\"Space.png\");\n g.drawImage(pic, x, y, width, height, null);\n\t\t\n\t}", "public void draw() {\r\n if(isVisible()) {\r\n Canvas canvas = Canvas.getCanvas();\r\n canvas.draw(this,getColor(),\r\n new Rectangle(\r\n (int)round(getXposition()),\r\n (int)round(getYposition()),\r\n (int)round(size),\r\n (int)round(size)));\r\n canvas.wait(10);\r\n }\r\n }", "public void draw() {\n\t\tif (fill) {\n\t\t\tapplet.noStroke();\n\t\t\tapplet.fill(color);\n\t\t} else {\n\t\t\tapplet.noFill();\n\t\t\tapplet.stroke(color);\n\t\t}\n\t\tapplet.rect(position.x, position.y, size.x, size.y);\n\t\tsliderButton.draw(new PVector(-10,0));\n\t}", "public void drawTheImage(Graphics g)\r\n\t{\r\n\t\tg.setColor(Color.BLACK);\r\n\t\tg.fillOval(theX, theY, 10,10);\r\n\t\ttheX+=velX;\r\n\t\ttheY+=velY;\r\n\t}", "@Override public void draw(){\n // this take care of applying all styles (colors/stroke)\n super.draw();\n // draw our shape\n pg.ellipseMode(PGraphics.CORNER); // TODO: make configurable\n pg.ellipse(0,0,getSize().x,getSize().y);\n }", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n drawImage(g);\n }", "public void paint(Graphics g){\r\n\t\tg.drawImage(img, arrowWidth / 2, 0, null);\r\n\t}", "public void paint(Graphics g){\r\n\t\tint top = 0;\r\n\t\tint bottom = getArrowHeight();\r\n\t\tint center = (int)(imageWidth * ((double)getValue()/255.0)) + arrowWidth/2;\r\n\t\tint left = center - arrowWidth / 2;\t\t\r\n\t\tint right = center + arrowWidth / 2;\t\t\r\n\t\tPolygon p = new Polygon();\r\n\t\t\r\n\t\tp.addPoint(left, top);\r\n\t\tp.addPoint(right, top);\r\n\t\tp.addPoint(center, bottom);\r\n\t\tg.clearRect(0, 0, imageWidth + arrowWidth, imageHeight + getArrowHeight());\r\n\t\tg.setColor(Color.black);\r\n\t\tg.fillPolygon(p);\r\n\t\tg.drawImage(img, arrowWidth / 2, getArrowHeight(), null);\r\n\t}", "public void draw(PApplet marker) {\n\t\tif (whiteSquares) {\n\t\t\tmarker.pushStyle();\n\t\t\tmarker.fill(255);\n\t\t\tmarker.rect(760, 460, 30, 30);\n\t\t\tif (!over)\n\t\t\t\tmarker.rect(10, 460, 30, 30);\n\t\t\tmarker.popStyle();\n\t\t}\n\t\t\n\t\t//show images\n\t\tmarker.image(helpIcon, help.x, help.y, help.width, help.height);\n\t\tif (!over)\n\t\t\tmarker.image(backIcon, back.x, back.y, back.width, back.height);\n\t}", "@Override\n public void paintComponent(Graphics g) {\n // Paint image on panel\n if (paint && image != null) {\n g.drawImage(image, 0, 0, this);\n } else {\n // Paint panel black\n g.setColor(Color.white);\n g.fillRect(0, 0, getWidth(), getHeight());\n }\n }", "public boolean drawImage(Image img, int x, int y, Color bgcolor,\r\n\t\t\tImageObserver observer)\r\n\t{\r\n\t\t// System.out.println(\"drawImage\");\r\n\t\treturn false;\r\n\t}", "public Bitmap addBorder(Bitmap bmp, int borderSize, int borderColor) {\n Bitmap bmpWithBorder = Bitmap.createBitmap(bmp.getWidth() + borderSize\n * 2, bmp.getHeight() + borderSize * 2, bmp.getConfig());\n Canvas canvas = new Canvas(bmpWithBorder);\n canvas.drawColor(borderColor);\n canvas.drawBitmap(bmp, borderSize, borderSize, null);\n return bmpWithBorder;\n }", "void render(Rectangle borders);", "@Override\n public final void paint(float delta) {\n game.graphics.drawImage(\n image,\n centerX - (width / 2),\n centerY - (height / 2),\n scale, 0);\n }", "@Override\n\t\tpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n\t\t\tsuper.paintBorder(c, g, x, y, width + 1, height);\n\t\t}", "public void paintComponent(Graphics g) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tif (image == null) return;\n\t\t\t((Graphics2D) g).setStroke(new BasicStroke(4)); // thick border\n\t\t\tcreatePieces();\n\t\t\t// Lay out the pieces in a matrix.\n\t\t\tint c = 0, r = 0;\n\t\t\tfor (int p = 0; p < order.size(); p++) {\n\t\t\t\t// Piece image.\n\t\t\t\tCvMat piece = pieces.get(order.get(p));\n\t\t\t\tg.drawImage(piece.asIplImage().getBufferedImage(), c * pieceWidth, r * pieceHeight, null);\n\t\t\t\t// Border (green if selected).\n\t\t\t\tif (p == selected) {\n\t\t\t\t\tg.setColor(Color.green);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t}\n\t\t\t\tg.drawRect(c * pieceWidth, r * pieceHeight, pieceWidth - 2, pieceHeight - 2);\n\t\t\t\t// Advance column, and maybe row.\n\t\t\t\tc++;\n\t\t\t\tif (c == pcols) {\n\t\t\t\t\tc = 0;\n\t\t\t\t\tr++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void draw() {\r\n\t\tif (active_)\r\n\t\t\tGlobals.getInstance().getCamera().drawImageOnHud(posx_, posy_, currentImage());\r\n\t}", "@Override\n\t\tprotected void paintComponent(Graphics g) {\n\t\t\tint width = getWidth();\n\t\t\tint height = getHeight();\n\t\t\tint x = (width - icon.getIconWidth()) / 2;\n\t\t\tint y = icon.getIconHeight() / 2;\n\t\t\tg.setColor(Color.darkGray);\n\t\t\tg.fillRect(0, 0, width, height);\n\t\t\ticon.paintIcon(this, g, x, y);\n\t\t}", "@Override\n\t\t\tpublic void paintControl(PaintEvent arg0) {\n\t\t\t\tgc.drawImage(background,0,0);\n\t\t\t}", "public void drawBorder(Graphics g, Shape s) {\r\n\t\tgraphics.setStroke(new BasicStroke(8f)); // set the surround size of the shape\r\n\t\tgraphics.setColor(Color.BLACK);\r\n\t\tgraphics.draw(s);\r\n\t}", "public boolean drawImage(Image img, int dx1, int dy1, int dx2, int dy2,\r\n\t\t\tint sx1, int sy1, int sx2, int sy2, Color bgcolor, ImageObserver observer)\r\n\t{\r\n\t\t// System.out.println(\"drawImage\");\r\n\t\treturn false;\r\n\t}", "protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawOval(0, 0, getSize().width-1, getSize().height-1);\n }", "protected void draw(GraphicsContext gc, Image img) {\n\t\tgc.drawImage(img, x, y, width, height);\n\t}", "public void draw(Graphics g) {\r\n\t\tGraphics2D g2d = (Graphics2D) g;\r\n\t\tg2d.setStroke(new BasicStroke((float) penWidth));\r\n\t\tg2d.setPaint(borderColor);\r\n\t\tif (width<height){\r\n\t\t\tg2d.drawPolygon(new int[]{p.x,p.x + (width / 2),p.x + width, p.x + (width/2)}, new int[] {p.y,p.y + (width/3),p.y,p.y + width},4);\r\n\t\t}else{\r\n\t\t\tg2d.drawPolygon(new int[]{p.x,p.x + (height/2),p.x + height, p.x + (height/2)}, new int[] {p.y,p.y+(height/3),p.y,p.y + height},4);\r\n\r\n\t\t}\r\n\t\tdrawHandles(g);\r\n\t}", "protected void paintComponentBorder(Graphics g) {\r\n int height = this.getHeight();\r\n int width = this.getWidth();\r\n Color c = g.getColor();\r\n g.setColor(getUiPrefs().getBorderColor());\r\n g.drawRoundRect(0, 0, width - 1, height - getInsets().bottom, 10, 10);\r\n g.setColor(c);\r\n }", "public OFImage apply(OFImage image)\r\n {\r\n int dist =image.getWidth()/20;\r\n //int ctr=0;\r\n \tGraphics g2d = image.createGraphics();\r\n g2d.fillRect(image.getWidth() ,image.getHeight(), image.getWidth(), image.getHeight());\r\n g2d.setColor(Color.BLACK);\r\n BasicStroke bs = new BasicStroke(dist);\r\n ((Graphics2D) g2d).setStroke(bs);\r\n for(int i=0;i<image.getWidth(); i+=2*dist){\r\n\r\n g2d.fillRect(i, 0, dist, image.getHeight());\r\n\r\n }\r\n\t\treturn image;\r\n\r\n \r\n }", "private void drawMe(Canvas canvas) {\n\n float halfNegative = mFullBlockSize*(1 - mDividerScale)/2;\n float borderLength = getWidth() - 2*halfNegative;\n float borderMargin = halfNegative + (1 - mBorderScale)*borderLength/2;\n\n// if(mDividerScale == 1 && mBorderScale == 1) {\n// canvas.drawPath(mBorderPath, mBorderPaint);\n// canvas.drawPath(mDividersPath, mDividerPaint);\n// } else {\n\n //left border\n canvas.drawLine(0, borderMargin, 0, mHeight - borderMargin, mBorderPaint);\n\n //right border\n canvas.drawLine(mWidth, borderMargin, mWidth, mHeight - borderMargin, mBorderPaint);\n\n //top border\n canvas.drawLine(borderMargin, 0, mWidth - borderMargin, 0, mBorderPaint);\n\n //bottom border\n canvas.drawLine(borderMargin, mHeight, mWidth - borderMargin, mHeight, mBorderPaint);\n\n\n for(int i = 0; i < mFieldSize; i++) {\n for(int j = 0; j < mFieldSize; j++) {\n if(i != 0)\n canvas.drawLine(mFullBlockSize*i, mFullBlockSize*j + halfNegative, mFullBlockSize*i, mFullBlockSize*(j + 1) - halfNegative, mDividerPaint);\n if(j != 0)\n canvas.drawLine(mFullBlockSize*i + halfNegative, mFullBlockSize*j, mFullBlockSize*(i + 1) - halfNegative, mFullBlockSize*j, mDividerPaint);\n }\n }\n// }\n\n\n float radius = (mFullBlockSize - halfNegative*2)*mTileRadiusRatio;\n for(int i = 0; i < mTiles.size(); i++) {\n Tile tile = mTiles.get(i);\n\n canvas.save();\n canvas.translate(tile.x + halfNegative, tile.y + halfNegative);\n\n if(tile.scale != 1) {\n canvas.scale(tile.scale, tile.scale, realTileSize()/2, realTileSize()/2);\n }\n\n mTilePaint.setColor(mColorMap.get(tile.number));\n mTextPaint.setColor(mColorMap.get(tile.number));\n\n canvas.save();\n if(tile.borderRotation + tile.rotation != 0 && tile.borderRotation + tile.rotation != 360) {\n canvas.rotate(tile.borderRotation + tile.rotation, realTileSize()/2, realTileSize()/2);\n }\n\n// canvas.drawPath(mBaseTilePath, mTilePaint);\n canvas.drawRoundRect(0, 0, realTileSize(), realTileSize(),\n radius, radius, mTilePaint);\n\n canvas.restore();\n\n if(tile.rotation != 0 && tile.rotation != 360) {\n canvas.rotate(tile.rotation, realTileSize()/2, realTileSize()/2);\n }\n\n String text = String.valueOf(tile.number);\n\n TextConfig config = mTextConfigs[text.length() - 1];\n\n config.paint.setColor(mColorMap.get(tile.number));\n\n float textWidth = config.paint.measureText(text);\n\n\n canvas.translate(0, config.yOffset);\n//\n canvas.drawText(text, ((float) mFullBlockSize - 2*halfNegative)/2f - textWidth/2 - 1, 0, config.paint);\n\n canvas.restore();\n\n }\n\n\n // canvas.restore();\n\n\n }", "protected void paintBorder(Graphics g) {\n super.paintComponent(g);\n\n\n g.setColor(country.getCont().getContColor());\n g.fillRoundRect(innerDiameter,innerDiameter,width-2*innerDiameter, height-2*innerDiameter,0,0);\n g.setColor(country.getOwner().getPlayerColor());\n g.fillOval(innerDiameter, innerDiameter, getSize().width-2*innerDiameter, getSize().height-2*innerDiameter);\n\n g.setColor(Color.BLACK);\n g.setFont(new Font(\"default\", Font.BOLD, 14));\n\n g.drawString(\"\"+country.getArmy(),20,20);\n }", "public void draw() {\n final int columns = (int) (2 * Math.ceil(Math.max(-minx, maxx)));\n final int rows = (int) (2 * Math.ceil(Math.max(-miny, maxy)));\n\n final int drawColumns;\n final int drawRows;\n drawColumns = drawRows = Math.max(columns, rows);\n\n double leftOffsetPx = BORDER;\n double rightOffsetPx = BORDER;\n double topOffsetPx = BORDER;\n double bottomOffsetPx = BORDER;\n\n final double availableWidth = view.getWidth() - leftOffsetPx - rightOffsetPx;\n final double availableHeight = view.getHeight() - topOffsetPx - bottomOffsetPx;\n\n final double drawWidth;\n final double drawHeight;\n drawWidth = drawHeight = Math.min(availableWidth, availableHeight);\n\n leftOffsetPx = rightOffsetPx = (view.getWidth() - drawWidth) / 2;\n topOffsetPx = bottomOffsetPx = (view.getHeight() - drawHeight) / 2;\n\n // Adjust for aspect ratio\n columnWidth = rowHeight = drawHeight / columns;\n\n centerX = (drawColumns / 2.0) * columnWidth + leftOffsetPx;\n centerY = (drawRows / 2.0) * rowHeight + topOffsetPx;\n\n drawVerticalLine((float) centerX, topOffsetPx, bottomOffsetPx);\n drawHorizontalLine((float) centerY, leftOffsetPx, rightOffsetPx);\n\n int yTick = (int) (-drawRows / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (yTick <= drawRows / 2.0) {\n if (yTick != 0) {\n final String label = yTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", yTick) : null;\n drawYTick(-yTick * rowHeight + centerY, centerX, label);\n }\n yTick += TICK_INTERVAL;\n }\n\n int xTick = (int) (-drawColumns / 2.0 / TICK_INTERVAL) * TICK_INTERVAL;\n while (xTick <= drawColumns / 2.0) {\n if (xTick != 0) {\n final String label = xTick % (TICK_INTERVAL * 2) == 0 ? String.format(\"%d\", xTick) : null;\n drawXTick(xTick * columnWidth + centerX, centerY, label);\n }\n xTick += TICK_INTERVAL;\n }\n\n double adaptiveTextSize = getAdaptiveTextSize();\n\n final Paint paint = new Paint();\n final float textSize = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, (float)adaptiveTextSize, view.getResources().getDisplayMetrics());\n paint.setTextSize(textSize);\n paint.setTypeface(Typeface.create(Typeface.MONOSPACE, Typeface.NORMAL));\n for (Entry entry : data.getEntries()) {\n final double x = entry.getX();\n final double y = entry.getY();\n\n final double xDraw = x * columnWidth + centerX;\n final double yDraw = -y * rowHeight + centerY;\n\n CharSequence dispStr = entry.getStringLabel();\n if (dispStr == null) {\n dispStr = String.format(\"%.0f\", entry.getValue());\n }\n\n\n\n\n Rect bounds = getTextRectBounds(dispStr, paint);\n int textHeight = bounds.height();\n int textWidth = bounds.width();\n canvas.drawText(dispStr, 0, dispStr.length(),\n (float) xDraw - textWidth * 0.5f, (float) yDraw + textHeight * 0.5f,\n paint);\n }\n\n }", "private void drawStuff() {\n //Toolkit.getDefaultToolkit().sync();\n g = bf.getDrawGraphics();\n bf.show();\n Image background = window.getBackg();\n try {\n g.drawImage(background, 4, 24, this);\n\n for(i=12; i<264; i++) {\n cellKind = matrix[i];\n\n if(cellKind > 0)\n g.drawImage(tile[cellKind], (i%12)*23-3, (i/12)*23+17, this);\n }\n\n drawPiece(piece);\n drawNextPiece(pieceKind2);\n\n g.setColor(Color.WHITE);\n g.drawString(\"\" + (level+1), 303, 259);\n g.drawString(\"\" + score, 303, 339);\n g.drawString(\"\" + lines, 303, 429);\n\n } finally {bf.show(); g.dispose();}\n }", "@Override\n public void paintComponent(Graphics g) {\n Graphics2D g2 = (Graphics2D) g;\n g2.setStroke(new BasicStroke(WALL));\n int[] xs = {BORDER + WALL, BORDER, BORDER, BORDER + (width-1)*SIZE + WALL};\n int[] ys = {BORDER, BORDER, BORDER + height*SIZE, BORDER + height*SIZE};\n g2.drawPolyline(xs, ys, 4);\n int[] xs2 = {BORDER + SIZE - WALL, BORDER + width*SIZE, BORDER + width*SIZE, BORDER + width*SIZE - WALL};\n g2.drawPolyline(xs2, ys, 4);\n // code that was used to create the intermediate images\n// g2.setColor(Color.LIGHT_GRAY);\n// for(int i = 1; i < height; i++) {\n// int where = BORDER + i*SIZE;\n// g2.drawLine(BORDER + WALL, where, BORDER + width * SIZE - WALL, where);\n// }\n// for(int i = 1; i < width; i++) {\n// int where = BORDER + i*SIZE;\n// g2.drawLine(where, BORDER + WALL, where, BORDER + height * SIZE - WALL);\n// }\n g2.setColor(Color.blue);\n for(Wall wall : walls) {\n drawWall(g2, wall);\n }\n }", "public void draw(Canvas canvas)\n {\n if(img==null) {return;}\n canvas.drawBitmap(img.getBitmap(), x, y, null);\n }", "@Override\r\n\tpublic void paintComponent (Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawImage(background, 0, 0, 800, 660, null);\r\n\t}", "private void dragPaint() {\n\n\t\t//buffer die image ooit\n\t\tinvalidate();\n\t\trepaint();\n\t}", "public void drawImageCentered(float x, float y, float width, float height);", "public void draw(){\n\t\t/* Stamps a copy of the planet at the position. the file of the planet image is under folder of \"images\".\n\t\t * a mistake easily to be ignored here..*/\n\t\tString imageToDraw = \"images/\" + imgFileName;\n\t\tStdDraw.picture(xxPos, yyPos, imageToDraw);\n\n\t}", "public void draw(Graphics window)\n {\n window.setColor(color);\n window.fillRect(getX(), getY(), getWidth(), getHeight());\n }", "protected void drawTitle(){\n titleBox = new Rectangle(155,380, 490, 200);\n titleBorder = new Rectangle(150, 375, 500, 210);\n titleBorder.setFillColor(pink);\n titleBorder.setFilled(true);\n titleBox.setFillColor(Color.BLACK);\n titleBox.setFilled(true);\n title = new Image(206, 400, \"124-hw4/BreakoutText/breakoutText.png\");\n\n canvas.add(titleBorder);\n canvas.add(titleBox);\n canvas.add(title);\n }", "@Override\n\tpublic void draw(Canvas game) {\n\t\tGraphicsContext gc = game.getGraphicsContext2D();\n\t\tgc.drawImage(image, posX, Y_LAND - image.getHeight());\n\t\t\n\t}" ]
[ "0.74285966", "0.6978348", "0.67234933", "0.6569498", "0.65264046", "0.6491752", "0.6457904", "0.6456192", "0.6420626", "0.6367051", "0.631931", "0.63074565", "0.6297087", "0.6266909", "0.62623835", "0.6260337", "0.6250485", "0.6242693", "0.6196692", "0.61924106", "0.61866754", "0.6181639", "0.61563087", "0.6148803", "0.6124973", "0.6112649", "0.60739905", "0.6028643", "0.5999459", "0.5990231", "0.5990076", "0.5981165", "0.5951456", "0.5950281", "0.59492004", "0.59420866", "0.59407306", "0.59291995", "0.5921521", "0.5909473", "0.59043074", "0.5903984", "0.5895111", "0.5855109", "0.58517563", "0.5825203", "0.58157486", "0.58136934", "0.57751673", "0.57682925", "0.5761034", "0.57608193", "0.5750106", "0.57496774", "0.5742029", "0.57408243", "0.57341003", "0.57336175", "0.57314265", "0.5715567", "0.5712507", "0.5709338", "0.57040155", "0.57036304", "0.5702931", "0.5701534", "0.5699743", "0.56918716", "0.5690433", "0.56779397", "0.56735224", "0.56729627", "0.5672257", "0.5662819", "0.5662694", "0.566204", "0.5659848", "0.56597453", "0.5651724", "0.56381285", "0.5638087", "0.5630263", "0.5620937", "0.561953", "0.5609066", "0.5604195", "0.56040436", "0.5601876", "0.5599722", "0.55973583", "0.5596788", "0.55910766", "0.55820477", "0.5571553", "0.5570809", "0.5569561", "0.5566816", "0.5563603", "0.555557", "0.5551297" ]
0.58901656
43
TODO Autogenerated method stub
public static void main(String[] args) { String[] strs = {"abc","cba","aaa","aas","saa"}; System.out.println(anagrams(strs)); }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
/ Sources: DND: Elevator: Flap: Aileron: Rudder: See ailerons Slat: Spoiler:
public void startup() { neutral(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String sourceHelp() {\n\treturn\n\" sf@HOSTNAME:PORTNUMBER - a serial forwarder\\n\" +\n\" serial@SERIALPORT:BAUDRATE - a mote connected to a serial port\\n\" +\n\" (using TOSBase protocol)\\n\" +\n\" network@HOSTNAME:PORTNUMBER - a mote whose serial port is accessed over\\n\" +\n\" the network (using TOSBase protocol)\\n\" +\n\" old-serial@SERIALPORT[:BAUDRATE][,PACKET-SIZE]\\n\" +\n\" - a mote connected to a serial port\\n\" +\n\" (old, broken protocol - avoid if possible)\\n\" +\n\" old-network@HOSTNAME:PORTNUMBER[,PACKET-SIZE]\\n\" +\n\" - a mote whose serial port is accessed over\\n\" +\n\" the network (old, broken protocol)\\n\" +\n\" dummy - a packet sink and dummy-packet source\\n\" +\n\" tossim-serial[@HOSTNAME] - the serial port of tossim node 0\\n\"+\n\" tossim-radio[@HOSTNAME] - the radios of tossim nodes\\n\"+\n\"where BAUDRATE can be a specific baud rate or a mote model name\\n\"+\n\"(e.g., mica2 or mica2dot). Specifying a mote model name picks the standard\\n\"+\n\"baud-rate for that mote. PACKET-SIZE is the packet-size (default 36) for\\n\"+\n\"old, broken protocols.\\n\" +\n\"Examples: serial@COM1:mica2, serial@COM2:19200, sf@localhost:9000\";\n }", "public String[] obtainStops() {\n\n String[] stopsNone = { \"No stops found\" };\n String[] stopsArbutus = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Hilltop Cir. & Hilltop Rd.\", \"Hilltop Cir. & Walker Ave.\", \"Hilltop Cir. & Center Rd.\", \"Poplar Ave. & Stadium Lot\", \"TRC @ Linden Ave\", \"Westland Blvd. & Circle Dr.\", \"Westland Blvd. & Courtney Rd.\", \"Maiden Choice La. & Westland Blvd\", \"Maiden Choice La. & Warren Tree\", \"Maiden Choice La. & Wilkens Ave\", \"Maiden Choice La. & Grouse Ct\", \"Maiden Choice La. & Symmington Aven.\"};\n String[] stopsArundel = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"BWI Marc Station\", \"Arundel Mills Mall Visitor Entrace #5\", \"BWI Marc Station\", \"Administration Dr. Bus Shelter\", \"Hilltop Circle & Hilltop Rd.\" };\n String[] stopsCatonsville = { \"Commons Dr. & Park Rd.\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Administration Dr. Bus Shelter\", \"Rolling Rd @YMCA\", \"Rolling Rd @Valley Rd (CCBC)\", \"Catonsville High @Bloomsbury Ave\", \"Mellor Ave & Bloomsbury Ave\" };\n String[] stopsDowntownA = { \"Commons Dr. & Park Rd\", \"Park Rd. & Poplar Ave.\", \"Hilltop Cir. & Commons Dr.\", \"Greyhound Station @ Haines\",\"MLK Blvd & Pratt St (UMB)\", \"Green St & Fayette St\", \"Green St & Lombard St (UMB)\" };\n\n if ( this.longName.toLowerCase().contains(\"Arbutus\".toLowerCase()) ) {\n return stopsArbutus;\n }\n if ( this.longName.contains(\"Arundel\") ) {\n return stopsArundel;\n }\n if ( this.longName.contains(\"Catonsville\") ) {\n return stopsCatonsville;\n }\n if ( this.longName.contains(\"Downtown\") ) {\n return stopsDowntownA;\n }\n\n return stopsNone;\n\n }", "public\tElevator(){\t\t\t\t\t\t\n\t\tcurrentFloor = 1;\n\t\tcurrentDirection = \"UP\";\n\t\ttotalPassengers = 0;\n\t\ttotalPassDestFloor = new int[8];\n\t\tdestRequest = new char[8];\n\t\t \n\t}", "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}", "public void makeOfferRouteStata() {\n\t\tlog(String.format(\"Making DEBUG Offer for Vassar-1\"));\n\n\t\tResRequest res = new ResRequest(mId, ResRequest.RES_GET, \"Stata-1\");\n\t\tres = new ResRequest(mId, ResRequest.RES_GET, \"Stata-1\");\n\t\tres.done = true;\n\t\tres.completed = getTime();\n\t\tres.tokenString = \"DEBUG\";\n\t\tres.signature = \"DEBUG\";\n\t\tres.issued = getTime();\n\t\tres.expires = getTime() + 30 * 60 * 1000;\n\t\tres.hardDeadline = res.completed\n\t\t\t\t+ Globals.REQUEST_DIRECT_PUT_DEADLINE_FROM_NOW;\n\t\tthis.offers.add(res);\n\n\t\tlog(String.format(\"Added to offers: %s\", res.regionId));\n\t}", "public void getInfo () {\n int[] info = elevator.getInfo ();\n currFloor = info[0];\n maxCap = info[2];\n numFloors = info[3];\n currCap = info[5];\n state = info[6];\n }", "private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}", "public String toString(){\n\tString sourceName;\n\tString destinationName;\n\t// its possible the wire has no source gate so this avoids null\n\t// pointer errors\n\tif( source == null){\n\t sourceName = \"No wire source\";\n\t} else {\n\t sourceName = this.source.name;\n\t}\n\t// provides the same check for destination gates\n\tif( destination == null ){\n\t destinationName = \"No wire destination\";\n\t} else {\n\t destinationName = this.destination.name;\n\t}\n\treturn \"Wire \" + sourceName + \" \"+ srcPin + \" \" +\n\t\tdestinationName + \" \" + \" \" + dstPin\n\t\t+ \" \" + delay;\n }", "private void buildMovementData(File crinkleViewerFile) {\n\t\t// read from a file\n\t\tScanner sc;\n\t\ttry {\n\t\t\tsc = new Scanner(crinkleViewerFile);\n\t\t\twhile (sc.hasNextLine()) {\n\t\t\t\trecieve(sc.nextLine());\n\t\t\t}\n\t\t\tsc.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "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}", "public void makeReservationRouteStata() {\n\t\tlog(String.format(\"Making DEBUG ResRequest for Stata-1\"));\n\t\tmakeRequest(new ResRequest(mId, ResRequest.RES_GET, \"Stata-1\"));\n\t}", "public static void builConnectionTable()\r\n\t{\r\n\t\tScanner scan = new Scanner(System.in); \r\n\t\tSystem.out.print(\"\\nPlease enter the Source node to build connection: \");\r\n\t\tint src = scan.nextInt() - 1;\r\n\t\twhile(src < 0 || src > routers-1)\r\n {\r\n\t\t\tSystem.out.println(\"The entered source node is out of range, please enter again: \"); // Printing error\r\n\t\t\tsrc = scan.nextInt() - 1;\t//re-input source\r\n\t\t}\r\n\t\t\r\n\t\tconnectNetwork(src, -1, true);\r\n\t}", "private void m5095a(DrivingRoutePlanOption drivingRoutePlanOption) {\n this.a.m5234a(\"qt\", \"cars\");\n this.a.m5234a(\"sy\", drivingRoutePlanOption.mPolicy.getInt() + \"\");\n this.a.m5234a(\"ie\", \"utf-8\");\n this.a.m5234a(\"lrn\", \"20\");\n this.a.m5234a(MapboxEvent.ATTRIBUTE_VERSION, \"6\");\n this.a.m5234a(\"extinfo\", ANSIConstants.GREEN_FG);\n this.a.m5234a(\"mrs\", C0844a.f2048d);\n this.a.m5234a(\"rp_format\", \"json\");\n this.a.m5234a(\"rp_filter\", \"mobile\");\n this.a.m5234a(\"sn\", m4541a(drivingRoutePlanOption.mFrom));\n this.a.m5234a(\"en\", m4541a(drivingRoutePlanOption.mTo));\n if (drivingRoutePlanOption.mCityName != null) {\n this.a.m5234a(\"c\", drivingRoutePlanOption.mCityName);\n }\n if (drivingRoutePlanOption.mFrom != null) {\n this.a.m5234a(\"sc\", drivingRoutePlanOption.mFrom.getCity());\n }\n if (drivingRoutePlanOption.mTo != null) {\n this.a.m5234a(\"ec\", drivingRoutePlanOption.mTo.getCity());\n }\n List list = drivingRoutePlanOption.mWayPoints;\n String str = new String();\n String str2 = new String();\n if (list != null) {\n String str3 = str;\n str = str2;\n for (int i = 0; i < list.size(); i++) {\n PlanNode planNode = (PlanNode) list.get(i);\n if (planNode != null) {\n str3 = str3 + m4541a(planNode);\n str = str + planNode.getCity();\n if (i != list.size() - 1) {\n str3 = str3 + \"|\";\n str = str + \"|\";\n }\n }\n }\n this.a.m5234a(\"wp\", str3);\n this.a.m5234a(\"wpc\", str);\n }\n }", "public String toString() {\n\treturn \"gate \" + name + \" or \" + delay;\n }", "@Override\n\tpublic String getLog() {\n\t\t\n\t\tString cartelSightings = \"\";\n\t\t\n\t\tfor (Sighting sight: sightings) {\n\t\t\tcartelSightings += sight.getLocation();\n\t\t\tcartelSightings += \" (\" + sight.getDetails() + \")\\n\";\n\t\t}\n\t\treturn cartelSightings;\n\t}", "private void buildBS60Url() {\n url = \"http://q.lizone.net/index/index/BSline/res/60/label/\" + dataItem.label;//API 2.0\n }", "private String viewListOfStops() {\n StringBuilder result = new StringBuilder();\n for (TTC stops : this.listOfStops) {\n result.append(stops.toString());\n result.append(\" -> \");\n }\n return (result.toString()).substring(0, result.length() - 2);\n }", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "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 }", "public static String parseSingleRoute(ILogicEntityRoute r) {\n\n StringBuilder routeSB = new StringBuilder();\n\n // Add the ResourceDepotReport\n Optional<IResourceDepot> startDepotOpt = r.getCurrentVisitingResource().getResourceDepot();\n\n if (startDepotOpt.isPresent()) {\n routeSB.append(\n \"\\n------- ResourceDepot Report (\" + r.getCurrentVisitingResource().getId() + \")-------\");\n IResourceDepot depot = startDepotOpt.get();\n routeSB.append(\"\\nSTART:\");\n routeSB.append(\"\\n---\");\n routeSB.append(\"\\n\" + PNDReportExtractionExample.parseResourceDepot(depot));\n\n Optional<IResourceDepot> stopDepotOpt = r.getJoinedDetailController().getCurResourceDepot();\n if (stopDepotOpt.isPresent()) {\n IResourceDepot stopDepot = stopDepotOpt.get();\n\n routeSB.append(\"\\n\\nTERMINATION:\");\n routeSB.append(\"\\n---\");\n routeSB.append(\"\\n\" + PNDReportExtractionExample.parseResourceDepot(stopDepot));\n }\n routeSB.append(\"\\n------- ResourceDepot Report END -------\");\n }\n\n // Now add the NodeDepotReports\n List<ILogicRouteElementDetailItem> details =\n r.getRouteElementsDetailController().getAsSortedListByArrival();\n\n details.stream().map(PNDReportExtractionExample::parseNodeDetail).forEach(routeSB::append);\n\n return routeSB.toString();\n }", "public void roadList(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(i + \" \" + roads.get(i).start.getCityName() + \", \" + roads.get(i).end.getCityName());\n }\n }", "private String getEndLocationTitle(DirectionsResult results)\n {\n return \"Time :\"+ results.routes[overview].legs[overview].duration.humanReadable + \" Distance :\" + results.routes[overview].legs[overview].distance.humanReadable;\n }", "public void availableTrains(int type, String source, String destination) {\n\n\t\tint i = 0, temp = 0;\n\n\t\tif (type == 1) {\n\n\t\t\tIterator<PassengerTrain> itr = TrainDetails.passengerList\n\t\t\t\t\t.iterator();// For passenger train\n\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tPassengerTrain passenger = itr.next();\n\n\t\t\t\tif (source.equalsIgnoreCase(passenger.getFromPlace())\n\t\t\t\t\t\t&& destination.equalsIgnoreCase(passenger.getToPlace())) {\n\t\t\t\t\ttemp = temp + 1;\n\t\t\t\t\tSystem.out.println(temp);\n\n\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"TRAINID\t\tSOURCE \t\tDESTINATION\tDURATION\tSEATS\t PRICE\");\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(passenger.getTrainId() + \"\t\t \"\n\t\t\t\t\t\t\t+ passenger.getFromPlace() + \"\t\t \"\n\t\t\t\t\t\t\t+ passenger.getToPlace() + \" \t\t\"\n\t\t\t\t\t\t\t+ passenger.getDuration() + \" \t\t\"\n\t\t\t\t\t\t\t+ passenger.getSeats() + \" \t\t\"\n\t\t\t\t\t\t\t+ passenger.getPrice());\n\n\t\t\t\t}\n\n\t\t\t\tif (temp == 0) {\n\t\t\t\t\tSystem.out.println(\"No such trains.Try Another\");\n\t\t\t\t\tTrainMenu menu1 = new TrainMenu();\n\t\t\t\t\tmenu1.menu();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\telse {// For goods train\n\t\t\tIterator<GoodsTrain> itr = TrainDetails.goodsList.iterator();\n\t\t\twhile (itr.hasNext()) {\n\t\t\t\tGoodsTrain goods = itr.next();\n\t\t\t\tif (source.equalsIgnoreCase(goods.getFromPlace())\n\t\t\t\t\t\t&& destination.equalsIgnoreCase(goods.getToPlace())) {\n\t\t\t\t\ttemp = temp + 1;\n\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Train Number \tSOURCE \t\tDESTINATION\t\tTIME\t\tWEIGHT\t\tPRICE\");\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(goods.getTrainId() + \"\t\t \"\n\t\t\t\t\t\t\t+ goods.getFromPlace() + \"\t\t \" + goods.getToPlace()\n\t\t\t\t\t\t\t+ \" \t\t\" + goods.getDuration() + \" \t\t\"\n\t\t\t\t\t\t\t+ goods.getWeight() + \" \t\t\" + goods.getPrice());\n\n\t\t\t\t}\n\n\t\t\t\tif (temp == 0) {\n\t\t\t\t\tSystem.out.println(\"No such trains.Try another\");\n\t\t\t\t\tTrainMenu menu1 = new TrainMenu();\n\t\t\t\t\tmenu1.menu();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tprotected String[] getSpecificLines() {\r\n\t\tString[] lines = new String[4];\r\n\t\tlines[0] = \"\";\r\n\t\tif (items.toString().lastIndexOf('_') < 0) {\r\n\t\t\tlines[1] = items.toString();\r\n\t\t\tlines[2] = \"\";\r\n\t\t} else {\r\n\t\t\tlines[1] = items.toString().substring(0, items.toString().lastIndexOf('_'));\r\n\t\t\tlines[2] = items.toString().substring(items.toString().lastIndexOf('_') + 1);\r\n\t\t}\r\n\t\tlines[3] = String.valueOf(cost);\r\n\t\treturn lines;\r\n\t}", "public String getCustomersInElevatorString();", "private String print_Menu()\n\t{\n\t\tSystem.out.println(\"\\n----------CS542 Link State Routing Simulator----------\");\n\t\tSystem.out.println(\"(1) Create a Network Topology\");\n\t\tSystem.out.println(\"(2) Build a Forward Table\");\n\t\tSystem.out.println(\"(3) Shortest Path to Destination Router\");\n\t\tSystem.out.println(\"(4) Modify a Topology (Change the status of the Router)\");\n\t\tSystem.out.println(\"(5) Best Router for Broadcast\");\n\t\tSystem.out.println(\"(6) Exit\");\n\t\tSystem.out.print(\"Master Command: \");\n\n\t\treturn scan.next();\n\t}", "public void setupArrivals() {\n \t\tmRdsArray = Data.getAllRdsWithStopTitle(mStopTitle, mRouteTag,\n \t\t\t\tmDirectionTag);\n \n \t\tarrivalList.setAdapter(new ArrivalAdapter(getApplicationContext(),\n \t\t\t\tmRdsArray));\n \n \t\tarrivalList.setOnItemClickListener(null);\n \t\t/*\n \t\t * Listener for arrival drawer thing. If a cell is clicked, open the\n \t\t * stop for that route\n \t\t */\n \t\tarrivalList.setOnItemClickListener(new OnItemClickListener() {\n \t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n \t\t\t\t\tint position, long id) {\n \t\t\t\tif (!mArrivalsArray[0].equals(\"No other arrivals\")) {\n \t\t\t\t\tRouteDirectionStop rds = mRdsArray[position];\n \t\t\t\t\tIntent intent = StopViewActivity.createIntent(\n \t\t\t\t\t\t\tgetApplicationContext(), rds.route.tag,\n \t\t\t\t\t\t\trds.direction, rds.stop);\n \t\t\t\t\tstartActivity(intent);\n \t\t\t\t}\n \t\t\t}\n \t\t});\n \n \t}", "private void doPinNames() {\n final String RESERVED = \"Reserved\";\n\n if (donePinNames) {\n return;\n }\n donePinNames = true;\n StringBuilder sb = new StringBuilder();\n sb.append(\n \"/**\\n\"+\n \" * LLWU pin sources\\n\"+\n \" */\\n\"+\n \"enum LlwuPin : uint32_t {\\n\"\n );\n InfoTable pinTable = getPeripheral().getSignalTables().get(0);\n for (int index=0; index<32; index++) {\n String choiceName = \"llwu_pe\"+((index/4)+1)+\"_wupe\"+index;\n ChoiceVariable choiceVar = safeGetChoiceVariable(choiceName);\n if (choiceVar == null) {\n continue;\n }\n String llwuPinName;\n if (index>=pinTable.table.size()) {\n // Pin not in table (doesn't exist)\n choiceVar.enable(false);\n llwuPinName = RESERVED;\n }\n else {\n // Look up possible pin mapping in table\n Signal signal = pinTable.table.elementAt(index);\n Pin mappablePin = null;\n if (signal != null) {\n TreeSet<MappingInfo> pinMappings = signal.getPinMapping();\n for (MappingInfo pinMapping:pinMappings) {\n if (pinMapping.getMux() == MuxSelection.mux1) {\n mappablePin = pinMapping.getPin();\n }\n }\n }\n if (mappablePin == null) {\n // No mappable pin\n choiceVar.enable(false);\n llwuPinName = RESERVED;\n }\n else {\n // Mappable pin\n choiceVar.enable(true);\n llwuPinName = mappablePin.getName();\n }\n }\n if (llwuPinName != RESERVED) {\n String llwuPinLine = String.format(\n \" LlwuPin_%-15s = %2d, //!< Wake-up pin LLWU_P%d\\n\", \n capitalCase(llwuPinName), index, index); \n sb.append(llwuPinLine);\n }\n choiceVar.setDescription(choiceVar.getDescription() + \" - \"+llwuPinName);\n }\n sb.append(\"};\\n\\n\");\n StringVariable llwuPinsVar = new StringVariable(\"LlwuPins\", getPeripheral().makeKey(\"LlwuPins\"));\n llwuPinsVar.setValue(sb.toString());\n llwuPinsVar.setDerived(true);\n getPeripheral().addVariable(llwuPinsVar);\n\n sb = new StringBuilder();\n sb.append(\n \"/**\\n\"+\n \" * LLWU peripheral sources\\n\"+\n \" */\\n\"+\n \"enum LlwuPeripheral : uint32_t {\\n\"\n );\n for (int index=0; index<=7; index++) {\n String choiceName = \"llwu_me_wume\"+index;\n BooleanVariable choiceVar = safeGetBooleanVariable(choiceName);\n String llwuPeripheralName;\n if (choiceVar != null) {\n llwuPeripheralName = choiceVar.getDescription();\n String llwuPeripheralLine = String.format(\n \" LlwuPeripheral_%-15s = (1<<%d), //!< Wake-up peripheral LLWU_M%dIF\\n\", \n capitalCase(llwuPeripheralName), index, index\n );\n sb.append(llwuPeripheralLine);\n }\n }\n sb.append(\"};\\n\\n\");\n StringVariable llwuPeripheralsVar = new StringVariable(\"LlwuPeripherals\", getPeripheral().makeKey(\"LlwuPeripherals\"));\n llwuPeripheralsVar.setValue(sb.toString());\n llwuPeripheralsVar.setDerived(true);\n getPeripheral().addVariable(llwuPeripheralsVar);\n }", "private void buildWordTable(Scanner source)\n {\n int linenum = 0;\n String currentline = \"\";\n String[] splitsent;\n //Scans file line by line\n while(source.hasNextLine())\n {\n //line number of the file\n linenum++;\n //reads the current line of the file\n currentline = source.nextLine();\n //replaces all punctions to \"\" so the file doesnt read it\n currentline = currentline.replace(\",\", \"\");\n currentline = currentline.replace(\".\", \"\");\n currentline = currentline.replace(\";\", \"\");\n currentline = currentline.replace(\":\", \"\");\n currentline = currentline.replace(\"?\", \"\");\n currentline = currentline.replace(\"!\", \"\");\n //split the line into an array whereever there is a space\n splitsent = currentline.split(\" \");\n for(String run : splitsent)\n {\n update(run,linenum);\n }\n }\n }", "public String toString() {\n\treturn \"gate \" + name + \" and \" + delay;\n }", "private static String formVehicleId(Point source) {\n\t\treturn \"V{\"+ source.getX() + \",\" + source.getY() + \"}\";\n\t}", "public String toShortString() {\n LogBuilder lb = new LogBuilder(32);\n lb.add(getModeString(), \" \", transportable);\n Location lt = getTransportTarget();\n lb.add(\" @ \", ((lt == null) ? \"null\" : lt.toShortString()));\n Location ct = getCarrierTarget();\n if (ct != lt) lb.add(\"/\", ct.toShortString());\n return lb.toString();\n }", "@Override\n public String toString(){\n return \"|Lege navn: \"+legeNavn+\" |Kon.ID: \"+konID+\"|\";\n }", "public static void sapContent(int sapPathway) {\r\n System.out.println(\"Random SAP stuff :D.\");\r\n }", "String getMovementComments();", "private static void convertLeadLines(String... params) {\n // Set menu for the new Opportunity creation\n if (params.length == 0) {\n setMenuLines(\"\", 1, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21);\n setMenuLines(HIGHLIGHT_COLOR + \"Create New Opportunity\" + HIGHLIGHT_COLOR, 4);\n setMenuLines(\"Product: \", 6);\n setMenuLines(\"Quantity: \", 8);\n setMenuLines(HIGHLIGHT_COLOR + \"Insert Product type [HYBRID, FLATBED or BOX]: \" + HIGHLIGHT_COLOR, 20);\n // Update the menu for the lead conversion\n } else if (params.length == 2) {\n switch (params[0].toLowerCase()) {\n case \"product\":\n setMenuLines(getMenuLine(6) + INSERT_HIGHLIGHT_COLOR + params[1] + ANSI_RESET, 6);\n setMenuLines(HIGHLIGHT_COLOR + \"Insert Quantity: \" + HIGHLIGHT_COLOR, 20);\n break;\n case \"industry\":\n setMenuLines(getMenuLine(6) + INSERT_HIGHLIGHT_COLOR + params[1] + ANSI_RESET, 6);\n setMenuLines(HIGHLIGHT_COLOR + \"Insert Employee Count: \" + HIGHLIGHT_COLOR, 20);\n break;\n case \"employees\":\n setMenuLines(getMenuLine(8) + INSERT_HIGHLIGHT_COLOR + params[1] + ANSI_RESET, 8);\n setMenuLines(HIGHLIGHT_COLOR + \"Insert City: \" + HIGHLIGHT_COLOR, 20);\n break;\n case \"city\":\n setMenuLines(getMenuLine(10) + INSERT_HIGHLIGHT_COLOR + params[1] + ANSI_RESET, 10);\n setMenuLines(HIGHLIGHT_COLOR + \"Insert Country: \" + HIGHLIGHT_COLOR, 20);\n break;\n case \"country\":\n setMenuLines(getMenuLine(12) + INSERT_HIGHLIGHT_COLOR + params[1] + ANSI_RESET, 12);\n setMenuLines(HIGHLIGHT_COLOR + \"ENTER \" + ANSI_RESET + \"- delete Lead and create Contact, Opportunity and Account | \" +\n HIGHLIGHT_COLOR + \"back \" + ANSI_RESET + \"- cancel Lead conversion\", 20);\n break;\n }\n } else if (params.length == 3 && params[0].toLowerCase().equals(\"quantity and contact\")) {\n setMenuLines(getMenuLine(8) + INSERT_HIGHLIGHT_COLOR + params[1] + ANSI_RESET, 8);\n setMenuLines(\"Contact Name: \" + INSERT_HIGHLIGHT_COLOR + params[2] + ANSI_RESET, 10);\n setMenuLines(\"Status: \" + INSERT_HIGHLIGHT_COLOR + Status.OPEN + ANSI_RESET, 12);\n setMenuLines(HIGHLIGHT_COLOR + \"ENTER \" + ANSI_RESET + \"- confirm Opportunity information | \" + HIGHLIGHT_COLOR + \"back \" + ANSI_RESET + \"- return to the main menu\", 20);\n //Set menu for the new Account creation\n } else if (params.length == 1 && params[0].toLowerCase().equals(\"account\")) {\n setMenuLines(\"\", 1, 7, 9, 11, 13, 14, 15, 16, 17, 18, 19, 21);\n setMenuLines(HIGHLIGHT_COLOR + \"Create New Account\" + HIGHLIGHT_COLOR, 4);\n setMenuLines(\"Industry: \", 6);\n setMenuLines(\"Number of Employees: \", 8);\n setMenuLines(\"City: \", 10);\n setMenuLines(\"Country: \", 12);\n setMenuLines(HIGHLIGHT_COLOR + \"Insert Industry [PRODUCE, ECOMMERCE, MANUFACTURING, MEDICAL, or OTHER]: \" + HIGHLIGHT_COLOR, 20);\n }\n }", "private void logParkingLotAgent() {\n\t\t\n\t\tLogger logger = Logger.getInstance();\n\t\t\n\t\tlogger.logPrint(\"PARKING LOT ARGS START\");\n\t\tlogger.logPrint(\"Coords: (\" + coords.x + \", \" + coords.y + \")\");\n\t\tlogger.logPrint(\"Available spots: \" + spots);\n\t\tlogger.logPrint(\"Regular: \" + regularSpots + \" Luxury: \" + luxurySpots + \" Handicap: \" + handicapSpots);\n\t\tlogger.logPrint(\"Hourly cost: \" + hourlyCost);\n\t\tlogger.logPrint(\"Luxury cost modifier: \" + luxuryCostPercent);\n\t\tlogger.logPrint(\"PARKING LOT ARGS END\" + System.lineSeparator());\n\t}", "private String parseDescrName(String line) {\n\t\t// d1f74a_ 201-209;3-11 DGAIGSTFN LKGIFSALL #7\n\t\t// d1nvra_ 226-253;184-204 IDSAPLALL GIVLTAMLA 0_0:-5_-8 0.477587\n\t\t// GroupName is created as name of domain (remove proceeding 'd') + pdb\n\t\t// number of the first residue\n\t\t// in the second segment (3-11 in the example) increased by 10000 + '_'\n\t\t// + number of cluster (7 in the case)\n\t\t// the residue with fasta number 3 is translated into address A4_ - so\n\t\t// the pdb number is 4\n\t\t// finally the group name will be 1f74a_#10004_7\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tString dom = tokens[0].substring(1);\n\t\tString noClust = \"\";\n\t\t@SuppressWarnings(\"unused\")\n\t\tint shift1 = 0; // segment1 shift\n\t\tint shift2 = 0; // segment2 shift\n\t\ttry {\n\t\t\tif (tokens[4].startsWith(\"#\")) {\n\t\t\t\tnoClust = \"_\" + tokens[4].substring(1);\n\t\t\t} else {\n\t\t\t\tnoClust = \"\";\n\t\t\t}\n\t\t\tif (tokens[4].startsWith(\"0_0\")) {\n\t\t\t\ttokens[4] = tokens[4].replaceFirst(\"0_0:\", \"\");\n\t\t\t\tString[] shifts = tokens[4].split(\"_\");\n\t\t\t\tshift1 = Integer.valueOf(shifts[0]);\n\t\t\t\tshift2 = Integer.valueOf(shifts[1]);\n\t\t\t}\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\t// do nothing keep default values\n\t\t}\n\t\t// get the first number of second segment : e.g. 3 from 201-209;3-11\n\t\tString[] tokensA = tokens[1].split(\";\");\n\t\tString[] tokensB = tokensA[1].split(\"-\");\n\t\tInteger fastaNo = (Integer.valueOf(tokensB[0]) - shift2 >= 0 ? Integer\n\t\t\t\t.valueOf(tokensB[0]) - shift2 : Integer.valueOf(tokensB[0]));\n\n\t\t// get pdb address\n\t\tString pdbResAddr = hashResMapInt2Str.get(dom).get(fastaNo);\n\t\tpdbResAddr = pdbResAddr.substring(1, pdbResAddr.length() - 1);\n\t\tint pdbResNo = Integer.valueOf(pdbResAddr);\n\n\t\treturn (dom + \"#\" + (10000 + pdbResNo) + noClust);\n\t}", "private void handleSearchTrainClicked() {\n\t\tmSelectedSource = mSourceSearchView.getQuery().toString();\n\t\tmSelectedDestination = mDestinationSearchView.getQuery().toString();\n\t\tString source = mSelectedSource;\n\t\tString destination = mSelectedDestination;\n\t\tfinal String quota = (String) quotaSpinner.getSelectedItem();\n\t\tif(TextUtils.isEmpty(source)) {\n\t\t\tshowErrorText(\"Please choose Source\");\n\t\t\treturn;\n\t\t} else if(TextUtils.isEmpty(destination)) {\n\t\t\tshowErrorText(\"Please choose destination\");\n\t\t\treturn;\n\t\t} else if(quota.equals(\"Quota\")) {\n\t\t\tshowErrorText(\"Please select a quota from dropdown\");\n\t\t\treturn;\n\t\t}\n\n\t\tboolean validSource = false, validDestination = false;\n\t\tfor(SearchItem item : mSuggestionsList) {\n\t\t\tString station = item.get_text().toString();\n\t\t\tif (station.equals(mSelectedSource)) {\n\t\t\t\tvalidSource = true;\n\t\t\t} else if (station.equals(mSelectedDestination)) {\n\t\t\t\tvalidDestination = true;\n\t\t\t}\n\t\t}\n\n\t\tif(!validSource || !validDestination) {\n\t\t\tToast.makeText(mContext, \"Enter a valid source and destination\", Toast.LENGTH_LONG).show();\n\t\t\treturn;\n\t\t}\n\n\t\t//processing :( :(\n\t\tsource = source.replaceAll(\"[()]\",\"\").replaceAll(\" \", \"-\");\n\t\tdestination = destination.replaceAll(\"[()]\",\"\").replaceAll(\" \", \"-\");\n\t\tString quotaNotation = \"GN\";\n\t\tswitch (quota) {\n\t\t\tcase \"General Quota\":\n\t\t\t\tquotaNotation = \"GN\";\n\t\t\t\tbreak;\n\t\t\tcase \"Tatkal\":\n\t\t\t\tquotaNotation = \"CK\";\n\t\t\t\tbreak;\n\t\t\tcase \"Premium Tatkal\":\n\t\t\t\tquotaNotation = \"PT\";\n\t\t\t\tbreak;\n\t\t\tcase \"Ladies\":\n\t\t\t\tquotaNotation = \"LD\";\n\t\t\t\tbreak;\n\t\t\tcase \"Defence\":\n\t\t\t\tquotaNotation = \"DF\";\n\t\t\t\tbreak;\n\t\t\tcase \"Duty pass\":\n\t\t\t\tquotaNotation = \"DP\";\n\t\t\t\tbreak;\n\t\t\tcase \"Foreign Tourist\":\n\t\t\t\tquotaNotation = \"FF\";\n\t\t\t\tbreak;\n\t\t\tcase \"Lower Berth\":\n\t\t\t\tquotaNotation = \"SS\";\n\t\t\t\tbreak;\n\t\t}\n\n//\t\tString myFormat = \"yyyy-MM-dd\";\n//\t\tSimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);\n\n\t\tString dateString = sdf.format(myCalendar.getTime());\n\n\t\tString uri = Constants.URI_TRAIN_BETWEEN + \"/\" + source + \"-to-\" + destination;\n\t\tfinal Uri builtUri = Uri.parse(uri)\n\t\t\t\t.buildUpon()\n\t\t\t\t.appendQueryParameter(\"quota\", quotaNotation)\n\t\t\t\t.appendQueryParameter(\"date\",dateString)\n\t\t\t\t.build();\n\n\t\tWebviewFragment paymentFragment = WebviewFragment.newInstance(builtUri.toString());\n\t\tmFragmentManager\n\t\t\t\t.beginTransaction()\n\t\t\t\t.replace(R.id.container, paymentFragment)\n\t\t\t\t.addToBackStack(null)\n\t\t\t\t.commit();\n\t}", "public Elevator() {\n\t\t\n \tsuper(\"Elevator\", RobotConstants.ELEVATOR_P, RobotConstants.ELEVATOR_I, RobotConstants.ELEVATOR_D);\n \t\t\n\t\t// TODO Auto-generated constructor stub\n\t}", "@Override\n public String toString() {\n if (!(itinerary.getNext() == null)) {\n return flightCode + \" - From: \" + itinerary.getFrom() + \" Landing At: \" + itinerary.getTo() + \" Next Stop: \" + itinerary.getNext();\n } else {\n return flightCode + \" - From: \" + itinerary.getFrom() + \" Landing At: \" + itinerary.getTo();\n } //END IF/ELSE\n }", "public String method_110() {\r\n String[] var10000 = field_5917;\r\n return \"FlatLevelSource\";\r\n }", "public String toString()\n\t{return getClass().getName()+\"[source=\"+source+\",id=\"+id+']';}", "public static void printShortestPath(List<Town> sp) {\n\t\tint size = sp.size();\n\t\tif ( size>1 ) {\n\t\t\tfor( int i = 1; i <= size; i++) {\n\t\t\t\tif( i != size ) {\n\t\t\t\t\tSystem.out.print( sp.get(size-i).getName()+\"-\" );\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print( sp.get(size-i).getName());\n\t\t\t\t} \n\t\t\t}\t\t\t\n\t\t}else {\n\t\t\tSystem.out.println(\"There is no possible route\");\n\t\t}\n\t}", "public String getEventLine(){\r\n\t\t\twhile(name.length()<20){\r\n\t\t\t\tname+= \" \";\r\n\t\t\t}\r\n\t\t\tString Tword;\r\n\t\t\tTword = String.format(\"%05d\", ticket);\r\n\t\t return Integer.toString(date)+ \" \" +Tword+\" \"+name;\r\n\t }", "@Override\n public String toString() {\n return \"FLIGHT'S ID: \" + Id + \"\\nFROM: \" + From + \"\\tTO: \" + To + \"\\nAIRCRAFT TYPE: \"\n + Type + \", MILITARY: \" + (Mil ? \"yes\" : \"no\") + \"\\nSPEED: \" + Spd\n + \", ALTITUDE: \" + Alt;\n }", "private void handleAdvert(String[] lines, int lnk) {\n\t\t// example path vector line\n\t\t// pathvec: 1.2.0.0/16 345.678 .052 1.2.0.1 1.2.3.4\n\n\t\t// Parse the path vector line.\n\t\tString[] chunks = lines[2].split(\":\");\n\t\tchunks[1] = chunks[1].trim();\n\t\tString[] pathVec = chunks[1].split(\" \");\n\t\t// If there is loop in path vector, ignore this packet.\n\t\tboolean looping = false;\n\t\tint[] paths = new int[pathVec.length-3];\n\t\tfor (int i = 3; i < pathVec.length; i++){\n\t\t\tString ipString = pathVec[i].toString().replace(\".\",\"\");\n\t\t\tpaths[i-3] = Integer.parseInt(ipString);\n\t\t\tfor (int j = i + 1; j < pathVec.length; j++){\n\t\t\t\tif (pathVec[i].equals(pathVec[j])){\n\t\t\t\t\tlooping = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Form a new route, with cost equal to path vector cost\n\t\t// plus the cost of the link on which it arrived.\n\t\tRoute newRt = new Route();\n\t\tnewRt.cost = Double.parseDouble(pathVec[2]) + lnkVec.get(lnk).cost;\n\t\tLinkedList<Integer> pathList = new LinkedList<Integer>();\n\t\tfor (int i : paths){\n\t\t\tpathList.add(i);\n\t\t}\n\t\tnewRt.path = pathList;\n\t\tnewRt.cost = 0;\n\t\tnewRt.outLink = lnk;\n\t\tnewRt.pfx = new Prefix (pathVec[0]);\n\t\tnewRt.timestamp = now;\n\t\tnewRt.valid = true;\n\t\t\n\t\t// Look for a matching route in the routing table\n\t\t// and update as appropriate; whenever an update\n\t\t// changes the path, print the table if debug>0;\n\t\tboolean match = false;\n\t\tfor (Route rte : rteTbl){\n\t\t\tif (rte.path.equals(newRt.path)){\n\t\t\t\tmatch = true;\n\t\t\t\tint prevOL = newRt.outLink;\n\t\t\t\tupdateRoute(rte, newRt);\n\t\t\t\tif (debug > 0){ printTable();}\n\t\t\t\t\n\t\t\t\t// whenever an update changes the output link,\n\t\t\t\t// update the forwarding table as well.\n\t\t\t\tPrefix pre = new Prefix(pathVec[0]);\n\t\t\t\tpfxList.add(pre);\n\t\t\t\tfwdr.addRoute(pre, lnk);\n\n\t\t\t\t// If the new route changed the routing table,\n\t\t\t\t// extend the path vector and send it to other neighbors.\n\t\t\t\tPacket p = new Packet();\n\t\t\t\tp.protocol = 2; p.ttl = 100;\n\t\t\t\tp.srcAdr = myIp;\n\t\t\t\tp.destAdr = lnkVec.get(lnk).peerIp;\n\t\t\t\tString pathString = \"\";\n\t\t\t\tfor(Integer path : rte.path){\n\t\t\t\t\tString temp = path.toString();\n\t\t\t\t\tpathString = pathString+ temp.charAt(0) + \".\" + temp.charAt(1) + \".\" + temp.charAt(2) + \".\" + temp.charAt(3) + \" \";\n\t\t\t\t}\n\t\t\t\tpathString = pathString + myIpString;\n\t\t\t\tp.payload = String.format(\"RPv0\\ntype: advert\\n\" \n\t\t\t\t\t\t+ \"pathvec: %s %s %.3f %s\\n\",\n\t\t\t\t\t\trte.pfx , rte.timestamp, rte.cost, pathString);\n\t\t\t\tfwdr.sendPkt(p,lnk);\n\n\t\t\t}\n\t\t}\n\t\tif (!match){\n\t\t\taddRoute(newRt);\n\t\t}\n\n\t}", "String getSource();", "private void printMyRoutingTable()\n {\n\tString str;\n\tmyGUI.println(\"My Distance table and routes\");\n str = F.format(\"dst |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += (F.format(i, 15));\n }\n myGUI.println(str);\n for (int i = 0; i < str.length(); i++) {\n myGUI.print(\"-\");\n }\n str = F.format(\"cost |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(myDistTable[i], 15);\n }\n myGUI.println();\n myGUI.println(str);\n str = F.format(\"route |\", 15);\n for (int i = 0; i < RouterSimulator.NUM_NODES; i++) {\n str += F.format(route[i], 15);\n }\n myGUI.println(str);\n myGUI.println();\n myGUI.println(\"--------------------------------------------\");\n myGUI.println();\n\n }", "private byte[] obtainPackets4Source(Packet packet){\n\t\t//filter IPV6\n\t\tif(packet.contains(IpPacket.class)){\n\t\t\t\n\t\t\tIpPacket ipPkt = packet.get(IpPacket.class);\n\t\t\tIpHeader ipHeader = ipPkt.getHeader();\n\t\t\n\t\t\tbyte[] src=ipHeader.getSrcAddr().getAddress();\n\t\t\tbyte[] dest = ipHeader.getDstAddr().getAddress();\n\t\t\t//source\n\t\tif(LogicController.headerChoice==1){\n\t\t\treturn src;\n\t\t\t\n\t\t\t\n\t\t}else if(LogicController.headerChoice==2){\n\t\t//source dest\n\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t\n\t\t}else if(LogicController.headerChoice==3){\n\t\t//3: source source port\n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\tbyte[] port = theader.getSrcPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(src,port);\n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\tUdpPacket udpPacket = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader uh = udpPacket.getHeader();\n\t\t\t\tbyte[] port = uh.getSrcPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(src,port);\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t}else if(LogicController.headerChoice==4){\n\t\t\t//4: dest dest port\t\n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\tbyte[] port = ByteArrays.toByteArray(theader.getDstPort().valueAsInt());\n\t\t\t\treturn ByteArrays.concatenate(dest,port);\n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\tUdpPacket udpPacket = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader uh = udpPacket.getHeader();\n\t\t\t\tbyte[] port = uh.getDstPort().valueAsString().getBytes();\n\t\t\t\treturn ByteArrays.concatenate(dest,port);\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src, dest);\n\t\t\t}\n\t\t}else if(LogicController.headerChoice==5){\n\t\t\t \n\t\t\tif(packet.contains(TcpPacket.class)){\n\t\t\t\t\t\t\t\n\t\t\t\tTcpPacket tcpPkt = packet.get(TcpPacket.class);\n\t\t\t\tTcpHeader theader = tcpPkt.getHeader();\n\t\t\t\t\n\t\t\t\tbyte[] a = ByteArrays.concatenate(src,dest);\n\t\t\t\t //byte[] ipHeaderBytes = ByteArrays.concatenate(a,new byte[]{ipHeader.getProtocol().value().byteValue()});\n\t\t\t\t \n\t\t\t\t byte[] tVal =ByteArrays.concatenate(theader.getSrcPort().valueAsString().getBytes(),theader.getDstPort().valueAsString().getBytes());\n\t\t\t\t \n\t\t\t\t//src,dst,protocol,\n\t\t\t\t\t//Key key = new Key(ByteArrays.concatenate(ipHeaderBytes,tVal));\n\t\t\t\t\t\n\t\t\t\t\t//source\n\t\t\t\t\t//return new byte[](key,1);\n\t\t\t\t return ByteArrays.concatenate(a,tVal);\n\t\t\t\t \n\t\t\t}else if(packet.contains(UdpPacket.class)){\n\t\t\t\t\n\t\t\t\tUdpPacket tcpPkt = packet.get(UdpPacket.class);\n\t\t\t\tUdpHeader theader = tcpPkt.getHeader();\n\t\n\tbyte[] a = ByteArrays.concatenate(src,dest);\n\t //byte[] ipHeaderBytes = ByteArrays.concatenate(a,new byte[]{ipHeader.getProtocol().value().byteValue()});\n\t \n\t byte[] tVal =ByteArrays.concatenate(theader.getSrcPort().valueAsString().getBytes(),theader.getDstPort().valueAsString().getBytes());\n\t \n\t//src,dst,protocol,\n\t\t//Key key = new Key(ByteArrays.concatenate(ipHeaderBytes,tVal));\n\t\t\n\t\t//source\n\t\t//return new byte[](key,1);\n\t return ByteArrays.concatenate(a,tVal);\t \n}\n\t\t\t\n\t\t\telse{\n\t\t\t\treturn ByteArrays.concatenate(src,dest);\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\treturn ByteArrays.concatenate(src,dest);\n\t\t}\n\t}else{\n\t\treturn null;}\n\t}", "public static void displayInfoForReEntry(ListArrayBasedGeneric<Runway> runwayList) // Option # 7\r\n\t{\r\n\t\t// We are only printing out the contents of Purgatory\r\n\t\tint sizeOfPurgatory = runwayList.get(0).getListOfPlanes().size();\r\n\t\tString flightNumber = \"\", destination = \"\";\r\n\r\n\t\tif(sizeOfPurgatory > 0) // If there is at least 1 plane in purgatory, print it\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\tThese planes are waiting to be cleared to re-enter a runway:\");\r\n\r\n\t\t\tfor(int i = 0; i < sizeOfPurgatory; i++)\r\n\t\t\t{\r\n\t\t\t\tflightNumber = runwayList.get(0).getListOfPlanes().get(i).getFlightNumber();\r\n\t\t\t\tdestination = runwayList.get(0).getListOfPlanes().get(i).getDestination();\r\n\r\n\t\t\t\tSystem.out.println(\"\\t\\tFlight \" + flightNumber + \" to \" + destination);\r\n\t\t\t} // END FOR\r\n\t\t}\r\n\t\telse // No planes in purgatory\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\tNo planes are waiting to be cleared to re-enter a runway!\");\r\n\t\t} // END IF/ELSE\r\n\r\n\t\tSystem.out.println();\r\n\t}", "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 OptInfo createInitialRoutes() {\t\n\t\t//OptInfo has old and new attributes\n\t\tOptInfo info = new OptInfo();\n\t\tTSPDepot currDepot = null; //current depot\n\t\tTSPShipment currShip = null; //current shipment\n\t\t//int countLoop=0;\n\n\t\t//check if selection and insertion type methods have been selected\n\t\tif (ProblemInfo.selectShipType == null) {\n\t\t\tSettings.printDebug(Settings.ERROR,\n\t\t\t\t\t\"No selection shipment type has been assigned\");\n\n\t\t}\n\t\tif (ProblemInfo.insertShipType == null) {\n\t\t\tSettings.printDebug(Settings.ERROR,\n\t\t\t\t\t\"No insertion shipment type has been assigned\");\n\t\t}\n\n\t\t//capture the old attributes\n\t\tinfo.setOldAttributes(mainDepots.getAttributes());\n\t\twhile (!mainShipments.isAllShipsAssigned()) {\n\n\n\t\t\tcurrDepot = (TSPDepot) mainDepots.getTSPHead();\n\t\t\t//Send the entire mainDepots and mainShipments to get the next shipment\n\t\t\t//to be inserted including the current depot\n\t\t\tTSPShipment theShipment = mainShipments.getNextInsertShipment(mainDepots,\n\t\t\t\t\tcurrDepot, mainShipments, currShip);\n\t\t\tif (theShipment == null) { //shipment is null, print error message\n\t\t\t\tSettings.printDebug(Settings.COMMENT, \"No shipment was selected\");\n\t\t\t}\n\t\t\t//The selected shipment will be inserted into the route\n\t\t\tif (!mainDepots.insertShipment(theShipment)) {\n\t\t\t\tSettings.printDebug(Settings.COMMENT, \"The Shipment: <\" + theShipment.getIndex() +\n\t\t\t\t\t\t\"> cannot be routed\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//Settings.printDebug(Settings.COMMENT,\n\t\t\t\t//\t\t\"The Shipment: <\" + theShipment.getIndex() +// \" \" + theShipment +\n\t\t\t\t//\t\t\"> was routed\");\n\t\t\t\t//tag the shipment as being routed\n\t\t\t\ttheShipment.setIsAssigned(true);\n\t\t\t}\n\t\t}\n\t\tProblemInfo.depotLLLevelCostF.calculateTotalsStats(mainDepots);\n\t\tinfo.setNewAtributes(mainDepots.getAttributes());\n\t\treturn info;\n\t}", "public void printDetails()\r\n\t{\r\n\t\tSystem.out.println(flightNumber);\r\n\t\tSystem.out.println(departurePoint);\r\n\t\tSystem.out.println(destination);\r\n\t\tSystem.out.println(departureTime);\r\n\t\tSystem.out.println(arrivalTime);\r\n\t\tSystem.out.println(checkedInPassengers);\r\n\t\tif(status == 'S')\r\n\t\t\tSystem.out.println(\"Scheduled\");\r\n\t\t\t\r\n\t\tif(status == 'B')\r\n\t\t\tSystem.out.println(\"Boarding\");\r\n\t\tif(status == 'D')\r\n\t\t\tSystem.out.println(\"Departed\");\r\n\t\tif(status == 'C')\r\n\t\t\tSystem.out.println(\"Canceled\");\r\n\t\t\r\n\t\t\t\t\r\n\t}", "public void getAllDoors() {\n //System.out.println();\n System.out.println(\"\\nDOOR/ARCHWAY DESCRIPTION\");\n System.out.println(\"----------------------------------------------------------------\\n\");\n //System.out.println();\n if (doorDescription.contains(\"archway\")) {\n System.out.println(\"ARCHWAY DESCRIPTION: \" + doorDescription);\n } else {\n System.out.println(\"DOOR DESCRIPTION: \" + doorDescription);\n }\n //System.out.println();\n System.out.println(\"\\n----------------------------------------------------------------\");\n }", "protected String getElevatorDescription(int elevatorNumber) {\n return \"Elevator \" + (elevatorNumber + 1);\n }", "public static void displayInfoForTakeOff(ListArrayBasedGeneric<Runway> runwayList) // Option # 6\r\n\t{\r\n\t\tint size = runwayList.size();\r\n\t\tint sizeOfRunway = 0;\r\n\t\tString runwayName = \"\", flightNumber = \"\", destination = \"\";\r\n\r\n\t\tfor(int i = 1; i < size; i++) // We want to display all run ways, except Purgatory\r\n\t\t{\r\n\t\t\t// Get the run way name and the size of that run way\r\n\t\t\tsizeOfRunway = runwayList.get(i).getListOfPlanes().size();\r\n\t\t\trunwayName = runwayList.get(i).getRunwayName();\r\n\r\n\r\n\t\t\tif(sizeOfRunway > 0) // If the runway has planes on it, display them\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\\tThese planes are waiting for takeoff on runway \" + runwayName);\r\n\r\n\t\t\t\tfor(int j = 0; j < sizeOfRunway; j++) // Go through the runway and print out planes and their destination\r\n\t\t\t\t{\r\n\t\t\t\t\tflightNumber = runwayList.get(i).getListOfPlanes().get(j).getFlightNumber();\r\n\t\t\t\t\tdestination = runwayList.get(i).getListOfPlanes().get(j).getDestination();\r\n\r\n\t\t\t\t\tSystem.out.println(\"\\t\\tFlight \" + flightNumber + \" to \" + destination);\r\n\t\t\t\t} // END FOR\r\n\t\t\t}\r\n\t\t\telse // Else, display that no planes are waiting for take off\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"\\tNo planes are waiting for takeoff on runway \" + runwayName + \"!\");\r\n\t\t\t} // END IF/ELSE\r\n\t\t} // END FOR\r\n\r\n\t\tSystem.out.println();\r\n\t}", "public String toString() {\n\t\treturn \"Road from \" + getLeave() + \" to \" + getArrive() + \" with toll \" + getToll();\n\t}", "public String printRouteStops()\r\n {\r\n String route_output = \"-> \";\r\n for (Stop s : stops_map)\r\n {\r\n route_output = route_output + s.getId() + \" ->\";\r\n }\r\n\r\n return route_output;\r\n }", "public static String getDirections(String origin, String[] dest)\n\t\tthrows IOException, SAXException, ParserConfigurationException {\n\n\t\tString start = origin.replace(\"\\\\s\", \"%20\");\n\t\tString end = dest[0] + \",\" + dest[1] + \",\" + dest[2];\n\n\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory\n\t\t\t.newInstance();\n\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\tDocument doc = dBuilder.parse(directionsURL + start\n\t\t\t+ \"&destination=\" + end + \"&sensor=false\");\n\t\tdoc.getDocumentElement().normalize();\n\n\t\tNodeList steps = doc.getElementsByTagName(\"step\");\n\n\t\tString out = \"The routing directions: \\n\";\n\n\t\tfor (int i = 0; i < steps.getLength(); i++) {\n\t\t\tNode currStep = steps.item(i);\n\t\t\tNodeList stepInfo = currStep.getChildNodes();\n\t\t\tString line = stepInfo.item(11).getTextContent();\n\t\t\tStringBuilder temp = new StringBuilder();\n\t\t\tBoolean del = false;\n\t\t\tBoolean needSpace = false;\n\t\t\tfor (int j = 0; j < line.length(); j++) {\n\t\t\t\tif (line.charAt(j) == '<') {\n\t\t\t\t\tdel = true;\n\t\t\t\t\tif (needSpace) {\n\t\t\t\t\t\ttemp.append(\" \");\n\t\t\t\t\t\tneedSpace = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (line.charAt(j) == '>') {\n\t\t\t\t\tdel = false;\n\t\t\t\t\tneedSpace = true;\n\t\t\t\t}\n\t\t\t\telse if (del) {\n\t\t\t\t\t// Do nothing\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttemp.append(line.charAt(j));\n\t\t\t\t\tneedSpace = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (temp.indexOf(\"Destination\") != -1) {\n\t\t\t\tint index = temp.indexOf(\"Destination\");\n\t\t\t\ttemp.insert(index, \"\\n\");\n\t\t\t}\n\n\t\t\tout += temp + \"\\n\";\n\n\t\t}\n\t\treturn out;\n\t}", "private void addKey() {\t\n\t\t// Remember you can use Processing's graphics methods here\n\t\tfill(255, 250, 240);\n\t\t\n\t\tint xbase = 25;\n\t\tint ybase = 50;\n\t\t\n\t\trect(xbase, ybase, 250, 240);\n\t\t\n\t\tfill(0);\n\t\ttextAlign(LEFT, CENTER);\n\t\ttextSize(12);\n\t\ttext(\"Route Info\", xbase+25, ybase+25);\n\t\t\n\t\tfill(150, 30, 30);\n\n\n\t\tfill(0, 0, 0);\n\t\ttextAlign(LEFT, CENTER);\n\t\tString name0 = station0 == null ? \"\" : station0.getName();\n\t\tString name1 = station1 == null ? \"\" : station1.getName();\n\t\t\n\t\t// If two stations are currently selected, generate an API call\n\t\tString peak = \"\";\n\t\tString offPeak = \"\";\n\t\tString discount = \"\";\n\t\tString time = \"\";\n\t\tString distance = \"\";\n\t\tif(routeInfo != null){\n\t\t\tpeak = routeInfo.getPeak();\n\t\t\toffPeak = routeInfo.getOffPeak();\n\t\t\tdiscount = routeInfo.getDiscount();\n\t\t\ttime = routeInfo.getTime();\n\t\t\tdistance = routeInfo.getDistance();\n\t\t}\n\t\ttext(\"Station 1: \" + name0, xbase+25, ybase+65);\n\t\ttext(\"Station 2: \" + name1, xbase+25, ybase+85);\n\t\ttext(\"Peak fare: $\" + peak, xbase+25, ybase+125);\n\t\ttext(\"Off-peak fare: $\" + offPeak, xbase+25, ybase+145);\n\t\ttext(\"Discount fare: $\" + discount, xbase+25, ybase+165);\n\t\ttext(\"Est. travel time: \" + time + \" min\", xbase+25, ybase+205);\n\t\ttext(\"Distance: \" + distance + \" miles\", xbase+25, ybase+225);\t\n\t}", "public String getRoomName() {\n switch (description) {\n case \"You are standing outside Hogwarts School of Witchcraft and\\n\"\n + \"Wizardry, near the Whomping Willow. You are searching\\n\"\n + \"for the hidden Galleons that may perhaps be in the cave that\\n\"\n + \"opens straight below you (outside).\":\n return \"outside\";\n \n case \"Too bad this cave is not on the Marauder's Map. You shout\\n\"\n + \"'Lumos' to ignite your wand, and you see there is a narrow,\\n\"\n + \" dark passage to the east (r1).\":\n return \"r1\";\n \n case \"You are in a gloomy oval shaped room with grey walls.\\n\"\n + \" \\\"Enemies of the heir, beware\\\" is written on the wall.\\n\"\n + \"There is a dim light to the west, and a narrow\\n\"\n + \"dark hole to the east only about 18 inches high (r2).\":\n return \"r2\";\n \n case \"You really need your wand here. \\n\"\n + \"There is a wide passage that quickly narrows\\n\"\n + \"to the west, a bright opening to the east,\\n\"\n + \"and a deep hole that appears to have no bottom\\n\"\n + \"in the middle of the room (r3).\":\n return \"r3\";\n \n case \"There is what looks like a giant snake skin\\n\"\n + \"in the corner. Perhaps from the Basilisk? A passage leads to\\n\"\n + \" the west, another one to the north, and a slippery route\\n\"\n + \"goes down steeply. You can hear the shrieks of mandrakes (r4).\":\n return \"r4\";\n \n case \"There is a dim light from above and the shrieks\\n\"\n + \"are clearly coming from a passageway to the east (r5).\":\n return \"r5\";\n \n case \"The ceiling is full of pixies.\\n\"\n + \"Make sure to cover your head (r6)!\":\n return \"r6\";\n \n case \"This room is very damp. There are puddles on the floor\\n\"\n + \"and a steady dripping from above. Let's hope Moaning\\n\"\n + \"Myrtle didn't flood the girls' lavatory(r7).\":\n return \"r7\";\n \n case \"Ron's rat, Scabbers runs across your foot, and woah! Here \"\n + \"comes Crookshanks chasing behind. A narrow passage runs\\n\"\n + \"to the east and an even narrower one runs to the west (r8).\":\n return \"r8\";\n \n case \"Water drips from the ceiling as you cover your head.\\n \"\n + \"There is no exit from this room with only the option to turn back east.\\n\"\n + \"Will you decide to enter the chamber again? (r9)\":\n return \"r9\";\n \n case \"It appears that someone has been here. The harp is\\n\"\n + \"playing to put Fluffy, the three-headed dog asleep.\\n\"\n + \"Oh wait! It looks like Fluffy is gaurding something.\\n\"\n + \"There's a trap door on the floor, but it is locked.\\n\"\n + \"'Alohomora' won't help you here, you need a key (r10).\":\n return \"r10\";\n \n case \"This room is very dark. You can just barely see (r11).\":\n return \"r11\";\n \n default:\n return \"your hands\";\n } \n }", "private List<String> prepareToPrint(List<String[]> beacon, List<String[]> receiver, String[] destination){\n\n List<String> list = new ArrayList<>();\n boolean destinationAdded = false;\n\n Iterator<String[]> it = receiver.iterator();\n for(String [] oneBeacon : beacon) {\n String s = \"\";\n String[] receiverElementList = it.next();\n //i = 1 to skip the id\n for(int i = 1; i < receiverElementList.length; i++){\n s = s + receiverElementList[i] + \",\";\n }\n\n s += oneBeacon[1].trim()+\",\"+oneBeacon[2].trim();\n if(!destinationAdded){\n s += \",\"+destination[0]+\",\"+destination[1];\n destinationAdded = true;\n }\n list.add(s);\n }\n //adding one more time the position of the first beacon in order to plot a triangle\n if(it.hasNext()){\n String s = \"\";\n String[] receiverElementList = it.next();\n String[] oneBeacon = beacon.get(0);\n for(int i = 1; i < receiverElementList.length; i++){\n s = s + receiverElementList[i] + \",\";\n }\n\n s += oneBeacon[1].trim()+\",\"+oneBeacon[2].trim();\n list.add(s);\n }\n\n while(it.hasNext()){\n String[] receiverElementList = it.next();\n String s = \"\";\n for(int i = 1; i < receiverElementList.length; i++){\n s = s + receiverElementList[i]+\",\";\n }\n\n list.add(s.substring(0,s.length()-1));\n\n }\n return list;\n }", "public void skrivUtSpiller() {\r\n\t\tSystem.out.println(\"Spiller \" + id + \": \" + navn + \", har \" + poengsum + \" poeng\");\r\n\t}", "public static String getHeaderLine()\n {\n return \"j2ksec,eid,lat,lon,depth,mag\";\n }", "private String multipleStartTimes() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif (startTimes.size() > 1) {\n\t\t\tsb.append(\"Flera starttider? \");\n\t\t\tfor (int i = 1; i < startTimes.size(); i++) {\n\t\t\t\tsb.append(startTimes.get(i) + \" \");\n\t\t\t}\n\t\t\tsb.append(\"; \");\n\t\t}\n\t\treturn sb.toString();\n\t}", "private void getWalkinList(){\n sendPacket(CustomerTableAccess.getConnection().getWalkinList());\n \n }", "private String detalhes() {\n\t\tString saida = \"\";\n\t\t\n\t\tfor (String string : detalhes) {\n\t\t\tif(string != null) {\n\t\t\t\tsaida += string + System.lineSeparator();\n\t\t\t} \n\t\t}\n\t\treturn saida.substring(0, saida.length() - 1);\n\t}", "private void displayChampionshipDetails()\n {\n displayLine();\n System.out.println(\"########Formula 9131 Championship Details########\");\n displayLine();\n System.out.println(getDrivers().getChampionshipDetails());\n }", "private String setVehicleMsg(Vehicle v, String source, String target) {\r\n\t\tString str = \"\";\r\n\t\tif (v instanceof Car) {\r\n\t\t\tif (((Car) v).isSmall()) {\r\n\t\t\t\tstr += \"S\";\r\n\t\t\t} else {\r\n\t\t\t\tstr += \"C\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tstr += \"M\";\r\n\t\t}\r\n\t\treturn \"|\" + str + \":\" + source + \">\" + target + \"|\";\r\n\t}", "public Elevator() {\n boolean elevatorInvert = false;\n boolean elevatorPhase = false;\n spx = new SpectrumVictorSPX(Constants.ELEVATOR_SPX);\n srx = new LeaderTalonSRX(Constants.ELEVATOR_SRX, spx);\n srx.setNeutralMode(NeutralMode.Brake);\n srx.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative);\n srx.setSensorPhase(elevatorPhase);\n srx.setInverted(elevatorInvert);\n\n // Enable Soft Limits\n srx.configForwardSoftLimitEnable(false);\n srx.configForwardSoftLimitThreshold(posUpLimit);\n srx.configForwardLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);\n \n srx.configReverseSoftLimitEnable(false);\n srx.configReverseSoftLimitThreshold(posDownLimit);\n srx.configReverseLimitSwitchSource(LimitSwitchSource.FeedbackConnector, LimitSwitchNormal.NormallyOpen);\n\n srx.setStatusFramePeriod(StatusFrameEnhanced.Status_13_Base_PIDF0, 10);\n srx.setStatusFramePeriod(StatusFrameEnhanced.Status_10_MotionMagic, 10);\n\n // Set Ramp Rate and voltage compensation\n srx.configClosedloopRamp(0.25);\n srx.configVoltageCompSaturation(11.5);\n srx.enableVoltageCompensation(true);\n setMotionMagicParams();\n }", "@Override\n\tpublic ArrayList<String> showFlights(String source, String destination, String date) throws ParseException {\n\t\tArrayList<String> result = new ArrayList<String>();\n\t\tTimestamp travelTimestamp = new Timestamp(((new SimpleDateFormat(\"dd/MM/yyyy\")).parse(date)).getTime());\n\t\tArrayList<TransportMode> flights;\n\t\tif(allFlightsByTimestamp.containsKey(travelTimestamp)){\n\t\t\tflights = allFlightsByTimestamp.get(travelTimestamp);\n\t\t\tFlight flight;\n\t\t\tfor(int i = 0;i<flights.size();i++){\n\t\t\t\tflight = (Flight)flights.get(i);\n\t\t\t\tif(flight.getSource().equalsIgnoreCase(source) && flight.getDestination().equalsIgnoreCase(destination))\n\t\t\t\t\tresult.add(\"\"+flight.getModeNumber());\n\t\t\t}\n\t\t}\n\t\tif(result.size() == 0)\n\t\t\tresult = null;\n\t\treturn result;\n\t}", "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 String toString() {\n\treturn \"gate \" + name + \" not \" + delay;\n }", "private String printRoute(Rota r) {\n StringBuilder s = new StringBuilder();\n\n for (String d : r.getPontos()) {\n s.append(d + \"->\");\n }\n s = s.replace(s.length() - 2, s.length(), \".\");\n\n return s.toString();\n }", "public String getEventLine(){\r\n\t\t\twhile(name.length()<20){\r\n\t\t\t\tname+= \" \";\r\n\t\t\t}\r\n\t\t\tString Tword;\r\n\t\t\tTword = String.format(\"%05d\", ticket);\r\n\t\t\treturn Integer.toString(date)+ \" \" +Tword+\" \"+name;\r\n\t\t}", "private void retriveCommand(){\n\t\tdirections.add(\"Turn left.\");\n\t\tdirections.add(\"Walk 20 meters and turn right.\");\n\t\tdirections.add(\"Arrive destination.\");\n\t}", "public void DetailedList(String mode) {\n \t\tArrayList<Jobs> TargetList;\n \t\tString TargetName = \"\";\n \t\tif (mode.equalsIgnoreCase(\"unassigned\")) {\n \t\t\tTargetList = jobqueue;\n \t\t\tTargetName = \"Unassigned List\";\n \t\t} else if (mode.equalsIgnoreCase(\"assigned\")) {\n \t\t\tTargetList = jobsent;\n \t\t\tTargetName = \"Assigned List\";\n \t\t} else if (mode.equalsIgnoreCase(\"complete\")) {\n \t\t\tTargetList = jobcomplete;\n \t\t\tTargetName = \"Completed List\";\n \t\t} else {\n \t\t\treturn;\n \t\t}\n \n \t\t// Setup bounds and iterator\n \t\tint size = TargetList.size();\n \t\tint scan = 0;\n \n \t\t// Display header\n \t\tSystem.out.println(\"# \" + TargetName + \" ########################################\");\n \t\tif (mode.equalsIgnoreCase(\"unassigned\")) {\n \t\t\tSystem.out.printf(\"%8s|%6s|%-50s%n\", \"OS\", \"SecLev\", \"Job\");\n \t\t} else if (mode.equalsIgnoreCase(\"assigned\")) {\n \t\t\tSystem.out.printf(\"%25s|%15s|%8s|%6s|%-50s %n\", \"Issued To\", \"Issued At\", \"OS\", \"SecLev\", \"Job\");\n \t\t} else if (mode.equalsIgnoreCase(\"complete\")) {\n \t\t\tSystem.out.printf(\"%5s|%-50s %n\", \"JobID\", \"Job\");\n \t\t}\n \n \t\twhile (scan < size) {\n \t\t\t// Load the target an associated data\n \t\t\tJobs looking = TargetList.get(scan);\n \t\t\tString Issued = looking.GetIussed();\n \t\t\tint JobID = looking.GetJobID();\n \t\t\tlong AssignedOn = looking.GetTimeIssued();\n \t\t\tint SecLev = looking.GetSecurityLevel();\n \t\t\tString OS = looking.GetOSspecific();\n \t\t\tString ActualJob = looking.GetWork();\n \n \t\t\t// Display the data\n \t\t\tif (mode.equalsIgnoreCase(\"unassigned\")) {\n \t\t\t\tSystem.out.printf(\"%8s|%6s|%-50s%n\", OS, SecLev, ActualJob);\n \t\t\t} else if (mode.equalsIgnoreCase(\"assigned\")) {\n \t\t\t\tSystem.out.printf(\"%25s|%15s|%8s|%6s|%-50s %n\", Issued, AssignedOn, OS, SecLev, ActualJob);\n \t\t\t} else if (mode.equalsIgnoreCase(\"complete\")) {\n \t\t\t\tSystem.out.printf(\"%5s|%-50s %n\", JobID, ActualJob);\n \t\t\t}\n \n \t\t\tscan++;\n \t\t}\n \t}", "public void snare();", "public void generateRouteNameString(){\n switch(routeName){\n case \"1A\": this.routeNameString = \"College Edinburgh\"; break;\n case \"1B\": this.routeNameString = \"College Edinburgh\"; break;\n case \"2A\": this.routeNameString = \"West Loop\"; break;\n case \"2B\": this.routeNameString = \"West Loop\"; break;\n case \"3A\": this.routeNameString = \"East Loop\"; break;\n case \"3B\": this.routeNameString = \"East Loop\"; break;\n case \"4\": this.routeNameString = \"York\"; break;\n case \"5\": this.routeNameString = \"Gordon\"; break;\n case \"6\": this.routeNameString = \"Harvard Ironwood\"; break;\n case \"7\": this.routeNameString = \"Kortright Downey\"; break;\n case \"8\": this.routeNameString = \"Stone Road Mall\"; break;\n case \"9\": this.routeNameString = \"Waterloo\"; break;\n case \"10\": this.routeNameString = \"Imperial\"; break;\n case \"11\": this.routeNameString = \"Willow West\"; break;\n case \"12\": this.routeNameString = \"General Hospital\"; break;\n case \"13\": this.routeNameString = \"Victoria Rd Rec Centre\"; break;\n case \"14\": this.routeNameString = \"Grange\"; break;\n case \"15\": this.routeNameString = \"University College\"; break;\n case \"16\": this.routeNameString = \"Southgate\"; break;\n case \"20\": this.routeNameString = \"NorthWest Industrial\"; break;\n case \"50\": this.routeNameString = \"Stone Road Express\"; break;\n case \"56\": this.routeNameString = \"Victoria Express\"; break;\n case \"57\": this.routeNameString = \"Harvard Express\"; break;\n case \"58\": this.routeNameString = \"Edinburgh Express\"; break;\n default: this.routeNameString = \"Unknown Route\"; break;\n }\n }", "java.lang.String getSource();", "java.lang.String getSource();", "public void setSource (String source);", "int getNameSourceStart();", "@FXML\n public void viewInformationOfPacket(ActionEvent event) throws IOException {\n String selectedPacketHeader = unseenPacketList.getSelectionModel().getSelectedItem();\n if (selectedPacketHeader != null) {\n \tif (selectedPacketHeader.contains(\"Snort\")) {\n //If snort packet\n selectedPacket = unseenPacketList.getSelectionModel().getSelectedIndex();\n ViewSnortPacketGUI snortInfo = new ViewSnortPacketGUI();\n snortInfo.start(new Stage());\n } else {\n //If portscan packet\n selectedPacket = unseenPacketList.getSelectionModel().getSelectedIndex();\n ViewPortScanPacketGUI snortInfo = new ViewPortScanPacketGUI();\n snortInfo.start(new Stage());\n }\n } else {\n \tJOptionPane.showMessageDialog(null, \"Please select packet before pressing view information.\");\n }\n }", "public String toStringShort(String departureCity, String arrivalCity) {\n return \"ID: \" + Id + \" AIRLINE: \" + Op + \"\\nFROM: \" + departureCity\n + \" TO: \" + arrivalCity;\n }", "public DatagramPacket make_ROUTE_packet(char name, char area, int seq, \n Entry[] vec) { \n if (vec == null) {\n Log(\"ERROR: null vec in send_ROUTE_packet\\n\");\n return null;\n }\n Log2(\"make_ROUTE_packet(\"+name+seq+\",\"+local_TTL+\",\"+\"[\");\n for (int i=0;i<vec.length;i++) {\n Log2(\"\"+(i>0?\",\":\"\")+vec[i].toString());\n }\n Log2(\"])\\n\");\n \n ByteArrayOutputStream os= new ByteArrayOutputStream();\n DataOutputStream dos= new DataOutputStream(os);\n try {\n dos.writeByte(Router.PKT_ROUTE);\n dos.writeChar(name);\n dos.writeChar(area);\n dos.writeInt(seq);\n dos.writeInt(local_TTL);\n dos.writeInt(vec.length);\n for (Entry vec1 : vec) {\n vec1.writeEntry(dos);\n }\n byte [] buffer = os.toByteArray();\n DatagramPacket dp= new DatagramPacket(buffer, buffer.length);\n \n return dp;\n }\n catch (IOException e) {\n Log(\"Error making ROUTE: \"+e+\"\\n\"); \n return null;\n }\n }", "List<Tour> getTourSchedule(String line);", "public java.lang.String getDestination(){return this.destination;}", "public static void main(String[] args) {\n\t\t\n\n\t\tFile file = new File(\"D://floorplan\");\n\t\tString floorplan[] = file.list();\n\t\tfor (int i = 0; i < floorplan.length; i++) {\n\t\t\tSystem.out.println(floorplan[i]);\n\t\t\tSystem.out.println(floorplan[i].substring(floorplan[i].indexOf(\"-\")+1));\n\t\t\tSystem.out.println(floorplan[i].substring(floorplan[i].indexOf(\"-\")+1,floorplan[i].indexOf(\".\")).trim());\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public void printTable(String hint) {\r\n // creating iterator for HashMap \r\n synchronized (this) {\r\n LocalTime myDate = this.myObjDate;\r\n String string;\r\n System.out.println(\"in print table \");\r\n\r\n Iterator< HashMap.Entry< RoutingTableKey, RoutingTableInfo>> routingEntriesIterator = routingEntries.entrySet().iterator();\r\n\r\n String destAddress, nextipHost;\r\n // VirtualRouter.buffer.appendText(System.getProperty(\"line.separator\"));\r\n string = \"\\n|-------------------------------------------------------------------------------------------------------------------------|\\n\"\r\n + \" \" + hint + \" -- Last updated \" + myDate + \"\\n\"\r\n + \"|-------------------------------------------------------------------------------------------------------------------------|\\n\"\r\n + \"Dest Network\\t\\tnext ip-Host\\t\\tCost\\t\\tnextport\\t\\tmyPort\\t\\tActivated\\t\\tEstablished\\n\"\r\n + \"|-------------------------------------------------------------------------------------------------------------------------|\\n\";\r\n\r\n Platform.runLater(() -> {\r\n VirtualRouter.buffer.appendText(string);\r\n\r\n });\r\n\r\n while (routingEntriesIterator.hasNext()) {\r\n String string2;\r\n HashMap.Entry<RoutingTableKey, RoutingTableInfo> pair = (HashMap.Entry<RoutingTableKey, RoutingTableInfo>) routingEntriesIterator.next();\r\n\r\n destAddress = pair.getKey().getIp().getHostAddress() + \"-\" + pair.getKey().getHostname();\r\n nextipHost = pair.getValue().getNextipHost().getIp().getHostAddress() + \"-\" + pair.getValue().getNextipHost().getHostname();\r\n\r\n RoutingTableInfo destForwardingInfo = (RoutingTableInfo) pair.getValue();\r\n//bs ntb3 linet address btbi3to 3m berj3 forword slash bas destAddress.getHostName() 3m trj3 aw2et msln one.one.one.\r\n\r\n string2 = \"\" + destAddress + \"\\t\"\r\n + \"\" + nextipHost + \"\\t\\t\"\r\n + destForwardingInfo.cost + \"\\t\\t\"\r\n + \" \" + destForwardingInfo.nextHop + \"\\t\\t\"\r\n + \" \" + destForwardingInfo.port + \"\\t\\t\\t\"\r\n + \" \" + destForwardingInfo.activated + \"\\t\\t\"\r\n + \" \" + destForwardingInfo.established + \"\\t\\n\";\r\n // routerInterface.append(System.getProperty(\"line.separator\"));\r\n Platform.runLater(() -> {\r\n VirtualRouter.buffer.appendText(string2);\r\n\r\n });\r\n }\r\n Platform.runLater(() -> {\r\n VirtualRouter.buffer.appendText(\"|-------------------------------------------------------------------------------------------------------------------------|\\n\\n\");\r\n });\r\n }\r\n }", "public void travaille();", "void printTicketSeat(String soldSeat)\n {\n\tSystem.out.println(hostName + \",\" + threadName + \" got one ticket\");\n\n }", "public String toString() {\n\treturn \"gate \" + name + \" const \" + delay;\n }", "public String getSource() {\n/* 312 */ return getValue(\"source\");\n/* */ }", "public void addSDESInfo(RTCPSDES chunk) {\n int ci = 0;\n while (ci < chunk.items.length && chunk.items[ci].type != 1) {\n ci++;\n }\n String s = new String(chunk.items[ci].data);\n String sourceinfocname = null;\n if (this.sourceInfo != null) {\n sourceinfocname = this.sourceInfo.getCNAME();\n }\n if (!(this.sourceInfo == null || s.equals(sourceinfocname))) {\n this.sourceInfo.removeSSRC(this);\n this.sourceInfo = null;\n }\n if (this.sourceInfo == null) {\n this.sourceInfo = this.cache.sourceInfoCache.get(s, this.ours);\n this.sourceInfo.addSSRC(this);\n }\n if (chunk.items.length > 1) {\n for (int i = 0; i < chunk.items.length; i++) {\n s = new String(chunk.items[i].data);\n switch (chunk.items[i].type) {\n case 2:\n if (this.name != null) {\n this.name.setDescription(s);\n break;\n } else {\n this.name = new SourceDescription(2, s, 0, false);\n break;\n }\n case 3:\n if (this.email != null) {\n this.email.setDescription(s);\n break;\n } else {\n this.email = new SourceDescription(3, s, 0, false);\n break;\n }\n case 4:\n if (this.phone != null) {\n this.phone.setDescription(s);\n break;\n } else {\n this.phone = new SourceDescription(4, s, 0, false);\n break;\n }\n case 5:\n if (this.loc != null) {\n this.loc.setDescription(s);\n break;\n } else {\n this.loc = new SourceDescription(5, s, 0, false);\n break;\n }\n case 6:\n if (this.tool != null) {\n this.tool.setDescription(s);\n break;\n } else {\n this.tool = new SourceDescription(6, s, 0, false);\n break;\n }\n case 7:\n if (this.note != null) {\n this.note.setDescription(s);\n break;\n } else {\n this.note = new SourceDescription(7, s, 0, false);\n break;\n }\n case 8:\n if (this.priv != null) {\n this.priv.setDescription(s);\n break;\n } else {\n this.priv = new SourceDescription(8, s, 0, false);\n break;\n }\n default:\n break;\n }\n }\n }\n }", "private void addHeader() {\n \n \t\t// StartNr; Namn; #Varv; Totaltid; Varv1; Varv2; Varv3; Start;\n \t\t// Varvning1; Varvning2; Mål\n \n \t\tsb.append(\"Plac; StartNr; Namn; #Varv; Totaltid; \");\n \t\tfor (int i = 0; i < maxNbrOfLaps; i++) {\n \t\t\tsb.append(\"Varv\");\n \t\t\tsb.append(i + 1 + \"; \");\n \t\t}\n \t\tsb.append(\"\\n\");\n \t}", "private static List<Layout> parseLayout(String source) throws IOException{\n FileReader file = new FileReader(source);\n reader = new BufferedReader(file);\n List<Layout> layouts = new ArrayList<>();\n\n String line;\n\n while((line = reader.readLine()) != null){\n // first line - city + zip\n List<String> verticalStreets = new ArrayList<>();\n List<String> horizontalStreets = new ArrayList<>();\n\n String city = line.substring(line.indexOf(\":\") + 2, line.indexOf(\",\"));\n String zip = line.substring(line.indexOf(\",\") + 2);\n\n getStreets(verticalStreets);\n\n reader.readLine();\n getStreets(horizontalStreets);\n\n layouts.add(new Layout(city, zip, verticalStreets, horizontalStreets));\n }\n\n return layouts;\n }", "@GET(\"v2/top-headlines?country=us&apiKey=\"+ Common.API_KEY)\n Call<Website>getSources();", "public interface Elevator {\n public static final int UP = 1, LEVEL = 0, DOWN = -1, ERROR = -2;\n /** Returns the minimal floor number to which this Elevator can reach(often a negative value).\n * This is the same value as the lowest floor in the building - this elevator belongs to. */\n public int getMinFloor();\n /** Returns the maximal floor number to which this Elevator can reach.\n * This is the same value as the highest floor in the building - this elevator belongs to. */\n public int getMaxFloor();\n /** Returns the time (in seconds it takes the Elevator to open its doors. */\n public double getTimeForOpen();\n /** Returns the time (in seconds it takes the Elevator to close its doors */\n public double getTimeForClose();\n /** Returns the Elavator's current state: {UP, DOWN, LEVEL, ERROR} the state \"LEVEL\" mark that the elevator has reached the floor -\n * and is now ready to load / unload and get new orders. */\n public int getState(); // UP, DOWN, LEVEL, ERROR\n /** Returns the Elevator's current position (floor) as an Integer. */\n public int getPos();\n /** Moves the elevator form the current position to the destination floor. */\n public boolean goTo(int floor);\n /** Allows the elevator to stop in an intermidiate floor between src and dest, assumeing the elevator has not yer pass the desired floor in which it needs to stop. */\n public boolean stop(int floor);\n /** Returns the speed (in floor per second), e.g. if the Elevator speed is 0.4 - it takes it 2.5 seconds to pass a single floor. */\n public double getSpeed();\n /** Return the time in seconds that it takes the elevator to start moving in full speed (assumed to be a fixed value). */\n public double getStartTime();\n /** Return the time in seconds that it takes the elevator to stop moving in full speed (assumed to be a fixed value).*/\n public double getStopTime();\n /**\n * @return the id of this elevator (simple index as in the building).\n * Note: this index should be the same as in the elevator allocation algorithm.\n */\n public int getID();\n}", "public String toString(){\r\n return \"Local : \"+ idLocal + \" sigle : \"+ sigle +\" places : \"+ places + \" description : \"+ description;\r\n }" ]
[ "0.5720252", "0.5136458", "0.50919265", "0.5075193", "0.5057099", "0.5032238", "0.49975657", "0.49799502", "0.49694577", "0.49273974", "0.492036", "0.49197355", "0.4916502", "0.49148566", "0.49025157", "0.49009246", "0.48863333", "0.4863715", "0.4863658", "0.48629946", "0.48553535", "0.4854803", "0.48244932", "0.48136815", "0.48053777", "0.47993955", "0.47975776", "0.47923532", "0.4791456", "0.47881967", "0.4767194", "0.4764993", "0.4757452", "0.47524345", "0.47353345", "0.47276625", "0.47163862", "0.4714928", "0.47124988", "0.4704845", "0.4696989", "0.46865788", "0.4683222", "0.4672175", "0.4663616", "0.46627605", "0.46587825", "0.46566257", "0.46558148", "0.46478954", "0.4639638", "0.46372312", "0.46371984", "0.463381", "0.46334368", "0.46319896", "0.46280244", "0.46253735", "0.46219835", "0.46218854", "0.46189013", "0.46181077", "0.46042606", "0.46022457", "0.45993918", "0.45985314", "0.459191", "0.4586299", "0.45855263", "0.4584415", "0.45788103", "0.45757213", "0.457566", "0.45712662", "0.45708707", "0.456681", "0.45641163", "0.45610356", "0.45590997", "0.4557642", "0.45555395", "0.45555395", "0.45529762", "0.45515332", "0.45500815", "0.45436588", "0.4540627", "0.45402488", "0.45385236", "0.4537792", "0.45362306", "0.45317063", "0.4529742", "0.452804", "0.4520285", "0.4519885", "0.4518044", "0.4515806", "0.4512193", "0.45108962", "0.4506898" ]
0.0
-1
Produce a sequence [start..end)
public static int[] range(int start, int end) { int sz = end - start; int[] result = new int[sz]; for (int i = 0; i < sz; i++) result[i] = start + i; return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int[] range(int start, int end) {\n int size = end - start;\n int[] result = new int[size];\n for (int i = 0; i < size; i++) {\n result[i] = start + i;\n }\n return result;\n }", "public IRubyObject subseq(long beg, long len) {\n if (beg < 0 || beg > getSize() || len < 0) {\n getRuntime().getNil();\n }\n \n if (beg + len > getSize()) {\n len = getSize() - beg;\n }\n if (len < 0) {\n len = 0;\n }\n if (len == 0) {\n return getRuntime().newArray();\n }\n \n RubyArray arr = getRuntime().newArray(0);\n for (long i = beg; i < beg + len; i++) {\n arr.append(group(i));\n }\n return arr;\n }", "ISequence sequence();", "public AppendableCharSequence subSequence(int start, int end)\r\n/* 39: */ {\r\n/* 40: 52 */ return new AppendableCharSequence(Arrays.copyOfRange(this.chars, start, end));\r\n/* 41: */ }", "Sequence createSequence();", "public static PersistentQueueX<Integer> range(final int start, final int end) {\n return ReactiveSeq.range(start, end).to()\n .persistentQueueX(Evaluation.LAZY);\n }", "Range createRange();", "protected static int[] range(int start, int end_incl) {\n int[] arr = new int[end_incl - start + 1];\n for(int num = start, id = 0; num <= end_incl; num++, id++)\n arr[id] = num;\n return arr;\n }", "public static int[] range(int start, int end, int step) {\r\n int sz = (end - start) / step;\r\n int[] result = new int[sz];\r\n for (int i = 0; i < sz; i++)\r\n result[i] = start + (i * step);\r\n return result;\r\n }", "public static List <Index> rangeOf(int start, int end) {\r\n FastTable <Index> list = FastTable.newInstance();\r\n for (int i=start; i < end; i++) {\r\n list.add(Index.valueOf(i));\r\n }\r\n return list;\r\n }", "public static int[] range(int start, int end, int step) {\n int size = (end - start) / step;\n int[] result = new int[size];\n for (int i = 0; i < size; i++) {\n result[i] = start + (i * step);\n }\n return result;\n }", "public static Automaton.List rangeOf(Automaton automaton,\n\t\t\tAutomaton.Int _start, Automaton.Int _end) {\n\t\t// FIXME: there is a bug here for big integer values.\n\t\tint start = _start.intValue();\n\t\tint end = _end.intValue();\n\t\tint[] children = new int[end - start];\n\t\tfor (int i = 0; i < children.length; ++i, ++start) {\n\t\t\tchildren[i] = automaton.add(new Automaton.Int(start));\n\t\t}\n\t\treturn new Automaton.List(children);\n\t}", "public static int[] getArray( int start, int end ) {\n int[] array = new int[ (end - start) + 1 ];\n for (int i = 0; i <= (end - start); i++) {\n array[i] = start + i;\n }\n return array;\n }", "public CharSequence subSequence(int aStart, int anEnd)\n {\n return _xstr.subSequence(_start + aStart, _start + anEnd);\n }", "public SequenceRegion interval(Sequence start, Sequence stop) {\n\t/* Ravi thingToDo. */\n\t/* use a single constructor */\n\t/* Performance */\n\treturn (SequenceRegion) ((above(start, true)).intersect((below(stop, false))));\n/*\nudanax-top.st:15693:SequenceSpace methodsFor: 'making'!\n{SequenceRegion CLIENT} interval: start {Sequence} with: stop {Sequence}\n\t\"Return a region of all sequence >= lower and < upper.\"\n\t\n\t\"Ravi thingToDo.\" \"use a single constructor\" \"Performance\"\n\t^((self above: start with: true)\n\t\tintersect: (self below: stop with: false)) cast: SequenceRegion!\n*/\n}", "String getBeginRange();", "public static Value Seq(Value range) {\n UserObj obj = new Sequences(range, Integer.MAX_VALUE);\n return new UserValue(obj);\n }", "@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 }", "private List<Integer> allIntegerInRange(int start, int end) {\n\t\tList<Integer> range = new ArrayList<Integer>();\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\trange.add(i);\n\t\t}\n\n\t\treturn range;\n\t}", "private static int[] generateArray(int size, int startRange, int endRange) {\n\t\tint[] array = new int[size];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = (int)((Math.random()*(endRange - startRange + 1)) + startRange);\n\t\t}\n\t\treturn array;\n\t}", "CharSequence subSequence(int start, int end) throws IndexOutOfBoundsException;", "Range() {}", "abstract public Range createRange();", "private String select(int start, int end) {\n this.selection = null;\n\n if (start >= end) {\n //return sb.toString();\n return printList();\n }\n if (start < 0 || start > sb.length()) {\n //return sb.toString();\n return printList();\n }\n this.selection = new Selection(start, Math.min(end, sb.length()));\n\n //return sb.toString();\n return printList();\n }", "public Object apply(List<Object> args) {\n Integer s = (Integer)args.get(1);\n Integer e = (Integer)args.get(2);\n int start = s.intValue();\n int end = e.intValue(); \n Engine.Sequence<?> arg1 = ((Engine.Sequence<?>)args.get(0));\n Engine.Sequence<Item> result = new Engine.Sequence<Item>();\n\n for( int i = start - 1; i < end; i++ ){\n result.add((Item)arg1.get(i) );\n }\n return result;\n }", "@Override\n public final CharSequence subSequence(final int start, final int end) {\n return text.subSequence(start, end);\n }", "@Test\n public void testRangeMultipleIterations() {\n final int start = 1;\n final int max = 7;\n final int step = 2;\n\n final List<Integer> seq = new ArrayList<>();\n final IntegerSequence.Range r = IntegerSequence.range(start, max, step);\n\n final int numTimes = 3;\n for (int n = 0; n < numTimes; n++) {\n seq.clear();\n for (Integer i : r) {\n seq.add(i);\n }\n Assert.assertEquals(4, seq.size());\n Assert.assertEquals(seq.size(), r.size());\n }\n }", "public CharSequence subSequence(int from, int to) {\n return content.subSequence(from, to);\n }", "public static List<int[]> getArrays( int start, int end )\n {\n ArrayList<int[]> arrays = new ArrayList<int[]>( );\n for (int i = start; i <= end; i++ )\n {\n int[] arr = new int[1];\n arr[0] = i;\n arrays.add( arr );\n }\n \n return arrays;\n }", "public java.util.List<Todo> findAll(int start, int end);", "CollectionRange createCollectionRange();", "@Override\n public CharSequence subSequence(int start, int end) {\n return mString.subSequence(start, end);\n }", "@Override\r\n\tpublic CharSequence subSequence(int start, int end) {\n\t\tchar[] values = new char[end - start]; \r\n\t\t\r\n\t\tint k = 0;\r\n\t\tfor (int i = start; i < end; i++) {\r\n\t\t\tvalues[k++] = chars[i];\r\n\t\t}\r\n\t\t\r\n\t\treturn new StringTitle(values);\r\n\t}", "public void getRange()\n\t{\n\t\tint start = randInt(0, 9);\n\t\tint end = randInt(0, 9);\t\t\n\t\tint startNode = start<=end?start:end;\n\t\tint endNode = start>end?start:end;\n\t\tSystem.out.println(\"Start : \"+startNode+\" End : \"+endNode);\n\t}", "protected static Integer[] range(int from, int to) {\n if (from > to) {\n throw new IllegalArgumentException(\"from must be <= to (\" + from\n + \",\" + to + \")\");\n }\n int n = to - from + 1;\n Integer[] range = new Integer[n];\n for (int i = 0; i < n; i++) {\n range[i] = from + i;\n }\n return range;\n }", "String getEndRange();", "public ArrayList<String> start(String source, String target);", "private Sequence makeSequence(String[] sList, int index) {\r\n\t\tSequence s = new Sequence();\r\n\t\tfor(int i = 0; i<sList.length; i++) {\r\n\t\t\ts.addAfter(sList[i]);\r\n\t\t}\r\n\t\ts.start();\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\ts.advance();\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public abstract int start(int i);", "public abstract ucar.array.RangeIterator getRangeIterator();", "@Nonnull\r\n\tpublic static Observable<BigInteger> range(\r\n\t\t\t@Nonnull final BigInteger start,\r\n\t\t\t@Nonnull final BigInteger count) {\r\n\t\treturn range(start, count, scheduler());\r\n\t}", "public static PersistentQueueX<Long> rangeLong(final long start, final long end) {\n return ReactiveSeq.rangeLong(start, end).to()\n .persistentQueueX(Evaluation.LAZY);\n }", "public List<Long> generatePrimeInRange(long start, long till) {\n final List<Long> primes = new ArrayList<>(); // hold all primes from 1 to 'till'\n final List<Long> rangeList = new ArrayList<>(); // primes only within start and till\n LongStream.rangeClosed(0, till). // linear filtering mechanism\n filter(i -> isPrime(primes, i)).\n forEach(primes::add);\n // filter primes only between start and till\n primes.stream().filter(i -> i > start && i < till + 1).forEach(rangeList::add);\n return rangeList;\n }", "Buffer slice(int start, int length);", "public native RecordList getRangeAsRecordList(int start, int end) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordsJS = self.getRange(start, end);\r\n return (recordsJS == null || recordsJS === undefined) ? null :\r\n @com.smartgwt.client.data.RecordList::new(Lcom/google/gwt/core/client/JavaScriptObject;)(recordsJS);\r\n }-*/;", "int getRange();", "public Path select(int start, int end)\n\t{\n\t\tString newPath = \"\";\n\t\t\n\t\t\n\t\tif(this.isAbsolute() && start == 0){\n\t\t\tnewPath = \"/\";\n\t\t}\n\t\t\n\t\tfor(int i = start; i <= end; i++)\n\t\t{\n\t\t\tnewPath += this.elements.get(i) + \"/\";\n\t\t}\n\t\t\n\t\treturn new Path(newPath);\n\t}", "public interface IIntSequence extends IIntIterable {\n\n\tvoid copyTo(int[] dst, int dststart, int srcstart, int srcend);\n}", "public Integer oneToThis(int start, int ending){\n\t\tSystem.out.println(\"Print 1-255\");\n\t\twhile(start <= ending){\n\t\t\tSystem.out.println(start);\n\t\t\tstart++;\n\t\t}\n\t\treturn 0;\n\t}", "@Override\n public int[] next() {\n min = rand.nextInt(100);\n max = rand.nextInt(100);\n Thread.yield();\n if (min > max) max = min;\n int[] ia = {min, max};\n return ia;\n }", "@Nonnull\r\n\tpublic static Observable<Integer> range(\r\n\t\t\tfinal int start,\r\n\t\t\tfinal int count) {\r\n\t\treturn range(start, count, scheduler());\r\n\t}", "static ByteBuffer sliceFromTo(ByteBuffer source, int start, int end) {\n if (start < 0) {\n throw new IllegalArgumentException(\"start: \" + start);\n } else if (end >= start) {\n int capacity = source.capacity();\n if (end <= source.capacity()) {\n int originalLimit = source.limit();\n int originalPosition = source.position();\n try {\n source.position(0);\n source.limit(end);\n source.position(start);\n ByteBuffer result = source.slice();\n result.order(source.order());\n source.position(0);\n source.limit(originalLimit);\n source.position(originalPosition);\n return result;\n } catch (Throwable th) {\n source.position(0);\n source.limit(originalLimit);\n source.position(originalPosition);\n throw th;\n }\n } else {\n throw new IllegalArgumentException(\"end > capacity: \" + end + \" > \" + capacity);\n }\n } else {\n throw new IllegalArgumentException(\"end < start: \" + end + \" < \" + start);\n }\n }", "public List<Long> generatePrimeInRangeUsingParellelStream(long start, long till) {\n //Could have used CopyOnWrite list but think that would be inefficient.\n ConcurrentLinkedQueue<Long> primeQ = new ConcurrentLinkedQueue<Long>(); //using a threadsafe collection\n LongStream.rangeClosed(start, till).parallel(). // the filter and subsequent adding happens parallel for each number in the range\n filter(i -> isPrime(i)). //if prime number\n forEach(primeQ::add); // add to concurrent queue\n\n List<Long> primes = new ArrayList<>();\n //convert queue to list.\n primeQ.stream().forEach(primes::add);\n return primes;\n }", "public Set<String> zrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public static TimeRange fromStartToEnd(int start, int end, Calendar date) {\n return new TimeRange(start, end - start, date);\n }", "protected abstract R toRange(D lower, D upper);", "public static DoubleList arcTexCoords(final double start, final double end) {\n final int startIndex = normalizeIndex((int) Math.ceil(start));\n final int endIndex = normalizeIndex((int) Math.floor(end));\n final DoubleList texCoords = new ArrayDoubleList();\n // center point\n addPoint(texCoords, 0.5, 0.5);\n // end side\n double ax = Math.sin(Math.toRadians(end));\n double ay = Math.cos(Math.toRadians(end));\n // vertex\n addPoint(texCoords, 0.5 + (ax / 2.0), 0.5 + (ay / 2.0));\n // outer vertices\n for (int i = endIndex; i >= startIndex; i--) {\n // vertex\n addPoint(texCoords, 0.5 + (CIRCLE_POINTS[i][X] / 2.0), 0.5 + (CIRCLE_POINTS[i][Y] / 2.0));\n }\n // start side\n ax = Math.sin(Math.toRadians(start));\n ay = Math.cos(Math.toRadians(start));\n // vertex\n addPoint(texCoords, 0.5 + (ax / 2.0), 0.5 + (ay / 2.0));\n return texCoords;\n }", "java.lang.String getSeq();", "public static IntArrayList range(int startIncl, int endExcl) {\n IntArrayList result = new IntArrayList(endExcl - startIncl);\n result.elementsCount = endExcl - startIncl;\n for (int i = 0; i < result.size(); ++i)\n result.set(i, startIncl + i);\n return result;\n }", "@Override\r\n public String toString() \r\n {\n return \"[\" + getStart() + \", \" + getEnd() + \"]\";\r\n }", "public GeometryFacetSequence(CoordinateSequence pts, int start, int end) \r\n {\r\n this.pts = pts;\r\n this.start = start;\r\n this.end = end;\r\n }", "private void generate(ArrayList<Integer> literals, int start){\n if(start > numVar){\n Clause clause = new Clause();\n for(Integer i: literals){\n clause.addLiteral(i);\n }\n clauses.add(clause);\n return;\n }\n literals.add(start);\n generate(literals, start + 1);\n literals.remove(literals.size() - 1);\n literals.add(-1 * start);\n generate(literals, start + 1);\n literals.remove(literals.size() - 1);\n }", "@Nonnull\r\n\tpublic static Observable<BigInteger> range(\r\n\t\t\t@Nonnull final BigInteger start,\r\n\t\t\t@Nonnull final BigInteger count,\r\n\t\t\t@Nonnull final Scheduler pool) {\r\n\t\treturn new Range.AsBigInteger(start, count, pool);\r\n\t}", "public static byte[] setRange(byte[] source, byte[] destination, int start){\n for(int i=start; i < start+source.length; i++) \n destination[i]=source[i-start];\n \n return destination;\n }", "public SequenceRegion sequencesPrefixedBy(Sequence sequence, int limit) {\n\tthrow new PasseException();\n/*\nudanax-top.st:15751:SequenceSpace methodsFor: 'smalltalk: passe'!\n{SequenceRegion} sequencesPrefixedBy: sequence {Sequence}\n\twith: limit {IntegerVar}\n\t\"Essential. All sequences which match the given one up to and including the given index.\n\tShould this just be supplanted by CoordinateSpace::region ()?\"\n\tself passe.\n\t^SequenceRegion usingx: false\n\t\twith: (PrimSpec pointer\n\t\t\tarrayWithTwo: (BeforeSequencePrefix below: sequence with: limit)\n\t\t\twith: (BeforeSequencePrefix above: sequence with: limit))!\n*/\n}", "public List<String> lrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.lrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "@Nonnull \r\n\tpublic static Observable<Integer> range(\r\n\t\t\tfinal int start,\r\n\t\t\tfinal int count,\r\n\t\t\t@Nonnull final Scheduler pool) {\r\n\t\treturn new Range.AsInt(start, count, pool);\r\n\t}", "SequenceOfStatements getSequenceOfStatements();", "public java.util.List<PlanoSaude> findAll(int start, int end);", "public abstract int end(int i);", "public String substring(int start, int end)\r\n/* 99: */ {\r\n/* 100:117 */ int length = end - start;\r\n/* 101:118 */ if ((start > this.pos) || (length > this.pos)) {\r\n/* 102:119 */ throw new IndexOutOfBoundsException();\r\n/* 103: */ }\r\n/* 104:121 */ return new String(this.chars, start, length);\r\n/* 105: */ }", "List<Videogioco> doRetriveVideogiocoAllRange(int min, int max);", "public static int[] range(int n) {\n int[] result = new int[n];\n for (int i = 0; i < n; i++) {\n result[i] = i;\n }\n return result;\n }", "public int[] Version1(int[] seq){\n \n return seq;\n \n }", "public static int[] generateSequence(String arguments[]){\n int size = Integer.parseInt(arguments[1]);\n int i;\n int primeArray[] = new int[size];\n PrimeSequence prime = new PrimeSequence(Integer.parseInt(arguments[0]));\n \n for(i = 0; i < size; i++){\n primeArray[i] = prime.next();\n } \n return primeArray;\n \n }", "<C> CollectionRange<C> createCollectionRange();", "public static List<Integer> streamRange(int from, int limit)\r\n\t{\r\n\r\n\t\treturn IntStream.range(from, from + limit)\r\n\t\t\t\t.boxed()\r\n\t\t\t\t.collect(toList());\r\n\t}", "ButEnd getStart();", "@Override\n public String[] getMessages(int begin, int end) {\n if (begin > end)\n throw new IllegalArgumentException(\"The begin parameter should be smaller \"\n + \"than the end parameter\");\n if (begin < 0 || end >= messages.size())\n throw new IllegalArgumentException(\"The given begin-end interval is not \"\n + \"a subset of the index-range of the messages.\");\n List<String> result = new ArrayList<>();\n for (int i = begin; i<=end; i++)\n result.add(messages.get(i));\n return result.toArray(new String[0]);\n }", "public static long[] copyOfRange(long[] original, int from, int to)\r\n\t{\r\n\t\tif (from > to)\r\n\t\t\tthrow new IllegalArgumentException(\"The initial index is after \" +\r\n\t\t\t\t\t\"the final index.\");\r\n\t\tlong[] newArray = new long[to - from];\r\n\t\tif (to > original.length)\r\n\t\t{\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0,\r\n\t\t\t\t\toriginal.length - from);\r\n\t\t\tArrays.fill(newArray, original.length, newArray.length, 0L);\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.arraycopy(original, from, newArray, 0, to - from);\r\n\t\treturn newArray;\r\n\t}", "public int[] start() {\n\t\treturn null;\n\t}", "private void reverse(int[] nums, int start, int end) {\n\t\twhile(start<end)\n\t\t{\n\t\t\tswap(nums,start++,end--);\n\t\t}\n\t}", "@Override\r\n\tpublic Buffer slice(int start, int end) {\n\t\t\r\n\t\treturn null;\r\n\t}", "public List<Word> getWordsStartingAt(int start);", "public GeometryFacetSequence(CoordinateSequence pts, int start) \r\n {\r\n this.pts = pts;\r\n this.start = start;\r\n this.end = start + 1;\r\n }", "public Strand getSubStrand(int start, int end) throws BaseException\n {\n Base[] newBases;\n //TODO: create a new array of bases that is a substrand of the\n // current strand. The index start should be included, but not\n // end. Don't worry about index out of bounds errors.\n // Store the result in newBases.\n //Remove the following line -- it is for default compilation.\n newBases = new Base[]{};\n \n return new Strand(type, newBases);\n }", "AstroArg seq(AstroArg first,\n AstroArg second,\n AstroArg third,\n AstroArg fourth);", "public static byte[] setRange(byte[] source, byte[] destination, int start, int end ){\n for(int i=start; i <= end; i++)\n destination[i]=source[i-start];\n return destination;\n }", "iterator(){current = start;}", "public static byte[] subbytes(byte[] data, int start, int end) {\r\n byte[] out = new byte[end - start];\r\n\r\n int outi = 0;\r\n for (int i = start; i < end; i++, outi++) {\r\n out[outi] = data[i];\r\n }\r\n\r\n return out;\r\n }", "Iterator<T> iterator(int start, int limit);", "private int randBetween(int start, int end) {\n\t\treturn start + (int)Math.round(Math.random() * (end - start));\n\t}", "@Nonnull\r\n\tpublic static Observable<Long> range(\r\n\t\t\tfinal long start,\r\n\t\t\tfinal long count) {\r\n\t\treturn range(start, count, scheduler());\r\n\t}", "private static void passoutNum(int start, int end) {\n\t\tlindOfNum(0, start);\n\n\t\tif(start == end) {\n\t\t\t//System.out.println(end);\n\t\t\treturn;\n\t\t}\n\t\t//System.out.print(start);\n\t\tpassoutNum(start + 1, end);\n\t\tlindOfNum(0, start);\n\n\t}", "public IRubyObject aref(IRubyObject[] args) {\n int argc = checkArgumentCount(args, 1, 2);\n if (argc == 2) {\n int beg = RubyNumeric.fix2int(args[0]);\n int len = RubyNumeric.fix2int(args[1]);\n if (beg < 0) {\n beg += getSize();\n }\n return subseq(beg, len);\n }\n if (args[0] instanceof RubyFixnum) {\n return group(RubyNumeric.fix2int(args[0]));\n }\n if (args[0] instanceof RubyBignum) {\n throw getRuntime().newIndexError(\"index too big\");\n }\n if (args[0] instanceof RubyRange) {\n long[] begLen = ((RubyRange) args[0]).getBeginLength(getSize(), true, false);\n if (begLen == null) {\n return getRuntime().getNil();\n }\n return subseq(begLen[0], begLen[1]);\n }\n return group(RubyNumeric.num2long(args[0]));\n }", "protected int[] resubset(int start, int length) {\n\t\tint[] tmp = new int[length];\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\ttmp[i] = subset[start + i];\n\t\t}\n\t\treturn tmp;\n\t}", "private Range() {}", "public Strand getSubStrand(int start) throws BaseException\n {\n return getSubStrand(start, seq.length);\n }", "protected static int[] composeRange(int... pairs) {\n if(pairs.length % 2 != 0)\n throw new IllegalArgumentException(\"Pairs has to be a multiple of 2!\");\n\n List<Integer> nums = new ArrayList<>();\n\n for(int start = 0, end = 1; end < pairs.length; start+=2, end+=2) {\n int[] semiRange = range(pairs[start], pairs[end]);\n for(Integer i : semiRange)\n nums.add(i); //potencjalna optymalizacja: dodac caly array do listy\n }\n\n //potencjalna optymalizacja: zwrocic bezposrednio z listy\n int[] finalRange = new int[nums.size()];\n for(int id = 0; id < nums.size(); id++)\n finalRange[id] = nums.get(id);\n\n return finalRange;\n }", "public static IntArrayList rangeClosed(int startIncl, int endIncl) {\n return range(startIncl, endIncl + 1);\n }" ]
[ "0.657333", "0.62421364", "0.6208041", "0.6129728", "0.6120763", "0.6119246", "0.6040709", "0.6008991", "0.5986253", "0.5980836", "0.5963292", "0.59006727", "0.5890341", "0.5885607", "0.58084244", "0.5801253", "0.5752453", "0.5712136", "0.56339467", "0.5625254", "0.5602767", "0.5565922", "0.5475938", "0.5470227", "0.54488826", "0.54444957", "0.54401", "0.5437886", "0.54340714", "0.5388705", "0.5388394", "0.53826", "0.5376199", "0.53691065", "0.5353208", "0.5346135", "0.532733", "0.5310507", "0.5290094", "0.5284385", "0.52665895", "0.5249855", "0.5209675", "0.5202757", "0.5200543", "0.51829463", "0.51789516", "0.51458436", "0.51306486", "0.513026", "0.5116965", "0.511648", "0.5114134", "0.51126873", "0.5098693", "0.50958014", "0.50899625", "0.50743663", "0.5072713", "0.506788", "0.5057878", "0.50555235", "0.5047766", "0.5042959", "0.503616", "0.50235", "0.50205886", "0.50177217", "0.50149655", "0.49996734", "0.49984384", "0.49973726", "0.49961087", "0.49927825", "0.49888554", "0.49840975", "0.4972261", "0.49675748", "0.4954642", "0.49525386", "0.49509844", "0.49495164", "0.49494708", "0.4947692", "0.49460542", "0.49247324", "0.49175075", "0.49172115", "0.491483", "0.49082872", "0.48964578", "0.48830566", "0.4882926", "0.48776376", "0.487763", "0.4871441", "0.48714077", "0.486336", "0.48633003", "0.48576155" ]
0.65726316
1
Produce a sequence [start..end) incrementing by step
public static int[] range(int start, int end, int step) { int sz = (end - start) / step; int[] result = new int[sz]; for (int i = 0; i < sz; i++) result[i] = start + (i * step); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int start(int i);", "int stepsToGo();", "public static int[] range(int start, int end, int step) {\n int size = (end - start) / step;\n int[] result = new int[size];\n for (int i = 0; i < size; i++) {\n result[i] = start + (i * step);\n }\n return result;\n }", "For(int first, int last, int step) {\n\t\tthis.first = first;\n\t\tthis.step = step;\n\t\tthis.last = last;\n\t\tcountFor++;\n\t}", "@Override\n\tpublic void run() {\n\t\tresult =\n\t\t\tStream.iterate(new int[]{0, 1}, s -> new int[]{s[1], s[0] + s[1]})\n\t\t\t\t.limit(limit)\n\t\t\t\t.map(n -> n[0])\n\t\t\t\t.collect(toList());\n\n\t}", "Sequence createSequence();", "public void printForward(){\n int k=start;\n for(int i=0;i<size;i++){\n System.out.print(cir[k]+\",\");\n k=(k+1)%cir.length;\n }\n System.out.println();\n }", "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 }", "@Test\n public void testRangeMultipleIterations() {\n final int start = 1;\n final int max = 7;\n final int step = 2;\n\n final List<Integer> seq = new ArrayList<>();\n final IntegerSequence.Range r = IntegerSequence.range(start, max, step);\n\n final int numTimes = 3;\n for (int n = 0; n < numTimes; n++) {\n seq.clear();\n for (Integer i : r) {\n seq.add(i);\n }\n Assert.assertEquals(4, seq.size());\n Assert.assertEquals(seq.size(), r.size());\n }\n }", "public Generator<int[]> griddify(final double[] quad, final int steps){\n\n Generator<int[]> iterator = new Generator<int[]>() {\n\n @Override\n public void run() {\n double w = quad[2]-quad[0];\n double h = quad[3]-quad[1];\n double x_step = w / steps;\n double y_step = h / steps;\n\n double y = quad[1];\n for (int a : Python.range(steps)){\n double x = quad[0];\n for (int b : Python.range(steps)){\n yield (new int[]{cint(x), cint(y), cint(x+x_step), cint(y+y_step)});\n x += x_step;\n }\n y += y_step;\n }\n }\n };\n\n return iterator;\n }", "java.lang.String getNextStep();", "public int getNextUnSafeSequence(){ return value++;}", "private static void passoutNum(int start, int end) {\n\t\tlindOfNum(0, start);\n\n\t\tif(start == end) {\n\t\t\t//System.out.println(end);\n\t\t\treturn;\n\t\t}\n\t\t//System.out.print(start);\n\t\tpassoutNum(start + 1, end);\n\t\tlindOfNum(0, start);\n\n\t}", "public abstract void increment(int delta);", "ISequence sequence();", "public String nextStep();", "public void step(long t) {\n\n\t}", "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 static String getNextSeq(String seq) {\n long intNextSeq = 0;\n// if (intSeq < 204) {\n// intNextSeq = Long.parseLong(seq)+1;\n// }\n// if (intSeq == 204) {\n// seq = seq.substring(0, seq.length() - 3);\n// SimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n// Date date = null;\n// try {\n// date = sdf.parse(seq);\n// } catch (ParseException e) {\n// e.printStackTrace();\n// }\n// Date date2 = DateUtils.addDays(date, 1);\n// String nextDate = sdf.format(date2) + \"000\";\n// intNextSeq = Long.parseLong(nextDate);\n// intNextSeq = intNextSeq + 1;\n// }\n return intNextSeq+\"\";\n }", "public static void upToNumber(int start) {\n\t\tSystem.out.println(start);\n\t\tstart-=1;\n\t\tif (start < 0)\n\t\t\treturn;\n\t\tupToNumber(start);\n\t}", "int getSequenceStepsCount();", "private void nextMovement()\n\t{\n\t\tif(SEQUENCE.length <= 1)\n\t\t\tSEQUENCE = null;\n\t\telse\n\t\t{\n\t\t\tint[] temp = new int[SEQUENCE.length - 1];\n\t\t\tfor(int i = 1; i < SEQUENCE.length; i++)\n\t\t\t{\n\t\t\t\ttemp[i-1] = SEQUENCE[i];\n\t\t\t}\n\t\t\tSEQUENCE = temp;\n\t\t}\n\t}", "void increase();", "void increase();", "@Nonnull\r\n\tpublic static Observable<BigDecimal> range(\r\n\t\t\t@Nonnull final BigDecimal start,\r\n\t\t\tfinal int count,\r\n\t\t\t@Nonnull final BigDecimal step) {\r\n\t\treturn range(start, count, step, scheduler());\r\n\t}", "abstract int steps();", "public void advanceSimulation () {\n\t\tstep_++;\n\t}", "public void streamIterate(){\n Stream.iterate(new int[]{0, 1},t -> new int[]{t[1], t[0]+t[1]})\n .limit(20)\n .forEach(t -> System.out.println(\"(\" + t[0] + \",\" + t[1] +\")\"));\n /*\n In Java 9, the iterate method was enhanced with support for a predicate.\n For example, you can generate numbers starting at 0 but stop the iteration once the number is greater than 100:\n * */\n IntStream.iterate(0, n -> n < 100, n -> n + 4)\n .forEach(System.out::println);\n }", "void move(int steps);", "public interface Incrementor {\n\t\tpublic void incrementTransition (TransitionIterator ti, double count);\n\t\tpublic void incrementInitialState (State s, double count);\n\t\tpublic void incrementFinalState (State s, double count);\n\t}", "float getStepPhaseShiftIncrement();", "protected abstract void stepImpl( long stepMicros );", "public static void main(String[] args) {\n\t\tint start = 100;\r\n\t\tint end = 1;\r\n\t\t//int add = 1;\r\n\t\twhile (start>=end) {\r\n\t\t\tSystem.out.println(start);\r\n\t\t\t//start = start - add;\r\n\t\t\tstart--;\r\n\t\t}\r\n\t}", "public double generate(double finalVal, long totalSteps, long currentStep) {\r\n double nextVal = 0.0;\r\n double slope = 0.0; \r\n \r\n // Initial step for ramp\r\n if (currentStep == 1)\r\n \t// Store the current value to adjust the starting point of the ramp\r\n \tinitVal = finalVal; \r\n \r\n // Linear\r\n // Determine the slope of the equation\r\n slope = (0 - initVal)/totalSteps;\r\n\r\n // Generate the next value\r\n nextVal = slope * currentStep + initVal;\r\n \r\n // At the end of the ramp so set the isDone flag true\r\n if (currentStep >= totalSteps)\r\n isDone = true;\r\n \r\n return nextVal; \r\n }", "private int advance(int[] n, int i) {\n i += n[i];\n i%=len;\n while (i<0) i+=len;\n return i;\n }", "public int[] seriesUp(int n) {\n int[] arr = new int[n * (n+1) / 2];\n int num = n, counter = 1;\n \n \n for (int i = arr.length - 1; i >= 0; i--) {\n if (num == 0) {\n num = n - counter;\n counter++;\n }\n arr[i] = num;\n num--;\n }\n \n return arr;\n }", "@Nonnull\r\n\tpublic static Observable<Double> range(\r\n\t\t\tfinal double start,\r\n\t\t\tfinal int count,\r\n\t\t\tfinal double step) {\r\n\t\treturn range(start, count, step, scheduler());\r\n\t}", "Iterator<T> iterator(int start, int limit);", "private int moveForward(int i, int s) {\n if (i + s >= items.length) {\n return ((i + s) - items.length);\n }\n return i + s;\n }", "public Move(int from, int to, int step) {\n this.to = to;\n this.from = from;\n this.step = step;\n }", "public static void sequence(int n)\n { \n int x = n;\n if(n == 1)\n {\n System.out.print(1);\n }\n else\n { \n System.out.print(n + \" \"); \n sequence(next(x)); \n }\n }", "public void step();", "public void step();", "int getNextStep() {\n if (!includedInLastStep()) {\n return nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter;\n } else {\n start = end + 1;\n if (knuthIter.hasNext()) {\n goToNextLegalBreak();\n return nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter; \n } else {\n return -1;\n }\n }\n }", "static void nextIteration(Configuration conf) {\n conf.setInt(STEP_PROP, getCurrentIteration(conf)+1);\n }", "public GeometryFacetSequence(CoordinateSequence pts, int start) \r\n {\r\n this.pts = pts;\r\n this.start = start;\r\n this.end = start + 1;\r\n }", "public int step() {\n // PUT YOUR CODE HERE\n }", "public void next(){\n\t\tif(generated)\n\t\t\tcurr++;\n\t}", "public abstract void nextAnimationStep();", "SequenceFlow createSequenceFlow();", "public static void fill(int[] array,int start,int ende){\n\tfor (int c=0; c<array.length; c++){\r\n\t\tRandom rand = new Random(); \r\n\t\tarray[c] = rand.nextInt(ende+1-start) + start;\r\n\t}\r\n\tSystem.out.print(\"\\n\");\r\n}", "int getStep();", "int getStep();", "int getStep();", "public void takeStep() {\n \t//System.out.println(\"\"+Math.abs(rmd.nextInt()%4));\n \tswitch(rmd.nextInt(4)){\t\n \tcase 0:\n \t\tcurPoint = curPoint.translate(-stepSize, 0);//go right\n \t\tbreak;\n \tcase 1:\n \t\tcurPoint = curPoint.translate(0, stepSize);//go down\n \t\tbreak;\n \tcase 2:\n \t\tcurPoint = curPoint.translate(stepSize, 0);//go left\n \t\tbreak;\n \tcase 3:\n \t\tcurPoint = curPoint.translate(0, -stepSize);//go up\n \t\tbreak;\n \t}\n }", "public void nextIteration() {t++;}", "iterator(){current = start;}", "public void increment() {\n increment(1);\n }", "public void step() {\n\t\tw.step(timeStep, iterations);\r\n\t}", "public abstract int end(int i);", "public void stepForward() {\n\t\tposition = forwardPosition();\n\t}", "public void printRangeFibonacci() {\n BigInteger before = BigInteger.valueOf(0);\n BigInteger current = BigInteger.valueOf(1);\n BigInteger next = BigInteger.valueOf(1);\n for (int i = 2; i <= finish; i++) {\n next = current.add(before);\n before = current;\n current = next;\n\n if (i >= start && i <= finish) {\n String delimiter = i == finish ? \"\" : \", \";\n out.print(before + delimiter);\n }\n }\n }", "@Override\n protected Z advanceG(final long k) {\n return Z.valueOf(5 * k - 2); // mSeqG.next();\n }", "public Iterable<Integer> cycle(){\n return cycle;\n }", "void countUp(int start, int stop) {\n if (start > stop) {\n System.out.println(\"Start value must be less than stop\");\n return;\n }\n //Print the value of start to console\n System.out.println(start); // 1\n\n //add one to value of start on the console\n start++; //start 2\n\n if(start <= stop) {\n countUp(start, stop);\n }\n return;\n }", "public void next(){\n if(stageNum < (defineStageNum)) {\n stageNum++;\n }else {\n stageNum = startStageNum;\n }\n }", "private void generate(ArrayList<Integer> literals, int start){\n if(start > numVar){\n Clause clause = new Clause();\n for(Integer i: literals){\n clause.addLiteral(i);\n }\n clauses.add(clause);\n return;\n }\n literals.add(start);\n generate(literals, start + 1);\n literals.remove(literals.size() - 1);\n literals.add(-1 * start);\n generate(literals, start + 1);\n literals.remove(literals.size() - 1);\n }", "@Override\n\tpublic int sequence() {\n\t\treturn 0;\n\t}", "public int getIteration();", "public void startNumberMethod(int startNumber) {\n for (int i = startNumber; i <= 100; i++) {\n System.out.println(i);\n }\n }", "public void testNext() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.getValue().inRange(0));\n test1.next();\n assertTrue(test1.getValue().inRange(1));\n test1.next();\n assertTrue(test1.getValue().inRange(2));\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertEquals(10, test1.currPos());\n }", "public int[] getNext() {\n\n if (numLeft.equals(total)) {\n numLeft = numLeft.subtract(BigInteger.ONE);\n return a;\n }\n\n int i = r - 1;\n while (a[i] == n - r + i) {\n i--;\n }\n a[i] = a[i] + 1;\n for (int j = i + 1; j < r; j++) {\n a[j] = a[i] + j - i;\n }\n\n numLeft = numLeft.subtract(BigInteger.ONE);\n return a;\n }", "public static long sequentialSum(long n) {\n return Stream.iterate(1L, num -> num + 1)\n .limit(n)\n .reduce(0L, Long::sum);\n }", "protected void end() {\n \tclimber.ascend(0, 0);\n }", "public abstract void extendSequence (int k);", "public interface Sequence {\n\n public String getValue();\n\n public void setCounter(long counter);\n\n public String getName();\n\n public int getStartsWith();\n\n public int getIncrementBy();\n\n}", "public void applySequence(Sequence seq) {\n List<Game> games = seq.getGames();\n int nextStart = 0;\n for (Game game : games) {\n game.setStart(nextStart);\n nextStart += game.getDuration();\n }\n tau.setStart(nextStart);\n sequence = seq;\n }", "public void step(long now) {\n\t}", "private Sequence makeSequence(String[] sList, int index) {\r\n\t\tSequence s = new Sequence();\r\n\t\tfor(int i = 0; i<sList.length; i++) {\r\n\t\t\ts.addAfter(sList[i]);\r\n\t\t}\r\n\t\ts.start();\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\ts.advance();\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "private int getIncrement(int from, int to) {\n if (from < to) {\n return 1;\n } else if (from > to) {\n return -1;\n } else {\n return 0;\n }\n }", "FlowSequence createFlowSequence();", "public Integer oneToThis(int start, int ending){\n\t\tSystem.out.println(\"Print 1-255\");\n\t\twhile(start <= ending){\n\t\t\tSystem.out.println(start);\n\t\t\tstart++;\n\t\t}\n\t\treturn 0;\n\t}", "private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }", "public static PersistentQueueX<Integer> range(final int start, final int end) {\n return ReactiveSeq.range(start, end).to()\n .persistentQueueX(Evaluation.LAZY);\n }", "public int generate(int k) {\n int result = 0;\n\n for (int i = 0; i < k; i++) {\n result = 2 * result + step();\n }\n return result;\n }", "public void advance(int factor)\n {\n int length = this.getMorphCount();\n this.resetTime();\n\n if (length == 0)\n {\n return;\n }\n\n this.index += factor;\n this.index = MathHelper.clamp_int(this.index, -1, length - 1);\n }", "public void increaseStartPos(int num) {\r\n this.startPos += num;\r\n }", "public Object apply(List<Object> args) {\n Integer s = (Integer)args.get(1);\n Integer e = (Integer)args.get(2);\n int start = s.intValue();\n int end = e.intValue(); \n Engine.Sequence<?> arg1 = ((Engine.Sequence<?>)args.get(0));\n Engine.Sequence<Item> result = new Engine.Sequence<Item>();\n\n for( int i = start - 1; i < end; i++ ){\n result.add((Item)arg1.get(i) );\n }\n return result;\n }", "private int plusOne(int i) {\n return (i + 1) % capacity;\n }", "public void nextIteration()\n {\n actuelIteration++;\n }", "public void inc(){\n this.current += 1;\n }", "void start() {\n \tm_e.step(); // 1, 3\n }", "Range createRange();", "public static int[] stepThisNumber(int number, int step) {\n\t\t/* uso de ArrayList en vez de array por no saber de antemano el tamaño del mismo*/\n\t\tList<Integer> lista= new ArrayList();\n\t\tint dato=number-step;\n\t\twhile(dato>0){\n\t\t\tlista.add(dato);\n\t\t\tdato=dato-step;\n\t\t}\n\t\t/* una vez ArrayList lleno ya se crea el array de enteros */\n\t\tint vector[]=new int[lista.size()];\n\t\tfor (int i=0;i<lista.size();i++)\n\t\t\tvector[i]=lista.get(i);\n\n\t\treturn vector;\n\t}", "public interface StepLis {\n\n public void step(long timeNs);\n}", "@Nonnull\r\n\tpublic static Observable<BigInteger> range(\r\n\t\t\t@Nonnull final BigInteger start,\r\n\t\t\t@Nonnull final BigInteger count) {\r\n\t\treturn range(start, count, scheduler());\r\n\t}", "public abstract void onLoadMore(int skipStart);", "static void increment() {\r\n\t\tfor (double i =2.4; i<=8.8; i=i+0.2) { \r\n\t\t\tSystem.out.format(\"%.1f %n \",i); //%.1f: to 1 decimal place. %n: print on a new line\r\n\t\t}\r\n\t}", "public abstract void goNext();", "public Order generateNext();" ]
[ "0.58164746", "0.5626008", "0.55599463", "0.5479498", "0.5458121", "0.53801787", "0.53502893", "0.5335004", "0.53279155", "0.5317905", "0.52157605", "0.5207281", "0.52070004", "0.5185423", "0.5144062", "0.51377946", "0.51322746", "0.5126923", "0.51210636", "0.5119446", "0.51065505", "0.51062256", "0.51046044", "0.51046044", "0.5095844", "0.5091325", "0.5084499", "0.5070195", "0.50608057", "0.5058753", "0.50475854", "0.5005586", "0.49732044", "0.49731687", "0.49584895", "0.49562123", "0.4956006", "0.49344873", "0.4929568", "0.49044436", "0.49021924", "0.489347", "0.489347", "0.48876384", "0.4882154", "0.48797426", "0.48793247", "0.48791596", "0.4877487", "0.48760724", "0.48677972", "0.486736", "0.486736", "0.486736", "0.4864528", "0.48582354", "0.4854857", "0.48381045", "0.482897", "0.48255643", "0.48111004", "0.47963655", "0.47769126", "0.47655693", "0.47632134", "0.47607425", "0.47559115", "0.47522557", "0.47375867", "0.47370002", "0.47366816", "0.47291198", "0.47238323", "0.4713728", "0.47108927", "0.47038633", "0.47023505", "0.4696071", "0.4692285", "0.4692148", "0.46858466", "0.4672214", "0.46715745", "0.46616432", "0.4661244", "0.46550372", "0.4653278", "0.46520188", "0.46446842", "0.4643731", "0.4640907", "0.46363747", "0.46326327", "0.4631828", "0.4630532", "0.4626105", "0.46236327", "0.46174023", "0.46131945", "0.46127182" ]
0.5515931
3
Created by Igor Goryainov skype glotemz on 02.07.2017 20:58.
public interface CurrentWeatherContract { interface View extends BaseView { void updateView(List<ForecastDay> forecastDays); } interface Presenter { void updateForecast(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private static void cajas() {\n\t\t\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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\n\tprotected void interr() {\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\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 sacrifier() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private void init() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "private void kk12() {\n\n\t}", "protected void mo6255a() {\n }", "private void m50366E() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@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 }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "private void strin() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\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 int describeContents() { return 0; }", "public void mo55254a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n void init() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n protected void getExras() {\n }", "Petunia() {\r\n\t\t}", "public void mo12930a() {\n }", "public Pitonyak_09_02() {\r\n }", "protected boolean func_70814_o() { return true; }", "public void mo12628c() {\n }", "public void mo21877s() {\n }", "@Override\n\tprotected void initialize() {\n\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\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 protected void init() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo9848a() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "static void feladat4() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@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}", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}" ]
[ "0.5902926", "0.57833284", "0.56838024", "0.56779844", "0.56657135", "0.563391", "0.563391", "0.5589963", "0.5575732", "0.5543418", "0.5509325", "0.55033016", "0.54958284", "0.54620296", "0.54594624", "0.5447966", "0.5429957", "0.53917754", "0.5386303", "0.5377153", "0.5370808", "0.53692067", "0.53692067", "0.53692067", "0.53692067", "0.53692067", "0.53692067", "0.53692067", "0.53649205", "0.53649205", "0.53476375", "0.53440845", "0.5342702", "0.534016", "0.53245604", "0.53193134", "0.5308762", "0.52771455", "0.52720946", "0.52690077", "0.52650905", "0.5254428", "0.5253172", "0.5253172", "0.5253172", "0.5253172", "0.5253172", "0.5253172", "0.52491677", "0.5247177", "0.52435124", "0.5242625", "0.5240556", "0.5230775", "0.5230161", "0.52293724", "0.5228986", "0.5228986", "0.5228986", "0.5228986", "0.5228986", "0.52171767", "0.5196485", "0.5196213", "0.5196213", "0.51900804", "0.51866084", "0.51824236", "0.51806563", "0.5179715", "0.5178054", "0.5170526", "0.51653194", "0.5161218", "0.51575255", "0.51564735", "0.51448", "0.5144545", "0.51425695", "0.51425695", "0.51425695", "0.5140637", "0.5140637", "0.5140637", "0.5138335", "0.5133132", "0.5127876", "0.5119312", "0.51104754", "0.51069707", "0.51048875", "0.51019996", "0.5094631", "0.50917417", "0.5082356", "0.5082356", "0.50802606", "0.50802606", "0.50802606", "0.50683737", "0.506737" ]
0.0
-1
Reads all orders from the database
@Override public List<Order> readAll() { try (Connection connection = JDBCUtils.getInstance().getConnection(); Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery("SELECT o.customer_id, oi.order_id, " + "GROUP_CONCAT(i.item_id, ',', i.name, ',', i.value, ',', oi.quantity SEPARATOR ';') items " + "FROM orders o " + "INNER JOIN orders_items oi " + "ON o.order_id = oi.order_id " + "INNER JOIN items i " + "ON oi.item_id = i.item_id " + "GROUP BY oi.order_id");) { List<Order> orders = new ArrayList<>(); while (resultSet.next()) { orders.add(modelFromResultSet(resultSet)); } return orders; } catch (SQLException e) { LOGGER.debug(e); LOGGER.error(e.getMessage()); } return new ArrayList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "public OrderList findOrders(){\n sql=\"SELECT * FROM Order\";\n Order order;\n try{\n ResultSet resultSet = db.SelectDB(sql);\n \n while(resultSet.next()){\n order = new Order();\n order.setOrderID(resultSet.getString(\"OrderID\"));\n order.setCustomerID(resultSet.getString(\"CustomerID\"));\n order.setStatus(resultSet.getString(\"Status\"));\n ordersList.addItem(order);\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash finding all orders\" + e);\n }\n return ordersList;\n }", "private ObservableList<Order> getOrders() throws SQLException{\n DBConnect db = DBConnect.getInstance();\n return db.getOrders(selectedCustomer.getCustomer_id());\n }", "List<Order> getAllOrders()\n throws FlooringMasteryPersistenceException;", "Collection<Order> getAll();", "public List<Order> findAllOrders() throws ApplicationEXContainer.ApplicationCanNotChangeException {\n List<Order> orders;\n try(Connection connection = MySQLDAOFactory.getConnection();\n AutoRollback autoRollback = new AutoRollback(connection)){\n orders =orderDao.findAllOrders(connection);\n autoRollback.commit();\n } catch (SQLException | NamingException | DBException throwables) {\n LOGGER.error(throwables.getMessage());\n throw new ApplicationEXContainer.ApplicationCanNotChangeException(throwables.getMessage(),throwables);\n }\n return orders;\n }", "List<Order> getAll();", "public static List<Order> allOrders() throws LegoHouseException {\n try {\n Connection con = Connector.connection();\n String SQL = \"SELECT * FROM orders\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n List<Order> allOrders = new ArrayList();\n do {\n int ordernumber = rs.getInt(1);\n int height = rs.getInt(3);\n int width = rs.getInt(4);\n int length = rs.getInt(5);\n String status = rs.getString(6);\n Order order = new Order(ordernumber, height, length, width, status);\n allOrders.add(order);\n }\n while (rs.next());\n return allOrders;\n }\n else {\n throw new LegoHouseException(\"No orders has been placed in the shop\", \"employeepage\");\n }\n }\n catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException ex) {\n throw new LegoHouseException(ex.getMessage(), \"index\");\n }\n }", "@Override\n\tpublic List<Orders> queryOrder() throws SQLException {\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\t\tList<Orders> messages=null;\n\t\ttry{\n\t\t\tconn = DBCPUtils.getConnection();\n\t\t\tstmt = conn.prepareStatement(\"SELECT * FROM orders\");\n\t\t\tresult = stmt.executeQuery();\n\t\t\tmessages=new ArrayList<Orders>();\n\t\t\twhile (result.next()) {\n\t\t\t\tOrders order=new Orders();\n\t\t\t\torder.setOrderId(result.getInt(1));\n\t\t\t\torder.setOrderName(result.getString(2));\n\t\t\t\torder.setOrderAddress(result.getString(3));\n\t\t\t\torder.setOrderPhone(result.getString(4));\n\t\t\t\torder.setOrderNumber(result.getInt(5));\n\t\t\t\torder.setOrderTime(result.getString(6));\n\t\t\t\torder.setBookName(result.getString(7));\n\t\t\t\torder.setOrderMemo(result.getString(8));\n\t\t\t\tmessages.add(order);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDBCPUtils.releaseConnection(conn, stmt, result);\n\t\t}\n\t\treturn messages;\n\t\t\n\t\t\n\t}", "public ArrayList<OrderRecord> getOrders() throws SQLException {\r\n ArrayList<OrderRecord> result = new ArrayList<>();\r\n String sqlQuery = \"SELECT * FROM `orders`\";\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n \r\n ResultSet rs = p.executeQuery(sqlQuery);\r\n while (rs.next()) {\r\n //table schema\r\n //id, name, tab_num, foodname, beveragename, served, billed, time\r\n \r\n // Customer name, orderid, table, items\r\n OrderRecord newOrder = new OrderRecord();\r\n \r\n newOrder.name = rs.getString(2);\r\n newOrder.id = rs.getInt(1);\r\n newOrder.table = rs.getInt(3);\r\n \r\n newOrder.food = rs.getString(4);\r\n newOrder.beverage = rs.getString(5);\r\n \r\n newOrder.served = (rs.getInt(6) == 1);\r\n newOrder.billed = (rs.getInt(7) == 1);\r\n \r\n result.add(newOrder);\r\n }\r\n } catch (SQLException e) {\r\n System.out.println(\"Could not get orders \" + e.toString());\r\n System.out.println(myStmt);\r\n }\r\n return result;\r\n }", "public static ArrayList<Orders> selectAllOrders() {\n ArrayList<Orders> toReturn = new ArrayList<Orders>();\n\n Connection dbConnection = ConnectionFactory.getConnection();\n PreparedStatement selectStatement = null;\n ResultSet rs = null;\n try {\n selectStatement = dbConnection.prepareStatement(selectStatementString);\n rs = selectStatement.executeQuery();\n while(rs.next()) {\n\n int order_Id = rs.getInt(\"id\");\n int productID = rs.getInt(\"product_id\");\n int clientID = rs.getInt(\"client_id\");\n double totalPrice = rs.getInt(\"total_price\");\n int quantity = rs.getInt(\"amount\");\n toReturn.add(new Orders(order_Id,productID,clientID,totalPrice,quantity));\n }\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING,\"OrderDAO:selectAllOrders \" + e.getMessage());\n } finally {\n ConnectionFactory.close(rs);\n ConnectionFactory.close(selectStatement);\n ConnectionFactory.close(dbConnection);\n }\n return toReturn;\n }", "public List<Order> getAll() {\n\t\treturn orderDao.getAll();\n\t}", "public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll()\n {\n return findAll(0, Integer.MAX_VALUE);\n }", "private ObservableList<String> fetchOrders(Connection con) throws SQLException {\n log.info(\"Fetch Orders from DB\");\n ObservableList<String> orders = FXCollections.observableArrayList();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"SELECT ticketid, orderid, \"\n// + \"DATE_FORMAT(ordertime,'%b %d %Y %h:%i %p') AS ordertime, \"\n + \"qty, \"\n + \"ordertime, \"\n + \"details \"\n + \"FROM orders \"\n + \"ORDER BY ordertime, orderid\");\n\n while (rs.next()) {\n orders.add(rs.getString(\"ticketid\") + \" - \"\n + rs.getString(\"orderid\") + \" - \"\n + rs.getString(\"ordertime\")\n + \" - \" + rs.getString(\"qty\")\n + \" * \" + rs.getString(\"details\"));\n }\n\n log.info(\"Found {} orders\", orders.size());\n return orders;\n }", "@Override\n\tpublic List<Orders> findAll() throws Exception\n\t{\n\t\treturn null;\n\t}", "public List<Order> getOrders() throws Exception {\n\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from ocgr_orders left join ocgr_clients on ocgr_orders.client_id = ocgr_clients.client_id left join ocgr_vendors on ocgr_orders.vendor_id = ocgr_vendors.vendor_id;\";\n\n\t\tDB db = new DB();\n\n\t\tList<Order> orders = new ArrayList<Order>();\n\n\t\ttry {\n\t\t\tdb.open();\n\t\t\tcon = db.getConnection();\n\n\t\t\tstmt = con.prepareStatement(sql);\n\t\t\trs = stmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tClient client = new Client( rs.getString(\"client_id\"), rs.getString(\"client_password\"), rs.getString(\"client_email\"),\n\t\t\t\t\t\t\t\t\t\t\trs.getString(\"client_fullname\"), rs.getString(\"client_compName\"), rs.getString(\"client_address\"),\n\t\t\t\t\t\t\t\t\t\t\trs.getString(\"client_itin\"), rs.getString(\"client_doy\"), rs.getString(\"client_phone\") );\n\n\t\t\t\tVendor vendor = new Vendor( rs.getString(\"vendor_id\"), rs.getString(\"vendor_password\"), rs.getString(\"vendor_email\"),\n\t\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_fullname\"), rs.getString(\"vendor_compName\"), rs.getString(\"vendor_address\"),\n\t\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_itin\"), rs.getString(\"vendor_doy\"), rs.getString(\"vendor_phone\") );\n\n\t\t\t\torders.add( new Order(rs.getString(\"order_id\"), rs.getTimestamp(\"order_date\"), rs.getBigDecimal(\"order_total\"),\n\t\t\t\t\t\t\t\t\t rs.getString(\"order_address\"), rs.getString(\"order_address\"),\n\t\t\t\t\t\t\t\t\t rs.getString(\"order_paymentmethod\"), client, vendor ) );\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tdb.close();\n\n\t\t\treturn orders;\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tdb.close();\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "public ArrayList<Order> getOrders() {\n\n\t\tArrayList<Order> order = new ArrayList<Order>();\n\n\t\tOrder or = null;\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM restodb.order\";\n\n\t\t\tjava.sql.PreparedStatement statement = mysqlConnect.connect().prepareStatement(sql);\n\n\t\t\tResultSet rs = statement.executeQuery(sql);\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tor = new Order(rs.getString(\"idorder\"), rs.getString(\"date\"), rs.getString(\"clientName\"),\n\t\t\t\t\t\trs.getString(\"status\"), rs.getString(\"location_idlocation\"));\n\n\t\t\t\torder.add(or);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\n\t\treturn order;\n\t}", "List<Order> findAll();", "public List<String> getAllOrders() {\n\t List<String> orderList = new ArrayList<String>();\n\t // Select All Query\n\t String selectQuery = \"SELECT * FROM \" + ORDER_RECORDS_TABLE;\n\t \n\t SQLiteDatabase db = this.getWritableDatabase();\n\t Cursor cursor = db.rawQuery(selectQuery, null);\n\t \n\t // looping through all rows and adding to list\n\t if (cursor.moveToFirst()) {\n\t do {\n\t \torderList.add(\"Order Number:[\" + cursor.getString(0) + \"] Barcode Number:[\" + cursor.getString(1) + \"] Customer Number:[\" + cursor.getString(2) +\n\t \t\t\t\"] Customer Name:[\" + cursor.getString(3) + \"] Order Date:[\" + cursor.getString(4) + \"]\");\n\t } while (cursor.moveToNext());\n\t }\n\t \n\t // return the list\n\t return orderList;\n\t}", "public ArrayList<Order> getAllOrders() {\n\t\tArrayList<Order> allOrders = new ArrayList<Order>();\n\n\t\tStatement sql = null;\n\n\t\ttry {\n\t\t\tgetConnection().close();\n\t\t\tsql = getConnection().createStatement();\n\t\t\tResultSet results = sql.executeQuery(\"SELECT id, code, name, quantity FROM orders WHERE 1=1;\");\n\n\t\t\twhile (results.next()) {\n\n\t\t\t\tOrder order = new Order(results.getInt(\"id\"), results.getInt(\"code\"), results.getString(\"name\"),\n\t\t\t\t\t\t0, results.getInt(\"quantity\"));\n\n\t\t\t\tallOrders.add(order);\n\t\t\t}\n\n\t\t\tresults.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (sql != null) {\n\t\t\t\ttry {\n\t\t\t\t\tsql.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn allOrders;\n\t}", "@Override\r\npublic List<Order> getallorders() {\n\treturn productdao.getalloderds();\r\n}", "void getOrders();", "public Order readOrder(Long id)\n {\n Long customerID = null;\n List<Item> orderItems = new ArrayList<>();\n\n String sql = \"SELECT customerID FROM orders WHERE id = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n resultSet.next();\n customerID = resultSet.getLong(\"customerID\");\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n\n sql = \"SELECT items.* FROM order_items LEFT JOIN items ON order_items.itemID = items.id WHERE orderID = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n while(resultSet.next())\n {\n orderItems.add(modelItemFromResultSet(resultSet));\n }\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n return new Order(id, customerID, orderItems);\n }", "@Override\r\n\tpublic List<Order> getAllOrders() {\n\t\treturn null;\r\n\t}", "@Transactional(readOnly = true)\n public List<OrderItems> findAll() {\n log.debug(\"Request to get all OrderItems\");\n return orderItemsRepository.findAll();\n }", "public List<OrderItem> findAllOrderItems()\n\t{\n\t\tList<OrderItem> list=orderItemDAO.findAll();\n\t\treturn list;\n\t}", "public static ArrayList<OrderItems> findAll() {\r\n\t\tOrderItems toReturn = null;\r\n ArrayList<OrderItems> list = new ArrayList<OrderItems>();\r\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\r\n\t\tPreparedStatement findStatement = null;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tfindStatement = dbConnection.prepareStatement(findAllStatementString);\r\n\t\t\trs = findStatement.executeQuery();\r\n\t\t\twhile(rs.next()) {\r\n int orderId = rs.getInt(\"id\");\r\n\t\t\tString name = rs.getString(\"nume\");\r\n\t\t\tString den = rs.getString(\"denumire\");\r\n\t\t\tint cant = rs.getInt(\"cantitate\");\r\n\t\t\ttoReturn = new OrderItems(orderId, name, den, cant);\r\n\t\t\tlist.add(toReturn);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"OrderItemsDAO:findAll \" + e.getMessage());\r\n\t\t} finally {\r\n\t\t\tConnectionFactory.close(rs);\r\n\t\t\tConnectionFactory.close(findStatement);\r\n\t\t\tConnectionFactory.close(dbConnection);\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "@Override\n public List<Order> getAllOrders(LocalDate date) throws PersistenceException{\n return new ArrayList<Order>(orders.values());\n }", "public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}", "List<CustomerOrder> getAllCustomerOrder();", "public List<OrderDetails> fetchOderList(){\n List<OrderDetails> orderDetails = null;\n orderDetails = mongoDbConnector.fetchOderList();\n return orderDetails;\n }", "@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}", "private ObservableList<Order> getAllCustomerOrders(int customerId){\r\n ObservableList<Order> customerOrders = null;\r\n try {\r\n OrderDB odb = new OrderDB();\r\n customerOrders = odb.getAllOrders(customerId);\r\n } catch (Exception e){\r\n System.err.println(e.getMessage());\r\n }\r\n return customerOrders;\r\n }", "List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "@Override\r\n\tpublic List<PurchaseOrder> getAllPurchaseOrders() {\n\t\treturn ht.loadAll(PurchaseOrder.class);\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\t\n\tpublic List<Orderi> findAll() {\n\t\treturn (List<Orderi>)getHibernateTemplate()\n\t\t.find(\"from Orderi\");\n\t}", "public List<Order> getOrders() {\n\t\treturn repo.findAll();\n\t}", "public List<OrderDetail> getAllOrderDetail() {\n List<OrderDetail> orderDetailList = new ArrayList<>();\n SQLiteDatabase db = this.getReadableDatabase();\n String sqlSelectQuery = \"SELECT * FROM \" + CoffeeShopDatabase.OrderDetailTable.TABLE_NAME;\n Cursor cursor = db.rawQuery(sqlSelectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n OrderDetail orderDetail = new OrderDetail(\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable._ID)),\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_ORDER_ID)),\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_DRINK_ID)),\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_QUANTITY))\n );\n orderDetailList.add(orderDetail);\n } while (cursor.moveToNext());\n }\n return orderDetailList;\n }", "public List<Item> readAllOrderItem(Long orderId) {\n\n\t\tString query = \"SELECT oi.id, i.name, i.value \"\n\t\t\t\t\t\t+ \"FROM order_items oi \"\n\t\t\t\t\t\t+ \"JOIN items i on oi.item_id = i.id \"\n\t\t\t\t\t\t+ \"WHERE oi.order_id = \" + orderId + \";\";\n\t\t\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(query); ) {\n\t\t\tList<Item> orderItemList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\titem = itemDAO.modelFromResultSet(resultSet);\n\t\t\t\torderItemList.add(item);\n\t\t\t}\n\t\t\treturn orderItemList;\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "private void getOrderFromDatabase() {\r\n Cursor cursor = helper.getOrderMoreDetails(orderId);\r\n cursor.moveToFirst();\r\n try {\r\n JSONObject senderObject = new JSONObject(cursor.getString(0));\r\n sender = senderObject.getString(\"name\");\r\n JSONObject receiverObject = new JSONObject(cursor.getString(1));\r\n receiver = receiverObject.getString(\"name\");\r\n JSONObject departureObject = new JSONObject(cursor.getString(2));\r\n if (departureObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n departure = departureObject.getString(\"long_name\");\r\n else\r\n departure = departureObject.getString(\"short_name\");\r\n JSONObject destinationObject = new JSONObject(cursor.getString(3));\r\n if (destinationObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n destination = destinationObject.getString(\"long_name\");\r\n else\r\n destination = destinationObject.getString(\"short_name\");\r\n numberOfGoods = cursor.getInt(4);\r\n orderTime = cursor.getString(5);\r\n state = cursor.getString(6);\r\n JSONArray goodIdArray = new JSONArray(cursor.getString(7));\r\n goodId = new String[goodIdArray.length()];\r\n for (int i = 0; i < goodIdArray.length(); i++) {\r\n goodId[i] = goodIdArray.getString(i);\r\n }\r\n orderType = cursor.getString(8);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n cursor.close();\r\n }", "public abstract List<CustomerOrder> findAll();", "private void loadOrder(LocalDate date) throws PersistenceException{\n orders.clear();\n ORDER_FILE = \"Order_\"+ date+\".txt\";\n Scanner scanner;\n File file = new File(ORDER_FILE);\n if(file.exists()){\n \n \n try {\n scanner = new Scanner(\n new BufferedReader(\n new FileReader(ORDER_FILE)));\n } catch (FileNotFoundException e) {\n throw new PersistenceException(\n \"-_- Could not load data into memory.\",e);\n } \n scanner.nextLine();\n String currentLine;\n String[] currentTokens = new String[13]; \n while (scanner.hasNextLine()) {\n currentLine = scanner.nextLine();\n currentTokens = currentLine.split(DELIMITER);\n \n\n Order currentOrder = new Order(Integer.parseInt((currentTokens[0])));\n \n currentOrder.setOrderDate(LocalDate.parse(currentTokens[1]));\n currentOrder.setClientName(currentTokens[2]);\n currentOrder.setState(currentTokens[3]);\n currentOrder.setStateTax(new BigDecimal(currentTokens[4]));\n currentOrder.setProduct(currentTokens[5]);\n currentOrder.setArea(new BigDecimal(currentTokens[6]));\n currentOrder.setMaterialCost(new BigDecimal(currentTokens[7]));\n currentOrder.setLaborCost(new BigDecimal(currentTokens[8]));\n currentOrder.setTotalMaterialCost(new BigDecimal(currentTokens[9]));\n currentOrder.setTotalLaborCost(new BigDecimal(currentTokens[10]));\n currentOrder.setTotalTax(new BigDecimal(currentTokens[11]));\n currentOrder.setTotalCost(new BigDecimal(currentTokens[12]));\n \n orders.put(currentOrder.getOrderNumber(), currentOrder);\n }\n scanner.close();\n } else{\n try{\n file.createNewFile();\n } catch (IOException ex){\n throw new PersistenceException(\"Error! No orders from that date.\", ex);\n }\n }\n }", "@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public List<CustomerOrder> getCustomerOrderFindAll() {\n return em.createNamedQuery(\"CustomerOrder.findAll\", CustomerOrder.class).getResultList();\n }", "Orderall selectByPrimaryKey(String orderid);", "public List<OrdersCustom> queryAllOrders() {\n\t\treturn ordersMapper.queryAllOrders();\n\t}", "@Override\n\tpublic void readAllCanceledOrders() {\n\t\t\n\t}", "@Transactional(readOnly = true)\n public List<OrderDto> findAll() {\n var orders = repository.findOrdersWithProducts();\n return orders.stream().map(order -> new OrderDto(order)).collect(Collectors.toList());\n }", "@Override\n\tpublic List<Cliente> readAll() {\n\t\treturn clientedao.readAll();\n\t}", "@Test\n\tpublic void getAllClientOrders() {\n\t\tString email = \"[email protected]\";\n\t\t\n\t\tservice.insertClient(\"devtestuser\", \"test\", email, \"devpass\");\n\t\t\n\t\tint clientId = service.getClient(email).getClient();\n\t\tservice.insertOrder(\"VODAFONE\", \"VOD\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"Apple\", \"APPL\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"VODAFONE\", \"VOD\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"BT Group\", \"BT\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\t\n\t\tList<OrderDTO> clientOrders = service.getClientOrders(clientId);\n\t\t\n\t\tassertEquals(4, clientOrders.size());\n\t\t\n\t\t\n\t\tfor(OrderDTO orderDTO : clientOrders) {\n\t\t\tservice.deleteOrder(orderDTO.getOrderId());\n\t\t}\n\t\t\n\t\tservice.deleteClient(email);\n\t}", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "public Order readOrder(Long id) {\n\t\tSystem.out.println(\"ReadOrder\" + id);\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders WHERE id = \" + id);) {\n\t\t\tresultSet.next();\n\t\t\treturn modelFromResultSet(resultSet);\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public List<Customer> read() {\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer\");\n rest = ppst.executeQuery();\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "@Override\n\tpublic List<Forge_Order_Detail> findAll() {\n\t\treturn null;\n\t}", "@Override\n public List<Collection> findAll(Context context, String order) throws SQLException\n {\n return findAll(context, order, null, null);\n }", "List<OrderPO> selectAll();", "public Order viewOrders() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\t//Order nextOrder = \r\n\t\treturn nextOrder;\r\n\t}", "@Override\n public Cursor loadInBackground() {\n try {\n return getContentResolver().query(OrderContract.OrderEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n\tpublic List<Map<String, Object>> readAll() {\n\t\treturn rolDao.readAll();\n\t}", "void loadOrders(String date)\n throws FlooringMasteryPersistenceException;", "@Override\n\tpublic Iterable<ComplitedOrderInfo> findAll() {\n\t\treturn null;\n\t}", "@Override\n public void getAllOrdersToFile() throws FlooringMasteryPersistenceException{\n \n \n }", "@Test\n public void testLoadOrderData() throws Exception {\n dao.loadEnvironmentVariable();\n Order writeOrder = new Order();\n\n writeOrder.setOrderNumber(1);\n writeOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n writeOrder.setCustomer(\"Load Test\");\n writeOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n writeOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n writeOrder.setArea(new BigDecimal(\"100.00\"));\n writeOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n writeOrder.setLaborCost(new BigDecimal(\"475.00\"));\n writeOrder.setTaxCost(new BigDecimal(\"61.88\"));\n writeOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n assertTrue(dao.getAllOrders().isEmpty());\n\n dao.addOrder(writeOrder);\n dao.writeOrderData();\n\n dao = null;\n\n OrdersDao dao2 = new OrdersDaoImpl();\n\n assertTrue(dao2.getAllOrders().isEmpty());\n\n dao2.loadOrderData();\n\n assertTrue(dao2.getAllOrders().size() >= 1);\n\n Files.deleteIfExists(Paths.get(System.getProperty(\"user.dir\") + \"/Orders_01011900.txt\"));\n }", "@Transactional(readOnly = true)\n\tpublic List<OrderDTO> findAll(){\n\n\t\tList<Order> list = repository.findOrdersWithProducts();\n\t\t\n\t\treturn list.stream().map(x -> new OrderDTO(x)).collect(Collectors.toList());\n\t}", "@Override\n\tpublic List<Orders> queryOrderOfId(int id) throws SQLException {\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\t\tList<Orders> messages=null;\n\t\ttry{\n\t\t\tconn = DBCPUtils.getConnection();\n\t\t\tstmt = conn.prepareStatement(\"SELECT * FROM orders WHERE orderId=?\");\n\t\t\tstmt.setInt(1,id);\n\t\t\tresult = stmt.executeQuery();\n\t\t\tmessages=new ArrayList<Orders>();\n\t\t\twhile (result.next()) {\n\t\t\t\tOrders order=new Orders();\n\t\t\t\torder.setOrderId(result.getInt(1));\n\t\t\t\torder.setOrderName(result.getString(2));\n\t\t\t\torder.setOrderAddress(result.getString(3));\n\t\t\t\torder.setOrderPhone(result.getString(4));\n\t\t\t\torder.setOrderNumber(result.getInt(5));\n\t\t\t\torder.setOrderTime(result.getString(6));\n\t\t\t\torder.setBookName(result.getString(7));\n\t\t\t\torder.setOrderMemo(result.getString(8));\n\t\t\t\tmessages.add(order);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDBCPUtils.releaseConnection(conn, stmt, result);\n\t\t}\n\t\treturn messages;\n\t\t\n\t\t\n\t}", "@Override\n public List<Order> getAllOrders(String date) throws FlooringMasteryPersistenceException {\n \n Map<Integer, Order> hm = ordersByDate.get(date); // get the hashmap by the date\n\n return new ArrayList<>(hm.values()); // get and return the list of orders from the <Integer, Order> hashmap\n \n }", "@Override\n\tpublic List<Subordination> readAll() throws DBOperationException {\n\t\treturn null;\n\t}", "public void addOrders() {\n\t\torders.stream()\n\t\t\t.forEach(db::store);\n\t}", "private void read(Session session) {\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Aluno> AlunoList = session.createQuery(\"FROM Aluno\").getResultList();\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Reading Aluno records...\");\n\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", \"Model\", \"Price\");\n\t\tfor (Aluno al : AlunoList) {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", al.getNome(), al.getRa());\n\t\t}\n\t}", "List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;", "@Override\r\n\tpublic List getOrderList() {\n\t\tList orderList = new ArrayList();\t\r\n\t\tConnection conn = null;\t\t\r\n\t\tStatement stmt = null;\t\t\r\n\t\tResultSet rs = null;\r\n\t\ttry{\r\n Class.forName(\"com.mysql.jdbc.Driver\");\t\t\t\r\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/gwap\",\"root\",\"\");\t\t\t\r\n\t\t\tstmt = conn.createStatement();\t\t\t\r\n\t\t\trs = stmt.executeQuery(\"select * from orderview\");\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tOrderview orderview = new Orderview();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\torderview.setLineid(rs.getString(\"lineid\"));\r\n\t\t\t\torderview.setOrderid(rs.getString(\"orderid\"));\r\n\t\t\t\torderview.setCost(rs.getString(\"cost\"));\r\n\t\t\t\torderview.setName(rs.getString(\"name\"));\r\n\t\t orderview.setPaystyle(rs.getString(\"paystyle\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\torderList.add(orderview);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\r\n ex.printStackTrace();\t\t\t\r\n\t\t\tthrow new RuntimeException(\"error when querying orders \",ex);\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t\tstmt.close();\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\t\t\t\t\r\n\t\t\t\tthrow new RuntimeException(\"error when querying orders \",ex);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn orderList;\r\n\t}", "@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\n }", "public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }", "@Override\n\t@Transactional\n\tpublic List<DetalleCarrito> readAll() throws Exception {\n\t\treturn detalleCarritoRepository.findAll();\n\t}", "@Override\n\tpublic Customer[] readAll() {\n\n\t\tString selectQuery = String.format(\"SELECT * FROM %s ;\", TABLE_NAME);\n\t\tCustomer[] result = null;\n\n\t\ttry (Statement s = dbCon.createStatement()) {\n\t\t\tResultSet rS = s.executeQuery(selectQuery);\n\n\t\t\tArrayList<Customer> resultTmp = new ArrayList<Customer>();\n\n\t\t\twhile (rS.next()) {\n\t\t\t\tresultTmp.add(\tresultTmp.size(),\n\t\t\t\t\t\t\t\tnew Customer(rS.getInt(COLUMN_NAME_ID),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_FIRST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_LAST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_EMAIL),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_KNICKNAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getDate(COLUMN_NAME_BIRTHDATE).toLocalDate(),\n\t\t\t\t\t\t\t\t\t\t\trS.getDouble(COLUMN_NAME_CREDITS))\n\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\trS.close();\n\n\t\t\tresult = new Customer[resultTmp.size()];\n\t\t\tresultTmp.toArray(result);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"An SQL error occured during retrieving all data from of customer table : \" + e.getMessage());\n\t\t}\n\n\t\treturn result;\n\t}", "List<Receipt> getAllReceipts() throws DbException;", "List<Order> selectAll(int userid);", "public List<Order> getReadyOrders() throws SQLException {\n\t\tList<Order> orders = oCtr.findAll();\n\t\tList<Order> readyOrders = new LinkedList<Order>();\n\n\t\tfor (int i = 0; i < orders.size(); i++) {\n\t\t\tif (orders.get(i).getToDeliver() && orders.get(i).getIsReady() && !orders.get(i).getIsDelivered()) {\n\t\t\t\treadyOrders.add(orders.get(i));\n\t\t\t}\n\t\t}\n\t\treturn readyOrders;\n\t}", "public List<CustomerPurchase> getAll() throws SQLException;", "@Override\n\tpublic List<OrderVO> orderList() throws Exception {\n\t\treturn session.selectList(\"orderMapper.orderList\");\n\t}", "private void loadOrders(String date) throws FlooringMasteryPersistenceException{\n \n String filename = \"Orders_\" + date + \".txt\";\n Scanner scanner;\n\t \n try {\n // Create Scanner for reading the file\n scanner = new Scanner(\n new BufferedReader(\n new FileReader(filename)));\n } catch (FileNotFoundException e) { \n throw new FlooringMasteryPersistenceException(\n \"-_- Could not load data into memory.\", e);\n }\n // currentLine holds the most recent line read from the file\n\t String currentLine;\n\n\t String[] currentTokens;\n\n\t while (scanner.hasNextLine()) {\n\t // get the next line in the file\n\t currentLine = scanner.nextLine();\n\t // break up the line into tokens\n\t currentTokens = currentLine.split(DELIMITER);\n \n // convert each field in the file into a field of the Order DTO's constructor\n int orderNumber = Integer.parseInt(currentTokens[0]);\n String customerName = currentTokens[1];\n String state = currentTokens[2];\n \n BigDecimal taxRate = new BigDecimal(currentTokens[3]);\n BigDecimal taxRateScaled = taxRate.setScale(2, RoundingMode.HALF_UP);\n \n String productType = currentTokens[4];\n \n BigDecimal materialCost = new BigDecimal(currentTokens[5]);\n BigDecimal materialCostScaled = materialCost.setScale(2, RoundingMode.HALF_UP);\n \n BigDecimal laborCost = new BigDecimal(currentTokens[6]);\n BigDecimal laborCostScaled = laborCost.setScale(2, RoundingMode.HALF_UP);\n \n BigDecimal area = new BigDecimal(currentTokens[7]);\n BigDecimal areaScaled = area.setScale(2, RoundingMode.HALF_UP);\n \n BigDecimal totalMaterialCost = new BigDecimal(currentTokens[8]);\n BigDecimal totalMaterialCostScaled = totalMaterialCost.setScale(2, RoundingMode.HALF_UP);\n \n BigDecimal totalLaborCost = new BigDecimal(currentTokens[9]);\n BigDecimal totalLaborCostScaled = totalLaborCost.setScale(2, RoundingMode.HALF_UP);\n \n BigDecimal totalTax = new BigDecimal(currentTokens[10]);\n BigDecimal totalTaxScaled = totalTax.setScale(2, RoundingMode.HALF_UP);\n \n BigDecimal total = new BigDecimal(currentTokens[11]);\n BigDecimal totalScaled = total.setScale(2, RoundingMode.HALF_UP);\n \n \n\n Order currentOrder = new Order(orderNumber, customerName, state, taxRateScaled, productType, materialCostScaled, laborCostScaled, areaScaled, totalMaterialCostScaled, totalLaborCostScaled, totalTaxScaled, totalScaled);\n \n \n Map<Integer,Order> hm = ordersByDate.get(date); // get the child hashmap by date\n if(hm == null){ // hm is null in the line before this because you can't assign a hashmap a value that way?\n ordersByDate.put(date, hm = new HashMap<>()); // make hm a new hashmap and then put it in the parent hashmap\n }\n \n hm.put(currentOrder.getOrderId(), currentOrder); // put in current order to child hashmap\n ordersByDate.put(date, hm); // put child hashmap with current order in parent hashmap\n \n }\n scanner.close();\n }", "List<OrderDto> getOrders();", "public ResultSet getOrders(String storage) throws SQLException {\n String query = \"SELECT myOrders.id_order, cities.name, storages.name, myOrders.distance, myOrders.specifying FROM myOrders INNER JOIN cities ON myOrders.id_city = cities.id_city INNER JOIN storages ON myOrders.id_storage = storages.id_storage WHERE storages.name = \\\"\"+storage+\"\\\"\";\n return rs = st.executeQuery(query);\n }", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "public interface OrderDao {\n List<Order> findAllOrders();\n}", "@Override\n\tpublic List<Orders> queryOrderOfName(String name) throws SQLException {\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\t\tList<Orders> messages=null;\n\t\ttry{\n\t\t\tconn = DBCPUtils.getConnection();\n\t\t\tstmt = conn.prepareStatement(\"SELECT * FROM orders WHERE orderName=?\");\n\t\t\tstmt.setString(1, name);\n\t\t\tresult = stmt.executeQuery();\n\t\t\tmessages=new ArrayList<Orders>();\n\t\t\twhile (result.next()) {\n\t\t\t\tOrders order=new Orders();\n\t\t\t\torder.setOrderId(result.getInt(1));\n\t\t\t\torder.setOrderName(result.getString(2));\n\t\t\t\torder.setOrderAddress(result.getString(3));\n\t\t\t\torder.setOrderPhone(result.getString(4));\n\t\t\t\torder.setOrderNumber(result.getInt(5));\n\t\t\t\torder.setOrderTime(result.getString(6));\n\t\t\t\torder.setBookName(result.getString(7));\n\t\t\t\torder.setOrderMemo(result.getString(8));\n\t\t\t\tmessages.add(order);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDBCPUtils.releaseConnection(conn, stmt, result);\n\t\t}\n\t\treturn messages;\n\t\t\n\t\t\n\t}", "public void findAllMyOrders() {\n log.info(\"OrdersBean : findAllMyOrders\");\n FacesContext context = FacesContext.getCurrentInstance();\n\n ordersEntities = ordersServices.findAllByIdUsersAndStatusIsValidateOrCanceled(usersBean.getUsersEntity().getId());\n if (ordersEntities.isEmpty()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.modalContractsOrder.listOrderEmpty\"), null));\n } else {\n deadlineLeasing();\n }\n }", "public ArrayList<Order> getOrders() {\n\t\tArrayList<Order> orders = new ArrayList<Order>();\n\n\t\ttry {\n\t\t\t// Set up file reading\n\t\t\tFile file = new File(filename);\n\n\t\t\tFileReader in = new FileReader(file.getAbsolutePath());\n\n\t\t\t// Read the file\n\t\t\tBufferedReader br = new BufferedReader(in);\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null && !line.equals(\"\")) {\n\t\t\t\t// Tokenize string with split, since we have delimiters in place\n\t\t\t\tString[] tokens = line.split(Pattern.quote(\"|\"));\n\t\t\t\t// Use tokens to create an Order object\n\t\t\t\tOrder order = new Order(Integer.parseInt(tokens[0]),\n\t\t\t\t\t\t\t\t\t\tInteger.parseInt(tokens[1]),\n\t\t\t\t\t\t\t\t\t\tInteger.parseInt(tokens[2]),\n\t\t\t\t\t\t\t\t\t\tInteger.parseInt(tokens[3]));orders.add(order);\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\t// Print error if file could not be read\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn orders;\n\t}", "public TireList findOrderedItems(){\n \n try{\n sql = \"Select * From OrderedItems Where OrderID = \" + getOrderID();\n ResultSet resultSetOrder = db.SelectDB(sql);\n \n Tire orderedTire;\n while(resultSetOrder.next()){\n orderedTire = new Tire();\n orderedTire.setQuantity(resultSetOrder.getInt(\"Quantity\"));\n ResultSet resultSetTire = db.SelectDB(\"Select * From Tire Where TireID = \" + resultSetOrder.getString(\"TireID\"));\n while(resultSetTire.next()){\n orderedTire.setStockID(resultSetTire.getString(\"TireID\"));\n orderedTire.setType(resultSetTire.getString(\"TireType\"));\n orderedTire.setSize(resultSetTire.getString(\"TireSize\"));\n orderedTire.setBrand(resultSetTire.getString(\"Brand\"));\n orderedTire.setStock(resultSetTire.getString(\"Stock\"));\n orderedTire.setPrice(resultSetTire.getString(\"Price\"));\n orderedTire.setVehicleType(resultSetTire.getString(\"VehicleType\"));\n orderedItems.addItem(orderedTire);\n }\n }\n }\n catch(SQLException e){\n System.out.println(\"Error generating list of Orders: \" + e);\n }\n return orderedItems;\n }", "@Test\n void getAllOrdersSuccess() {\n List<Order> orders = dao.getAllOrders();\n assertEquals(3, orders.size());\n }", "public void retrieveOrderContentById_Order(int i) {\n\t\tSystem.out.println(\"\\nMostrat detalls del Order \" + i);\n\t\tObjectSet result = db.queryByExample(new Order(i, null, null, null, null));\n\t\t\n\t\tOrder aConsultar = (Order) result.next();\n\t\taConsultar.getDetails().stream()\n\t\t\t\t.forEach(System.out::println);\n\t}", "public ArrayList<Order> getTodaysOrders() {\n\n\t\tArrayList<Order> order = new ArrayList<Order>();\n\n\t\tOrder or = null;\n\n\t\tDate date = new Date();\n\n\t\tTimestamp ts = new Timestamp(date.getTime());\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM restodb.order WHERE date >= '\" + formatter.format(ts).substring(0, 10) + \"'\";\n\n\t\t\tjava.sql.PreparedStatement statement = mysqlConnect.connect().prepareStatement(sql);\n\n\t\t\tResultSet rs = statement.executeQuery(sql);\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tor = new Order(rs.getString(\"idorder\"), rs.getString(\"date\"), rs.getString(\"clientName\"),\n\t\t\t\t\t\trs.getString(\"status\"), rs.getString(\"location_idlocation\"));\n\n\t\t\t\torder.add(or);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\n\t\treturn order;\n\t}", "public List<T> findAll(DBObject orderBy) throws NoSQLException;", "public List<DrinkOrder> getAllDrinkOrder() {\n List<DrinkOrder> drinkOrderList = new ArrayList<>();\n SQLiteDatabase db = this.getReadableDatabase();\n String sqlSelectQuery = \"SELECT * FROM \" + CoffeeShopDatabase.DrinkOrderTable.TABLE_NAME;\n Cursor cursor = db.rawQuery(sqlSelectQuery, null);\n if (cursor.moveToFirst()) {\n do {\n DrinkOrder drinkOrder = new DrinkOrder(\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.DrinkOrderTable._ID)),\n cursor.getString(cursor.getColumnIndex(CoffeeShopDatabase.DrinkOrderTable.COLUMN_NAME_ORDER_DATE)),\n cursor.getDouble(cursor.getColumnIndex(CoffeeShopDatabase.DrinkOrderTable.COLUMN_NAME_TOTAL_COST))\n );\n drinkOrderList.add(drinkOrder);\n } while (cursor.moveToNext());\n }\n return drinkOrderList;\n }", "@Transactional(readOnly = true)\n public List<OrderTransactionDTO> findAll() {\n log.debug(\"Request to get all OrderTransactions\");\n return orderTransactionRepository.findAll().stream()\n .map(orderTransactionMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public abstract List<CustomerOrder> findAll(Iterable<Long> ids);", "public static List<IOrder> getOrders() throws JFException {\r\n\t\treturn JForexContext.getEngine().getOrders();\r\n\t}", "public List<Order> getAllUsersOrdersById(long userId);", "@GetMapping(\"/api/obd\")\n public List<Obd> readAll() {\n return obdRepository.findAll();\n }" ]
[ "0.8472977", "0.7506615", "0.7335814", "0.7248528", "0.721665", "0.7208971", "0.71584755", "0.71020865", "0.70948046", "0.7042555", "0.7024504", "0.69974774", "0.68542635", "0.6845802", "0.6820321", "0.6766826", "0.6754319", "0.6749545", "0.67444754", "0.6703548", "0.6670398", "0.66408783", "0.66017586", "0.6552851", "0.6541822", "0.6539349", "0.65359837", "0.6535722", "0.6535267", "0.65000767", "0.6463931", "0.6447856", "0.64367193", "0.6392638", "0.63880616", "0.63737756", "0.6350528", "0.6336214", "0.6324302", "0.6318371", "0.6309871", "0.63094443", "0.6298718", "0.62868077", "0.6251097", "0.6248106", "0.6215621", "0.6183742", "0.6181536", "0.61501664", "0.61313915", "0.61252886", "0.61199", "0.61193275", "0.6118384", "0.6110103", "0.61097", "0.610815", "0.6100642", "0.6097018", "0.6096384", "0.6087416", "0.6084871", "0.6079622", "0.60776645", "0.60754883", "0.6074881", "0.60683125", "0.6063495", "0.60623413", "0.6058498", "0.60557646", "0.60501504", "0.6047042", "0.6046917", "0.604456", "0.60401434", "0.6040115", "0.6033734", "0.6031161", "0.6021529", "0.6010045", "0.6003728", "0.59932697", "0.598386", "0.59723765", "0.59695697", "0.5957635", "0.5925578", "0.59107167", "0.59035647", "0.5874065", "0.5866729", "0.5866136", "0.58594644", "0.58578116", "0.58570474", "0.58503413", "0.58443844", "0.5840377" ]
0.7742875
1
Fetches newest Order entity from data source.
public Order readLatest() { try (Connection connection = JDBCUtils.getInstance().getConnection(); Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery("SELECT o.customer_id, oi.order_id, " + "GROUP_CONCAT(i.item_id, ',', i.name, ',', i.value, ',', oi.quantity SEPARATOR ';') items " + "FROM orders o " + "INNER JOIN orders_items oi " + "ON o.order_id = oi.order_id " + "INNER JOIN items i " + "ON oi.item_id = i.item_id " + "GROUP BY oi.order_id " + "ORDER BY o.order_id DESC LIMIT 1");) { resultSet.next(); return modelFromResultSet(resultSet); } catch (Exception e) { LOGGER.debug(e); LOGGER.error(e.getMessage()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private OrderEntity getCurrentOrder(String orderId) {\n\t\tOrderEntity entity = new OrderEntity();\n\t\t//TODO get current order data from oracle\n\t\t\n\t\treturn entity;\n\t}", "public Order getOrderById(long orderId);", "public JSONObject fetchOrder(long orderId) throws Exception;", "@Override\n\tpublic OrderEntity findOneById(Long id) {\n\t\treturn oder.getById(id);\n\t}", "public List<SalesOrderItem> getItemOrFetch()\r\n throws ODataException\r\n {\r\n if (toItem == null) {\r\n toItem = fetchItem();\r\n }\r\n return toItem;\r\n }", "Order getOrder(int id) throws ServiceException;", "Order getByID(String id);", "@Override\n public Cursor loadInBackground() {\n try {\n return getContentResolver().query(OrderContract.OrderEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "ClOrderInfo selectByPrimaryKey(String orderId);", "public Order viewOrders() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\t//Order nextOrder = \r\n\t\treturn nextOrder;\r\n\t}", "Order getOrder(String orderId) throws OrderBookOrderException;", "@Transactional\n public OrderEntity findEager(Long orderId) {\n log.infof(\"Find order with id [%d]\", orderId);\n final TypedQuery<OrderEntity> query = em.createQuery(\"select o from OrderEntity o \" +\n \"join fetch o.shipmentAddress sa \" +\n \"join fetch o.billingAddress ba \" +\n \"left join fetch o.orderItems oi \" +\n \"where o.orderId = :orderId\", OrderEntity.class);\n query.setParameter(\"orderId\", orderId);\n return query.getSingleResult();\n }", "Order getOrder();", "@Override\n\tpublic HsExchangeOrder selectByPrimaryKey(HsExchangeOrder order) {\n\t\treturn hsExchangeOrderDbService.selectByPrimaryKey(order.getId());\n\t}", "public SaleOrder getSaleOrder() {\n long __key = this.saleOrderId;\n if (saleOrder__resolvedKey == null || !saleOrder__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SaleOrderDao targetDao = daoSession.getSaleOrderDao();\n SaleOrder saleOrderNew = targetDao.load(__key);\n synchronized (this) {\n saleOrder = saleOrderNew;\n \tsaleOrder__resolvedKey = __key;\n }\n }\n return saleOrder;\n }", "@Query(value = \"SELECT * FROM `ob_order` ORDER BY id DESC\", nativeQuery = true)\n List<Order> findHighestId();", "private Order getOrder()\n {\n return orderController.getOrder(getOrderNumber());\n }", "public List<Item> readLatestOrderItem() {\n\t\tString query = \"SELECT oi.id, i.name, i.value \"\n\t\t\t\t+ \"FROM order_items oi \"\n\t\t\t\t+ \"JOIN items i on oi.item_id = i.id \"\n\t\t\t\t+ \"ORDER BY id DESC LIMIT 1;\";\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(query); ) {\n\t\t\tList<Item> orderItemList = new ArrayList<>();\n\t\t\tresultSet.next();\n\t\t\titem = itemDAO.modelFromResultSet(resultSet);\n\t\t\torderItemList.add(item);\n\t\t\treturn orderItemList;\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "public OrderEntity LoadSingleOrder(int id) throws ClassNotFoundException, SQLException{\n\t\tOrderEntity o = new OrderEntity();\r\n\t\tConnectDB db = new ConnectDB();\r\n\t\tdb.connect();\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM cart WHERE ID = \" + id;\r\n\t\t\tResultSet rs = db.st.executeQuery(sql);\r\n\t\t\t//System.out.print(rs.getString(\"Username\"));\r\n\t\t\twhile (rs.next()){\r\n\t\t\t\t\t\r\n\t\t\t\to.setId(rs.getInt(\"id\"));\r\n\t\t\t\to.setId_customer(rs.getInt(\"id_customer\"));\r\n\t\t\t\to.setTotal_price(rs.getInt(\"price_sum\"));\r\n\t\t\t\to.setAddress(rs.getString(\"address\"));\r\n\t\t\t\to.setDate(rs.getString(\"date_delivery\"));\r\n\t\t\t\to.setStatus(rs.getInt(\"status\"));\r\n\t\t\t\t\r\n\t\t\t\t//list.add(p);\t\t\t\t\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tdb.st.close();\r\n\t\t\tdb.con.close();\r\n\t\t\t\r\n\t\t} catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\treturn o;\r\n\t}", "private void getOrderFromDatabase() {\r\n Cursor cursor = helper.getOrderMoreDetails(orderId);\r\n cursor.moveToFirst();\r\n try {\r\n JSONObject senderObject = new JSONObject(cursor.getString(0));\r\n sender = senderObject.getString(\"name\");\r\n JSONObject receiverObject = new JSONObject(cursor.getString(1));\r\n receiver = receiverObject.getString(\"name\");\r\n JSONObject departureObject = new JSONObject(cursor.getString(2));\r\n if (departureObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n departure = departureObject.getString(\"long_name\");\r\n else\r\n departure = departureObject.getString(\"short_name\");\r\n JSONObject destinationObject = new JSONObject(cursor.getString(3));\r\n if (destinationObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n destination = destinationObject.getString(\"long_name\");\r\n else\r\n destination = destinationObject.getString(\"short_name\");\r\n numberOfGoods = cursor.getInt(4);\r\n orderTime = cursor.getString(5);\r\n state = cursor.getString(6);\r\n JSONArray goodIdArray = new JSONArray(cursor.getString(7));\r\n goodId = new String[goodIdArray.length()];\r\n for (int i = 0; i < goodIdArray.length(); i++) {\r\n goodId[i] = goodIdArray.getString(i);\r\n }\r\n orderType = cursor.getString(8);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n cursor.close();\r\n }", "public List<OrderDetails> fetchOderList(){\n List<OrderDetails> orderDetails = null;\n orderDetails = mongoDbConnector.fetchOderList();\n return orderDetails;\n }", "public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }", "public static PoolRealTimeOrderBean getOrderById(long orderId) {\n\t\tPoolRealTimeOrderBean order = pool.get(orderId);\n\t\trefreshOrderRelatedInformation(order);\n\t\treturn order;\n\t}", "public Order viewOrder(int on) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tOrder found = em.find(Order.class, on);\r\n\t\tem.close();\r\n\t\treturn found;\r\n\t}", "@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "private ObservableList<Order> getOrders() throws SQLException{\n DBConnect db = DBConnect.getInstance();\n return db.getOrders(selectedCustomer.getCustomer_id());\n }", "@Override\r\n\tpublic OrderInfo selectOne() {\n\t\treturn null;\r\n\t}", "public ComplexOrderTO getOrder(long storeID, long orderId) throws NotInDatabaseException;", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "OrderDetails selectByPrimaryKey(Integer id);", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "public Order readOrder(Long id) {\n\t\tSystem.out.println(\"ReadOrder\" + id);\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders WHERE id = \" + id);) {\n\t\t\tresultSet.next();\n\t\t\treturn modelFromResultSet(resultSet);\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic OrderDetail getById(String id) {\n\t\tOrderDetail detail = orderDetailDao.getById(id);\n\t\treturn detail;\n\t}", "void loadOrders(String date)\n throws FlooringMasteryPersistenceException;", "Order requireById(Long orderId);", "@Override\n\tpublic OmsOrderEntity queryOmsOrderByOrderNo(String orderNo) {\n\t\treturn null;\n\t}", "@Override\n\t@Transactional\n\tpublic Optional<Order> getOrderById(Long id) {\n\t\tOrder order = repository.get(id, Order.class);\n\t\treturn Optional.of(order);\n\t}", "Order getOrder(String orderNumber)\n throws FlooringMasteryPersistenceException;", "FetchFirst createFetchFirst();", "public Order getOrder() {\n return this.order;\n }", "public Order get(int id) {\n\t\treturn orderDao.get(id);\n\t}", "private ObservableList<String> fetchOrders(Connection con) throws SQLException {\n log.info(\"Fetch Orders from DB\");\n ObservableList<String> orders = FXCollections.observableArrayList();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"SELECT ticketid, orderid, \"\n// + \"DATE_FORMAT(ordertime,'%b %d %Y %h:%i %p') AS ordertime, \"\n + \"qty, \"\n + \"ordertime, \"\n + \"details \"\n + \"FROM orders \"\n + \"ORDER BY ordertime, orderid\");\n\n while (rs.next()) {\n orders.add(rs.getString(\"ticketid\") + \" - \"\n + rs.getString(\"orderid\") + \" - \"\n + rs.getString(\"ordertime\")\n + \" - \" + rs.getString(\"qty\")\n + \" * \" + rs.getString(\"details\"));\n }\n\n log.info(\"Found {} orders\", orders.size());\n return orders;\n }", "ExchangeOrder selectByPrimaryKey(String id);", "private Entity queryReceipt() {\n Query query = new Query(\"Receipt\");\n PreparedQuery results = datastore.prepare(query);\n return results.asSingleEntity();\n }", "public Order getOrder() {\n return order;\n }", "List<Order> getAll();", "public SalesOrderLine get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "OrderPO selectByPrimaryKey(Integer id);", "Order find(Long id);", "public List<Order> retrieveOrders1DayAgo( Date currentDate ) throws OrderException;", "public interface SellOrderRepository extends GenericCrudRepository<SellOrder, String> {\n\n //when the price&time are equal, should put biggest amount first\n List<SellOrder> findAscPendingOrdersByPriceTime(Date toTime, BigMoney price, OrderBookId orderBookId, int size);\n\n SellOrder findPendingOrder(String id);\n\n SellOrder findLowestPricePendingOrder(OrderBookId orderBookId);\n}", "@Override\r\n\tpublic CommentEntity getLatestCommentByPostsid(Long postsid) {\n\t\tString sql = \"select * from comment where postsid=? order by time desc limit 1\";\r\n\t\tList<CommentEntity> ret = null;\r\n Session session = getSession();\r\n \r\n try {\r\n Query query = session.createSQLQuery(sql).addEntity(CommentEntity.class);\r\n query.setLong(0, postsid);\r\n ret = query.list();\r\n \r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n if (ret != null && ret.size() > 0) {\r\n\t\t\treturn ret.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "List<Order> getAllOrders()\n throws FlooringMasteryPersistenceException;", "OrderDetail selectByPrimaryKey(String detailId);", "Order findById(Long id);", "Article findLatestArticle();", "@Nullable\n public Order doRetrieveById(int id) {\n try {\n Connection cn = ConPool.getConnection();\n PreparedStatement st;\n Operator op = null;\n Order o = null;\n User u = null;\n\n st = cn.prepareStatement(\"SELECT * FROM `order` O WHERE O.id=?;\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n o = new Order();\n if (rs.getString(6) != null) {\n op = opd.doRetrieveByUsername(rs.getString(6));\n } else {\n op = null;\n }\n o.setOperator(op);\n o.setId(rs.getInt(2));\n o.setTotPrice(rs.getDouble(3));\n o.setNumberOfItems(rs.getInt(4));\n o.setData(rs.getString(5));\n u = ud.doRetrieveByUsername(rs.getString(1));\n o.setUser(u);\n st = cn.prepareStatement(\"SELECT * FROM digitalpurchasing D WHERE D.order=?;\");\n st.setInt(1, o.getId());\n ResultSet rs2 = st.executeQuery();\n DigitalProduct dp = null;\n while (rs2.next()) {\n dp = dpd.doRetrieveById(rs2.getInt(1));\n o.addProduct(dp, rs2.getInt(3));\n }\n st = cn.prepareStatement(\"SELECT * FROM physicalpurchasing P WHERE P.order=?;\");\n st.setInt(1, o.getId());\n rs2 = st.executeQuery();\n PhysicalProduct pp = null;\n while (rs2.next()) {\n pp = ppd.doRetrieveById(rs2.getInt(1));\n o.addProduct(pp, rs2.getInt(3));\n }\n\n }\n st.close();\n cn.close();\n\n return o;\n } catch (SQLException e) {\n return null;\n }\n }", "public Proveedor findTopByOrderByIdDesc();", "@GET(\"V2/eshopping/driver/getDriverLastLocation/{orderId}\")\n Observable<List<DriverLocation>> getLastDriverLocationByOrderId(@Path(\"orderId\") Long orderId);", "public static ru.terralink.mvideo.sap.Orders load(long id)\n {\n return (ru.terralink.mvideo.sap.Orders)(DELEGATE.load(id));\n }", "NjOrderWork2 selectByPrimaryKey(String id);", "@Transactional\npublic interface ExchangeHistoryRepository extends CrudRepository<ExchangeHistory, Long> {\n\n ExchangeHistory findTopByOrderByIdDesc();\n //findTopByOrderByAgeDesc();\n}", "@Override\r\n\tpublic Order getOrderById(String orderId) {\n\t\treturn null;\r\n\t}", "Optional<Order> findById(Long orderId);", "public Order loadOrderFromId(int orderId) {\n throw new UnsupportedOperationException();\n }", "@Override\r\n\tpublic void Update(Order order) {\n\t\tem.merge(order);\r\n\t\t\r\n\t}", "@Override\n\tpublic Order findById(int id) {\n\t\treturn null;\n\t}", "void getOrders();", "Collection<Order> getAll();", "@Override\r\npublic List<Order> getallorders() {\n\treturn productdao.getalloderds();\r\n}", "@Override\n\tpublic Order get(Integer identifier) {\n\t\treturn null;\n\t}", "public Order readOrder(Long id)\n {\n Long customerID = null;\n List<Item> orderItems = new ArrayList<>();\n\n String sql = \"SELECT customerID FROM orders WHERE id = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n resultSet.next();\n customerID = resultSet.getLong(\"customerID\");\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n\n sql = \"SELECT items.* FROM order_items LEFT JOIN items ON order_items.itemID = items.id WHERE orderID = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n while(resultSet.next())\n {\n orderItems.add(modelItemFromResultSet(resultSet));\n }\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n return new Order(id, customerID, orderItems);\n }", "@Override\n\tpublic Forge_Order_Detail findById(Serializable id) {\n\t\treturn null;\n\t}", "public Date getOrderDate() {\n return orderDate;\n }", "public Date getOrderDate() {\n return orderDate;\n }", "public int getLastOrderId() {\r\n ArrayList<OrderRecord> result = new ArrayList<>();\r\n String sqlQuery = \"SELECT * FROM `orders`\";\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n ResultSet rs = p.executeQuery(sqlQuery);\r\n rs.last();\r\n return rs.getInt(\"id\");\r\n } catch (Exception e) {\r\n System.out.println(\"Could not get orders \" + e.toString());\r\n System.out.println(myStmt);\r\n }\r\n return 0;\r\n }", "Observable<Order> getOrder(@NonNull String orderSerial);", "public CustomerOrder getOrder() {\n return (CustomerOrder) get(\"order\");\n }", "public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll()\n {\n return findAll(0, Integer.MAX_VALUE);\n }", "public Date getDate() {\n return order.getDate();\n }", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethod(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryNoClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "@Override\n\tpublic mOrders loadAnOrderbyOrderCode(String orderCode) {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.eq(\"O_Code\", orderCode));\n\t\t\tList<mOrders> o= criteria.list();\n\t\t\tcommit();\n\t\t\tif(o.size()>0)\n\t\t\treturn o.get(0);\n\t\t\telse return null;\n\t\t} catch (HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally {\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "List<Order> findAll();", "OrderItemDto getOrderItem(long id) throws SQLException;", "public abstract CustomerOrder findOne(Long id);", "public long getOrderNumber()\n {\n return _orderNumber;\n }", "public EnumTransactionSource getOrderSource() {\n\t\treturn (getOrderSource(\"CREATE_ORDER\"));\n\t}", "@Override\n\tpublic OrderDO findById(String id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Forge_Order_Detail> findAll() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<OrderDetailBean> query(OrderDetailBean detail) {\n\t\treturn dao.query(detail);\r\n\t}", "public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}", "public Pago findTopByOrderByIdDesc();", "@Override\r\n\tpublic Users findLatest() {\n\t\treturn (Users) sessionFactory.getCurrentSession().createQuery(\"from Users order by id DESC\").setMaxResults(1).uniqueResult();\r\n\t}", "public static ru.terralink.mvideo.sap.Orders find(long id)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.find()\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n Object[] keys = new Object[]{id};\n return (ru.terralink.mvideo.sap.Orders)(DELEGATE.findEntityWithKeys(keys));\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }", "public OrderList findOrders(){\n sql=\"SELECT * FROM Order\";\n Order order;\n try{\n ResultSet resultSet = db.SelectDB(sql);\n \n while(resultSet.next()){\n order = new Order();\n order.setOrderID(resultSet.getString(\"OrderID\"));\n order.setCustomerID(resultSet.getString(\"CustomerID\"));\n order.setStatus(resultSet.getString(\"Status\"));\n ordersList.addItem(order);\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash finding all orders\" + e);\n }\n return ordersList;\n }", "public Order getOrder()\n\t{\n\t\treturn getOrder( getSession().getSessionContext() );\n\t}", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethodAndClear(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryWithClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check\r\n // the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }" ]
[ "0.62238467", "0.616382", "0.6109416", "0.6012004", "0.6010053", "0.5994661", "0.5977374", "0.59437054", "0.590623", "0.5832948", "0.5775178", "0.57516104", "0.57430494", "0.5742369", "0.5736795", "0.56776595", "0.56624097", "0.5650173", "0.563731", "0.5623343", "0.56135285", "0.5606012", "0.5590862", "0.55746156", "0.5573499", "0.55650604", "0.5554296", "0.55396676", "0.5520126", "0.5506303", "0.55039775", "0.5493984", "0.5470573", "0.5470406", "0.5470289", "0.54580986", "0.5456283", "0.5442482", "0.54099554", "0.53840125", "0.5362634", "0.53604925", "0.5349799", "0.5335305", "0.5325022", "0.53250027", "0.5320096", "0.53191847", "0.5313905", "0.5306137", "0.5300142", "0.52986366", "0.52812725", "0.5277605", "0.5264623", "0.52630115", "0.52622175", "0.5251957", "0.5237354", "0.5222687", "0.5219136", "0.5217277", "0.5216248", "0.52159274", "0.52138555", "0.5210655", "0.52064645", "0.519632", "0.51954794", "0.5166291", "0.5154658", "0.5147454", "0.5142362", "0.51385677", "0.5137659", "0.5137659", "0.5127897", "0.51176286", "0.511249", "0.51108503", "0.51070046", "0.5096935", "0.509547", "0.5095096", "0.5095096", "0.5089694", "0.50878286", "0.50861555", "0.5083779", "0.5080967", "0.5080517", "0.5079205", "0.5074069", "0.5071625", "0.5069977", "0.5068642", "0.50663066", "0.5050911", "0.50471413", "0.5041829" ]
0.65348315
0
Fetches newest Order entity from data source.
@Override public Order create(Order order) { try (Connection connection = JDBCUtils.getInstance().getConnection(); Statement statement = connection.createStatement();) { statement.executeUpdate(String.format("INSERT INTO orders(customer_id) values(%d)", order.getCustomer().getId())); HashMap<Item, Long> items = order.getItems(); for (Entry<Item, Long> entry : items.entrySet()) { statement.executeUpdate(String.format("INSERT INTO orders_items(order_id, item_id, quantity) " + "values(last_insert_id(), %d, %d)", entry.getKey().getId(), entry.getValue())); } return readLatest(); } catch (Exception e) { LOGGER.debug(e); LOGGER.error(e.getMessage()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Order readLatest() {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();\r\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT o.customer_id, oi.order_id, \"\r\n\t\t\t\t\t\t+ \"GROUP_CONCAT(i.item_id, ',', i.name, ',', i.value, ',', oi.quantity SEPARATOR ';') items \"\r\n\t\t\t\t\t\t+ \"FROM orders o \"\r\n\t\t\t\t\t\t+ \"INNER JOIN orders_items oi \"\r\n\t\t\t\t\t\t+ \"ON o.order_id = oi.order_id \"\r\n\t\t\t\t\t\t+ \"INNER JOIN items i \"\r\n\t\t\t\t\t\t+ \"ON oi.item_id = i.item_id \"\r\n\t\t\t\t\t\t+ \"GROUP BY oi.order_id \"\r\n\t\t\t\t\t\t+ \"ORDER BY o.order_id DESC LIMIT 1\");) {\r\n\t\t\tresultSet.next();\r\n\t\t\treturn modelFromResultSet(resultSet);\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private OrderEntity getCurrentOrder(String orderId) {\n\t\tOrderEntity entity = new OrderEntity();\n\t\t//TODO get current order data from oracle\n\t\t\n\t\treturn entity;\n\t}", "public Order getOrderById(long orderId);", "public JSONObject fetchOrder(long orderId) throws Exception;", "public List<SalesOrderItem> getItemOrFetch()\r\n throws ODataException\r\n {\r\n if (toItem == null) {\r\n toItem = fetchItem();\r\n }\r\n return toItem;\r\n }", "@Override\n\tpublic OrderEntity findOneById(Long id) {\n\t\treturn oder.getById(id);\n\t}", "Order getOrder(int id) throws ServiceException;", "Order getByID(String id);", "@Override\n public Cursor loadInBackground() {\n try {\n return getContentResolver().query(OrderContract.OrderEntry.CONTENT_URI,\n null,\n null,\n null,\n null);\n\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "ClOrderInfo selectByPrimaryKey(String orderId);", "public Order viewOrders() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\t//Order nextOrder = \r\n\t\treturn nextOrder;\r\n\t}", "Order getOrder(String orderId) throws OrderBookOrderException;", "@Transactional\n public OrderEntity findEager(Long orderId) {\n log.infof(\"Find order with id [%d]\", orderId);\n final TypedQuery<OrderEntity> query = em.createQuery(\"select o from OrderEntity o \" +\n \"join fetch o.shipmentAddress sa \" +\n \"join fetch o.billingAddress ba \" +\n \"left join fetch o.orderItems oi \" +\n \"where o.orderId = :orderId\", OrderEntity.class);\n query.setParameter(\"orderId\", orderId);\n return query.getSingleResult();\n }", "Order getOrder();", "@Override\n\tpublic HsExchangeOrder selectByPrimaryKey(HsExchangeOrder order) {\n\t\treturn hsExchangeOrderDbService.selectByPrimaryKey(order.getId());\n\t}", "public SaleOrder getSaleOrder() {\n long __key = this.saleOrderId;\n if (saleOrder__resolvedKey == null || !saleOrder__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n SaleOrderDao targetDao = daoSession.getSaleOrderDao();\n SaleOrder saleOrderNew = targetDao.load(__key);\n synchronized (this) {\n saleOrder = saleOrderNew;\n \tsaleOrder__resolvedKey = __key;\n }\n }\n return saleOrder;\n }", "@Query(value = \"SELECT * FROM `ob_order` ORDER BY id DESC\", nativeQuery = true)\n List<Order> findHighestId();", "private Order getOrder()\n {\n return orderController.getOrder(getOrderNumber());\n }", "public List<Item> readLatestOrderItem() {\n\t\tString query = \"SELECT oi.id, i.name, i.value \"\n\t\t\t\t+ \"FROM order_items oi \"\n\t\t\t\t+ \"JOIN items i on oi.item_id = i.id \"\n\t\t\t\t+ \"ORDER BY id DESC LIMIT 1;\";\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(query); ) {\n\t\t\tList<Item> orderItemList = new ArrayList<>();\n\t\t\tresultSet.next();\n\t\t\titem = itemDAO.modelFromResultSet(resultSet);\n\t\t\torderItemList.add(item);\n\t\t\treturn orderItemList;\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "public OrderEntity LoadSingleOrder(int id) throws ClassNotFoundException, SQLException{\n\t\tOrderEntity o = new OrderEntity();\r\n\t\tConnectDB db = new ConnectDB();\r\n\t\tdb.connect();\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM cart WHERE ID = \" + id;\r\n\t\t\tResultSet rs = db.st.executeQuery(sql);\r\n\t\t\t//System.out.print(rs.getString(\"Username\"));\r\n\t\t\twhile (rs.next()){\r\n\t\t\t\t\t\r\n\t\t\t\to.setId(rs.getInt(\"id\"));\r\n\t\t\t\to.setId_customer(rs.getInt(\"id_customer\"));\r\n\t\t\t\to.setTotal_price(rs.getInt(\"price_sum\"));\r\n\t\t\t\to.setAddress(rs.getString(\"address\"));\r\n\t\t\t\to.setDate(rs.getString(\"date_delivery\"));\r\n\t\t\t\to.setStatus(rs.getInt(\"status\"));\r\n\t\t\t\t\r\n\t\t\t\t//list.add(p);\t\t\t\t\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tdb.st.close();\r\n\t\t\tdb.con.close();\r\n\t\t\t\r\n\t\t} catch (Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\treturn o;\r\n\t}", "private void getOrderFromDatabase() {\r\n Cursor cursor = helper.getOrderMoreDetails(orderId);\r\n cursor.moveToFirst();\r\n try {\r\n JSONObject senderObject = new JSONObject(cursor.getString(0));\r\n sender = senderObject.getString(\"name\");\r\n JSONObject receiverObject = new JSONObject(cursor.getString(1));\r\n receiver = receiverObject.getString(\"name\");\r\n JSONObject departureObject = new JSONObject(cursor.getString(2));\r\n if (departureObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n departure = departureObject.getString(\"long_name\");\r\n else\r\n departure = departureObject.getString(\"short_name\");\r\n JSONObject destinationObject = new JSONObject(cursor.getString(3));\r\n if (destinationObject.getString(\"type\").equals(\"SpecifyAddress\"))\r\n destination = destinationObject.getString(\"long_name\");\r\n else\r\n destination = destinationObject.getString(\"short_name\");\r\n numberOfGoods = cursor.getInt(4);\r\n orderTime = cursor.getString(5);\r\n state = cursor.getString(6);\r\n JSONArray goodIdArray = new JSONArray(cursor.getString(7));\r\n goodId = new String[goodIdArray.length()];\r\n for (int i = 0; i < goodIdArray.length(); i++) {\r\n goodId[i] = goodIdArray.getString(i);\r\n }\r\n orderType = cursor.getString(8);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n cursor.close();\r\n }", "public List<OrderDetails> fetchOderList(){\n List<OrderDetails> orderDetails = null;\n orderDetails = mongoDbConnector.fetchOderList();\n return orderDetails;\n }", "public static Result getOrder(String orderId){\n \n MysqlDBOperations mysql = new MysqlDBOperations();\n ResourceProperty rs = new ResourceProperty(\"com.generic.resources.mysqlQuery\");\n Connection conn = mysql.getConnection(); \n Orders order;\n List<MarketProduct> productList;\n\n try{\n\n // -1- Prepare Statement\n PreparedStatement preStat = conn.prepareStatement(rs.getPropertyValue(\"mysql.order.select.4\"));\n preStat.setString(1, orderId);\n \n ResultSet resultSet = preStat.executeQuery();\n \n // -2- Get Result\n if(resultSet.first()){\n \n // -2.1- Get Order Object\n order = ORMHandler.resultSetToOrder(resultSet);\n \n // -2.2- Get User & UserAddress Object\n User user = ORMHandler.resultSetToUser(resultSet);\n UserAddress userAddress = ORMHandler.resultSetToUserAddress(resultSet);\n userAddress.setAddress(ORMHandler.resultSetToAddress(resultSet));\n \n // -2.3- Get MarketProduct list \n productList = new ArrayList<>();\n do{\n MarketProduct product = ORMHandler.resultSetToProduct(resultSet);\n productList.add(product);\n }while(resultSet.next());\n \n // -2.4- Set \n order.setUserAddress(userAddress);\n order.setUser(user);\n order.setProductList(productList);\n \n return Result.SUCCESS.setContent(order);\n }else{\n return Result.SUCCESS_EMPTY;\n } \n\n } catch (SQLException ex) { \n return Result.FAILURE_DB.setContent(ex.getMessage());\n }finally{\n mysql.closeAllConnection();\n } \n }", "public static PoolRealTimeOrderBean getOrderById(long orderId) {\n\t\tPoolRealTimeOrderBean order = pool.get(orderId);\n\t\trefreshOrderRelatedInformation(order);\n\t\treturn order;\n\t}", "public Order viewOrder(int on) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tOrder found = em.find(Order.class, on);\r\n\t\tem.close();\r\n\t\treturn found;\r\n\t}", "@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "private ObservableList<Order> getOrders() throws SQLException{\n DBConnect db = DBConnect.getInstance();\n return db.getOrders(selectedCustomer.getCustomer_id());\n }", "@Override\r\n\tpublic OrderInfo selectOne() {\n\t\treturn null;\r\n\t}", "public ComplexOrderTO getOrder(long storeID, long orderId) throws NotInDatabaseException;", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "OrderDetails selectByPrimaryKey(Integer id);", "public List<SalesOrderItem> fetchItem()\r\n throws ODataException\r\n {\r\n if (erpConfigContext == null) {\r\n throw new ODataException(ODataExceptionType.OTHER, \"Failed to fetch related objects of type SalesOrderItem.\", new IllegalStateException(\"Unable to execute OData query. The entity was created locally without an assigned ERP configuration context. This method is applicable only on entities which were retrieved or created using the OData VDM.\"));\r\n }\r\n final StringBuilder odataResourceUrl = new StringBuilder(getEntityCollection());\r\n odataResourceUrl.append(\"(\");\r\n odataResourceUrl.append(\"SalesOrder=\");\r\n odataResourceUrl.append(ODataTypeValueSerializer.of(EdmSimpleTypeKind.String).toUri(salesOrder));\r\n odataResourceUrl.append(\")/\");\r\n odataResourceUrl.append(\"to_Item\");\r\n final ODataQueryBuilder builder = ODataQueryBuilder.withEntity(getEndpointUrl(), odataResourceUrl.toString());\r\n final ODataQuery query = builder.build();\r\n final ErpEndpoint erpEndpoint = new ErpEndpoint(erpConfigContext);\r\n final ODataQueryResult result = query.execute(erpEndpoint);\r\n final List<SalesOrderItem> entityList = result.asList(SalesOrderItem.class);\r\n for (SalesOrderItem entity: entityList) {\r\n entity.setErpConfigContext(erpConfigContext);\r\n }\r\n return entityList;\r\n }", "public Order readOrder(Long id) {\n\t\tSystem.out.println(\"ReadOrder\" + id);\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders WHERE id = \" + id);) {\n\t\t\tresultSet.next();\n\t\t\treturn modelFromResultSet(resultSet);\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "void loadOrders(String date)\n throws FlooringMasteryPersistenceException;", "@Override\n\tpublic OrderDetail getById(String id) {\n\t\tOrderDetail detail = orderDetailDao.getById(id);\n\t\treturn detail;\n\t}", "Order requireById(Long orderId);", "@Override\n\tpublic OmsOrderEntity queryOmsOrderByOrderNo(String orderNo) {\n\t\treturn null;\n\t}", "@Override\n\t@Transactional\n\tpublic Optional<Order> getOrderById(Long id) {\n\t\tOrder order = repository.get(id, Order.class);\n\t\treturn Optional.of(order);\n\t}", "Order getOrder(String orderNumber)\n throws FlooringMasteryPersistenceException;", "FetchFirst createFetchFirst();", "public Order getOrder() {\n return this.order;\n }", "public Order get(int id) {\n\t\treturn orderDao.get(id);\n\t}", "private ObservableList<String> fetchOrders(Connection con) throws SQLException {\n log.info(\"Fetch Orders from DB\");\n ObservableList<String> orders = FXCollections.observableArrayList();\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"SELECT ticketid, orderid, \"\n// + \"DATE_FORMAT(ordertime,'%b %d %Y %h:%i %p') AS ordertime, \"\n + \"qty, \"\n + \"ordertime, \"\n + \"details \"\n + \"FROM orders \"\n + \"ORDER BY ordertime, orderid\");\n\n while (rs.next()) {\n orders.add(rs.getString(\"ticketid\") + \" - \"\n + rs.getString(\"orderid\") + \" - \"\n + rs.getString(\"ordertime\")\n + \" - \" + rs.getString(\"qty\")\n + \" * \" + rs.getString(\"details\"));\n }\n\n log.info(\"Found {} orders\", orders.size());\n return orders;\n }", "ExchangeOrder selectByPrimaryKey(String id);", "private Entity queryReceipt() {\n Query query = new Query(\"Receipt\");\n PreparedQuery results = datastore.prepare(query);\n return results.asSingleEntity();\n }", "List<Order> getAll();", "public Order getOrder() {\n return order;\n }", "public SalesOrderLine get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "OrderPO selectByPrimaryKey(Integer id);", "Order find(Long id);", "public List<Order> retrieveOrders1DayAgo( Date currentDate ) throws OrderException;", "public interface SellOrderRepository extends GenericCrudRepository<SellOrder, String> {\n\n //when the price&time are equal, should put biggest amount first\n List<SellOrder> findAscPendingOrdersByPriceTime(Date toTime, BigMoney price, OrderBookId orderBookId, int size);\n\n SellOrder findPendingOrder(String id);\n\n SellOrder findLowestPricePendingOrder(OrderBookId orderBookId);\n}", "@Override\r\n\tpublic CommentEntity getLatestCommentByPostsid(Long postsid) {\n\t\tString sql = \"select * from comment where postsid=? order by time desc limit 1\";\r\n\t\tList<CommentEntity> ret = null;\r\n Session session = getSession();\r\n \r\n try {\r\n Query query = session.createSQLQuery(sql).addEntity(CommentEntity.class);\r\n query.setLong(0, postsid);\r\n ret = query.list();\r\n \r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n if (ret != null && ret.size() > 0) {\r\n\t\t\treturn ret.get(0);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "List<Order> getAllOrders()\n throws FlooringMasteryPersistenceException;", "OrderDetail selectByPrimaryKey(String detailId);", "Article findLatestArticle();", "Order findById(Long id);", "@Nullable\n public Order doRetrieveById(int id) {\n try {\n Connection cn = ConPool.getConnection();\n PreparedStatement st;\n Operator op = null;\n Order o = null;\n User u = null;\n\n st = cn.prepareStatement(\"SELECT * FROM `order` O WHERE O.id=?;\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n if (rs.next()) {\n o = new Order();\n if (rs.getString(6) != null) {\n op = opd.doRetrieveByUsername(rs.getString(6));\n } else {\n op = null;\n }\n o.setOperator(op);\n o.setId(rs.getInt(2));\n o.setTotPrice(rs.getDouble(3));\n o.setNumberOfItems(rs.getInt(4));\n o.setData(rs.getString(5));\n u = ud.doRetrieveByUsername(rs.getString(1));\n o.setUser(u);\n st = cn.prepareStatement(\"SELECT * FROM digitalpurchasing D WHERE D.order=?;\");\n st.setInt(1, o.getId());\n ResultSet rs2 = st.executeQuery();\n DigitalProduct dp = null;\n while (rs2.next()) {\n dp = dpd.doRetrieveById(rs2.getInt(1));\n o.addProduct(dp, rs2.getInt(3));\n }\n st = cn.prepareStatement(\"SELECT * FROM physicalpurchasing P WHERE P.order=?;\");\n st.setInt(1, o.getId());\n rs2 = st.executeQuery();\n PhysicalProduct pp = null;\n while (rs2.next()) {\n pp = ppd.doRetrieveById(rs2.getInt(1));\n o.addProduct(pp, rs2.getInt(3));\n }\n\n }\n st.close();\n cn.close();\n\n return o;\n } catch (SQLException e) {\n return null;\n }\n }", "public Proveedor findTopByOrderByIdDesc();", "@GET(\"V2/eshopping/driver/getDriverLastLocation/{orderId}\")\n Observable<List<DriverLocation>> getLastDriverLocationByOrderId(@Path(\"orderId\") Long orderId);", "public static ru.terralink.mvideo.sap.Orders load(long id)\n {\n return (ru.terralink.mvideo.sap.Orders)(DELEGATE.load(id));\n }", "@Transactional\npublic interface ExchangeHistoryRepository extends CrudRepository<ExchangeHistory, Long> {\n\n ExchangeHistory findTopByOrderByIdDesc();\n //findTopByOrderByAgeDesc();\n}", "NjOrderWork2 selectByPrimaryKey(String id);", "@Override\r\n\tpublic Order getOrderById(String orderId) {\n\t\treturn null;\r\n\t}", "Optional<Order> findById(Long orderId);", "public Order loadOrderFromId(int orderId) {\n throw new UnsupportedOperationException();\n }", "@Override\r\n\tpublic void Update(Order order) {\n\t\tem.merge(order);\r\n\t\t\r\n\t}", "void getOrders();", "@Override\n\tpublic Order findById(int id) {\n\t\treturn null;\n\t}", "Collection<Order> getAll();", "@Override\r\npublic List<Order> getallorders() {\n\treturn productdao.getalloderds();\r\n}", "@Override\n\tpublic Order get(Integer identifier) {\n\t\treturn null;\n\t}", "public Order readOrder(Long id)\n {\n Long customerID = null;\n List<Item> orderItems = new ArrayList<>();\n\n String sql = \"SELECT customerID FROM orders WHERE id = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n resultSet.next();\n customerID = resultSet.getLong(\"customerID\");\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n\n sql = \"SELECT items.* FROM order_items LEFT JOIN items ON order_items.itemID = items.id WHERE orderID = \" + id;\n try (Connection connection = DBUtils.getInstance().getConnection();\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(sql))\n {\n while(resultSet.next())\n {\n orderItems.add(modelItemFromResultSet(resultSet));\n }\n }\n catch (Exception e)\n {\n LOGGER.debug(e);\n LOGGER.error(e.getMessage());\n }\n return new Order(id, customerID, orderItems);\n }", "@Override\n\tpublic Forge_Order_Detail findById(Serializable id) {\n\t\treturn null;\n\t}", "public Date getOrderDate() {\n return orderDate;\n }", "public Date getOrderDate() {\n return orderDate;\n }", "public int getLastOrderId() {\r\n ArrayList<OrderRecord> result = new ArrayList<>();\r\n String sqlQuery = \"SELECT * FROM `orders`\";\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n ResultSet rs = p.executeQuery(sqlQuery);\r\n rs.last();\r\n return rs.getInt(\"id\");\r\n } catch (Exception e) {\r\n System.out.println(\"Could not get orders \" + e.toString());\r\n System.out.println(myStmt);\r\n }\r\n return 0;\r\n }", "Observable<Order> getOrder(@NonNull String orderSerial);", "public CustomerOrder getOrder() {\n return (CustomerOrder) get(\"order\");\n }", "public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll()\n {\n return findAll(0, Integer.MAX_VALUE);\n }", "public Date getDate() {\n return order.getDate();\n }", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethod(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryNoClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic mOrders loadAnOrderbyOrderCode(String orderCode) {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.eq(\"O_Code\", orderCode));\n\t\t\tList<mOrders> o= criteria.list();\n\t\t\tcommit();\n\t\t\tif(o.size()>0)\n\t\t\treturn o.get(0);\n\t\t\telse return null;\n\t\t} catch (HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally {\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}", "List<Order> findAll();", "OrderItemDto getOrderItem(long id) throws SQLException;", "public abstract CustomerOrder findOne(Long id);", "public long getOrderNumber()\n {\n return _orderNumber;\n }", "public EnumTransactionSource getOrderSource() {\n\t\treturn (getOrderSource(\"CREATE_ORDER\"));\n\t}", "@Override\n\tpublic OrderDO findById(String id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Forge_Order_Detail> findAll() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<OrderDetailBean> query(OrderDetailBean detail) {\n\t\treturn dao.query(detail);\r\n\t}", "public Order findOne(Integer id) {\r\n\t\tlog.info(\"Request to finde Order : \" + id);\r\n\t\treturn orders.stream().filter(order -> order.getOrderId().equals(id)).findFirst().get();\r\n\t}", "public Pago findTopByOrderByIdDesc();", "@Override\r\n\tpublic Users findLatest() {\n\t\treturn (Users) sessionFactory.getCurrentSession().createQuery(\"from Users order by id DESC\").setMaxResults(1).uniqueResult();\r\n\t}", "public static ru.terralink.mvideo.sap.Orders find(long id)\n {\n String intervalName = null;\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n intervalName = \"Orders.find()\";\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().startInterval(intervalName, com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.PersistenceRead);\n }\n try\n {\n Object[] keys = new Object[]{id};\n return (ru.terralink.mvideo.sap.Orders)(DELEGATE.findEntityWithKeys(keys));\n }\n finally\n {\n if(com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.isEnabled)\n {\n com.sybase.mobile.util.perf.impl.PerformanceAgentServiceImpl.getInstance().stopInterval(intervalName);\n }\n }\n }", "public OrderList findOrders(){\n sql=\"SELECT * FROM Order\";\n Order order;\n try{\n ResultSet resultSet = db.SelectDB(sql);\n \n while(resultSet.next()){\n order = new Order();\n order.setOrderID(resultSet.getString(\"OrderID\"));\n order.setCustomerID(resultSet.getString(\"CustomerID\"));\n order.setStatus(resultSet.getString(\"Status\"));\n ordersList.addItem(order);\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash finding all orders\" + e);\n }\n return ordersList;\n }", "public Order getOrder()\n\t{\n\t\treturn getOrder( getSession().getSessionContext() );\n\t}", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethodAndClear(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryWithClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check\r\n // the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }" ]
[ "0.65353245", "0.62217385", "0.616156", "0.610812", "0.60105693", "0.6010509", "0.5993875", "0.59761435", "0.5943742", "0.59045964", "0.58327043", "0.577337", "0.5749196", "0.57421637", "0.57408404", "0.5736043", "0.56765556", "0.5661542", "0.56509477", "0.5637112", "0.5622433", "0.5613029", "0.56044835", "0.5588919", "0.5575013", "0.5571719", "0.5566468", "0.5553432", "0.55368304", "0.5518197", "0.5505848", "0.55037", "0.5493308", "0.5469804", "0.54697317", "0.5468493", "0.54579073", "0.5454646", "0.54410183", "0.54088914", "0.5382721", "0.53621024", "0.5361705", "0.5350084", "0.5335182", "0.5324457", "0.5323575", "0.5321686", "0.5312699", "0.5305243", "0.5300315", "0.52983147", "0.5281981", "0.5276561", "0.5263877", "0.52636904", "0.5262196", "0.5251348", "0.5238302", "0.52217734", "0.5217999", "0.52171636", "0.5216243", "0.5213765", "0.5211085", "0.52089095", "0.5203816", "0.5196015", "0.51948977", "0.5165413", "0.5154579", "0.5146105", "0.514168", "0.51371473", "0.5137047", "0.5137047", "0.51292664", "0.51177305", "0.5111555", "0.5110799", "0.5107034", "0.50952613", "0.5094267", "0.5094267", "0.50940186", "0.5088318", "0.5086799", "0.5084623", "0.50825936", "0.50813097", "0.5079071", "0.5078185", "0.50736964", "0.50715333", "0.50704306", "0.5069321", "0.5065665", "0.5050398", "0.50467557", "0.50407887" ]
0.53171533
48
Creates an order in the database.
@Override public Order update(Order order) { try (Connection connection = JDBCUtils.getInstance().getConnection(); Statement statement = connection.createStatement();) { statement.executeUpdate(String.format("UPDATE orders " + "SET customer_id = %d WHERE order_id = %d ", order.getCustomer().getId(), order.getId())); return readOrder(order.getId()); } catch (Exception e) { LOGGER.debug(e); LOGGER.error(e.getMessage()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}", "void create(Order order);", "public void create(Order order) {\n order_dao.create(order);\n }", "public void create(Order order) {\n\t\torderDao.create(order);\n\t}", "@Override\n public Order create(Order order) {\n this.orders.add(order);\n save();\n return order;\n }", "@Override\r\n\tpublic void insertOrder(OrderVO vo) throws Exception {\n\t\tsqlSession.insert(namespaceOrder+\".createOrder\",vo);\r\n\t}", "private void addOrderDB(){\n OrganiseOrder organiser = new OrganiseOrder();\n Order finalisedOrder = organiser.Organise(order);\n // Generate the order id\n String id = UUID.randomUUID().toString();\n // Set the name of the order to the generated id\n finalisedOrder.setName(id);\n\n // Get the firebase reference\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child(\"Orders\").child(id);\n\n // Update the order\n ref.setValue(finalisedOrder);\n }", "public static void createOrders() {\n Connection con = getConnection();\n\n String createString;\n createString = \"create table Orders (\" +\n \"Prod_ID INTEGER, \" +\n \"ProductName VARCHAR(20), \" +\n \"Employee_ID INTEGER )\";\n\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(createString);\n\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Orders Table Created\");\n }", "@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "void createOrders(int orderNum) throws OrderBookOrderException;", "public void addOrder(Order order) {\n\t\tPreparedStatement addSQL = null;\n\t\tSystem.out.println(\"Creating order..\");\n\t\ttry {\n\n\t\t\taddSQL = getConnection()\n\t\t\t\t\t.prepareStatement(\"INSERT INTO orders(code, name, quantity) values(?,?,?);\",\n\t\t\t\t\t\t\tStatement.RETURN_GENERATED_KEYS);\n\n\t\t\taddSQL.setInt(1, order.getCode());\n\t\t\taddSQL.setString(2, order.getName());\n\t\t\taddSQL.setInt(3, order.getQuantity());\n\n\t\t\tint rows = addSQL.executeUpdate();\n\n\t\t\tif (rows == 0) {\n\t\t\t\tSystem.out.println(\"Failed to insert order into database\");\n\t\t\t}\n\n\t\t\ttry (ResultSet generatedID = addSQL.getGeneratedKeys()) {\n\t\t\t\tif (generatedID.next()) {\n\t\t\t\t\torder.setID(generatedID.getInt(1));\n\t\t\t\t\tSystem.out.println(\"Order created with id: \" + order.getID());\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Failed to create order.\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (addSQL != null) {\n\t\t\t\ttry {\n\t\t\t\t\taddSQL.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Order placeNewOrder(Order order, Project project, User user);", "public int createPurchaseOrder(PurchaseOrder purchaseOrder){\n try {\n session.save(purchaseOrder);\n tx.commit();\n } catch (Exception e) {\n e.printStackTrace();\n tx.rollback();\n return 0 ;\n }\n return 0;\n }", "public Order createOrder(WeeklyRecipe wr, User u, Date deliveryTime,\n\t\t\tint quantity) {\n\t\tem.getTransaction().begin();\n\t\tOrder order = new Order(false, null, false, deliveryTime, false,\n\t\t\t\tquantity, 0, wr, u);\n\t\tem.persist(order);\n\t\tem.getTransaction().commit();\n\t\treturn order;\n\t}", "Order addOrder(String orderId, Order order) throws OrderBookOrderException;", "public void createOrder() throws FlooringDaoException {\n boolean validData = true;\n do {\n try {\n Order newOrder = view.getNewOrderInfo();\n service.createOrder(newOrder);\n validData = true;\n } catch (InvalidDataException ex) {\n view.displayError(ex.getMessage());\n validData = false;\n } catch (NumberFormatException ex) {\n view.displayError(\"Area must consist of digits 0-9 with or without a decimal point.\");\n validData = false;\n }\n } while (!validData);\n }", "@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public void addOrder(Order o) throws SQLException\r\n {\r\n String sqlQuery = \r\n \"INSERT INTO orders (custname, tablenumber, foodname, beveragename, served, billed) VALUES (\" +\r\n \"'\" + o.getCustomerName() + \"', \" + \r\n o.getTable() + \", \" + \r\n \"'\" + o.getFood() + \"', \" +\r\n \"'\" + o.getBeverage() + \"', \" + \r\n o.isServed() + \", \" +\r\n o.isBilled() + \")\";\r\n myStmt.executeUpdate(sqlQuery);\r\n }", "public void buildOrders() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT\"\n + \" EXISTS orders (id TEXT, orderer_id TEXT, deliverer_id TEXT,\"\n + \" pickup_time REAL, dropoff_time REAL, pickup_location TEXT,\"\n + \" dropoff_location TEXT, price REAL, pickup_phone TEXT,\"\n + \" PRIMARY KEY (id),\" + \" FOREIGN KEY (orderer_id)\"\n + \" REFERENCES users(id), FOREIGN KEY (deliverer_id) REFERENCES\"\n + \" users(id), FOREIGN KEY (pickup_location) REFERENCES\"\n + \" locations(id),\"\n + \" FOREIGN KEY (dropoff_location) REFERENCES locations(id)\"\n + \" ON DELETE CASCADE ON UPDATE CASCADE);\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "public Order create(Order order) {\n\t\tthis.orderRepository.save(order);\n\t\tfor (Product product : order.getProducts()) {\n\t\t\tproduct.setOrder(order);\n\t\t\tthis.productService.create(product);\n\t\t}\n\t\treturn order;\n\t}", "@Test\n public void testAddOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Add Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }", "public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }", "public void saveOrder() {\n setVisibility();\n Order order = checkInputFromUser();\n if (order == null){return;}\n if(orderToLoad != null) DBSOperations.remove(connection,orderToLoad);\n DBSOperations.add(connection, order);\n }", "UserOrder save(UserOrder order);", "@Override\n\tpublic void addOrder(Order order) {\n\t\t\n\t em.getTransaction().begin();\n\t\t\tem.persist(order);\n\t\t\tem.getTransaction().commit();\n\t\t\tem.close();\n\t\t\temf.close();\n\t \n\t}", "void newOrder();", "public Order createOrder() throws SQLException {\n\t\tOrder order = new Order();\n\t\tfor (Object object : Cart.getCart().getListMedia()) {\n\t\t\tCartMedia cartMedia = (CartMedia) object;\n\t\t\tOrderMedia orderMedia = new OrderMedia(cartMedia.getMedia(), cartMedia.getQuantity(), cartMedia.getPrice());\n\t\t\torder.getlstOrderMedia().add(orderMedia);\n\t\t}\n\t\treturn order;\n\t}", "Order addOrder(String orderNumber, Order order)\n throws FlooringMasteryPersistenceException;", "public void addSimpleOrder(Order o) {\n DatabaseConnection connection = new DatabaseConnection();\r\n if(connection.openConnection())\r\n {\r\n if(o.getType() == 1) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO drank_order (`TafelID`, `DrankID`) VALUES(\" + o.getTafelID() + \",\" + o.getID() + \");\");\r\n }\r\n\r\n else if(o.getType() == 0) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO gerecht_order (`TafelID`, `GerechtID`) VALUES(\" + o.getTafelID() + \",\" + o.getID() + \");\");\r\n }\r\n }\r\n\r\n connection.closeConnection();\r\n }", "@Test\n\tpublic void createOrderTest() {\n\t\ttry {\n\t\t\tassertNull(salesOrderCtrl.getOrder());\n\t\t\tsalesOrderCtrl.createSalesOrder();\n\t\t\tassertNotNull(salesOrderCtrl.getOrder());\n\t\t} catch (Exception e) {\n\t\t\te.getMessage();\n\t\t}\n\t}", "protected abstract Order createOrder(Cuisine cuisine);", "@Override\n public void addOrder(Order order) throws PersistenceException{\n Order newOrder = orders.put(order.getOrderNumber(), order);\n write(order.getOrderDate());\n }", "public Invoice createInvoice(Order order);", "@Override\n\tpublic void createOrder(OrderDto orderDto) {\n\t\tModelMapper modelMapper = new ModelMapper();\n\t\t\n\t\tmodelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);\n\t\t\n\t\tOrderEntity orderEntity = new OrderEntity();\n\t\t//\t\t= modelMapper.map(orderDto, OrderEntity.class);\n\t\t\n\t\t\n\t\torderEntity.setCustomerName(orderDto.getCustomer().getName());\n\t\torderEntity.setEmail(orderDto.getCustomer().getEmail());\n\t\torderEntity.setProductName(orderDto.getProduct().getName());\n\t\torderEntity.setDescription(orderDto.getProduct().getDescription());\n\t\torderEntity.setAmount(orderDto.getAmount());\n\t\torderEntity.setoId(orderDto.getoId());\n\t\torderRepository.save(orderEntity);\n\t\t\t\t\n\t}", "@Test (priority = 3)\n\t@Then(\"^Create Order$\")\n\tpublic void create_Order() throws Throwable {\n\t\tCommonFunctions.clickButton(\"wlnk_Home\", \"Sheet1\", \"Home\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLNK_OrderNewServices\", \"Sheet1\", \"Oreder New Service\", \"CLICK\");\n\t\t//Thread.sleep(3000);\n\t\tCommonFunctions.clickButton(\"WRD_complete\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Contine\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WCB_Additional\", \"Sheet1\", \"Additional\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_checkout\", \"Sheet1\", \"Checkout\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_completeOrder\", \"Sheet1\", \"complete order\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_PayNow\", \"Sheet1\", \"Pay Now\", \"CLICK\");\n\t\tCommonFunctions.checkObjectExist(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"NO\");\n\t\tCommonFunctions.clickButton(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"CLICK\");\n\t}", "@Test\n public void testOrderFactoryCreate() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n assertEquals(1, orderController.getOrders().size());\n }", "public static void createOrder(Staff staff) {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Creating a new order************\");\n\t\t// TODO - implement RRPSS.createOrder\n\t\tTableManager tableManager = new TableManager();\n\t\tList listOfTables = tableManager.onStartUp();\n\n\t\tOrderManager orderManager = new OrderManager();\n\t\tTable table = null;\n\t\tOrder order = null;\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\t// print the list of tables for the user to select from.\n\t\t\tfor (i = 0; i < listOfTables.size(); i++) {\n\t\t\t\ttable = (Table) listOfTables.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Table \" + table.getId()\n\t\t\t\t\t\t+ \" | Size: \" + table.getCapacity());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.print(\"Select a table to create an order: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\ttable = (Table) listOfTables.get(choice - 1);\n\n\t\t\torder = new Order();\n\t\t\torder.setStaff(staff);\n\t\t\torder.setTable(table);\n\t\t\torder.setClosed(false);\n\n\t\t\tcheck = orderManager.createOrder(order);\n\n\t\t\tif (check) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\tSystem.out.println(\"Order is created successfully!\");\n\n\t\t\t\tcheck = tableManager.updateTable(table);\n\n\t\t\t\tif (check) {\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\tSystem.out.println(\"Added order to table!\");\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\tSystem.out.println(\"Failed to add order to table!\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Failed to created order!\");\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of creating new order************\");\n\t}", "private void createIPOOrder(final OrderBO completedOrder)\n\t{\n\t\t// YTODO Auto-generated method stub\n\t\tfinal FMIPOOrderModel order = getmodelService().create(FMIPOOrderModel.class);\n\t\torder.setCode(completedOrder.getMstrOrdNbr().trim());\n\t\torder.setBilltoparty(getAccountByNabs(completedOrder.getBillToAcct().getAccountCode()));\n\t\torder.setShiptoparty(getAccountByNabs(completedOrder.getShipToAcct().getAccountCode()));\n\t\torder.setPONumber(completedOrder.getCustPoNbr());\n\t\torder.setOrdercomments(completedOrder.getComment1() + completedOrder.getComment2() + completedOrder.getComment3());\n\t\torder.setUserFirstName(\"IPO USER\");\n\t\tgetmodelService().save(order);\n\t\tcreateIPOOrderEntry(order, completedOrder.getItemList());\n\t}", "void createOrder(List<Product> products, Customer customer);", "OrderDTO create(OrderDTO orderDTO);", "@Test\n public void testCreatePurchaseOrder() throws Exception {\n System.out.println(\"createPurchaseOrder\");\n Long factoryId = 1L;\n Long contractId = 2L;\n Double purchaseAmount = 4D;\n Long storeId = 2L;\n String destination = \"store\";\n Calendar deliveryDate = Calendar.getInstance();\n deliveryDate.set(2015, 0, 13);\n Boolean isManual = false;\n Boolean isToStore = true;\n PurchaseOrderEntity result = PurchaseOrderManagementModule.createPurchaseOrder(factoryId, contractId, purchaseAmount, storeId, destination, deliveryDate, isManual, isToStore);\n assertNotNull(result);\n }", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearOrdersTest() {\r\n\r\n\t\tpd.crearOrders();\r\n\t\tpd.pm.deletePersistent(pd.o1);\r\n\t\tpd.pm.deletePersistent(pd.o2);\r\n\t\tpd.pm.deletePersistent(pd.o3);\r\n\r\n\t}", "private void generateAndSubmitOrder()\n {\n OrderSingle order = Factory.getInstance().createOrderSingle();\n order.setOrderType(OrderType.Limit);\n order.setPrice(BigDecimal.ONE);\n order.setQuantity(BigDecimal.TEN);\n order.setSide(Side.Buy);\n order.setInstrument(new Equity(\"METC\"));\n order.setTimeInForce(TimeInForce.GoodTillCancel);\n if(send(order)) {\n recordOrderID(order.getOrderID());\n }\n }", "void prepareOrder(int orderId);", "public void insertOrder(String food_id, String rest_id, String status) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"food_id\", food_id);\n contentValues.put(\"rest_id\", rest_id);\n contentValues.put(\"status\", status);\n long isInsert = database.insert(AppConstant.ORDER_TABLE_NAME, null, contentValues);\n if (isInsert != -1) {\n Toast.makeText(context, \"Order Created Successfully.\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(context, \"Order failed to create.\", Toast.LENGTH_SHORT).show();\n }\n }", "@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }", "@Override\n\t\tprotected String doInBackground(String... params)\n\t\t{\n\n\t\t\tint id = mDatabaseService.createOrder(Utils.getCurrentDateTime(), \"\"+tableId, \"1\");\n\t\t\tLog.d(TAG, \"order created id:\" + id);\n\t\t\treturn \"\" + id;\n\t\t}", "public static void createExampleOrders(DatabaseReference myRef) {\n for (int i = 1; i <= 3; i++) {\r\n myRef.child(\"example\" + i).child(\"status\").setValue(\"ACTIVE\");\r\n myRef.child(\"example\" + i).child(\"food\").setValue(\"Example Order \" + i);\r\n myRef.child(\"example\" + i).child(\"table\").setValue(i);\r\n myRef.child(\"example\" + i).child(\"timestamp\").setValue(\"0000000000000\");\r\n }\r\n }", "@Override\n\tpublic void insertOrder(Orders order) throws SQLException {\n\t\tConnection conn = null;\n PreparedStatement stmt = null;\n String sql=\"INSERT INTO orders(orderName,orderAddress,orderPhone,orderNumber,orderTime,bookName,orderMemo) VALUES(?,?,?,?,?,?,?)\";\n try {\n conn = DBCPUtils.getConnection();\n stmt = conn.prepareStatement(sql);\n stmt.setString(1,order.getOrderName());\n stmt.setString(2,order.getOrderAddress());\n stmt.setString(3,order.getOrderPhone());\n stmt.setInt(4,order.getOrderNumber());\n stmt.setString(5,order.getOrderTime());\n stmt.setString(6,order.getBookName());\n stmt.setString(7,order.getOrderMemo());\n stmt.executeUpdate();\n \n } catch (SQLException e) {\n e.printStackTrace();\n }finally{\n DBCPUtils.releaseConnection(conn, stmt, null); \n }\n\t\t\n\t\t\n\t}", "@Override\n protected Order doInBackground(Order... params) {\n DBService dbService = new DBService(mContext, DBService.DB_NAME, null, DBService.DATABASE_VERSION);\n Order order = (Order) params[0];\n dbService.insertOrderIntoDatabase(order);\n return order;\n }", "public abstract void saveOrder(Order order);", "@PostMapping(\"/add-order\")\n\tpublic ResponseEntity<Object> insertOrder(@RequestBody Order order) {\n\t\tLOGGER.info(\"add-Order URL is opened\");\n\t\tLOGGER.info(\"addOrder() is initiated\");\n\t\tOrderDTO orderDTO = null;\n\t\tResponseEntity<Object> orderResponse = null;\n\t\torderDTO = orderService.addOrder(order);\n\t\torderResponse = new ResponseEntity<>(orderDTO, HttpStatus.ACCEPTED);\n\t\tLOGGER.info(\"addOrder() has executed\");\n\t\treturn orderResponse;\n\t}", "int insert(OrderDetail record);", "public void insertDB() {\n sql = \"Insert into Order (OrderID, CustomerID, Status) VALUES ('\"+getCustomerID()+\"','\"+getCustomerID()+\"', '\"+getStatus()+\"')\";\n db.insertDB(sql);\n \n }", "public Order() {\n this(DSL.name(\"order\"), null);\n }", "@Override\r\n\tpublic OrderItem createOrderItem(OrderItem newOrderItem) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tsession.save(newOrderItem);\r\n\t\treturn newOrderItem;\r\n\r\n\t}", "CustomerOrder save(CustomerOrder customerOrder);", "int insert(OrderPO record);", "@Override\n\tpublic OrderResponseDto createOrder(OrderRequestDto orderRequestDto) {\n\t\tLOGGER.info(\"Enter into order service impl\");\n\n\t\tOptional<Stocks> stock = stockRepository.findById(orderRequestDto.getStockId());\n\t\tOptional<User> user = userRepository.findById(orderRequestDto.getUserId());\n\n\t\tif (!stock.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_STOCK_NOT_FOUND);\n\t\tif (!user.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_USER_NOT_FOUND);\n\t\tif (orderRequestDto.getStockQuantity() >= 100)\n\t\t\tthrow new CommonException(TradingConstants.ERROR_QUANTITY);\n\t\tDouble brokeragePercent = Double.valueOf(stock.get().getBrokerageAmount() / 100d);\n\t\tDouble brokerageAmount = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokeragePercent;\n\t\tDouble totalPrice = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokerageAmount;\n\n\t\tOrders orders = Orders.builder().stockId(stock.get().getStockId())\n\t\t\t\t.stockQuantity(orderRequestDto.getStockQuantity()).totalPrice(totalPrice)\n\t\t\t\t.stockStatus(StockStatus.P.toString()).userId(orderRequestDto.getUserId()).build();\n\t\torderRepository.save(orders);\n\t\tResponseEntity<GlobalQuoteDto> latest = latestStockPrice(stock.get().getStockName());\n\t\treturn new OrderResponseDto(orders.getOrderId(), stock.get().getStockPrice(),\n\t\t\t\tlatest.getBody().getGlobalQuote().getPrice());\n\t}", "@Override\r\n\tpublic void PassOrder(Order order) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tem.persist(order);\r\n\t\t\r\n\t}", "@Override\n\tpublic boolean doCreate(Orders vo) throws Exception\n\t{\n\t\treturn false;\n\t}", "public void makeOrder(Order order) {\n for(Order_Item x : order.getOrdered()){\n TableRow item_row = build_row(x.getItem().getName(), String.valueOf(x.getQuantity()), (x.getPrice()*x.getQuantity()) + \"€\");\n orderLayout.addView(item_row);\n }\n\n refreshPriceView();\n }", "@Transactional\n\tpublic OrderDTO insert(OrderDTO dto){\n\t\t//Order instance of received data \t\t\n\t\tOrder order = new Order(null, dto.getAddress(), dto.getLatitude(), dto.getLatitude(),\n\t\t\t\tInstant.now(), OrderStatus.PENDING);\n\t\t\n\t\tfor(ProductDTO p : dto.getProducts()) {\n\n\t\t\t//create the entity by id then add to order's prod list\n\t\t\tProduct product = productRepository.getOne(p.getId());\n\t\t\torder.getProducts().add(product);\n\t\t}\n\t\t\n\t\torder = repository.save(order);\n\t\treturn new OrderDTO(order);\n\t}", "int insert(OrderDetails record);", "@GetMapping(\"/createorders\")\n\tpublic void generateOrderRequest(){\n\t\tSystem.out.println(\" == generateOrderRequest == \");\n\t\tfor(int i=0;i<150;i++) {\n\t\t\t// create new order\n\t\t\tOrderRequest order = new OrderRequest();\n\t\t\torder.setOrderReqId(\n\t\t\t\t\tInteger.parseInt(new RandomStringGenerator.Builder().withinRange('1', '9').build().generate(5))\n\t\t\t\t\t);\n\t\t\torder.setName(new RandomStringGenerator.Builder().withinRange('a', 'z').build().generate(5));\n\t\t\t// create status row for this order\n\t\t\tOrderRequestStatus orderStatus = new OrderRequestStatus();\n\t\t\torderStatus.setStatus(\"new\");\n\t\t\torderStatus.setOrderRequest(order);\n\t\t\torderStateRepository.save(orderStatus);\n\t\t}\n\t}", "void insert(OrderPreferential record) throws SQLException;", "@Insert({\n \"insert into order (id, orderid, \",\n \"name, price, userid)\",\n \"values (#{id,jdbcType=BIGINT}, #{orderid,jdbcType=VARCHAR}, \",\n \"#{name,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{userid,jdbcType=VARCHAR})\"\n })\n int insert(Order record);", "private void createTableOrdersWaiting() throws SQLException\r\n {\r\n String sqlQuery = \r\n \"CREATE TABLE orders \" +\r\n \"(id auto_increment INT NOT NULL PRIMARY KEY, \" +\r\n \"custname VARCHAR(25) NOT NULL, \" +\r\n \"tablenumber INT NOT NULL, \" +\r\n \"foodname VARCHAR(100) NOT NULL, \" + \r\n \"beveragename VARCHAR(100) NOT NULL, \" + \r\n \"served BOOLEAN NOT NULL, \" + \r\n \"billed BOOLEAN NOT NULL, \" + \r\n \"time DATETIME DEFAULT CURRENT_TIMESTAMP)\";\r\n myStmt.executeUpdate(sqlQuery);\r\n }", "@Override\n\tpublic long insert(OrderDetail t) {\n\t\tt.setState(\"1\");\n\t\tlong insert = orderDetailDao.insert(t);\n\t\treturn insert;\n\t}", "Purchase create(Purchase purchase) throws SQLException, DAOException;", "public static int insert(OrderItems o) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n System.out.println(\"DBSetup @ LINE 101\");\n String query\n = \"INSERT INTO orderItem (orderNumber, productCode, quantity) \"\n + \"VALUES (?, ?, ?)\";\n try {\n ps = connection.prepareStatement(query);\n ps.setInt(1, o.getOrderNumber());\n ps.setString(2, o.getProduct().getProductCode());\n ps.setInt(3, o.getQuantity());\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public void insertNewOrderDB(String customerID, String status) {\n newID = countOrders() + 1;\n sql = \"Insert into Order (OrderID, CustomerID, Status) VALUES ('\"+newID+\"','\"+customerID+\"', '\"+status+\"')\";\n System.out.println(sql + \"\\n\" + newID);\n db.insertDB(sql);\n \n }", "public void saveDate(View view) {\n// create an object of order\n Order order = new Order(name, Integer.parseInt(price));\n dbHandler.addOrder(order);\n Toast.makeText(getApplicationContext(), \"Hooray! Data Saved in DB\", Toast.LENGTH_SHORT).show();\n }", "public static int insert(Order order) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n System.out.println(\"DBSetup @ LINE 101\");\n String query\n = \"INSERT INTO orders (dateNow, userID, taxRate, totalCost, paid) \"\n + \"VALUES (?, ?, ?, ?, ?)\";\n try {\n ps = connection.prepareStatement(query);\n //ps.setInt(1, order.getOrderNumber());\n ps.setTimestamp(1, order.getDate());\n ps.setInt(2, order.getUser().getUserID());\n System.out.println(\"order @ line 166 \" + order.getUser().getUserID());\n ps.setFloat(3, order.getTaxRate());\n ps.setDouble(4, order.getTotal());\n ps.setBoolean(5, order.getPaid());\n return ps.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e);\n return 0;\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n }", "public MOrder createTransferOrder(Integer newDocTypeID) throws Exception{\n\t\t// Crear el pedido idéntico\n\t\tMOrder newOrder = new MOrder(getCtx(), 0, get_TrxName());\n\t\tMOrder.copyValues(this, newOrder);\n\t\tnewOrder.setC_DocTypeTarget_ID(newDocTypeID);\n\t\tnewOrder.setC_DocType_ID(newDocTypeID);\n\t\t// Intercambiar el depósito y organización origen por destino \n\t\tnewOrder.setAD_Org_ID(getAD_Org_Transfer_ID());\n\t\tnewOrder.setAD_Org_Transfer_ID(getAD_Org_ID());\n\t\tnewOrder.setM_Warehouse_ID(getM_Warehouse_Transfer_ID());\n\t\tnewOrder.setM_Warehouse_Transfer_ID(getM_Warehouse_ID());\n\t\tnewOrder.setRef_Order_ID(getID());\n\t\tnewOrder.setDocStatus(DOCSTATUS_Drafted);\n\t\tnewOrder.setDocAction(DOCACTION_Complete);\n\t\tnewOrder.setProcessed(false);\n\t\t// Guardar\n\t\tif(!newOrder.save()){\n\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t}\n\t\t// Copiar las líneas\n\t\tMOrderLine newOrderLine;\n\t\tBigDecimal pendingQty;\n\t\tfor (MOrderLine orderLine : getLines(true)) {\n\t\t\tnewOrderLine = new MOrderLine(getCtx(), 0, get_TrxName());\n\t\t\tMOrderLine.copyValues(orderLine, newOrderLine);\n\t\t\tpendingQty = orderLine.getQtyOrdered().subtract(orderLine.getQtyDelivered());\n\t\t\t\n\t\t\tnewOrderLine.setC_Order_ID(newOrder.getID());\n\t\t\tnewOrderLine.setQty(pendingQty);\n\t\t\tnewOrderLine.setQtyReserved(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyInvoiced(pendingQty);\n\t\t\tnewOrderLine.setQtyDelivered(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyTransferred(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setPrice(orderLine.getPriceEntered());\n\t\t\tnewOrderLine.setRef_OrderLine_ID(orderLine.getID());\n\t\t\tnewOrderLine.setProcessed(false);\n\t\t\tnewOrderLine.setM_Warehouse_ID(newOrder.getM_Warehouse_ID());\n\t\t\tnewOrderLine.setAD_Org_ID(newOrder.getAD_Org_ID());\n\t\t\tif(!newOrderLine.save()){\n\t\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t\t}\n\t\t}\n\t\treturn newOrder;\n\t}", "public boolean insertOrder(Order order) throws ApplicationEXContainer.ApplicationCanNotChangeException {\n boolean result;\n try(Connection connection = MySQLDAOFactory.getConnection();\n AutoRollback autoRollback = new AutoRollback(connection)){\n result = orderDao.insertOrder(connection,order);\n autoRollback.commit();\n } catch (SQLException | NamingException | DBException throwables) {\n LOGGER.error(throwables.getMessage());\n throw new ApplicationEXContainer.ApplicationCanNotChangeException(throwables.getMessage(),throwables);\n }\n\n return result;\n }", "@Override\n @Transactional\n public OrderDTO createOrder(OrderDTO orderDTO) {\n\n String orderId = KeyUtil.genUniqueKey();\n BigDecimal orderAmount = new BigDecimal(BigInteger.ZERO);\n// List<CartDTO> cartDTOList = new ArrayList<>();\n //1.\n for (OrderDetail orderDetail : orderDTO.getOrderDetailList()) {\n ProductInfo productInfo = productInfoService.findOne(orderDetail.getProductId());\n if (productInfo == null) {\n throw new ProjectException(ResultEnum.PRODUCT_NOT_EXIST);\n }\n\n //2.\n orderAmount = productInfo.getProductPrice()\n .multiply(new BigDecimal(orderDetail.getProductQuantity()))\n .add(orderAmount);\n //3. orderDetail db insertion\n orderDetail.setDetailId(KeyUtil.genUniqueKey());\n orderDetail.setOrderId(orderId);\n BeanUtils.copyProperties(productInfo, orderDetail);\n orderDetailRepository.save(orderDetail);\n// CartDTO cartDTO = new CartDTO(orderDetail.getProductId(), orderDetail.getProductQuantity());\n// cartDTOList.add(cartDTO);\n }\n\n //3. orderMaster\n OrderMaster orderMaster = new OrderMaster();\n orderDTO.setOrderId(orderId);\n BeanUtils.copyProperties(orderDTO, orderMaster);\n orderMaster.setOrderAmount(orderAmount);\n orderMaster.setOrderStatus(OrderStatusEnum.NEW.getCode());\n orderMaster.setPayStatus(PayStatusEnum.WAIT.getCode());\n orderMasterRepository.save(orderMaster);\n\n //4.\n List<CartDTO> cartDTOList = orderDTO.getOrderDetailList().stream().map(e ->\n new CartDTO(e.getProductId(), e.getProductQuantity())\n ).collect(Collectors.toList());\n\n productInfoService.decreaseInventory(cartDTOList);\n\n return orderDTO;\n }", "int insert(ClOrderInfo record);", "public Order() {\n }", "private void createOrder(Shop shop, FileManager fileManager, ArrayList<Tool> toolList,\n ArrayList<Integer> quantityList) {\n if (toolList.size() != 0) {\n if (shop.createOrderOrAppendOrder(shop, toolList, quantityList, fileManager)) {\n System.out.println(\"Successfully added and/or appended order to orders.txt!\");\n } else {\n System.out.println(\"ERROR: Could not edit orders.txt.\");\n }\n }\n }", "public void createSourceOrderItemTable() throws SQLException {\n sourceExecuteWithLog(extraSQLCommand.getCreateTableOrderItem());\n }", "public Order() {\n\t\tthis.orderID = DataHolder.getInstance().getLastOrderId() + 1;\n\t\tthis.dateOrdered = new Date();\n\t\tthis.dateFilled = null;\n\t\tthis.projectedDate = addDays(dateOrdered,1);\n\t}", "@Override\n public Order createOrder(int stockId, int partyId, int userId, boolean isBuy, BigDecimal price, int size) throws\n InvalidEntityException,\n MissingEntityException,\n IOException {\n Stock stock = stockDao.getStockById(stockId).get();\n User user = userDao.getUserById(userId).get();\n Party party = partyDao.getPartyById(partyId).get();\n LocalDateTime versionTime = LocalDateTime.now();\n Order order = new Order(user, party, stock, price, size, isBuy, PENDING, versionTime);\n order = orderDao.createOrder(order);\n auditDao.writeMessage(\"Add Order: \" + order.getId() + \" to Repository, userId: \" + userId);\n // sets status\n matchOrder(order);\n if (order.getStatus() == PENDING) {\n order.setStatus(ACTIVE);\n orderDao.editOrder(order);\n }\n return order;\n }", "@RequestMapping(value = \"/\", method = RequestMethod.POST)\n public ResponseEntity create(@RequestBody Order order)\n {\n throw new NotImplementedException();\n }", "public Order() {\n\t\tsuper();\n\t\tcurrentOrder += 1;\n\t\torderNumber = currentOrder;\n\t\tthis.orderPrice.setScale(2, BigDecimal.ROUND_HALF_EVEN);\n\t}", "public APIResponse placeOrder(@NotNull Order order){\n try {\n validateOrder(order);\n \n order.getItems().addAll(\n orderItemRepository.saveAll(order.getItems())\n );\n orderRepository.save( order );\n return APIResponse.builder()\n .success( true)\n .data( true )\n .error( null )\n .build();\n }catch (Exception exception){\n\n log.error(exception.getMessage());\n return APIResponse.builder()\n .success( true)\n .data( false )\n .error( exception.getMessage() )\n .build();\n }\n }", "public void addOrders() {\n\t\torders.stream()\n\t\t\t.forEach(db::store);\n\t}", "public void startOrder() {\r\n this.o= new Order();\r\n }", "@Override\n\tpublic int insertOrderTrading(Order_TradingVO otvo) {\n\t\treturn sql.insert(\"insertOrderTrading\", otvo);\n\t}", "public static void insertOrders() {\n Connection con = getConnection();\n\n String insertString1, insertString2, insertString3, insertString4;\n insertString1 = \"insert into Orders values(543, 'Belt', 6323)\";\n insertString2 = \"insert into Orders values(432, 'Bottle', 1234)\";\n insertString3 = \"insert into Orders values(876, 'Ring', 5678)\";\n\n try {\n stmt = con.createStatement();\n stmt.executeUpdate(insertString1);\n stmt.executeUpdate(insertString2);\n stmt.executeUpdate(insertString3);\n\n stmt.close();\n con.close();\n\n } catch (SQLException ex) {\n System.err.println(\"SQLException: \" + ex.getMessage());\n }\n JOptionPane.showMessageDialog(null, \"Data Inserted into Orders Table\");\n }", "public LabOrder generateOrder() {\n LabOrder order = new LabOrder();\n Random r = new Random();\n Date date = getDate(r);\n order.insertts = date; //randbetween 1388534400 <-> 1420070400\n order.ordernr = \"O\" + r.nextInt();\n order.patientnr = \"P\" + r.nextInt(10000); //1 mil / 100 = 10 000\n order.visitNr = \"V\" + r.nextInt(); //unique;\n order.specimens.add(generateSpecimen(order));\n order.specimens.add(generateSpecimen(order));\n return order;\n }", "public Order() {\n\t}", "int insert(Orderall record);", "NewOrderResponse newOrder(NewOrder order);", "public interface OrderDao {\n\n void createOrder(Order order);\n\n}", "private CustomerOrder addOrder(Customer customer, ShoppingCart cart) {\n CustomerOrder order = new CustomerOrder();\r\n order.setCustomerID(customer);\r\n order.setCustomerOrderAmount(BigDecimal.valueOf(cart.getTotal()));\r\n\r\n // Get current timestamp\r\n Calendar calendar = Calendar.getInstance();\r\n Timestamp currentTimestamp = new java.sql.Timestamp(calendar.getTime().getTime());\r\n order.setCustomerOrderCreated(currentTimestamp);\r\n\r\n // Create confirmation number\r\n Random random = new Random();\r\n int i = random.nextInt(999999999);\r\n order.setCustomerOrderConfirmationNumber(i);\r\n out.print(i);\r\n\r\n // Save order\r\n em.persist(order);\r\n\r\n return order;\r\n }", "public Order saveOrUpdate(Order order);", "@POST(\"orders/new_order/\")\n Call<ApiStatus> createNewOrderByUser(@Body Order myOrder);", "public void addNewOrder(Order order) {\n\t\tnewOrders.add(order);\n\t}", "int insert(ExchangeOrder record);", "public org.datacontract.schemas._2004._07.cdiscount_service_marketplace_api_external_contract_data_order.ExternalOrder addNewOrder()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.datacontract.schemas._2004._07.cdiscount_service_marketplace_api_external_contract_data_order.ExternalOrder target = null;\n target = (org.datacontract.schemas._2004._07.cdiscount_service_marketplace_api_external_contract_data_order.ExternalOrder)get_store().add_element_user(ORDER$0);\n return target;\n }\n }" ]
[ "0.783669", "0.77181125", "0.7698991", "0.74531186", "0.73931664", "0.7143362", "0.701171", "0.7001771", "0.69523996", "0.6921208", "0.687653", "0.68594503", "0.6856352", "0.68113786", "0.676439", "0.6735427", "0.6669064", "0.66597426", "0.6609391", "0.6551732", "0.6534431", "0.6506825", "0.6495393", "0.6491252", "0.64396656", "0.6423925", "0.6401163", "0.6389023", "0.6385808", "0.638313", "0.6368461", "0.6351257", "0.6350546", "0.63420475", "0.6324756", "0.6302547", "0.62915176", "0.6268745", "0.6241604", "0.62399805", "0.6225019", "0.62143075", "0.6189624", "0.61691284", "0.61688524", "0.6164288", "0.61573726", "0.6156454", "0.6148808", "0.61261874", "0.6114354", "0.6113822", "0.6095225", "0.60938805", "0.6083095", "0.6076257", "0.60737133", "0.6069407", "0.6052047", "0.6050563", "0.6030286", "0.6020014", "0.6017337", "0.6014544", "0.6014409", "0.6009466", "0.59915626", "0.59680706", "0.59647715", "0.595434", "0.59510815", "0.5935873", "0.5932173", "0.59253275", "0.59207046", "0.59181005", "0.5910584", "0.587092", "0.5867159", "0.58527756", "0.5847934", "0.5847084", "0.5843794", "0.58431387", "0.58321905", "0.5830972", "0.5823703", "0.58212453", "0.5821196", "0.581323", "0.58132166", "0.58085066", "0.57965297", "0.5786763", "0.57730705", "0.5757178", "0.57490724", "0.5748585", "0.5746548", "0.5716466", "0.57122" ]
0.0
-1
Updates a order in the database.
@Override public Order modelFromResultSet(ResultSet resultSet) throws SQLException { // build customer Long customerId = resultSet.getLong("customer_id"); Customer customer = new Customer(customerId); // build items String[] itemArray = resultSet.getString("items").split(";"); HashMap<Item, Long> itemMap = new HashMap<>(); Arrays.stream(itemArray) .map(s -> s.split(",")) .forEach(s -> itemMap.put( new Item(Long.parseLong(s[0]), s[1], Double.parseDouble(s[2])), Long.parseLong(s[3]))); HashMap<Item, Long> sortedItemMap = itemMap.entrySet() .stream() .sorted(Comparator.comparingLong(e -> e.getKey().getId())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (left, right) -> left, LinkedHashMap::new)); // sort map after ordering issue from ORDER_BY clause // build order Long orderId = resultSet.getLong("order_id"); Order order = new Order(orderId, customer, sortedItemMap); return order; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update(Order order) {\n order_dao.update(order);\n }", "public void update(Order order) {\n\t\torderDao.update(order);\n\t}", "void update(Order order);", "@Override\n\tpublic void updateOrder(Orders order) throws SQLException {\n\t\tConnection conn = null;\n PreparedStatement stmt = null;\n String sql=\"UPDATE orders SET orderName=?,orderAddress=?,orderPhone=?,orderNumber=?,bookName=?,orderMemo=? WHERE orderId=?\";\n try {\n conn = DBCPUtils.getConnection();\n stmt = conn.prepareStatement(sql);\n stmt.setString(1,order.getOrderName());\n stmt.setString(2,order.getOrderAddress());\n stmt.setString(3,order.getOrderPhone());\n stmt.setInt(4,order.getOrderNumber());\n stmt.setString(5,order.getBookName());\n stmt.setString(6,order.getOrderMemo());\n stmt.setInt(7,order.getOrderId());\n stmt.executeUpdate();\n \n } catch (SQLException e) {\n e.printStackTrace();\n }finally{\n DBCPUtils.releaseConnection(conn, stmt, null); \n }\n\t\t\n\t}", "public CartOrder updateOrder(CartOrder order) throws Exception;", "@Test\n public void testUpdateOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Update Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n addedOrder.setCustomer(\"Updated Order\");\n\n dao.updateOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }", "CustomerOrder update(CustomerOrder customerOrder);", "@Override\r\n\tpublic Order update(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"UPDATE orders \"\r\n\t\t\t\t\t+ \"SET customer_id = %d WHERE order_id = %d \", order.getCustomer().getId(), order.getId()));\t\r\n\t\t\treturn readOrder(order.getId());\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void updateOrder(OrderVO vo) throws Exception {\n\t\tsqlSession.update(namespaceOrder+\".updateOrder\",vo);\r\n\t}", "@Override\n\tpublic void UpdateOrder(Order order) {\n\t\t\n\t}", "int updateByPrimaryKey(OrderDetail record);", "@Override\n\tpublic void updateByOrderId(RechargeOrder rechargeOrder) {\n\n\t}", "Order editOrder(String orderId, Order editedOrder) throws \n OrderBookOrderException;", "int updateByPrimaryKey(OrderDetails record);", "@Update({\n \"update order\",\n \"set orderid = #{orderid,jdbcType=VARCHAR},\",\n \"name = #{name,jdbcType=VARCHAR},\",\n \"price = #{price,jdbcType=BIGINT},\",\n \"userid = #{userid,jdbcType=VARCHAR}\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n int updateByPrimaryKey(Order record);", "int updateByPrimaryKey(OrderPO record);", "public void updateDB() {\n \n sql = \"UPDATE Order set \" + \"CustomerID='\"+getCustomerID()+\"',\" + \" Status='\"+getStatus()+\"'\" + \" WHERE OrderID= '\" + getOrderID()+\"'\";\n db.updateDB(sql);\n \n }", "@Override\r\n\tpublic void Update(Order order) {\n\t\tem.merge(order);\r\n\t\t\r\n\t}", "int updateByPrimaryKey(R_order record);", "public void updateOrders(Integer oid) {\n\t\tOrders orders=ordersMapper.selectByPrimaryKey(oid);\n\t\torders.setState(1);\n\t\tordersMapper.updateByPrimaryKeySelective(orders);\n\t}", "@Override\n\tpublic Order update(Order order) {\n\t\treturn null;\n\t}", "@Override\n\tpublic int update(OrderItem objectToUpdate) throws SQLException {\n\t\treturn 0;\n\t}", "@Override\n\tpublic boolean updateOrder(String orderID) {\n\t\treturn true;\n\t}", "public Order saveOrUpdate(Order order);", "int updateByPrimaryKey(EquipmentOrder record);", "int updateByPrimaryKey(ClOrderInfo record);", "@Override\r\n\tpublic void saveOrUpdateOrder(Order order) {\n\t\torderRepository.saveAndFlush(order);\r\n\t}", "public int updateOrderRequest(OrderEntity orderEntity);", "@RequestMapping(method = RequestMethod.PUT, consumes = \"application/json\")\r\n\tpublic ResponseEntity<StockResource> updateOrder(@RequestBody Order order) {\r\n\t\tif ( stockRepository.getCount() == 0 ) {\r\n\t\t\t// TODO Thread Safety\r\n\t\t\tinit();\r\n\t\t}\r\n\t\tboolean success = false;\r\n\t\tOptional<Stock> stockOptional = stockRepository.findById(order.getStockId());\r\n\t\tif (stockOptional.isPresent()) {\r\n\t\t\tStock stock = stockOptional.get();\r\n\t\t\tOptional<User> userOptional = userRepository.findById(order.getUserId());\r\n\t\t\tif ( userOptional.isPresent() ) {\r\n\t\t\t\tUser user = userOptional.get();\r\n\t\t\t\tSystem.out.println(\"User Balance \" + user.getBalance());\r\n\t\t\t\tif ( order.getBuy() == 0 ) {\r\n\t\t\t\t\tuser.setBalance( user.getBalance() - stock.getPrice() * order.getQty() );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tuser.setBalance( user.getBalance() + stock.getPrice() * order.getQty() );\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"User Balance New \" + user.getBalance());\r\n\t\t\t\tsuccess = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn new ResponseEntity<>( success ? HttpStatus.OK : HttpStatus.NOT_FOUND);\r\n\t}", "int updateByPrimaryKey(BusnessOrder record);", "int updateByPrimaryKey(OrderPreferential record) throws SQLException;", "@PutMapping(\"/update-order/{id}\")\n\tpublic ResponseEntity<Object> updateOrderById(@PathVariable Long id, @RequestBody Order orderRequest)\n\t\t\tthrows OrderNotFoundException {\n\t\tLOGGER.info(\"update-Order URL is opened\");\n\t\tLOGGER.info(\"updateOrder() is initiated\");\n\t\torderService.updateOrderById(id, orderRequest);\n\t\tLOGGER.info(\"updateOrder() has executed\");\n\t\treturn new ResponseEntity<>(\"Updated \", HttpStatus.OK);\n\t}", "public abstract void update(Order order, String action);", "@Test\n\tpublic void testUpdate() throws ApiException {\n\n\t\tOrderItemPojo new_order_item = getOrderItemPojo(products.get(0), 7);\n\t\torder_service.update(orderitems.get(0).getId(), new_order_item);\n\t\tassertEquals(orderitems.get(0).getProduct(), new_order_item.getProduct());\n\t\tassertEquals(orderitems.get(0).getQuantity(), new_order_item.getQuantity());\n\t\tassertEquals(orderitems.get(0).getSellingPrice(), new_order_item.getSellingPrice(), 0.001);\n\t}", "public Order updateOrder(Map<String, Object> event, Order order) {\n LOGGER.info(\"OrderServiceDAL::updateOrder\");\n try {\n Map<String, AttributeValue> item = DynamoDbHelper.toAttributeValueMap(order);\n PutItemResponse response = ddb.putItem(request -> request.tableName(tableName(event)).item(item));\n } catch (DynamoDbException e) {\n LOGGER.error(\"OrderServiceDAL::updateOrder \" + getFullStackTrace(e));\n throw new RuntimeException(e);\n }\n return order;\n }", "int updateByPrimaryKey(ExchangeOrder record);", "@Override\n\tpublic long update(OrderDetail t) {\n\t\tlong updateIfNotNull = orderDetailDao.updateIfNotNull(t);\n\t\treturn updateIfNotNull;\n\t}", "protected void updateOrder(JdbcTemplate dataConnection,OrderTransactionIfc orderTransaction)\n throws DataException\n {\n // get an sql object\n SQLUpdateStatement sql = new SQLUpdateStatement();\n\n // Table\n sql.setTable(ARTSDatabaseIfc.TABLE_ORDER);\n\n // add update columns\n addUpdateColumns(sql,\n orderTransaction);\n\n // add update qualifier\n addUpdateQualifiers(sql,\n \t\torderTransaction);\n\n try\n {\n dataConnection.execute(sql.getSQLString());\n }\n catch (DataException de)\n {\n logger.error( \"\" + de + \"\");\n throw de;\n }\n catch (Exception e)\n {\n logger.error( \"\" + Util.throwableToString(e) + \"\");\n throw new DataException(DataException.UNKNOWN, \"updateOrder\", e);\n }\n }", "@Override\n\tpublic ResultMessage update(PaymentOrderPO po) {\n\t\tString sql=\"update paymentlist set date=?,amount=?,payer=?,bankaccount=?,entry=?,note=? where ID=?\";\n\t\ttry {\n\t\t\tstmt=con.prepareStatement(sql);\n\t\t\tstmt.setString(1, po.getDate());\n\t\t\tstmt.setDouble(2, po.getAmount());\n\t\t\tstmt.setString(3, po.getPayer());\n\t\t\tstmt.setString(4, po.getBankAccount());\n\t\t\tstmt.setString(5, po.getEntry());\n\t\t\tstmt.setString(6, po.getNote());\n\t\t\tstmt.setString(7, po.getID());\n\t\t\tstmt.executeUpdate();\n\t\t\treturn ResultMessage.Success;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn ResultMessage.NotExist;\n\t\t}\n\t}", "@Override\r\n\tpublic int update(OrderDomain orderDomain) {\n\t\treturn getPersistanceManager().update(getNamespace() + \".update\", orderDomain);\r\n\t}", "int updateByPrimaryKey(NjOrderWork2 record);", "int updateByExample(OrderPreferential record, OrderPreferentialExample example)\r\n throws SQLException;", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "int updateByPrimaryKey(Orderall record);", "@Override\r\n\tpublic void updateOrderfac(String orderid, String factoryid, String c_id, String g_id) {\n\t\tshoporderDao.saveShopOrder(orderid,factoryid, c_id,g_id);\r\n\t}", "public OrderItem updateOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat care se incearca updatat nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.update(orderItem);\n\t\treturn orderIt;\n\t}", "@Override\n\tpublic void updateOrder(String ordernumber, String setCookie) {\n\t\t\n\t}", "void setOrder(Order order);", "public void updateDB(int orderID, String prodID, String quantity) {\r\n try {\r\n String sql = \"UPDATE EmpOrders SET EmpOrderID = '\" + orderID + \"', ProductID = '\"\r\n + prodID + \"', QuanitityNeeded = '\" + quantity + \"'\";\r\n Statement stmt = Customer.connectDB();\r\n stmt.execute(sql);\r\n } catch (SQLException e) {\r\n System.out.println(e);\r\n }\r\n }", "int updateByPrimaryKey(UcOrderGuestInfo record);", "public void pass(String order) throws SQLException\n\t{\n\t\tStatement stmt = con.createStatement();\n\t\ttry\n\t\t{\n\t\t\tstmt.executeUpdate(order);\n\t\t} finally\n\t\t{\n\t\t\tif (stmt != null)\n\t\t\t{\n\t\t\t\tstmt.close(); // aint giving the solution but good practice\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic boolean update(Order t) {\n\t\treturn false;\n\t}", "int updateByPrimaryKey(TSortOrder record);", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void saveOrder() {\n setVisibility();\n Order order = checkInputFromUser();\n if (order == null){return;}\n if(orderToLoad != null) DBSOperations.remove(connection,orderToLoad);\n DBSOperations.add(connection, order);\n }", "boolean updateOrderStatus(long orderId, Order.Status status) throws DaoProjectException;", "int updateByPrimaryKeySelective(OrderDetail record);", "int updateByPrimaryKey(TRefundOrder record);", "@Override\n public void updateRoomOrderById(int room_id) {\n logger.info(\"Start updateRoomOrderById\");\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.UPDATE_ROOM_ORDER_BY_ID);\n preparedStatement.setInt(1, room_id);\n preparedStatement.executeUpdate();\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n logger.info(\"Completed updateRoomOrderById\");\n }", "@Override\r\n\tpublic int updateOrderInfo(OrderInfo orderInfo) {\n\t\treturn orderInfoDao.updateOrderInfo(orderInfo);\r\n\t}", "@Override\n\tpublic Integer update(UserOrderDetail e) {\n\t\treturn null;\n\t}", "int updateByPrimaryKey(SmtOrderProductAttributes record);", "@Override\n\tpublic void update(OrderStatus t) throws Exception {\n\t\tsessionFactory.getCurrentSession().update(t);\n\t\t\n\t}", "@Override\r\n\tpublic void updateOrderDetail(OrderDetailVO vo) throws Exception {\n\t\tsqlSession.update(namespaceOrderDetail+\".updateOrderDetail\",vo);\r\n\t}", "int updateByPrimaryKeySelective(OrderDetails record);", "public void updateOrderGenerator(String orderNo) throws IOException {\n OkHttpClient client = new OkHttpClient().newBuilder()\n .build();\n MediaType mediaType = MediaType.parse(\"text/plain\");\n RequestBody body = RequestBody.create(mediaType, \"{\\r\\n \\\"status\\\": \\\"Completed\\\"\\r\\n}\");\n Request request = new Request.Builder()\n .url(\"http://localhost:8002/orders/\"+orderNo+\"/updateStatus\")\n .method(\"PUT\", body)\n .addHeader(\"Content-Type\", \"text/plain\")\n .build();\n Response response = client.newCall(request).execute();\n }", "public void setOrder(Order order) {\n this.order = order;\n notifyChanged();\n }", "public abstract void saveOrder(Order order);", "@Override\r\n\tpublic void updateOrder(String userId, String placeId, int order, String city) {\n\t\tif (conn == null) {\r\n\t\t\tSystem.err.println(\"DB connection failed\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tString sql = \"SELECT * FROM favorites WHERE user_id = ? AND place_id = ?\";\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, userId);\r\n\t\t\tps.setString(2, placeId);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\r\n\t\t\tif (rs.next()) { // if it is already in the table, update the order\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsql = \"UPDATE favorites f \"\r\n\t\t\t\t\t\t\t+ \"SET f.access_order = ? \"\r\n\t\t\t\t\t\t\t+ \"WHERE f.user_id = ? AND f.place_id = ?\";\r\n\t\t\t\t\tPreparedStatement stmt = conn.prepareStatement(sql);\r\n\t\t\t\t\tstmt.setInt(1, order);\r\n\t\t\t\t\tstmt.setString(2, userId);\r\n\t\t\t\t\tstmt.setString(3, placeId);\r\n\t\t\t\t\tstmt.setString(4, city);\r\n\t\t\t\t\tstmt.execute();\r\n\t\t\t\t\tstmt.close();\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} else { // it it is not in the table yet, insert the column with new order\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsql = \"INSERT IGNORE INTO favorites(user_id, place_id, access_order, city) VALUES (? ,? ,?, ?)\";\r\n\t\t\t\t\tPreparedStatement stmt = conn.prepareStatement(sql);\r\n\t\t\t\t\tstmt.setString(1, userId);\r\n\t\t\t\t\tstmt.setString(2, placeId);\r\n\t\t\t\t\tstmt.setInt(3, order);\r\n\t\t\t\t\tstmt.setString(4, city);\r\n\t\t\t\t\tstmt.execute();\r\n\t\t\t\t\tstmt.close();\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\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "UserOrder save(UserOrder order);", "@Override\r\n\tpublic void updatePurchaseOrder(PurchaseOrder por) {\n ht.update(por);\r\n\t}", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethod(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryNoClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "int updateByPrimaryKey(NjOrderAttachment record);", "@Override\n\tpublic Integer update(UserOrder e) {\n\t\treturn null;\n\t}", "private void updatePartOrder(Order order)\n {\n int index = getIndex() - 1;\n Integer amount = getAmount();\n\n try{\n orderController.updatePartOrder(order,index, amount);\n }catch(IndexOutOfBoundsException i){\n System.out.println(\"Vælg et tal fra produktlisten.\");\n }catch (Exception e) {\n System.out.println(\"Ikke nok varer på lager.\");\n }\n }", "@Override\n\tpublic void updateOrderStatus(String id) {\n\t\tQueryRunner qr= new QueryRunner(dataSource);\n\t\tString sql = \"update orders set status=3 where id=?\";\n\t\ttry {\n\t\t\tqr.update(sql, id);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new RuntimeException(\"更新订单状态失败\");\n\t\t}\n\t}", "int updateByPrimaryKey(cskaoyan_mall_order_goods record);", "public abstract CustomerOrder findOneForUpdate(Long id);", "@Override\r\n\tpublic int update(OrderDetailBean detail) {\n\t\treturn 0;\r\n\t}", "public boolean updateOrder(Order order, int newCarId) throws ApplicationEXContainer.ApplicationCanNotChangeException {\n boolean result;\n try(Connection connection = MySQLDAOFactory.getConnection();\n AutoRollback autoRollback = new AutoRollback(connection)){\n result = orderDao.updateOrder(connection,order,newCarId);\n autoRollback.commit();\n } catch (SQLException | NamingException | DBException throwables) {\n LOGGER.error(throwables.getMessage());\n throw new ApplicationEXContainer.ApplicationCanNotChangeException(throwables.getMessage(),throwables);\n }\n return result;\n }", "public void setOrder(Order order){\n this.order = order;\n }", "public void changeOrderStatus(Order order){\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();\n //Update order\n databaseReference.child(\"orders\").child(order.getKey()).setValue(order);\n //Update order of the user\n databaseReference.child(\"users\").child(order.getUserID()).child(\"orders\").child(order.getKey()).setValue(order);\n //If changing order status finished ok, we will finish this activity with success result code\n Intent returnIntent = new Intent();\n setResult(ORDER_STATUS_CHANGED,returnIntent);\n finish();\n }", "int updateByExample(@Param(\"record\") Order record, @Param(\"example\") OrderExample example);", "int updateByExample(@Param(\"record\") R_order record, @Param(\"example\") R_orderExample example);", "int updateByPrimaryKey(MedicalOrdersExecutePlan record);", "@Override\n\tpublic int update(Forge_Order_Detail t) {\n\t\treturn 0;\n\t}", "int update(Purchase purchase) throws SQLException, DAOException;", "@Override\r\n\tpublic void updateOrderState(HashMap<String,Object> map) throws Exception {\n\t\t\r\n\t\tsqlSession.update(namespaceOrder+\".updateState\",map);\r\n\t\t\r\n\t}", "int updateByPrimaryKeySelective(OrderPreferential record) throws SQLException;", "public void setOldOrderToPaid() {\n\n\t\tDate date = new Date();\n\n\t\tTimestamp ts = new Timestamp(date.getTime());\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\n\t\tString sql = \"UPDATE restodb.order, location set status = 'Paid', state = 'Vacant' where idorder > 0 and date < '\"\n\t\t\t\t+ formatter.format(ts).substring(0, 10) + \" 00:00:00\" + \"'\";\n\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement statement = mysqlConnect.connect().prepareStatement(sql);\n\n\t\t\tstatement.executeUpdate();\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\n\t}", "int updateByPrimaryKey(PaymentTrade record);", "public int updateOne(SecurityOrder securityOrder) {\n String updateSql = \"UPDATE security_order SET account_id=?, status=?, ticker=?, size=?, \"\n + \"price=?, notes=? WHERE id=?\";\n return jdbcTemplate.update(updateSql, makeUpdateValues(securityOrder));\n }", "public OrderUpdateService(Order order, Order data)\n\t{\n\t\tthis.setOrder(order);\n\t\tthis.setData(data);\n\t}", "int updateByPrimaryKeySelective(R_order record);", "Order replaceOrder(String orderNumber, Order order)\n throws FlooringMasteryPersistenceException;", "int updateByPrimaryKey(CartDO record);", "int updateByPrimaryKeySelective(EquipmentOrder record);", "public void saveOrder(CustomerOrder order) {\n\t\torderDao.saveOrder(order);\n\t}", "int updateByPrimaryKey(PurchasePayment record);", "@Override\n\tpublic boolean doUpdate(Orders vo) throws Exception\n\t{\n\t\treturn false; \n\t}", "@Override\r\n\tpublic void PassOrder(Order order) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tem.persist(order);\r\n\t\t\r\n\t}" ]
[ "0.808927", "0.78133863", "0.77477", "0.7666203", "0.7655034", "0.7483377", "0.7370987", "0.7359643", "0.7234305", "0.7221844", "0.71188027", "0.71153677", "0.70807284", "0.7058469", "0.70296186", "0.70214176", "0.69822586", "0.691523", "0.6856237", "0.6819372", "0.673958", "0.67384535", "0.6724708", "0.6722386", "0.6708879", "0.6695285", "0.66660726", "0.66238976", "0.66224545", "0.66119236", "0.66002804", "0.6589489", "0.65362257", "0.64865214", "0.6479461", "0.6457294", "0.6413569", "0.6412792", "0.63619435", "0.63549656", "0.63424796", "0.63380086", "0.6335344", "0.63143754", "0.6312425", "0.63013315", "0.6297048", "0.6288232", "0.6286667", "0.6277242", "0.6273589", "0.62715346", "0.6265096", "0.6242809", "0.622628", "0.62198377", "0.6218671", "0.6208497", "0.6197745", "0.6194785", "0.61755204", "0.61709243", "0.61706686", "0.617001", "0.61580026", "0.61576337", "0.6153028", "0.61370236", "0.61253655", "0.6104666", "0.60971487", "0.6095874", "0.6089498", "0.60849357", "0.6054391", "0.60402864", "0.60131776", "0.60054", "0.6003479", "0.6000295", "0.59943044", "0.5990878", "0.59907436", "0.5979165", "0.5968026", "0.59588933", "0.5956205", "0.59532505", "0.5926462", "0.59231234", "0.59044707", "0.58953327", "0.5891183", "0.5883791", "0.5880634", "0.5871639", "0.5863924", "0.58479184", "0.58413994", "0.58354896", "0.58288985" ]
0.0
-1
Upon successful authentication, generate a token. The 'auth' passed to successfulAuthentication() is the current authenticated user.
@Override protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) throws IOException, ServletException { String authString = String.format("{\"auth\": \"%s\"", false); String tokenString = String.format(",\"jwt_token\": \"%s\"", null); String reason = String.format(",\"reason\": \"%s\"}", "Username or Password incorrect"); response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); // response.setStatus(HttpServletResponse.SC_OK); response.getWriter().write(authString + tokenString + reason); // Add token to header // response.addHeader(jwtConfig.getHeader(), jwtConfig.getPrefix() + token); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void successfulAuthentication(HttpServletRequest req,\n\t\t\tHttpServletResponse res, FilterChain chain, Authentication auth)\n\t\t\tthrows IOException, ServletException {\n\t\tString userName = ((User) auth.getPrincipal()).getUsername();\n\n\t\tString token = Jwts\n\t\t\t\t.builder()\n\t\t\t\t.setSubject(userName)\n\t\t\t\t.setExpiration(\n\t\t\t\t\t\tnew Date(System.currentTimeMillis()\n\t\t\t\t\t\t\t\t+ SecurityConstants.EXPIRATION_TIME))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512,\n\t\t\t\t\t\tSecurityConstants.getTokenSecret()).compact();\n\n\t\tUserService userService = (UserService) SpringApplicationContext\n\t\t\t\t.getBean(\"userServiceImpl\");\n\t\tUserDto userDto = userService.getUser(userName);\n\n\t\tres.addHeader(SecurityConstants.HEADER_STRING,\n\t\t\t\tSecurityConstants.TOKEN_PREFIX + token);\n\t\tres.addHeader(\"userID\", userDto.getUserId());\n\t}", "@Override\n\tprotected void successfulAuthentication(HttpServletRequest request,\n\t\t\tHttpServletResponse response, FilterChain chain,\n\t\t\tAuthentication auth) throws IOException, ServletException {\n\t\t\n\t\tString userName=((User)auth.getPrincipal()).getUsername();\n\t\tUserService userService =(UserService)SpringApplicationContext.getBean(\"userServiceImpl\");\n \n\t UserDto userDto = userService.getUser(userName);\n\t\tString token=Jwts.builder()\n\t\t\t\t.setSubject(userName)\n\t\t\t\t.claim(\"id\", userDto.getUserId())\n\t .claim(\"name\", userDto.getFirstName() + \" \" + userDto.getLastName())\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis()+SecurityConstants.EXPIRATION_TIME))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512,SecurityConstants.TOKEN_SECRET)\n\t\t\t\t.compact();\n\t\tresponse.addHeader(SecurityConstants.HEADER_STRING, SecurityConstants.TOKEN_PREFIX+token);\n\t\tresponse.addHeader(\"user_id\",userService.getUser(userName).getUserId());\n response.getWriter().write(\"{\\\"token\\\": \\\"\" + token + \"\\\", \\\"id\\\": \\\"\"+ userDto.getUserId() + \"\\\"}\");\n System.out.println(response.getHeader(SecurityConstants.HEADER_STRING));\n\n\t}", "static public void addToken(HttpServletResponse res, Authentication auth) {\n\t\tUser currentUser = (User)auth.getPrincipal();\n\t\tString currentUserId = currentUser.getId().toString();\n\t\t\n\t\tString JwtToken = Jwts.builder().setSubject(currentUserId)\n\t\t\t\t.setExpiration(new Date(System.currentTimeMillis()\n\t\t\t\t\t\t+ EXPIRATIONTIME))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, SIGNINGKEY)\n\t\t\t\t.compact();\n\t\t\n\t\tres.addHeader(\"Authorization\", PREFIX + \" \" + JwtToken);\n\t\tres.addHeader(\"Access-Control-Expose-Headers\", \"Authorization\");\n\t}", "@POST\n @Consumes(org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE)\n @Produces(org.springframework.http.MediaType.APPLICATION_JSON_UTF8_VALUE)\n @Path(\"/token\")\n @ApiOperation(value = \"Gets the authorization\")\n public Response getToken(@RequestBody AuthorizationEntity auth) {\n // same AccessResource for token to generate\n if (httpServletRequest.isSecure()) {\n final NiFiUser user = NiFiUserUtils.getNiFiUser();\n if (user == null) {\n throw new AccessDeniedException(\"No user authenticated in the request.\");\n }\n if (user.getIdentity().equals(auth.getUsername()) || user.getIdentity().equals(auth.getIdentity())) {\n\n LoginAuthenticationToken loginToken = new LoginAuthenticationToken(auth.getUsername(), auth.getUsername(), auth.getExpiration(), auth.getIssuer());\n String jwtToken = jwtService.generateSignedToken(loginToken);\n\n // build the response\n final URI uri = URI.create(generateResourceUri(\"auth\", \"token\"));\n return generateCreatedResponse(uri, jwtToken).build();\n }\n\n }\n return generateNotAuthorizedResponse().build();\n\n }", "@Bean\n public SuccessAuthProcessor successAuthProcessor() {\n return (auth, userDetails) -> {\n Set<GrantedAuthority> authorities = new HashSet<>(userDetails.getAuthorities());\n authorities.add(Authorities.USER);\n\n // we add GA for username, because we do not implement ACL tuning for this,\n // and anyway check ngroup and node access\n authorities.add(Authorities.fromName(SecuredType.LOCAL_IMAGE.admin()));\n authorities.add(Authorities.fromName(SecuredType.REMOTE_IMAGE.admin()));\n authorities.add(Authorities.fromName(SecuredType.NETWORK.admin()));\n\n final UsernamePasswordAuthenticationToken result =\n new UsernamePasswordAuthenticationToken(\n userDetails, // principal\n userDetails.getPassword(), // credentials\n authorities); // GA\n result.setDetails(auth.getDetails());\n return result;\n };\n }", "@Override\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain,\n Authentication authResult) throws IOException, ServletException {\n ApiUser apiUser = this.apiUsersService.getApiUserByUserName(((User) authResult.getPrincipal()).getUsername());\n String jwtToken = Jwts.builder()\n .setSubject(((User) authResult.getPrincipal()).getUsername())\n .setExpiration(new Date(System.currentTimeMillis() + EXPIRATION_TIME))\n .claim(\"authorities\", ((User) authResult.getPrincipal()).getAuthorities().toArray())\n .claim(\"firstName\", apiUser.getFirstName())\n .claim(\"lastName\", apiUser.getLastName())\n .claim(\"apiUserId\", apiUser.getId())\n .signWith(SignatureAlgorithm.HS512, SECRET.getBytes(StandardCharsets.UTF_8))\n .compact();\n try {\n response.getWriter().write(TOKEN_PREFIX + jwtToken);\n this.eventsService.createEvent(new Event(\"Logged In\", apiUser,\n new Date(System.currentTimeMillis()).getTime(), false));\n } catch (Exception e) {\n authLogger.warn(e.getMessage());\n throw (e);\n }\n response.setStatus(HttpServletResponse.SC_ACCEPTED);\n }", "@Override\n\tpublic void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication)\n\t\t\tthrows IOException, ServletException {\n\t\tParsedUser user = new ParsedUser();\n\t\tUserDetails userDetails = ((UserDetails)authentication.getPrincipal());\n\t\tString username = userDetails.getUsername();\n\t\tLong id = publisherService.readPublisher(username).getId();\n\t\tStringBuilder authorities = new StringBuilder();\n\t\tStringBuilder header = new StringBuilder();\n\t\tString token = null;\n\t\t\n\t\t\n\t\tfor(GrantedAuthority authority : authentication.getAuthorities()) {\n\t\t\tauthorities.append(authority);\n\t\t\tauthorities.append(\",\");\n\t\t}\n\t\t// remove last comma\n\t\tauthorities.deleteCharAt(authorities.length() - 1);\n\t\t\n\t\tSystem.out.println(\"ABOUT TO GENERATE JWT...\");\n\t\tSystem.out.println(authorities.toString());\n\t\t\n\t\tuser.setUsername(username);\n\t\tuser.setId(id);\n\t\tuser.setAuthorities(authorities.toString());\n\t\t\n\t\ttoken = jwtUtil.generateToken(user);\n\t\t\n\t\tSystem.out.println(token);\n\t\t\n\t\t// also set cookie\n\t\tCookie toBeSet = new Cookie(\"access_token\", token);\n\t\ttoBeSet.setMaxAge(200);\n\t\tresponse.addCookie(toBeSet);\n\t\t\n\t\theader.append(\"Bearer<\");\n\t\theader.append(token);\n\t\theader.append(\">\");\n\t\t\n\t\tSystem.out.println(header.toString());\n\n\t\t\n\t\t\n\t\tresponse.addHeader(\"Authentication\", header.toString());\n\t\n\t\t\n\n\t}", "void onAuthenticationSucceeded(String token);", "@Override\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authentication)\n throws IOException, ServletException {\n String name = authentication.getName();\n tokenAuthenticationService.addAuthentication(response, name);\n }", "public String generateToken() {\n Authentication authentication = getAuthentication();\n if(authentication == null) {\n throw new AuthenticationCredentialsNotFoundException(\"No user is currently logged in.\");\n }\n return jwtUtil.generateJwtToken(authentication);\n }", "@Transactional\n public UserToken generateToken() {\n if (!firebaseService.canProceed())\n return null;\n\n try {\n Optional<UserAuth> userOptional = Auditor.getLoggedInUser();\n if (!userOptional.isPresent()) return UNAUTHENTICATED;\n UserAuth user = userOptional.get();\n Map<String, Object> claims = new HashMap<>();\n claims.put(\"type\", user.getType().toString());\n claims.put(\"department\", user.getDepartment().getName());\n claims.put(\"dean_admin\", PermissionManager.hasPermission(user.getAuthorities(), Role.DEAN_ADMIN));\n String token = FirebaseAuth.getInstance().createCustomTokenAsync(user.getUsername(), claims).get();\n return fromUser(user, token);\n } catch (InterruptedException | ExecutionException e) {\n return UNAUTHENTICATED;\n }\n }", "@Override\n\tpublic Authentication authenticate(Authentication auth) throws AuthenticationException {\n\t\t username = auth.getName();\n\t\tString pass = auth.getCredentials().toString();\n\t\t\n\t\tif(AppController.users.containsKey(username))\n\t\t{\n\t\tString password = AppController.users.get(username); \n\t\t\t\n\t\tif(password.equals(pass))\n\t\t\treturn new UsernamePasswordAuthenticationToken(username,pass,Collections.EMPTY_LIST);\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t\t\n\t\t}\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t}", "public String generateToken(Authentication authentication) {\n\n ApplicationUser applicationUser = (ApplicationUser) authentication.getPrincipal();\n Date expiryDate = java.sql.Date.valueOf(LocalDate.now().plusDays(jwtConfig.getTokenExpirationAfterDays()));\n\n //jwt subject will contain [username, authorities]\n return Jwts.builder()\n .setSubject(applicationUser.getUser().getUsername())\n .claim(\"authorities\", applicationUser.getAuthorities())\n .setIssuedAt(new Date())\n .setExpiration(expiryDate)\n .signWith(jwtSecretKey.secretKey())\n .compact();\n }", "@Override\n protected void successfulAuthentication(\n HttpServletRequest request,\n HttpServletResponse response,\n FilterChain chain,\n Authentication authResult) throws IOException, ServletException {\n\n response.setContentType(MediaType.APPLICATION_JSON_UTF8_VALUE);\n response.getWriter().write(new ObjectMapper().writeValueAsString(InfoDto.<Tokens>builder().data(TokenManager.generateTokens(authResult)).build()));\n response.getWriter().flush();\n response.getWriter().close();\n\n }", "public String generateToken(Authentication authentication) {\n\t\tUser user=(User) authentication.getPrincipal();\t//Get user being authenticated (configured in security config)\n\t\tString userId= Long.toString(user.getId());\n\t\tDate now= new Date(System.currentTimeMillis());\n\t\tDate expiryTime= new Date(now.getTime()+SecurityConstants.TOKEN_EXPIRY);\n\t\t\n\t\tMap<String, Object> claims= new HashMap<>();\n\t\tclaims.put(\"id\", userId);\n\t\tclaims.put(\"username\", user.getUsername());\n\t\tclaims.put(\"fullname\", user.getFullName());\n\t\t//Role (IF IMPLEMENTED)\n\t\t\n\t\treturn Jwts.builder()\n\t\t\t\t.setSubject(userId)\n\t\t\t\t.setClaims(claims)\n\t\t\t\t.setIssuedAt(now)\n\t\t\t\t.setExpiration(expiryTime)\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, SecurityConstants.SECRET)\n\t\t\t\t.compact();\n\t}", "@PostMapping\r\n\tpublic ResponseEntity<TokenDto> gerarTokenJwt(\r\n\t\t\t@Valid @RequestBody JwtAuthenticationDto authenticationDto, BindingResult result)\r\n\t\t\tthrows AuthenticationException {\r\n\r\n\t\tif (result.hasErrors()) {\r\n\t\t\treturn ResponseEntity.badRequest().body(null);\r\n\t\t}\r\n\r\n\t\tAuthentication authentication = authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(\r\n\t\t\t\tauthenticationDto.getEmail(), authenticationDto.getSenha()));\r\n\t\tSecurityContextHolder.getContext().setAuthentication(authentication);\r\n\r\n\t\tUserDetails userDetails = userDetailsService.loadUserByUsername(authenticationDto.getEmail());\r\n\t\tString token = jwtTokenUtil.obterToken(userDetails);\r\n\r\n\t\treturn ResponseEntity.ok(new TokenDto(token));\r\n\t}", "private String generateToken(LoginViewModel viewModel){\n \n String authenticationToken;\n \n try{\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(viewModel.getUsername(), viewModel.getPassword()));\n \n SecurityContextHolder.getContext().setAuthentication(authentication);\n UserPrincipal principal = (UserPrincipal) authentication.getPrincipal();\n \n System.out.println(generateExpirationDate());\n authenticationToken = JWT\n .create()\n .withClaim(\"role\",\"ROLE_\" + principal.getRole())\n .withSubject(principal.getUsername())\n .withExpiresAt(generateExpirationDate())\n .sign(HMAC512(CommonSecurityConfig.SECRET.getBytes()));\n }catch (Exception e){\n System.out.println(e.getMessage());\n return null;\n }\n \n return authenticationToken;\n }", "public String generateToken(Authentication authentication) {\n\t\tUserPrincipal userPrincipal = (UserPrincipal) authentication.getPrincipal();\n\t\treturn Jwts.builder().setSubject(userPrincipal.getUsername())\n\t\t\t\t.setIssuedAt(new Date())\n\t\t\t\t.setExpiration(new Date(new Date().getTime() + expiration * 1000))\n\t\t\t\t.signWith(SignatureAlgorithm.HS512, secret)\n\t\t\t\t.compact();\n\t}", "@Override\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response,\n FilterChain chain, Authentication authentication) throws IOException, ServletException {\n String token = tokenAuthenticationService.addAuthentication(response, authentication);\n\n User user = new User();\n user.setEmail(authentication.getName());\n user.setRoles((List<GrantedAuthority>) authentication.getAuthorities());\n response.setContentType(MediaType.APPLICATION_JSON_VALUE);\n ObjectMapper mapper = new ObjectMapper();\n mapper.writeValue(response.getWriter(),user);\n\n\n // Add the authentication to the Security context\n SecurityContextHolder.getContext().setAuthentication(authentication);\n }", "@Override\n protected void successfulAuthentication(HttpServletRequest req,\n HttpServletResponse res,\n FilterChain chain,\n Authentication auth) throws IOException {\n\n log.info(\"Authentication succeed!\");\n UserDetailsImpl user = (UserDetailsImpl) auth.getPrincipal();\n Collection authorities = user.getAuthorities();\n String token = authService.generateOrGetToken(user);\n ReimsUser.Role role = authService.getRoleByString(authorities.iterator().next().toString());\n\n // retrieve informative response for frontend needs\n res.setHeader(HEADER_STRING, token);\n UserResponse userResponse = new UserResponse();\n userResponse.setUsername(user.getUsername());\n userResponse.setId(user.getUserId());\n userResponse.setRole(role);\n\n // Creating Object of ObjectMapper define in Jackson Api\n ObjectMapper objectMapper = new ObjectMapper();\n\n String userJsonString = objectMapper.writeValueAsString(userResponse);\n\n PrintWriter out = res.getWriter();\n res.setContentType(\"application/json\");\n res.setCharacterEncoding(\"UTF-8\");\n out.print(userJsonString);\n out.flush();\n\n Session session = Session.builder().token(token).username(user.getUsername()).role(role).build();\n authService.registerOrUpdateSession(session);\n }", "public String generateToken(UserDetails userDetails) {\n\t\tMap<String, Object> claims = new HashMap<>();\n\t\treturn createToken(claims, userDetails.getUsername());\n\t}", "public Token createAuthorizationToken(User user);", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "@CrossOrigin(origins=\"*\")\n\t@RequestMapping(value=\"/login\", method=RequestMethod.POST)\n\tpublic ResponseSender loginMethod(Authentication authResult)\n\t{\n\t\t\n\t\tClientDetailsImpl clientDetailsImpl=((ClientDetailsImpl)authResult.getPrincipal());\n\t\t\n\t\tClient clientReg=clientDetailsImpl.getClient();\n\t\t\n\t\tResponseSender responseSender=new ResponseSender();\t\n\t\t\n\t\tClient client=clientService.getClientById(clientReg.getClientId());\n\t\tString firstName=clientReg.getFirstName();\n\t\t\t\n\t\tSystem.out.println(\"Inside LoginController loginMethod() firstName is :-\"+firstName );\n\t\t\n\t\t//user found in the db, make token for it\n\t\t\n\t\t//Loginid is email in client table\n\t\tjwtClient.setClientId(clientReg.getClientId());\n\t\tjwtClient.setEmail(clientReg.getEmail());\n\t\t//ProfileType id role in client table\n\t\t\n\t\t\n\t\tString token=jwtGenerator.generate();\n\t\t\n\t\tSystem.out.println(\"Inside LoginController loginMethod() token is :- \"+token);\n\t\t//adding token in the response \n\t\t\n\t\tresponseSender.setMessage(\"You are login Successfully\");\n\t\tresponseSender.setFlag(true);\n\t\tresponseSender.setFirstName(firstName);\n\t\t\n\t\t//Setting token to the JwtAuthenticationToken to ensure that when user will come again in future\n\t\t//he/she must be logged in\n\t\t\n\t\tjwtAuthenticationToken.setToken(token);\n\t\t\n\t\t\n\t\treturn responseSender;\n\t}", "protected void onSuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, Authentication authResult) throws IOException {\n }", "@Override\r\n public Authentication authenticate(final Authentication authentication) {\r\n final String credentials = (String) authentication.getCredentials();\r\n if (credentials == null || credentials.isEmpty()) {\r\n final GrantedAuthority grantedAuthority = new GrantedAuthorityImpl(\"\");\r\n final GrantedAuthority[] grantedAuthorities = { grantedAuthority };\r\n return new AnonymousAuthenticationToken(\"key\", \"Anonymous\", grantedAuthorities);\r\n }\r\n final UserDetails userDetails = escidocUserDetailsService.loadUserByUsername(credentials);\r\n return new UsernamePasswordAuthenticationToken(userDetails, credentials);\r\n }", "@Override\n public void onSuccess(IAuthenticationResult authenticationResult) {\n Log.d(TAG, \"Successfully authenticated\");\n Log.d(TAG, \"ID Token: \" + authenticationResult.getAccount().getClaims().get(\"id_token\"));\n\n /* Update account */\n mAccount = authenticationResult.getAccount();\n updateUI();\n\n /* call graph */\n callGraphAPI(authenticationResult);\n }", "protected synchronized String authenticated() throws JSONException {\n JSONObject principal = new JSONObject()\n .put(FIELD_USERNAME, USER)\n .put(FIELD_PASSWORD, PASSWORD);\n if (token == null){ //Avoid authentication in each call\n token =\n given()\n .basePath(\"/\")\n .contentType(ContentType.JSON)\n .body(principal.toString())\n .when()\n .post(LOGIN)\n .then()\n .statusCode(200)\n .extract()\n .header(HEADER_AUTHORIZATION);\n\n }\n return token;\n }", "String createToken(User user);", "public String generateWebToken(Authentication authentication) {\n\t\tvar userdetailsUser = (org.springframework.security.core.userdetails.User) authentication.getPrincipal();\n\n\t\treturn Jwts.builder()\n .setSubject(userdetailsUser.getUsername())\n .setIssuedAt(new Date())\n .setExpiration(new Date((new Date()).getTime() + jwtExpirationMs))\n .signWith(SignatureAlgorithm.HS512, jwtSecret)\n .compact();\n\t}", "UserWithPersistedAuth getUserWithToken();", "@Override\n public void onSuccess(AuthenticationResult authenticationResult) {\n updateRefreshTokenUI(true);\n\n /* If the token is refreshed we should refresh our data */\n callAPI();\n }", "@Override\r\n\t\t\tpublic void onAuthResult(String paramToken) {\n\t\t\t\tshowToast(\"onAuthResult==\"+paramToken);\r\n\t\t\t}", "public OAuthTokenResponse getToken() {\n return token;\n }", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n return token_;\n }", "@Override\r\n\tpublic void onAuthenticationSuccess(HttpServletRequest req, HttpServletResponse res,\r\n\t\t\tAuthentication auth) throws IOException, ServletException {\n\t\tlogger.info(\"Login Success !\");\r\n\t\tlogger.info(\"Login ID [ {} ].\",auth.getName());\r\n\t\t\r\n\t\tfor(GrantedAuthority a : auth.getAuthorities()) {\r\n\t\t\tlogger.info(\"authority = [ {} ].\",a.getAuthority());\r\n\t\t}\r\n\t\t\r\n\t\tlogger.info(auth.getDetails().toString());\r\n\t\tlogger.info(auth.getPrincipal().toString());\r\n\t\t\r\n\t\tUserDetails u = (UserDetails)auth.getPrincipal();\r\n\t\t\r\n\t\tlogger.info(String.valueOf(u.isAccountNonExpired()));\r\n\t\t\r\n\t\tlogger.info(\"sending URL..\");\r\n\t\t\r\n\t\tclearAuthenticationAttributes(req);\r\n\t\t\r\n\t\tint intRedirectStrategy = decideRedirectStrategy(req, res);\r\n\t\t\r\n\t\tswitch(intRedirectStrategy) {\r\n\t\t\r\n\t\tcase 1:\r\n\t\t\tuseTargetUrl(req, res);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 2:\r\n\t\t\tuseSessionUrl(req, res);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tcase 3:\r\n\t\t\tuseRefererUrl(req, res);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tdefault:\r\n\t\t\tuseDefaultUrl(req, res);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public void onSuccess(Token token) {\n\n }", "@Override\r\n public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\r\n\t throws AuthenticationException, IOException, ServletException {\r\n\t\r\n\t// ~~~ Token aus dem Header extrahieren\r\n\tString token;\r\n\ttry {\r\n\t token = request.getHeader(WebSecurityConfig.JWT_TOKEN_HEADER);\r\n\t token = token.substring(WebSecurityConfig.JWT_TOKEN_PREFIX.length());\r\n\t} catch (Exception e) {\r\n\t throw new FailedJWTAuthenticationException();\r\n\t}\r\n\t\r\n\t// ~~~ Token als Authentication verpackt weiterleiten\r\n\treturn getAuthenticationManager().authenticate(new JWTAuthenticationToken(JWT.decode(token)));\r\n }", "private String newToken(String token) {\n UserDetails userDetails = new UserDetails();\r\n userDetails.setEmail(jwtUtils.extractEmail(token));\r\n userDetails.setUserType((String) jwtUtils.extractAllClaims(token).get(\"userType\"));\r\n return jwtUtils.generateToken(userDetails);\r\n }", "private static Tuple<Integer, String> getToken() {\n\t\tTuple<Integer, String> result = new Tuple<Integer, String>();\n\t\tresult = GETRequest(AUTH_URL, AUTH_HEADER, \"\", \"\");\n\t\treturn result;\n\t}", "void onGetTokenSuccess(AccessTokenData token);", "protected void onLoginSuccess(HttpServletRequest request, HttpServletResponse response, Authentication successfulAuthentication) {\n String username = successfulAuthentication.getName();\n\n logger.debug(\"Creating new persistent login for user \" + username);\n //SHANE\n username = combineUserNameOrgId(request, username);\n\n PersistentRememberMeToken persistentToken = new PersistentRememberMeToken(username, generateSeriesData(),\n generateTokenData(), new Date());\n try {\n tokenRepository.createNewToken(persistentToken);\n addCookie(persistentToken, request, response);\n } catch (DataAccessException e) {\n logger.error(\"Failed to save persistent token \", e);\n }\n }", "AuthenticationResult postTokenRequest() throws MsalUiRequiredException, MsalServiceException, MsalClientException {\n checkUserMismatch();\n\n final TokenCache tokenCache = mAuthRequestParameters.getTokenCache();\n final Authority authority = mAuthRequestParameters.getAuthority();\n authority.updateTenantLessAuthority(new IdToken(mTokenResponse.getRawIdToken()).getTenantId());\n final AccessTokenCacheItem accessTokenCacheItem = tokenCache.saveAccessToken(authority.getAuthority(),\n mAuthRequestParameters.getClientId(), mTokenResponse, mRequestContext);\n tokenCache.saveRefreshToken(authority.getAuthorityHost(), mAuthRequestParameters.getClientId(),\n mTokenResponse, mRequestContext);\n\n return new AuthenticationResult(accessTokenCacheItem);\n }", "private UsernamePasswordAuthenticationToken getAuthentication(String token) {\n\t\tif (token != null) {\n\t\t\tUserDetails user = new UserDetails(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic Collection<? extends GrantedAuthority> getAuthorities() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic String getPassword() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic String getUsername() {\n\t\t\t\t\t// token is used as username for this example\n\t\t\t\t\treturn token;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic boolean isAccountNonExpired() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic boolean isAccountNonLocked() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic boolean isCredentialsNonExpired() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic boolean isEnabled() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t};\n\t\t\treturn new UsernamePasswordAuthenticationToken(user, null, user.getAuthorities());\n\t\t}\n\t\treturn null;\n\t}", "OAuth2Token getToken();", "public TokenInfo createToken(TokenCoreInfo coreInfo, String password);", "public void handleAuthenticationRequest(RoutingContext context) {\n\n final HttpServerRequest request = context.request();\n\n final String basicAuthentication = request.getHeader(AUTHORIZATION_HEADER);\n\n try {\n\n final String[] auth =\n BasicAuthEncoder.decodeBasicAuthentication(basicAuthentication).split(\":\");\n\n if (auth.length < 2) {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, HTML_CONTENT_TYPE)\n .end(Json.encode(Errors.CREDENTIAL_ERROR.error()));\n\n } else {\n\n final Credential credential = new Credential(auth[0], auth[1]);\n\n authenticationService.authenticate(credential, user -> {\n\n if (null != user) {\n\n tokenService.generateToken(user, token -> {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, HTML_CONTENT_TYPE).end(token);\n\n }, err -> {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(Errors.INTERNAL_ERROR.error()));\n\n });\n\n } else {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(Errors.CREDENTIAL_ERROR.error()));\n\n }\n\n }, err -> {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(err.toError()));\n\n });\n\n\n }\n\n } catch (final Exception e) {\n\n context.response().putHeader(CONTENT_TYPE_HEADER, JSON_CONTENT_TYPE)\n .end(Json.encode(Errors.INVALID_AUTHENTICATION_TOKEN.error()));\n\n\n }\n\n\n\n }", "public AuthenticationResponse authoriseAndGenerateToken(AuthenticationRequest authenticationRequest) throws AuthenticationException {\n User user= userRepo.findByUsername(authenticationRequest.getUserName());\n if(user == null){\n LOGGER.error(\"Username : {} not found\", authenticationRequest.getUserName());\n throw new UsernameNotFoundException(\"Username : \" + authenticationRequest.getUserName() + \" not found\");\n }\n\n if(!HashingUtils.compare(authenticationRequest.getPassword(), user.getPassword())){\n LOGGER.error(\"Wrong credentials.\");\n throw new BadCredentialException(\"Incorrect credentials provided\");\n }\n\n AuthenticationResponse response = new AuthenticationResponse();\n response.setUser(user);\n String token = tokenHelper.generateToken(user.getUsername(), user.getTenant());\n LOGGER.debug(\"Token generated.\");\n response.setToken(token);\n return response;\n }", "@PostMapping(\"/login\")\n public AuthResponse login(@RequestBody AuthRequest authRequest) {\n try {\n authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(authRequest.getUsername(), authRequest.getPassword()));\n } catch (BadCredentialsException badCredentialsException) {\n throw new RuntimeException(\"Invalid username or password\");\n }\n\n final UserDetails userDetails = customUserDetailsService.loadUserByUsername(authRequest.getUsername());\n final String token = jwtTokenUtil.generateToken(userDetails);\n\n return new AuthResponse(token);\n }", "@Override\n\tpublic void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response,\n\t\t\tAuthentication authentication) throws IOException, ServletException {\n\t\t\n\t\tresponse.setContentType(\"application/json;charset=utf-8\");\n PrintWriter out = response.getWriter();\n ObjectMapper objectMapper = new ObjectMapper();\n\t\tresponse.setHeader(\"Access-Control-Allow-Origin\", \"http://localhost:82\");\n\t\t\n\t\tresponse.setHeader(\"Access-Control-Allow-Credentials\", \"true\");\n\n\t\tresponse.setHeader(\"Access-Control-Allow-Methods\", \"POST, GET\");\n\n\t\t\n\t\t\n\t\t\n\t\tresponse.setHeader(\"Access-Control-Max-Age\", \"3600\");\n\n\t\tresponse.setHeader(\"Access-Control-Allow-Headers\", \"x-requested-with\");\n\n\t\tout.write(JSON.toJSONString(new ResultMap().success().message(\"\")\n\t\t\t\t.data(new Data().addObj(tokenHeader, userservice.generateToken(new TokenDetailImpl(UserUtils.getCurrentUser().getUsername())))\n\t\t\t\t\t\t )));\n out.flush();\n out.close();\n\t}", "@PreAuthorize(\"permitAll()\")\n @RequestMapping(\n value = \"/users/auth\",\n method = RequestMethod.POST\n )\n public ResponseEntity<AuthResponse> authenticate(@RequestParam(value = \"username\") String username, @RequestParam(value = \"password\") String password) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(username, password)\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n final UserDetails userDetails = userDetailsService.loadUserByUsername(username);\n final String token = tokenUtils.generateToken(userDetails);\n\n return ResponseEntity.ok(new AuthResponse(token));\n }", "public Pokemon.RequestEnvelop.AuthInfo.JWT getToken() {\n if (tokenBuilder_ == null) {\n return token_;\n } else {\n return tokenBuilder_.getMessage();\n }\n }", "@ApiModelProperty(value = \"String that represents the authentication token. (For security reasons, this value is null except for a successful token creation response.)\")\n public String getToken() {\n return token;\n }", "private AbstractAuthenticationToken authUserByToken(String token) {\n\t\tif (StringUtils.isBlank(token)) {\n\t\t\tlogger.debug(\"[unauthorized] access token is empty\");\n\t\t\treturn null;\n\t\t}\n\t\tAbstractAuthenticationToken authToken = new AuthenticationToken(token);\n\t\ttry {\n\t\t\treturn authToken;\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Authenticate user by token error: \", e);\n\t\t}\n\t\treturn authToken;\n\t}", "public AuthorizationToken retrieveToken(String token);", "public String getToken();", "@Override\r\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) \r\n\t throws IOException, ServletException {\r\n SecurityContext context = SecurityContextHolder.createEmptyContext();\r\n context.setAuthentication(authResult);\r\n SecurityContextHolder.setContext(context);\r\n chain.doFilter(request, response);\r\n }", "public java.lang.String getOauth_token(){\r\n return localOauth_token;\r\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"Authentication token (see `/auth` and `/configure`)\")\n\n public String getToken() {\n return token;\n }", "private String createAuthToken(User user) {\n // create new Auth Token\n String authToken = userAuthenticationService.generateToken();\n\n // store the token\n userAuthenticationService.storeAuthToken(user, authToken);\n return authToken;\n }", "@Override\n public String refresh() {\n\n // Override the existing token\n setToken(null);\n\n // Get the identityId and token by making a call to your backend\n // (Call to your backend)\n\n // Call the update method with updated identityId and token to make sure\n // these are ready to be used from Credentials Provider.\n\n update(identityId, token);\n return token;\n\n }", "public String generateToken(User userDetails) {\n\t\tMap<String, Object> claims = new HashMap<>();\n\t\tclaims.put(\"role\", userDetails.getRole());\n\t\treturn doGenerateToken(claims, userDetails.getUsername());\n\t}", "public void storeToken(AuthorizationToken token);", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n }", "public AuthToken loginUser(){\n return null;\n }", "public String saveAuthToken() { // basically for signin\n return authTokenAssist.saveMemberToken(getSavedUserBean().get().getMemberAccount());\n }", "@Override\n\tpublic User auth()\n\t{\n\t\treturn this.user;\n\t}", "@RequestMapping(value = \"/authenticate\", method = { RequestMethod.POST })\n public AuthResult authorize(@RequestParam String username, @RequestParam String password) {\n\n\n UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password);\n try {\n Authentication authentication = authenticationManager.authenticate(token);\n SecurityContextHolder.getContext().setAuthentication(authentication);\n User user = userService.getUserByUserName(username);\n return new AuthResult(tokenUtils.createToken(user), \"\", Status.OK);\n } catch (AuthenticationException ex){\n return new AuthResult(\"\", ex.getMessage(), Status.ERROR);\n }\n\n\n\n //return new UserInfo(user.getUsername(), tokenUtils.createToken(user));\n }", "@Override\n /**\n * Handles a HTTP GET request. This implements obtaining an authentication token from the server.\n */\n protected void handleGet(Request request, Response response) throws IllegalStateException {\n String username = String.valueOf(request.getAttributes().get(\"username\"));\n String password = String.valueOf(request.getAttributes().get(\"password\"));\n /* Construct MySQL Query. */\n String query = \"SELECT COUNT(id) AS `CNT`, `authToken` FROM accounts WHERE `username` = '\" + username + \"' AND \" +\n \"`password` = '\" + password + \"' LIMIT 0,1;\";\n /* Obtain the account count and existing token pair, as object array. */\n Object[] authenticationArray = dataHandler.handleAuthentication(database.ExecuteQuery(query,\n new ArrayList<String>()));\n int cnt = (int) authenticationArray[0];\n String existingToken = (String) authenticationArray[1];\n String authenticationToken = null;\n if (cnt == 1) { // There is exactly one account matching the parameterised username and password.\n if (existingToken == null) { // No token yet existed, generate one.\n authenticationToken = TokenGenerator.getInstance().generateAuthenticationToken(TOKEN_LENGTH);\n } else {\n authenticationToken = existingToken;\n }\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n if (!(authenticationToken == null || authenticationToken == \"\")) { // Update the database with the new token.\n Database.getInstance().ExecuteUpdate(\"UPDATE `accounts` SET `authToken` = '\" + authenticationToken +\n \"', `authTokenCreated` = CURRENT_TIMESTAMP WHERE `username` = '\" + username + \"';\",\n new ArrayList<String>());\n this.returnResponse(response, authenticationToken, new TokenSerializer());\n } else {\n this.returnStatus(response, new IllegalArgumentStatus(null));\n }\n }", "java.lang.String getAuth();", "java.lang.String getAuth();", "java.lang.String getAuth();", "@Override\n public void onSuccess(AuthResult authResult) {\n\n }", "String getToken(String scope, String username, String password) throws AuthorizationException;", "private UsernamePasswordAuthenticationToken getAuthtication(HttpServletRequest request){\n // Get token from request header.\n String token = request.getHeader(\"Authorization\");\n if (token != null){\n //Get the username from the jwt token\n String username = JwtUtil.getUsernameByToken(token);\n //Check the existence of the username.\n Optional<User> userTry = userRepository.findByUsername(username);\n Collection<GrantedAuthority> authorities = new ArrayList<>();\n if (userTry.isPresent()){\n User user = userTry.get();\n authorities.add(new SimpleGrantedAuthority(user.getRole().getName()));\n return new UsernamePasswordAuthenticationToken(user,token,authorities);\n }\n }\n return null;\n }", "public String userToken() {\n return userToken;\n }", "protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }", "public String generateAccessToken() {\n return accessTokenGenerator.generate().toString();\n }", "@GET(\"users/signin\")\r\n Call<User> signIn(@Header(\"Authorization\") String token);", "public void authenticated(String token) {\n showHomeScreen(token);\n }", "private AuthenticationSuccessHandler authenticationSuccessHandler() {\r\n return (HttpServletRequest request, HttpServletResponse response, Authentication auth) -> {\r\n auditLogger.logAccess((String) auth.getPrincipal(),\r\n AuditLogger.Areas.MGMT_UI,\r\n AuditLogger.Ops.LOGIN, null);\r\n prepareResponse(response, auth, HttpStatus.OK, null);\r\n };\r\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "public Guid getUserToken() {\n return localUserToken;\n }", "public synchronized void acquireTokenAsync() {\n if (this.mCallback == null) {\n String str = Analytics.LOG_TAG;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Calling token provider=\");\n sb.append(this.mType);\n sb.append(\" callback.\");\n AppCenterLog.debug(str, sb.toString());\n this.mCallback = new AuthenticationCallback() {\n public void onAuthenticationResult(String str, Date date) {\n AuthenticationProvider.this.handleTokenUpdate(str, date, this);\n }\n };\n this.mTokenProvider.acquireToken(this.mTicketKey, this.mCallback);\n }\n }", "@Override\n protected void configure(AuthenticationManagerBuilder auth) {\n auth.authenticationProvider(authProvider);\n }", "AuthenticationToken authenticate(String username, CharSequence password) throws Exception;", "@Override\n\tpublic void onAuthenticationSuccess(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Authentication authentication) throws IOException,\n\t\t\tServletException {\n\t\t\n\t\tStatusMessageDto statusMessageDto = new StatusMessageDto();\n\t\t\n\t\tstatusMessageDto.setStatus(HttpServletResponse.SC_OK);\n\t\tstatusMessageDto.setMessage(\"Authentication has been successful\");\n\t\t\n\t\t\n\t\tString json = new Gson().toJson(statusMessageDto);\n\t\t\n\t\tresponse.getWriter().print(json);\n\t\t\n\t\n\t\t\n\t}", "public String getToken()\n {\n return token;\n }", "@Override\r\n\t\t\tpublic void onSuccess(Void result) {\n\t\t\t\tsynAlert.clear();\r\n\t\t\t\tauthenticationController.initializeFromExistingAccessTokenCookie(new AsyncCallback<UserProfile>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\tsynAlert.handleException(caught);\r\n\t\t\t\t\t\tview.showLogin();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(UserProfile result) {\r\n\t\t\t\t\t\t// Signed ToU. Check for temp username, passing record, and then forward\r\n\t\t\t\t\t\tuserAuthenticated();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}", "private CdekAuthToken getAuthToken()\n {\n String authEndpoint = conf.ENDPOINT + \"/oauth/token?grant_type={grant_type}&client_id={client_id}&client_secret={client_secret}\";\n\n HttpHeaders defaultHeaders = new HttpHeaders();\n HttpEntity req = new HttpEntity(defaultHeaders);\n\n return rest.postForObject(authEndpoint, req, CdekAuthToken.class, conf.getAuthData());\n }", "public String getTokenResult() {\n return tokenResult;\n }", "public Result authenticate() {\r\n // 1. Define class to send JSON response back\r\n class Login {\r\n public Long id;\r\n public String gamerTag;\r\n public String token;\r\n\r\n public Login() {\r\n }\r\n }\r\n\r\n // 2. Read email and password from request()\r\n JsonNode request = request().body().asJson();\r\n String gamerTag = request.get(\"gamerTag\").asText();\r\n String password = request.get(\"password\").asText();\r\n\r\n // 3. Find user with given gamerTag\r\n Login ret = new Login();\r\n User user = User.gamerTagLogin(gamerTag);\r\n if (user == null) {\r\n return unauthorized(Json.toJson(ret));\r\n }\r\n // 4. Compare password.\r\n String sha256 = User.getSha256(request.get(\"password\").asText());\r\n if (sha256.equals(user.getPassword())) {\r\n // Success\r\n String authToken = generateAuthToken();\r\n user.setToken(authToken);\r\n Ebean.update(user);\r\n ret.token = authToken;\r\n ret.gamerTag = user.getGamerTag();\r\n ret.id = user.getId();\r\n return ok(Json.toJson(ret));\r\n\r\n }\r\n // 5. Unauthorized access\r\n return unauthorized();\r\n }", "LoggedUser authenticate(@Valid AccountCredentials credentials) throws IOException;", "public Token toScribeToken() {\n return new Token(oauthToken, oauthTokenSecret);\n }", "public String getToken() {\n return token.get();\n }", "private void authWithCustomToken(JSONArray data) {\n // Create a reference to a Firebase database URL\n String strURL = String.format(\"https://%s.firebaseio.com\", appName);\n String token;\n if ( data.length() >= 1 )\n {\n \ttry {\n \t\ttoken = data.getString(0);\n\t\t\t} catch (JSONException e) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n }\n else{\n \tPluginResult pluginResult = new PluginResult(Status.ERROR, \"authWithCustomToken : Parameter Error\");\n \tmCallbackContext.sendPluginResult(pluginResult);\n \treturn;\n }\n Firebase rootRef = new Firebase(strURL);\n rootRef.authWithCustomToken(token, new Firebase.AuthResultHandler() {\n\n\t\t\t@Override\n\t\t\tpublic void onAuthenticationError(FirebaseError arg0) {\n\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, \"authWithCustomToken : Error\");\n\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onAuthenticated(AuthData arg0) {\n JSONObject resultObj;\n\t\t\t\ttry {\n\t\t\t\t\tresultObj = new JSONObject(arg0.getAuth().toString());\t//NSDictionary *authDict = authData.auth;\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n }", "@Override\r\n\tprotected IamAuthenticationInfo doAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {\r\n\t\tString granticket = EMPTY;\r\n\t\ttry {\r\n\t\t\tnotNullOf(token, \"authenticationToken\");\r\n\t\t\tFastCasAuthenticationToken ftk = (FastCasAuthenticationToken) token;\r\n\r\n\t\t\t// Get request flash grant ticket(May be empty)\r\n\t\t\tgranticket = (String) ftk.getCredentials();\r\n\r\n\t\t\t// Contact CAS remote server to validate ticket\r\n\t\t\tTicketValidatedAssertModel<IamPrincipalInfo> validated = doRequestRemoteTicketValidation(granticket);\r\n\r\n\t\t\t// Grant ticket assertion .\r\n\t\t\tassertTicketValidation(validated);\r\n\r\n\t\t\t/**\r\n\t\t\t * {@link JedisIamSessionDAO#update()} </br>\r\n\t\t\t * Update session expire date time.\r\n\t\t\t */\r\n\t\t\tDate validUntilDate = validated.getValidUntilDate();\r\n\t\t\tlong maxIdleTimeMs = validUntilDate.getTime() - currentTimeMillis();\r\n\t\t\tstate(maxIdleTimeMs > 0, format(\"Remote authenticated response session expired time: %s invalid, maxIdleTimeMs: %s\",\r\n\t\t\t\t\tvalidUntilDate, maxIdleTimeMs));\r\n\t\t\tgetSession().setTimeout(maxIdleTimeMs);\r\n\r\n\t\t\t// Currenly authentication principal info.\r\n\t\t\tIamPrincipalInfo info = validated.getPrincipalInfo();\r\n\t\t\tAttributes attrs = info.attributes();\r\n\r\n\t\t\t// Save common attributes\r\n\t\t\tsaveCommonAttributes(attrs);\r\n\r\n\t\t\t// Update save grant ticket\r\n\t\t\tString newGrantTicket = valueOf(info.getStoredCredentials());\r\n\t\t\tftk.setCredentials(newGrantTicket);\r\n\r\n\t\t\t// Merge add attributes\r\n\t\t\tString principal = validated.getPrincipalInfo().getPrincipal();\r\n\t\t\tftk.setPrincipal(principal); // MARK1\r\n\t\t\tftk.setRememberMe(attrs.getRememberMe());\r\n\t\t\tftk.setHost(attrs.getClientHost());\r\n\r\n\t\t\tlog.info(\"Validated grantTicket: {}, principal: {}\", granticket, principal);\r\n\r\n\t\t\t// Authenticate attributes.(roles/permissions/rememberMe)\r\n\t\t\tPrincipalCollection principals = createPermitPrincipalCollection(info);\r\n\r\n\t\t\t// You should always use token credentials because the default\r\n\t\t\t// SimpleCredentialsMatcher checks.\r\n\t\t\treturn new FastAuthenticationInfo(info, principals, getName());\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CredentialsException(format(\"Unable to validate ticket [%s]\", granticket), e);\r\n\t\t}\r\n\r\n\t}", "public String getAuthtoken() {\n return authtoken;\n }", "public UserResponse authenticate(String token) {\n ObjectId id = new ObjectId(token);\n MongoCollection<Document> users = database.getCollection(\"users\");\n FindIterable<Document> documents = users.find(Filters.and(\n Filters.eq(UserMongo.objectId, id),\n Filters.eq(UserMongo.isActive, true),\n Filters.eq(UserMongo.isAccept, true)));\n if (documents.iterator().hasNext()) {\n Document next = documents.iterator().next();\n return convertDocumentToUserResponse(next);\n }\n return null;\n }", "@GetMapping(\"/login\")\n public ResponseEntity<?> login(Principal principal){\n if(principal == null) {\n //This should be ok hhtp status because this will be user for logout path\n return ResponseEntity.ok(principal);\n }\n UsernamePasswordAuthenticationToken authenticationToken = (UsernamePasswordAuthenticationToken) principal;\n User user = userService.findByUsername(authenticationToken.getName());\n user.setToken(jwtTokenProvider.generateToken(authenticationToken));\n return new ResponseEntity<>(user,HttpStatus.OK);\n }" ]
[ "0.6357908", "0.6346716", "0.6291053", "0.6289441", "0.6225882", "0.62124527", "0.5899652", "0.5880833", "0.5858633", "0.5845787", "0.5810407", "0.5798386", "0.5773718", "0.5757359", "0.57445616", "0.5731337", "0.5695207", "0.564143", "0.5530609", "0.5508767", "0.5488323", "0.54437125", "0.54254556", "0.53907543", "0.53808135", "0.536775", "0.53541964", "0.534802", "0.5347795", "0.5345096", "0.5341877", "0.53125006", "0.5294899", "0.5294145", "0.528796", "0.5270582", "0.5267381", "0.52616465", "0.5241942", "0.5235836", "0.5224573", "0.52219975", "0.52216905", "0.5208274", "0.5202961", "0.5190356", "0.51564175", "0.51437944", "0.51399356", "0.5124195", "0.5115227", "0.50960946", "0.5093676", "0.5092235", "0.5091559", "0.5069782", "0.5062978", "0.5051138", "0.5041087", "0.50302786", "0.5015002", "0.50146645", "0.498108", "0.49530035", "0.49519336", "0.49510118", "0.49328288", "0.49281147", "0.49236932", "0.49193326", "0.49193326", "0.49193326", "0.49165875", "0.49143705", "0.49092764", "0.4899228", "0.4892351", "0.48862863", "0.48833838", "0.48597717", "0.4858241", "0.48515046", "0.48515046", "0.48515046", "0.48508534", "0.48506588", "0.48497096", "0.48481014", "0.48428345", "0.4841715", "0.4841333", "0.48210853", "0.4819895", "0.4816138", "0.48087558", "0.48017406", "0.47972187", "0.47966957", "0.4795565", "0.47916678", "0.47866502" ]
0.0
-1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.7885466", "0.75500387", "0.7497769", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904", "0.74621904" ]
0.0
-1
But google don't allow to rewrite 'from'
public void sendFromTo(String from, String emailTo, String subject, String message) { try { MimeMessage mimeMessage = mailSender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, false, "utf-8"); mimeMessage.setContent(message, "text/html; charset=UTF-8"); helper.setFrom(from); helper.setTo(emailTo); helper.setSubject(subject); mailSender.send(mimeMessage); } catch (MessagingException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void from(String from) {\n }", "public void setFrom(String from) {\r\n\t\tthis.from= from;\r\n\t}", "public void setFrom(String from) {\n this.from = from;\n }", "public void set_from(String from2) {\n\t\tthis.from=from2;\n\t}", "public void from(IETeam from);", "public abstract String redirectTo();", "URI rewrite(URI uri);", "public String getFrom() {\n return from;\n }", "static URITranslator prefix(String source, String target) {\n return new PrefixReplacer(source, target);\n }", "public String getFrom(){\r\n\t\treturn from;\r\n\t}", "public String getFrom()\r\n {\r\n return from;\r\n }", "@JsonProperty(\"from\")\n public void setFrom(String from) {\n this.from = from;\n }", "String rewriteUrl(String originalUrl);", "public String getFrom() {\r\n\t\treturn from;\r\n\t}", "public String getFrom() {\n\t\treturn from;\n\t}", "public String getFrom() {\n return from;\n }", "String directsTo();", "@Override\n\tpublic String resolve(EObject from) {\n\t\tString resolvename = super.resolve(from);\n\t\tif (null == resolvename) {\n\t\t\treturn resolvename;\n\t\t}\n\t\t\n\t\tif (!resolvename.endsWith(\".sats\") && !resolvename.endsWith(\".dats\")) {\n\t\t\t// todo didn't check whether path is valid\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// System.out.println(\"resolve: \" + resolvename);\n\t\t\n\t\tResource resource = from.eResource();\n\t\tURI importUri = URI.createURI(resolvename);\n\t\t// is already valid uri\n\t\tif (EcoreUtil2.isValidUri(resource, importUri)) {\n\t\t\treturn resolvename;\n\t\t}\n\n\t\t// get the name of the project\n\t\tString projname = null;\n\t\tString path = from.eResource().getURI().toString();\n\t\tfinal String platform = \"platform:/resource/\";\n\t\t// final String filesys = \"file://\";\n\t\tif (path.startsWith(platform)) {\n\t\t\tprojname = path.substring(platform.length()).split(\"/\")[0];\n\t\t\t// System.out.println(\"projname is \" + projname);\n\t\t resolvename = platform + projname + \"/\" + resolvename;\n\t\t}\n\n\t\treturn resolvename;\n\n\t}", "public String getFrom() {\n return from;\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 }", "@JsonProperty(\"from\")\n public String getFrom() {\n return from;\n }", "@Override\n public void resolveUrls(KeycloakUriBuilder authUrlBuilder) {\n }", "public String getFrom() {\n\n\t\treturn from;\n\n\t}", "@Override\n public void startPrefixMapping(\n String prefix, String uri\n ) throws SAXException {\n // ...\n }", "private static String getPrefixRewriteParams(String params) {\n\n URLMapping[] urlMappings = getParamsURLMappings(params);\n\n if (urlMappings == null) {\n return params;\n }\n\n StringBuilder sb = new StringBuilder();\n\n for (URLMapping urlMapping : urlMappings) {\n\n sb.append(urlMapping.getSplitKey()[3]);\n sb.append(\"=\");\n sb.append(urlMapping.getFinalValue());\n sb.append(\"&\");\n }\n\n return StringUtils.substring(sb.toString(), 0, sb.length() - 1);\n }", "String getFrom();", "String getFrom();", "String getFrom();", "String getFrom();", "public void setFrom(String val) {\n\n\t\tfrom = val;\n\n\t}", "URI translate(URI original);", "void setFrom( String from );", "String getRequestedUrl();", "@Override\r\n public void startPrefixMapping(String prefix, String uri)\r\n throws SAXException {\n }", "@Override\n public void sendRedirect(String arg0) throws IOException {\n\n }", "public void setFrom(XPath v)\n {\n m_fromMatchPattern = v;\n }", "private String findFrom(String from) {\n\t\tPattern UNIT = Pattern.compile(\"^\\\\w+.\\\\w+(?=\\\\ )\"); // Match two words\n\t\tMatcher m = UNIT.matcher(from);\n\t\twhile (m.find()) {\n\t\t\tfrom = m.group(0);\n\t\t}\n\t\treturn from;\n\t}", "@JsonSetter(\"from\")\r\n public void setFrom(String from) {\r\n this.from = from;\r\n }", "private static String getRoute(String route){\n\t\tString link = (isLocal ? url_local : url_prod) + route;\n\t\treturn link;\n\t}", "void redirect(ReagentSynonym synonym);", "@Override\n\t\tpublic void startPrefixMapping(String prefix, String uri)\n\t\t\t\tthrows SAXException {\n\t\t\t\n\t\t}", "static URITranslator map(String source, String target) {\n return map(URI.create(source), URI.create(target));\n }", "public String shortForm(URI uri)\n { return \"WRONG SHORTFORM PROVIDER!!!\"; }", "void sendForward(HttpServletRequest request, HttpServletResponse response, String location) throws AccessControlException, ServletException, IOException;", "String getServerUrl();", "@Override\n\tpublic void startPrefixMapping(String prefix, String uri)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startPrefixMapping(String prefix, String uri)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "private void setFrom (int from) {\n this.from = from;\n }", "@Override\npublic void get(String url) {\n\t\n}", "String endpoint();", "@JsonGetter(\"from\")\r\n public String getFrom() {\r\n return from;\r\n }", "public interface Request extends Message\n\t{\n String DESTINATION = \"aether.message.dest\";\n }", "@Override\r\n public String rewriteHost(final String host) {\r\n return this.rewriteHost(getPluginDomains(), host);\r\n }", "private RequestNodePath() {\n }", "public void setFrom(int from) {\n this.from = from;\n }", "String getRouteDest();", "void redirect(Reagent reagent);", "@Override\n public String getRequestURI() {\n if (httpRequest instanceof HttpRequestImpl) {\n return strip(context, ((HttpRequestImpl) httpRequest).requestRawPath());\n }\n return strip(context, super.getRequestURI());\n }", "FullUriTemplateString baseUri();", "@Override\n\t\tvoid request(HttpURLConnection u, String prefix) {\n\t\t}", "void projectUriRequest(Request request);", "@RequestMapping(\n value= {\"\", \"index.htm\"},\n produces = \"text/html\")\n public String forwardUrl() {\n return \"forward:/index.html\";\n }", "public final static String transformUrl(String url) {\n \n int c = url.indexOf('?');\n if (c > -1) {\n url = url.substring(0, c);\n }\n \n // temporary work around to enable authorization on opendap URLs\n url = url.replace(\"dodsC\", \"fileServer\").replace(\".ascii\", \"\").replace(\".dods\", \"\").replace(\".das\", \"\").replace(\".ddds\", \"\");\n \n return url;\n }", "public interface RecipientListRouter extends Router {\n}", "public void startPrefixMapping (String prefix, String uri)\n throws SAXException\n {\n // no op\n }", "@Test public void pathToMap() {\n query(\"<a/>[./name()]\", \"<a/>\");\n }", "protected abstract String getUrl();", "@Override\r\n\tpublic void getUrl() {\n\r\n\t}", "protected ForwardingMap() {}", "@Override\n\t\tpublic String getRequestURI() {\n\t\t\treturn null;\n\t\t}", "@Test\n public void testAliasInFrom() throws Exception {\n String sql = \"SELECT myG.a FROM g AS myG\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"myG.a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"myG\", \"g\");\n \n verifySql(sql, fileNode);\n }", "public void toMaps_ToysRUs(){\n toUrl(\"https://www.google.com/maps/place/Toys%E2%80%9CR%E2%80%9DUs/@40.9794274,-74.2563207,17z/data=!4m7!1m4!3m3!1s0x89c302dac069cbdf:0x7a8c72d741957102!2s1+Geoffrey+Way,+Wayne,+NJ+07470!3b1!3m1!1s0x89c302cde7d27bf1:0x2ad7dabe9764018e\");\n }", "private String replace(String str, String from, String to) {\n int index = str.indexOf(from);\n\n if (index == -1) {\n return str;\n } else {\n int endIndex = index + from.length();\n\n return str.substring(0, index) + to + str.substring(endIndex);\n }\n }", "Uri mo1686a();", "public interface Router {\n\n interface Message {\n /**\n * The reply-to header\n *\n * @return the reply-to header\n */\n default String replyTo() {\n return (String) metadata().get(\"reply-to\");\n }\n\n /**\n * The host header\n *\n * @return the host header\n */\n default String host() {\n return (String) metadata().get(\"x-host\");\n }\n\n /**\n * Get the name of the reply queue to send the message to\n *\n * @return the reply queue\n */\n default String replyQueue() {\n return (String) metadata().get(\"x-reply-queue\");\n }\n\n\n /**\n * The uri header\n *\n * @return the uri header\n */\n default String uri() {\n\n return (String) metadata().get(\"x-uri\");\n }\n\n /**\n * The scheme header\n *\n * @return the scheme header\n */\n default String scheme() {\n return (String) metadata().get(\"x-scheme\");\n }\n\n /**\n * The method header\n *\n * @return the method header\n */\n default String method() {\n String m = (String) metadata().get(\"x-method\");\n if (null == m) {\n m = \"get\";\n }\n return m.toLowerCase();\n }\n\n /**\n * Get the port... may be String, Number, or null\n *\n * @return get the port\n */\n default Object port() {\n return metadata().get(\"server-port\");\n }\n\n /**\n * get the protocol for the request\n *\n * @return\n */\n default String protocol() {\n return (String) metadata().get(\"x-server-protocol\");\n }\n\n /**\n * Get the uri args for the request\n *\n * @return the uri args for the request\n */\n default String args() {\n return (String) metadata().get(\"x-uri-args\");\n }\n\n /**\n * The content-type header\n *\n * @return the content-type header\n */\n default String contentType() {\n return (String) metadata().get(\"content-type\");\n }\n\n /**\n * The remote address of the client\n *\n * @return remote address\n */\n default String remoteAddr() {\n return (String) metadata().get(\"x-remote-addr\");\n }\n\n /**\n * The\n *\n * @return\n */\n Map<String, Object> metadata();\n\n Object body();\n\n byte[] rawBody();\n\n MessageBroker.ReceivedMessage underlyingMessage();\n }\n\n /**\n * Convert the message from the more generic one from the MessageBroker into\n * something that can be routed\n *\n * @param message\n * @return\n */\n default Message brokerMessageToRouterMessage(MessageBroker.ReceivedMessage message) {\n return new Message() {\n\n @Override\n public Map<String, Object> metadata() {\n return message.metadata();\n }\n\n @Override\n public Object body() {\n return message.body();\n }\n\n @Override\n public byte[] rawBody() {\n return message.rawBody();\n }\n\n @Override\n public MessageBroker.ReceivedMessage underlyingMessage() {\n return message;\n }\n };\n }\n\n /**\n * Route the message. This may cause the message to be queued to the next handler (Runner)\n * or route it to the handler Func.\n *\n * @param message the Message to route\n * @return the result of the Message application or void if this Router forwards the message\n */\n Object routeMessage(Message message) throws IOException;\n\n\n /**\n * Release any resources that the Router has... for example, any database pool connections\n */\n void endLife();\n\n /**\n * Get the host that this Router is listening for\n *\n * @return the name of the host. May be null\n */\n String host();\n\n /**\n * Get the base path for this Router\n *\n * @return the base path for the router\n */\n String basePath();\n\n /**\n * Return the name of the queue that is associated with the host/path combination\n *\n * @return the name of the queue associated with the host/path combination\n */\n String nameOfListenQueue();\n\n /**\n * Get the swagger for this Router\n *\n * @return the Swagger information for the router\n */\n Map<String, Object> swagger();\n\n}", "@Override\r\n\tprotected String getRedirectUri(HttpServletRequest req)\r\n\t\t\tthrows ServletException, IOException {\n\t\treturn Utils.getRedirectUri(req);\r\n\t}", "String getUrlPattern();", "private void caseForfeit(Request request) {\n }", "@Override\r\n public URI getRequestUri() {\n return null;\r\n }", "public String getRequestUrlName() {\n return \"Source\"; // TODO: parameter\n }", "public abstract URI target();", "static String getHandler(HttpServletRequest request) {\n String requestURI = request.getRequestURI();\n return requestURI.substring(getDividingIndex(requestURI) + 1);\n }", "String getRequestURL();", "@Override\r\n public UriBuilder getRequestUriBuilder() {\n return null;\r\n }", "@Override\n public String encodeRedirectUrl(String arg0) {\n return null;\n }", "public void setFromAddress(java.lang.String fromAddress) {\n\t\tthis.fromAddress = fromAddress;\n\t}", "public void setIpfrom(java.lang.String ipfrom) {\n this.ipfrom = ipfrom;\n }", "public final /* synthetic */ void G() {\n Uri uri;\n com.ss.android.ugc.aweme.festival.common.a e2 = com.ss.android.ugc.aweme.festival.christmas.a.e();\n if (e2 != null && !TextUtils.isEmpty(e2.f47289c)) {\n String str = \"\";\n boolean z = this instanceof MusUserProfileFragment;\n if (z) {\n str = \"others_homepage\";\n } else if (this instanceof MusMyProfileFragment) {\n str = \"personal_homepage\";\n }\n r.a(\"enter_activity_page\", (Map) new d().a(\"enter_from\", str).f34114b);\n String str2 = null;\n if (z && this.J != null && !this.J.isMe()) {\n str2 = this.J.getUid();\n }\n if (!TextUtils.isEmpty(str2)) {\n uri = Uri.parse(e2.f47289c).buildUpon().appendQueryParameter(\"uid\", str2).build();\n } else {\n uri = Uri.parse(e2.f47289c);\n }\n com.ss.android.ugc.aweme.festival.christmas.a.a(getContext(), uri.toString());\n }\n }", "abstract String getUri();", "Call mo35727a(Request request);", "private URI makeUri(String source) throws URISyntaxException {\n if (source == null)\n source = \"\";\n\n if ((source.length()>0)&&((source.substring(source.length() - 1)).equals(\"/\") ))\n source=source.substring(0, source.length() - 1);\n\n return new URI( source.toLowerCase() );\n }", "public void setFromAddress(String fromAddress)\n {\n _fromAddress = fromAddress;\n }", "public V getFrom()\n\t{\n\t\treturn from;\n\t}", "public abstract String getUrl();", "String getQueryRequestUrl();", "@Override\n public void search(Uri uri) {\n }", "private String getDemande(HttpServletRequest request) {\n String demande = \"\";\n demande = request.getRequestURI();\n demande = demande.substring(demande.lastIndexOf(\"/\") + 1);\n return demande;\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 }", "public void startPrefixMapping( String prefix, String uri )\n throws SAXException\n {\n if( inProlog ) {\n // TODO: map the prefix.\n eventList.add(new StartPrefixMappingEvent(prefix, uri));\n }\n else {\n super.startPrefixMapping( prefix, uri );\n }\n }", "@Override\n public String encodeRedirectURL(String arg0) {\n return null;\n }", "public void configure() {\n from(INBOUND_URI + \"?serviceClass=\" + WsTwitterService.class.getName())\n .marshal().xmljson() // convert xml to json\n .transform().jsonpath(\"$.query\") // extract arg0 contents\n .removeHeaders(\"*\")\n .setHeader(Exchange.HTTP_METHOD, new SimpleExpression(\"GET\"))\n // Note, prefer HTTP_PATH + to(<uri>) instead of toD(<uri with path>) for easier unit testing\n .setHeader(Exchange.HTTP_PATH, new SimpleExpression(\"/twitter/${body}\"))\n .to(TWITTER_URI)\n .removeHeader(Exchange.HTTP_PATH)\n .convertBodyTo(byte[].class) // load input stream to memory\n .setHeader(Exchange.HTTP_METHOD, new SimpleExpression(\"POST\"))\n .setHeader(\"recipientList\", new SimpleExpression(\"{{env:WS_RECIPIENT_LIST:http4://localhost:8882/filesystem/}}\"))\n .recipientList().header(\"recipientList\")\n .transform().constant(null);\n }" ]
[ "0.6180079", "0.58204037", "0.5815124", "0.5586796", "0.5570646", "0.5417687", "0.5307741", "0.5298553", "0.5269536", "0.51961255", "0.5170121", "0.51674706", "0.5164166", "0.5135603", "0.5128083", "0.51050174", "0.50518066", "0.5042989", "0.5021695", "0.5008969", "0.5008053", "0.49925774", "0.49836296", "0.4961343", "0.4956053", "0.49517706", "0.49517706", "0.49517706", "0.49517706", "0.49505097", "0.49425855", "0.4935507", "0.492988", "0.49034354", "0.48941407", "0.48869672", "0.4886621", "0.48526573", "0.48446804", "0.4840448", "0.47952443", "0.47944403", "0.47820866", "0.475713", "0.4738593", "0.47366863", "0.47366863", "0.47209847", "0.47150257", "0.4705294", "0.47051916", "0.4699237", "0.46990526", "0.46981692", "0.46915972", "0.46876183", "0.46793607", "0.46753642", "0.4666885", "0.4654725", "0.46404994", "0.46400708", "0.4625144", "0.46210623", "0.46178302", "0.4617468", "0.46116114", "0.45980096", "0.4597447", "0.45954606", "0.45763636", "0.45708337", "0.45703653", "0.4563845", "0.45615986", "0.4554304", "0.45538276", "0.4549341", "0.4548414", "0.4547682", "0.45364317", "0.45117316", "0.450927", "0.4495137", "0.4491014", "0.44888666", "0.44866937", "0.44865164", "0.448222", "0.44784218", "0.44718704", "0.44685757", "0.44682226", "0.44668114", "0.44666672", "0.44622666", "0.445213", "0.44455042", "0.44356754", "0.44337034", "0.4428677" ]
0.0
-1
You may also change texts, positions and more by editing directly the method generatePrinterFriendlyVersion() below
@RequestMapping(value = "/printer-friendly-version", method = {RequestMethod.GET}) public void get( HttpServletResponse response, HttpSession session, @RequestParam(value = "fileId") String fileId ) throws IOException, RestException { // Locate document. This document should not continue if the file was not found. if (!Files.exists(Application.getTempFolderPath().resolve(fileId))) { // Return "Not Found" code. response.setStatus(404); return; } byte[] fileContent = Files.readAllBytes(Application.getTempFolderPath().resolve(fileId)); // Check if doc already has a verification code registered on storage. String verificationCode = StorageMock.getVerificationCode(session, fileId); if (verificationCode == null) { // If not, generate and register it. verificationCode = AlphaCode.generate(); StorageMock.setVerificationCode(session, fileId, verificationCode); } // Generate the printer-friendly version. byte[] pfvContent = generatePrinterFriendlyVersion(fileContent, verificationCode); // Return printer-friendly version as a downloadable file. response.setHeader("Content-Disposition", "attachment; filename=printer-friendly.pdf"); OutputStream outStream = response.getOutputStream(); org.apache.commons.io.IOUtils.write(pfvContent, outStream); outStream.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void printVersion() {\n \n // print the version\n System.out.println(\"arara \".concat(AraraConstants.VERSION).concat(\" - \").concat(localization.getMessage(\"Header_Slogan\")));\n System.out.println(\"Copyright (c) \".concat(AraraConstants.COPYRIGHTYEAR).concat(\", Paulo Roberto Massa Cereda\"));\n System.out.println(localization.getMessage(\"Header_AllRightsReserved\").concat(\"\\n\"));\n }", "private synchronized void print4() {\n try {\n int jNum = 0;\n\n byte[] printText22 = new byte[10240];\n\n byte[] oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setInternationalCharcters('3');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"FoodCiti\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"\\nOrder No : \" + order.getOrderNo());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String location = SessionManager.get(getActivity()).getRestaurantLocation();\n int spacecount = commacount(location);\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (spacecount >= 1) {\n oldText = getGbk(location.substring(0, location.indexOf(',')) + \"\\n\" + location.substring(location.indexOf(',') + 1) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(location + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantPostalCode() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Tel:\" + SessionManager.get(getActivity()).getRestaurantPhonenumber());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderSpecialInstruction() != null) {\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(order.getOrderSpecialInstruction());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\" \" + \"GBP\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // Toast.makeText(getContext(),\"Size \"+order.getOrderedItemList().size(),Toast.LENGTH_LONG).show();\n\n for (int i = 0; i < order.getOrderedItemList().size(); i++) {\n\n OrderedItem orderedItem = order.getOrderedItemList().get(i);\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// int qntity = Integer.parseInt(orderedItem.getQuantity());\n oldText = getGbk(\" \" + orderedItem.getQuantity() + \" x \" + orderedItem.getItemData().getItemName());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Double total_price = Double.valueOf(orderedItem.getTotalPrice()) * Double.valueOf(orderedItem.getQuantity());\n\n oldText = getGbk(\" \" + String.format(Locale.getDefault(), \"%.2f\", total_price) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n for (int j = 0; j < orderedItem.getSubItemList().size(); j++) {\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(35);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n SubItem subItem = orderedItem.getSubItemList().get(j);\n\n String subitemname = subItem.getItemName();\n int subItemOrderQty = Integer.parseInt(subItem.getOrderedQuantity());\n\n if (subItemOrderQty > 1) {\n oldText = getGbk(\" \" + subItem.getOrderedQuantity() + \" x \" + subitemname + \"\\n\");\n } else {\n oldText = getGbk(\" \" + subitemname + \"\\n\");\n }\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n // By Ravi\n// oldText = getGbk(\"........................\\n\");\n// System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n// jNum += oldText.length;\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n /** TODO\n * change here for print suboptions text\n * **/\n //print text for suboptions items\n if (subItem.getSubOptions() != null && subItem.getSubOptions().size() > 0) {\n List<SubOptions> subOptions = subItem.getSubOptions();\n for (int k = 0; k < subOptions.size(); k++) {\n SubOptions options = subOptions.get(k);\n oldText = getGbk(\" - \" + options.getName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;*/\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Subtotal : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderSubtotal())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (Double.valueOf(order.getDiscount()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Discount : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDiscount())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n if (Double.valueOf(order.getTax()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Service Charge : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (order.getTax() != null) {\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getTax())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\" \" + \"0.00\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n if (!order.getOrderDelivery().equals(Consts.PICK_UP) && Double.valueOf(order.getDeliveryCharges()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Delivery Charges : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDeliveryCharges())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"TOTAL Price: \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(370);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n //Toast.makeText(getActivity(),String.valueOf(order.getOrderTotal()),Toast.LENGTH_LONG).show();\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderTotal())));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getFreenDrinkText() != null && !TextUtils.isEmpty(order.getFreenDrinkText())) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String freeTxt = \"Free \" + order.getFreenDrinkText();\n oldText = getGbk(freeTxt);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n /** TODO\n * change here to print payment method text\n * **/\n //print text for payment method\n if (order.getOrderPaid().equalsIgnoreCase(\"paypal\") || order.getOrderPaid().equalsIgnoreCase(\"worldpay\")) {\n oldText = getGbk(order.getOrderPaid() + \" PAID \" + \"\\n\");\n } else {\n oldText = getGbk(order.getOrderPaid() + \" NOT PAID \" + \"\\n\");\n }\n// oldText = getGbk(\"ORDER BY \" + order.getOrderPaid() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderDelivery().equals(Consts.PICK_UP)) {\n oldText = getGbk(\"COLLECTION\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\"DELIVERY\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n }\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // String strTmp2 = new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\", Locale.UK).format(new Date());\n oldText = getGbk(getDate(order.getOrderTime()));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Customer Details: \" + \"\\n\" +\n order.getUser().getUserName().toUpperCase() + \"\\n\" +\n order.getUser().getAddress().toUpperCase() + \"\\n\" +\n order.getUser().getCity().toUpperCase() + \"\\n\" +\n order.getUser().getPostalCode().toUpperCase() + \"\\n\" +\n order.getUser().getPhNo().toUpperCase()\n );\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Ref:\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(order.getOrderId());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"www.foodciti.co.uk\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*String s = new String(printText22);\n Toast.makeText(getActivity(),s,Toast.LENGTH_LONG).show();*/\n\n oldText = CutPaper();\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Intent intent = new Intent(PrintUtils.ACTION_PRINT_REQUEST);\n intent.putExtra(PrintUtils.PRINT_DATA, printText22);\n localBroadcastManager.sendBroadcast(intent);\n\n// mOutputStream.write(printText22);\n\n } catch (Exception ex) {\n Exlogger exlogger = new Exlogger();\n exlogger.setErrorType(\"Print Error\");\n exlogger.setErrorMessage(ex.getMessage());\n exlogger.setScreenName(\"OrderInfo->>print4() function\");\n logger.addException(exlogger);\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_LONG).show();\n\n\n }\n }", "public interface PrintingIfc\n{\n /**\n revision number supplied by source-code-control system\n **/\n public static String revisionNumber = \"$Revision: /rgbustores_13.4x_generic_branch/1 $\";\n /**\n Date format for receipts and endorsements\n **/\n public static SimpleDateFormat DATE_LINE_FORMAT =\n new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ss a z\");\n /**\n ESC sequence for right justification on the slip printer\n **/\n public static String PRINTER_RIGHT_JUSTIFY = new String(\"\\u001b|rA\");\n /**\n Slip printer line size\n **/\n public static int SLIP_PRINTER_LINE_SIZE = 33;\n}", "void printEditionInformation();", "@Override\n public String print() {\n return this.text + \"\\n\" + \"1. \" + this.option1.text + \"\\n\" + \"2. \" + this.option2.text;\n }", "public void print() {\n DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;\n \n //Aca obtenemos el servicio de impresion por default\n //Si no quieres ver el dialogo de seleccionar impresora usa esto\n //PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n \n \n //Con esto mostramos el dialogo para seleccionar impresora\n //Si quieres ver el dialogo de seleccionar impresora usalo\n //Solo mostrara las impresoras que soporte arreglo de bits\n PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();\n PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);\n PrintService defaultService = PrintServiceLookup.lookupDefaultPrintService();\n PrintService service = ServiceUI.printDialog(null, 700, 200, printService, defaultService, flavor, pras);\n \n //Creamos un arreglo de tipo byte\n byte[] bytes;\n\n //Aca convertimos el string(cuerpo del ticket) a bytes tal como\n //lo maneja la impresora(mas bien ticketera :p)\n bytes = this.contenidoFactura.getBytes();\n //Creamos un documento a imprimir, a el se le appendeara\n //el arreglo de bytes\n Doc doc = new SimpleDoc(bytes,flavor,null);\n \n //Creamos un trabajo de impresión\n DocPrintJob job = service.createPrintJob();\n\n //Imprimimos dentro de un try de a huevo\n try {\n //El metodo print imprime\n job.print(doc, null);\n \n } catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n DocPrintJob cutjob = service.createPrintJob();\n DocPrintJob spacejob = service.createPrintJob();\n //dejando espacios al final\n byte[] espacio = (\"\\n \\n \\n \\n\").getBytes();\n try{\n spacejob.print(new SimpleDoc(espacio,flavor,null),null);\n }\n catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n //cortando el papel\n try{\n byte[] cutP = new byte[] { 0x1d, 'V', 1 };\n cutjob.print(new SimpleDoc(cutP,flavor,null),null); \n }catch (Exception er) {\n JOptionPane.showMessageDialog(null,\"Error al imprimir: \" + er.getMessage());\n }\n \n }", "public String print(){\r\n\t\t\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.companyName, \r\n\t\t\t\tthis.numberOfRailCars, \r\n\t\t\t\tthis.destinationCity);\r\n\t}", "@Override\n\tpublic String print(CliPrinter printer) {\n\t\treturn printer.printTProductCards(this);\n\t}", "public String printHeader() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"\\n***********************************\\n\");\n sb.append(\"\\tAbacus\\n\");\n try {\n sb.append(\"\\tVersion: \");\n //sb.append(abacus.class.getPackage().getImplementationVersion());\n sb.append(\"2.6\");\n } catch (Exception e) {\n // Don't print anything\n }\n sb.append(\"\\n***********************************\\n\")\n .append(\"Developed and written by: Damian Fermin and Alexey Nesvizhskii\\n\")\n .append(\"Modifications by Dmitry Avtonomov\\n\")\n .append(\"Copyright 2010 Damian Fermin\\n\\n\")\n .append(\"Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\")\n .append(\"you may not use this file except in compliance with the License.\\n\")\n .append(\"You may obtain a copy of the License at \\n\\n\")\n .append(\"http://www.apache.org/licenses/LICENSE-2.0\\n\\n\")\n .append(\"Unless required by applicable law or agreed to in writing, software\\n\")\n .append(\"distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\")\n .append(\"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\")\n .append(\"See the License for the specific language governing permissions and\\n\")\n .append(\"limitations under the License.\\n\\n\");\n return sb.toString();\n }", "private void printUpdateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opdater Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Opdater Medarbejder\");\n System.out.println(\"(2) Opdater Kunde\");\n System.out.println(\"(3) Opdater Produkt\");\n System.out.println(\"(4) Tilføj Produkt\");\n System.out.println(\"(5) Bekræft\");\n System.out.print(\"Valg: \");\n }", "public void dumpFront(Printer pw, String prefix) {\n if (this.name != null) {\n pw.println(prefix + \"name=\" + this.name);\n }\n pw.println(prefix + \"packageName=\" + this.packageName);\n if (this.labelRes != 0 || this.nonLocalizedLabel != null || this.icon != 0 || this.banner != 0) {\n pw.println(prefix + \"labelRes=0x\" + Integer.toHexString(this.labelRes) + \" nonLocalizedLabel=\" + this.nonLocalizedLabel + \" icon=0x\" + Integer.toHexString(this.icon) + \" banner=0x\" + Integer.toHexString(this.banner));\n }\n }", "public void TesteCompleto() {\n\n\n TectoySunmiPrint.getInstance().initPrinter();\n TectoySunmiPrint.getInstance().setSize(24);\n\n // Alinhamento do texto\n\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Alinhamento\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n\n // Formas de impressão\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Formas de Impressão\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setSize(28);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printStyleBold(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleAntiWhite(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleDoubleHeight(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleDoubleWidth(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleInvert(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleItalic(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleStrikethRough(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().printStyleUnderLine(true);\n TectoySunmiPrint.getInstance().printText(\"TecToy Automação\\n\");\n TectoySunmiPrint.getInstance().printStyleReset();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\", 35);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\", 28);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printTextWithSize(\"TecToy Automação\\n\",50);\n // TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setSize(24);\n\n\n // Impressão de BarCode\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime BarCode\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_INFORME_UM_TEXTO);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ABAIXO_DO_CODIGO_DE_BARRAS);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ACIMA_DO_CODIGO_DE_BARRAS_BARCODE);\n TectoySunmiPrint.getInstance().printAdvanceLines(2);\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printBarCode(\"7894900700046\", TectoySunmiPrint.BarCodeModels_EAN13, 162, 2,\n TectoySunmiPrint.BarCodeTextPosition_ACIMA_E_ABAIXO_DO_CODIGO_DE_BARRAS);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n // Impressão de BarCode\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime QrCode\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printQr(\"www.tectoysunmi.com.br\", 8, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printDoubleQRCode(\"www.tectoysunmi.com.br\",\"tectoysunmi\", 7, 1);\n //TectoySunmiPrint.getInstance().feedPaper();\n\n\n // Impresão Imagem\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime Imagem\\n\");\n TectoySunmiPrint.getInstance().printText(\"-------------------------------\\n\");\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inTargetDensity = 160;\n options.inDensity = 160;\n Bitmap bitmap1 = null;\n Bitmap bitmap = null;\n if (bitmap == null) {\n bitmap = BitmapFactory.decodeResource(getResources(), test, options);\n }\n if (bitmap1 == null) {\n bitmap1 = BitmapFactory.decodeResource(getResources(), test1, options);\n bitmap1 = scaleImage(bitmap1);\n }\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_LEFT);\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_RIGTH);\n TectoySunmiPrint.getInstance().printBitmap(bitmap1);\n //TectoySunmiPrint.getInstance().feedPaper();\n TectoySunmiPrint.getInstance().print3Line();\n\n TectoySunmiPrint.getInstance().setAlign(TectoySunmiPrint.Alignment_CENTER);\n TectoySunmiPrint.getInstance().printText(\"Imprime Tabela\\n\");\n TectoySunmiPrint.getInstance().printText(\"--------------------------------\\n\");\n\n String[] prod = new String[3];\n int[] width = new int[3];\n int[] align = new int[3];\n\n width[0] = 100;\n width[1] = 50;\n width[2] = 50;\n\n align[0] = TectoySunmiPrint.Alignment_LEFT;\n align[1] = TectoySunmiPrint.Alignment_CENTER;\n align[2] = TectoySunmiPrint.Alignment_RIGTH;\n\n prod[0] = \"Produto 001\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 002\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 003\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 004\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 005\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n prod[0] = \"Produto 006\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n TectoySunmiPrint.getInstance().printTable(prod, width, align);\n\n TectoySunmiPrint.getInstance().print3Line();\n TectoySunmiPrint.getInstance().openCashBox();\n TectoySunmiPrint.getInstance().cutpaper();\n\n }", "void format(Printer printer);", "public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}", "@Override\n public void print() {\n System.out.println(\"VIn:- \"+getVehicalIndentificationNumber());\n System.out.println(\"Description:- \"+getVechicalDiscription());\n System.out.println(\"Manufacturer:- \"+getManufacturerName());\n System.out.println(\"isSelfDrive:- \"+getSelfDrive());\n System.out.println(\"isInsured:- \"+getInsured());\n System.out.println(\"insuranceProviderName:- \"+getInsuranceProviderName());\n System.out.println(\"NumberOfSeat:- \"+getNoOfSeat());\n System.out.println(\"FuelType:- \"+getFuelType());\n System.out.println(\"BaseRate:- \"+getBaseRate());\n System.out.println(\"RatePerKm:- \"+getRatePerKm());\n System.out.println(\"VehicleType:- \"+getVehicleType());\n System.out.println(\"Color:- \"+getColor());\n }", "public interface PrintEditionInformation {\n /**\n * This is an interface function that shows\n * information about print edition.\n */\n void printEditionInformation();\n}", "@Override\n\tpublic void showAGBVersion2WithLineNumbers() {\n\t\t\n\t\tSystem.out.println(\"Zeige AGBVersion2 mit Zeilennummern an: \");\n\t\tIterator iter = version2WithLineNumbers.iterator();\n\t\t\n\t\twhile (iter.hasNext())\n\t\t{\n\t\t\tSystem.out.println(iter.next());\n\t\t}\n\t\t\n\t}", "public String getPrintTitle();", "@Override\n\t\t\tpublic void print() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void showAGBVersion1WithLineNumbers() {\n\t\t\n\t\tSystem.out.println(\"Zeige AGBVersion1 mit Zeilennummern an: \");\n\t\tIterator iter = version1WithLineNumbers.iterator();\n\t\t\n\t\twhile (iter.hasNext())\n\t\t{\n\t\t\tSystem.out.println(iter.next());\n\t\t}\n\t\t\n\t}", "public String print(){\r\n\t\treturn String.format(\"%9d\\t%-5s\\t\\t%-3d\\t\\t%-15s\",\r\n\t\t\t\tthis.trackNumber, \r\n\t\t\t\tthis.engineNumber, \r\n\t\t\t\tthis.numRailCars, \r\n\t\t\t\tthis.destCity);\r\n\t\t}", "@Override\r\n\t\t\tpublic void print() {\n\t\t\t\t\r\n\t\t\t}", "private void formatSystem() {}", "public void printTest(){\n\r\n p.resetAll();\r\n p.initialize();\r\n p.feedBack((byte)2);\r\n// p.color(1);\r\n p.alignCenter();\r\n p.setText(\"The Dum Dum Name\");\r\n p.newLine();\r\n p.setText(\"Restaurant Dining\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.setText(\"Bling Bling\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n\r\n p.alignLeft();\r\n p.setText(\"POD No \\t\\t: 2001 \\t\\t Table \\t: E511\");\r\n p.newLine(); \r\n\r\n p.setText(\"Res Date \\t: \" + \"01/01/1801 22:59\");\r\n\r\n p.newLine();\r\n p.setText(\"Session \\t: Evening Session\");\r\n p.newLine();\r\n p.setText(\"Staff \\t\\t: Bum Dale\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n p.newLine();\r\n p.alignCenter();\r\n p.setText(\" - Some Items - \");\r\n p.newLine();\r\n p.alignLeft();\r\n p.addLineSeperator();\r\n\r\n p.newLine();\r\n\r\n p.setText(\"No \\tItem\\t\\tUnit\\tQty\");\r\n p.newLine();\r\n p.addLineSeperator();\r\n \r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n p.setText(\"1\" + \"\\t\" + \"Aliens Everywhere\" + \"\\t\" + \"Rats\" + \"\\t\" + \"500\");\r\n p.newLine();\r\n \r\n p.addLineSeperator();\r\n p.feed((byte)3);\r\n p.finit();\r\n\r\n p.feedPrinter(p.finalCommandSet().getBytes());\r\n \r\n }", "@Override\n public void print() {\n System.out.println(\"Hello World Old Style!!\");\n }", "public void PrinterStatus(){\n PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);\n System.out.println(\"Printer Services found:\");\n printService(services);\n\n // Look up the default print service\n PrintService service = PrintServiceLookup.lookupDefaultPrintService();\n if (service!=null) {\n System.out.println(\"Default Printer Service found:\");\n System.out.println(\"t\" + service);\n }\n\n\t\n // find printer service by name\n AttributeSet aset_name = new HashAttributeSet();\n aset_name.add(new PrinterName(\"Microsoft XPS Document Writer\", null));\n services = PrintServiceLookup.lookupPrintServices(null, aset_name);\n\n System.out.println(\"Printer Service Microsoft XPS Document Writer:\");\n printService(services);\n \n // find printer service by ip\n PrintServiceAttributeSet aset_URI = new HashPrintServiceAttributeSet();\n try {\n aset_URI.add(new PrinterURI(new URI(\"this ipp is wrong --ipp://hostName/printerName\")));\n } catch (URISyntaxException e) {\n System.out.println(\"URI exception caught: \"+e);\n }\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n \n /*\n //another way to print to a specific uri\n URI printerURI = null;\n try {\n printerURI = new URI(\"ipp://SERVER:631/printers/PRINTER_NAME\");\n } catch (URISyntaxException ex) {\n Logger.getLogger(PrinterStatus.class.getName()).log(Level.SEVERE, null, ex);\n }\n IppPrintService svc = new IppPrintService(printerURI);\n services = PrintServiceLookup.lookupPrintServices(null,aset_URI); \n // null could be replaced by DocFlavor.INPUT_STREAM.POSTSCRIPT, etc...\n System.out.println(\"Printer specific URI :\");\n printService(services);\n // following is the way to print sth in a format of flavor\n InputStream stream = new BufferedInputStream(new FileInputStream(\"image.epl\"));\n DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;\n Doc myDoc = new SimpleDoc(stream, flavor, null);\n DocPrintJob job = svc.createPrintJob();\n job.print(myDoc, null);\n */\n \n /*\n // find services that support a particular input format (e.g. JPEG)\n services = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.JPEG, null);\n System.out.println(\"Printer Services with JPEG support:\");\n printService(services);\n\n //find services that support a set of print job capabilities (e.g. color)\n aset = new HashAttributeSet();\n aset.add(ColorSupported.SUPPORTED);\n services = PrintServiceLookup.lookupPrintServices(null, aset);\n\n System.out.println(\"Printer Services with color support:\");\n printService(services);\n */ \n }", "@Override\n\t\tpublic void print() {\n\n\t\t}", "@Override\n public String toString() {\n return versionString;\n }", "@Override\n\tpublic String toString (int printText){\n\t\tString printOut = \"\";\n\n\t\tif(printText != 2){\n\t\t\tprintOut = super.program + \" \" + super.year + \" \" + super.average;\n\t\t\t\n\t\t\tif(printText == 1 && this.isPhD){//print the text version of the phd status\n\t\t\t\tprintOut += \" \" + this.supervisor + \" PhD \" + this.undergraduateSchool;\n\t\t\t}else if(printText == 1 && !this.isPhD){\n\t\t\t\tprintOut += \" \" + this.supervisor + \" Masters \" + this.undergraduateSchool;\n\t\t\t}\n\n\t\t\tif(printText == 0 && this.isPhD){//print the number version of the phd status\n\t\t\t\tprintOut += \" \" + this.supervisor + \" 1 \" + this.undergraduateSchool;\n\t\t\t}else if(printText == 0 && !this.isPhD){\n\t\t\t\tprintOut += \" \" + this.supervisor + \" 0 \" + this.undergraduateSchool;\n\t\t\t}\n\n\t\t\tprintOut += \" \" + this.lastName;\n\t\t}else{\n\t\t\tprintOut = super.toString(printText);//if the printText is equal to 2, concat only the program name, year, and last name\n\t\t}\n\t\treturn printOut;\n\t}", "public String printPatronInfo(){\n String printingStr = \"\";\n if (this.servingPatron.getBooks().size() > 0){\n printingStr += \"The books currently checked out to this patron are:\";\n printingStr += '\\n';\n printingStr += \"{\";\n for (int i = 0;i < (this.servingPatron.getBooks().size());i++){\n this.numberedListOfServing.put(i+1, this.servingPatron.getBooks().get(i));\n //print the numbered list out!\n printingStr += (i+1);\n printingStr += \" : \";\n printingStr += this.servingPatron.getBooks().get(i).toString();\n printingStr += \"; \";\n }\n printingStr = printingStr.substring(0, printingStr.length()-2);\n printingStr += \"}\";\n }\n else {\n printingStr = \"This patron currently possesses no book. \";\n }\n return printingStr;\n }", "public String printableString()\r\n {\r\n String answer=\"\";\r\n answer=\"\\n Title:\\t\"+title+\"\\n Author:\\t\"+author+\"\\n Asking Price:\\t\"+askingPrice+\r\n \"\\n Purchased for:\\t\"+purchasePrice+\"\\n Date Acquired:\\t\"+dateAcquired+\"\\n Genre:\\t\"+genre+\"\\n Number on hand:\\t\"+bookCount+\"\\n\";\r\n return answer;\r\n }", "private String printHelp()//refactored\n { String result = \"\";\n result += \"\\n\";\n result += \"You are weak if you have to ask me\\n\";\n result += \"Try not to die, while i´am mocking you.\\n\";\n result += \"\\n\";\n result += \"\" + currentRoom.getDescription() + \"\\n\"; //new\n result += \"\\nExits: \" + currentRoom.getExitDescription() + \"\\n\";//new\n result += \"\\nCommand words:\\n\";\n result += ValidAction.getValidCommandWords();\n result += \"\\n\";\n \n return result;\n }", "QPrintTerm createPrintTerm();", "@Override\n public void printHelp() {\n\n }", "@Override\r\n\tpublic void print() {\n\t}", "@Override\n\tpublic void print() {\n\n\t}", "@Override\n\tpublic void print() {\n\t\t\n\t}", "public void KTesteCompleto() throws RemoteException {\n\n // Alinhamento\n kPrinterPresenter.printStyleBold(false);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Alinhamento\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n kPrinterPresenter.print3Line();\n\n // Formas de impressão\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Formas de Impressão\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printStyleBold(true);\n kPrinterPresenter.text(\"TecToy Automação\\n\");\n\n\n // Barcode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"BarCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 2);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 1);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printBarcode(\"7891098010575\", 2, 162, 2, 3);\n kPrinterPresenter.print3Line();\n // QrCode\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"QrCode\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_RIGTH);\n kPrinterPresenter.printQr(\"www.tectoyautomacao.com.br\", 8, 0);\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_LEFT);\n kPrinterPresenter.printDoubleQRCode(\"www.tectoyautomacao.com.br\",\"tectoy\", 7, 1);\n // Imagem\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Imagem\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inTargetDensity = 160;\n options.inDensity = 160;\n Bitmap bitmap1 = null;\n if (bitmap1 == null) {\n bitmap1 = BitmapFactory.decodeResource(getResources(), test1, options);\n bitmap1 = scaleImage(bitmap1);\n }\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(0);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n kPrinterPresenter.setAlign(2);\n kPrinterPresenter.printBitmap(bitmap1, 0);\n // Tabelas\n\n\n kPrinterPresenter.setAlign(kPrinterPresenter.Alignment_CENTER);\n kPrinterPresenter.text(\"Tabelas\\n\");\n kPrinterPresenter.text(\"--------------------------------\\n\");\n String[] prod = new String[3];\n int[] width = new int[3];\n int[] align = new int[3];\n\n width[0] = 100;\n width[1] = 50;\n width[2] = 50;\n\n align[0] = kPrinterPresenter.Alignment_LEFT;\n align[1] = kPrinterPresenter.Alignment_CENTER;\n align[2] = kPrinterPresenter.Alignment_RIGTH;\n\n prod[0] = \"Produto 001\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 002\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 003\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 004\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n prod[0] = \"Produto 005\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n prod[0] = \"Produto 006\";\n prod[1] = \"10 und\";\n prod[2] = \"3,98\";\n kPrinterPresenter.printTable(prod, width, align);\n\n\n kPrinterPresenter.print3Line();\n kPrinterPresenter.cutpaper(KTectoySunmiPrinter.HALF_CUTTING, 10);\n\n }", "public static void f_menu() {\n System.out.println(\"----------------------------------------\");\n System.out.println(\"--------------DIGITALSOFT---------------\");\n System.out.println(\"-----version:1.0------28/04/2020.-------\");\n System.out.println(\"-----Angel Manuel Correa Rivera---------\");\n System.out.println(\"----------------------------------------\");\n }", "void printFleet(ConsolePrinter printer);", "private void printCreateOrderMenu()\n {\n System.out.println(\"\");\n System.out.println(\"*** Opret Salg ***\");\n System.out.println(\"(0) Tilbage\");\n System.out.println(\"(1) Tilføj Medarbejder\");\n System.out.println(\"(2) Tilføj Kunde\");\n System.out.println(\"(3) Tilføj Produkt\");\n System.out.println(\"(4) Bekræft\");\n System.out.print(\"Valg: \");\n }", "public String fomatToPrint() {\n\t\treturn String.format(FORMAT_FOR_PRINT, author, ibn, year);\n\t}", "private void printHelp() {\n TablePrinter helpTableHead = new TablePrinter(\"Command Name : \", \"textconvert\");\n helpTableHead.addRow(\"SYNOPSIS : \", \"textconvert [OPTION]...\");\n helpTableHead.addRow(\"DESCRIPTION : \", \"Convert text/file to Binary, Hexadecimal, Base64.\");\n helpTableHead.print();\n TablePrinter helpTable = new TablePrinter(\"Short Opt\", \"Long Opt\", \"Argument\", \"Desc\", \"Short Option Example\", \"Long Option Example\");\n helpTable.addRow(\"-h\", \"--help\", \"not required\", \"Show this help.\", \"help -h\", \"help --help\");\n helpTable.addRow(\"-f\", \"--file\", \"required\", \"Path to file\", \"textconvert -f /PATH/TO/FILE\", \"textconvert --file /PATH/TO/FILE\");\n helpTable.addRow(\"-ttb\", \"--texttobinary\", \"not required\", \"Convert text to Binary\", \"textconvert -ttb -f /PATH/TO/FILE\", \"textconvert --texttobinary --file /PATH/To/File\");\n helpTable.addRow(\"-btt\", \"--binarytotext\", \"not required\", \"Convert Binary to text\", \"textconvert -btt -f /PATH/To/FileWithBinaryData\", \"textconvert --binarytotext --file /PATH/To/FileWithBinaryData\");\n helpTable.print();\n this.done = true;\n }", "public DefaultFormat(final InternationalString name, final InternationalString version) {\n setName (name );\n setVersion(version);\n }", "abstract public void printInfo();", "@VisibleForTesting\n void print();", "void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }", "public void printInfo(){\n\t}", "public void printInfo(){\n\t}", "@Override\n\tpublic void print() {\n\t\tsuper.print();\n\t\tSystem.out.println(\"ÎÒÊÇÒ»Ö»\"+this.getStrain()+\"È®.\");\n\t}", "private static void printDetail() {\n System.out.println(\"Welcome to LockedMe.com\");\n System.out.println(\"Version: 1.0\");\n System.out.println(\"Developer: Sherman Xu\");\n System.out.println(\"[email protected]\");\n }", "@Override\n\tpublic void print() {\n\t\tdecoratedPrinter.print();\n\t}", "private void printWelcome()//refactored\n {\n System.out.println();\n waitTime(0.5);\n System.out.println(\"Let´s play a game...\");\n waitTime(0.5);\n System.out.println(\"Welcome to the awesome Adventure Game 'Magic Quest'!\");\n waitTime(0.5);\n System.out.println(\"If you want to become a mighty madican - you have to play.\");\n waitTime(0.5);\n System.out.println(\"Type 'help' if you need help.\");\n waitTime(0.5);\n System.out.println();\n waitTime(0.5);\n System.out.println(currentRoom.getDescription() + \"\\n\");//new\n waitTime(0.5);\n System.out.println(currentRoom.getExitDescription() + \"\\n\");//new\n waitTime(0.5);\n System.out.println();\n }", "public TextFilePrinter getPrinter();", "String getVersionLabel();", "private static void displayOutput(double timeForIndexVersion1,\n\t\t\tdouble timeForIndexVersion2) throws IOException {\n\t\tSystem.out\n\t\t\t\t.println(\"\\n********************Index Version 1 Information********************\\n\");\n\n\t\tSystem.out.printf(\n\t\t\t\t\"Elapsed time to create Index Version 1 : %.2f secs\\n\",\n\t\t\t\ttimeForIndexVersion1);\n\t\tSystem.out.println(\"Size of Index Version 1 Uncompressed : \"\n\t\t\t\t+ indexVersion1.getSize(\"uncompressed\") / 1024 + \" KB\");\n\t\tSystem.out.println(\"Size of Index Version 1 Compressed : \"\n\t\t\t\t+ indexVersion1.getSize(\"compressed\") / 1024 + \" KB\");\n\t\tSystem.out.println(\"Number of inverted lists in Version 1 : \"\n\t\t\t\t+ indexVersion1.size());\n\n\t\tSystem.out\n\t\t\t\t.println(\"\\n********************Index Version 2 Information********************\\n\");\n\n\t\tSystem.out.printf(\n\t\t\t\t\"Elapsed time to create Index Version 2 : %.2f secs\\n\",\n\t\t\t\ttimeForIndexVersion2);\n\t\tSystem.out.println(\"Size of Index Version 2 Uncompressed : \"\n\t\t\t\t+ indexVersion2.getSize(\"uncompressed\") / 1024 + \" KB\");\n\t\tSystem.out.println(\"Size of Index Version 2 Compressed : \"\n\t\t\t\t+ indexVersion2.getSize(\"compressed\") / 1024 + \" KB\");\n\t\tSystem.out.println(\"Number of inverted lists in Version 2 : \"\n\t\t\t\t+ indexVersion2.size());\n\n\t\tSystem.out\n\t\t\t\t.println(\"\\nInformation of following terms in Index Version 1 : \\n\");\n\t\tSystem.out.format(\"%10s%20s%20s%25s\\n\", \"Term\", \"Document Freq\",\n\t\t\t\t\"Term Freq\", \"Inverted List length\");\n\n\t\tString l1 = lemmatizer.lemmatize(\"Reynolds\".toLowerCase());\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"Reynolds\",\n\t\t\t\tindexVersion1.documentFreq(l1), indexVersion1.termFreq(l1),\n\t\t\t\tindexVersion1.getPostingSize(l1));\n\n\t\tString l2 = lemmatizer.lemmatize(\"NASA\".toLowerCase());\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"NASA\",\n\t\t\t\tindexVersion1.documentFreq(l2), indexVersion1.termFreq(l2),\n\t\t\t\tindexVersion1.getPostingSize(l2));\n\n\t\tString l3 = lemmatizer.lemmatize(\"Prandtl\".toLowerCase());\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"Prandtl\",\n\t\t\t\tindexVersion1.documentFreq(l3), indexVersion1.termFreq(l3),\n\t\t\t\tindexVersion1.getPostingSize(l3));\n\n\t\tString l4 = lemmatizer.lemmatize(\"flow\".toLowerCase());\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"flow\",\n\t\t\t\tindexVersion1.documentFreq(l4), indexVersion1.termFreq(l4),\n\t\t\t\tindexVersion1.getPostingSize(l4));\n\n\t\tString l5 = lemmatizer.lemmatize(\"pressure\".toLowerCase());\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"pressure\",\n\t\t\t\tindexVersion1.documentFreq(l5), indexVersion1.termFreq(l5),\n\t\t\t\tindexVersion1.getPostingSize(l5));\n\n\t\tString l6 = lemmatizer.lemmatize(\"boundary\".toLowerCase());\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"boundary\",\n\t\t\t\tindexVersion1.documentFreq(l6), indexVersion1.termFreq(l6),\n\t\t\t\tindexVersion1.getPostingSize(l6));\n\n\t\tString l7 = lemmatizer.lemmatize(\"shock\".toLowerCase());\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"shock\",\n\t\t\t\tindexVersion1.documentFreq(l7), indexVersion1.termFreq(l7),\n\t\t\t\tindexVersion1.getPostingSize(l7));\n\n\t\tSystem.out\n\t\t\t\t.println(\"\\nInformation of following terms in Index Version 2 : \\n\");\n\t\tSystem.out.format(\"%10s%20s%20s%25s\\n\", \"Term\", \"Document Freq\",\n\t\t\t\t\"Term Freq\", \"Inverted List length\");\n\n\t\tstemmer.add(\"Reynolds\".toLowerCase().toCharArray(), \"Reynolds\".length());\n\t\tstemmer.stem();\n\t\tString s1 = stemmer.toString();\n\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"Reynolds\",\n\t\t\t\tindexVersion2.documentFreq(s1), indexVersion2.termFreq(s1),\n\t\t\t\tindexVersion2.getPostingSize(s1));\n\n\t\tstemmer.add(\"NASA\".toLowerCase().toCharArray(), \"NASA\".length());\n\t\tstemmer.stem();\n\t\tString s2 = stemmer.toString();\n\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"NASA\",\n\t\t\t\tindexVersion2.documentFreq(s2), indexVersion2.termFreq(s2),\n\t\t\t\tindexVersion2.getPostingSize(s2));\n\n\t\tstemmer.add(\"Prandtl\".toLowerCase().toCharArray(), \"Prandtl\".length());\n\t\tstemmer.stem();\n\t\tString s3 = stemmer.toString();\n\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"Prandtl\",\n\t\t\t\tindexVersion2.documentFreq(s3), indexVersion2.termFreq(s3),\n\t\t\t\tindexVersion2.getPostingSize(s3));\n\n\t\tstemmer.add(\"flow\".toLowerCase().toCharArray(), \"flow\".length());\n\t\tstemmer.stem();\n\t\tString s4 = stemmer.toString();\n\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"flow\",\n\t\t\t\tindexVersion2.documentFreq(s4), indexVersion2.termFreq(s4),\n\t\t\t\tindexVersion2.getPostingSize(s4));\n\n\t\tstemmer.add(\"pressure\".toLowerCase().toCharArray(), \"pressure\".length());\n\t\tstemmer.stem();\n\t\tString s5 = stemmer.toString();\n\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"pressure\",\n\t\t\t\tindexVersion2.documentFreq(s5), indexVersion2.termFreq(s5),\n\t\t\t\tindexVersion2.getPostingSize(s5));\n\n\t\tstemmer.add(\"boundary\".toLowerCase().toCharArray(), \"boundary\".length());\n\t\tstemmer.stem();\n\t\tString s6 = stemmer.toString();\n\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"boundary\",\n\t\t\t\tindexVersion2.documentFreq(s6), indexVersion2.termFreq(s6),\n\t\t\t\tindexVersion2.getPostingSize(s6));\n\n\t\tstemmer.add(\"shock\".toLowerCase().toCharArray(), \"shock\".length());\n\t\tstemmer.stem();\n\t\tString s7 = stemmer.toString();\n\n\t\tSystem.out.format(\"%10s%20d%20d%25d B\\n\", \"shock\",\n\t\t\t\tindexVersion2.documentFreq(s7), indexVersion2.termFreq(s7),\n\t\t\t\tindexVersion2.getPostingSize(s7));\n\t}", "@Override\n public void printable()\n {\n\tfor (int i = 0; i < width; i++)\n\t{\n\t for (int k = 0; k < length; k++)\n\t {\n\t\tif (k == 0 || k == length - 1)\n\t\t System.out.print(\"O \");\n\t\telse if (i == 0 || i == width - 1)\n\t\t System.out.print(\"O \");\n\t\telse\n\t\t System.out.print(\" \");\n\t }\n\n\t System.out.println();\n\t}\n }", "public static void f_menu(){\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n System.out.println(\"_/_/_/_/_/_/softvectorwhith/_/_/_/_/_/_/\");\n System.out.println(\"/_/_/_/version 1.0 2020-oct-29_/_/_/_/_/\");\n System.out.println(\"/_/maked by Andres Felipe Torres Lopez_/\");\n System.out.println(\"_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/\");\n }", "void printInfo();", "private static void printBuildingInfo(ParkerPaulBuilding taxable, int count) {\r\n System.out.printf(\"%1$-25s%2$10.2f%3$9.2f%4$19.2f%5$10d%6$10.2f%n\", count + \" \" + taxable.getDescription(), taxable.getArea(), taxable.getUnitPrice(), taxable.getDwellingArea(), taxable.getNumberOfStories(), taxable.getTax());\r\n }", "public static String printIntro() {\n return\n \" /$$ /$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$ /$$\\n\"\n + \"| $$$ /$$$| $$_____/| $$$ /$$$ /$$__ $$| $$__ $$| $$ /$$/\\n\"\n + \"| $$$$ /$$$$| $$ | $$$$ /$$$$| $$ \\\\ $$| $$ \\\\ $$ \\\\ $$ /$$/ \\n\"\n + \"| $$ $$/$$ $$| $$$$$ | $$ $$/$$ $$| $$ | $$| $$$$$$$/ \\\\ $$$$/ \\n\"\n + \"| $$ $$$| $$| $$__/ | $$ $$$| $$| $$ | $$| $$__ $$ \\\\ $$/ \\n\"\n + \"| $$\\\\ $ | $$| $$ | $$\\\\ $ | $$| $$ | $$| $$ \\\\ $$ | $$ \\n\"\n + \"| $$ \\\\/ | $$| $$$$$$$$| $$ \\\\/ | $$| $$$$$$/| $$ | $$ | $$ \\n\"\n + \"|__/ |__/|________/|__/ |__/ \\\\______/ |__/ |__/ |__/ \\n\"\n + \" \\n\";\n }", "@Override\n\tprotected void print() {\n\t\tSystem.out.println(\"-----------\"+this.getName()+\"\");\n\t}", "public String toString() {\n if ( release ) return \"Release \"+ major;\n else return \"Version \" + major + '.' + commitNumber();\n }", "public void printToScreen() {\n String type = \"\";\n switch (this.type) {\n case 1:\n type = \"Fashion\";\n break;\n case 2:\n type = \"Electronic\";\n break;\n case 3:\n type = \"Consumable\";\n break;\n case 4:\n type = \"Household appliance\";\n break;\n }\n// System.out.println(\"Type : \" + type);\n System.out.printf(\"%6d%15s%6f%20s\\n\", id, name, price, type);\n }", "public void print() {\n\t// Skriv ut en grafisk representation av kösituationen\n\t// med hjälp av klassernas toString-metoder\n System.out.println(\"A -> B\");\n System.out.println(r0);\n System.out.println(\"B -> C\");\n System.out.println(r1);\n System.out.println(\"turn\");\n System.out.println(r2);\n //System.out.println(\"light 1\");\n System.out.println(s1);\n //System.out.println(\"light 2\");\n System.out.println(s2);\n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "private JLabel getAboutVersionLabel() {\n if (aboutVersionLabel == null) {\n aboutVersionLabel = new JLabel();\n aboutVersionLabel.setText(\"Version 0.0 SNAPSHOT\");\n aboutVersionLabel.setHorizontalAlignment(SwingConstants.CENTER);\n }\n return aboutVersionLabel;\n }", "private void prnFOOTR()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(cl_dat.M_intLINNO_pbst >= 64)\n\t\t\t{\n\t\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\");\t\t\n\t\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\t\tprnFMTCHR(dosREPORT,M_strEJT);\n\t\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\t\tdosREPORT.writeBytes(\"<P CLASS = \\\"breakhere\\\">\");\t\t\t\t\t\t\t\t\n\t\t\t\tprnHEADER();\n\t\t\t}\n\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes (\"\\n\\n\\n\\n\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",10));//margin\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"PREPARED BY\",40));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"CHECKED BY \",40));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"H.O.D (MHD) \",40));\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"-------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(\" System generated report, hence signature not required \\n\");\n\t\t\tcl_dat.M_intLINNO_pbst += 8;\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst))\n\t\t { \n\t\t\t\tprnFMTCHR(dosREPORT,M_strEJT);\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOCPI17);\n\t\t\t\tprnFMTCHR(dosREPORT,M_strCPI10);\n\t\t\t}\t\n\t\t}\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnFOOTR\",'E');\n\t\t}\t\n\t}", "public static void printInventoryHelpMessage() {\n\n UI.printEmptyLine();\n System.out.println(\"Here is a list of Inventory commands: \");\n\n UI.printEmptyLine();\n int[] lengthPara = {10,60,50};\n printer(new String[]{HELP_HEADER_COMMAND, HELP_HEADER_DESCRIPTION, HELP_HEADER_FORMAT}, lengthPara);\n UI.showLongLine();\n printer(new String[]{HELP_COMMAND, INVENTORY_HELP_DESCRIPTION, MARK_BLANK}, lengthPara);\n printer(new String[]{ADD_COMMAND, INVENTORY_ADD_DESCRIPTION, INVENTORY_ADD_FORMAT}, lengthPara);\n printer(new String[]{LIST_COMMAND, INVENTORY_LIST_DESCRIPTION, INVENTORY_LIST_FORMAT}, lengthPara);\n printer(new String[]{DELETE_COMMAND, INVENTORY_DELETE_DESCRIPTION, INVENTORY_DELETE_FORMAT}, lengthPara);\n printer(new String[]{RETURN_COMMAND, RETURN_DESCRIPTION, MARK_BLANK}, lengthPara);\n }", "public void print() {\r\n\t\tSystem.out.print(getUID());\r\n\t\tSystem.out.print(getTITLE());\r\n\t\tSystem.out.print(getNOOFCOPIES());\r\n\t}", "public String print(int format);", "public void savingsReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\n//p.color(0);\n//p.chooseFont(1);\np.alignCenter();\n//p.emphasized(true);\n//p.underLine(2);\np.setText(receiptDetails.get(1).toString());\np.newLine();\np.setText(receiptDetails.get(2).toString());\np.newLine();\np.setText(receiptDetails.get(3).toString());\np.newLine();\np.newLine();\n//p.addLineSeperatorX();\np.underLine(0);\np.emphasized(false);\np.underLine(0);\np.alignCenter();\np.setText(\" *** Savings Made Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Account Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(9).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Id: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(0).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\np.setText(\"Customer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\np.newLine(); \n//p.emphasized(false);\n//p.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\n//p.newLine();\n//p.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\n//p.newLine();\n//p.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\n//p.newLine();\np.setText(\"Savings Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Savings Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).toString()+p.underLine(0));\np.newLine();\n\np.underLine(0);\np.emphasized(false);\n//p.underLine(0);\np.addLineSeperator();\np.newLine();\np.alignCenter();\np.setText(\"***** Savings Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Savings Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Savings Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.emphasized(true);\n//p.setText(\"Customer Name: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(4).toString()+p.underLine(0));\n//p.newLine(); \n//p.emphasized(false);\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\np.newLine();\np.addLineSeperatorX();\n\np.addLineSeperator();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.doubleStrik(true);\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n////p.newLine();\n//p.addLineSeperatorX();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "@Override\n public void print() {\n }", "public void printString()\r\n\t{\r\n\t\t//print the column labels\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"Word\", \"Occurrences [form: (Paragraph#, Line#)]\");\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"----\", \"-----------\");\r\n\t\troot.printString();\r\n\t}", "@Override\n\tpublic void printInfo() {\n\t\tsuper.printInfo();\n\t\tmessage();\n\t\tdoInternet();\n\t\tmailing();\n\t\tcalling();\n\t\twatchingTV();\n\n\t}", "public String getVersion()\r\n {\r\n return(\"Ver. 1.0\");\r\n }", "public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }", "@Override\n\tpublic void accept(PrinterVisitor visitor) {\n\t\t\n\t}", "public String getPrinterName() {\n return \"Printer Name is: \" + name;\n }", "public static void printInfo(){\n }", "void printBanner() {\n PrintStream printStream = System.out;\n for (String lineLocal : BANNER) {\n printStream.println(lineLocal);\n }\n printStream.print(line);\n String version = Audit4jBanner.class.getPackage().getImplementationVersion();\n if (version == null) {\n printStream.println(\"(v\" + CoreConstants.RELEASE_VERSION + \")\");\n } else {\n printStream.println(\"(v\" + version + \")\");\n }\n printStream.println();\n }", "public void printInformation() {\n\n System.out.println(\"Name: \" + name);\n System.out.println(\"Weight: \" + weight);\n System.out.println(\"Shape: \" + shape);\n System.out.println(\"Color: \" + color);\n }", "public String printInfo() {\n\t\treturn \"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming Center Information\"+\r\n\t\t\t\t\"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming center Name \\t= \" + centerName +\r\n\t\t\t\t\"\\n Location \\t\\t= \" + location + \r\n\t\t\t\t\"\\n Contact Number \\t= \" + contact+\r\n\t\t\t\t\"\\n Operating hour \\t= \"+ operatingHour+\r\n\t\t\t\t\"\\n Number of Employee \\t= \"+ noOfEmployee+ \" pax\";\r\n\t}", "public void print() {\n\t\tSystem.out.println(name + \" -- \" + rating + \" -- \" + phoneNumber);\n\t}", "protected abstract String format();", "public void desc(CommandSender sender, CDisable main)\n {\n sender.sendMessage(color(\"&2========== \" + getPrefix().replace(\":\",\"\") + \"&2==========\"));\n sender.sendMessage(color(\"&7[&9\" + main.pdfFile.getName() + \"&7] &6Created by, &b&l\" +main.pdfFile.getAuthors()+\"&6.\"));\n sender.sendMessage(color(\"&2\" + main.pdfFile.getDescription() + \"&2.\"));\n sender.sendMessage(color(\"&bWebsite: &e&l\" + main.pdfFile.getWebsite()));\n sender.sendMessage(color(\"\"));\n sender.sendMessage(color(\"\"));\n sender.sendMessage(color(\" &6&l>>>&2&l===============&6&l<<<\\t\"));\n }", "public static void main(String[] args) {\n\t\tSystem.out.print(\"\\u250C\\u252C\\u2510\\n\");\r\n\t\tSystem.out.print(\"\\u251C\\u253C\\u2524\\n\");\r\n\t\tSystem.out.print(\"\\u2514\\u2534\\u2518\");\r\n\t}", "public void actionPerformed(ActionEvent e){\n if (e.getSource() instanceof JButton) {\r\n PrinterJob printJob = PrinterJob.getPrinterJob();\r\n PageFormat pf = new PageFormat();\r\n pf.setOrientation(PageFormat.LANDSCAPE);\r\n printJob.setPrintable(_instance, pf);\r\n //if (printJob.printDialog()) {\r\n try {\r\n printJob.print();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n //}\r\n }\r\n }", "public void print() {\n System.out.println(\"Code: \"+this.productCode);\n System.out.println(\"Name: \"+ this.productName);\n System.out.println(\"Price: \"+this.price);\n System.out.println(\"Discount: \"+this.discount+\"%\");\n }", "public WritingFont() {\n\t\tproperties.set(NAME, \"Untitled\");\n\t\tproperties.set(MEDIAN, .6f);\n\t\tproperties.set(DESCENT, .3f);\n\t\tproperties.set(LEADING, .1f);\n\t}", "public static void main(String[] args) {\n System.out.print(\"-======================================================================-\");\n System.out.println(\" \");\n System.out.println(\" \");\n System.out.println(\" \");\n System.out.println(\" CAL'S DINER \");\n System.out.println(\" \");\n System.out.println(\" \");\n System.out.print(\"-======================================================================-\");\n \n \n //Display 3 special on menu\n System.out.println(\"\");\n System.out.println(\"\");\n System.out.println(\"\");\n System.out.println(\" Today's Special\");\n System.out.println(\" $26.00.......... 8oz Steak\");\n System.out.println(\" $16.00...........Spaghetti and Meatballs\");\n System.out.println(\" $17.00..........Homestyle Chicken Sandwich\");\n \n }", "private void addComponents()\n\t{\n\t\tPrinter currentPrinter;\n\t\tadd(m_ResultHeader);\n\t\tfor(int i = 2; i <= m_PrinterList.getNumberOfPrinters()+1; i++)\n\t\t{\n\t\t\t// Convert values to Strings\n\t\t\tcurrentPrinter = m_PrinterList.getPrinter(i-2);\n\t\t\tadd(new PrinterLabel(i,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\tcurrentPrinter.getPrinterName()+ \"\",\n\t\t\t\t\tcurrentPrinter.getVendor(),\n\t\t\t\t\tcurrentPrinter.getTension()+ \"\",\n\t\t\t\t\tcurrentPrinter.getCompression()+ \"\",\n\t\t\t\t\tcurrentPrinter.getImpact()+ \"\",\n\t\t\t\t\tcurrentPrinter.materialsString(),\n\t\t\t\t\tcurrentPrinter.getTolerance()+ \"\",\n\t\t\t\t\tcurrentPrinter.getFinish()+ \"\", true));\n\t\t}\n\t}", "private static void print(String p) {\n\t\tSystem.out.println(PREFIX + p);\n\t}", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }", "@Override\r\n\tpublic String getPrintName() {\n\t\treturn null;\r\n\t}", "public void mo5994p() {\n this.f5411d = this.f5389I.getString(R.string.new_recording) + \" \" + C1398b.m6805a();\n C1413m.f5726x = this.f5411d;\n }", "public void printAnnuaireName() {\n\t\t\n\t}", "public void print(){\r\n\t\tint ListLength = this.promo.size();\r\n\t\tSystem.out.println(\"Type: \"+this.Type);\r\n\t\tSystem.out.println(\"Name: \"+this.name);\r\n\t\tSystem.out.println(\"Description: \"+this.description);\r\n\t\tSystem.out.printf(\"$%.2f\\n\", this.price);\r\n\t\tSystem.out.println(\"Featured dishes:\");\r\n\t\tfor (int i =0; i<ListLength; i++){\r\n\t\t\tSystem.out.print(\"\\t\"+(i+1) + \". \");\r\n\t\t\tSystem.out.println(this.promo.get(i).getName()); //print name of ala-carte item in promo array\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public static void printBanner(){\n \tSystem.out.println(\"*******************************************\");\n \tSystem.out.println(\"Name:\t\tsveinson\");\n \tSystem.out.println(\"Class:\t\tCS20S\");\n \tSystem.out.println(\"Assignment:\tAx Qy\");\n \tSystem.out.println(\"*******************************************\"); \n }", "public void m14907i() {\n m14892a(C3262d.fancy_showcase_view_layout_title, (C3257i) new C3257i() {\n /* renamed from: a */\n public void mo10458a(View view) {\n TextView textView = (TextView) view.findViewById(C3261c.fscv_title);\n if (VERSION.SDK_INT >= 23) {\n textView.setTextAppearance(C3243f.this.f8722k);\n } else {\n textView.setTextAppearance(C3243f.this.f8713b, C3243f.this.f8722k);\n }\n if (C3243f.this.f8723l != -1) {\n textView.setTextSize(C3243f.this.f8724m, (float) C3243f.this.f8723l);\n }\n textView.setGravity(C3243f.this.f8721j);\n if (C3243f.this.f8734w) {\n ((RelativeLayout.LayoutParams) textView.getLayoutParams()).setMargins(0, C3264k.m14942a(C3243f.this.getContext()), 0, 0);\n }\n if (C3243f.this.f8715d != null) {\n textView.setText(C3243f.this.f8715d);\n } else {\n textView.setText(C3243f.this.f8714c);\n }\n }\n });\n }", "public String getPluginVersion(CDisable main, CommandSender sender)\n {\n return color(\"&fHello, &a&n\"+sender.getName() +\".&r\\nYou are currently running version &b&n\"+main.pdfFile.getVersion() + \"&r of &e&n\"+main.pdfFile.getName() +\"&r\\n \\n&6Your server is running version &c&n\"+ main.getServer().getBukkitVersion());\n }" ]
[ "0.6934058", "0.6682224", "0.6314741", "0.6181839", "0.58833945", "0.5862534", "0.5814397", "0.5786707", "0.5782517", "0.5746949", "0.5740773", "0.5732828", "0.57203835", "0.5708868", "0.56664234", "0.5645834", "0.56286716", "0.56124103", "0.5610143", "0.5593508", "0.5580148", "0.5574448", "0.554399", "0.55431855", "0.55347687", "0.5514632", "0.5490349", "0.54622036", "0.5423758", "0.5416748", "0.5413919", "0.5411313", "0.5386507", "0.5386273", "0.53836286", "0.53707206", "0.53610617", "0.53570354", "0.5348996", "0.5343899", "0.53423434", "0.5341421", "0.5314565", "0.53143233", "0.530894", "0.5304194", "0.5301841", "0.53003687", "0.53003687", "0.52996886", "0.5289067", "0.52843976", "0.5268344", "0.52654874", "0.52624005", "0.5260182", "0.5244911", "0.5237382", "0.5235857", "0.5226505", "0.52231437", "0.5220278", "0.52179545", "0.52128667", "0.52055264", "0.52019256", "0.51956636", "0.5187792", "0.5185437", "0.5171151", "0.5153351", "0.51500005", "0.51488584", "0.5146655", "0.514281", "0.51410776", "0.5133324", "0.5130596", "0.51281494", "0.51235795", "0.51218104", "0.5120743", "0.51093405", "0.51089394", "0.5105378", "0.51049507", "0.5102756", "0.51026654", "0.51015174", "0.5099159", "0.5096229", "0.5095528", "0.5090121", "0.5089748", "0.50893515", "0.5084275", "0.5078357", "0.50764954", "0.5076033", "0.5075563", "0.50742143" ]
0.0
-1
ShowUserMessage.showUserMessage(activity ,"Server Connection Problem!");
public void onConnectionError() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showMessage(String string) {\n\n }", "public void alertConnectionError(){\n\t\tthis.alert(\"ERROR\",\"Server Connection Error\\nTo adjust server settings go to:\\nGame->Settings\",AlertType.ERROR);\n\t}", "@Override\n\tpublic void connectionFailed(String message) {\n\t\tToast.makeText(this, \"Connection Failed !\", Toast.LENGTH_SHORT).show();\n\t}", "public void showMessage(String message);", "@Override\n public void onClick(View v) {\n try {\n message = etMessage.getText().toString();\n if(mService != null){\n if (ouserStat){\n //dout.writeUTF(wUser + \"SendTo@*@~\" + message);\n mService.writeMessage(wUser + \"SendTo@*@~\" + message);\n etMessage.setText(\"\");\n talk.insert(\"I said : \" + message, 0);\n //talk.add(\"I said : \" + message);\n }\n else{\n mService.writeMessage(wUser + \"OfMsg@*@~\" + message);\n etMessage.setText(\"\");\n talk.insert(\"I said : \" + message + \" \\n(\" + wUser + \" is offline for now.\\n He'll receive ur message when he comes online.)\\n\", 0);\n //dout.writeUTF(to + \"OfMsg@*@~\"+message);\n }\n }\n else{\n talk.insert(\"Connection Problem.. Wait\", 0);\n //talk.add(\"Connection Problem.. Wait\");\n }\n } catch (IOException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n System.out.println(\"Ezio Problem Found in writing in Chat Fragment\");\n updateStatus(false);\n }\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "private void displayErrorToast()\n {\n Toast.makeText(\n getApplicationContext(),\n \"Connection to the server failed, please try again!\",\n Toast.LENGTH_LONG ).show();\n }", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void messageToUser(CharSequence text)\n {\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast toast = Toast.makeText(Commissioner.this, getString(R.string.servernotconnect), Toast.LENGTH_LONG);\n toast.show();\n }", "private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\t\tpublic synchronized void handleMessage(Message msg) {\n\t\t\t\t\tswitch(msg.what){\r\n\t\t\t\t\t//--------------通用消息-------------------------//\r\n\t\t\t\t\tcase TEACHEREXIST:// 教师端存在,如果没有被初始化,向教师端请求信息\r\n\t\t\t\t\t\t//设置连接状态\r\n\t\t\t\t\t\tif(!initialed){//未初始化,请求初始化信息\r\n\t\t\t\t\t\t\t\t//设置教师端IP\r\n\t\t\t\t\t\t\t\tif(ServerIP == null){\r\n\t\t\t\t\t\t\t\t\tServerIP = msg.getData().getString(\"ServerIP\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tus.SetIP(ServerIP);\r\n\t\t\t\t\t\t\t\t//发送学生信息请求\r\n\t\t\t\t\t\t\t\ttagCommandCode tcmd = new tagCommandCode(\" \",\" \",\" \");//否则为null!!!\r\n\t\t\t\t\t\t\t\ttcmd.SetCmdID(GETSTUINFO);\r\n\t\t\t\t\t\t\t\tus.SendMsg(tcmd.toByteArray());\r\n\t\t\t\t\t\t\t\tLog.i(\"ActivityInfo---Login===>\", \"GETSTUINFO\");\r\n\t\t\t\t\t\t\t\ttcmd.SetCmdID(LOGIN);// 在线ID\r\n\t\t\t\t\t\t\t\tus.SendMsg(tcmd.toByteArray());// 发送消息\r\n\t\t\t\t\t\t\t\tLog.i(\"ActivityInfo---Login===>\", \"Not Initialed\");\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tif(!connected){//发生改变时才操作\r\n\t\t\t\t\t\t\t\tconnected = true;\r\n\t\t\t\t\t\t\t\tpbLandlight.setImageResource(R.drawable.green);//设置为在线\r\n\t\t\t\t\t\t\t\tLog.i(\"LandLight========>\",\"Online!!!\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif(ServerIP == null){\r\n\t\t\t\t\t\t\t\tServerIP = msg.getData().getString(\"ServerIP\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcmd.SetCmdID(GETSTUINFO);\r\n\t\t\t\t\t\t\tus.SendMsg(cmd.toByteArray());\r\n\t\t\t\t\t\t\tLog.i(\"ActivityInfo---Login===>\", \"GETSTUINFO\");\r\n\t\t\t\t\t\t\tus.SetIP(ServerIP);\r\n\t\t\t\t\t\t\tcmd.SetCmdID(LOGIN);// 在线ID\r\n\t\t\t\t\t\t\tus.SendMsg(cmd.toByteArray());// 发送消息\r\n\t\t\t\t\t\t\tLog.i(\"ActivityInfo---Login===>\", \"Connected & Initialed\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase ACCEPT://与教师端连接,初始化系统参数\r\n\t\t\t\t\tcase GETSTUINFO_RETURN://获得学生信息\r\n\t\t\t\t\t\tLog.i(\"ActivityInfo---ACCEPT===>\", \"Initialed!\");\r\n\t\t\t\t\t\t//初始化命令\r\n\t\t\t\t\t\ttagCommandCode tcmd = new tagCommandCode(msg.getData().getByteArray(\"data\"));\r\n\t\t\t\t\t\t//初始化信息\r\n\t\t\t\t\t\tString StrLocalIP = getLocalIpAddress();//本地IP\r\n\t\t\t\t\t\tString subIP = StrLocalIP.substring(0, StrLocalIP.lastIndexOf(\".\")+1);//网段\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tString StrName; \r\n\t\t\t\t\t\tif(tcmd.strName!= null){\r\n\t\t\t\t\t\t\tStrName = tcmd.strName;//学生姓名\r\n\t\t\t\t\t\t}else StrName =\"STU\"+StrLocalIP.substring(StrLocalIP.lastIndexOf(\".\"),StrLocalIP.length());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(ServerIP==null){\r\n\t\t\t\t\t\t\tServerIP = msg.getData().getString(\"ServerIP\");\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\ttvIP.setText(StrLocalIP);\r\n\t\t\t\t\t\ttvName.setText(StrName);\r\n\t\t\t\t\t\tString strSeat = \"A1\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//写入\r\n\t\t\t\t\t\tif(cmd == null){\r\n\t\t\t\t\t\t\tcmd = new tagCommandCode(StrLocalIP,strSeat,StrName,subIP);//座位号!!!\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tcmd.strIP = StrLocalIP;\r\n\t\t\t\t\t\t\tcmd.strName = StrName;\r\n\t\t\t\t\t\t\tcmd.subIP = subIP;\r\n\t\t\t\t\t\t\tcmd.strSeat = strSeat;\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\tUserInfo mycmd = ((UserInfo) getApplicationContext());\r\n\t\t\t\t\t\tmycmd.getInstant(cmd);\r\n\t\t\t\t\t\tmycmd.setIP(ServerIP);\r\n\t\t\t\t\t\t//标记位\r\n\t\t\t\t\t\tinitialed = true;\r\n\t\t\t\t\t\tconnected = true;\r\n\t\t\t\t\t\tpbLandlight.setImageResource(R.drawable.green);//设置为在线\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase TIMEOUTCONNECTION://掉线\r\n//\t\t\t\t\t\t//设置连接显示\r\n\t\t\t\t\t\tif (!initialed || connected) {\r\n\t\t\t\t\t\t\tunconnected();\r\n\t\t\t\t\t\t\tconnected = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase CLEARRAISEHAND:\r\n\t\t\t\t\t\tHand.setImageResource(R.drawable.hand_on);\r\n\t\t\t\t\t\tbHandup = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase ENABLERAISEHAND:\r\n\t\t\t\t\t\tHand.setEnabled(true);\r\n\t\t\t\t\t\tHand.setImageResource(R.drawable.hand_on);\r\n\t\t\t\t\t\tbHandup = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase DISRAISEHAND:\r\n\t\t\t\t\t\tHand.setEnabled(false);\r\n\t\t\t\t\t\tHand.setImageResource(R.drawable.hand_disable);\r\n\t\t\t\t\t\tbHandup = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase SETVOLUME://老师调节音量\r\n\t\t\t\t\t\ttagCommandCode t = new tagCommandCode(msg.getData().getByteArray(\"data\"));\r\n\t\t\t\t\t\tseekBar.setProgress(t.iReserver[0]);\r\n\t\t\t\t\t\taudioManager.setStreamVolume(AudioManager.STREAM_MUSIC,t.iReserver[0], 0);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase NOTIFY:\r\n\t\t\t\t\t\t byte[] Note = new byte[480];\r\n\t\t\t\t\t\t System.arraycopy(msg.getData().getByteArray(\"data\"), DATALONG-480, Note, 0, 480);\r\n\t\t\t\t\t\tAlertDialog.Builder NotifyDialog= new AlertDialog.Builder(PlayerActivityfullscreen.this);\r\n\t\t\t\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tNotifyDialog.setTitle(\"通知\").setMessage(new String(Note,\"GBK\"))\r\n\t\t\t\t\t\t\t.setCancelable(false)\r\n\t\t\t\t\t\t\t.setNegativeButton(\"关闭\", new DialogInterface.OnClickListener() { \r\n\t\t\t\t\t\t\t public void onClick(DialogInterface dialog, int id) { \r\n\t\t\t\t\t\t\t dialog.cancel(); \r\n\t\t\t\t\t\t\t } \r\n\t\t\t\t\t\t\t }).create().show();\r\n\t\t\t\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t break;\r\n\t\t\t\t\tcase CLASSRESUME://上课--跟读可用,录音等待命令,默认不允许,上课置灰\r\n\t\t\t\t\tcase SELFSTUDYOFF://取消自助学习-同上课\r\n\t\t\t\t\t\tIntent intent = new Intent().setClass(PlayerActivityfullscreen.this,\r\n\t\t\t\t\t\t\t\tClassTeachActivity.class);\r\n\t\t\t\t\t\tintent.setData(Uri.parse(\"0\"));\r\n\t\t\t\t\t\tPlayerActivityfullscreen.this.startActivity(intent);\r\n\t\t\t\t\t\tbreak;\r\n\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}", "void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }", "@Override\n public void onClick(View v) {\n mAndroidServer.listenForConnections(new AndroidServer.ConnectionCallback() {\n @Override\n public void connectionResult(boolean result) {\n if (result == true) {\n Toast.makeText(mActivity, \"SUCCESSFULLY CONNECTED TO A VIEWER\", Toast.LENGTH_LONG);\n }\n }\n });\n\n }", "void showSyncFailMessage();", "@Override\n public void displayMessage(String message) {\n Toast.makeText(getActivity(),message,Toast.LENGTH_SHORT).show();\n }", "public void showNetErrorMessage() {\n showMessage(R.string.ic_net_error_tipinfo);\n }", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "public void message(String message){\n Toast.makeText(getContext(),message,Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void handleMessage(Message msg) {\n Context context=mContext.get();\r\n try {\r\n switch (msg.what) {\r\n case -1:\r\n Toast.makeText(context, String.format(\"Exception: %s\", (String) msg.obj), Toast.LENGTH_LONG).show();\r\n break;\r\n case -2:\r\n Toast.makeText(context, (String) msg.obj, Toast.LENGTH_LONG).show();\r\n break;\r\n case -3:\r\n Toast.makeText(context, \"keine Internetverbindung\", Toast.LENGTH_LONG).show();\r\n break;\r\n }\r\n } catch(Exception ex) {\r\n Toast.makeText(context, String.format(\"Exception: %s\", ex.getMessage()), Toast.LENGTH_LONG).show();\r\n }\r\n }", "private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }", "public void showMsg(String str);", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\tToast.makeText(context, \"Connection Failed\", Toast.LENGTH_SHORT).show();\n\t}", "public void DisplayMessage(String massage);", "public String userSendMessage(){\r\n if( porukeBeanLocal.userSendMessage(userName, email, question)){\r\n return \"Success\";\r\n }\r\n return \"Failure\";\r\n }", "void onMessageToast(String string);", "int displayNotification(Message message);", "public void displayWelcomeMsg();", "public void messageToUser() {\n // show a message dialog - the message is an error message.\n JOptionPane.showMessageDialog(new JFrame(),\n \"You are missing some parameters in the level definitions, Please check it\", \"Error!\",\n JOptionPane.ERROR_MESSAGE);\n // exit the program\n System.exit(0);\n }", "@Override\n\tpublic void showMessage(String message) {\n\n\t}", "public void showMessage(String message){\n Toast.makeText(getContext(), message, Toast.LENGTH_LONG).show();\n }", "public void showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n error.printStackTrace();\n Toast.makeText(Commissioner.this, getString(R.string.servernotconnect) + \"->\" + error.getMessage().toString(), Toast.LENGTH_LONG).show();\n\n }", "public void showMessage(){\n\t jsfMessageHelper.addInfo(\"Mesaj:\", (messageTxt==null?\"?\":messageTxt));\r\n\t}", "@Override\n public void onFailure(Throwable caught) {\n Window.alert(\"ERROR from SERVER !!!\");\n }", "void displayMessage(String message);", "public void alertUser(int status){\r\n\r\n }", "void showAlert(String message);", "@Override\r\n\t\t\tpublic void onChat(String message) {\n\r\n\t\t\t}", "public void showMessage(){\n final AlertDialog.Builder alert = new AlertDialog.Builder(context);\n alert.setMessage(message);\n alert.setTitle(title);\n alert.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n alert.create().dismiss();\n }\n });\n alert.create().show();\n }", "private void displayMessage(String message) {\n Log.d(\"Method\", \"displayMessage()\");\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "void showSuccess(String message);", "private void showMsg1(String string) { TODO Auto-generated method stub\n//\n }", "private void showMsg1(String string) { TODO Auto-generated method stub\n//\n }", "void showToast(String message);", "void showToast(String message);", "public void showComingSoonMessage() {\n showToastMessage(\"Coming soon!\");\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void gotUsersError(String message) {\n disableButton.setEnabled(true);\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "private void msgNoServerConnection() {\r\n\thandler.sendEmptyMessage(1); // enviar error al cargar\r\n }", "@Override\n public void onConnected(Bundle arg0) {\n\n Toast.makeText(getContext(),\"Connected\",Toast.LENGTH_LONG);\n }", "@Override\n\t\t\tpublic void onFailed(String str) {\n\t\t\t\tToast.makeText(MainActivity.this, str, Toast.LENGTH_LONG).show();\n\t\t\t}", "private void toastMessage (String message){\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "static void giveInfo(String message){\n JOptionPane.showMessageDialog(null, message);\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"response is:\", error.toString());\n Toast.makeText(getActivity(), Settings.getword(getActivity(),\"server_not_connected\"), Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message =getString(R.string.back_online);\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS);\n } else {\n message =getString(R.string.you_are_offline);\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_LONG, TastyToast.ERROR);\n }\n }", "public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }", "public void afficherMessage();", "public void run() {\n Intent in = new Intent(activity, serverconnectionerror.class);\n in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(in);\n }", "@Override\r\n\t\tpublic void showMessage(String message) {\n\t\t\t\r\n\t\t}", "private void showAlert(String message) {\n //Builds an AlertDialog with message, title, if cancellable, and what the positive button does\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(message).setTitle(\"Response from Servers\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // do nothing\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n// String errorMessage = null;\n// try {\n// JSONObject arr = new JSONObject(message);\n// errorMessage = arr.getString(\"error\");\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// Toast.makeText(getActivity(), errorMessage, Toast.LENGTH_LONG).show();\n\n }", "public void OnRtcLiveApplyLine(String strPeerId, String strUserName, String strBrief);", "java.lang.String getUserMessage();", "public void tongOnUI(final String msg) {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message =getString(R.string.back_online);\n TastyToast.makeText(getActivity(), message, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS);\n } else {\n message =getString(R.string.you_are_offline);\n TastyToast.makeText(getActivity(), message, TastyToast.LENGTH_LONG, TastyToast.ERROR);\n }\n }", "public void btnHelpClick(){\n try {\n String Tag = TAG + \"-BtnHelp\";\n // Get number\n String number = getMyPhoneNO();\n ReceiveMessageThread receiveMessageThread;\n // Mount the message to be sent\n String msg = \"*SOS*;Number:\" + number + \";\";\n Log.i(Tag, msg);\n // Show message to user\n showProgressDialog(\"Sending distress message...\");\n // Disable Help Button\n btn_help.setEnabled(false);\n // Start thread to send message\n receiveMessageThread = new ReceiveMessageThread(msgHandler, msg);\n receiveMessageThread.start();\n }\n catch (Exception e){\n Log.i(TAG , \"Caught this exception: \" + e.getMessage());\n }\n }", "@Override\n public void onConnected(Bundle connectionHint) {\n //Requires a new thread to avoid blocking the UI\n new SendToDataLayerThread(\"/message_path\", message + \" \" + Calendar.getInstance()).start();\n Log.i(TAG, \"sent, onConnected\" + message);\n Toast.makeText(getApplicationContext(),message,Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n showDialogue(getActivity(), \"Sorry! Server Error\", \"Oops!!!\");\n }", "private void infoMessage(String message) {\n JOptionPane.showMessageDialog(this, message,\n \"VSEGraf - user management\", JOptionPane.INFORMATION_MESSAGE);\n }", "public static void displayMsg() {\n\t}", "private void displayMessage(String text) {\n toggleProgress();\n userMessage.setVisibility(View.VISIBLE);\n userMessage.setText(text);\n }", "@Override\n public void onFailure(Throwable caught) {\n Window.alert(\"ERROR from SERVER\");\n }", "public static void message() {\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(null, \"Thanks for your participation\" + \"\\nHave a great day!\");\r\n\t\t\r\n\t\t\r\n\t}", "void sendMessage() {\n\n\t}", "private void serverDisplay(String message)\n {\n String timeStamp = dateFormat.format(new Date()) + \" \" + message;\n System.out.println(timeStamp);\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n if (dialog != null)\n dialog.dismiss();\n\n //Display appropriate toast message depending upon internet connectivity was a reason for failure or something else..\n if(ConstantsDefined.isOnline(ForgotPassword.this)){\n Toast.makeText(ForgotPassword.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(ForgotPassword.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tMessage message = new Message(); \r\n\t\t\t\t\t\tmessage.what = LoginActivity.LOGIN_FAILURE;\r\n\t\t\t\t\t\tLoginActivity.mHandler.sendMessage(message);\r\n\t\t\t\t\t}", "public void doChatMessage(GameServer gameServer, User user, String name, String message) {\n if (message.startsWith(\"/\")) {\n String toSend = \"\";\n if (message.startsWith(\"/help\")) {\n //Todo: do help\n toSend = \"List of all inner chat commands:\\n\" +\n \"/help (Command) --> Gets help for that command\\n\" +\n \"/list [all, online, RankName, lobby, clients, propertys] --> get a list of users that meet the criteria\\n\" +\n \"/ping --> Pong!\";\n }\n if (message.startsWith(\"/list all\")) {\n List<String> toSendList = Authenticate.getUserList();\n //toSend = Authenticate.getUserList();\n for (String string: toSendList) {\n toSend += string + \"\\n\";\n }\n }\n else if (message.startsWith(\"/ping\")) {\n toSend = \"Pong\";\n }\n else if (message.startsWith(\"/list lobby\")) {\n Lobby lobby = user.getCurrentLobby();\n if (lobby != null) {\n List<User> users = lobby.getUsers();\n for (User u: users) {\n toSend += u.chatFormatDisplay() + \"\\n\";\n }\n }\n }\n else if (message.startsWith(\"/list clients\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n for (ClientWorker w: gameServer.getClients()) {\n toSend += w.toString() + \"\\n\";\n }\n }\n }\n else if (message.startsWith(\"/list propertys\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n toSend = Settings.listPropertys();\n }\n }\n else if (message.startsWith(\"/changeproperty\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n String[] split = message.split(\" \");\n Settings.setProperty(split[1], split[2]);\n toSend = \"Changed property: \" + split[1] + \" to \" + split[2] + \".\\n\" + Settings.listPropertys();\n }\n }\n else if (message.startsWith(\"/loadpropertys\")) {\n if (Authenticate.checkRank(user.getRank(), Rank.Op)) {\n Settings.load();\n toSend = \"Loaded propertys.\\n\" + Settings.listPropertys();\n }\n }\n\n else if (message.startsWith(\"/snake\")) {\n if (user.getCurrentLobby() == null) {\n SingleUserChatContext chatContext = new SingleUserChatContext(user, \"Snake-->\" + user.getName(), \"Snake\");\n addNewContext(chatContext);\n SnakeLobby snakeLobby = new SnakeLobby(user, chatContext);\n user.setCurrentLobby(snakeLobby);\n gameServer.lobbys.addNewLobby(snakeLobby);\n snakeLobby.start();\n }\n }\n\n else if (message.startsWith(\"/statesnake\")) {\n if (user.getCurrentLobby() == null) {\n SingleUserChatContext chatContext = new SingleUserChatContext(user, \"Snake-->\" + user.getName(), \"Snake\");\n addNewContext(chatContext);\n StateSnakeLobby snakeLobby = new StateSnakeLobby(user, chatContext);\n user.setCurrentLobby(snakeLobby);\n gameServer.lobbys.addNewLobby(snakeLobby);\n snakeLobby.start();\n }\n }\n\n else if (message.startsWith(\"/leavelobby\")) {\n Lobby lobby = user.getCurrentLobby();\n if (lobby != null) {\n gameServer.lobbys.removeUser(lobby, user);\n toSend = \"Left the lobby\";\n }\n }\n\n// else if (message.startsWith(\"/load\")) {\n// String[] split = message.split(\" \");\n// File file = new File(split[1]);\n// System.out.println(file.exists());\n// if (file.exists()) {\n// try {\n// String in = \"\";\n// BufferedReader reader = new BufferedReader(new FileReader(file));\n// while ((in = reader.readLine()) != null) {toSend += in + \"\\n\";}\n// reader.close();\n// //toSend = in;\n// //Get the chat context, if it exists send the chat message\n// ChatContext chatContext = getContext(name);\n// if (chatContext == null) return;\n// chatContext.sendMessage(toSend);\n// toSend = \"\";\n// }\n// catch (Exception e) {\n// e.printStackTrace();\n// }\n// }\n// }\n\n if (!toSend.isEmpty()) {\n StringWriter stringWriter = new StringWriter();\n new JSONWriter(stringWriter).object()\n .key(\"argument\").value(\"chatmessage\")\n .key(\"name\").value(\"Server-->\" + user.getName())\n .key(\"displayname\").value(\"Server\")\n .key(\"message\").value(toSend)\n .endObject();\n user.clientWorker.sendMessage(stringWriter.toString());\n }\n\n }\n else {\n //Get the chat context, if it exists send the chat message\n ChatContext chatContext = getContext(name);\n if (chatContext == null) return;\n chatContext.sendMessage(user.chatFormatDisplay() + \" \" + message);\n }\n }", "private void displayMessage(String message) {\n }", "protected void notifyUser()\n {\n }", "public void tingOnUI(final String msg) {\r\n\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void showAlert(){\n Loguin.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(Loguin.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "public void sendMessageXMPP(String message, String targetUser, MainActivity mainActivity) {\n ChatManager chatmanager = xmppConnection.getChatManager();\n Chat newChat = chatmanager.createChat(targetUser, new MessageListener(mainActivity));\n\n try {\n newChat.sendMessage(message);\n System.out.println(\"yohoo message sent\");\n// receiveMessage(connection);\n } catch (XMPPException e) {\n System.out.println(\"Error Delivering block\");\n System.out.println(\"----------sendMessageXMPP---------\" + e.getMessage());\n } catch (Exception e) {\n System.out.println(\"----------sendMessageXMPP---------\" + e.getMessage());\n }\n\n }", "public void showWinMessage() {\n\n\t}", "public void displayMessage(String message){\n //Display a toast with the message we recieved\n displayMessage(message,Toast.LENGTH_LONG);\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\n\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"服务器错误\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t}", "void onOnlineLoginFail(User user);", "public void showMessage(String text)\n {\n Toast.makeText(this, text, Toast.LENGTH_SHORT).show();\n }", "private void displayMessage(Profile profile) {\r\n if (profile != null) {\r\n\r\n //get the data from the profile\r\n // textView.setText(profile.getName() + profile.getFirstName() + profile.getName());\r\n\r\n // userSessionManager.AddData(profile.getName(), \"\",\"fb\");\r\n // accessTokenTracker.stopTracking();\r\n // profileTracker.stopTracking();\r\n\r\n //take\r\n // Intent i = new Intent(getActivity(), MyProfileActivity.class);\r\n\r\n // startActivity(i);\r\n //((Activity) getActivity()).overridePendingTransition(0, 0);\r\n }\r\n }", "public String getScreenMessage();", "public abstract void showMessageBox(String message);", "@Override\n public void accept(String error) {\n Toast.makeText(EtudiantSemestreActivity.this, error, Toast.LENGTH_SHORT).show();\n }" ]
[ "0.65209186", "0.651689", "0.64431334", "0.64303553", "0.6411853", "0.63892275", "0.6377957", "0.63688034", "0.6366407", "0.6342688", "0.6342688", "0.6282399", "0.6263701", "0.624432", "0.624432", "0.6235416", "0.6225591", "0.621535", "0.6212014", "0.61872375", "0.6165151", "0.615241", "0.61362606", "0.61362606", "0.61362606", "0.6131299", "0.61099106", "0.60995054", "0.608671", "0.6071405", "0.60708207", "0.6069465", "0.60633427", "0.60286623", "0.6026305", "0.6014723", "0.5996438", "0.59945196", "0.59903836", "0.59888536", "0.59729236", "0.59727615", "0.5971538", "0.5967067", "0.59592783", "0.5954285", "0.5941176", "0.5934114", "0.593312", "0.5922739", "0.5918875", "0.5918875", "0.59164757", "0.59164757", "0.5914085", "0.5912822", "0.5912822", "0.5909506", "0.5908317", "0.5907303", "0.5902121", "0.59015405", "0.5898859", "0.5894023", "0.58915615", "0.5890573", "0.588772", "0.58872837", "0.5885756", "0.58806396", "0.58794355", "0.58776087", "0.58764386", "0.5867108", "0.58622295", "0.58617777", "0.5854636", "0.58544487", "0.5853612", "0.5851995", "0.5848757", "0.5846084", "0.58425", "0.5841793", "0.5839505", "0.58324975", "0.5825632", "0.5825177", "0.58239615", "0.5821528", "0.58196014", "0.58135474", "0.58086604", "0.5808147", "0.58075655", "0.5807235", "0.5806787", "0.5803223", "0.5801626", "0.579513", "0.57862675" ]
0.0
-1
/ShowUserMessage.showUserMessage(activity ,"Please connect to internet!");
public void internetConnectionProble() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showNetErrorMessage() {\n showMessage(R.string.ic_net_error_tipinfo);\n }", "private void ShowNoInternetConnection(){\n StopWhaitSpinner();\n //There was an error show error message\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(R.string.recconnecting_request)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_button, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n startActivity(new Intent(getContext(), MainActivity.class));\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n\n }", "private void showMessage(String string) {\n\n }", "@Override\n\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\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.show();\n\n\t\t\t\t\t\t\t\t\t\t\t}", "private void promptInternetConnect() {\n android.support.v7.app.AlertDialog.Builder builder = new android.support.v7.app.AlertDialog.Builder(AdminHomePage.this);\n builder.setTitle(R.string.title_alert_no_intenet);\n builder.setMessage(R.string.msg_alert_no_internet);\n String positiveText = getString(R.string.btn_label_refresh);\n builder.setPositiveButton(positiveText,\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n //Block the Application Execution until user grants the permissions\n if (startStep2(dialog)) {\n //Now make sure about location permission.\n if (checkPermissions()) {\n //Step 2: Start the Location Monitor Service\n //Everything is there to start the service.\n startStep3();\n } else if (!checkPermissions()) {\n requestPermissions();\n }\n }\n }\n });\n android.support.v7.app.AlertDialog dialog = builder.create();\n dialog.show();\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tR.string.No_Internet_Connection,\n\t\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\t\t\t\t\t\t\t}", "public void ShowNoInternetDialog() {\r\n showAlertDialog(LoginUserActivity.this, getResources().getString(R.string.text_no_internet_connection),\r\n getResources().getString(R.string.text_please_check_your_network), false);\r\n }", "public void showMessage(String message);", "void showAlert(String message);", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "@SuppressLint(\"SetTextI18n\")\n private void showSnack(boolean isConnected) {\n if (isConnected) {\n\n getWiFiInternet();\n\n } else {\n\n android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this, R.style.MyAlertDialogStyle);\n builder.setCancelable(false);\n builder.setMessage(\"Internet Connection Required\");\n builder.setPositiveButton(\"Retry\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //if user pressed \"yes\", then he is allowed to exit from application\n Intent intent = getIntent();\n finish();\n startActivity(intent);\n }\n });\n android.app.AlertDialog alert = builder.create();\n alert.show();\n\n }\n\n }", "public void displayWelcomeMsg();", "public void enviarAlertaDeQueEstaOnline(){\n //mandaria un mail a los usuarios avisando que ya esta disponible para ver.\n System.out.println(\"Enviando mail con url \" + this.url);\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n if (dialog != null)\n dialog.dismiss();\n\n //Display appropriate toast message depending upon internet connectivity was a reason for failure or something else..\n if(ConstantsDefined.isOnline(ForgotPassword.this)){\n Toast.makeText(ForgotPassword.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(ForgotPassword.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "public String userSendMessage(){\r\n if( porukeBeanLocal.userSendMessage(userName, email, question)){\r\n return \"Success\";\r\n }\r\n return \"Failure\";\r\n }", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message =getString(R.string.back_online);\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS);\n } else {\n message =getString(R.string.you_are_offline);\n TastyToast.makeText(getApplicationContext(), message, TastyToast.LENGTH_LONG, TastyToast.ERROR);\n }\n }", "public void showMsg(String str);", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\tR.string.No_Internet_Connection, Toast.LENGTH_SHORT)\n\t\t\t\t\t\t\t.show();\n\t\t\t\t}", "@Override\n public void run() {\n Constant.showToast(getActivity().getResources().getString(R.string.internet), getActivity());\n }", "@Override\n public void run() {\n Constant.showToast(getActivity().getResources().getString(R.string.internet), getActivity());\n }", "private void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message =getString(R.string.back_online);\n TastyToast.makeText(getActivity(), message, TastyToast.LENGTH_SHORT, TastyToast.SUCCESS);\n } else {\n message =getString(R.string.you_are_offline);\n TastyToast.makeText(getActivity(), message, TastyToast.LENGTH_LONG, TastyToast.ERROR);\n }\n }", "private void showMsg1(String string) { TODO Auto-generated method stub\n//\n }", "private void showMsg1(String string) { TODO Auto-generated method stub\n//\n }", "private void getinternet() {\n\t\talertDialogBuilder.setTitle(\"Internet services disabled\");\n alertDialogBuilder.setMessage(\"Nearby police station needs access to internet and gps. Please turn on internet & location access.\")\n \n .setCancelable(false)\n .setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener(){\n public void onClick(DialogInterface dialog, int id){\n startActivity(new Intent(getApplicationContext(),Main.class));\n }\n });\n AlertDialog alert = alertDialogBuilder.create();\n alert.show();\n \n\t}", "int displayNotification(Message message);", "@SuppressWarnings(\"deprecation\")\r\n\tpublic void showNetworkDialog(final String message) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\t\tbuilder.setTitle(getResources().getString(R.string.app_name));\r\n\t\tif (message.equals(\"gps\")) {\r\n\t\t\tbuilder.setMessage(getResources().getString(R.string.gps_message));\r\n\t\t} else if (message.equals(\"internet\")) {\r\n\t\t\tbuilder.setMessage(getResources().getString(R.string.net_message));\r\n\t\t}\r\n\t\tAlertDialog alert = builder.create();\r\n\t\talert.setButton(\"OK\", new DialogInterface.OnClickListener() {\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\tif (message.equals(\"gps\")) {\r\n\t\t\t\t\tIntent i = new Intent(\r\n\t\t\t\t\t\t\tandroid.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);\r\n\t\t\t\t\tstartActivityForResult(i, 1);\r\n\t\t\t\t} else if (message.equals(\"internet\")) {\r\n\t\t\t\t\tIntent i = new Intent(\r\n\t\t\t\t\t\t\tandroid.provider.Settings.ACTION_WIRELESS_SETTINGS);\r\n\t\t\t\t\tstartActivityForResult(i, 2);\r\n\t\t\t\t\tIntent i1 = new Intent(\r\n\t\t\t\t\t\t\tandroid.provider.Settings.ACTION_WIFI_SETTINGS);\r\n\t\t\t\t\tstartActivityForResult(i1, 3);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// do nothing\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t// Showing Alert Message\r\n\t\talert.show();\r\n\t}", "public void DisplayMessage(String massage);", "private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "void onMessageToast(String string);", "private void messageToUser(CharSequence text)\n {\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "void showToast(String message);", "void showToast(String message);", "@Override\n public void displayMessage(String message) {\n Toast.makeText(getActivity(),message,Toast.LENGTH_SHORT).show();\n }", "private void showNetworkAlert() {\n AlertDialog alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(\"Not connected\");\n alertDialog.setMessage(\"This application requires an internet connection.\");\n alertDialog.setIcon(R.drawable.wifi);\n alertDialog.setCanceledOnTouchOutside(false);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n finish();\n }\n });\n alertDialog.show();\n }", "void onOnlineLoginFail(User user);", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), \"Internet Is Inactive\", Toast.LENGTH_SHORT).show();\n\n }", "public void tingOnUI(final String msg) {\r\n\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void alertUser(int status){\r\n\r\n }", "public void noConnectivityAlert() {\n\t\tAlertDialog.Builder alert_box = new AlertDialog.Builder(this);\n\t\talert_box.setIcon(R.drawable.icon);\n\t\talert_box.setMessage(\"No network available, Please make sure you have Internet access to proceed.\");\n\t\talert_box.setPositiveButton(\"Quit\", new DialogInterface.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tfinish();\n\t\t\t\treturn;\n\t\t\t}\n\t\t});\n\t\talert_box.setNegativeButton(\"Retry\", new DialogInterface.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tif (!NetworkUtilities.isOnline(Sw_LoginScreenActivity.this)) {\n\t\t\t\t\tnoConnectivityAlert();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\talert_box.show();\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\r\n\t\t\t\tif (ConnectionActivity.isNetConnected(TrainerHomeActivity.this)) {\r\n\r\n\t\t\t\t\tmakeClientMissed();\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\td.showSingleButtonDialog(TrainerHomeActivity.this,\r\n\t\t\t\t\t\t\t\"Please enable your internet connection\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void showAlert(){\n MainActivity.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "public void message(String message){\n Toast.makeText(getContext(),message,Toast.LENGTH_SHORT).show();\n }", "public void tongOnUI(final String msg) {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n if (ConstantsDefined.isOnline(AllSectionsSummary.this)) {\n //Do nothing..\n Toast.makeText(AllSectionsSummary.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(AllSectionsSummary.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }", "public void showAlert(){\n Loguin.this.runOnUiThread(new Runnable() {\n public void run() {\n AlertDialog.Builder builder = new AlertDialog.Builder(Loguin.this);\n builder.setTitle(\"Login Error.\");\n builder.setMessage(\"User not Found.\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n });\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n if (ConstantsDefined.isOnline(AllSectionsSummary.this)) {\n //Do nothing..\n Toast.makeText(AllSectionsSummary.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(AllSectionsSummary.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onErrorResponse(VolleyError error) {\n if (ConstantsDefined.isOnline(AllSectionsSummary.this)) {\n //Do nothing..\n Toast.makeText(AllSectionsSummary.this, \"Couldn't connect..Please try again..\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(AllSectionsSummary.this, \"Sorry! No internet connection\", Toast.LENGTH_SHORT).show();\n }\n }", "private void toastmessage(String message){\n Toast.makeText(Accountinfo.this,message,Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(Call call, IOException e) {\n TemoignageActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(TemoignageActivity.this, R.string.no_internet, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onClick(View v) {\n try {\n message = etMessage.getText().toString();\n if(mService != null){\n if (ouserStat){\n //dout.writeUTF(wUser + \"SendTo@*@~\" + message);\n mService.writeMessage(wUser + \"SendTo@*@~\" + message);\n etMessage.setText(\"\");\n talk.insert(\"I said : \" + message, 0);\n //talk.add(\"I said : \" + message);\n }\n else{\n mService.writeMessage(wUser + \"OfMsg@*@~\" + message);\n etMessage.setText(\"\");\n talk.insert(\"I said : \" + message + \" \\n(\" + wUser + \" is offline for now.\\n He'll receive ur message when he comes online.)\\n\", 0);\n //dout.writeUTF(to + \"OfMsg@*@~\"+message);\n }\n }\n else{\n talk.insert(\"Connection Problem.. Wait\", 0);\n //talk.add(\"Connection Problem.. Wait\");\n }\n } catch (IOException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n System.out.println(\"Ezio Problem Found in writing in Chat Fragment\");\n updateStatus(false);\n }\n }", "private void displayMessage(String message) {\n Log.d(\"Method\", \"displayMessage()\");\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnect(boolean isSuccessful, String message) {\n if (isSuccessful) {\n Toast.makeText(applicationContext,\n String.format(getString(R.string.data_transfer_waiting),\n ROOM_NAME), Toast.LENGTH_LONG).show();\n } else {\n Log.d(TAG, \"Skylink failed to connect!\");\n Toast.makeText(parentActivity, \"Skylink failed to connect!\\nReason : \"\n + message, Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\tpublic void connectionFailed(String message) {\n\t\tToast.makeText(this, \"Connection Failed !\", Toast.LENGTH_SHORT).show();\n\t}", "public void showWinMessage() {\n\n\t}", "private void showFeedback(String message) {\n if (myHost != null) {\n myHost.showFeedback(message);\n } else {\n System.out.println(message);\n }\n }", "private void showFeedback(String message) {\n if (myHost != null) {\n myHost.showFeedback(message);\n } else {\n System.out.println(message);\n }\n }", "@Override\n public void onClick(View v) {\n if (username.getText().length() != 0 && username.getText().toString() != \"\")\n {\n //Check if password control is not empty\n if (password.getText().length() != 0 && password.getText().toString() != \"\")\n {\n // get Internet status\n isConnectionExist = cd.checkInternet();\n\n if(isConnectionExist) {\n usernam = username.getText().toString();\n passwor = password.getText().toString();\n\n loadingProgressBar.setVisibility(View.VISIBLE);\n\n //Create instance for AsyncCallWS\n AsyncCallWS task = new AsyncCallWS();\n //Call execute\n task.execute();\n }else{\n username.setText(\"\");\n password.setText(\"\");\n // Internet connection doesn't exist\n head.showAlertDialog(LoginActivity.this, \"No Internet Connection\", \"Your device doesn't have internet access\", false);\n\n }\n\n\n }else{\n password.requestFocus();\n head.showAlertDialog(LoginActivity.this, \"Empty Password \", \"Please fill all the fields\", false);\n\n }\n\n\n }else{\n username.requestFocus();\n head.showAlertDialog(LoginActivity.this, \"Empty USER ID \", \"Please fill all the fields\", false);\n\n }\n\n }", "public void onActive() {\n Methods.showMessage(\"Warning\", \"Welcome Back!\", \"Please Continue Filling Out Your Questionanire!\");\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "void displayMessage(String message);", "public abstract void showMessageBox(String message);", "public void showMessage(String text)\n {\n Toast.makeText(this, text, Toast.LENGTH_SHORT).show();\n }", "private void displayPromptForEnablingInternet() {\n final AlertDialog.Builder builder =\n new AlertDialog.Builder(getActivity());\n final String actionWifiSettings = Settings.ACTION_WIFI_SETTINGS;\n final String actionWirelessSettings = Settings.ACTION_WIRELESS_SETTINGS;\n final String message = getString(R.string.enable_network);\n\n builder.setMessage(message)\n .setPositiveButton(getString(R.string.bt_wifi),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int idButton) {\n getActivity().startActivity(new Intent(actionWifiSettings));\n dialog.dismiss();\n }\n })\n .setNegativeButton(getString(R.string.bt_mobile_network),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int idButton) {\n getActivity().startActivity(new Intent(actionWirelessSettings));\n dialog.dismiss();\n }\n })\n .setNeutralButton(getString(R.string.bt_cancel),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int idButton) {\n dialog.cancel();\n }\n });\n builder.create().show();\n }", "public void showMessage(String message){\n Toast.makeText(getContext(), message, Toast.LENGTH_LONG).show();\n }", "@Override\n public void run() {\n showToast(\"请检查您的网络\");\n }", "@Override\r\n public void handleMessage(Message msg) {\n Context context=mContext.get();\r\n try {\r\n switch (msg.what) {\r\n case -1:\r\n Toast.makeText(context, String.format(\"Exception: %s\", (String) msg.obj), Toast.LENGTH_LONG).show();\r\n break;\r\n case -2:\r\n Toast.makeText(context, (String) msg.obj, Toast.LENGTH_LONG).show();\r\n break;\r\n case -3:\r\n Toast.makeText(context, \"keine Internetverbindung\", Toast.LENGTH_LONG).show();\r\n break;\r\n }\r\n } catch(Exception ex) {\r\n Toast.makeText(context, String.format(\"Exception: %s\", ex.getMessage()), Toast.LENGTH_LONG).show();\r\n }\r\n }", "public interface I_ShowBlueSend {\n /**蓝牙连接提示*/\n void showMessage(String message);\n}", "@Override\r\n\t\t\tprotected Boolean doInBackground(Void... arg0) {\n\t\t\t\ttry{\r\n\t\t\t\t\tfinal String splashMessageUrl = getResources().getString(R.string.websit) + \"?phone_id=\" + uniqueId + \"&which_use=1\";\r\n\t\t\t\t\tLog.v(\"splashMessageUrl\",splashMessageUrl);\r\n\t\t\t\t\tString splashReturnMessage = HttpClientConnector.getStringByUrl(splashMessageUrl);\r\n\t\t\t\t\tif(splashReturnMessage != \"\"&&splashReturnMessage!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsplashMessage = SplashMessageParse.parse(splashReturnMessage);\r\n\t\t\t\t\t\tif(splashMessage != null)\r\n\t\t\t\t\t\treturn true;\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\treturn false;\r\n\t\t\t}", "public void Portal(View view) {\n cn = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);\n info = cn.getActiveNetworkInfo();\n if (info != null &&\n info.isAvailable() &&\n info.isConnected()){\n Intent intent = new Intent(this, webpage.class);\n intent.putExtra(\"url\",getString(R.string.portal_url));\n intent.putExtra(\"title\",getString(R.string.portal_header));\n startActivity(intent);\n }else{\n\n AlertDialog.Builder dialog = new AlertDialog.Builder(this);\n dialog.setTitle(getString(R.string.alert));\n dialog.setMessage(getString(R.string.network_warning));\n dialog.setNeutralButton(getString(R.string.okay), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n AlertDialog diag = dialog.create();\n diag.show();\n }\n\n }", "void showErrorMsg(String string);", "void showSyncFailMessage();", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "private void displayMessage(Profile profile) {\r\n if (profile != null) {\r\n\r\n //get the data from the profile\r\n // textView.setText(profile.getName() + profile.getFirstName() + profile.getName());\r\n\r\n // userSessionManager.AddData(profile.getName(), \"\",\"fb\");\r\n // accessTokenTracker.stopTracking();\r\n // profileTracker.stopTracking();\r\n\r\n //take\r\n // Intent i = new Intent(getActivity(), MyProfileActivity.class);\r\n\r\n // startActivity(i);\r\n //((Activity) getActivity()).overridePendingTransition(0, 0);\r\n }\r\n }", "private void showAlert(String message) {\n //Builds an AlertDialog with message, title, if cancellable, and what the positive button does\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(message).setTitle(\"Response from Servers\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // do nothing\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n// String errorMessage = null;\n// try {\n// JSONObject arr = new JSONObject(message);\n// errorMessage = arr.getString(\"error\");\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// Toast.makeText(getActivity(), errorMessage, Toast.LENGTH_LONG).show();\n\n }", "void displayMessage(){\r\n Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT);\r\n toast.show();\r\n }", "public void showSnack(boolean isConnected) {\n String message;\n int color;\n if (isConnected) {\n message = \"Good! Connected to Internet\";\n color = Color.WHITE;\n getUserLocation();\n } else {\n message = \"Sorry! Not connected to internet\";\n color = Color.RED;\n }\n\n Snackbar snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n\n View sbView = snackbar.getView();\n// TextView textView = (TextView) sbView.findViewById(a);\n// textView.setTextColor(color);\n snackbar.show();\n }", "public void OnRtcLiveApplyLine(String strPeerId, String strUserName, String strBrief);", "public void showNoInternetConnectionDialog(){\n \t\tContext mContext = getApplicationContext();\n \t\tDialog dialog = new Dialog(mContext);\n \n \t\tdialog.setContentView(R.layout.no_internet_connection_dialog);\n \t\tdialog.setTitle(\"You don't have internet connection\");\n \n \t\tTextView text = (TextView) dialog.findViewById(R.id.no_internet_connection_text);\n \t\ttext.setText(\"Whoops! Its seems you don't have internet connection, please try again!\");\n \t\tImageView image = (ImageView) dialog.findViewById(R.id.stop_png);\n \t\timage.setImageResource(R.drawable.stop_mdpi);\n \t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n \t\tbuilder.setCancelable(false)\n \t\t .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n \t\t public void onClick(DialogInterface dialog, int id) {\n \t\t ViewTasksActivity.this.finish();\n \t\t }\n \t\t })\n \t\t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n \t\t public void onClick(DialogInterface dialog, int id) {\n \t\t dialog.cancel();\n \t\t }\n \t\t });\n \t\tAlertDialog alert = builder.create();\n \t}", "void onOnlineLoginSuccess(User user);", "public void btnHelpClick(){\n try {\n String Tag = TAG + \"-BtnHelp\";\n // Get number\n String number = getMyPhoneNO();\n ReceiveMessageThread receiveMessageThread;\n // Mount the message to be sent\n String msg = \"*SOS*;Number:\" + number + \";\";\n Log.i(Tag, msg);\n // Show message to user\n showProgressDialog(\"Sending distress message...\");\n // Disable Help Button\n btn_help.setEnabled(false);\n // Start thread to send message\n receiveMessageThread = new ReceiveMessageThread(msgHandler, msg);\n receiveMessageThread.start();\n }\n catch (Exception e){\n Log.i(TAG , \"Caught this exception: \" + e.getMessage());\n }\n }", "public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tswitch (msg.what) {\n\t\t\tcase ViewUtils.NET_ERROR:\n\t\t\t\tShow.toast(getApplicationContext(), \"网络错误,请检查网络是否畅通!\");\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsuper.handleMessage(msg);\n\t\t}", "public void showComingSoonMessage() {\n showToastMessage(\"Coming soon!\");\n }", "protected void TextHttp() {\n\t\tLoginBean loginb = new LoginBean();\n\t\tloginb.setPhone(\"15236290644\");\n\t\tActivityDataRequest.getLoginCheck(TagConfig.TAG_MSG,this, loginb);\n\t\t\n\t\tLoginBean loginb2 = new LoginBean();\n\t\tloginb2.setPhone(\"15631001601\");\n\t\tActivityDataRequest.getLoginCheck(2,this, loginb2);\n\t\t\n\t}", "private void notConnectedDialog() {\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(mContext);\n alertDialogBuilder.setTitle(mContext.getResources().getString(R.string.not_connected_title));\n alertDialogBuilder.setCancelable(false);\n alertDialogBuilder.setMessage(mContext.getResources().getString(R.string.not_connected_message));\n\n alertDialogBuilder.setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface arg0, int arg1) {\n alertDialog.dismiss();\n finish();\n }\n });\n\n alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n\n }", "public static String _activity_pause(boolean _userclosed) throws Exception{\nreturn \"\";\n}", "public static String _activity_pause(boolean _userclosed) throws Exception{\nreturn \"\";\n}", "public static String _activity_pause(boolean _userclosed) throws Exception{\nreturn \"\";\n}", "private void showSnackBar(String message) {\n }", "public static void displayMsg() {\n\t}", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private String getMessage() {\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\r\n\t\t\r\n\t\tboolean addSign = prefs.getBoolean(\"addsign\", true);\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\tdefMessage = \"I am busy right now and will call you latter.\";\r\n\t\t\r\n\t\tfinalMessage = prefs.getString(\"message\", defMessage);\r\n\t\tif(finalMessage.equals(\"\"))\r\n\t\t\tfinalMessage = defMessage;\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tfinalMessage = defMessage;\r\n\t\t}\r\n\t\t\r\n\t\tif(addSign)\r\n\t\t\tfinalMessage += \"\\nSent using Calls and SMS Blocker for android.\\nDownload from: https://play.google.com/store/apps/details?id=com.atiffarrukh.callandsmsblocker\";\r\n\t\treturn finalMessage;\r\n\t}", "@Override\n public void gotUsersError(String message) {\n disableButton.setEnabled(true);\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "public void OnConnectSuccess();" ]
[ "0.66216606", "0.66069865", "0.64546674", "0.64262676", "0.6367588", "0.6317956", "0.62898874", "0.62861323", "0.62826717", "0.62709635", "0.625535", "0.6230665", "0.6213937", "0.61465883", "0.6140704", "0.6122773", "0.61051357", "0.61045796", "0.60985214", "0.60985214", "0.6078854", "0.6077441", "0.6077441", "0.6059461", "0.6036495", "0.6035972", "0.6025091", "0.6013805", "0.6004149", "0.59945756", "0.5993028", "0.5993028", "0.5992643", "0.5990757", "0.5979753", "0.5977783", "0.5962651", "0.59607196", "0.595209", "0.5937392", "0.5929005", "0.5925606", "0.5923315", "0.59195954", "0.5916241", "0.5916241", "0.59133554", "0.59123385", "0.5904289", "0.58976996", "0.58976996", "0.5879303", "0.5869894", "0.58624357", "0.5857837", "0.58546233", "0.5851954", "0.5839179", "0.58381027", "0.58381027", "0.5829", "0.58272684", "0.5824451", "0.5824451", "0.5824451", "0.5823615", "0.58191776", "0.5818007", "0.581294", "0.58064574", "0.5774543", "0.5770992", "0.57579976", "0.57548153", "0.5754064", "0.57518", "0.5744369", "0.5744097", "0.57427937", "0.5741579", "0.5740774", "0.5739677", "0.5739272", "0.5735134", "0.57343304", "0.5734274", "0.57330334", "0.5732873", "0.5729905", "0.5729506", "0.572367", "0.57190907", "0.57190907", "0.57190907", "0.5718527", "0.571711", "0.5713286", "0.5713286", "0.5699239", "0.5698203", "0.5695736" ]
0.0
-1
Check if we have write permission
public static boolean verifyStoragePermissions(Activity activity) { int permission = ActivityCompat.checkSelfPermission(activity, Manifest.permission.WRITE_EXTERNAL_STORAGE); if (permission != PackageManager.PERMISSION_GRANTED) { // We don't have permission so prompt the user ActivityCompat.requestPermissions( activity, PERMISSIONS_STORAGE, REQUEST_EXTERNAL_STORAGE ); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isWritePermissionGranted();", "boolean isWriteAccess();", "boolean canWrite();", "int getPermissionWrite();", "public boolean isWriteable();", "private boolean isWriteStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "public boolean checkWritePermission(final DataBucketBean bucket) {\r\n\t\t\treturn checkPermission(bucket, SecurityService.ACTION_READ_WRITE);\r\n\t\t}", "private boolean checkReadWritePermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) {\n return true;\n } else {\n ActivityCompat.requestPermissions(PanAadharResultActivity.this, new String[]{Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 111);\n return false;\n }\n }\n\n return false;\n }", "public boolean isWritable() {\n return accessControl != null && accessControl.getOpenStatus().isOpen() && !sandboxed;\n }", "public boolean canWrite() {\n\t\treturn Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());\n\t}", "private static boolean checkFsWritable() {\n String directoryName = Environment.getExternalStorageDirectory().toString() + \"/DCIM\";\n File directory = new File(directoryName);\n if (!directory.isDirectory()) {\n if (!directory.mkdirs()) {\n return false;\n }\n }\n return directory.canWrite();\n }", "private boolean hasExternalStorageReadWritePermission() {\n return ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED\n && ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED;\n }", "@Override\n\tpublic boolean getCanWrite()\n\t{\n\t\treturn false;\n\t}", "public static boolean isWriteStorageAllowed(FragmentActivity act) {\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "private boolean isReadStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "@Override\n\tpublic boolean isWritable() {\n\t\treturn (Files.isWritable(this.path) && !Files.isDirectory(this.path));\n\t}", "boolean isWritable();", "public static boolean setWriteable(File f) {\n if(!f.exists())\n return true;\n\n // non Windows-based systems return the wrong value\n // for canWrite when the argument is a directory --\n // writing is based on the 'x' attribute, not the 'w'\n // attribute for directories.\n if(f.canWrite()) {\n if(!f.isDirectory())\n return true;\n }\n \n String fName;\n try {\n fName = f.getCanonicalPath();\n } catch(IOException ioe) {\n fName = f.getPath();\n }\n \n String cmds[] = null;\n if(f.isDirectory())\n cmds = new String[] { \"chmod\", \"u+w+x\", fName };\n else\n cmds = new String[] { \"chmod\", \"u+w\", fName};\n \n if( cmds != null ) {\n try { \n Process p = Runtime.getRuntime().exec(cmds);\n p.waitFor();\n }\n catch(SecurityException ignored) { }\n catch(IOException ignored) { }\n catch(InterruptedException ignored) { }\n }\n \n\t\treturn f.canWrite();\n }", "public boolean canReadAndWrite() {\n\t\t//We can read and write in any state that we can read.\n\t\treturn canWrite();\n\t}", "private boolean checkPermission() {\r\n int result = ContextCompat.checkSelfPermission(UniformDrawer.this, android.Manifest.permission.WRITE_EXTERNAL_STORAGE);\r\n if (result == PackageManager.PERMISSION_GRANTED) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "@Override\n\tpublic boolean isReadWrite() {\n\t\treturn true;\n\t}", "public static boolean sdAvailableWrite() {\n\t\tboolean sdAccessWrite = false;\n\n\t\t// Comprobamos el estado de la memoria externa (tarjeta SD)\n\t\tString state = Environment.getExternalStorageState();\n\n\t\tif (state.equals(Environment.MEDIA_MOUNTED)) {\n\t\t\tsdAccessWrite = true;\n\t\t} else if (state.equals(Environment.MEDIA_MOUNTED_READ_ONLY)) {\n\t\t\tsdAccessWrite = false;\n\t\t} else {\n\t\t\tsdAccessWrite = false;\n\t\t}\n\t\treturn sdAccessWrite;\n\t}", "public static boolean Writeable(File Folder) {\n\t\tboolean Check;\n\t\tif (Folder.canWrite() == true) {\n\t\t\tCheck = true;\n\t\t} else {\n\t\t\tCheck = false;\n\t\t}\n\t\treturn Check;\n\t}", "@Override\n public boolean hasWriteAccess() {\n if (this.employmentDate.isAfter(LocalDate.now().minusMonths(6))) {\n return false;\n } else {\n return true;\n }\n }", "private boolean checkPermissionStorage() {\n\n boolean isPermissionGranted = true;\n\n int permissionStorage = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n if (permissionStorage != PackageManager.PERMISSION_GRANTED)\n {\n isPermissionGranted = false;\n }\n\n return isPermissionGranted;\n }", "private boolean isExternalStorageWritable(){\r\n if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {\r\n Log.i(\"State\", \"Yes, it is writable!\");\r\n return true;\r\n } else{\r\n return false;\r\n }\r\n }", "private boolean checkPermissions() {\n\n if (!isExternalStorageReadable() || !isExternalStorageReadable()) {\n Toast.makeText(this, \"This app only works on devices with usable external storage.\",\n Toast.LENGTH_SHORT).show();\n return false;\n }\n\n int permissionCheck = ContextCompat.checkSelfPermission(this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE);\n if (permissionCheck != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n REQUEST_PERMISSION_WRITE);\n return false;\n } else {\n return true;\n }\n }", "private static void checkAccess(File directory, boolean isWriteable) throws IOException {\n if(!directory.exists()) {\n if(directory.mkdirs()) {\n logger.debug(\"Created directory [{}]\", directory.getCanonicalPath());\n } else {\n throw new IOException(\"Could not create directory \" +\n \"[\"+directory.getCanonicalPath()+\"], \" +\n \"make sure you have the proper \" +\n \"permissions to create, read & write \" +\n \"to the file system\");\n }\n }\n // Find if we can write to the record root directory\n if(!directory.canRead())\n throw new IOException(\"Cant read from : \"+directory.getCanonicalPath());\n if(isWriteable) {\n if(!directory.canWrite())\n throw new IOException(\"Cant write to : \"+directory.getCanonicalPath());\n }\n }", "public boolean isWritable(int tid, int varIndex) {\n if (!hasConflict(tid, varIndex, Lock.Type.WRITE)) {\n setLock(tid, varIndex, Lock.Type.WRITE);\n _accessedTransactions.add(tid);\n return true;\n } else {\n return false;\n }\n }", "public boolean isWritable() {\r\n\t\treturn isWritable;\r\n\t}", "public static boolean isWriteExternalStorageAllowed(FragmentActivity act) {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(act, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "private boolean isReadStorageAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\n int write = ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED && write == PackageManager.PERMISSION_DENIED) {\n return true;\n } else {\n\n //If permission is not granted returning false\n return false;\n }\n }", "public static boolean canWriteOnExternalStorage() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean canWrite(Transaction.TransactionType t, Operation o) {\n if (!isActive || Transaction.TransactionType.READ_ONLY.equals(t) ||\n !variables.containsKey(o.getVariableId())) {\n return false;\n }\n return lockManagers.get(o.getVariableId()).canAcquireLock(o.getType(), o.getTransactionId());\n }", "public boolean isWritable() {\n return false;\n }", "public boolean canReadWriteOnMyLatestView()\n {\n \t \treturn getAccessBit(2);\n }", "@Override\n public boolean canEdit(Context context, Item item) throws java.sql.SQLException\n {\n // can this person write to the item?\n return authorizeService.authorizeActionBoolean(context, item, Constants.WRITE, true);\n }", "boolean isReadAccess();", "public boolean CheckPermissions() {\n int result = ContextCompat.checkSelfPermission(getApplicationContext(), WRITE_EXTERNAL_STORAGE);\r\n int result1 = ContextCompat.checkSelfPermission(getApplicationContext(), RECORD_AUDIO);\r\n return result == PackageManager.PERMISSION_GRANTED && result1 == PackageManager.PERMISSION_GRANTED;\r\n }", "private boolean checkSelfPermission() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE}, MainActivity.PERMISSION_REQ_ID_WRITE_EXTERNAL_STORAGE);\n return false;\n }\n return true;\n }", "public boolean isUpdateRight() {\r\n if (getUser() != null) {\r\n return getUser().hasPermission(\"/vocabularies\", \"u\");\r\n }\r\n return false;\r\n }", "private boolean mayRequestStoragePermission() {\r\n\r\n if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M)\r\n return true;\r\n\r\n if((checkSelfPermission(WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED) &&\r\n (checkSelfPermission(CAMERA) == PackageManager.PERMISSION_GRANTED))\r\n return true;\r\n\r\n if((shouldShowRequestPermissionRationale(WRITE_EXTERNAL_STORAGE)) || (shouldShowRequestPermissionRationale(CAMERA))){\r\n Snackbar.make(mRlView, \"Los permisos son necesarios para poder usar la aplicación\",\r\n Snackbar.LENGTH_INDEFINITE).setAction(android.R.string.ok, new View.OnClickListener() {\r\n @TargetApi(Build.VERSION_CODES.M)\r\n @Override\r\n public void onClick(View v) {\r\n requestPermissions(new String[]{WRITE_EXTERNAL_STORAGE, CAMERA}, MY_PERMISSIONS);\r\n }\r\n });\r\n }else{\r\n requestPermissions(new String[]{WRITE_EXTERNAL_STORAGE, CAMERA}, MY_PERMISSIONS);\r\n }\r\n\r\n return false;\r\n }", "int getPermissionRead();", "public final boolean canWriteFile(long offset, long len, int pid) {\n\t\t\n\t\t//\tCheck if the lock list is valid\n\t\t\n\t\tif ( m_lockList == null)\n\t\t\treturn true;\n\t\t\t\n\t\t//\tCheck if the file section is writeable by the specified process\n\n\t\tboolean writeOK = false;\n\t\t\t\t\n\t\tsynchronized ( m_lockList) {\n\n\t\t\t//\tCheck if the file section is writeable\n\t\t\t\n\t\t\twriteOK = m_lockList.canWriteFile(offset, len, pid);\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t//\tReturn the write status\n\t\t\n\t\treturn writeOK;\n\t}", "private boolean checkPermissions() {\n if (!read_external_storage_granted ||\n !write_external_storage_granted ||\n !write_external_storage_granted) {\n Toast.makeText(getApplicationContext(), \"Die App braucht Zugang zur Kamera und zum Speicher.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "protected final void checkWriteable()\n {\n if( m_readOnly )\n {\n final String message =\n \"Resource (\" + this + \") is read only and can not be modified\";\n throw new IllegalStateException( message );\n }\n }", "public static boolean isExternalStorageWritable()\n\t{\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "boolean isHasPermissions();", "private static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "private void requestWriteStoragePermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n //show explanation to user\n Toast.makeText(this, \"Write storage permission is needed to save photos/videos\", Toast.LENGTH_LONG).show();\n //request the permission\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n WRITE_EXTERNAL_STORAGE_CODE);\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n WRITE_EXTERNAL_STORAGE_CODE);\n\n // WRITE_EXTERNAL_STORAGE_CODE is an\n // app-defined int constant. The onRequestPermissionsResult method gets the code\n }\n }", "public boolean ownWrite(Object data);", "private boolean hasEscalatingPrivilegesOnWrite(List<String> verbs, List<String> resources) {\n if (Collections.disjoint(verbs, EscalatingResources.ESCALATING_VERBS)) {\n return false;\n }\n\n return !Collections.disjoint(resources,\n EscalatingResources.ESCALATING_RESOURCES_ON_WRITE);\n }", "long getLastWriteAccess();", "private boolean validateAccess(String permission) {\n\t\tif (\"READ\".equalsIgnoreCase(permission)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasPerms()\n {\n return ContextCompat.checkSelfPermission(itsActivity, itsPerm) ==\n PackageManager.PERMISSION_GRANTED;\n }", "private boolean checkPermissions() {\n if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED && ContextCompat.checkSelfPermission(this,\n android.Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n return false;\n\n } else {\n return true;\n }\n }", "public int getUserModificationPermission() {\n return permission;\n }", "public boolean isExternalStorageWritable(){\n String state = Environment.getExternalStorageState();\n if(Environment.MEDIA_MOUNTED.equals(state)){\n return true;\n }\n return false;\n }", "boolean isUsedForWriting();", "private boolean permisos() {\n for(String permission : PERMISSION_REQUIRED) {\n if(ContextCompat.checkSelfPermission(getContext(), permission) != PackageManager.PERMISSION_GRANTED) {\n return false;\n }\n }\n return true;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state))\n return true;\n\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "static public boolean hasStorage(boolean requireWriteAccess) {\n String state = Environment.getExternalStorageState();\n Log.v(TAG, \"storage state is \" + state);\n\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n if (requireWriteAccess) {\n boolean writable = checkFsWritable();\n Log.v(TAG, \"storage writable is \" + writable);\n return writable;\n } else {\n return true;\n }\n } else if (!requireWriteAccess && Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {\n return true;\n }\n return false;\n }", "public static boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "private boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "private boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "private boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n return false;\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public boolean isExternalStorageWritable() {\n String state = Environment.getExternalStorageState();\n return Environment.MEDIA_MOUNTED.equals(state);\n }", "public boolean isExternalStorageWritable() {\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isExternalStorageWritable() {\n\t\tString state = Environment.getExternalStorageState();\n\t\tif (Environment.MEDIA_MOUNTED.equals(state)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean isExternalStorageWritable() {\n try {\n String state = Environment.getExternalStorageState();\n if (Environment.MEDIA_MOUNTED.equals(state)) {\n return true;\n }\n else\n {\n return false;\n }\n\n }\n catch (Exception ex)\n {\n return false;\n }\n }", "boolean isReadOnly();", "boolean isReadOnly();", "boolean needsStoragePermission();", "public boolean isExternalStorageWritable() {\r\n\t String state = Environment.getExternalStorageState();\r\n\t if (Environment.MEDIA_MOUNTED.equals(state)) {\r\n\t return true;\r\n\t }\r\n\t return false;\r\n\t}", "public boolean accesspermission()\n {\n AppOpsManager appOps = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);\n int mode = 0;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n mode = appOps.checkOpNoThrow(AppOpsManager.OPSTR_GET_USAGE_STATS,\n Process.myUid(),context.getPackageName());\n }\n if (mode == AppOpsManager.MODE_ALLOWED) {\n\n return true;\n }\n return false;\n\n }", "@Override\n public void checkPermission(Permission perm) {\n }", "private boolean isReadStorageAllowed() {\n //Getting the permission status\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE);\n\n //If permission is granted returning true\n if (result == PackageManager.PERMISSION_GRANTED)\n return true;\n\n //If permission is not granted returning false\n return false;\n }", "public final boolean needsPermission() {\n return FileUtil.needsPermission(this.form, this.resolvedPath);\n }", "@Override\n\tpublic boolean isWritable(int arg0) throws SQLException {\n\n\t\treturn true;\n\t}", "private boolean checkDeviceResourcePermissions() {\n // Check if the user agrees to access the microphone\n boolean hasMicrophonePermission = checkPermissions(\n Manifest.permission.RECORD_AUDIO,\n REQUEST_MICROPHONE);\n boolean hasWriteExternalStorage = checkPermissions(\n Manifest.permission.WRITE_EXTERNAL_STORAGE,\n REQUEST_EXTERNAL_PERMISSION);\n\n if (hasMicrophonePermission && hasWriteExternalStorage) {\n return true;\n } else {\n return false;\n }\n }", "boolean getDurableWrites();", "public abstract boolean canEditAccessRights(OwObject object_p) throws Exception;", "public boolean checkPermission(Permission permission);", "private void acquireExternalStorageWritePermissionIfNeeded() {\n if (!appHasExternalStorageWritePermission()) {\n\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(CameraIntent.this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n\n ActivityCompat.requestPermissions(CameraIntent.this,\n new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE},\n MY_PERMISSIONS_WRITE_EXTERNAL_STORAGE);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n }", "private static int check_fd_for_write(int fd) {\n int status = check_fd(fd);\n if (status < 0)\n return -1;\n\n FileDescriptor fileDescriptor = process.openFiles[fd];\n int flags = fileDescriptor.getFlags();\n if ((flags != O_WRONLY) &&\n (flags != O_RDWR)) {\n // return (EBADF) if the file is not open for writing\n process.errno = EBADF;\n return -1;\n }\n\n return 0;\n }", "@Override\n protected String requiredPutPermission() {\n return \"admin\";\n }", "public void checkPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO) +\n ContextCompat.checkSelfPermission(this, Manifest.permission.MODIFY_AUDIO_SETTINGS)\n != PackageManager.PERMISSION_GRANTED) {\n\n ActivityCompat.requestPermissions(this, perms, permsRequestCode);\n permissionGranted = false;\n } else {\n permissionGranted = true;\n }\n }", "public boolean isWritable() {\n return channel instanceof WritableByteChannel;\n }", "protected boolean hasMonitoringPermissions() {\r\n\t\tfinal Jenkins jenkins = Jenkins.getInstance();\r\n\t\treturn jenkins != null && jenkins.hasPermission(Jenkins.ADMINISTER);\r\n\t}", "private boolean checkPermission() {\n\n if ((ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE)\n != PackageManager.PERMISSION_GRANTED) &&\n (ContextCompat.checkSelfPermission(this,\n Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED)\n\n ) {\n\n // Permission is not granted\n return false;\n\n }\n return true;\n }" ]
[ "0.91002184", "0.8837875", "0.80668896", "0.8025014", "0.7775498", "0.7744576", "0.75648856", "0.75482327", "0.7270773", "0.726773", "0.72160375", "0.7176295", "0.70081687", "0.6936205", "0.68871886", "0.68650013", "0.6816225", "0.6807067", "0.6791372", "0.6704709", "0.6687911", "0.66805667", "0.6643553", "0.66402656", "0.66126794", "0.6540605", "0.65399015", "0.6518628", "0.6515421", "0.65089726", "0.6500992", "0.6500905", "0.6494779", "0.64932704", "0.647083", "0.64247346", "0.6406086", "0.63698536", "0.6365979", "0.63639235", "0.63412666", "0.63386816", "0.6328147", "0.6311325", "0.6300531", "0.629098", "0.6227138", "0.62251914", "0.6215881", "0.62059075", "0.62031215", "0.62024206", "0.6196236", "0.6194314", "0.6189806", "0.6158584", "0.61507994", "0.6131121", "0.6127257", "0.61269075", "0.61136824", "0.6102151", "0.60992056", "0.60992056", "0.60992056", "0.6095475", "0.6092256", "0.6084485", "0.6084485", "0.6084485", "0.6084485", "0.6084485", "0.6083929", "0.6083929", "0.6083929", "0.6080686", "0.6080686", "0.6080686", "0.6077385", "0.6077385", "0.60743326", "0.6072423", "0.6072423", "0.6046988", "0.6045772", "0.60303545", "0.6022029", "0.6010777", "0.60033596", "0.6002169", "0.59934795", "0.5991277", "0.5988273", "0.59756845", "0.59638983", "0.5962202", "0.5958626", "0.5941608", "0.59311527", "0.59306526", "0.5924164" ]
0.0
-1
Because app crashes sometimes without the try>catch
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { Log.d("Paul", "delete file"); File file = new File(Environment.getExternalStorageDirectory().getPath(), getString(R.string.temp_file_name)); try { // if file exists in memory if (file.exists()) { file.delete(); Log.d("Paul", "file deleted"); } } catch (Exception e) { Log.d("Paul","Some error happened?"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "public void run() {\n Toast.makeText(Pratisthan.this, \"Got Exception : see logcat \",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void run() {\n Log.e(\"Error\",\"Slot fetching failed\");\n }", "private void onLoadingError() {\n AppSession.showDataLoadError(\"conexus\");\n finish();\n }", "@Override\n public void onMachineBroken()\n {\n \n }", "public void crash() {\n\t\tgetPersistenceStrategy().crash();\n\t}", "private void inizia() throws Exception {\n }", "private void checkForCrashes()\r\n {\r\n ReportManager.checkForCrashes(this);\r\n }", "public final void mo60610a(Exception exc) {\n FeedImageViewHolder.this.mLineProgressBar.mo74362b();\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "private void inizia() throws Exception {\n }", "public void errorGettingEvent() {\n hideProgressBar();\n Log.e(Tag.FIREBASE_ERROR, \"Error getting the events\");\n// Toast.makeText(this, getText(R.string.can_not_load_event), Toast.LENGTH_SHORT).show();\n launchAndClose(new Intent(this, MainActivity.class));\n }", "public void uncaughtException(java.lang.Thread r11, java.lang.Throwable r12) {\n /*\n r10 = this;\n setJavaThreadCrashed()\n boolean r0 = com.zipow.videobox.mainboard.Mainboard.isNativeCrashed()\n if (r0 == 0) goto L_0x0011\n java.lang.Thread$UncaughtExceptionHandler r0 = r10.mNextHandler\n if (r0 == 0) goto L_0x0010\n r0.uncaughtException(r11, r12)\n L_0x0010:\n return\n L_0x0011:\n boolean r0 = r12 instanceof java.lang.UnsatisfiedLinkError\n if (r0 != 0) goto L_0x028e\n boolean r0 = r12 instanceof android.database.sqlite.SQLiteDiskIOException\n if (r0 == 0) goto L_0x001b\n goto L_0x028e\n L_0x001b:\n com.zipow.videobox.VideoBoxApplication r0 = com.zipow.videobox.VideoBoxApplication.getInstance()\n boolean r0 = r0.isConfApp()\n if (r0 == 0) goto L_0x0052\n us.zoom.androidlib.app.ZMActivity r0 = p021us.zoom.androidlib.app.ZMActivity.getFrontActivity()\n com.zipow.videobox.confapp.ConfUI r1 = com.zipow.videobox.confapp.ConfUI.getInstance()\n boolean r1 = r1.isLeaveComplete()\n if (r1 != 0) goto L_0x0043\n boolean r1 = r0 instanceof com.zipow.videobox.ConfActivity\n if (r1 == 0) goto L_0x0052\n boolean r1 = r0.isFinishing()\n if (r1 != 0) goto L_0x0043\n boolean r0 = p021us.zoom.androidlib.app.ZMActivity.isActivityDestroyed(r0)\n if (r0 == 0) goto L_0x0052\n L_0x0043:\n java.lang.String r11 = TAG\n java.lang.String r0 = \"\"\n android.util.Log.e(r11, r0, r12)\n com.zipow.videobox.VideoBoxApplication r11 = com.zipow.videobox.VideoBoxApplication.getInstance()\n r11.stopConfService()\n return\n L_0x0052:\n int r0 = android.os.Process.myPid()\n com.zipow.videobox.VideoBoxApplication r1 = com.zipow.videobox.VideoBoxApplication.getInstance()\n boolean r1 = r1.isConfApp()\n if (r1 == 0) goto L_0x0063\n java.lang.String r1 = \"zVideoApp\"\n goto L_0x0065\n L_0x0063:\n java.lang.String r1 = \"zChatApp\"\n L_0x0065:\n com.zipow.videobox.VideoBoxApplication r2 = com.zipow.videobox.VideoBoxApplication.getInstance()\n boolean r2 = com.zipow.videobox.util.ZMUtils.isItuneApp(r2)\n if (r2 == 0) goto L_0x0080\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n r2.append(r1)\n java.lang.String r1 = \"-intune\"\n r2.append(r1)\n java.lang.String r1 = r2.toString()\n L_0x0080:\n java.lang.String r2 = \"java-\"\n boolean r3 = r12 instanceof com.zipow.videobox.stabilility.NativeCrashException\n if (r3 == 0) goto L_0x0088\n java.lang.String r2 = \"native-zmdump-\"\n L_0x0088:\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n java.lang.String r5 = \"crash-\"\n r4.append(r5)\n r4.append(r2)\n java.lang.String r4 = r4.toString()\n java.lang.StringBuilder r5 = new java.lang.StringBuilder\n r5.<init>()\n java.lang.String r6 = \"-\"\n r5.append(r6)\n r5.append(r1)\n java.lang.String r1 = \"-\"\n r5.append(r1)\n r5.append(r0)\n java.lang.String r0 = \".log\"\n r5.append(r0)\n java.lang.String r0 = r5.toString()\n r1 = 5\n long r5 = java.lang.System.currentTimeMillis()\n java.io.File r0 = com.zipow.videobox.util.LogUtil.getNewLogFile(r4, r0, r1, r5)\n if (r0 != 0) goto L_0x00ca\n java.lang.Thread$UncaughtExceptionHandler r0 = r10.mNextHandler\n if (r0 == 0) goto L_0x00c9\n r0.uncaughtException(r11, r12)\n L_0x00c9:\n return\n L_0x00ca:\n r1 = 0\n boolean r4 = com.zipow.cmmlib.AppContext.BAASecurity_IsEnabled() // Catch:{ Exception -> 0x0192, all -> 0x018e }\n com.zipow.videobox.VideoBoxApplication r5 = com.zipow.videobox.VideoBoxApplication.getInstance() // Catch:{ Exception -> 0x0192, all -> 0x018e }\n boolean r5 = r5.isConfApp() // Catch:{ Exception -> 0x0192, all -> 0x018e }\n if (r5 == 0) goto L_0x00de\n com.zipow.videobox.stabilility.JavaCrashHandler$1 r5 = new com.zipow.videobox.stabilility.JavaCrashHandler$1 // Catch:{ Exception -> 0x0192, all -> 0x018e }\n r5.<init>() // Catch:{ Exception -> 0x0192, all -> 0x018e }\n L_0x00de:\n java.io.PrintStream r5 = new java.io.PrintStream // Catch:{ Exception -> 0x0192, all -> 0x018e }\n r5.<init>(r0) // Catch:{ Exception -> 0x0192, all -> 0x018e }\n java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ Exception -> 0x0193 }\n r6.<init>() // Catch:{ Exception -> 0x0193 }\n java.lang.String r7 = \"version: \"\n r6.append(r7) // Catch:{ Exception -> 0x0193 }\n com.zipow.videobox.VideoBoxApplication r7 = com.zipow.videobox.VideoBoxApplication.getInstance() // Catch:{ Exception -> 0x0193 }\n java.lang.String r7 = r7.getVersionName() // Catch:{ Exception -> 0x0193 }\n r6.append(r7) // Catch:{ Exception -> 0x0193 }\n java.lang.String r6 = r6.toString() // Catch:{ Exception -> 0x0193 }\n r5.println(r6) // Catch:{ Exception -> 0x0193 }\n java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ Exception -> 0x0193 }\n r6.<init>() // Catch:{ Exception -> 0x0193 }\n java.lang.String r7 = \"Kernel Version: \"\n r6.append(r7) // Catch:{ Exception -> 0x0193 }\n com.zipow.videobox.VideoBoxApplication r7 = com.zipow.videobox.VideoBoxApplication.getInstance() // Catch:{ Exception -> 0x0193 }\n java.lang.String r7 = r7.getKernelVersion() // Catch:{ Exception -> 0x0193 }\n r6.append(r7) // Catch:{ Exception -> 0x0193 }\n java.lang.String r6 = r6.toString() // Catch:{ Exception -> 0x0193 }\n r5.println(r6) // Catch:{ Exception -> 0x0193 }\n java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ Exception -> 0x0193 }\n r6.<init>() // Catch:{ Exception -> 0x0193 }\n java.lang.String r7 = \"OS: \"\n r6.append(r7) // Catch:{ Exception -> 0x0193 }\n java.lang.String r7 = com.zipow.videobox.ptapp.SystemInfoHelper.getOSInfo() // Catch:{ Exception -> 0x0193 }\n r6.append(r7) // Catch:{ Exception -> 0x0193 }\n java.lang.String r6 = r6.toString() // Catch:{ Exception -> 0x0193 }\n r5.println(r6) // Catch:{ Exception -> 0x0193 }\n if (r4 != 0) goto L_0x014d\n java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ Exception -> 0x0193 }\n r4.<init>() // Catch:{ Exception -> 0x0193 }\n java.lang.String r6 = \"Hardware: \"\n r4.append(r6) // Catch:{ Exception -> 0x0193 }\n java.lang.String r6 = com.zipow.videobox.ptapp.SystemInfoHelper.getHardwareInfo() // Catch:{ Exception -> 0x0193 }\n r4.append(r6) // Catch:{ Exception -> 0x0193 }\n java.lang.String r4 = r4.toString() // Catch:{ Exception -> 0x0193 }\n r5.println(r4) // Catch:{ Exception -> 0x0193 }\n L_0x014d:\n java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ Exception -> 0x0193 }\n r4.<init>() // Catch:{ Exception -> 0x0193 }\n java.lang.String r6 = \"IsProcessAtFront: \"\n r4.append(r6) // Catch:{ Exception -> 0x0193 }\n com.zipow.videobox.VideoBoxApplication r6 = com.zipow.videobox.VideoBoxApplication.getInstance() // Catch:{ Exception -> 0x0193 }\n boolean r6 = r6.isAtFront() // Catch:{ Exception -> 0x0193 }\n r4.append(r6) // Catch:{ Exception -> 0x0193 }\n java.lang.String r4 = r4.toString() // Catch:{ Exception -> 0x0193 }\n r5.println(r4) // Catch:{ Exception -> 0x0193 }\n java.lang.StringBuilder r4 = new java.lang.StringBuilder // Catch:{ Exception -> 0x0193 }\n r4.<init>() // Catch:{ Exception -> 0x0193 }\n java.lang.String r6 = \"IsRooted: \"\n r4.append(r6) // Catch:{ Exception -> 0x0193 }\n boolean r6 = p021us.zoom.androidlib.util.RootCheckUtils.isRooted() // Catch:{ Exception -> 0x0193 }\n r4.append(r6) // Catch:{ Exception -> 0x0193 }\n java.lang.String r4 = r4.toString() // Catch:{ Exception -> 0x0193 }\n r5.println(r4) // Catch:{ Exception -> 0x0193 }\n r5.println() // Catch:{ Exception -> 0x0193 }\n r12.printStackTrace(r5) // Catch:{ Exception -> 0x0193 }\n r5.flush() // Catch:{ Exception -> 0x019f }\n r5.close() // Catch:{ Exception -> 0x019f }\n goto L_0x019f\n L_0x018e:\n r11 = move-exception\n r5 = r1\n goto L_0x0285\n L_0x0192:\n r5 = r1\n L_0x0193:\n r0.delete() // Catch:{ all -> 0x0284 }\n if (r5 == 0) goto L_0x019e\n r5.flush() // Catch:{ Exception -> 0x019e }\n r5.close() // Catch:{ Exception -> 0x019e }\n L_0x019e:\n r0 = r1\n L_0x019f:\n if (r3 != 0) goto L_0x0227\n us.zoom.androidlib.app.ZMActivity r4 = p021us.zoom.androidlib.app.ZMActivity.getFrontActivity()\n if (r4 == 0) goto L_0x0227\n java.lang.String r5 = \"Fragment\"\n java.lang.String[] r5 = new java.lang.String[]{r5}\n if (r0 == 0) goto L_0x0212\n java.io.FileWriter r6 = new java.io.FileWriter // Catch:{ IOException -> 0x01fe, all -> 0x01e6 }\n r7 = 1\n r6.<init>(r0, r7) // Catch:{ IOException -> 0x01fe, all -> 0x01e6 }\n java.io.BufferedWriter r7 = new java.io.BufferedWriter // Catch:{ IOException -> 0x01e4, all -> 0x01e1 }\n r7.<init>(r6) // Catch:{ IOException -> 0x01e4, all -> 0x01e1 }\n java.io.PrintWriter r8 = new java.io.PrintWriter // Catch:{ IOException -> 0x01df, all -> 0x01dc }\n r8.<init>(r7) // Catch:{ IOException -> 0x01df, all -> 0x01dc }\n r8.println() // Catch:{ IOException -> 0x01da, all -> 0x01d8 }\n androidx.fragment.app.FragmentManager r1 = r4.getSupportFragmentManager() // Catch:{ IOException -> 0x01da, all -> 0x01d8 }\n if (r1 == 0) goto L_0x01d6\n androidx.fragment.app.FragmentManager r1 = r4.getSupportFragmentManager() // Catch:{ IOException -> 0x01da, all -> 0x01d8 }\n java.lang.String r4 = \"\"\n java.io.FileDescriptor r9 = new java.io.FileDescriptor // Catch:{ IOException -> 0x01da, all -> 0x01d8 }\n r9.<init>() // Catch:{ IOException -> 0x01da, all -> 0x01d8 }\n r1.dump(r4, r9, r8, r5) // Catch:{ IOException -> 0x01da, all -> 0x01d8 }\n L_0x01d6:\n r1 = r6\n goto L_0x0214\n L_0x01d8:\n r11 = move-exception\n goto L_0x01ea\n L_0x01da:\n goto L_0x0201\n L_0x01dc:\n r11 = move-exception\n r8 = r1\n goto L_0x01ea\n L_0x01df:\n r8 = r1\n goto L_0x0201\n L_0x01e1:\n r11 = move-exception\n r7 = r1\n goto L_0x01e9\n L_0x01e4:\n r7 = r1\n goto L_0x0200\n L_0x01e6:\n r11 = move-exception\n r6 = r1\n r7 = r6\n L_0x01e9:\n r8 = r7\n L_0x01ea:\n if (r6 == 0) goto L_0x01f1\n r6.close() // Catch:{ IOException -> 0x01f0 }\n goto L_0x01f1\n L_0x01f0:\n L_0x01f1:\n if (r7 == 0) goto L_0x01f8\n r7.close() // Catch:{ IOException -> 0x01f7 }\n goto L_0x01f8\n L_0x01f7:\n L_0x01f8:\n if (r8 == 0) goto L_0x01fd\n r8.close()\n L_0x01fd:\n throw r11\n L_0x01fe:\n r6 = r1\n r7 = r6\n L_0x0200:\n r8 = r7\n L_0x0201:\n if (r6 == 0) goto L_0x0208\n r6.close() // Catch:{ IOException -> 0x0207 }\n goto L_0x0208\n L_0x0207:\n L_0x0208:\n if (r7 == 0) goto L_0x020f\n r7.close() // Catch:{ IOException -> 0x020e }\n goto L_0x020f\n L_0x020e:\n L_0x020f:\n if (r8 == 0) goto L_0x0227\n goto L_0x0224\n L_0x0212:\n r7 = r1\n r8 = r7\n L_0x0214:\n if (r1 == 0) goto L_0x021b\n r1.close() // Catch:{ IOException -> 0x021a }\n goto L_0x021b\n L_0x021a:\n L_0x021b:\n if (r7 == 0) goto L_0x0222\n r7.close() // Catch:{ IOException -> 0x0221 }\n goto L_0x0222\n L_0x0221:\n L_0x0222:\n if (r8 == 0) goto L_0x0227\n L_0x0224:\n r8.close()\n L_0x0227:\n if (r0 == 0) goto L_0x0272\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r4 = com.zipow.cmmlib.AppUtil.getLogParentPath()\n r1.append(r4)\n java.lang.String r4 = \"/logs\"\n r1.append(r4)\n java.lang.String r1 = r1.toString()\n java.lang.StringBuilder r4 = new java.lang.StringBuilder\n r4.<init>()\n java.lang.String r5 = \"crash-\"\n r4.append(r5)\n r4.append(r2)\n java.lang.String r2 = r4.toString()\n boolean r1 = com.zipow.videobox.util.LogUtil.isSameCrashReported(r1, r0, r2)\n if (r1 == 0) goto L_0x0272\n java.io.File r1 = new java.io.File\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r4 = r0.getAbsolutePath()\n r2.append(r4)\n java.lang.String r4 = \".sent\"\n r2.append(r4)\n java.lang.String r2 = r2.toString()\n r1.<init>(r2)\n r0.renameTo(r1)\n L_0x0272:\n if (r3 == 0) goto L_0x027c\n com.zipow.videobox.VideoBoxApplication r11 = com.zipow.videobox.VideoBoxApplication.getInstance()\n r11.killCurrentProcess()\n goto L_0x0283\n L_0x027c:\n java.lang.Thread$UncaughtExceptionHandler r0 = r10.mNextHandler\n if (r0 == 0) goto L_0x0283\n r0.uncaughtException(r11, r12)\n L_0x0283:\n return\n L_0x0284:\n r11 = move-exception\n L_0x0285:\n if (r5 == 0) goto L_0x028d\n r5.flush() // Catch:{ Exception -> 0x028d }\n r5.close() // Catch:{ Exception -> 0x028d }\n L_0x028d:\n throw r11\n L_0x028e:\n java.lang.Thread$UncaughtExceptionHandler r0 = r10.mNextHandler\n if (r0 == 0) goto L_0x0295\n r0.uncaughtException(r11, r12)\n L_0x0295:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.zipow.videobox.stabilility.JavaCrashHandler.uncaughtException(java.lang.Thread, java.lang.Throwable):void\");\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n }", "@Override\n public void onCreateFailure(String s) {\n }", "@Override\n public void onCreateFailure(String s) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n Config.context.entry.crash();\n }", "@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Log.d(\"Error log\", \"Couldn't read from database\");\n }", "void checkExcn() throws Exception\n { This is called from the main thread context to re-throw any saved\n // exception.\n //\n if (ex != null) {\n throw ex;\n }\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "public void connectionError() {\n\n Log.w(\"Main Activity\", \"Connection error occured\");\n if (menuBool) {//did not manually tried to disconnect\n Log.d(\"Main Activity\", \"in the app\");\n menuBool = false;\n final MainActivity ac = this;\n runOnUiThread(new Runnable() {\n public void run() {\n Toast.makeText(getBaseContext(), getString(R.string.couldnotconnect), Toast.LENGTH_SHORT).show();\n //TextView rpm = (TextView) findViewById(R.id.rpm);\n //rpm.setText(\"0 BMP\");\n Spinner spinner1 = (Spinner) findViewById(R.id.spinner1);\n if (DataHandler.getInstance().getID() < spinner1.getCount())\n spinner1.setSelection(DataHandler.getInstance().getID());\n\n if (!h7) {\n\n Log.w(\"Main Activity\", \"starting H7 after error\");\n DataHandler.getInstance().setReader(null);\n DataHandler.getInstance().setH7(new H7ConnectThread((BluetoothDevice) pairedDevices.toArray()[DataHandler.getInstance().getID() - 1], ac));\n h7 = true;\n } else if (!normal) {\n Log.w(\"Main Activity\", \"Starting normal after error\");\n DataHandler.getInstance().setH7(null);\n DataHandler.getInstance().setReader(new ConnectThread((BluetoothDevice) pairedDevices.toArray()[DataHandler.getInstance().getID() - 1], ac));\n DataHandler.getInstance().getReader().start();\n normal = true;\n }\n }\n });\n }\n }", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tToast.makeText(mInflatedView.getContext(),\n\t\t\t\t\t\t\t\t\t\"Error IO \" + e.getMessage(),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}", "@Override\n public void onFailure(Call<ModelBase> call, Throwable e) {\n Log.e(\"onError\", \"yes \");\n e.printStackTrace();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"ERROR\",\"error aa gya\");\n }", "@Override\n public void onError() {\n Toast.makeText(getApplicationContext(), \"아이디랑 비밀번호를 확인해 주세요.\", Toast.LENGTH_LONG).show();\n }", "@Override\n\t\tprotected void handleError(Context ctx, Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t// Retrieve data from cache\n\t Map<String, ?> movieTitles = ImageAdapter.this.mOwner.getSharedPreferences(TITLES, 0).getAll();\n\t ImageAdapter.this.mNumLoaded = 0;\n\t int movieCount = movieTitles.size();\n\t ImageAdapter.this.movies = new MovieData[movieCount];\n\t // Initialise app with cached data\n\t for (Map.Entry<String, ?> movieData : movieTitles.entrySet()) {\n\t \tImageAdapter.this.movies[ImageAdapter.this.mNumLoaded] = new MovieData(ImageAdapter.this.mOwner, movieData);\n\t \tImageAdapter.this.mNumLoaded++;\n\t }\n\t\t\tImageAdapter.this.notifyDataSetChanged();\n\t\t}", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tToast.makeText(mInflatedView.getContext(),\n\t\t\t\t\t\t\t\t\t\"Error Mal\" + e.getMessage(),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void onException(Exception e) {\n\t\t\t\t\tLog.d(\"SD_TRACE\", \"load api exception\" + e.toString());\n\t\t\t\t\tmLoadSuccess = false;\n\t\t\t\t}", "@Override\n public void run()\n {\n Toast.makeText(getApplicationContext(),\"Couldn't get json from server. Check LogCat for possible errors!\", LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Toast.makeText(getApplicationContext(),\"Imagens não serão baixadas.\",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(Call call, final IOException e) {\n activity.runOnUiThread(() -> {\n textView.setText(e.getMessage());\n Toast.makeText(activity, \"fail\", Toast.LENGTH_SHORT).show();\n });\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"\"+e.getMessage(),Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onCancelled(DatabaseError databaseError) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onFailure(Call<List<String>> call, Throwable t) {\n Toast.makeText(MainActivity.this, \"FAILED!!\", Toast.LENGTH_SHORT).show(); //Makes \"Failed\" pop up in the screen and disappear (rude!)\n t.printStackTrace(); //prints the problem to the log.\n }", "private void catcher() {\n String text;\n\n if (getTextFromEditText(R.id.distanceEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_distance);\n } else if (getTextFromEditText(R.id.fuelEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_fuel);\n } else {\n text = getResourceString(R.string.err_wrong_vals);\n }\n\n makeToast(text);\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n dialog.dismiss();\n //Display err toast msg\n Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_SHORT).show();\n }", "@Override\n\t public void error()\n\t {\n\t Log.e(\"MAIN\",\"Error finding best guess location\");\n dS.lat=0;\n dS.lon=0;\n if(once)\n {\n\t //promptSetLocationService(MainActivity.this);\n }\n once=false;\n\t }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n }", "@Override\n public void onCancelled(DatabaseError error) {\n\n }", "@Override\n public void onCancelled(DatabaseError error) {\n\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n showToast(\"ERROR\", Color.RED);\n e.printStackTrace();\n }", "@Override\n public void onCancelled(DatabaseError error) {\n }", "@Override\n public void onCancelled(DatabaseError error) {\n }", "@Override\n public void onFailure(Call<QuotesResponse> call, Throwable t) {\n Log.e(\"MainAct Throw\", t.toString());\n progressDoalog.dismiss();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onCancelled(DatabaseError error) {\n\n }", "@Override\n public void onCancelled(DatabaseError error) {\n\n }", "@Override\n public void onFail(Object arg0) {\n LogUtil.log(\"游戏初始化失败\");\n }", "@Override\n public void onCancelled(@NonNull DatabaseError error) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(Call call, IOException e) {\n TemoignageActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(TemoignageActivity.this, R.string.no_internet, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onCancelled(DatabaseError databaseError) {\n Log.w(TAG, \"loadPost:onCancelled\", databaseError.toException());\n // ...\n }", "public void onLoadingFailure() {\n AppSession.showDataLoadError(\"post\");\n onLoadingComplete();\n }", "@Override\n\t\t\tpublic void onUncaughtException(Throwable e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}", "@Override\n public void onError(Platform arg0, int arg1, Throwable arg2) {\n arg2.printStackTrace();\n\n Log.d(TAG, \"onError: ======================\");\n }", "public void mo1031a(Throwable th) {\n if (th != null && Log.isLoggable(\"GlideExecutor\", 6)) {\n Log.e(\"GlideExecutor\", \"Request threw uncaught throwable\", th);\n }\n }", "public int m17235a() {\n Cursor query;\n int count;\n SQLiteException sQLiteException;\n Throwable th;\n IllegalStateException illegalStateException;\n Exception exception;\n Cursor cursor = null;\n this.f20995e.lock();\n SQLiteDatabase d = m17234d();\n if (d != null) {\n try {\n query = d.query(\"result\", new String[]{\"_id\", BaiduNaviParams.KEY_TIME, \"code\", \"cmd_type\", \"cmd_id\", \"result\"}, null, null, null, null, null);\n try {\n count = query.getCount();\n } catch (SQLiteException e) {\n cursor = query;\n sQLiteException = e;\n try {\n LoggerProxy.m17001d(\"SynthesizeResultDb\", \"exception:\" + sQLiteException.toString());\n cursor.close();\n d.close();\n this.f20995e.unlock();\n return 0;\n } catch (Throwable th2) {\n th = th2;\n cursor.close();\n d.close();\n this.f20995e.unlock();\n throw th;\n }\n } catch (IllegalStateException e2) {\n cursor = query;\n illegalStateException = e2;\n LoggerProxy.m17001d(\"SynthesizeResultDb\", \"exception:\" + illegalStateException.toString());\n cursor.close();\n d.close();\n this.f20995e.unlock();\n return 0;\n } catch (Exception e3) {\n cursor = query;\n exception = e3;\n LoggerProxy.m17001d(\"SynthesizeResultDb\", \"exception:\" + exception.toString());\n cursor.close();\n d.close();\n this.f20995e.unlock();\n return 0;\n } catch (Throwable th3) {\n cursor = query;\n th = th3;\n cursor.close();\n d.close();\n this.f20995e.unlock();\n throw th;\n }\n } catch (SQLiteException e4) {\n sQLiteException = e4;\n LoggerProxy.m17001d(\"SynthesizeResultDb\", \"exception:\" + sQLiteException.toString());\n cursor.close();\n d.close();\n this.f20995e.unlock();\n return 0;\n } catch (IllegalStateException e5) {\n illegalStateException = e5;\n LoggerProxy.m17001d(\"SynthesizeResultDb\", \"exception:\" + illegalStateException.toString());\n cursor.close();\n d.close();\n this.f20995e.unlock();\n return 0;\n } catch (Exception e6) {\n exception = e6;\n LoggerProxy.m17001d(\"SynthesizeResultDb\", \"exception:\" + exception.toString());\n cursor.close();\n d.close();\n this.f20995e.unlock();\n return 0;\n }\n }\n query = null;\n count = 0;\n query.close();\n d.close();\n this.f20995e.unlock();\n return count;\n }", "void onFatal();", "public void zzfg() {\n /*\n r11 = this;\n r9 = 0\n java.lang.Object r10 = com.google.android.gms.ads.internal.purchase.zzh.zzqt\n monitor-enter(r10)\n android.database.sqlite.SQLiteDatabase r0 = r11.getWritableDatabase() // Catch:{ all -> 0x0031 }\n if (r0 != 0) goto L_0x000c\n monitor-exit(r10) // Catch:{ all -> 0x0031 }\n L_0x000b:\n return\n L_0x000c:\n java.lang.String r7 = \"record_time ASC\"\n java.lang.String r1 = \"InAppPurchase\"\n r2 = 0\n r3 = 0\n r4 = 0\n r5 = 0\n r6 = 0\n java.lang.String r8 = \"1\"\n android.database.Cursor r1 = r0.query(r1, r2, r3, r4, r5, r6, r7, r8) // Catch:{ SQLiteException -> 0x0034, all -> 0x0056 }\n if (r1 == 0) goto L_0x002a\n boolean r0 = r1.moveToFirst() // Catch:{ SQLiteException -> 0x0060 }\n if (r0 == 0) goto L_0x002a\n com.google.android.gms.ads.internal.purchase.zzf r0 = r11.zza(r1) // Catch:{ SQLiteException -> 0x0060 }\n r11.zza(r0) // Catch:{ SQLiteException -> 0x0060 }\n L_0x002a:\n if (r1 == 0) goto L_0x002f\n r1.close()\n L_0x002f:\n monitor-exit(r10)\n goto L_0x000b\n L_0x0031:\n r0 = move-exception\n monitor-exit(r10)\n throw r0\n L_0x0034:\n r0 = move-exception\n r1 = r9\n L_0x0036:\n java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch:{ all -> 0x005e }\n r2.<init>() // Catch:{ all -> 0x005e }\n java.lang.String r3 = \"Error remove oldest record\"\n java.lang.StringBuilder r2 = r2.append(r3) // Catch:{ all -> 0x005e }\n java.lang.String r0 = r0.getMessage() // Catch:{ all -> 0x005e }\n java.lang.StringBuilder r0 = r2.append(r0) // Catch:{ all -> 0x005e }\n java.lang.String r0 = r0.toString() // Catch:{ all -> 0x005e }\n com.google.android.gms.ads.internal.util.client.zzb.zzaC(r0) // Catch:{ all -> 0x005e }\n if (r1 == 0) goto L_0x002f\n r1.close()\n goto L_0x002f\n L_0x0056:\n r0 = move-exception\n r1 = r9\n L_0x0058:\n if (r1 == 0) goto L_0x005d\n r1.close()\n L_0x005d:\n throw r0\n L_0x005e:\n r0 = move-exception\n goto L_0x0058\n L_0x0060:\n r0 = move-exception\n goto L_0x0036\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.ads.internal.purchase.zzh.zzfg():void\");\n }", "@Override\n public void run() {\n synchronized (HelloDepthPerceptionActivity.this) {\n try {\n mConfig = setupTangoConfig(mTango);\n mTango.connect(mConfig);\n startupTango();\n } catch (TangoOutOfDateException e) {\n Log.e(TAG, getString(R.string.exception_out_of_date), e);\n showsToastAndFinishOnUiThread(R.string.exception_out_of_date);\n } catch (TangoErrorException e) {\n Log.e(TAG, getString(R.string.exception_tango_error), e);\n showsToastAndFinishOnUiThread(R.string.exception_tango_error);\n } catch (TangoInvalidException e) {\n Log.e(TAG, getString(R.string.exception_tango_invalid), e);\n showsToastAndFinishOnUiThread(R.string.exception_tango_invalid);\n }\n }\n }", "protected void onConnectionError() {\n\t}", "@Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) {\n Toast.makeText(MainActivity.this, getResources().getString(R.string.errorToast), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onCancelled(@NonNull @NotNull DatabaseError error) {\n Toast.makeText(MainActivity.this, getResources().getString(R.string.errorToast), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(Throwable t) {\n Toast.makeText(context, t.getMessage(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onCancelled(DatabaseError error) {\n }", "@Override\n public void onCancelled(DatabaseError error) {\n }", "public static void sync() {\n /*\n int r0 = android.os.Build.VERSION.SDK_INT\n r1 = 24\n if (r0 >= r1) goto L_0x001f\n java.io.File r0 = new java.io.File\n java.lang.String r1 = mStrPath\n r0.<init>(r1)\n r2 = 0\n java.io.FileInputStream r1 = new java.io.FileInputStream // Catch:{ Exception -> 0x0020, all -> 0x0030 }\n r1.<init>(r0) // Catch:{ Exception -> 0x0020, all -> 0x0030 }\n java.io.FileDescriptor r0 = r1.getFD() // Catch:{ Exception -> 0x0044 }\n r0.sync() // Catch:{ Exception -> 0x0044 }\n if (r1 == 0) goto L_0x001f\n r1.close() // Catch:{ Exception -> 0x003d }\n L_0x001f:\n return\n L_0x0020:\n r0 = move-exception\n r1 = r2\n L_0x0022:\n r0.printStackTrace() // Catch:{ all -> 0x0042 }\n if (r1 == 0) goto L_0x001f\n r1.close() // Catch:{ Exception -> 0x002b }\n goto L_0x001f\n L_0x002b:\n r0 = move-exception\n r0.printStackTrace()\n goto L_0x001f\n L_0x0030:\n r0 = move-exception\n r1 = r2\n L_0x0032:\n if (r1 == 0) goto L_0x0037\n r1.close() // Catch:{ Exception -> 0x0038 }\n L_0x0037:\n throw r0\n L_0x0038:\n r1 = move-exception\n r1.printStackTrace()\n goto L_0x0037\n L_0x003d:\n r0 = move-exception\n r0.printStackTrace()\n goto L_0x001f\n L_0x0042:\n r0 = move-exception\n goto L_0x0032\n L_0x0044:\n r0 = move-exception\n goto L_0x0022\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.syu.util.MySharePreference.sync():void\");\n }", "@Override\n public void onCancelled(DatabaseError databaseError) {\n Log.d(\"OnCancelledLog\", \"loadPost:onCancelled\", databaseError.toException());\n // ...\n }", "public void checkExcn() throws Exception\n { This is called from the main thread context to re-throw any saved\n // exception.\n //\n if (ex != null) {\n throw ex;\n }\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n }" ]
[ "0.65973586", "0.64118135", "0.64118135", "0.6326946", "0.626575", "0.62397975", "0.61915046", "0.6138393", "0.60739344", "0.6046012", "0.6038076", "0.6023205", "0.6019273", "0.6009754", "0.6009754", "0.6009754", "0.6009754", "0.6009754", "0.59337205", "0.5912302", "0.58956903", "0.5883015", "0.5883015", "0.58804625", "0.587747", "0.5847192", "0.58226556", "0.5804848", "0.58001095", "0.5757018", "0.5740287", "0.5729476", "0.57150906", "0.5710089", "0.5701005", "0.5650846", "0.56497794", "0.559471", "0.5584527", "0.55670905", "0.5564582", "0.5564582", "0.5564582", "0.5564582", "0.5564582", "0.55636954", "0.55625945", "0.5562384", "0.5562384", "0.55367", "0.55336314", "0.55328685", "0.5532344", "0.55260223", "0.5517185", "0.55126107", "0.5497497", "0.54971486", "0.54971486", "0.54916435", "0.54910904", "0.54910904", "0.5487809", "0.5478103", "0.5478103", "0.5477913", "0.5477913", "0.5477501", "0.5473072", "0.5469082", "0.5469082", "0.54689515", "0.5466545", "0.5466044", "0.54640496", "0.5463882", "0.54616654", "0.54538244", "0.5451947", "0.54490525", "0.544758", "0.5444888", "0.543867", "0.543867", "0.5437026", "0.5437026", "0.5437026", "0.5437026", "0.5437026", "0.5436278", "0.54356897", "0.54356897", "0.5432958", "0.54325974", "0.5432164", "0.5430684", "0.5430684", "0.5430684", "0.5430684", "0.5430684", "0.5430684" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { Map<Integer,String> hm=new LinkedHashMap<>(); hm.put(1,"Jack"); hm.put(2,"Peter"); hm.put(3,"Sam"); hm.put(4,"Bruce"); System.out.println("Map:"+hm); hm.put(2,"Wayne"); System.out.println("\nAfter Changing An element in the Map:\n"+hm); hm.remove(2); System.out.println("\nAfter removing an element from the Map:\n"+hm); }
{ "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
Created by User on 026 26.09.17.
public interface SoundCloudService { String CLIENT_ID = "5f016c08c2201881c4217afd5f52e065"; String SOUND_ClOUD_API = "http://api.soundcloud.com/"; @GET("resolve.json") Observable<Track> getTrackInfo(@Query("url") String url, @Query("client_id") String clientId); @GET("resolve.json") Observable<Playlist> getPlaylistInfo(@Query("url") String url, @Query("client_id") String clientId); @GET("i1/tracks/{id}/streams") Observable<DownloadLink> getLink(@Path("id") String trackId, @Query("client_id") String clientId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70814_o() { return true; }", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private stendhal() {\n\t}", "public void mo38117a() {\n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private void m50366E() {\n }", "private static void cajas() {\n\t\t\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}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "@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}", "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\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void mo12628c() {\n }", "protected void mo6255a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void getExras() {\n\n\t}", "public void mo21877s() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo12930a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private void init() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@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}", "public final void mo91715d() {\n }", "public void mo6081a() {\n }", "@Override\n protected void init() {\n }", "public void mo55254a() {\n }", "private Rekenhulp()\n\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\tpublic void anular() {\n\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 void m23075a() {\n }", "public abstract void mo70713b();", "@Override\n public void init() {}", "@Override\n public void init() {\n }", "public void mo21878t() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void m50367F() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21779D() {\n }", "public static void listing5_14() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public abstract void mo56925d();", "public void mo21825b() {\n }", "public void mo3376r() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "protected boolean func_70041_e_() { return false; }", "@Override\n\tpublic void init() {\n\t}", "public void skystonePos4() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo9848a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "static void feladat4() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\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}", "@Override\n protected void initialize() {\n\n \n }", "static void feladat9() {\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo23813b() {\n }" ]
[ "0.55773175", "0.55519056", "0.55075026", "0.5491372", "0.5488768", "0.5460749", "0.54598373", "0.53832114", "0.53523356", "0.5342318", "0.5341038", "0.5338769", "0.53363407", "0.53363407", "0.5287217", "0.528288", "0.52772063", "0.52742004", "0.5273862", "0.5264445", "0.5264445", "0.5264445", "0.5264445", "0.5264445", "0.5263387", "0.5263387", "0.5263387", "0.5263387", "0.5263387", "0.5263387", "0.5263387", "0.5241439", "0.5236089", "0.52334243", "0.52291334", "0.52268684", "0.521884", "0.52181715", "0.5217955", "0.5204412", "0.5189383", "0.51695806", "0.5166617", "0.5165645", "0.51578355", "0.5157795", "0.5157573", "0.5157573", "0.5144819", "0.5130193", "0.51254475", "0.5113738", "0.5110989", "0.51084274", "0.51084274", "0.51084274", "0.5106369", "0.5102822", "0.51021516", "0.5100417", "0.50987124", "0.5096281", "0.5096281", "0.5096281", "0.5089302", "0.50867695", "0.50867695", "0.50867695", "0.50765914", "0.5075793", "0.5069412", "0.5068185", "0.50664693", "0.506025", "0.5059781", "0.50577813", "0.5055247", "0.5051328", "0.5051135", "0.50487125", "0.50465816", "0.50443745", "0.5040397", "0.5040174", "0.50381505", "0.5028409", "0.5025157", "0.502461", "0.50239223", "0.50224143", "0.50212795", "0.5018997", "0.50189584", "0.5017903", "0.5017903", "0.50095046", "0.50095046", "0.50086546", "0.5007129", "0.50068307", "0.50054723" ]
0.0
-1
Metodo que muestra un listado de los proyectos de la empresa
@Override public List<Proyecto> listarProyectos() { return proyectoRepo.findAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "public List<NotaDeCredito> procesar();", "public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}", "public List<Professor> listarTodos() throws BDException {\n\t\treturn professores;\r\n\t}", "public Collection<Proyecto> leerProyectosCollection() {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto[] proyecto = plantilla.getForObject(\"http://localhost:5000/proyectos\", Proyecto[].class);\n\t\t\tList<Proyecto> listaProyectos = Arrays.asList(proyecto);\n\t\t\treturn listaProyectos;\n\t\t}", "public List<UserProfile> getProfiliGestiti() {\r\n\t\tList<UserProfile> profili = getProfili();\r\n\t\t// siccome tiro su i profili ordinati per id,\r\n\t\t// so per certo che il primo � l'amministratore\r\n\t\t//profili.remove(0);\r\n\t\treturn profili;\r\n\t}", "public HashSet<Proyecto> getProyectosSolicitandoFinanciacion(){\r\n\t\t\r\n\t\tif(!this.modoAdmin) return null;\r\n\t\tHashSet<Proyecto> listado = new HashSet<Proyecto>();\r\n\t\tfor(Proyecto p: this.proyectos) {\r\n\t\t\tif(p.getEstadoProyecto() == EstadoProyecto.PENDIENTEFINANCIACION) {\r\n\t\t\t\tlistado.add(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return (HashSet<Proyecto>) Collections.unmodifiableSet(listado);\r\n\t\t//posteriormente hay que modificarlos, controlar la llamada a la fucnion\r\n\t\treturn listado;\r\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "@Override\r\n public List<Prova> consultarTodosProva() throws Exception {\n return rnProva.consultarTodos();\r\n }", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public static void llenarListaProcesados() {\n List<String> lista = Datos.getInstance().getDocumentos();\n if (lista == null) {\n return;\n }\n modelProcesados.clear();\n for (String s : lista) {\n modelProcesados.addElement(s);\n }\n\n }", "public List<Prodotto> getListaProdotti() {\n\t\treturn Shop.getInstance().getProdotti();\n\t}", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Inscripcion.findAll\", null);\n }", "public List<HashMap<String, Object>> PromoList() {\n\t\treturn sqlSession.selectList(\"main.PromoList\");\r\n\t}", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}", "public List<Propriedade> getListaDePropriedadesComMonopolio(){\r\n List<Propriedade> proComMonopolio = new ArrayList<>();\r\n for(Propriedade pro: this.propriedadesDoJogador){\r\n for(String cor: this.monopolioNoGrupoDeCor){\r\n if(pro.getCor().equals(cor)){\r\n proComMonopolio.add(pro);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return proComMonopolio;\r\n }", "public List<EstructuraContratosDatDTO> obtenerConsultaProsperaLista() {\n\t\tList<EstructuraContratosDatDTO> consultaNominaLista = consultaProsperaService.listaEstructuraProspera();\n\t\treturn consultaNominaLista;\n\t}", "public void iniciarProduccion(){\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select nick from usuarios where nick in(select usuario from construcciones) or nick \"\n +\"in(select usuario from investigaciones) or nick in(select usuario from movimientos)\");\n\n while(rs.next()){\n produccion.add(new Construcciones(rs.getString(1)));\n System.out.println(rs.getString(1));\n }\n\n st.close();\n rs.close();\n conn.close();\n\n }catch(SQLException e){\n System.out.println(\"Fallo actualizacion de produccion.\");\n }\n}", "private void listarProfesores(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n Connection con = null;//Objeto para la conexion\r\n Statement sentencia = null;//Objeto para definir y ejecutar las consultas sql\r\n ResultSet resultado = null;//Objeto para obtener los resultados de las consultas sql\r\n String sql = \"\";\r\n try {\r\n con = conBD.getCConexion();\r\n //Definición de Sentencia SQL\r\n //sql = \"SELECT semail,sclave,nestado,snombre,sapellido,stelefono,sgenero,nidPerfil FROM usuarios\";\r\n sql = \"SELECT semail,sclave,nestado,usuarios.snombre,sapellido,stelefono,sgenero,nidPerfil,\"\r\n + \"(case WHEN nestado=0 THEN 'Inactivo' ELSE 'Activo' END) AS sestado,\"\r\n + \"(case WHEN sgenero=0 THEN 'Femenino' ELSE 'Masculino' END) AS desgenero,\"\r\n + \"perfiles.snombre \"\r\n + \"FROM usuarios,perfiles \"\r\n + \"where usuarios.nidPerfil=perfiles.idPerfil and usuarios.nidPerfil=3 \"\r\n + \"order by usuarios.snombre\";\r\n\r\n //Ejecutar sentencia\r\n sentencia = con.createStatement();\r\n resultado = sentencia.executeQuery(sql);\r\n\r\n //arreglo donde se gurdaran los usuarios encontrados en la BD\r\n ArrayList Usuarios = new ArrayList();\r\n while (resultado.next()) //si el resultado tiene datos empezar a guardarlos.\r\n {\r\n Usuario e = new Usuario(resultado.getString(1), resultado.getString(2),\r\n resultado.getString(4), resultado.getString(5), resultado.getString(6), resultado.getString(7),\r\n resultado.getInt(8), resultado.getInt(3));\r\n //agregamos las descripciones al objeto.\r\n e.setDescripcionEstado(resultado.getString(9));\r\n e.setDescripcionGenero(resultado.getString(10));\r\n e.setDescripcionPerfil(resultado.getString(11));\r\n //Agregamos el profesor al arrelo\r\n Usuarios.add(e);\r\n }\r\n // Agregar el arreglo de profesores a la solicitud\r\n request.setAttribute(\"Profesores\", Usuarios);\r\n //redirigir la solicitu a la página JSP\r\n request.getRequestDispatcher(\"/EscribirMensaje.jsp\").include(request, response);\r\n //cerrar la conexion\r\n //con.close();\r\n } catch (SQLException ex) {\r\n System.out.println(\"No se ha podido establecer la conexión, o el SQL esta mal formado \" + sql);\r\n request.getRequestDispatcher(\"/Error.jsp\").forward(request, response);\r\n }\r\n }", "public List<Produto> listar() {\n return manager.createQuery(\"select distinct (p) from Produto p\", Produto.class).getResultList();\n }", "public static ArrayList<Paciente> BuscarPacientesConConvenios(Empresa emp) {\n Session sesion;\n Transaction tr = null;\n ArrayList<Paciente> lis = null;\n String hql;\n try{ \n sesion = NewHibernateUtil.getSessionFactory().openSession();\n tr = sesion.beginTransaction();\n hql = \"SELECT DISTINCT c.paciente FROM Convenio c WHERE c.estado = 'Activo' AND c.empresa = \"+emp.getIdempresa();\n Query query = sesion.createQuery(hql); \n Iterator<Paciente> it = query.iterate();\n if(it.hasNext()){\n lis = new ArrayList();\n while(it.hasNext()){\n lis.add(it.next());\n }\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return lis;\n }", "public List<Usuario> obtenerListaUsuariosActivos(){\n return usuarioBean.obtenerListaUsuariosActivos();\n }", "private void pickListCarreras(Proyecto proyecto) {\r\n sessionProyecto.getCarrerasProyecto().clear();\r\n sessionProyecto.getFilterCarrerasProyecto().clear();\r\n List<Carrera> carrerasProyecto = new ArrayList<>();\r\n List<Carrera> usuarioCarreras = new ArrayList<>();\r\n try {\r\n List<ProyectoCarreraOferta> lips = proyectoCarreraOfertaService.buscar(new ProyectoCarreraOferta(proyecto, null, null, Boolean.TRUE));\r\n if (lips != null) {\r\n for (ProyectoCarreraOferta pco : lips) {\r\n Carrera c = carreraService.find(pco.getCarreraId());\r\n if (!carrerasProyecto.contains(c)) {\r\n carrerasProyecto.add(c);\r\n }\r\n }\r\n }\r\n for (Carrera carrera : sessionProyecto.getCarreras()) {\r\n if (!usuarioCarreras.contains(carrera)) {\r\n usuarioCarreras.add(carrera);\r\n }\r\n }\r\n sessionProyecto.setCarrerasDualList(new DualListModel<>(carreraService.diferenciaProyectoCarrera(\r\n usuarioCarreras, carrerasProyecto), carrerasProyecto));\r\n sessionProyecto.setCarrerasProyecto(carrerasProyecto);\r\n sessionProyecto.setFilterCarrerasProyecto(sessionProyecto.getCarrerasProyecto());\r\n } catch (Exception e) {\r\n System.out.println(e);\r\n }\r\n }", "@Override\n public RspPermiso listPermiso() {\n ConectorBDMySQL conectorBD = new ConectorBDMySQL();\n RspPermiso rspPermiso = new RspPermiso();\n List<Permiso> todosLosPermisos = new ArrayList<Permiso>();\n //INICIALIZAR VARIABLES\n rspPermiso.setEsConexionAbiertaExitosamente(false);\n rspPermiso.setEsConexionCerradaExitosamente(false);\n rspPermiso.setEsSentenciaSqlEjecutadaExitosamente(false);\n //INTENTA ESTABLECER LA CONEXIÓN CON LA BASE DE DATOS\n if (conectorBD.iniciarConexion()) {\n rspPermiso.setEsConexionAbiertaExitosamente(true);\n rspPermiso.setRespuestaInicioDeConexion(conectorBD.getAtributosConector().getRespuestaInicioConexion());\n String consultaSQL = \"SELECT * FROM permiso WHERE estado = 1\";\n try {\n Statement sentencia = conectorBD.getConnection().createStatement();\n boolean bandera = sentencia.execute(consultaSQL);\n if (bandera) {\n ResultSet rs = sentencia.getResultSet();\n rspPermiso.setEsSentenciaSqlEjecutadaExitosamente(true);\n rspPermiso.setRespuestaServicio(utilidadSistema.imprimirConsulta(sentencia.toString(), \"listPermiso()\", this.getClass().toString()));\n while (rs.next()) {\n Permiso permiso = new Permiso();\n permiso = rsPermiso(rs, permiso);\n todosLosPermisos.add(permiso);\n }\n }\n } catch (SQLException e) {\n rspPermiso.setRespuestaServicio(utilidadSistema.imprimirExcepcion(e, \"listPermiso()\", this.getClass().toString()));\n } finally {\n if (conectorBD.cerrarConexion()) {\n rspPermiso.setEsConexionCerradaExitosamente(true);\n }\n rspPermiso.setRespuestaCierreDeConexion(conectorBD.getAtributosConector().getRespuestaCierreDeConexion());\n rspPermiso.setAllPermisos(todosLosPermisos);\n return rspPermiso;\n }\n } else {\n rspPermiso.setRespuestaInicioDeConexion(conectorBD.getAtributosConector().getRespuestaInicioConexion());\n return rspPermiso;\n }\n }", "public static void mostrarPrimeraListaDeEmpleados()\r\n\t{\r\n\t\tfor(Empleado empleado: listaDeEmpleados)\r\n\t\t{\r\n\t\t\tSystem.out.println(empleado);\r\n\t\t}\r\n\t}", "public List<Permiso> obtenerTodosActivos();", "public String listarSensores(){\r\n String str = \"\";\r\n for(PacienteNuvem x:pacientes){//Para cada paciente do sistema ele armazena uma string com os padroes do protocolo de comunicação\r\n str += x.getNick()+\"-\"+x.getNome()+\"#\";\r\n }\r\n return str;\r\n }", "public ArrayList< UsuarioVO> listaDePersonas() {\r\n\t ArrayList< UsuarioVO> miUsuario = new ArrayList< UsuarioVO>();\r\n\t Conexion conex= new Conexion();\r\n\t \r\n\t try {\r\n\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM usuarios\");\r\n\t ResultSet res = consulta.executeQuery();\r\n\t while(res.next()){\r\n\t\t UsuarioVO persona= new UsuarioVO();\r\n\t persona.setCedula_usuario(Integer.parseInt(res.getString(\"cedula_usuario\")));\r\n\t persona.setEmail_usuario(res.getString(\"email_usuario\"));\r\n\t persona.setNombre_usuario(res.getString(\"nombre_usuario\"));\r\n\t persona.setPassword(res.getString(\"password\"));\r\n\t persona.setUsuario(res.getString(\"usuario\"));\r\n\t \r\n\t \r\n\t miUsuario.add(persona);\r\n\t }\r\n\t res.close();\r\n\t consulta.close();\r\n\t conex.desconectar();\r\n\t \r\n\t } catch (Exception e) {\r\n\t JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\r\n\t }\r\n\t return miUsuario;\r\n\t }", "public ArrayList<Proposta> retornaPropostasPeloIdFreela(int idUsuario) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idUsuario == rs.getInt(\"id_usuario\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do Freelancer = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Curso.findAll\", null);\n }", "@Override\r\n public void mostrarProfesores(){\n for(Persona i: listaPersona){\r\n if(i instanceof Profesor){\r\n i.mostrar();\r\n }\r\n }\r\n }", "public List<Profesor> consultarTodos() {\n\t\treturn daoProfesor.consultarTodos();\n\t}", "@Override\n\tpublic ArrayList<Professor> consultarTudo() {\n\t\treturn listaprof;\n\t}", "public HashSet<Usuario> getRegistrosPendientesDeAprobacion(){\r\n\t\t\r\n\t\tif(!this.modoAdmin) return null;\r\n\t\t\r\n\t\tUsuario u;\r\n\t\tHashSet<Usuario> pendientes = new HashSet<Usuario>();\r\n\t\tfor(Proponente p: this.proponentes) {\r\n\t\t\tif( p.getClass().getSimpleName().equals(\"Usuario\")) {\r\n\t\t\t\tu = (Usuario)p;\r\n\t\t\t\tif(u.getEstado()== EstadoUsuario.PENDIENTE) {\r\n\t\t\t\t\tpendientes.add(u);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pendientes;\r\n\t}", "@Override\n public ArrayList<Propiedad> getPropiedadesFiltroCliente(String pCriterio, String pDato) throws\n SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'ACTIVO' AND \" + pCriterio + \" = '\" + pDato + \"'\");\n return resultado;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Profilo> getAll() {\r\n\t\t//Recupero la sessione da Hibernate\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\t\t\r\n\t\t//Creo la query usando il linguaggio HQL (Hibernate Query Language)\r\n\t\tQuery query = session.createQuery(\"FROM Vocelicenza\");\r\n\t\t\t\r\n\t\t//Restituisco la lista di Profili\r\n\t\treturn query.list();\r\n\t}", "@Override\n\tpublic List<Map<String, String>> selectProessionInfo(String appId) {\n\t\treturn getSqlMap().queryForList(NAMESPACES + \"queryProessionInfo\", appId);\n\t}", "public List<Prova> todasProvas(int codigoProfessor) {\n\t\tTransactionManager txManager = new TransactionManager();\n\t return txManager.doInTransactionWithReturn((connection) -> {\n\t \t\n\t\t\tps = connection.prepareStatement(\n\t\t\t\t\t\"SELECT codigo, codProfessor, codDisciplina, titulo, questoes, valorTotal, valorQuestoes, tempo, data, allowAfterDate, allowMultipleAttempts FROM prova WHERE codProfessor=? GROUP BY codigo\");\n\t\t\tps.setInt(1, codigoProfessor);\n\t\t\trs = ps.executeQuery();\n\t\n\t\t\tList<Prova> list = new ArrayList<Prova>();\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tint codigo = rs.getInt(1);\n\t\t\t\tint codProfessor = rs.getInt(2);\n\t\t\t\tint codDisciplina = rs.getInt(3);\n\t\t\t\tString titulo = rs.getString(4);\n\t\t\t\tString questoes = rs.getString(5);\n\t\t\t\tfloat valorTotal = rs.getFloat(6);\n\t\t\t\tfloat valorQuestoes = rs.getFloat(7);\n\t\t\t\tint tempo = rs.getInt(8);\n\t\t\t\tString data = rs.getString(9);\n\t\t\t\tboolean allowAfterDate = rs.getBoolean(10);\n\t\t\t\tboolean allowMultipleAttempts = rs.getBoolean(11);\n\t\t\t\t\n\t\t\t\tlist.add(new Prova(codigo, codProfessor, codDisciplina, titulo, questoes, valorTotal, valorQuestoes, tempo, data, allowAfterDate, allowMultipleAttempts));\n\t\t\t}\n\t\t\treturn list;\n\t\t});\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ComPermiso> escuelas() {\n\t\t\r\n\t\treturn em.createQuery(\"select c.dependencia.id,c.dependencia.nombre from ComPermiso c \").getResultList();\r\n\t}", "@Override\n\tpublic List<Professor> getProfessors() {\n\t\tList<Professor> pros=null;\n\t\tProfessor pro=null;\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\tstmt=conn.prepareStatement(\"SELECT ssn,name,department,password FROM Professor\");\n\t\t\t/*stmt.setString(1, admin.getCname());\n\t\t\tstmt.setString(2, admin.getCplace());*/\n\t\t\tResultSet rs=stmt.executeQuery();\n\t\t\tpros=new ArrayList<Professor>();\n\t\t\twhile(rs.next()){\n\t\t\t\tpro=new Professor(rs.getString(\"name\"),rs.getString(\"ssn\"),\"\", rs.getString(\"department\"));\n\t\t\t\t\n\t\t\t\tpros.add(pro);\n\t\t\t}\n\t\t\t}catch(SQLException e){\n\t\t\t\tex=e;\n\t\t\t}finally{\n\t\t\t\tif(conn!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tconn.close();\n\t\t\t\t\t}catch(SQLException e){\n\t\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\t\tex=e;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif(ex!=null){\n\t\t\t\tthrow new RuntimeException(ex);\n\t\t\t}\n\t\t\t}\n\t\treturn pros;\n\t}", "public void listarNominasEmpleadoProfundidad(int idMecanico) throws BusinessException;", "public List<Pregunta> getPreguntasUsuario(Usuario user);", "@Override\n\tpublic Iterable<Profesores> listaProfesores() {\n\t\treturn profesoresRepositorio.findAll();\n\t}", "List<ParqueaderoEntidad> listar();", "public List<Tb_Prod_Painel_PromoBeans> getProdPainelConfig(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \"where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public String getUsuariosConectados() throws RemoteException {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor(Object objeto : bbdd.getUsuariosConectados()){\n\t\t\tsb.append((String) objeto + \"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\t\t\n\t}", "public List<IdNombreTO> obtenerProyIdNombre(Integer usuId, Integer orgPk) {\n if (orgPk != null) {\n String queryStr = \"SELECT NEW com.sofis.entities.tipos.IdNombreTO(p.proyPk, p.proyNombre)\"\n + \" FROM Proyectos p, IN (p.participantesList) pa\"\n + \" WHERE p.proyOrgFk.orgPk = :orgId\"\n + \" AND p.activo != :proyActivo\"\n + \" AND p.proyEstFk.estPk IN (\"\n + \"SELECT e.estPk\"\n + \" FROM Estados e\"\n + \" WHERE e.estCodigo = :estCod1\"\n + \" OR e.estCodigo = :estCod2\"\n + \" OR e.estCodigo = :estCod3)\"\n + \" AND (pa.partUsuarioFk.usuId = :usuId AND pa.partActivo = :partActivo)\"\n + \" ORDER BY p.proyNombre\";\n Query query = getEm().createQuery(queryStr);\n query.setParameter(\"orgId\", orgPk);\n query.setParameter(\"proyActivo\", Boolean.FALSE);\n query.setParameter(\"estCod1\", EstadosCodigos.INICIO);\n query.setParameter(\"estCod2\", EstadosCodigos.PLANIFICACION);\n query.setParameter(\"estCod3\", EstadosCodigos.EJECUCION);\n query.setParameter(\"usuId\", usuId);\n query.setParameter(\"partActivo\", Boolean.TRUE);\n\n List<IdNombreTO> proyectosList = query.getResultList();\n return proyectosList;\n }\n return null;\n }", "private List<PromocionConcursoAgr> listaPromocionConcursoAgr() {\r\n\t\tString select = \" select distinct(puesto_det.*) \"\r\n\t\t\t\t+ \"from seleccion.promocion_concurso_agr puesto_det \"\r\n\t\t\t\t+ \"join planificacion.estado_det estado_det \"\r\n\t\t\t\t+ \"on estado_det.id_estado_det = puesto_det.id_estado_det \"\r\n\t\t\t\t+ \"join planificacion.estado_cab \"\r\n\t\t\t\t+ \"on estado_cab.id_estado_cab = estado_det.id_estado_cab \"\r\n\t\t\t\t+ \"join seleccion.promocion_salarial cargo \"\r\n\t\t\t\t+ \"on cargo.id_promocion_salarial = puesto_det.id_promocion_salarial \"\r\n\t\t\t\t+ \" where puesto_det.id_concurso_puesto_agr is null \"\r\n\t\t\t\t+ \"and lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and lower(estado_cab.descripcion) = 'concurso' \"\r\n\t\t\t\t//+ \"and puesto_det.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t//+ \" and cargo.permanente is true\"\r\n\t\t\t\t;\r\n\r\n\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\tlista = em.createNativeQuery(select, PromocionConcursoAgr.class)\r\n\t\t\t\t.getResultList();\r\n\r\n\t\treturn lista;\r\n\t}", "private static void listaProdutosCadastrados() throws Exception {\r\n String nomeCategoria;\r\n ArrayList<Produto> lista = arqProdutos.toList();\r\n if (!lista.isEmpty()) {\r\n System.out.println(\"\\t** Lista dos produtos cadastrados **\\n\");\r\n }\r\n for (Produto p : lista) {\r\n if (p != null && p.getID() != -1) {\r\n nomeCategoria = getNomeCategoria(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (nomeCategoria != null) {\r\n System.out.println(\"Categoria: \" + nomeCategoria);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n System.out.println();\r\n Thread.sleep(500);\r\n }\r\n }\r\n }", "public static List<Utente> getUtenti(int profiloUtente) throws Exception {\r\n\t\tList<Utente> utenti = null;\r\n\t\tUtente user = null;\r\n\t\ttry {\r\n\t\t\tbegin();\r\n\t\t\tQuery q = getSession().createQuery(\r\n\t\t\t\t\t\"from Utente u where u.ruolo = \" + profiloUtente);\r\n\t\t\tutenti = q.list();\r\n\t\t\tcommit();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn utenti;\r\n\r\n\t}", "@GetMapping(\"/procesadors\")\n @Timed\n public List<Procesador> getAllProcesadors() {\n log.debug(\"REST request to get all Procesadors\");\n List<Procesador> procesadors = procesadorRepository.findAll();\n return procesadors;\n }", "public abstract DtPropuestaMinificado[] listarPropuestas() throws PropuestaNoExisteException;", "@Override\r\n\tpublic List<Object> consultarVehiculos() {\r\n\t\t\r\n\t\tFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\r\n\t\treturn AdminEstacionamientoImpl.getParqueadero().stream().map(\r\n\t\t\t\t temp -> {HashMap<String, String> lista = new HashMap<String, String>(); \r\n\t\t\t\t lista.put( \"placa\", temp.getVehiculo().getPlaca() );\r\n\t\t\t\t lista.put( \"tipo\", temp.getVehiculo().getTipo() );\r\n\t\t\t\t lista.put( \"fechaInicio\", formato.format( temp.getFechaInicio() ) );\r\n\r\n\t\t\t\t return lista;\r\n\t\t\t\t }\r\n\t\t\t\t).collect(Collectors.toList());\r\n\t}", "public List findAll() {\n\t\ttry {\n\t\t\tString queryString = \"from Procurator\";\n\t\t\tQuery queryObject = getSession().createQuery(queryString);\n\t\t\treturn queryObject.list();\n\t\t} catch (RuntimeException re) {\n\t\t\tthrow re;\n\t\t}\n\t}", "public List<Listas_de_las_Solicitudes> Mostrar_las_peticiones_que_han_llegado_al_Usuario_Administrador(int cedula) {\n\t\t//paso3: Obtener el listado de peticiones realizadas por el usuario\n\t\tEntityManagerFactory entitymanagerfactory = Persistence.createEntityManagerFactory(\"LeyTransparencia\");\n\t\tEntityManager entitymanager = entitymanagerfactory.createEntityManager();\n\t\tentitymanager.getEntityManagerFactory().getCache().evictAll();\n\t\tQuery consulta4=entitymanager.createQuery(\"SELECT g FROM Gestionador g WHERE g.cedulaGestionador =\"+cedula);\n\t\tGestionador Gestionador=(Gestionador) consulta4.getSingleResult();\n\t\t//paso4: Obtener por peticion la id, fecha y el estado\n\t\tList<Peticion> peticion=Gestionador.getEmpresa().getPeticions();\n\t\tList<Listas_de_las_Solicitudes> peticion2 = new ArrayList();\n\t\t//paso5: buscar el area de cada peticion\n\t\tfor(int i=0;i<peticion.size();i++){\n\t\t\tString almcena=\"\";\n\t\t\tString sarea=\"no posee\";\n\t\t\tBufferedReader in;\n\t\t\ttry{\n\t\t\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\"C:/area/area\"+String.valueOf(peticion.get(i).getIdPeticion())+\".txt\"), \"utf-8\"));\n\t\t\t\ttry {\n\t\t\t\t\twhile((sarea=in.readLine())!=null){\n\t\t\t\t\t\tint s=0;\n\t\t\t\t\t\talmcena=sarea;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\tSystem.out.println(almcena);\n\t\t\t\t} catch (IOException 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\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t//paso6: Mostrar un listado de peticiones observando el id, la fecha de realizacion de la peticion, hora de realizacion de la peticion, y el estado actual de la peticion\n\t\t\tListas_de_las_Solicitudes agregar=new Listas_de_las_Solicitudes();\n\t\t\tagregar.setId(String.valueOf(peticion.get(i).getIdPeticion()));\n\t\t\tagregar.setFechaPeticion(peticion.get(i).getFechaPeticion());\n\t\t\tagregar.setNombreestado(peticion.get(i).getEstado().getTipoEstado());\n\t\t\tagregar.setArea(almcena);\n\t\t\tpeticion2.add(agregar);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"el usuario existe\");\n\t\treturn peticion2;\n\t\t//aun no se\n\t}", "public List<Tb_Prod_Painel_PromoBeans> getProdPainelTabelas(Integer terminal, String painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel in(\" + painel + \") order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal); \r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>(); \r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "private void getinterrogantes(){\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql = \"SELECT i FROM Interrogante i \"\n + \"WHERE i.estado='a' \";\n\n Query query = em.createQuery(jpql);\n List<Interrogante> listInterrogantes = query.getResultList();\n\n ArrayList<ListQuestion> arrayListQuestions = new ArrayList<>();\n for (Interrogante i : listInterrogantes){\n ListQuestion lq = new ListQuestion();\n lq.setIdinterrogante(i.getIdinterrogante());\n lq.setQuestion(i.getDescripcion());\n lq.setListParametros(getParametros(i.getIdinterrogante()));\n arrayListQuestions.add(lq);\n }\n\n this.ListQuestions = arrayListQuestions;\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n } \n \n }", "public ArrayList<ProdottoOrdineBean> getProdotti() {\n\t\t\treturn prodotti;\n\t\t}", "public List<ProveedorPromocionHotelEntity> getPromociones(){\n List<ProveedorPromocionHotelEntity>promociones = proveedorPromocionHotelPersistence.findAll();\n return promociones;\n }", "@Override\n\tpublic ArrayList<Object[]> parEmplo(String puesto) {\n\t\tfor (Employe emplo : treeMap.values()) {\n\t\t\tif (emplo.getClass().getName().substring(13).equals(puesto)) {\n\t\t\t\t// System.out.println(emplo);\n\t\t\t\tObject[] aux = { emplo.getId(), emplo.getNom(),\n\t\t\t\t\t\templo.getPrenom(), emplo.getDate_N(), emplo.getSexe(),\n\t\t\t\t\t\templo.getRue(), emplo.getNumero(), emplo.getVille(),\n\t\t\t\t\t\templo.getPay(), emplo.getTelef(),\n\t\t\t\t\t\templo.getClass().getName().substring(13) };\n\t\t\t\tarray1.add(aux);\n\t\t\t}\n\t\t}\n\t\treturn array1;\n\t}", "public static String obtenerListaProfesores () {\n StringBuilder sb;\n Statement stmt;\n String query;\n ResultSet result;\n try {\n iniciarConexion();\n sb = new StringBuilder();\n stmt = connection.createStatement();\n query = \"SELECT * FROM usuarios WHERE Matricula LIKE 'l%';\";\n result = stmt.executeQuery(query);\n while (result.next()) {\n sb.append(result.getString(2));\n sb.append(\" \");\n sb.append(result.getString(3));\n sb.append(\",\");\n }\n return sb.toString();\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return \"\";\n }\n }", "private void listadoEstados() {\r\n sessionProyecto.getEstados().clear();\r\n sessionProyecto.setEstados(itemService.buscarPorCatalogo(CatalogoEnum.ESTADOPROYECTO.getTipo()));\r\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public static List<Parte> listarPartes(){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesList (?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n cs.registerOutParameter(1, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(1);\n while (rs.next()){\n Parte p = new Parte();\n p.setFecha(rs.getString(\"fecha\"));\n p.setKmInicial(rs.getBigDecimal(\"kmInicial\"));\n p.setKmFinal(rs.getBigDecimal(\"kmFinal\"));\n p.setGastoPeaje(rs.getBigDecimal(\"gastosPeaje\")); \n p.setGastoDietas(rs.getBigDecimal(\"gastosDietas\"));\n p.setGastoCombustible(rs.getBigDecimal(\"gastosCombustible\"));\n p.setGastoVarios(rs.getBigDecimal(\"otrosGastos\"));\n p.setIncidencias(rs.getString(\"incidencias\"));\n p.setEstado(rs.getString(\"estado\"));\n p.setValidado(rs.getString(\"validado\"));\n p.setHorasExtras(rs.getBigDecimal(\"horasExtras\"));\n p.setIdTrabajador(rs.getBigDecimal(\"TRABAJADORES_ID\"));\n p.setNotasAdministrativas(rs.getString(\"notasAdministrativas\"));\n partes.add(p);\n }\n \n rs.close();\n cs.close();\n Conexion.desconectar();\n return partes;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n return null;\n }", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "public List getProdutos() {\n\t\treturn null;\n\t}", "@OneToMany(mappedBy=\"pouchDetalleProcesoLote\")\r\n\tpublic List<PouchDetalleProcesoConteo> getPouchDetalleProcesoConteos() {\r\n\t\treturn this.pouchDetalleProcesoConteos;\r\n\t}", "public List<Propriedade> getPropriedadesDoJogador() {\r\n return propriedadesDoJogador;\r\n }", "@Override\r\n\tpublic List consultaEmpresas() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<Produto> listar(Produto entidade) {\n\t\treturn null;\n\t}", "public void listadoCarreras() {\r\n try {\r\n this.sessionProyecto.getCarreras().clear();\r\n this.sessionProyecto.getFilterCarreras().clear();\r\n this.sessionProyecto.getCarreras().addAll(sessionUsuarioCarrera.getCarreras());\r\n this.sessionProyecto.setFilterCarreras(this.sessionProyecto.getCarreras());\r\n } catch (Exception e) {\r\n }\r\n }", "public void getPropuestasOrdenadas(int confirm) throws ParseException{\n System.out.println(\"\\nSe imprimirán las propuestas de la Sala \"+getNombreSala()+\":\");\n if (propuestas.size() == 0){\n System.out.println(\"No hay reservas para esta Sala\");\n }\n else{\n for (Propuesta propuestaF : propuestas) {\n String nombreReservador = propuestaF.getReservador().getNombreCompleto();\n if (confirm == 0){\n if (propuestaF.isForAllSem()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else{\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n else if (confirm == 1){\n if (propuestaF.isForAllSem() && propuestaF.isConfirmada()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else if (propuestaF.isConfirmada()){\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n }\n }\n }", "private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}", "public List<Veterinario> pesquisar(String nomeOuCpf) throws ClassNotFoundException, SQLException{ \n VeterinarioDAO dao = new VeterinarioDAO();\n if (!nomeOuCpf.equals(\"\"))\n return dao.listar(\"(nome = '\" + nomeOuCpf + \"' or cpf = '\" + nomeOuCpf + \"') and ativo = true\");\n else\n return dao.listar(\"ativo = true\");\n }", "@RequestMapping(method = RequestMethod.GET)\n\tpublic @ResponseBody List<ServicoPessoa> getServicoPessoas()\n\t\t\tthrows Exception {\n\t\ttry {\n\t\t\tList<ServicoPessoa> servicoPessoas = servicoPessoaService.getServicoPessoas();\n\t\t\treturn servicoPessoas;\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "public HashMap<String, ProdottoCarrello> getListaProdottiCarrello(Request request) {\n\t\treturn getSession().getCarrello().getListaProdotti();\n\t}", "@GetMapping(\"\")\n public String getAllProyectos(Model model) {\n List<Persona> socios = personaService.getPersonas();\n model.addAttribute(\"listasocios\", socios);\n return \"/backoffice/socios\";\n }", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "public List<Perguntas> getPerguntas(String servico) {\r\n String idSolicitacao = \"\";\r\n List<Perguntas> perguntas = new ArrayList<>();\r\n\r\n String sql = \"Select\\n\"\r\n + \" perguntas.Id_Perguntas,\\n\"\r\n + \" perguntas.pergunta,\\n\"\r\n + \" perguntas.Servico_id_servico,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \"\\n\"\r\n + \"INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" INNER JOIN perguntas on \t(servico.id_servico=perguntas.Servico_id_servico)\\n\"\r\n + \" WHERE solicitacoes.em_chamado = 3 and servico.id_servico = \" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n\r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n Perguntas p = new Perguntas();\r\n\r\n p.setIdPerguntas(rs.getInt(1));\r\n p.setIdServico(rs.getInt(3));\r\n p.setPergunta(rs.getString(2));\r\n idSolicitacao = rs.getString(4);\r\n perguntas.add(p);\r\n }\r\n mudaStatus(idSolicitacao);\r\n\r\n return perguntas;\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return perguntas;\r\n }", "public void prodottiDellaLista(int LID, HttpServletRequest request){\n \n HttpSession session = request.getSession();\n \n ProductListDAO productListDAO = new MySQLProductListDAOImpl();\n ProductDAO productDAO = new MySQLProductDAOImpl();\n ProductCategoryDAO productCategoryDAO = new MySQLProductCategoryDAOImpl();\n UserDAO userDAO = new MySQLUserDAOImpl();\n \n List productList = productListDAO.getPIDsByLID(LID);\n Product product = null;\n String [][] prodotto = new String [productList.size()][10];\n \n SharingProductDAO sharingProductDAO = new MySQLSharingProductDAOImpl();\n List userSharedProduct = null;\n \n for(int i=0; i<productList.size(); i++){\n product = productDAO.getProduct(((ProductList)(productList.get(i))).getPID(), (String)session.getAttribute(\"emailSession\"));\n prodotto[i][0] = product.getName();\n prodotto[i][1] = product.getNote();\n prodotto[i][2] = product.getLogo();\n prodotto[i][3] = product.getPhoto();\n prodotto[i][4] = productCategoryDAO.getProductCategory(product.getPCID()).getName();\n prodotto[i][5] = userDAO.getUser(product.getEmail()).getName();\n prodotto[i][6] = Integer.toString(((ProductList)(productList.get(i))).getQuantity());\n prodotto[i][7] = Integer.toString(product.getPID());\n prodotto[i][8] = userDAO.getUser(product.getEmail()).getSurname();\n \n if (!userDAO.getUser(product.getEmail()).getAdmin()) {\n userSharedProduct = sharingProductDAO.getAllEmailsbyPID(Integer.parseInt(prodotto[i][7]));\n if (userSharedProduct.isEmpty() || userSharedProduct.size()>1){\n prodotto[i][9] = String.valueOf(userSharedProduct.size()) + \" utenti\";\n } else {\n prodotto[i][9] = String.valueOf(userSharedProduct.size()) + \" utente\";\n }\n } else {\n prodotto[i][9] = \"Tutti gli utenti\";\n }\n }\n \n session.setAttribute(\"Prodotto\", prodotto);\n \n }", "public List<UserProfile> getProfili() {\r\n\t\t// return upDao.findAll();\r\n\t\treturn upDao.getAllUserProfile();\r\n\t}", "@Override\r\n public List<QuestaoMultiplaEscolha> consultarTodosQuestaoMultiplaEscolha()\r\n throws Exception {\n return rnQuestaoMultiplaEscolha.consultarTodos();\r\n }", "private ArrayList<Parametro> getParametros(int pregunta){\n ArrayList<Parametro> arrayListParametros = new ArrayList<>();\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql =\"SELECT p FROM ParametroInterrogante pi \"\n + \"JOIN pi.interrogante i \"\n + \"JOIN pi.parametro p \"\n + \"WHERE p.estado='a' AND i.estado='a' \"\n + \"AND i.idinterrogante = :pregunta\";\n\n Query query = em.createQuery(jpql);\n query.setParameter(\"pregunta\", pregunta);\n List<Parametro> list = query.getResultList();\n for(Parametro p : list){\n arrayListParametros.add(p);\n }\n\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n return arrayListParametros;\n }", "@Override\n public List<Paciente> listar(){\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n List<Paciente> listaPaciente = em.createQuery(\"SELECT pac FROM Paciente pac\").getResultList(); \n em.close();\n factory.close();\n return (listaPaciente);\n }", "protected ProvinciaList() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public void AfficherListProspect() throws Exception{\n laListeProspeect = Prospect_Db_Connect.tousLesProspects();\n laListeProspeect.forEach((p) -> {\n modelProspect.addRow(new Object[]{ p.getIdent(),\n p.getRaison(),\n p.getTypeSo(),\n p.getDomaine(),\n p.getAdresse(),\n p.getTel(),\n p.getCa(),\n p.getComment(),\n p.getNbrEmp(),\n p.getDateProspetc(),\n p.getInteretPropspect()});\n });\n }", "private ArrayList atualizaListaPromocaoDiaExecucao(ResultSet selPromocaoDiaExecucao) throws SQLException\n {\n \tArrayList result = new ArrayList();\n \t\n \twhile(selPromocaoDiaExecucao.next())\n \t{\n \t\tHashMap promocao = new HashMap(4); \t\t\n \t\tpromocao.put(\"IDT_PROMOCAO\", new Integer(selPromocaoDiaExecucao.getInt(\"IDT_PROMOCAO\")));\n \t\tpromocao.put(\"NUM_DIA_ENTRADA\", new Integer(selPromocaoDiaExecucao.getInt(\"NUM_DIA_ENTRADA\")));\n \t\tpromocao.put(\"NUM_DIA_EXECUCAO\", new Integer(selPromocaoDiaExecucao.getInt(\"NUM_DIA_EXECUCAO\")));\n \t\tpromocao.put(\"NUM_DIA_EXECUCAO_RECARGA\", \n \t\t\t\t new Integer(selPromocaoDiaExecucao.getInt(\"NUM_DIA_EXECUCAO_RECARGA\")));\n \t\t\n\t\t\tresult.add(promocao);\n \t}\n \t\n \treturn result;\n }", "public List<Propuesta> getAllPropuestas() throws Exception {\n\t\tDAOPersona dao = new DAOPersona();\n\t\tList<Propuesta> props;\n\t\ttry \n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn(conn);\n\n\t\t\tprops = dao.getPropuestas();\n\t\t}\n\t\tcatch (SQLException sqlException) {\n\t\t\tSystem.err.println(\"[EXCEPTION] SQLException:\" + sqlException.getMessage());\n\t\t\tsqlException.printStackTrace();\n\t\t\tthrow sqlException;\n\t\t} \n\t\tcatch (Exception exception) {\n\t\t\tSystem.err.println(\"[EXCEPTION] General Exception:\" + exception.getMessage());\n\t\t\texception.printStackTrace();\n\t\t\tthrow exception;\n\t\t} \n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tdao.cerrarRecursos();\n\t\t\t\tif(this.conn!=null){\n\t\t\t\t\tthis.conn.close();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException exception) {\n\t\t\t\tSystem.err.println(\"[EXCEPTION] SQLException While Closing Resources:\" + exception.getMessage());\n\t\t\t\texception.printStackTrace();\n\t\t\t\tthrow exception;\n\t\t\t}\n\t\t}\n\t\treturn props;\n\t}", "public ArrayList<Proceso> procesosPoliticaEnvejecimiento() {\n\t\tArrayList<Proceso> procesosPE = new ArrayList<Proceso>();\n\t\tProceso aux = this.raiz.sig;\n\t\twhile (aux != this.raiz) {\n\t\t\tint tiempoEnCola = this.tiempo - aux.tllegada + 1;\n\t\t\tif (tiempoEnCola >= this.tiempoPE) {\n\t\t\t\tProceso auxp = aux.padre;\n\t\t\t\tauxp.sig = aux.sig;\n\t\t\t\taux.sig.padre = auxp;\n\t\t\t\taux.padre = null;\n\t\t\t\tprocesosPE.add(aux);\n\t\t\t}\n\n\t\t\taux = aux.sig;\n\t\t}\n\t\tif (procesosPE.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn procesosPE;\n\t}", "public List selectAllFromProjeto() throws IOException {\n erro = false;\n List projetos = null;\n try{\n projetos = con.query(\"Select * from projeto\", new BeanPropertyRowMapper(Projeto.class));\n } catch (CannotGetJdbcConnectionException ex){\n logger.gravarDadosLog(\"ERRO\",\"SELECT\" , \"Não foi possivel realizar a consulta dos projetos cadastrados.\" + Arrays.toString(ex.getStackTrace()));\n erro = true;\n }\n if(!erro){\n logger.gravarDadosLog(\"INFO\", \"SELECT\" , \"A busca por projetos cadastrados foi realizada com sucesso.\");\n }\n erro = false;\n return projetos;\n }", "private void listadoTipos() {\r\n sessionProyecto.getTipos().clear();\r\n sessionProyecto.setTipos(itemService.buscarPorCatalogo(CatalogoEnum.TIPOPROYECTO.getTipo()));\r\n }", "public ArrayList<String> getNombrePropiedades(){\n ArrayList<String> listaPropiedades = new ArrayList();\n \n for(TituloPropiedad propiedad :propiedades){\n listaPropiedades.add(propiedad.getNombre());\n }\n return listaPropiedades;\n }", "public List<Perfil> perfilListar() {\r\n\r\n try {\r\n ControladorPerfil ctrlperfil = new ControladorPerfil();\r\n return ctrlperfil.getListaPerfil();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return new ArrayList<>();\r\n }\r\n }", "@Override\r\n\tpublic List<EquipoCompetencia> listarActivos() {\n\t\treturn null;\r\n\t}", "List<Topo> getToposDispo(String user);", "public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}", "ArrayList<Professor> professoresFormPend();", "public static void listarRegistros() {\n System.out.println(\"\\nLISTA DE TODOS LOS REGISTROS\\n\");\n for (persona ps: pd.listaPersonas()){\n System.out.println(ps.getId()+ \" \"+\n ps.getNombre()+ \" \"+\n ps.getAp_paterno()+ \" \"+ \n ps.getAp_materno()+ \" DIRECCION: \"+ \n ps.getDireccion()+ \" SEXO: \"+ ps.getSexo());\n }\n }", "public List<PersonEntity> obtenerDatosPersonas() {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONAS(), PersonEntity.class);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONAS() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}" ]
[ "0.68400615", "0.6785549", "0.67171955", "0.6713209", "0.6712668", "0.6688696", "0.66544783", "0.66216457", "0.6600783", "0.6543498", "0.6527925", "0.6519326", "0.65116584", "0.6488694", "0.64784354", "0.6465668", "0.64644945", "0.6461568", "0.6458391", "0.63949096", "0.63318646", "0.6318018", "0.63157225", "0.63062495", "0.62730676", "0.6261917", "0.62569237", "0.6252283", "0.6247594", "0.62461334", "0.6232883", "0.6232262", "0.6231242", "0.62269014", "0.6223405", "0.62181896", "0.6215747", "0.61970073", "0.61911005", "0.6184993", "0.6168385", "0.6158039", "0.61523753", "0.6151327", "0.6150488", "0.6149767", "0.6131481", "0.6119659", "0.61162555", "0.6113654", "0.6112864", "0.61108816", "0.60934764", "0.609272", "0.6091729", "0.6090275", "0.60749215", "0.6073466", "0.6071982", "0.6071217", "0.60634667", "0.6062654", "0.60604805", "0.6056167", "0.6055309", "0.6053474", "0.60421735", "0.60383004", "0.6027947", "0.60276145", "0.60268694", "0.602206", "0.60213536", "0.601286", "0.6012082", "0.5996086", "0.5991998", "0.59898263", "0.5988989", "0.598677", "0.5985519", "0.59829515", "0.5978757", "0.5978696", "0.5976252", "0.59693253", "0.5961838", "0.5959279", "0.59557605", "0.59518844", "0.5950942", "0.59488714", "0.59482926", "0.594745", "0.59423107", "0.59277797", "0.5926665", "0.5912393", "0.5904254", "0.59008163" ]
0.73127615
0
Metodo para guardar un nuevo proyecto
@Override public void altaProyecto(Proyecto proyecto) { proyectoRepo.save(proyecto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void guardar() {\r\n\t\t\r\n\t\tmanejadorArchivos.guardar(palabras);\r\n\t\t\r\n\t}", "public void guardar(Modelo modelo) throws SipsaExcepcion;", "public void registrarProyecto(Proyecto proyecto) {\r\n\t\tproyectoServ.validarRegistro(proyecto);\r\n\t}", "public void InsertarProceso(Proceso nuevo) {\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tthis.cabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t}", "@Override\n\t\tpublic void guardar() {\n\t\t\t\n\t\t\tif (tab_presupuesto.guardar()){\n\t\t\t\tif (tab_asociacion_presupuestaria.guardar()) {\n\t\t\t\t\tguardarPantalla();\n\t\t\t\t\t//Actualizar el arbol\n\t\t\t\t\tarb_clasificador.ejecutarSql();\n\t\t\t\t\tutilitario.addUpdate(\"arb_clasificador\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t}", "Lancamento persistir(Lancamento lancamento);", "public void guardarPrestamo(Prestamo prestamo) {\n int accountant = 0;\n File archivoCont = new File(\"./Archivos/ContadorPrestamo.bin\");\n if(archivoCont.exists()){\n accountant = ManejadorArchivoContador.leerContador(\"./Archivos/ContadorPrestamo.bin\");\n } else {\n ManejadorArchivoContador.crearNuevoContador(0, \"./Archivos/ContadorPrestamo.bin\");\n }\n prestamo.setCodigoPrestamo(accountant);\n manejadorArchivoPrestamo.crearArchivo(prestamo, PRESTAMO, Integer.toString(accountant), \".pre\");\n }", "public void almacenar( Proyecto proyecto) {\n\n }", "@Override\r\n\tpublic void guardar() {\n\t\tLOG.info(\"El equipo \"+equipo.getNombre()+\" y el Estadio \"+equipo.getEstadio().getNombre()+\" fueron guardados con exito\");\r\n\t}", "public void crear(Tarea t) {\n t.saveIt();\n }", "private void salir(){\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Salir\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.exit(0);\r\n\t}", "public void guardarPuntaje() {\r\n\t\tFile archivo = new File(\"archivos/puntajes.txt\");\r\n\t\tBufferedWriter bw;\r\n\t\ttry {\r\n\t\t\tif (archivo.exists()) {\r\n\t\t\t\tFileWriter fw = new FileWriter(archivo, true);\r\n\t\t\t\tbw = new BufferedWriter(fw);\r\n\t\t\t\tbw.write(\"\\r\\n\"+jugadorActual.getNombre()+\"-\"+jugadorActual.getPuntaje());\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tFileWriter fw = new FileWriter(archivo, true);\r\n\t\t\t\tbw = new BufferedWriter(fw);\r\n\t\t\t\tbw.write(jugadorActual.getNombre()+\"-\"+jugadorActual.getPuntaje());\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\t\r\n\t\t\tbw.close();\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t}", "public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}", "public static void guardar()\n {\n File fileUsuario,fileDocente;\n ObjectOutputStream entradaUsuario,entradaDocente;\n \n fileDocente = new File(\"docentes\"); \n fileUsuario = new File(\"usuarios\");\n \n try \n {\n \n entradaDocente = new ObjectOutputStream(new FileOutputStream(fileDocente));\n entradaUsuario = new ObjectOutputStream(new FileOutputStream(fileUsuario));\n \n entradaDocente.writeObject(docentes);\n entradaUsuario.writeObject(usuarios);\n \n entradaDocente.close();\n entradaUsuario.close();\n } \n catch (Exception e) \n {\n e.printStackTrace();\n }\n }", "public void criar() throws IOException {\nif (!directorio.exists()) {\n directorio.mkdir();\n System.out.println(\"Directorio criado\");\n } else {\n System.out.println(\"Directorio existe\");\n }\n if (!fileAdmin.exists()) {\n fileAdmin.createNewFile();\n System.out.println(\"file de Administrador criado com sucesso\");\n escrever(lista);\n } else {\n System.out.println(\"ficheiro existe\");\n }\n\n }", "@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }", "public void guardarDestruccion() {\n try {\n produccion.setIdMarca(opcionMarca);\n produccion.setIdPlantaProd(opcionPlanta);\n produccion.setIdPaisOrigen(opcionOrigen);\n produccion.setIdTipoRetro(opcionTipo);\n produccion.setFechProduccion(new Date());\n produccion.setDescPaisOrigen(desperdiciosHelper.getNombrePais());\n\n if (!habilitarBtnValidarProd()) {\n if (produccion != null) {\n produccion = produccionService.guardaDestruccion(produccion);\n super.msgInfo(MSGEXITOVALIDAPROD);\n desperdiciosHelper.setDeshabilitaBtnValidarProd(true);\n desperdiciosHelper.setDeshabilitaCargaArchivo(false);\n } else {\n super.msgError(MSGERRORVALIDARPROD);\n }\n }\n } catch (ProduccionServiceException e) {\n LOGGER.error(\"ERROR: Al guardar los datos de produccion\" + e.getMessage(), e);\n }\n }", "@Override\n\tpublic void nuevo() {\n\n\t}", "public String guardarComentario(){\r\n\t\tcomDao.save(com);\r\n\t\tinit();\r\n\t\treturn null;\r\n\t}", "protected void nuevo(){\n wp = new frmEspacioTrabajo();\n System.runFinalization();\n inicializar();\n }", "private void nuevaLiga() {\r\n\t\tif(Gestion.isModificado()){\r\n\t\t\tint opcion = JOptionPane.showOptionDialog(null, \"¿Desea guardar los cambios?\", \"Nueva Liga\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null,null, null);\r\n\t\t\tswitch(opcion){\r\n\t\t\tcase JOptionPane.YES_OPTION:\r\n\t\t\t\tguardar();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.NO_OPTION:\r\n\t\t\t\tGestion.reset();\r\n\t\t\t\tbreak;\r\n\t\t\tcase JOptionPane.CANCEL_OPTION:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tGestion.reset();\r\n\t\tfrmLigaDeFtbol.setTitle(\"Liga de Fútbol\");\r\n\t}", "public String guardar()\r\n/* 69: */ {\r\n/* 70: */ try\r\n/* 71: */ {\r\n/* 72: 85 */ this.motivoLlamadoAtencion.setIdOrganizacion(AppUtil.getOrganizacion().getIdOrganizacion());\r\n/* 73: 86 */ this.motivoLlamadoAtencion.setIdSucursal(AppUtil.getSucursal().getIdSucursal());\r\n/* 74: 87 */ this.servicioMotivoLlamadoAtencion.guardar(this.motivoLlamadoAtencion);\r\n/* 75: 88 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 76: 89 */ setEditado(false);\r\n/* 77: 90 */ limpiar();\r\n/* 78: */ }\r\n/* 79: */ catch (Exception e)\r\n/* 80: */ {\r\n/* 81: 92 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 82: 93 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 83: */ }\r\n/* 84: 95 */ return \"\";\r\n/* 85: */ }", "@Override\n\tpublic void save(CorsoDiLaurea corso) {\n\t\t\n\t}", "public void guardar(Empleado e){\r\n \r\n //Para serializar el primer paso es generar el archivo fisico donde\r\n //estara nuestro objto de tipo usuario\r\n\r\n File file=new File(\"Empleados.yo\");\r\n \r\n //Despues lo abrimos para escribir sobre el \r\n if(file.exists()){\r\n empleado=buscarTodos();\r\n }\r\n try{\r\n FileOutputStream fos=new FileOutputStream(file);\r\n \r\n //Luego serializamos\r\n ObjectOutputStream oos=new ObjectOutputStream(fos);\r\n \r\n //Guardamos nuestro usuario\r\n empleado.add(e);\r\n oos.writeObject(empleado);\r\n \r\n //Ponemos un mensaje\r\n System.out.println(\"Objeto guardado con exito\");\r\n \r\n }catch (Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public void guardarArchivo(String objeto, String nombre,Context context) throws FileSaverException{\n String msg;\n switch(TIPO_ESCRITURA){\n case MEMORIA_EXTERNA:{\n contexto = context;\n msg = contexto.getResources().getString(R.string.fileSaverInicioEscrituraExterna);\n Log.v(TAG,msg);\n guardarArchivoMemoriaExterna(objeto,nombre,Activity.MODE_PRIVATE);\n break;\n }\n case MEMORIA_INTERNA:{\n contexto=context;\n msg = contexto.getResources().getString(R.string.fileSaverInicioEscrituraInterna);\n Log.v(TAG,msg);\n guardarArchivoMemoriaInterna(objeto,nombre,Activity.MODE_PRIVATE);\n break;\n }\n default:\n msg = context.getResources().getString(R.string.fileSaverErrorEscrituraLocal);\n throw new FileSaverException(msg);\n }\n }", "@Override\n\tpublic void guardar() {\n\t\tLOG.info(\"El usuario fue guardado \"+ usuario.getApellido()+\", \"+ usuario.getNombre());\n\t}", "private void nuevoJuego() { \n\n objJuegoTresEnRaya = new JuegoTresEnRaya();\n objJuegoTresEnRaya.addObserver(this);\n objJuegoTresEnRaya.setQuienComienza(JuegoTresEnRaya.JUGADOR);\n objJuegoTresEnRaya.setQuienJuega(JuegoTresEnRaya.JUGADOR);\n \n }", "@Override\r\n\tpublic void guardar() {\n\t\ttab_nivel_funcion_programa.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}", "public Producto guardar(Producto producto) throws IWDaoException;", "Persistencia() {\n\t}", "public void crearPrograma(Programa prog) throws Exception {\r\n\t\tEntityManager em = AdministradorEntityManager.getEntityManager();\t\t\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(prog);\r\n\t\tem.getTransaction().commit();\t\t\r\n\t}", "@Override\n public void save(Promocion prm) {\n promocionRepository.save(prm);\n }", "@Override\r\n\tpublic void guardar() {\n\t\ttab_cuenta.guardar();\r\n\t\tguardarPantalla();\r\n\t\t\r\n\t}", "public void save(Veranstaltung veranstaltung) throws RuntimeException;", "@Override\n\tpublic Genero save(Genero genero) {\n\t\treturn generoRepository.save(genero);\n\t}", "public void registrarVenta(Venta venta) {\n \n File db = new File(\"src/Archivo/ventas/ventas.txt\");\n File tempDB = new File(\"src/Archivo/ventas/ventas_temp.txt\");\n\n try {\n \n List<Venta> newVentas = añadirVentaToList(venta);\n\n BufferedWriter bw = new BufferedWriter(new FileWriter(tempDB));\n\n\n\n for(Venta vts:newVentas) {\n bw.write(\n vts.getId()+\",\"+\n vts.getIdCliente()+\",\"+\n vts.getSacosVendidos()+\",\"+\n vts.getVenta()+\",\"+\n vts.getFecha()\n );\n bw.flush();\n bw.newLine();\n }\n bw.close();\n db.delete();\n } catch (Exception e) {\n System.err.println(\"Method-VentasCRUD.registrarVenta(): \" + e);\n }\n\n boolean success = tempDB.renameTo(db);\n System.out.println(success);\n }", "@Override\n\tpublic void guardar() {\n\t\t\n\t}", "private void guardar() {\n\t\t//JFileChooser fglobal = principal.getFglobal();\n\t\tprincipal.getFglobal().setDialogTitle(ic.buscar(38)); // Tag 38\n\n\t\t\tprincipal.getFglobal().setDialogType(JFileChooser.SAVE_DIALOG);\n\n\t\tAccesorio pep = new Accesorio(principal.getFglobal(),t, principal.getIC());\n\t\tprincipal.getFglobal().setAccessory(pep);\n\t\tpep.setProfundidad(true);\n\t\t\n principal.getFglobal().resetChoosableFileFilters();\n \n ExampleFileFilter filtroT = new ExampleFileFilter (\n new String [] {\"tiff\",\n \"tif\",\n },\n ic.buscar(3)); // Tag 3\n \n\n \n\t\t\t\n ExampleFileFilter filtroJ = new ExampleFileFilter (\n new String [] {\"jpeg\",\n \"jpg\"\n },\n ic.buscar(4)); // Tag 4\n principal.getFglobal().addChoosableFileFilter(filtroT);\n principal.getFglobal().addChoosableFileFilter(filtroJ);\n\t\t\n\t\t\n\t\t\n\t\tint retval = principal.getFglobal().showDialog(t, null);\n\t\tif (retval == JFileChooser.APPROVE_OPTION) \n\t\t{\t\t\n\t\t\tFile guardar = principal.getFglobal().getSelectedFile();\n \n\t\t\tif (\tprincipal.getFglobal().getFileFilter().getDescription().equals(filtroJ.getDescription()) )\n\t\t\t{// Guardar como JPEG\n \n\t\t\t\tJAI.create(\"filestore\",imagen_original,guardar.getPath(),\"JPEG\", new JPEGEncodeParam());\n\t\t\t}\n\t\t\telse if (principal.getFglobal().getFileFilter().getDescription().equals(filtroT.getDescription()))\n\t\t\t{// Guardar como TIFF\n\t\t\t\tint profundidad = pep.getEP().getMarcada();\n\t\t\t\t// Cubre todas las posibilidades (¿esto guarda los metadatos?)\n\t\t\t\tTiledImage tiled = null;\n\t\t\t\tif (profundidad != ElegirProfundidad.OCHO)\n\t\t\t\t{\n\t\t\t\t\ttiled = \n ElegirProfundidad.crearProfundidadReducida(\n ipixel_o, \n profundidad, \n imagen_original.getWidth(), \n imagen_original.getHeight());\n\t\t\t\t}\n\n\t\t\t\t//imgGuardar = djai.getSource();\n\t\t\t\tParameterBlock pb = new ParameterBlock();\n\t\t\t\tif (profundidad != ElegirProfundidad.OCHO)\n\t\t\t\t{\n\t\t\t\t\tpb.addSource(tiled);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tpb.addSource(imagen_original);\n\t\t\t\t}\n\t\t\t\tpb.add(guardar);\n\t\t\t\tpb.add(\"TIFF\");\n\t\t\t\tpb.add(false); //UseProperties\n\t\t\t\tpb.add(false); //Transcode\n\t\t\t\tpb.add(true); //VerifyOutput\n\t\t\t\tpb.add(false); //AllowPixelReplacement\n\t\t\t\tpb.add(null); //TileSize\n\t\t\t\tpb.add(streamData);\n\t\t\t\tpb.add(imageData);\n\t \t\t\tJAI.create(\"imagewrite\", pb);\n\t\t\t\t\n\t\t\t\t//JAI.create(\"imagewrite\",tiled,guardar.getPath(),\"TIFF\");\n\t\t\t}\n\t\t\telse\n\t\t\t{// No tiene extensión o es una extensión extraña\n\t\t\t\tJAI.create(\"imagewrite\",imagen_original,guardar.getPath()+\".tif\",\"TIFF\");\n\t\t\t}\n\t\t\t\n\t\t}\t\t\t \n\t\telse \n\t\t{\n\t\t\tdibujarMensajesError(retval);\n\t\t} \n\t\t\n\t\t\n\t}", "public void saveNewProject(){\n String pn = tGUI.ProjectTextField2.getText();\n String pd = tGUI.ProjectTextArea1.getText();\n String statusID = tGUI.StatusComboBox.getSelectedItem().toString();\n String customerID = tGUI.CustomerComboBox.getSelectedItem().toString();\n\n int sstatusID = getStatusID(statusID);\n int ccustomerID = getCustomerID(customerID);\n\n try {\n pstat = cn.prepareStatement (\"insert into projects (project_name, project_description, project_status_id, customer_id) VALUES (?,?,?,?)\");\n pstat.setString(1, pn);\n pstat.setString(2,pd);\n pstat.setInt(3, sstatusID);\n pstat.setInt(4, ccustomerID);\n pstat.executeUpdate();\n\n }catch (SQLException ex) {\n Logger.getLogger(ProjectMethods.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic Paciente registrar(Paciente t) {\n\t\treturn dao.save(t);\n\t}", "public String guardarPublica(String clave){\r\n\t\t\t\t \r\n\t\t String ok=\"ok\";\r\n\t\t try { \t\r\n\t\t\t File ruta_sd = Environment.getExternalStorageDirectory();\r\n\t\t\t \r\n\t\t File f = new File(ruta_sd.getAbsolutePath()+\"/MIMESIC/\");\r\n\t\t f.mkdir();\r\n\t\t \r\n\t\t File fich = new File(f, \"ibe.txt\");\r\n\t\t \r\n\t\t OutputStreamWriter fout = new OutputStreamWriter(new FileOutputStream(fich));\r\n\t\r\n\t\t \t fout.write(clave);\r\n\t\t\t\t fout.close();\r\n\t\t\r\n\t\t\r\n\t\t\treturn ok;\r\n\r\n\t }\r\n\t\t catch(FileNotFoundException e){\r\n\t\t\t e.printStackTrace();\r\n\t\t\t return \"error\";\r\n\t\t\t \r\n\t\t }\r\n\t catch (IOException ex){\r\n\t ex.printStackTrace();\r\n\t \r\n\t }\r\n\t\t \r\n\t \r\n\t\t return ok;\r\n\t\t \r\n\t }", "public PerfilTO guardarOActualizar(PerfilTO perfil);", "public void guardarOActualizarArchivo(String objeto, String nombre, Context context) throws FileSaverException{\n String msg;\n switch(TIPO_ESCRITURA){\n case MEMORIA_EXTERNA:{\n contexto = context;\n msg = contexto.getResources().getString(R.string.fileSaverInicioEscrituraExterna);\n Log.v(TAG,msg);\n guardarArchivoMemoriaExterna(objeto,nombre, MODE_APPEND);\n break;\n }\n case MEMORIA_INTERNA:{\n contexto=context;\n msg = contexto.getResources().getString(R.string.fileSaverInicioEscrituraInterna);\n Log.v(TAG,msg);\n guardarArchivoMemoriaInterna(objeto,nombre, MODE_APPEND);\n break;\n }\n default:\n msg = contexto.getResources().getString(R.string.fileSaverErrorEscrituraLocal);\n Log.v(TAG,msg);\n throw new FileSaverException(msg);\n }\n }", "public void guardarTripulanteEncontrado(Tripulante tripulante);", "public void insertar(Proceso p, int tiempo) {\n\t\tif (p == null || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.id = p.id;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "@Override\n\tpublic void insertarServicio(Servicio nuevoServicio) {\n\t\tservicioDao= new ServicioDaoImpl();\n\t\tservicioDao.insertarServicio(nuevoServicio);\n\t\t\n\t\t\n\t}", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "private void guardar() {\r\n\t\tif(Gestion.isModificado() && Gestion.getFichero()!=null){\r\n\t\t\ttry {\r\n\t\t\t\tGestion.escribir(Gestion.getFichero());\r\n\t\t\t\tGestion.setModificado(false);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(Gestion.isModificado() && Gestion.getFichero()==null){\r\n\t\t\tguardarComo();\r\n\t\t}\r\n\t\telse if(frmLigaDeFtbol.getTitle()==\"Liga de Fútbol\" && !Gestion.isModificado())\r\n\t\t\tguardarComo();\r\n\t}", "public void insertar(Proceso p) {\n\t\tif (p == null) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.tllegada = p.tllegada;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.rrejecutada = p.rrejecutada;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\t\tint tamaņo = p.id.length();\n\t\tif (tamaņo == 1) {\n\t\t\tnuevo.id = p.id + \"1\";\n\t\t} else {\n\t\t\tchar id = p.id.charAt(0);\n\t\t\tint numeroId = Integer.parseInt(String.valueOf(p.id.charAt(1))) + 1;\n\t\t\tnuevo.id = String.valueOf(id) + String.valueOf(numeroId);\n\t\t}\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "private void guardarComo() {\r\n\t\tJFileChooser guardar = new JFileChooser();\r\n\t\tFileNameExtensionFilter filtro = new FileNameExtensionFilter(\"obj\",\"obj\");\r\n\t\tguardar.setFileFilter(filtro);\r\n\t\tif(guardar.showSaveDialog(guardar) == JFileChooser.APPROVE_OPTION){\r\n\t\t\tGestion.setFichero(Gestion.extensionValida(guardar.getSelectedFile()));\r\n\t\t\ttry {\r\n\t\t\t\tif(!Gestion.existe(Gestion.getFichero())){\r\n\t\t\t\t\tGestion.escribir(Gestion.getFichero());\r\n\t\t\t\t\tGestion.setModificado(false);\r\n\t\t\t\t\tfrmLigaDeFtbol.setTitle(Gestion.getFichero().getName());\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tswitch(JOptionPane.showConfirmDialog(null, \"El archivo existe. Desea sobreescribirlo?\", \"Aviso\", JOptionPane.WARNING_MESSAGE)){\r\n\t\t\t\t\tcase JOptionPane.OK_OPTION:\r\n\t\t\t\t\t\tGestion.escribir(Gestion.getFichero());\r\n\t\t\t\t\t\tGestion.setModificado(false);\r\n\t\t\t\t\t\t\t\tfrmLigaDeFtbol.setTitle(Gestion.getFichero().getName());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public boolean guardar(Empleado empleado) {\n\n try {\n\n empDAO.create(empleado);\n System.out.println(\"Guardando Empleado:\" + empleado.toString());\n return true;\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n return false;\n\n }", "@Test\n\tpublic void nuevoTest() {\n\t\tFactura resultadoObtenido = sut.nuevo(facturaSinId);\n\t\t//resuladoObtenido es unicamente dependiente de nuestro algoritmo\n\t\t\n\t\t//Validar\n\t\tassertEquals(facturaConId.getId(), resultadoObtenido.getId());\n\t\t\n\t}", "public String save() {\r\n\t\ttry {\r\n\r\n\t\t\tif (obs != null && !obs.trim().isEmpty()) {\r\n\t\t\t\tconcurso.setObservacionReserva(obs);\r\n\t\t\t\tconcursoHome.setInstance(concurso);\r\n\t\t\t\tString res = concursoHome.update();\r\n\t\t\t}\r\n\r\n\t\t\tfor (PlantaCargoDetDTO dto : listaPlantaCargoDto) {\r\n\r\n\t\t\t\tif (dto.getReservar()) {\r\n\t\t\t\t\tEstadoDet est = buscarEstado(\"en reserva\");\r\n\t\t\t\t\tif (!existeEnDetalle(dto.getPlantaCargoDet(), est)) {\r\n\t\t\t\t\t\t// buscar\r\n\r\n\t\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\t\tp.setActivo(true);\r\n\t\t\t\t\t\tp.setFechaAlta(new Date());\r\n\t\t\t\t\t\tp.setUsuAlta(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\tp.setNroOrden(2);\r\n\t\t\t\t\t\tp.setPlantaCargoDet(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\t\tif (est != null)\r\n\t\t\t\t\t\t\tp.setEstadoDet(est);\r\n\t\t\t\t\t\tp.setConcurso(concursoHome.getInstance());\r\n\t\t\t\t\t\tem.persist(p);\r\n\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(est.getEstadoCab());\r\n\t\t\t\t\t\tplanta.setEstadoDet(est);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Incidencia 1079 */\r\n\t\t\t\trefreshListaPuestoReservados();\r\n\t\t\t\t/**/\r\n\t\t\t\tEstadoCab estadoCab = obtenerEstadosCabecera(\"VACANTE\");\r\n\t\t\t\tif (esta(dto.getPlantaCargoDet())) {\r\n\t\t\t\t\tConcursoPuestoDet p = new ConcursoPuestoDet();\r\n\t\t\t\t\tp = recuperarConcurso(dto.getPlantaCargoDet());\r\n\r\n\t\t\t\t\tif (!dto.getReservar()) {\r\n\t\t\t\t\t\tif (p.getConcursoPuestoAgr() != null) {\r\n\t\t\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\t\t\"El puesto pertenece a un grupo\");\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * p.setActivo(true); p.setNroOrden(1);\r\n\t\t\t\t\t\t * p.setFechaMod(new Date());\r\n\t\t\t\t\t\t * p.setUsuMod(usuarioLogueado.getCodigoUsuario());\r\n\t\t\t\t\t\t * EstadoDet est = buscarEstado(\"libre\");\r\n\t\t\t\t\t\t * p.setEstadoDet(est); em.merge(p);\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n\t\t\t\t\t\tplanta = dto.getPlantaCargoDet();\r\n\t\t\t\t\t\tplanta.setEstadoCab(estadoCab);\r\n\t\t\t\t\t\tplanta.setEstadoDet(null);\r\n\t\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t\tif (!concurso\r\n\t\t\t\t\t\t\t\t.getDatosEspecificosTipoConc()\r\n\t\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t\t.equalsIgnoreCase(\r\n\t\t\t\t\t\t\t\t\t\tCONCURSO_INTERNO_INTERINSTITUCIONAL)\r\n\t\t\t\t\t\t\t\t&& planta.getPermanente())\r\n\t\t\t\t\t\t\treponerCategoriasController.reponerCategorias(p,\r\n\t\t\t\t\t\t\t\t\t\"PUESTO\", \"CONCURSO\");\r\n\t\t\t\t\t\tem.remove(p);\r\n\t\t\t\t\t\t// listaPlantaCargoDto.remove(dto);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tobs = null;\r\n\t\t\tem.flush();\r\n\t\t\tllenarListado1();\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.INFO, SeamResourceBundle.getBundle()\r\n\t\t\t\t\t.getString(\"GENERICO_MSG\"));\r\n\t\t\treturn \"persisted\";\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private void guardarArchivoMemoriaInterna(String objeto,String fileName,int modoGuardado) throws FileSaverException{\n String msg = contexto.getResources().getString(R.string.fileSaverErrorEscrituraLocal);\n FileOutputStream mOutput;\n if(objeto!=null) {\n try {\n Log.v(TAG,\"Guardando el archivo \"+fileName+\" en memoriaInterna\");\n mOutput = contexto.openFileOutput(fileName, modoGuardado);\n mOutput.write(objeto.toString().getBytes());\n mOutput.flush();\n mOutput.close();\n msg = contexto.getResources().getString(R.string.fileSaverAlmacenExitoso);\n Log.v(TAG,msg);\n }\n catch(FileNotFoundException e){\n throw new FileSaverException(msg);\n }\n catch(IOException e){\n throw new FileSaverException(msg);\n }\n }\n else{\n throw new FileSaverException(msg);\n }\n }", "public void guardar(Usuario u) throws Exception{\r\n //paso1 generar el archivo a guardarse\r\n File f=new File(\"archivaldo.raton\");\r\n if(f.exists()) usuarios= buscarTodos();\r\n //indicar que se va a guardar\r\n FileOutputStream fos=new FileOutputStream(f);\r\n \r\n //generar el objeto que nos va a ayudar a guardar el arraylist de usuarios\r\n ObjectOutputStream oos=new ObjectOutputStream(fos);\r\n //ahora si a guardar el objeto\r\n usuarios.add(u);\r\n oos.writeObject(usuarios);\r\n }", "private void guardarAposta(Aposta a) {\r\n\t\ttry {\r\n\t\t\tApostesSQL apostaHelper = new ApostesSQL(this, \"F1Bet.db\", null, 2);\r\n\t\t\tApostesConversor apostesConversor = new ApostesConversor(\r\n\t\t\t\t\tapostaHelper);\r\n\t\t\t// obtenir l'objecte BD\r\n\t\t\tSQLiteDatabase db = apostaHelper.getWritableDatabase();\r\n\t\t\t// Si s'ha obert correctament la BD4\r\n\t\t\tif (db != null) {\r\n\t\t\t\t// guardar a la base de dades\r\n\t\t\t\tapostesConversor.save(a);\r\n\t\t\t\tsetResult(RESULT_OK);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tsetResult(RESULT_CANCELED);\r\n\t\t} finally {\r\n\t\t\tfinish();\r\n\t\t}\r\n\t}", "@PostMapping(\"/save\")\n @ResponseStatus(HttpStatus.CREATED)//status 201\n public AsociadosProyecto save(@RequestBody AsociadosProyecto asociadosProyecto){\n return asociadosProyectoService.save(asociadosProyecto);\n }", "public void guardar(Empleado empleado) {\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.persist(empleado);\n\t\tentityManager.getTransaction().commit();\n\t\tJPAUtil.shutdown();\n\t}", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "@Override\n public void registrarPropiedad(Propiedad nuevaPropiedad, String pIdAgente) {\n int numFinca = nuevaPropiedad.getNumFinca();\n String modalidad = nuevaPropiedad.getModalidad();\n double area = nuevaPropiedad.getAreaTerreno();\n double metro = nuevaPropiedad.getValorMetroCuadrado();\n double fiscal = nuevaPropiedad.getValorFiscal();\n String provincia = nuevaPropiedad.getProvincia();\n String canton = nuevaPropiedad.getCanton();\n String distrito = nuevaPropiedad.getDistrito();\n String dirExacta = nuevaPropiedad.getDirExacta();\n String estado = nuevaPropiedad.getEstado();\n String tipo = nuevaPropiedad.getTipo();\n System.out.println(nuevaPropiedad.getFotografias().size());\n double precio = nuevaPropiedad.getPrecio();\n try {\n bdPropiedad.manipulationQuery(\"INSERT INTO PROPIEDAD (ID_PROPIEDAD, ID_AGENTE, MODALIDAD, \"\n + \"AREA_TERRENO, VALOR_METRO, VALOR_FISCAL, PROVINCIA, CANTON, DISTRITO, DIREXACTA, TIPO, \"\n + \"ESTADO, PRECIO) VALUES (\" + numFinca + \", '\" + pIdAgente + \"' , '\" + modalidad + \"',\" + \n area + \",\" + metro + \",\" + fiscal + \", '\" + provincia + \"' , '\" + canton + \"' , '\" + distrito \n + \"' , '\" + dirExacta + \"' , '\" + tipo + \"' , '\" + estado + \"', \" + precio + \")\");\n bdPropiedad.insertarFotografias(nuevaPropiedad);\n } catch (SQLException ex) {\n Logger.getLogger(Propiedad.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void GuardarSerologia(RecepcionSero obj)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n session.saveOrUpdate(obj);\n }", "public void guardarProductosVendidos() {\n try {\n //Si hay datos los guardamos...\n if (!productosVendidos.isEmpty()) {\n /****** Serialización de los objetos ******/\n //Serialización de los productosVendidos\n FileOutputStream archivo = new FileOutputStream(\"productosVendidos\"+this.getCorreo()+\".dat\");\n ObjectOutputStream guardar= new ObjectOutputStream(archivo);\n //guardamos el array de personas\n guardar.writeObject(productosVendidos);\n archivo.close();\n } else {\n System.out.println(\"Error: No hay datos...\");\n }\n\n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }", "public void guardarTripulante(Tripulante tripulante);", "public void guardarProveedor(Proveedor v){\n pr.save(v);\n }", "public String guardar()\r\n/* 104: */ {\r\n/* 105: */ try\r\n/* 106: */ {\r\n/* 107:132 */ this.servicioDimensionContable.guardar(this.dimensionContable);\r\n/* 108:133 */ addInfoMessage(getLanguageController().getMensaje(\"msg_info_guardar\"));\r\n/* 109:134 */ setEditado(false);\r\n/* 110:135 */ cargarDatos();\r\n/* 111: */ }\r\n/* 112: */ catch (Exception e)\r\n/* 113: */ {\r\n/* 114:137 */ addErrorMessage(getLanguageController().getMensaje(\"msg_error_guardar\"));\r\n/* 115:138 */ LOG.error(\"ERROR AL GUARDAR DATOS\", e);\r\n/* 116: */ }\r\n/* 117:140 */ return \"\";\r\n/* 118: */ }", "public abstract void leerPersistencia();", "public void carroAgregado(){\n System.out.println(\"Su carro fue agregado con exito al sistema\");\n }", "public static boolean save(Grupo grupo) throws SQLException {\n boolean guardado = false;\n if (!exist(grupo.getNombre())) {\n Statement stat = BDConnect.connect().createStatement();\n try {\n stat.executeUpdate(\"INSERT INTO Grupo(nombre) VALUES('\" + grupo.getNombre() + \"')\");\n guardado = true;\n } catch (SQLException e) {\n e.printStackTrace();\n } finally {\n stat.close();\n }\n }\n return guardado;\n }", "@PostMapping(\"/creargrupo\")\n public String create(@ModelAttribute (\"grupo\") Grupo grupo) throws Exception {\n try {\n grupoService.create(grupo);\n return \"redirect:/pertenezco\";\n }catch (Exception e){\n LOG.log(Level.WARNING,\"grupos/creargrupo\" + e.getMessage());\n return \"redirect:/error\";\n }\n }", "@RequestMapping(value = \"/registrarVereda\", method = RequestMethod.POST)\n\tpublic String registrarVereda(@Valid @RequestBody Vereda p) {\n\t\tveredaRepository.save(p);\t\t\n\t\treturn \"Guardado\";\n\t}", "@Test\n\tpublic void validaPeticionSaveRegistro() {\n\t\t// Arrange\n\t\tRegistro registro = new RegistroTestDataBuilder().build();\n\t\tMockito.when(registroRepository.save(registro)).thenReturn(registro);\n\t\t// Act\n\t\tRegistro registroGuardado = new Registro();\n\t\tregistroGuardado = registroService.saveRegistro(registro);\n\t\t// Assert\n\t\tAssert.assertNotNull(registroGuardado);\n\t}", "public void guardarEntidad(E entidad) {\n logger.debug(\"Guardando la entidad: [\" + clasePersistente + \"]\" + entidad);\n getSesion().persist(entidad);\n }", "Motivo create(Motivo motivo);", "Long crear(Espacio espacio);", "public int registrarMovimiento(ModelMovimiento model) {\n\t\tString sql = \"insert into movimientos (id_cuenta, monto, estado, operacion) values (?, ?, ?, ?)\";\n\t\treturn super.update(sql, model.getIdCuenta(), model.getMonto() ,model.isEstado(), model.getIdOperacion());\n\t}", "@PostMapping\n public ResponseEntity<Project> createNewProject(@Valid @RequestBody Project project) {\n\n Project project1 = projectService.saveOrUpdateProject(project);\n return new ResponseEntity<Project>(project1, HttpStatus.CREATED);\n }", "@Override\r\n\tpublic MensajeBean inserta(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.inserta(nuevo);\r\n\t}", "Secuencia createSecuencia();", "public static void genArchivoTokens(){\r\n\t\tString path = AnManager.getPath() + File.separator +\"Resultados Grupo81\" + File.separator+ \"Tokens.txt\";\r\n\t\tFile f = new File(path);\r\n\t\tf.getParentFile().mkdirs(); \r\n\t\ttry {\r\n\t\t\tf.delete(); //Eliminamos si existe algo antes\r\n\t\t\tf.createNewFile();\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Fallo al crear archivo tokens\");\r\n\t\t}\r\n\t}", "private void saveNewCatalog() {\n\n\t}", "public void crearCategoria(Categoria categoria){\n categoriaRepo.save(categoria); \n }", "public Participacao createParticipacao(Participacao model) {\n return participacaoRepository.save(model);\n}", "public void guardar() {\n String msj = \"\";\n int idpagoanulado = daoPagoCuotaAnulado.nuevoID();\n Date SYSDATE = new Date();\n java.sql.Timestamp fechaPagoCuotaAnuladoSQL = new java.sql.Timestamp(SYSDATE.getTime());\n String observacion = txtObservacion.getText();\n int idmotivo = Integer.parseInt(txtCodigoMotivo.getText());\n int idusuario = appLogin.IDUSUARIO;\n int idpago =Integer.parseInt(txtNumeroPago.getText());\n Date fechapago = daoCotizacion.parseFecha(txtFechaPago.getText());\n java.sql.Date fechapagoSQL = new java.sql.Date(fechapago.getTime());\n double mPago = montoPago;\n String numerocomprobante = txtComprobante.getText();\n String numerorecibo = txtRecibo.getText();\n //VALIDACIONES\n if (idmotivo == 0) {\n msj += \"CODIGO DEL MOTIVO DE ANULACION ESTA VACIO.\\n\";\n }\n if (idpago == 0) {\n msj += \"NO HA SELECCIONADO NINGUN PAGO PARA LA ANULACIÓN.\\n\";\n }\n if (msj.isEmpty()) {\n cpca.setIdpagoanulado(idpagoanulado);\n cpca.setFechahoranulado(fechaPagoCuotaAnuladoSQL);\n cpca.setObservacion(observacion);\n cpca.setIdmotivo(idmotivo);\n cpca.setIdusuario(idusuario);\n cpca.setIdpago(idpago);\n cpca.setFechapago(fechapagoSQL);\n cpca.setMonto(mPago);\n cpca.setNumerocomprobante(numerocomprobante);\n cpca.setNumerorecibo(numerorecibo);\n daoPagoCuotaAnulado.agregar(cpca);\n } else {\n JOptionPane.showMessageDialog(null, msj, \"ERRORES\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n @Transactional\n public Producto save(Producto producto) {\n Presentacion presentacion = presentacionDao.findById(producto.getPresentacion().getId());\n producto.setPresentacion(presentacion);\n return productoDao.save(producto);\n }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "@Override\n public void save(Usuario usuario) {\n }", "public static Modelo insertModelo(String NOMB_MODELO){\n Modelo miModelo = new Modelo(NOMB_MODELO);\n miModelo.registrarModelo();\n return miModelo;\n }", "public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }", "public AsociarArchivoSerializado(String nuevoMaest, String registro){\n try{\n salNuevoMaest = new ObjectOutputStream(\n Files.newOutputStream(Paths.get(nuevoMaest)));\n \n salRegistro = new ObjectOutputStream(\n Files.newOutputStream(Paths.get(registro)));\n }\n catch(IOException iOException){\n System.err.println(\"Error al abrir el archivo. Terminado.\");\n System.exit(1);\n }\n }", "public void guardarProductosEnVenta() {\n try {\n //Si hay datos los guardamos...\n \n /****** Serialización de los objetos ******/\n //Serialización de las productosEnVenta\n FileOutputStream archivo = new FileOutputStream(\"productosVentaCliente\"+this.getCorreo()+\".dat\");\n ObjectOutputStream guardar= new ObjectOutputStream(archivo);\n //guardamos el array de productosEnVenta\n guardar.writeObject(productosEnVenta);\n archivo.close();\n \n\n } catch (IOException ioe) {\n System.out.println(\"ERROR: \" + ioe.getMessage());\n } catch (Exception e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n }", "@Override\r\n\tpublic void save(Plate tipo) {\n\t\t\r\n\t}", "public void guardar(Dia dia) {\n Session session = sessionFactory.openSession();\n //la transaccion a relizar\n Transaction tx = null;\n try {\n tx = session.beginTransaction();\n //guardamos el Dia\n session.persist(dia);\n \n tx.commit();\n }\n catch (Exception e) {\n //Se regresa a un estado consistente \n if (tx!=null){ \n tx.rollback();\n }\n e.printStackTrace(); \n } finally {\n //cerramos simpre la sesion\n session.close();\n }\n }", "@Override\n public void salvar(Object pacienteParametro) {\n Paciente paciente;\n paciente = (Paciente) pacienteParametro;\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n em.getTransaction().begin();\n if(paciente.getIdPaciente() == 0){\n em.persist(paciente);\n }else{\n em.merge(paciente);\n }\n em.getTransaction().commit();\n em.close();\n factory.close();\n }", "public void SalvarNovaArtista() {\n\n\t\tartistaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\n\n\t\tartistaRepository.SalvarNovoRegistro(this.artistaModel);\n\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\n\n\t\tartistaModel = null;\n\t}", "public void testCrearDispositivo() {\n\t\tString referencia = \"A0021R\";\n\t\tString nombre = \"Motorola G primera generacion\";\n\t\tString descripcion = \"1 GB de RAM\";\n\t\tint tipo = 1;\n\t\tString foto = \"url\";\n\t\tString emailAdministrador = \"[email protected]\";\n\t\ttry {\n\t\t\tdispositivoBL.crearDispositivo(referencia, nombre, descripcion, tipo, foto, emailAdministrador);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean guardarDatos2(Object dato) {\r\n\t\t\r\n\t\tEntityTransaction transaccion = em.getTransaction();\r\n\t\ttransaccion.begin();\r\n\r\n\t\ttry {\r\n\t\t\tem.persist(dato);\r\n\t\t\tem.flush();\r\n\t\t\ttransaccion.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tif(transaccion.isActive()){\r\n\t\t\t\ttransaccion.rollback();\r\n\t }\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\t//cerrar();\r\n\t\t}\t\t\r\n\t\treturn true;\t\t\r\n\t}", "private static void registrarAuditoriaDetallesPresuTipoProyecto(Connexion connexion,PresuTipoProyecto presutipoproyecto)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getid_empresa().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getcodigo().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getnombre().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "void persiste(UsuarioDetalle usuarioDetalle);", "public boolean guardarFactura(Factura factura) throws Exception;" ]
[ "0.6678984", "0.64921296", "0.63293636", "0.63256073", "0.6312837", "0.624969", "0.62289834", "0.62096816", "0.6191984", "0.6181147", "0.61537516", "0.614642", "0.60783035", "0.60335994", "0.60180444", "0.60065466", "0.5986395", "0.5985504", "0.5909898", "0.58924145", "0.588272", "0.5870023", "0.5851996", "0.5829157", "0.5818023", "0.58094746", "0.58064604", "0.5803307", "0.5794204", "0.57789034", "0.5757815", "0.5749095", "0.57424563", "0.57208574", "0.5707652", "0.56993943", "0.5698439", "0.5693682", "0.5688746", "0.5684163", "0.5681533", "0.56798184", "0.5676775", "0.5667034", "0.56524533", "0.56518304", "0.56438226", "0.5634838", "0.5633491", "0.56326115", "0.5623773", "0.56225294", "0.56184477", "0.56081367", "0.56047314", "0.5601012", "0.5592449", "0.5588865", "0.5575732", "0.5570473", "0.55642426", "0.55602795", "0.55550545", "0.55521494", "0.55459565", "0.5540084", "0.5526695", "0.5520537", "0.54953134", "0.54789627", "0.54733044", "0.5472399", "0.546868", "0.5467621", "0.5467504", "0.5464071", "0.5458068", "0.5455532", "0.54515415", "0.54458594", "0.5441343", "0.54378027", "0.54371333", "0.54343694", "0.5425151", "0.5423798", "0.54228574", "0.54209054", "0.5419084", "0.5417881", "0.5414942", "0.54123783", "0.5411921", "0.5408467", "0.5407576", "0.5406724", "0.5405731", "0.54034", "0.53992134", "0.539838" ]
0.6717545
0
ChessBoard board = ChessBoard.withDefaultPieceSetup(); System.out.println(ChessConsoleUtils.boardToString(board));
public static void main(String[] args) { ConsoleChessGui gui = new ConsoleChessGui(); GameController gameController = new GameController(gui); gameController.run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayBoard(){\r\n System.out.println(board.toString());\r\n }", "public static void makeBoardChess() {\r\n \r\n white = new AllPiece(\"White\");\r\n black = new AllPiece(\"Black\");\r\n \r\n }", "public static void printBoard() {\n int separatorLen = 67;\n StringBuilder boardString = new StringBuilder();\n boardString.append(new String(new char [separatorLen]).replace(\"\\0\",\"*\"));\n boardString.append(\"\\n\");\n for(int y = Y_UPPER_BOUND - 1; y >= 0; y--)\n {\n boardString.append(y + 1).append(\" \");\n boardString.append(\"*\");\n for (int x = 0; x < X_UPPER_BOUND; x++)\n {\n Piece p = Board.board[x + y * X_UPPER_BOUND];\n if(p != null)\n {\n boardString.append(\" \").append(p).append(p.getColor()? \"-B\":\"-W\").append(\" \").append((p.toString().length() == 1? \" \":\"\"));\n }\n else\n {\n boardString.append(\" \");\n }\n boardString.append(\"*\");\n }\n boardString.append(\"\\n\").append((new String(new char [separatorLen]).replace(\"\\0\",\"*\"))).append(\"\\n\");\n }\n boardString.append(\" \");\n for(char c = 'A'; c <= 'H';c++ )\n {\n boardString.append(\"* \").append(c).append(\" \");\n }\n boardString.append(\"*\\n\");\n System.out.println(boardString);\n }", "public void printBoard() {\n \tfor(int i = 7; i >= 0; i--) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tSystem.out.print(\"\"+getPiece(j, i).getColor().toString().charAt(0)+getPiece(j, i).getName().charAt(0)+\"\\t\");\n \t\t}\n \t\tSystem.out.println();\n \t}\n }", "String getBoardString();", "String getBoard();", "public void PrintBoard() {\n\tSystem.out.println(\"printing from class\");\n\t\tString[][] a = this.piece;\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 <- X axis\");\n\t\tSystem.out.println(\" +----------------+ \");\n\t\t\n\t\tfor (int i=0; i<8 ;i++) {\n\t\t\tSystem.out.print(i + \" |\");\n\t\t\tfor (int j=0; j<8;j++) {\n\t\t\t\t\n\t\tSystem.out.print(\"\" + a[i] [j] + \" \");\n\t\t\t\t\t} \n\t\t\tSystem.out.println(\"|\");\n\t\t}\n\t\tSystem.out.println(\" +----------------+ \");\n\t\tSystem.out.println(\" 0 1 2 3 4 5 6 7 \");\n\t\n\t}", "public void showBoard() {\n System.out.println(\"The board is\");\n System.out.println(\"| 1 | 2 | 3 |\\n| 4 | 5 | 6 | \\n| 7 | 8 | 9 |\");\n }", "public static String printBoard(Game board) {\n return board.toString();\n }", "String displayMyBoard();", "public static void printBoard() {\n\t\tSystem.out.println(\"Board:\");\r\n\t\tfor(int i=0; i<BoardSquare.numberOfSquare; i++) {\r\n\t\t\t\r\n\t\t\tSystem.out.print(String.format(\"%4s\", (i+1) + \":\"));\r\n\t\t\tif(BoardGame.board.get(i).isPlayerOne()) System.out.print(\" P1\"); \r\n\t\t\tif(BoardGame.board.get(i).isPlayerTwo()) System.out.print(\" P2\");\r\n\t\t\tif(BoardGame.board.get(i).isHasCard()) System.out.print(\" C\");\t\t\t\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t}", "public void printBoard() {\r\n\t\tBoard.printBoard(this.board);\r\n\t}", "static void printBoard() \r\n {\r\n \tSystem.out.println(\"/---|---|---\\\\\");\r\n \tSystem.out.println(\"| \" + board[0][0] + \" | \" + board[0][1] + \" | \" + \r\n \tboard[0][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[1][0] + \" | \" + board[1][1] + \" | \" + \r\n \tboard[1][2] + \" |\");\r\n \tSystem.out.println(\"|-----------|\");\r\n \tSystem.out.println(\"| \" + board[2][0] + \" | \" + board[2][1] + \" | \" + \r\n \tboard[2][2] + \" |\");\r\n \tSystem.out.println(\"\\\\---|---|---/\");\r\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n\n //Print board\n int c = 0;\n for (Piece piece : board) {\n if (piece == null) {\n sb.append(\"\\t\");\n } else {\n sb.append(piece.pieceString()).append(\"\\t\");\n }\n if (++c % 4 == 0) {\n sb.append(\"\\n\");\n }\n }\n sb.append(\"\\n\");\n\n return sb.toString();\n }", "String drawBoard();", "public static void printBoard(){\n \n System.out.println(board[0][0] + \" | \" + board[0][1] + \" | \" + board[0][2]);\n System.out.println(board[1][0] + \" | \" + board[1][1] + \" | \" + board[1][2]);\n System.out.println(board[2][0] + \" | \" + board[2][1] + \" | \" + board[2][2]);\n \n }", "private static void showBoard()\n {\n System.out.println(board[1] + \" | \" + board[2] + \" | \" + board[3]);\n System.out.println(\"----------\");\n System.out.println(board[4] + \" | \" + board[5] + \" | \" + board[6]);\n System.out.println(\"----------\");\n System.out.println(board[7] + \" | \" + board[8] + \" | \" + board[9]);\n }", "void displayBoard();", "public void printBoard() {\n printStream.println(\n \" \" + positions.get(0) + \"| \" + positions.get(1) + \" |\" + positions.get(2) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(3) + \"| \" + positions.get(4) + \" |\" + positions.get(5) + \"\\n\" +\n \"---------\\n\" +\n \" \" + positions.get(6) + \"| \" + positions.get(7) + \" |\" + positions.get(8) + \"\\n\");\n }", "@Test\n public void testGetChessBoard() {\n assertEquals(chess.getChessBoard(), board);\n }", "@Test\n public void testKnightPosition() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(0, chessBoard.getPiece(0, 1).getRow());\n assertEquals(1, chessBoard.getPiece(0, 1).getColumn());\n\n assertEquals(0, chessBoard.getPiece(0, 6).getRow());\n assertEquals(6, chessBoard.getPiece(0, 6).getColumn());\n\n assertEquals(7, chessBoard.getPiece(7, 1).getRow());\n assertEquals(1, chessBoard.getPiece(7, 1).getColumn());\n\n assertEquals(7, chessBoard.getPiece(7, 6).getRow());\n assertEquals(6, chessBoard.getPiece(7, 6).getColumn());\n }", "public void printShipBoard() {\n\t\tSystem.out.println(Arrays.deepToString(this.shipBoard));\n\t}", "static void showBoard() \n\t{\n\t\tSystem.out.println(\"|---|---|---|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[1] + \" | \" + tictactoeBoard[2] + \" | \" + tictactoeBoard[3] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[4] + \" | \" + tictactoeBoard[5] + \" | \" + tictactoeBoard[6] + \" |\");\n\t\tSystem.out.println(\"|-----------|\");\n\t\tSystem.out.println(\"| \" + tictactoeBoard[7] + \" | \" + tictactoeBoard[8] + \" | \" + tictactoeBoard[9] + \" |\");\n\t\tSystem.out.println(\"|---|---|---|\");\n\t}", "@Test\n public void testKnightLabel() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(\"N\", chessBoard.getPiece(0, 1).getLabel());\n assertEquals(\"N\", chessBoard.getPiece(0, 6).getLabel());\n assertEquals(\"N\", chessBoard.getPiece(7, 1).getLabel());\n assertEquals(\"N\", chessBoard.getPiece(7, 6).getLabel());\n }", "public void initializeBoard() {\n\n\t\t/*\n\t\t * How the array coordinates align with the actual chess board\n\t\t * (row,col) \n\t\t * (7,0) ... ... ... \n\t\t * (7,7) ... ... ... \n\t\t * ... ... ... \n\t\t * (2,0) ...\n\t\t * (1,0) ... \n\t\t * (0,0) ... ... ... (0,7)\n\t\t */\n\n\t\tboolean hasMoved = false;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set white piece row\n\t\tboard[0][0] = new Piece('r', white, hasMoved, 0, 0, PieceArray.A_rookId);\n\t\tboard[0][1] = new Piece('n', white, hasMoved, 0, 1, PieceArray.B_knightId);\n\t\tboard[0][2] = new Piece('b', white, hasMoved, 0, 2, PieceArray.C_bishopId);\n\t\tboard[0][3] = new Piece('q', white, hasMoved, 0, 3, PieceArray.D_queenId);\n\t\tboard[0][4] = new Piece('k', white, hasMoved, 0, 4, PieceArray.E_kingId);\n\t\tboard[0][5] = new Piece('b', white, hasMoved, 0, 5, PieceArray.F_bishopId);\n\t\tboard[0][6] = new Piece('n', white, hasMoved, 0, 6, PieceArray.G_knightId);\n\t\tboard[0][7] = new Piece('r', white, hasMoved, 0, 7, PieceArray.H_rookId);\n\n\t\t// Set white pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[1][i] = new Piece('p', white, hasMoved, 1, i, i + 8);\n\t\t}\n\n\t\t// Set empty rows\n\t\tfor (int row = 2; row < 6; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\t// Set black pawns\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tboard[6][i] = new Piece('p', black, hasMoved, 6, i, i+8);\n\t\t}\n\n\t\t// Set black piece row\n\t\tboard[7][0] = new Piece('r', black, hasMoved, 7, 0, PieceArray.A_rookId);\n\t\tboard[7][1] = new Piece('n', black, hasMoved, 7, 1, PieceArray.B_knightId);\n\t\tboard[7][2] = new Piece('b', black, hasMoved, 7, 2, PieceArray.C_bishopId);\n\t\tboard[7][3] = new Piece('q', black, hasMoved, 7, 3, PieceArray.D_queenId);\n\t\tboard[7][4] = new Piece('k', black, hasMoved, 7, 4, PieceArray.E_kingId);\n\t\tboard[7][5] = new Piece('b', black, hasMoved, 7, 5, PieceArray.F_bishopId);\n\t\tboard[7][6] = new Piece('n', black, hasMoved, 7, 6, PieceArray.G_knightId);\n\t\tboard[7][7] = new Piece('r', black, hasMoved, 7, 7, PieceArray.H_rookId);\n\t}", "public void initializeDebugBoard() {\n\t\tboolean hasNotMoved = false;\n\t\tboolean hasMoved = true;\n\t\tboolean white = true;\n\t\tboolean black = false;\n\n\t\t// Set empty rows\n\t\tfor (int row = 0; row < 8; row++)\n\t\t\tfor (int col = 0; col < 8; col++)\n\t\t\t\tboard[row][col] = null;\n\n\t\tboard[5][4] = new Piece('k', white, hasMoved, 5, 4, PieceArray.E_kingId);\n//\t\tboard[1][4] = new Piece(\"rook\", white, hasMoved, 1, 4);\n\t\tboard[2][2] = new Piece('q', black, hasMoved, 2, 2, PieceArray.A_rookId);\n//\t\tboard[3][2] = new Piece('q', black, hasMoved, 3, 2, PieceArray.H_rookId);\n\t\t\n\n\t\tboard[0][0] = new Piece('k', black, hasMoved, 0, 0, PieceArray.E_kingId);\n//\t\tboard[7][7] = new Piece('r', black, hasNotMoved, 7, 7, PieceArray.A_rookId);\n//\t\tboard[6][7] = new Piece('p', black, hasNotMoved, 6, 7, PieceArray.A_pawnId);\n//\t\tboard[6][6] = new Piece('p', black, hasNotMoved, 6, 6, PieceArray.B_pawnId);\n//\t\tboard[6][5] = new Piece('p', black, hasNotMoved, 6, 5, PieceArray.C_pawnId);\n//\t\tboard[6][4] = new Piece('p', black, hasNotMoved, 6, 4, PieceArray.D_pawnId);\n\t\n//\t\tboard[6][6] = new Piece(\"pawn\", black, hasMoved, 6, 6);\n//\t\tboard[6][7] = new Piece(\"pawn\", black, hasMoved, 6, 7);\n//\t\tboard[6][4] = new Piece(\"pawn\", black, hasMoved, 6, 4);\n//\t\t\t\n//\t\t\n//\t\tboard[4][4] = new Piece(\"pawn\", black, hasMoved, 4,4);\n//\t\tboard[3][5] = new Piece(\"rook\", white,hasMoved,3,5);\n//\t\tboard[1][7] = new Piece(\"pawn\",black,hasMoved,1,7);\n\n\t}", "public String showBoard() {\n return name + \"\\r\\n\" + myBoard.displayMyBoard() + \"\\r\\n\" + opponentsBoard.displayShotsTaken();\n }", "void printBoard(Piece[] B);", "public void printBoard() {\n\t\tSystem.out.print(\"\\r\\n\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\");\n\t\tfor(int i = BOARD_SIZE ; i > 0 ; i--) {\n\t\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\t\tfor(int j = 0; j < BOARD_SIZE ; j++) {\n\t\t\t\tif(j == 0) {\n\t\t\t\t\tSystem.out.print(i + \" |\");\n\t\t\t\t} \n\t\t\t\tif(this.tiles.get(i).get(j).getPiece() != null) {\n\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece().getColor() == PrimaryColor.BLACK) {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" B |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"B Q|\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(this.tiles.get(i).get(j).getPiece() instanceof Soldier)\n\t\t\t\t\t\t\tSystem.out.print(\" W |\");\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tSystem.out.print(\"W Q|\");\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\" |\");\n\t\t\t\t}\n\n\t\t\t\tif(j==BOARD_SIZE-1) {\n\t\t\t\t\tSystem.out.print(\" \" + i); \n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tSystem.out.println(\" ___ ___ ___ ___ ___ ___ ___ ___\");\n\t\tSystem.out.println(\" A | B | C | D | E | F | G | H\\r\\n\");\n\n\t}", "@Test\n public void testKnightSide() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(north, chessBoard.getPiece(0, 1).getSide());\n assertEquals(north, chessBoard.getPiece(0, 6).getSide());\n assertEquals(south, chessBoard.getPiece(7, 1).getSide());\n assertEquals(south, chessBoard.getPiece(7, 6).getSide());\n }", "void printBoardState(Piece[] B,Player J,int N);", "public void printBoard() {\n\t\tSystem.out.println();\n\t\tint i;\n\t\tfor (i = 0; i < 7; i++) {\n\t\t\tSystem.out.print(board[13 - i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.printf(\" \");\n\t\twhile (i < 14) {\n\t\t\tSystem.out.print(board[i - 7] + \" \");\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println();\n\t}", "public ChessBoard() {\n initComponents();\n createChessBoard();\n\n }", "public void printBoard() {\n String value = \"\";\n renderBoard();\n System.out.println(\"\");\n // loop to print out values in rows and columns\n for (int i = 0; i < game.getRows(); i++) {\n for (int j = 0; j < game.getCols(); j++) {\n if (grid[i][j] == 0)\n value = \".\";\n else\n value = \"\" + grid[i][j];\n System.out.print(\"\\t\" + value);\n }\n System.out.print(\"\\n\");\n }\n }", "public void print() {\r\n\t\tObject tmp[] = piece.values().toArray();\r\n\t\tfor (int i = 0; i < piece.size(); i++) {\r\n\t\t\tChessPiece p = (ChessPiece)tmp[i];\r\n\t\t\tSystem.out.println(i + \" \" + p.chessPlayer + \":\" + p.position + \" \" + p.isEnabled());\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(body.countComponents());\r\n\t}", "@Test\n public void testRookLabel() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(\"R\", chessBoard.getPiece(0, 0).getLabel());\n assertEquals(\"R\", chessBoard.getPiece(0, 7).getLabel());\n assertEquals(\"R\", chessBoard.getPiece(7, 0).getLabel());\n assertEquals(\"R\", chessBoard.getPiece(7, 7).getLabel());\n }", "public void displayBoard()\n {\n System.out.println(\"\");\n System.out.println(\" Game Board \");\n System.out.println(\" ---------------------------------\");\n for (int i = 0; i < ROW; i++)\n {\n System.out.print(i+1 + \" | \");\n for (int j = 0; j < COL; j++)\n {\n //board[i][j] = \"A\";\n System.out.print(board[i][j].getPieceName() + \" | \");\n }\n System.out.println();\n }\n System.out.println(\" ---------------------------------\");\n\n System.out.println(\" a b c d e f g h \");\n }", "public void printboard(){\n \tfor(int i=0;i<9;i+=3){\n\t\t\t System.err.println(board[i]+board[i+1]+board[i+2]);\n\t\t\t}\n }", "public Chess() {\n\t\t// TODO Auto-generated constructor stub\n\t\tchessBoard = new int[BOARD_LENGTH][BOARD_LENGTH];\n\t\tpieces = new AbstractPiece[BOARD_NUM_PIECES];\n\t\toldPosition = new Point();\n\t\tokToMove = false;\n\t\tpieceCounter = 0;\n\t\tpieceChosen = 0;\n\t\tnumClicks = 0; \n\t}", "public void printBoard() {\n\t\t// loop through board and add appropriate character based on board\n\t\t// contents\n\n\t\t// for each board column\n\t\tfor (int row = 0; row < board.length; row++) {\n\t\t\t// for each board row\n\t\t\tfor (int col = 0; col < board[row].length; col++) {\n\t\t\t\tif (board[row][col] == 0) {\n\t\t\t\t\tSystem.out.println(\" \");\n\t\t\t\t} else if (board[row][col] == 1) {\n\t\t\t\t\tSystem.out.println(\"X\");\n\t\t\t\t} else if (board[row][col] == 2) {\n\t\t\t\t\tSystem.out.println(\"0\");\n\t\t\t\t}\n\n\t\t\t\t// set the dividers\n\t\t\t\tif (col < board[row].length) {\n\t\t\t\t\tSystem.out.print(\"|\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"-----\");\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check if the board is occupied by player X, or player O, or neither\n\t\t// Print the correct character to the screen depending on the contents\n\t\t// of the square\n\t\t// System.out.print(\"stuff\") will print things on the same row\n\n\t\t// System.out.print(\"/n\") or System.out.println() will print a new line\n\t\t// Don't forget to add in the grid lines!\n\t}", "public ChessRunner(){\n\t\taddMouseListener(this);\n\t\tfor(int i=0;i<8;i++){\n\t\t\tfor (int j=1;j<7;j++)\n\t\t\t\tif(j==1)\n\t\t\t\t\tboard[i][j] = new BlackPawn();\n\t\t\t\telse if(j==6)\n\t\t\t\t\tboard[i][j] = new WhitePawn();\n\t\t\t\telse\n\t\t\t\t\tboard[i][j]= new BlankPiece();\n\t\t}\n\t\tboard[1][0] = new BlackKnight();\n\t\tboard[6][0] = new BlackKnight();\n\t\tboard[0][0] = new BlackRook();\n\t\tboard[7][0] = new BlackRook();\n\t\tboard[2][0] = new BlackBishop();\n\t\tboard[5][0] = new BlackBishop();\n\t\tboard[4][0] = new BlackKing();\n\t\tboard[3][0] = new BlackQueen();\n\t\t\n\t\tboard[1][7] = new WhiteKnight();\n\t\tboard[6][7] = new WhiteKnight();\n\t\tboard[0][7] = new WhiteRook();\n\t\tboard[7][7] = new WhiteRook();\n\t\tboard[2][7] = new WhiteBishop();\n\t\tboard[5][7] = new WhiteBishop();\n\t\tboard[4][7] = new WhiteKing();\n\t\tboard[3][7] = new WhiteQueen();\n\t\t\n\t}", "public String getBoardOverview() {\n String boardOverview = \"\";\n\n for (int y = 0; y < this.boardSize; y++) {\n for (int x = 0; x < this.boardSize; x++) {\n char StoneColor = ' ';\n\n if (!this.fields[x][y].isEmpty()) {\n switch (this.fields[x][y].getStone().getColor()) {\n case BLACK:\n StoneColor = 'B';\n break;\n case WHITE:\n StoneColor = 'W';\n break;\n }\n } else if (this.fields[x][y].isPossibleMove()) {\n StoneColor = 'x';\n }\n\n boardOverview = boardOverview + StoneColor;\n\n }\n // next line\n boardOverview = boardOverview + String.format(\"%n\");\n }\n\n return boardOverview;\n }", "public void DisplayBoard(Board bord);", "public static void printBoard() {\n System.out.println(\"\\t-------------\");\n for (int row = 0; row < SIZE_ROW; row++) {\n System.out.print(\"\\t| \");\n for (int col = 0; col < SIZE_COL; col++) {\n System.out.print(board[row][col] + \" | \");\n }\n System.out.println(\"\\n\\t-------------\");\n }\n }", "public String toString(){\n\t\tchar[][] boardRep = new char[yDim + 2][xDim + 2];\n\t\t\n\t\tfor(int i = 0; i < boardRep.length; i++){\n\t\t\tfor(int j = 0; j < boardRep[i].length; j++){\n\t\t\t\tboardRep[i][j] = ' ';\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < yDim + 2; i++){\n\t\t\tboardRep[i][0] = '.';\n\t\t\tboardRep[i][xDim + 1] = '.';\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < xDim + 2; i++){\n\t\t\tboardRep[0][i] = '.';\n\t\t\tboardRep[yDim + 1][i] = '.';\n\t\t}\n\t\t\n\t\tfor (Gadget g : gadgets){\n\t\t\tif(g instanceof SquareBumper){\n\t\t\t\tboardRep[g.getY() + 1][g.getX() + 1]= '#';\n\t\t\t}else if(g instanceof TriangularBumper){\n\t\t\t\tif(((TriangularBumper) g).getOrientation() % 2 == 0)\t\n\t\t\t\t\tboardRep[g.getY() + 1][g.getX() + 1]= '/';\n\t\t\t\tif(((TriangularBumper) g).getOrientation() % 2 == 1)\t\n\t\t\t\t\tboardRep[g.getY() + 1][g.getX() + 1]= '\\\\';\n\t\t\t}else if(g instanceof CircularBumper){\n\t\t\t\tboardRep[g.getY() + 1][g.getX() + 1]= 'O';\n\t\t\t}else if(g instanceof Absorber){\n\t\t\t\tfor(int i=g.getX(); i < g.getX() + g.getWidth(); i++){\n\t\t\t\t\tfor(int j=g.getY(); j < g.getY() + g.getHeight(); j++){\n\t\t\t\t\t\tboardRep[j + 1][i + 1] = '=';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if(g instanceof Flipper){\n\t\t\t\tFlipper f = (Flipper) g;\n\t\t\t\tif (f.isLeft && f.orientation == 0){\n\t\t\t\t\tboardRep[f.getY()+1][f.getX()+1] = '|';\n\t\t\t\t\tboardRep[f.getY()+2][f.getX()+1] = '|';\n\t\t\t\t} else if(f.orientation == 0){\n\t\t\t\t\tboardRep[f.getY()+1][f.getX()+2] = '|';\n\t\t\t\t\tboardRep[f.getY()+2][f.getX()+2] = '|';\n\t\t\t\t} else{\n\t\t\t\t\tboardRep[f.getY()+1][f.getX()+1] = '-';\n\t\t\t\t\tboardRep[f.getY()+1][f.getX()+2] = '-';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(Ball b : balls){\n\t\t\tboardRep[(int) (b.getY() + 1)][(int) (b.getX() + 1)]= '*';\n\t\t}\n\t\t\n\t\tStringBuffer boardString = new StringBuffer();\n\t\tfor(char[] row : boardRep){\n\t\t\tfor(char c : row){\n\t\t\t\tboardString.append(c);\n\t\t\t}\n\t\t\tboardString.append('\\n');\n\t\t}\n\t\t\n\t\treturn boardString.toString();\n\t}", "@Test\n public void testRookPosition() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(0, chessBoard.getPiece(0, 0).getRow());\n assertEquals(0, chessBoard.getPiece(0, 0).getColumn());\n\n assertEquals(0, chessBoard.getPiece(0, 7).getRow());\n assertEquals(7, chessBoard.getPiece(0, 7).getColumn());\n\n assertEquals(7, chessBoard.getPiece(7, 0).getRow());\n assertEquals(0, chessBoard.getPiece(7, 0).getColumn());\n\n assertEquals(7, chessBoard.getPiece(7, 7).getRow());\n assertEquals(7, chessBoard.getPiece(7, 7).getColumn());\n }", "public Piece[][] createStandardChessboard(Player whitePlayer, Player blackPlayer) {\t\t\r\n\t\tPiece[][] start_board = {\r\n\t\t\t\t{new Rook(0,0,blackPlayer), new Knight(1,0,blackPlayer), new Bishop(2,0,blackPlayer), new Queen(3,0,blackPlayer),new King(4,0,blackPlayer), new Bishop(5,0,blackPlayer), new Knight(6,0,blackPlayer), new Rook(7,0,blackPlayer)},\r\n\t\t\t\t{new Pawn(0,1,blackPlayer), new Pawn(1,1,blackPlayer), new Pawn(2,1,blackPlayer), new Pawn(3,1,blackPlayer),new Pawn(4,1,blackPlayer), new Pawn(5,1,blackPlayer), new Pawn(6,1,blackPlayer), new Pawn(7,1,blackPlayer)},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{null, null, null, null,null, null, null, null},\r\n\t\t\t\t{new Pawn(0,6,whitePlayer), new Pawn(1,6,whitePlayer), new Pawn(2,6,whitePlayer), new Pawn(3,6,whitePlayer),new Pawn(4,6,whitePlayer), new Pawn(5,6,whitePlayer), new Pawn(6,6,whitePlayer), new Pawn(7,6,whitePlayer)},\r\n\t\t\t\t{new Rook(0,7,whitePlayer), new Knight(1,7,whitePlayer), new Bishop(2,7,whitePlayer), new Queen(3,7,whitePlayer),new King(4,7,whitePlayer), new Bishop(5,7,whitePlayer), new Knight(6,7,whitePlayer), new Rook(7,7,whitePlayer)}\r\n\t\t};\r\n\t\treturn start_board;\r\n\t}", "private void getBoard() {\n gameBoard = BoardFactory.makeBoard();\n }", "public void printBoard() {\n System.out.println(\"---+---+---\");\n for (int x = 0; x < boardLength; x++) {\n for (int y = 0; y < boardWidth; y++) {\n char currentPlace = getFromCoordinates(x, y);\n System.out.print(String.format(\" %s \", currentPlace));\n\n if (y != 2) {\n System.out.print(\"|\");\n }\n }\n System.out.println();\n System.out.println(\"---+---+---\");\n }\n }", "public static void printBoard() {\n\t\tfor (int i = 0; i<3; i++) {\n\t\t\tSystem.out.println();\n\t\t\tfor (int j = 0; j<3; j++) {\n\t\t\t\tif (j == 0) {\n\t\t\t\t\tSystem.out.print(\"| \");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(board[i][j] + \" | \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args) {\n\n Board myboard = new Board(8,8);\n System.out.println(myboard.drawBoard());\n myboard.boardToLetters();\n //System.out.println(myboard.drawBoard());\n // myboard.boardToFigures();\n // System.out.println(myboard.drawBoard());\n\n System.out.println(\"------------------- Movimientos Posibles\");\n //myboard.obtenerPiezasPorColor();\n\n Coordinate coordinate = new Coordinate(4,3);\n Piece pieza = myboard.obtenerPiezaCoordenadas(coordinate);\n Movimientos movimientos = new Movimientos(pieza, myboard);\n ArrayList<Coordinate> listaMovimientos = new ArrayList<>(movimientos.obtenerMovimientos());\n\n //System.out.println(piece.toString());\n for(Coordinate coordenadas : listaMovimientos)\n {\n System.out.println(coordenadas.toString());\n }\n\n if(listaMovimientos.isEmpty())\n {\n System.out.println(\"Esta vacia\");\n }\n }", "public void dumpCommand() {\r\n System.out.println(_board);\r\n }", "public void printBoard() {\r\n\t\tif (getOpenTiles() != 0) {\r\n\t\t\tSystem.out.println(\"\\n\\nCurrent open tiles: \" + getOpenTiles() + \" | Total moves: \" + getMoves() + \" | Current board:\");\r\n\t\t}for (int i = 0; i < gameBoard.length; i++) {\r\n\t\t\tfor (int j = 0; j < gameBoard[i].length; j++) {\r\n\t\t\t\tif (gameBoard[i][j] != 0) {\r\n\t\t\t\t\tSystem.out.print(gameBoard[i][j]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}System.out.print(\" | \");\r\n\t\t\t}System.out.print(\"\\n--+\");\r\n\t\t\tfor (int k = 0; k < getSize(); k++) {\r\n\t\t\t\tSystem.out.print(\"---+\");\r\n\t\t\t}System.out.println();\r\n\t\t}\r\n\t}", "public Board getBoard ();", "public void PrintBoard(Board b);", "public static String printOpenBoard(Game board) {\n return board.openBoardToString();\n }", "public Board() {\n //Create all pieces\n board[0][0] = new Rook(\"black\", 0, 0);\n board[0][1] = new Knight(\"black\", 0, 1);\n board[0][2] = new Bishop(\"black\", 0, 2);\n board[0][3] = new Queen(\"black\", 0, 3);\n board[0][4] = new King(\"black\", 0, 4);\n board[0][5] = new Bishop(\"black\", 0, 5);\n board[0][6] = new Knight(\"black\", 0, 6);\n board[0][7] = new Rook(\"black\", 0, 7);\n\n board[7][0] = new Rook(\"white\", 7, 0);\n board[7][1] = new Knight(\"white\", 7, 1);\n board[7][2] = new Bishop(\"white\", 7, 2);\n board[7][3] = new Queen(\"white\", 7, 3);\n board[7][4] = new King(\"white\", 7, 4);\n board[7][5] = new Bishop(\"white\", 7, 5);\n board[7][6] = new Knight(\"white\", 7, 6);\n board[7][7] = new Rook(\"white\", 7, 7);\n\n for (int j = 0; j < 8; j++) {\n board[1][j] = new Pawn(\"black\", 1, j);\n board[6][j] = new Pawn(\"white\", 6, j);\n }\n\n //Printing everything\n for (Piece[] a : board) {\n for (Piece b : a) {\n System.out.printf(\"%-15s\", \"[\" + b + \"]\");\n }\n System.out.println(\"\");\n }\n }", "public void showGameBoard() {\n for (int row = 0; row < BOARD_SIZE; row++) {\n for (int col = 0; col < BOARD_SIZE; col++) {\n System.out\n .printf(\"%3d\", playingBoard[row][col].getMoveNumber());\n if (col == BOARD_SIZE - 1) {\n System.out.println();\n }\n }\n }\n }", "private static void printBoard() {\n\n\t//\tJOptionPane.showMessageDialog(null, \"Heyoo\", \".-*Board*-.\", -1);\n\t\t//String name = JOptionPane.showInputDialog(\"Vat is dain name?\");\n\t\t//JOptionPane.showMessageDialog(null, \"Aiight you good, \" + name);\n\t\t\n\t\t\n\t\tString[] options = {\"Sten\", \"Sax\", \"Påse\"};\n\t\tString Val = (String)JOptionPane.showInputDialog(null, \"Sten, Sax eller Påse?\",\n \"Game nr\", JOptionPane.QUESTION_MESSAGE, null, options, options[2]);\n\t\t\n\t\t\n\t\t\n\t}", "@Test\n public void testKingLabel() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(\"K\", chessBoard.getPiece(0, 4).getLabel());\n assertEquals(\"K\", chessBoard.getPiece(7, 4).getLabel());\n }", "public String toString(){\n\t\tString board = \"\";\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tif(theGrid[i][j]){ //iterate through, if cell is alive, mark with *\n\t\t\t\t\tboard += \"*\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tboard += \" \"; //else, [space]\n\t\t\t\t}\n\t\t\t}\n\t\t\tboard += \"\\n\";//create a new line, to create the board\n\t\t}\n\t\treturn board; //return the board\n\t}", "public void Display_Boards(){\r\n\t\tfor(int i=0; i<13; i++){\r\n\t\t\tdisplay.putStaticLine(myBoard.Display(i)+\" \"+hisBoard.Display(i));\r\n\t\t}\r\n\t}", "public String toString() {\n\t\tString str = \"\\n \";\n\t\tfor (int i = 1; i <= board.length; i++) {\n\t\t\tstr += i + \" \";\n\t\t}\n\t\tstr = str.stripTrailing() + \"\\n\";\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tstr += (i+1) + \" \";\n\t\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\t\tif (board[i][j] == Disc.WHITE) {\n\t\t\t\t\tstr += \"W \";\n\t\t\t\t} else if (board[i][j] == Disc.BLACK) {\n\t\t\t\t\tstr += \"B \";\n\t\t\t\t} else {\n\t\t\t\t\tstr += \"- \";\n\t\t\t\t}\n\t\t\t}\n\t\t\tstr = str.stripTrailing() + \"\\n\";\n\t\t}\n\t\treturn str;\n\t}", "public String toString()\n {\n String boardString = \"\";\n int space = 1;\n for(int i = 0; i < NUM_SQUARES; i++)\n {\n boardString += \"| \" + board[i].toString() + \" | \";\n //Make a new line every 10 squares\n if(space == 10 || space == 20 || space == 30 || space == 40 || space == 50 || space == 60 || space == 70 || space == 80 || space == 90) boardString += \"\\n\";\n space++;\n }\n return boardString;\n }", "@Test\n public void testQueenLabel() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(\"Q\", chessBoard.getPiece(0, 3).getLabel());\n assertEquals(\"Q\", chessBoard.getPiece(7, 3).getLabel());\n }", "@Test\n public void testKingPosition() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(0, chessBoard.getPiece(0, 4).getRow());\n assertEquals(4, chessBoard.getPiece(0, 4).getColumn());\n\n assertEquals(7, chessBoard.getPiece(7, 4).getRow());\n assertEquals(4, chessBoard.getPiece(7, 4).getColumn());\n }", "public String toString()\n\t{\n\t\tString s = \"\";\n\t\tfor(int r = 0; r < board.length; r++)\n\t\t{\n\t\t\tfor(int c = 0; c < board[0].length; c++)\n\t\t\t{\n\t\t\t\ts += \"|\" + board[r][c];\n\t\t\t}\t\t\t\t\n\t\t\ts += \"|\" + \"\\n\" + \"-------------------\" + \"\\n\";\n\t\t}\n\t\treturn s;\n\t}", "private static void showBoard() {\n for (int i = 1; i < 10; i++) {\n for (int j = 1; j < 4; j++) {\n System.out.println(j + \".\" + board[i]);\n }\n\n }\n }", "public static void drawBoard(){\n\t\tSystem.out.println(\"\\n\\t A B C\");\r\n\t\tSystem.out.println(\"\\t .-----------.\");\r\n\t\tSystem.out.println(\"\\t1 |_\"+TicTac.place[0]+\"_|_\"+TicTac.place[1]+\"_|_\"+TicTac.place[2]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t2 |_\"+TicTac.place[3]+\"_|_\"+TicTac.place[4]+\"_|_\"+TicTac.place[5]+\"_|\\n\");\r\n\t\tSystem.out.println(\"\\t3 |_\"+TicTac.place[6]+\"_|_\"+TicTac.place[7]+\"_|_\"+TicTac.place[8]+\"_|\");\r\n\t\tSystem.out.println(\"\\t '-----------'\");\r\n\t}", "@Test\n public void testPawnLabel() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n // compare the label of the pawn on the table to the correct label\n for (int i = 0; i < 8; ++i) {\n assertEquals(\"P\", chessBoard.getPiece(1, i).getLabel());\n assertEquals(\"P\", chessBoard.getPiece(6, i).getLabel());\n }\n }", "public void gameBoard()\t\n\t{\n\t\tSystem.out.println();\n\t\t\n\t\t// for loop to read through the board array\n\t\tfor( int i = 0; i < board.length; i++ )\n\t\t{\n\t\t\tboard[ i ] = \" \";\n\t\t\t\n\t\t} // end of for( int i = 0; i < board.length; i++ )\n\t\t\n\t\t// prints the top vertical lines to create the board\n\t\tSystem.out.println( \" \" + board[ 1 ] + \" | \" + board[ 2 ] + \" | \" \n\t\t + board[ 3 ] );\n\t\t\n\t\t// prints top most horizontal line to create the board\n\t\tSystem.out.println( \"____________________________\");\n\t\t\n\t\t// prints the middle vertical lines to create the board\n\t\tSystem.out.println( \" \" + board[ 4 ] + \" | \" + board[ 5 ] + \" | \" \n + board[ 6 ] );\n\t\t\n\t\t// prints the second horizontal line to create the board\n\t\tSystem.out.println( \"____________________________\");\n\t\t\n\t\t// prints the middle vertical lines to create the board\n\t\tSystem.out.println( \" \" + board[ 7 ] + \" | \" + board[ 8 ] + \" | \" \n + board[ 9 ] );\n\t\t\n\t}", "public void showBoardState() {\n System.out.print(\" \");\n //top row X axis\n for(int i = 0; i < boardSize; i++){\n System.out.print(\" \" + i + \" \");\n }\n System.out.println();\n for (int i = 0; i < boardSize; i++) {\n //conversion 0-9 to char for display as Y axis\n System.out.print(\" \" + (char)(i + 'A') + \" \");\n for (int j = 0; j < boardSize; j++) {\n System.out.print(\" \" + board[i][j] + \" \");\n }\n System.out.println();\n\n }\n System.out.println();\n }", "@Test\n public void testBishopLabel() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(\"B\", chessBoard.getPiece(0, 2).getLabel());\n assertEquals(\"B\", chessBoard.getPiece(0, 5).getLabel());\n assertEquals(\"B\", chessBoard.getPiece(7, 2).getLabel());\n assertEquals(\"B\", chessBoard.getPiece(7, 5).getLabel());\n }", "public String getBoard() {\r\n\t\tString r = \"\";\r\n\t\tfor (int y = 0; y < 3; y++) {\r\n\t\t\tfor (int x = 0; x < 3; x++) {\r\n\t\t\t\tr = r + board[y][x];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "public String toString() {\n StringBuilder s = new StringBuilder(); // Initialize new string builder\n s.append(N + \"\\n\"); // Append board dimension to string\n\n for (int[] row : tiles) {\n for (int tile : row)\n s.append(String.format(\"%2d \", tile)); // Append formatted board tiles string\n s.append(\"\\n\"); // Append new line to string\n }\n return s.toString(); // Return string representation of board\n }", "public void showBoard(){\n }", "public void displayBoard() {\n newLine();\n for (int row = _board[0].length - 1; row >= 0; row -= 1) {\n String pair = new String();\n for (int col = 0; col < _board.length; col += 1) {\n pair += \"|\";\n pair += _board[col][row].abbrev();\n }\n System.out.println(pair + \"|\");\n newLine();\n }\n }", "public void newGame() {\n \tturn = PieceColor.White;\n \t\n \t//the middle are empty squares\n \tfor(int i = 2; i < 6; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tsetPiece(j, i, new NoPiece(j, i));\n \t\t}\n \t}\n \t\n \t//pawns\n \tfor(int i = 0; i < 8; i++) {\n \t\t//make these pawns\n \t\tsetPiece(i, 1, new Pawn(i, 1, PieceColor.White, this));\n \t\tsetPiece(i, 6, new Pawn(i, 6, PieceColor.Black, this));\n \t}\n \t\n \t//white back row\n \tsetPiece(0, 0, new Rook(0, 0, PieceColor.White, this));\n \tsetPiece(1, 0, new Knight(1, 0, PieceColor.White, this));\n \tsetPiece(2, 0, new Bishop(2, 0, PieceColor.White, this));\n \tsetPiece(3, 0, new Queen(3, 0, PieceColor.White, this));\n \tsetPiece(4, 0, new King(4, 0, PieceColor.White, this));\n \tsetPiece(5, 0, new Bishop(5, 0, PieceColor.White, this));\n \tsetPiece(6, 0, new Knight(6, 0, PieceColor.White, this));\n \tsetPiece(7, 0, new Rook(7, 0, PieceColor.White, this));\n \t\n \t//black back row\n \tsetPiece(0, 7, new Rook(0, 7, PieceColor.Black, this));\n \tsetPiece(1, 7, new Knight(1, 7, PieceColor.Black, this));\n \tsetPiece(2, 7, new Bishop(2, 7, PieceColor.Black, this));\n \tsetPiece(3, 7, new Queen(3, 7, PieceColor.Black, this));\n \tsetPiece(4, 7, new King(4, 7, PieceColor.Black, this));\n \tsetPiece(5, 7, new Bishop(5, 7, PieceColor.Black, this));\n \tsetPiece(6, 7, new Knight(6, 7, PieceColor.Black, this));\n \tsetPiece(7, 7, new Rook(7, 7, PieceColor.Black, this));\n \t\n \t//store locations of king so they can be checked\n \twKing = new Square(4, 0);\n \tbKing = new Square(4, 7);\n }", "private void generateBoard(){\n\t}", "public static void printCheckerboard(int width,int height)\r\n{\n\tfor (int row=0; row<width; row++)\r\n\t{\r\n\r\n\t // for each column in this row\r\n\t for (int col=0; col<height; col++)\r\n\t {\r\n\t\t if (row % 2 == 0)\r\n\t\t\t{\r\n\t\t\t \tif (col % 2 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\"#\");\r\n\t\t\t \t\t}\r\n\t\t\t \tif (col % 1 == 0)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tSystem.out.print(\" \");\r\n\t\t\t \t\t}\r\n\t\t\t}\r\n\t\t if (row % 1 == 0)\r\n\t\t {\r\n\t\t\t\tif (col % 2 == 0)\r\n\t\t \t\t\t{\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t \t\t\t}\r\n\t\t\t\r\n\t\t \t\tif (col % 1 == 0)\r\n\t\t \t\t\t{\r\n\t\t \t\t\t\tSystem.out.print(\"#\");\r\n\t\t \t\t\t}\r\n\t\t }\r\n\t\t System.out.println(\"\");\r\n\t }\r\n\t System.out.println(\"\");\r\n\t}\r\n}", "public String drawBoard() {\n fillBoard();\n return \"\\n\" +\n \" \" + boardArray[0][0] + \" | \" + boardArray[0][1] + \" | \" + boardArray[0][2] + \" \\n\" +\n \"------------\\n\" +\n \" \" + boardArray[1][0] + \" | \" + boardArray[1][1] + \" | \" + boardArray[1][2] + \" \\n\" +\n \"------------\\n\" +\n \" \" + boardArray[2][0] + \" | \" + boardArray[2][1] + \" | \" + boardArray[2][2] + \" \\n\";\n }", "public interface Board {\n\n void setupBoard(int gridSize); //create the initial board\n\n String displayShotsTaken(); //return the board to print to screen showing shots taken, not boat location\n\n String displayMyBoard(); //return players board with ships;\n\n boolean takeShot(Point shot); //take a shot against this board\n\n boolean isGameOver(); //check if game is over.\n}", "public String toString() {\n\t\t// Variables\n\t\tString gameboard;\n\t\tchar[] firstLetter = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O' };\n\n\t\t// Top\n\t\tgameboard = \" ===============================================================\\n\";\n\n\t\t// Middle\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\t// Beginning of the line\n\t\t\tgameboard += \" \" + firstLetter[i] + \" ||\";\n\n\t\t\t// Letters\n\t\t\tfor (int j = 0; j < 15; j++) {\n\t\t\t\tif (this.grid[i][j].getTile().getLetter() == Character.MIN_VALUE) {\n\t\t\t\t\tif (this.grid[i][j].getScoreMult() > 1)\n\t\t\t\t\t\tgameboard += \" * \";\n\t\t\t\t\telse\n\t\t\t\t\t\tgameboard += \" . \";\n\t\t\t\t} else {\n\t\t\t\t\tgameboard += \" \" + this.grid[i][j].getTile().getLetter() + \" \";\n\t\t\t\t}\n\t\t\t\tif (j != 14)\n\t\t\t\t\tgameboard += '|';\n\t\t\t}\n\n\t\t\t// End of the line\n\t\t\tgameboard += \"||\\n\";\n\t\t\tif (i != 14)\n\t\t\t\tgameboard += \" ||---|---|---|---|---|---|---|---|---|---|---|---|---|---|---||\\n\";\n\t\t}\n\n\t\t// Bottom\n\t\tgameboard += \" ===============================================================\\n\";\n\t\tgameboard += \" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\";\n\n\t\treturn gameboard;\n\t}", "@Test\n public void testKingSide() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(north, chessBoard.getPiece(0, 4).getSide());\n assertEquals(south, chessBoard.getPiece(7, 4).getSide());\n }", "@Test\n public void testBishopPosition() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(0, chessBoard.getPiece(0, 2).getRow());\n assertEquals(2, chessBoard.getPiece(0, 2).getColumn());\n\n assertEquals(0, chessBoard.getPiece(0, 5).getRow());\n assertEquals(5, chessBoard.getPiece(0, 5).getColumn());\n\n assertEquals(7, chessBoard.getPiece(7, 2).getRow());\n assertEquals(2, chessBoard.getPiece(7, 2).getColumn());\n\n assertEquals(7, chessBoard.getPiece(7, 5).getRow());\n assertEquals(5, chessBoard.getPiece(7, 5).getColumn());\n }", "public void printBoard()\n {\n // Print column numbers;\n System.out.print(\" \");\n for (int index = 0; index < columns; index++)\n System.out.print(\" \" + index);\n\n System.out.println();\n\n // Print the row numbers and the board contents.\n for (int index = 0; index < rows; index++)\n {\n System.out.print(index);\n\n for (int index2 = 0; index2 < columns; index2++)\n System.out.print(\" \" + board[index][index2]);\n\n System.out.println();\n }\n\n }", "@Test\n public void testRookSide() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(north, chessBoard.getPiece(0, 0).getSide());\n assertEquals(north, chessBoard.getPiece(0, 7).getSide());\n assertEquals(south, chessBoard.getPiece(7, 0).getSide());\n assertEquals(south, chessBoard.getPiece(7, 7).getSide());\n }", "@Override\n public void printBoard(PrintStream output) {\n this.board.printBoard();\n }", "public void consoleBoardDisplay(){\n\t\tString cell[][] = ttt.getCells();\n\t\tSystem.out.println(\"\\n\" +\n\t\t\t\"R0: \" + cell[0][0] + '|' + cell[0][1] + '|' + cell[0][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R1: \" + cell[1][0] + '|' + cell[1][1] + '|' + cell[1][2] + \"\\n\" +\n\t\t\t\" \" + '-' + '+' + '-' + '+' + '-' + \"\\n\" +\n\t\t\t\"R2: \" + cell[2][0] + '|' + cell[2][1] + '|' + cell[2][2] + \"\\n\"\n\t\t);\n\t}", "@Override\n\tpublic String toString() {\n\t\tString result = \"-------------------\\n\";\n\t\tfor (Cell[] cellRow : board) {\n\t\t\tresult += \"|\";\n\t\t\tfor (Cell cell : cellRow) {\n\t\t\t\tresult += (cell.val == 0 ? \" \" : cell.val) + \"|\";\n\t\t\t}\n\t\t\tresult += \"\\n-------------------\\n\";\n\t\t}\n\t\treturn result += \"\\n\" + toTest();\n\t}", "public Board() {\n this.board = new Piece[16];\n }", "void drawBoard(Board board);", "@Override\n public String toString() {\n return String.valueOf(playerPiece);\n }", "public void draw()\n\t{\n\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t\n\t\tfor (int i = 0; i < board_size; i++)\n\t\t{\n\t\t\tSystem.out.print(board_size - i + \" |\");\n\t\t\t\n\t\t\tfor (int j = 0; j < board_size; j++)\n\t\t\t{\n\t\t\t\tif (getPiece(i,j) == null) {System.out.print(\" |\");}\n\t\t\t\telse {System.out.print(\" \" + getPiece(i,j).getSymbol().toChar() + \" |\");}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\" |-------------------------------|\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" A B C D E F G H \\n\");\n\t}", "public void printBoard() {\n System.out.println(\"Updated board:\");\n for (int row = 0; row < size; row++) {\n for (int col = 0; col < size; col++) {\n\n System.out.print(grid[row][col] + \" \");\n\n }\n System.out.println(\"\");\n }\n }", "public String getSlackRepresentationOfBoard() {\n String boardBorders[] = {\"```| \",\n \" | \",\n \" | \",\n \" |\\n|---+---+---|\\n| \",\n \" | \",\n \" | \",\n \" |\\n|---+---+---|\\n| \",\n \" | \",\n \" | \",\n \" |```\"};\n int boardBordersIndex = 0;\n StringBuilder boardString = new StringBuilder();\n for(int row = 0; row < BOARD_SIZE; row ++ ){\n for(int col = 0; col <BOARD_SIZE; col ++ ){\n boardString.append( boardBorders[boardBordersIndex] );\n boardString.append( getTokenAsCharFromBoardPosition(row, col, boardBordersIndex+1));\n boardBordersIndex++;\n }\n }\n boardString.append( boardBorders[boardBordersIndex] );\n return boardString.toString();\n }", "private void displayBoard() {\r\n\r\n for (int r = 0; r < 8; r++) {\r\n for (int c = 0; c < 8; c++) {\r\n if (model.pieceAt(r, c) == null)\r\n board[r][c].setIcon(null);\r\n else if (model.pieceAt(r, c).player() == Player.WHITE) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(wPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(wRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(wKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(wBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(wQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(wKing);\r\n } else if (model.pieceAt(r, c).player() == Player.BLACK) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(bPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(bRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(bKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(bBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(bQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(bKing);\r\n }\r\n repaint();\r\n }\r\n }\r\n if (model.inCheck(Player.WHITE))\r\n JOptionPane.showMessageDialog(null, \"White King in Check\");\r\n if (model.inCheck(Player.BLACK))\r\n JOptionPane.showMessageDialog(null, \"Black King in Check\");\r\n if (model.movingIntoCheck())\r\n JOptionPane.showMessageDialog(null, \"Cannot move into check\");\r\n if (model.isComplete())\r\n JOptionPane.showMessageDialog(null, \"Checkmate\");\r\n }", "public void printBoard() {\n\t\tfor (int row=8; row>=0;row--){\n\t\t\tfor (int col=0; col<9;col++){\n\t\t\t\tSystem.out.print(boardArray[col][row]);\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t}", "public void displayBoard(Board board) { //Print the whole current board\n System.out.print(\"\\n \");\n System.out.print(\"A B C D E F G H\");\n System.out.println();\n for (int row = 0; row < BOARD_SIZE; row++) {\n System.out.print((row + 1) + \" \");\n for (int column = 0; column < BOARD_SIZE; column++) {\n System.out.print(board.board[row][column] + \" \");\n }\n System.out.println();\n }\n System.out.println();\n }", "private void printBoard() {\r\n for (int i = 0; i < board.length; i++) {\r\n for (int j = 0; j < board[i].length; j++) {\r\n System.out.print(board[j][i] + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }", "public void ShowBoard(){\n System.out.println(\" ___________{5}_____{4}_____{3}_____{2}_____{1}_____{0}____________\");\n System.out.println(\"| ____ ____ ____ ____ ____ ____ ____ ____ |\");\n System.out.printf(\"| | | [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] | | |\\n\",\n this.gameBoard[5], this.gameBoard[4], this.gameBoard[3],\n this.gameBoard[2], this.gameBoard[1], this.gameBoard[0]);\n System.out.println(\"| | | | | |\");\n System.out.printf(\"| | %2d | ____ ____ ____ ____ ____ ____ | %2d | |\\n\",\n this.gameBoard[6], this.gameBoard[13]);\n System.out.printf(\"| |____| [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] [_%2d_] |____| |\\n\",\n this.gameBoard[7], this.gameBoard[8], this.gameBoard[9],\n this.gameBoard[10], this.gameBoard[11], this.gameBoard[12]);\n System.out.println(\"|_________________________________________________________________|\");\n }" ]
[ "0.7763352", "0.757483", "0.7244557", "0.72361994", "0.71542615", "0.7110761", "0.71063465", "0.7086097", "0.70438296", "0.70226705", "0.7002536", "0.6964183", "0.695147", "0.6938701", "0.69326484", "0.6924349", "0.6899696", "0.6879735", "0.6855731", "0.6809086", "0.68090457", "0.676738", "0.6755494", "0.67473197", "0.67404366", "0.6738526", "0.6680003", "0.66395986", "0.66329074", "0.6622135", "0.6609697", "0.6605999", "0.6591256", "0.6578279", "0.6574329", "0.6553183", "0.65483594", "0.65412617", "0.6532957", "0.6532118", "0.6528737", "0.6527594", "0.6527086", "0.6524868", "0.6521233", "0.6513284", "0.6511456", "0.6510921", "0.65098363", "0.65095586", "0.6508061", "0.64982826", "0.6497951", "0.6497151", "0.6491267", "0.64875203", "0.64809316", "0.64661956", "0.6461142", "0.64578646", "0.64438987", "0.6441505", "0.64379096", "0.6435918", "0.6426945", "0.6421533", "0.64199513", "0.6415936", "0.640342", "0.6395491", "0.6392728", "0.63821024", "0.6380952", "0.6378087", "0.6371199", "0.6357", "0.6353915", "0.6351951", "0.6351032", "0.6342374", "0.6337532", "0.63315225", "0.63296163", "0.6329472", "0.632809", "0.6324972", "0.6324704", "0.6322747", "0.6322138", "0.63140154", "0.6308858", "0.6299495", "0.6283567", "0.6281593", "0.6280765", "0.62742", "0.62718546", "0.6268522", "0.6265214", "0.6257281", "0.62561303" ]
0.0
-1
Interface for receipt scanner
public interface ReceiptScanService { /** * Return a {@link Receipt} object from imagePath * @param imagePath an absolute file path for image * @return {@link Receipt} */ public Receipt getReceiptFromImage(String imagePath); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printReceipt(){\n\t\t//TO DO\n\t\t\n\t}", "public interface ScannerFunctions extends Printer{\n void scan();\n}", "public TerminalScanReceiver() {\n\t super(StorageLevel.MEMORY_ONLY());\n\t }", "public interface BarcodeCapturedListener {\n\n /**\n * Will receive the barcode as a string anytime one barcode is captured. TODO maybe it shouldn't ever return null and it can be specified in the contract\n *\n * @param barcodeString\n */\n void barcodeCaptured(String barcodeString);\n\n}", "public interface PrintReciepts {\r\n public void printReciept();\r\n public void printRefund();\r\n}", "public void printReceipt(Receipt receipt){\n System.out.println(receipt.toString());\n }", "public abstract void generateReceipt(Transaction trans);", "public interface IPrintReceiptService {\n String calculateAndPrintReceiptWithTax(Receipt receipt);\n}", "public synchronized void onReceipt(DatagramPacket packet) {\r\n\t\ttry {\r\n\t\t\tthis.notify();\r\n\t\t\t/*\r\n\t\t\t * if we arent receiving change our state to receiving and only take packets\r\n\t\t\t * from this port number\r\n\t\t\t */\r\n\t\t\tint packetPort = packet.getPort();\r\n\t\t\tif (currentPacketPort == null) {\r\n\t\t\t\tcurrentPacketPort = packetPort;\r\n\t\t\t}\r\n\t\t\tif (/*currentPacketPort == packetPort*/true) {\r\n\t\t\t\tbyte[] data = packet.getData();\r\n\t\t\t\tSystem.out.println(printPacketContent(packet) + \" Broker received\");\r\n\t\t\t\t/*\r\n\t\t\t\t * if its a creation check to see if the topic exists and send an ack\r\n\t\t\t\t */\r\n\t\t\t\tif (data[0] == Constants.CREATION) {\r\n\t\t\t\t\t//terminal.println(\"Creation Received From The Publisher\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\tcheckTopic(topic, packet);\r\n\t\t\t\t\tcurrentPacketPort = null;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its a publication store the packets in the sorted treemap, change state to\r\n\t\t\t\t\t * receiving pub\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.PUBLICATION) {\r\n\t\t\t\t\t//terminal.println(\"Publication Received From The Publisher\");\r\n\t\t\t\t\tstate = Constants.BKR_RECEIVING_PUB;\r\n\t\t\t\t\t//add check to see if it is for the currentTransmission\r\n\t\t\t\t\taddToReceivedPackets(packet);\r\n\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * its a subscription add the subscriber to the topic if it exists and send an\r\n\t\t\t\t\t * ack\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.SUBSCRIPTION) {\r\n\t\t\t\t\t//terminal.println(\"Subscription recieved from Subscriber.\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tif (subscriberMap.containsKey(topic)) {\r\n\t\t\t\t\t\tArrayList<Integer> subscriberPorts = subscriberMap.get(topic);\r\n\t\t\t\t\t\tif(!subscriberPorts.contains(packet.getPort())) {\r\n\t\t\t\t\t\t\tsubscriberMap.get(topic).add(packet.getPort());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its an unsubscription remove that sub from the topics list of port numbers\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.UNSUBSCRIPTION) {\r\n\t\t\t\t\t//terminal.println(\"Unsubscription recieved from Subscriber.\");\r\n\t\t\t\t\tString topic = processMessageFromPacket(packet);\r\n\t\t\t\t\tif (subscriberMap.containsKey(topic)) {\r\n\t\t\t\t\t\tArrayList<Integer> topicSubscriptions = subscriberMap.get(topic);\r\n\t\t\t\t\t\tfor (int index = 0; index < topicSubscriptions.size(); index++) {\r\n\t\t\t\t\t\t\tif (topicSubscriptions.get(index) == packet.getPort()) {\r\n\t\t\t\t\t\t\t\ttopicSubscriptions.remove(index);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its an ack remove the acked packet from the queue\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.ACK) {\r\n\t\t\t\t\t// remove the acked packet from packetsAwaitingAck\r\n\t\t\t\t\t//TODO if the ack has something in the message part that\r\n\t\t\t\t\t//its for a endoftransmission then\r\n\t\t\t\t\tremoveAckedPacketFromPacketsToSend(packet);\t\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if its the end of a transmission change state back to receiving and publish\r\n\t\t\t\t\t * the packets received\r\n\t\t\t\t\t */\r\n\t\t\t\t} else if (data[0] == Constants.ENDOFTRANSMISSION) {\r\n\t\t\t\t\t//if the end of transmission is for the current publication\r\n\t\t\t\t\t//then invoke publishMessage and change our state to idle\r\n\t\t\t\t\tif (state == Constants.BKR_RECEIVING_PUB && checkIsEndOfCurrentPub(packet)) {\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t\t\tpublishMessage();\r\n\t\t\t\t\t\tstate = Constants.BKR_DEFAULT_STATE;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tsendAck(packet);\r\n\t\t\t\t}\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}", "public interface IPointOfSale {\n void beginTransaction();\n\n void endTransaction();\n\n void scan(IBarCode barCode);\n\n void inputText(String text);\n\n void printReceipt(IReceipt receipt);\n\n boolean isTransactionInProgress();\n\n}", "public synchronized void onReceipt(DatagramPacket packet) {\n\t\tStringContent content= new StringContent(packet);\n\t\tthis.notify();\n\t\tterminal.println(content.toString());\n\t}", "public receipt() {\n initComponents();\n \n }", "void askDevCardProduction();", "@Override\n public Word input(){ \n System.out.println(\"[IO]: Error - Tried to receive from printer.\");\n return null;\n }", "private static void displayReceipt()\r\n\t{\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"Receipt \");\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"Waiter/waitress: \"+name);\r\n\t\tSystem.out.println(\"Table Number: \"+tableNo);\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"ID Item Name Unit Price Quantity Sub-total\");\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tBillingSystemFormatter.receiptFormatter(orderList,menu,subTotalList);\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tBillingSystemFormatter.billFormatter(total, tax, tip, grandTotal);\r\n\t}", "protected abstract void consume(InstrumentPriceVO instrumentPriceVO);", "public interface CreditCardProcessor {\n}", "void barcodeCaptured(String barcodeString);", "public interface ReceiptOutputStrategy {\r\n /**\r\n * Generates a record of a transaction to a form of output.\r\n * @param trans the transaction object to be recorded\r\n */\r\n public abstract void generateReceipt(Transaction trans);\r\n}", "public String showReceipt(Account account);", "public interface ReceiptStrategy {\r\n public abstract void printReceipt();\r\n public abstract void addLineItem(String productID, int quantity);\r\n public abstract void addToLineItemArray(LineItem item);\r\n \r\n}", "public void printReceipt(Receipt receipt) {\n System.out.println(receipt.receiptInStringFormat());\n }", "public void cashReceipt(int amount){\r\n System.out.println(\"Take the receipt\");\r\n }", "public interface QScanner {\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\"\n\t * @generated\n\t */\n\tQIndicator qFound();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(QCharacter argument);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" foundRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(QCharacter argument, QIndicator found);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(QCharacter argument, QNumeric start);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startRequired=\"true\" foundRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(QCharacter argument, QNumeric start, QIndicator found);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startType=\"org.smeup.sys.mi.core.JavaNumber\" startRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(QCharacter argument, Number start);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startType=\"org.smeup.sys.mi.core.JavaNumber\" startRequired=\"true\" foundRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(QCharacter argument, Number start, QIndicator found);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(byte argument);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(byte argument, QNumeric start);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startType=\"org.smeup.sys.mi.core.JavaNumber\" startRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(byte argument, Number start);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(String argument);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" foundRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(String argument, QIndicator found);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(String argument, QNumeric start);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startRequired=\"true\" foundRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(String argument, QNumeric start, QIndicator found);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startType=\"org.smeup.sys.mi.core.JavaNumber\" startRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(String argument, Number start);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model required=\"true\" argumentRequired=\"true\" startType=\"org.smeup.sys.mi.core.JavaNumber\" startRequired=\"true\" foundRequired=\"true\"\n\t * @generated\n\t */\n\tQNumeric qScan(String argument, Number start, QIndicator found);\n\n}", "public void printReceipt(){\n sale.updateExternalSystems();\n sale.printReceipt(totalCost, amountPaid, change);\n }", "public void readData(Scanner scanner)\n {\n super.readData(scanner);\n payload = scanner.nextInt();\n \n }", "public void onRead(BarcodeData barcodeData) {\n }", "@Override\n\tpublic synchronized void onReceipt(DatagramPacket packet) {\n\t\tint type = checkPacketType(packet);\n\t\tMessage message;\n\t\tswitch(type){\n\t\t\tcase RoutingTable.ROUTING_TABLE_CODE:\n\t\t\t\tRoutingTable rt = new RoutingTable(packet);\n\t\t\t\tterminal.println(\"Received Ping from: \" + rt.getRouterName());\n\t\t\t\ttable.updateRoutingTable(rt);\n\t\t\t\tif(RoutingTable.TIMES_TO_BE_UNCHANGED <= table.getTimesNotChanged()) {\n\t\t\t\t}\telse\t{\n\t\t\t\t\tping();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase Message.MESSAGE_CODE:\n\t\t\t\tterminal.println(\"recieved message!\");\n\t\t\t\tmessage = new Message(packet);\n\t\t\t\tif(routerContainsUser(message.getUserTo())) {\n\t\t\t\t\t//terminal.println(message.getType())\n\t\t\t\t\tterminal.println(\"From: \" + message.getUserFrom() + \",To: \" + message.getUserTo() + \", Normal Message:\" + message.getMessage());\n\t\t\t\t}\telse\t{\n\t\t\t\t\tterminal.println(\"Message not for user on this Router.\");\n\t\t\t\t\tterminal.println(\"Recieved from: Router \" + table.getRouterToSendTo(message.getUserFrom()) + \" Sending on to: Router \" + table.getRouterToSendTo(message.getUserTo()));\n\t\t\t\t\t\n\t\t\t\t\tsendMessage(message);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase Message.FILE_CODE:\n\t\t\t\tterminal.println(\"recieved file message!\");\n\t\t\t\tmessage = new Message(packet);\n\t\t\t\tif(routerContainsUser(message.getUserTo())) {\n\t\t\t\t\tterminal.println(\"From: \" + message.getUserFrom() + \",To: \" + message.getUserTo() + \", FIleName:\" + message.getMessage());\n\t\t\t\t\t\n\t\t\t\t\t//Save file\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tbyte[] fileBytes =message.getFileBytes();\n\t\t\t\t\t\tString fileName = message.getMessage();\n\t\t\t\t\t\tSystem.out.println(\"FileName: \" + \"1\"+fileName ); //one added so it doesnt overwrite original file\n\t\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\"1\"+fileName);\n\t\t\t\t\t\tfos.write(fileBytes);\n\t\t\t\t\t\tfos.close();\n\t\t\t\t\t} catch (IOException 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\n\t\t\t\t\t\n\t\t\t\t}\telse\t{\n\t\t\t\t\tterminal.println(\"Message not for user on this Router.\");\n\t\t\t\t\tterminal.println(\"Recieved from: Router \" + table.getRouterToSendTo(message.getUserFrom()) + \" Sending on to: Router \" + table.getRouterToSendTo(message.getUserTo()));\n\t\t\t\t\t\n\t\t\t\t\tsendMessage(message);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "public interface ScanResultsAvailable {\n public void onReceiveScanResults();\n}", "public LinkedList<String> printReceipts (TheGroceryStore g);", "public void readCustomerReceipt()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tScanner reader = new Scanner(new FileReader(\"customerReceipt.txt\"));\r\n\t\t\twhile (reader.hasNext())\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(reader.nextLine());\r\n\t\t\t}\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"FileNotFoundException\");\r\n\t\t}\r\n\t}", "public interface PrinterEventListener {\n void onInitializeSuccess(String deviceInfo);\n void onInitializeError(Error error);\n void onPrinterClosed(String message);\n}", "@Override\n public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n IntentResult intentResult = IntentIntegrator.parseActivityResult(requestCode,resultCode,data);\n if (intentResult.getContents() != null) {\n String scannedText = intentResult.getContents();\n\n // Get product data associated with the UPC barcode\n Uri uri = api.getURL(scannedText);\n api.getData(uri, this::productBarcodeHandler);\n }\n else {\n Toast.makeText(getApplicationContext(),\"Nothing was scanned\", Toast.LENGTH_SHORT).show();\n }\n }", "private String getBarcode()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast stregkode: \");\n return scanner.nextLine();\n }", "public void file ( Receipt receipt){\r\n\t\t\treciptlist.add(receipt);\r\n\t\t}", "@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tString action = intent.getAction();\n\t\t\tif(action.equalsIgnoreCase(PosApi.ACTION_POS_COMM_STATUS)){\n\t\t\t\tint cmdFlag =intent.getIntExtra(PosApi.KEY_CMD_FLAG, -1);\n\t\t\t\tint status\t=intent.getIntExtra(PosApi.KEY_CMD_STATUS , -1);\n\n\t\t\t\tif(cmdFlag== PosApi.POS_PRINT_PICTURE || cmdFlag == PosApi.POS_PRINT_TEXT){\n\n\t\t\t\t\tswitch(status){\n\t\t\t\t\tcase PosApi.ERR_POS_PRINT_SUCC:\n\t\t\t\t\t\t//Print Success\n\t\t\t\t\t\tprintNext();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PosApi.ERR_POS_PRINT_NO_PAPER:\n\t\t\t\t\t\t//No paper\n\t\t\t\t\t\tprintStop(status);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PosApi.ERR_POS_PRINT_FAILED:\n\t\t\t\t\t\t//Print Failed\n\t\t\t\t\t\tprintStop(status);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PosApi.ERR_POS_PRINT_VOLTAGE_LOW:\n\t\t\t\t\t\t//Low Power\n\t\t\t\t\t\tprintStop(status);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PosApi.ERR_POS_PRINT_VOLTAGE_HIGH:\n\t\t\t\t\t\t//Hight Power\n\t\t\t\t\t\tprintStop(status);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(cmdFlag == PosApi.POS_PRINT_GET_STATE){\n\t\t\t\t\tif(mListener==null){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tmListener.onGetState(status);\n\t\t\t\t}\n\n\t\t\t\tif(cmdFlag == PosApi.POS_PRINT_SETTING){\n\t\t\t\t\tif(mListener==null){\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tmListener.onPrinterSetting(status);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}", "@Override\n\t\tpublic void serialEvent(SerialPortEvent evt) {\n\t\t\ttry {\n\t\t\t\tswitch (evt.getEventType()) {\n\t\t\t\tcase SerialPortEvent.DATA_AVAILABLE:\n\t\t\t\t\tif (input == null) {\n\t\t\t\t\t\tinput = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\t\t\tserialPort.getInputStream()));\n\t\t\t\t\t}\n\t\t\t\t\tString inputLine = input.readLine();\n\t\t\t\t\tSystem.out.println(inputLine);\n\t\t\t\t\tserialReturn = inputLine;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t}\n\n\t\t}", "abstract protected void onReceivedSequence(String sequence);", "int getNumberPaymentReceipt();", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\t\n\t // Make sure the request was successful\n\t if (resultCode == RESULT_OK) {\n\t Bundle resultBundle = data.getExtras();\n\t String decodedData = resultBundle.getString(\"DATA_RESULT\");\n\t String scanAction = resultBundle.getString(\"SCAN_ACTION\");\n\t\t \n\t\t if(scanAction != null && scanAction.equalsIgnoreCase(SCAN_TYPE)){\n\t\t\t // With the decoded data use session.get entity etc... then call server to get entity info\n\t\t\t try{\n\t\t\t\t processData(decodedData);\n\t\t\t }catch(Exception e){\n\t\t\t\t Toast.makeText(this, \"Unknown barcode format: please scan a valid barcode\", Toast.LENGTH_LONG).show();\n\t\t\t\t launchScanner(SCAN_TYPE);\n\t\t\t }\n\t\t\t \n\t\t }else{\n\t\t\t Toast.makeText(this, \"NO SCANNING ACTION\", Toast.LENGTH_LONG).show();\n\t\t\t launchScanner(SCAN_TYPE);\n\t\t }\n\t\t \n\t }else{\n\t\t finish();\t\t \n\t }\t \n\t}", "public static TerminalReturnCard parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n TerminalReturnCard object =\n new TerminalReturnCard();\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 (!\"terminalReturnCard\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (TerminalReturnCard)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\n\tpublic void consume(Scan scan) {\n\n\t}", "public void printReceipt(int amount){\r\n PaymentAuthorization payAuth = new PaymentAuthorization();\r\n if (payAuth.authRequest(card)){\r\n System.out.println(\"Take the receipt\");\r\n }\r\n }", "public interface ReportGenerator {\n\t\n\t/**\n\t * Captures a choice from a user.\n\t * @param sc a scanner that will capture the report choice selection\n\t * of the user\n\t * @return a Boolean true if the choice provided by user is valid,\n\t * a false if the input provided is not valid.\n\t */\n\tboolean captureChoice(Scanner sc);\n\t\t\n\t/**\n\t * Generates a report for a user\n\t * @return a Boolean true if the generation a report for a user was\n\t * successful, false if there was an issue on the generation of the \n\t * report.\n\t */\n\tboolean generateReport(); \t\t \n\t\n\n\t\n}", "private void reprint() {\n HashMap<Integer, Invoice> invoiceHashMap = new HashMap<>();\n printHeader(\"List of Invoices\");\n MainApp.invoices.forEach((invoice -> {\n System.out.println(\"Receipt #\" + invoice.getOrderID() + \", Paid On: \" + DateTimeFormatHelper.formatMillisToDateTime(invoice.getCompletedAt()));\n invoiceHashMap.put(invoice.getOrderID(), invoice);\n }));\n printBreaks();\n invoiceHashMap.put(-1, null);\n int selection = ScannerHelper.getIntegerInput(\"Select invoice to reprint receipt: \", new ArrayList<>(invoiceHashMap.keySet()), \"Invalid Receipt Number. Please select a valid receipt number or enter -1 to cancel\");\n if (selection == -1) {\n System.out.println(\"Receipt Cancelled\");\n return;\n }\n Invoice selected = invoiceHashMap.get(selection);\n ArrayList<String> receipts;\n if (selected.getReceipt().equals(\"-\")) {\n // No receipt, generate and save\n receipts = generateReceipt(selected, selected.getTotal(), selected.getAmountPaid(), selected.getPaymentType());\n } else {\n String filePath = RECEIPT_SUBFOLDER + selected.getReceipt();\n try {\n BufferedReader reader = FileIOHelper.getFileBufferedReader(filePath);\n receipts = reader.lines().collect(Collectors.toCollection(ArrayList::new));\n } catch (IOException e) {\n System.out.println(\"Failed to load receipt. Regenerating\");\n receipts = generateReceipt(selected, selected.getTotal(), selected.getAmountPaid(), selected.getPaymentType());\n }\n }\n\n System.out.println(\"Reprinting Receipt...\");\n System.out.println();\n System.out.println();\n receipts.forEach(System.out::println);\n System.out.println(\"\\n\");\n }", "public void printReceipt() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION,\"Would you like a receipt?\",ButtonType.YES,ButtonType.NO);\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.YES) {\n try {\n String element = \"\";\n int height = 200;\n int length = 0;\n for (int i = 0; i < getItemList().size(); i++) {\n element += getItemList().get(i).toString() + \" \"+System.getProperty(\"line.separator\");\n height += 20;\n }\n String text = \"Receipt \" + System.getProperty(\"line.separator\")\n + System.getProperty(\"line.separator\") + \"Items: \" + System.getProperty(\"line.separator\")\n + element + System.getProperty(\"line.separator\") + \"Total: \" + getTotalCost();\n char[] array = text.toCharArray();\n System.out.println(array);\n length += array.length;\n BufferedImage bi = imageGenerator.createImageWithText(array, length, height);\n File outputfile = new File(\"receipt.png\");\n ImageIO.write(bi, \"png\", outputfile);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n } else{\n alert.close();\n }\n }", "private void getrec() {\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00010 Product not found on Contract_Detail\n\t\tif (nmfkpinds.pgmInd36()) {\n\t\t\tmsgObjIdx = setMsgObj(\"OES0115\", \"XWABCD\", msgObjIdx, messages);\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t\telse {\n\t\t\tif (nmfkpinds.pgmInd66()) {\n\t\t\t\tif (fileds.filests == 1218) {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"Y3U9999\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"OEM0004\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalidt();\n\t\t\t}\n\t\t}\n\t}", "ICard deal();", "public synchronized void serialEvent(SerialPortEvent oEvent) {\n\t\t\n if (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {\n\t\t\ttry {\n while (input.ready ()){\n //System.out.println(\"Fuss \"+new1 +\" \"+old);\n\t\t\t\tString inputLine=input.readLine();\n //System.out.println(\"InputLine \"+inputLine);\n new1 = Integer.valueOf(inputLine);\n if(new1-old==1)\n {\n System.out.println(\"new1-old= \"+ (new1-old));\n \n int hour, min, day, month, year;\n java.util.Date date = new java.util.Date();\n Calendar cal= Calendar.getInstance();\n year = cal.get(Calendar.YEAR);\n month = cal.get(Calendar.MONTH); // 0 to 11\n day = cal.get(Calendar.DAY_OF_MONTH);\n hour = cal.get(Calendar.HOUR_OF_DAY);\n min = cal.get(Calendar.MINUTE);\n month = month + 1;\n code.append(\"\");\n if(day/10<1)\n {\n code.append(\"0\");\n code.append(day);\n }\n else\n code.append(day);\n if(month/10<1)\n {\n code.append(\"0\");\n code.append(month);\n }\n else\n code.append(month);\n code.append(year);\n code.delete(4,6);\n if(hour/10<1)\n {\n code.append(\"0\");\n code.append(hour);\n }\n else\n code.append(hour);\n if(min/10<1)\n {\n code.append(\"0\");\n code.append(min);\n }\n else\n code.append(min);\n \n String code1;\n code1= code.toString();\n //Lsignal.setText(code1);\n \n ImageIcon iconLogo = new ImageIcon(path);\n Lsignal.setText(\"\");\n Lsignal.setIcon(iconLogo);\n code.delete(0,11);\n System.out.println(code);\n Code128 barcode = new Code128(); //Barcode Type\n barcode.setData(code1); //Barcode String\n barcode.setX(2); //Barcode data text to encode\n //barcode.setBarcodeWidth(-50f);\n barcode.setLeftMargin(-15);\n barcode.setRightMargin(-5);\n barcode.setBarcodeHeight(50f);\n barcode.drawBarcode(path);\n \n printImg(path);\n }\n else if(new1-old==0)\n System.out.println(\"Nope!\");\n else if(new1-old==-1)\n System.out.println(\"Nope!\");\n old=new1;\n }\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t} finally {\n Lsignal.setIcon(null);\n Lsignal.setText(\"No Input\");\n }\n\t\t}\n\t\t// Ignore all the other eventTypes, but you should consider the other ones.\n\t}", "public void doPrint() {\n printBehavior.printReceipt();\n\n }", "public void Execution() {\n //Inspector specifies that a new inspection may be started.\n control.startInspection();\n \n //Inspector instructs program to close garage door.\n control.closeDoor();\n \n //Inspector enters vehicle’s license number.\n RegNoDTO regNo = input();\n \n //Get the regNo's cost. \n getCost(regNo);\n \n\n boolean isCash = false;\n int cash = 0;\n \n boolean input= true;\n while(input==true){ \n scanPaymentMethod = new Scanner (System.in);\n \n System.out.println(\"choose weather u r going to pay by cash or card by typing (cash) or (card)\");\n String userPaymentChoice =scanPaymentMethod.nextLine();\n switch (userPaymentChoice) {\n case \"cash\":\n isCash=true;\n input=false;\n \n break;\n case \"card\":\n isCash=false;\n input=false;\n \n break;\n default:\n System.out.println(\"you should enter cash or card!\");\n \n break;\n }\n }\n try{\n while(cash>0){\n System.out.println(\"the amount of cash u have in your card or in ur hand (doesnot matter for the moment)\");\n cash = scanPaymentMethod.nextInt();\n }\n }\n catch (Exception e){\n System.out.println(\"please enter the word (cash) or the word (card)\");\n System.out.println(\"please as well make sure the amount of money is numbers\");\n }\n \n \n \n \n \n System.out.println(\"your balance is: \" + control.Paying(isCash, cash,regNo));\n \n \n \n \n \n \n //add Oberver\n control.addObserver(inspectionStats);\n \n //Inspector performs the specified inspection.\n inspect(regNo);\n \n }", "public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }", "protected CardCommandAPDU() {\n }", "public interface ScanListener {\n public abstract void onScanned();\n}", "@Test\r\n public void testPrintReceipt() {\r\n \r\n instance = new Controller(dbMgr);\r\n instance.printReceipt();\r\n \r\n }", "private CartReceiptResponse executeReceiptApi(final CartReceiptRequest receiptRequest) {\n CartReceiptResponse receiptResponse = null;\n HttpURLConnection conn = null;\n InputStreamReader inputStreamReader = null;\n BufferedReader reader = null;\n InputStream inputStream = null;\n try {\n ObjectMapper mapper = new ObjectMapper();/* Set request object in to jackson object */\n String requestJson = mapper.writeValueAsString(receiptRequest);\n\n String mobileApiServiceBaseUrl = APP_CONFIG_BUNDLE.getString(\"pdf.mobileApiBaseUrl\");\n /* Constructing URL for the RE - PRINT API call */\n String apiUrl = mobileApiServiceBaseUrl + \"/api\" + ApiPaths.BP_PUBLIC_BASE +\n ApiPaths.BP_CART_RECEIPT_REPRINT_3_2_3;\n URL url = new URL(apiUrl);/* String type URL passed to URL class constructor */\n LOGGER.debug(\"Api url :: \" + url);\n conn = (HttpURLConnection) url.openConnection();/* connection opened */\n conn.setDoOutput(true);\n conn.setRequestMethod(\"POST\");\n conn.setRequestProperty(\"Content-Type\", \"application/json\");\n /* Created an object for the OutputStream and write byte information */\n OutputStream os = conn.getOutputStream();\n os.write(requestJson.getBytes());\n os.flush();\n\n\t\t\t/* error from server */\n int responseCode = conn.getResponseCode();\n if (responseCode != 200) {\n LOGGER.warn(\"unable to call API to get data to render the PDF: responseCode=\" + responseCode\n + \", url=\" + apiUrl\n + \", request=\" + requestJson);\n inputStream = conn.getErrorStream();\n if (null == inputStream) {\n inputStream = conn.getInputStream();\n }\n } else {\n inputStream = conn.getInputStream();\n }\n\n inputStreamReader = new InputStreamReader(inputStream);\n reader = new BufferedReader(inputStreamReader);\n String output;\n StringBuilder apiResponse = new StringBuilder();\n while ((output = reader.readLine()) != null) {\n apiResponse.append(output);\n }\n if (responseCode != 200) {\n LOGGER.warn(\"apiResponse=\" + apiResponse);\n } else {\n LOGGER.debug(\"apiResponse=\" + apiResponse);\n }\n String responseJson = apiResponse.toString();\n System.out.println(\"response :\" + apiResponse);\n /* De serializing jackSon object in to CartReceiptResponse*/\n receiptResponse = mapper.readValue(responseJson, CartReceiptResponse.class);\n\n } catch (final Throwable e) {\n LOGGER.error(\"trouble executing the receipt api: receiptRequest=\" + receiptRequest, e);\n return null;\n } finally {\n try {\n if (null != conn) {\n conn.disconnect();\n }\n } catch (final Throwable e) {\n LOGGER.error(\"trouble disconnecting\", e);\n } finally {\n try {\n if (null != reader) {\n reader.close();\n }\n } catch (final Throwable e) {\n LOGGER.error(\"trouble closing reader\", e);\n } finally {\n try {\n if (null != inputStream) {\n inputStream.close();\n }\n } catch (final Throwable e) {\n LOGGER.error(\"trouble closing inputStream\", e);\n } finally {\n try {\n if (null != inputStreamReader) {\n inputStreamReader.close();\n }\n } catch (final Throwable e) {\n LOGGER.error(\"trouble closing inputStreamReader\", e);\n }\n }\n }\n }\n }\n return receiptResponse;\n }", "void onDeviceFound(TxRxScanResult scanResult);", "Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);", "public interface BillingService {\n /**\n * Attempts to charge the order to the credit card. Both successful and\n * failed transactions will be recorded.\n *\n * @return a receipt of the transaction. If the charge was successful, the\n * receipt will be successful. Otherwise, the receipt will contain a\n * decline note describing why the charge failed.\n */\n Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);\n}", "public void receiptButton(String receipt) {\n\t\tBy elem = By.cssSelector(\"button\");\n\t\tList<WebElement> elements = driver.findElements(elem);\n\t\t\n\t\tfor (WebElement item : elements) {\n\t\t\tString test = item.getAttribute(\"innerHTML\");\n\t\t\tif (test.contains(receipt)) {\n\t\t\t\titem.click();\n\t\t\t}\n\t\t}\n\t}", "void setNumberPaymentReceipt(int nRicevuta);", "@Override\n public void printActionsAndReceiveInput(Terminal terminal) { this.terminal=terminal;\n inputBasicMode();\n responseIsReady = true;\n }", "@Override\n public void onScanned(Barcode barcode) {\n super.onScanned(barcode);\n\n //on Scan completed close the scanner\n if (isScanning.get()) {\n getChildFragmentManager()\n .beginTransaction()\n .remove(getChildFragmentManager().findFragmentById(R.id.scannerFragment))\n .commit();\n }\n\n isScanning.set(false);\n\n /*\n * this works when if user scan the exist\n * code without scanning the enter code\n */\n boolean waitingForEnterCode = !getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(EXIT) && waitingForEnterCode) {\n String message = \"Its look like that you haven't scan the Enter Code \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n /*\n * this works when user scan the enter code again\n * without scanning the exit code\n */\n boolean waitingForExitCode = getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(ENTER) && waitingForExitCode) {\n String message = \"you have already scan the Enter code First scan a Exist \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n if (barcode.rawValue.equals(Constants.IQRCode.ENTER)) {\n viewmodel.updateScannedValueWhenEnter();\n updatePendingEntryEvent(true);\n } else if (barcode.rawValue.equals(EXIT)) {\n viewmodel.updateScannedValueWhenExist();\n updatePendingEntryEvent(false);\n } else {\n Toast.makeText(getActivity(), \"no action specified\", Toast.LENGTH_SHORT).show();\n }\n }", "GasData receiveGasData();", "void delete(String receiptHandle);", "@Override\n protected void onSuccessRequestReceipts(Collection<Receipt> receipts) {\n \tmTxtStatus.setText(\"requestReceipts onSuccess: received \"+receipts.size() + \" receipts\");\n \t}", "@Override\n\tpublic void receiveProduct(Product product) {\n\t\t\n\t}", "public interface IPrintingService {\r\n}", "public interface TxRxScanCallback {\n\n /**\n * Callback immediately after the scan has been stopped.\n */\n void afterStopScan();\n\n /**\n * Callback when a BLE device has been found.\n *\n * @param scanResult the result of a scan operation for BLE Devices\n */\n void onDeviceFound(TxRxScanResult scanResult);\n}", "public interface DeviceRegistry {\n void registerRS232Device(RS232Device device);\n}", "public String getReceivedSerialNumber() ;", "public static void main(String[] args) {\n Item i1 = new Item(\"Energy Drink 10-pack\", 546.86, 17.89, 550759400);\n Item i2 = new Item(\"Ramen 12-pack\", 74.84, 17.21, 12);\n Item i3 = new Item(\"Coke\", 454.5, 4.99, 123123123);\n Item i4 = new Item(2.98, 926367);\n CheckoutMachine c = new CheckoutMachine(\"Walmart\");\n try {\n System.out.println(\"Scanning Item 1: \" + i1.toString());\n c.scan(i1);\n System.out.println(\"Scanning Item 2: \" + i2.toString());\n c.scan(i2);\n System.out.println(\"Scanning Item 3: \" + i3.toString());\n c.scan(i3);\n System.out.println(\"Scanning Item 4: \" + i4.toString());\n c.scan(i4);\n } catch (InvalidItemException e) {\n System.out.println(e.toString());\n }\n java.time.LocalDate date = java.time.LocalDate.now();\n date = date.minusMonths(1);\n BuzzCard bCard = new BuzzCard(\"John Smith\", 0.0);\n CreditCard cCard = new CreditCard(\"John Smith\", 1000.0, date);\n Cash cash = new Cash(1000.0);\n boolean payed = false;\n try {\n System.out.println(\"Trying BuzzCard\");\n c.payForCart(bCard);\n payed = true;\n } catch (PaymentFailedException e1) {\n System.out.println(e1.toString());\n }\n if (!payed) {\n try {\n System.out.println(\"Trying Credit Card\");\n c.payForCart(cCard);\n payed = true;\n } catch (PaymentFailedException e2) {\n System.out.println(e2.toString());\n }\n }\n if (!payed) {\n try {\n System.out.println(\"Paying With Cash\");\n c.payForCart(cash);\n payed = true;\n } catch (PaymentFailedException e2) {\n System.out.println(e2.toString());\n }\n }\n\n }", "public interface Cashier {\n\t\n\t// Sent from waiter to computer a bill for a customer\n\tpublic abstract void msgComputeBill(String choice, Customer c, Waiter w, int tableNumber, Map<String, Double> menu);\n\t\n\t// Sent from a customer when making a payment\n\tpublic abstract void msgPayment(Customer customer, Cash cash);\n\n\tpublic abstract void msgAskForPayment(String food, int batchSize, Market market, double price);\n\n\tpublic abstract String getCash();\t\n\t\n\tpublic abstract String getTotalDebt(); \n}", "private void btnGetReceiptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGetReceiptActionPerformed\n String stringID = textReceiptID.getText();\n if(textReceiptID.getText().isEmpty()){\n JOptionPane.showMessageDialog(rootPane, \"Please Enter a valid ID\");\n return;\n }\n int ID = Integer.parseInt(stringID);\n newHandler.getReceipt(ID);\n \n if(newHandler.getReceiptErrorMsg() != null){\n JOptionPane.showMessageDialog(rootPane, newHandler.getReceiptErrorMsg());\n }\n textReceiptID.setText(Integer.toString(newHandler.getReceiptID()));\n textReceiptDate.setText(newHandler.getReceiptDate());\n textReceiptAmmount.setText(Double.toString(newHandler.getReceiptAmmount()));\n textReceiptType.setText(newHandler.getReceiptType());\n textReceiptDescription.setText(newHandler.getReceiptDescription());\n searched = true;\n }", "public static void main(String[] args) {\n\t\tCustomer customer = new Customer(true);\r\n\t\tdouble amount = 105.78;\r\n\t\tdouble donation;\r\n\t\tString cardType= \" \";\r\n\t\t//YOUR CODE GOES BELOW THIS LINE\r\n\t\tCreditCard creditcard = new CreditCard(customer, amount, donation=0);\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\t\r\n\t\t// call for setCardname\r\n\t\tsetCardname(creditcard, scan);\r\n\t\t\r\n\t\t// set card type\r\n\t\tcardType= getCardType(scan, cardType);\r\n\t\t\r\n\t\t// request the card number\r\n\t\tsetCardnumber(creditcard, scan);\r\n\t\t\r\n\t\t//request the expiration date\r\n\t\tsetExpirationDate (creditcard,scan);\r\n\t\r\n\t\t// request the Security Code\r\n\t\tsetSecurityCode (creditcard,scan);\r\n\t\t\r\n\t\t// request billing address\r\n\t\tsetBillingAddress(creditcard, scan);\r\n\t\t\r\n\t\t//request shipping address\r\n\t\tSystem.out.println(\"Shipping address:\\n\" + \"Press 1 if the shipping address is the same as the customer address \\n\" +\r\n\t\t\t\t \"Press 2 if the shipping address is a new address \");\r\n\t\tsetShippingAddress( creditcard, customer, scan);\r\n\t\t\r\n\t\t//\r\n\t\t// get donation\r\n\t\t//\r\n\t\tString userAnswer= (scan.nextLine()).toUpperCase();\r\n\t\tSystem.out.println(\"Would you like to donate? Yes/No: \");\r\n\t\tuserAnswer= (scan.nextLine()).toUpperCase();\r\n\t\t\r\n\t\tif (userAnswer.equals(\"YES\"))\r\n\t\t\tdonation= getDonation(customer, creditcard, scan, donation, amount);\r\n\t\telse\r\n\t\t\tSystem.out.println(\" \");\t\r\n\t\t\r\n\t\t//\r\n\t\t// print summary\r\n\t\t//\r\n\t\tSystem.out.println(\"---------------------------------------------------------------------------\\n\"\r\n\t\t +(customer.firstName).toUpperCase() + \",\" + \"Here Is Your Purchase Summary:\\n\"\r\n\t\t\t\t + \"------------------------------------------------------------------------------\");\r\n\t\tprintSummary( customer, creditcard, donation, cardType, amount,scan);\r\n\t\t\r\n\t\tLastCheck(customer, creditcard, donation, cardType, amount, scan);\r\n\t\t\r\n\t\tscan.close();\r\n\t}", "public interface IOperation {\n Scanner scanner=new Scanner(System.in);\n void work(BookList bookList);\n}", "public void serialEvent(SerialPortEvent e)\n {\n System.out.println(\"+++SERIAL EVENT TYPE ++++++++++++++++ : \"+e.getEventType());\n ezlink.info(\"serialEvent() received in \" + SerialConnection.class.getName());\n \t// Create a StringBuffer and int to receive input data.\n\tStringBuffer inputBuffer = new StringBuffer();\n\tint newData = 0;\n\n\t// Determine type of event.\n\tswitch (e.getEventType())\n\t{\n\n\t // Read data until -1 is returned. If \\r is received substitute\n\t // \\n for correct newline handling.\n\t case SerialPortEvent.DATA_AVAILABLE:\n\t byte[] readBuffer = new byte[500];\n\t\tint numBytes = 0;\n\t\tinputdata = null;\n\n\t\ttry {\n\t\t\t\tSystem.out.println(\"Data Received from com Port=\"+is.available());\n ezlink.info(\"Data Received from com Port= \" +is.available() );\n\n\t\t\t\twhile (is.available() > 0)\n\t\t\t\t{\n\t\t\t\t\tnumBytes = is.read(readBuffer);\n\t\t\t\t\tdataHandler.addISOPart(ISOUtil.hexString(readBuffer,0,numBytes));\n\n\t\t\t\t}\n\n\n\t\t\t\tString strResponse=null;\n\t\t\t\tif((strResponse = dataHandler.getNextISO(1)) !=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Response=\"+strResponse);\n ezlink.info(\"Response= : \" +strResponse );\n\t\t\t\t\tinputdata = strResponse;\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Full data not received from terminal\");\n ezlink.info(\"ull data not received from terminal!! \" );\n\t\t\t\t}\n\n\t\t\t\tdataRec =true;\n\n\t\t} catch (IOException exp) {\n System.out.println(\"serialEvent Exception(): \");\n exp.printStackTrace();\n System.out.println(\"serialEvent Exception(): \");\n ezlink.info(\"serialEvent Exception(): \");\n ezlink.error(new Object(), exp);\n }\n\n\t\tbreak;\n\n\t // If break event append BREAK RECEIVED message.\n\t case SerialPortEvent.BI:\n\t\tSystem.out.println(\"\\n--- BREAK RECEIVED ---\\n\");\n ezlink.info(\"\\n--- BREAK RECEIVED ---\\n \" );\n\t}\n\n }", "@Override\r\n\tpublic synchronized void serialEvent(SerialPortEvent oEvent) {\r\n\t\tif (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {\r\n\t\t\ttry {\r\n\t\t\t\tint available = input.available();\r\n\t\t\t\tbyte chunk[] = new byte[available];\r\n\t\t\t\tinput.read(chunk, 0, available);\r\n\r\n\t\t\t\t// Displayed results are codepage dependent\r\n\r\n\t\t\t\tfor (int c = 0; c < chunk.length; c++) {\r\n\r\n\t\t\t\t\tSystem.out.println(\"recieve:\" + (chunk[c] + 512) % 256);\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tSystem.out.println(\"here atleastttttttt\");\r\n\t\t\t\tSystem.err.println(e.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void askBuyDevCards();", "public void openScanner(){\n Intent intent = new Intent(ReturningTaskActivity.this, BarcodeScannerActivity.class);\n startActivityForResult(intent, 0);\n }", "public interface Carriageable {\r\n\r\n}", "void confirmRead();", "public interface ScanListener {\n void onSuccess(String scanData);\n\n void onError(String errorMsg);\n}", "public interface SerialHelper {\n\n interface DeviceReadyListener{\n void OnDeviceReady(boolean deviceReadyStatus);\n }\n\n ArrayList<String> enumerateDevices();\n void connectDevice(String id, DeviceReadyListener deviceReadyListener);\n void disconnect();\n boolean isDeviceConnected();\n boolean writeString(String data);\n boolean writeBytes(byte[] data);\n byte readByte();\n}", "public abstract void msgPayment(Customer customer, Cash cash);", "public interface OnNfcDataReceived {\n void processNfcData(Tag mytag);\n}", "public abstract String requestCard(byte[] messageRec) throws IOException;", "public void process(APDU apdu) {\n byte []buffer = apdu.getBuffer();\n byte numBytes = buffer[ISO7816.OFFSET_LC];\n \n // 0X9000 status\n if(selectingApplet()){\n if ( pin.getTriesRemaining() == 0 ){\n ISOException.throwIt(SW_PIN_VERIFICATION_REQUIRED);\n }\n ISOException.throwIt(ISO7816.SW_NO_ERROR);\n }\n \n // Handle incorrect value of CLA\n if(buffer[ISO7816.OFFSET_CLA] != PENAZENKA_CLA){\n ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);\n }\n \n switch(buffer[ISO7816.OFFSET_INS]){\n \n case RETURN_NAME: return_name(apdu); \n return;\n \n case ACCEPT: accept(apdu); \n return;\n \n case SEND_BACK: send_back(apdu); \n return;\n \n case VERIFY_PIN: verify_pin(apdu);\n return;\n \n case HASH_DATA: hash_data(apdu);\n return;\n \n case RETURN_HASH: return_hash(apdu);\n return;\n \n case SIGN_DATA: sign_data(apdu);\n return;\n \n case VERIFY_SIGN: verify_signature(apdu);\n return;\n \n // Handle an incorrect value of INS \n default:\n ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);\n }\n }", "void buyDevCard();", "@Override\n\tprotected void initialize() {\n\t\t\n\t\tsubscribeBroadcast(TickBroadcast.class, tick_msg -> { //subscribe to timer\n\t\t\tif (!tick_msg.isRunning()){ //if reached duration time \n\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" is terminating \");\n\t\t\t\tterminate();\n\t\t\t}\n\t\t\tsetTick(tick_msg.getTick());\n\t\t\t\n\t\t\tif (curr_request!=null){\n\t\t\t\tif (curr_amount>0){\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created a pair of \" +curr_request.getShoeType());\n\t\t\t\t\tcurr_amount--;\n\t\t\t\t}\n\t\t\t\telse if (curr_amount==0){\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" finished producing the restock request for \"+curr_request.getAmount()+\" \"+curr_request.getShoeType());\n\t\t\t\t\tReceipt r= new Receipt(getName(),\"store\",curr_request.getShoeType(),false,curr_tick,curr_request.getCurr_tick(),curr_request.getAmount());\n\t\t\t\t\tcomplete(curr_request,r);\n\t\t\t\t\tif (!restock_orders.isEmpty()){\n\t\t\t\t\t\tcurr_request = restock_orders.remove();\n\t\t\t\t\t\tcurr_amount = curr_request.getAmount();\n\t\t\t\t\t\tif (curr_amount>0){\n\t\t\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created a pair of \" +curr_request.getShoeType());\n\t\t\t\t\t\t\tcurr_amount--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tcurr_request=null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (!restock_orders.isEmpty()){\n\t\t\t\t\tsetRequest(restock_orders.remove());\n\t\t\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" created 1 pair of \"+curr_request.getShoeType());\n\t\t\t\t\tcurr_request.setAmount(curr_request.getAmount()-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tsubscribeRequest(ManufacturingOrderRequest.class, man_req -> {\n\t\t\tLogger.getLogger(\"logger\").log(Level.INFO,getName()+ \" was asked from the store to produce \"+man_req.getAmount()+\" \"+man_req.getShoeType());\n\t\t\tif (curr_request==null){\n\t\t\t\tsetRequest(man_req);\n\t\t\t\tcurr_amount=man_req.getAmount();\n\t\t\t}\n\t\t\telse\n\t\t\t\ttry {\n\t\t\t\t\trestock_orders.put(man_req);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t});\n\t\t\n\t\tlatchObject.countDown();\n\t}", "void receiveSequenceNumber() {\r\n\t\t\r\n\t}", "public void run() {\n try {\n Class pcscterminal\n = Class.forName(\"sun.security.smartcardio.PCSCTerminals\");\n Field contextId = pcscterminal.getDeclaredField(\"contextId\");\n contextId.setAccessible(true);\n\n if (contextId.getLong(pcscterminal) != 0L) {\n Class pcsc\n = Class.forName(\"sun.security.smartcardio.PCSC\");\n\n Method SCardEstablishContext = pcsc.getDeclaredMethod(\n \"SCardEstablishContext\", new Class[]{Integer.TYPE});\n SCardEstablishContext.setAccessible(true);\n\n Field SCARD_SCOPE_USER\n = pcsc.getDeclaredField(\"SCARD_SCOPE_USER\");\n SCARD_SCOPE_USER.setAccessible(true);\n\n long newId = ((Long) SCardEstablishContext.invoke(pcsc, new Object[]{Integer.valueOf(SCARD_SCOPE_USER.getInt(pcsc))})).longValue();\n contextId.setLong(pcscterminal, newId);\n }\n } catch (Exception ex) {\n }\n ///////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n TerminalFactory factory = null;\n List<CardTerminal> terminals = null;\n try {\n factory = TerminalFactory.getDefault();\n\n terminals = factory.terminals().list();\n } catch (Exception ex) { //\n Logger.getLogger(NFC_Test.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n if (factory != null && factory.terminals() != null && terminals\n != null && terminals.size() > 0) {\n try {\n CardTerminal terminal = terminals.get(0);\n\n if (terminal != null) {\n\n System.out.println(terminal);\n if (terminal.isCardPresent()) {\n System.out.println(\"Card|\"+terminal.getName()+\"|\"+terminal.hashCode()+\"|\");\n } else {\n System.out.println(\"No Card\");\n }\n\n } else {\n System.out.println(\"No terminal\");\n }\n\n terminal = null;\n } catch (Exception e) {\n Logger.getLogger(NFC_Test.class.getName()).log(Level.SEVERE, null, e);\n }\n factory = null;\n\n terminals = null;\n\n Runtime.getRuntime().gc();\n\n } else {\n System.out.println(\"No terminal\");\n }\n\n }", "public Receipt(Purchase p) {\r\n this.purch=p;\r\n totalPurch=0;\r\n totalDisc=0;\r\n \r\n db= new FakeDataBase();\r\n c= new Customer(db.getCustomerDbItem(purch.getCustIdx()));\r\n //System.out.println(c.toString());\r\n lineItem = new LineItem[0];\r\n generateLineItems();\r\n }", "CarPaymentMethod processHotDollars();", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"WiFi SCAN\", \"RESULT RETURN:\"+new Date().getTime());\n synchronized (scanned) {\n scanned.notify();\n }\n //throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "private void TestSerialInput() {\r\n int now = GetMills(), nby = now - PrioSeriTime;\r\n SerialPortSwapper myPort = surrealPort;\r\n if (myPort == null) return; // otherwise test for input, fwd to listener..\r\n PrioSeriTime = now;\r\n if (SpeakEasy) if (nby > 222) // should be every ms, but seems not..\r\n System.out.println(FormatMillis(\" (LATE TSI) +\", nby)\r\n + FormatMillis(\" @ \", now));\r\n if (CountingPulses > 0) { // once each second, ask for current count..\r\n PCtime = PCtime + nby; // count actual elapsed time\r\n if (PCtime >= CountingPulses) { // always logs..\r\n Send3bytes(REPORT_PULSECOUNT, 0, 0); // pin + is ignored\r\n PCtime = PCtime - CountingPulses;\r\n }\r\n } //~if\r\n try {\r\n nby = surrealPort.getInputBufferBytesCount();\r\n if (nby <= 0) return;\r\n if (OneSerEvt == null) // ProcInp only looks at type, so keep this one..\r\n OneSerEvt = new SerialPortEvent(\r\n CommPortNo, SerialPort.MASK_RXCHAR, nby);\r\n ProcessInput(OneSerEvt);\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n }", "public abstract int mo12584RX(int i);", "public ScanBarcode() {\n initComponents();\n \n \n }", "private void writeReceipt(String text) throws IOException {\n\n PrintWriter pw = new PrintWriter(\"receipt.txt\");\n pw.println(text);\n pw.close();\n }", "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 }" ]
[ "0.6556108", "0.6105841", "0.5963759", "0.59067965", "0.58955735", "0.58081216", "0.57976615", "0.57479554", "0.57196224", "0.5683611", "0.56543565", "0.55804616", "0.5573915", "0.5558001", "0.55157316", "0.5486704", "0.54863805", "0.5484833", "0.5467558", "0.54572237", "0.5429041", "0.5424588", "0.541793", "0.5414452", "0.54087734", "0.53596705", "0.53278154", "0.5322539", "0.53172237", "0.5297494", "0.5295363", "0.52807534", "0.5254124", "0.5250795", "0.52494496", "0.52417374", "0.52084243", "0.52075016", "0.5198376", "0.5179658", "0.51673776", "0.51644564", "0.5159843", "0.51307786", "0.51111823", "0.50966465", "0.5091735", "0.50896573", "0.5083886", "0.50786436", "0.5065581", "0.5064795", "0.50611895", "0.50606596", "0.50596225", "0.50535965", "0.5050416", "0.5042336", "0.50319964", "0.5031478", "0.50245845", "0.5011979", "0.5008617", "0.50044304", "0.5002279", "0.50017047", "0.5000195", "0.4998498", "0.4989145", "0.4986441", "0.49815547", "0.4975185", "0.497134", "0.49692315", "0.4961222", "0.49562997", "0.49562386", "0.49509445", "0.49492165", "0.49429634", "0.49413064", "0.49392012", "0.49384585", "0.49315438", "0.49290693", "0.4909518", "0.490438", "0.49038932", "0.49022785", "0.48899022", "0.4887971", "0.4886378", "0.48853555", "0.4882384", "0.48794776", "0.4867306", "0.48566106", "0.48528323", "0.4848088", "0.48434216" ]
0.58421767
5
Created by Administrator on 2015/8/24.
public interface OnAreasListener extends IErrorListener { void OnAreasSuccess(List<AreasBean> areasBeanList); @Override void OnNetError(); @Override void OnRequestFail(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "@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\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\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}", "public void mo38117a() {\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}", "public void mo4359a() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public void verarbeite() {\n\t\t\r\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "public final void mo51373a() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\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 }", "private Rekenhulp()\n\t{\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public void autoDetails() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public void designBasement() {\n\t\t\r\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\tprotected void onCreate() {\n\t}", "public void mo12930a() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void onCreate() {\n\n\t}", "public contrustor(){\r\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private TMCourse() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public static void listing5_14() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "public void create() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "private void getStatus() {\n\t\t\n\t}", "protected void aktualisieren() {\r\n\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void mo21877s() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\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}", "public void mo3376r() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "private void init() {\n\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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void mo9848a() {\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo1531a() {\n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void create() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}" ]
[ "0.6287937", "0.6045146", "0.6031465", "0.59820646", "0.5965484", "0.5951325", "0.5925396", "0.5912248", "0.5848837", "0.5838046", "0.5833955", "0.5822667", "0.5822667", "0.5818667", "0.58096564", "0.58096564", "0.5807582", "0.5790255", "0.5776626", "0.576232", "0.57620853", "0.57000864", "0.569685", "0.56925184", "0.56844103", "0.56749326", "0.5663395", "0.5653092", "0.5638535", "0.5638535", "0.5638535", "0.5638535", "0.5638535", "0.5638535", "0.5638535", "0.56256443", "0.56182116", "0.56004614", "0.5593738", "0.5589244", "0.5588494", "0.5569835", "0.55660427", "0.55541676", "0.5541747", "0.55373585", "0.5533877", "0.5532044", "0.55246925", "0.55241203", "0.55187047", "0.5511545", "0.5493221", "0.54916346", "0.5488615", "0.54853433", "0.5479829", "0.54704267", "0.5468866", "0.5467712", "0.54651594", "0.5459603", "0.5450548", "0.5445905", "0.5438067", "0.54301697", "0.5419114", "0.54175055", "0.5416044", "0.541437", "0.541437", "0.541437", "0.541437", "0.541437", "0.54114413", "0.5410874", "0.54106057", "0.5410355", "0.5410355", "0.53992736", "0.53935003", "0.5392162", "0.5391062", "0.53857434", "0.53857434", "0.5385635", "0.53854764", "0.53854764", "0.53854764", "0.538064", "0.5379951", "0.5379878", "0.5372145", "0.53718895", "0.5369666", "0.5367735", "0.53660023", "0.53527474", "0.53495973", "0.5346867", "0.53455514" ]
0.0
-1
items within the room Create a room described "description". Initially, it has no exits. "description" is something like "a kitchen" or "an open court yard".
public Room(String description) { this.description = description; items = new ArrayList<>(); exits = new HashMap<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "public Room(String description) \n {\n exits = new HashMap<>();\n objects = new HashMap<>();\n this.description = description;\n this.requiredOutfit = null;\n this.locked = false;\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public Room(String roomName, String description, Objects secretObject)\n {\n this.roomName = roomName;\n this.description = description;\n if(secretObject != null) {\n this.secretObject = new Objects(secretObject.getItemName(), secretObject.getItemWeight());\n }\n exits = new HashMap<>();\n items = new HashMap<>();\n characters = new HashMap<>();\n }", "public Room(String description) \n {\n this.description = description;\n exits = new HashMap<>();\n }", "public Item(String description) {\n this.description = description;\n }", "public boolean addRoom(String name, String id, String description, String enterDescription){\n for(int i = 0; i < rooms.size(); i++){\n Room roomAti = (Room)rooms.get(i);\n if(roomAti.id.equals(id)){\n return false;\n }\n }\n rooms.add(new Room(name, id, description, enterDescription));\n return true;\n }", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "public Room(@NonNull String description,@NonNull String shortDescription) {\n this.roomWasVisited = false;\n this.description = description;\n this.shortDescription = shortDescription;\n this.items = new ArrayList<>();\n this.adjacentRooms = new EnumMap<>(Action.class);\n this.transitionMessages = new EnumMap<>(Action.class);\n this.transitionDelay = 0;\n }", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "public Room(String name, String description)\n {\n this.name = name;\n this.description = description;\n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "public static void createItems(){\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"breadly\"), BREADLY);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"hard_boiled_egg\"), HARD_BOILED_EGG);\n\n\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"ender_dragon_spawn_egg\"), ENDER_DRAGON_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"wither_spawn_egg\"), WITHER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"illusioner_spawn_egg\"), ILLUSIONER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"giant_spawn_egg\"), GIANT_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"spawn_spawn_egg\"), SPAWN_SPAWN_EGG);\n }", "private void createRooms()\n {\n Room a1, a2, a3, b1, b2, b3, c1, c2, c3, bridge, outskirts;\n \n // create the rooms\n a1= new Room(\"see a strong river flowing south to the west. The trees seem to be letting up a little to the north.\");\n a2 = new Room(\" are still in a very dense forest. Maybe the trees are clearing up the the north?\");\n a3 = new Room(\"see a 30 foot cliff looming over the forest to the east. No way you could climb that. Every other direction is full of trees.\");\n b1 = new Room(\"see a strong river flowing to the west. Heavily wooded areas are in all other directions.\");\n b2 = new Room(\"see only trees around you.\");\n b3 = new Room(\"see a 30 foot cliff to the east. There might be one spot that is climbable. Trees surround you every other way.\");\n c1 = new Room(\" see the river cuts east here, but there seems to be a small wooden bridge to the south over it. The trees are less the direction that the river flows.\");\n c2 = new Room(\"are on a peaceful riverbank. If you weren't lost, this might be a nice spot for a picnic.\");\n c3 = new Room(\"see a 30 foot cliff to your east and a strong flowing river to the south. Your options are definitely limited.\");\n outskirts = new Room(\"make your way out of the trees and find yourself in an open field.\");\n cliff = new Room(\"managed to climb up the rocks to the top of the cliff. Going down, doesn't look as easy. You have to almost be out though now!\");\n bridge = new Room(\"cross the bridge and find a small trail heading south!\");\n win = new Room(\" manage to spot a road not too far off! Congratulations on finding your way out of the woods! Have a safe ride home! :)\" );\n fail = new Room(\" are entirely lost. It is pitch black out and there is no way that you are getting out of here tonight. I'm sorry, you LOSE.\");\n \n // initialise room exits\n a1.setExit(\"north\", outskirts);\n a1.setExit(\"east\", a2);\n a1.setExit(\"south\", b1);\n \n a2.setExit(\"east\", a3);\n a2.setExit(\"west\", a1);\n a2.setExit(\"south\", b2);\n a2.setExit(\"north\", outskirts);\n \n a3.setExit(\"north\", outskirts);\n a3.setExit(\"west\", a2);\n a3.setExit(\"south\", b3);\n \n b1.setExit(\"north\", a1);\n b1.setExit(\"east\", b2);\n b1.setExit(\"south\", c1);\n \n b2.setExit(\"east\", b3);\n b2.setExit(\"west\", b1);\n b2.setExit(\"south\", c2);\n b2.setExit(\"north\", a2);\n \n b3.setExit(\"north\", a3);\n b3.setExit(\"west\", b2);\n b3.setExit(\"south\", c3);\n b3.setExit(\"up\", cliff);\n \n c1.setExit(\"north\", b1);\n c1.setExit(\"east\", c2);\n c1.setExit(\"south\" , bridge);\n \n c2.setExit(\"east\", c3);\n c2.setExit(\"west\", c1);\n c2.setExit(\"north\", b2);\n \n c3.setExit(\"west\", c2);\n c3.setExit(\"north\", b3);\n \n outskirts.setExit(\"north\", win);\n outskirts.setExit(\"east\", a3);\n outskirts.setExit(\"west\", a1);\n outskirts.setExit(\"south\", a2);\n \n cliff.setExit(\"north\", outskirts);\n cliff.setExit(\"east\", win);\n \n bridge.setExit(\"north\", c1);\n bridge.setExit(\"south\", win);\n \n c3.addItem(new Item (\"shiny stone\", 0.1));\n a1.addItem(new Item (\"sturdy branch\", 2));\n a3.addItem(new Item(\"water bottle\" , 0.5));\n a3.addItem(new Item(\"ripped backpack\" , 1));\n currentRoom = b2; // start game outside\n }", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "public void setItemDescription(String description){\r\n\t\tthis.itemDescription = description;\r\n\t}", "void createItem (String name, String description, double price);", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "public void create(String type, String description, Integer quantity) {\n\n Object[][] obj = null;\n\n switch (type.toUpperCase()) {\n case \"BOOK\":\n obj = createBook(description, quantity);\n break;\n case \"CD\":\n obj = createCompactDisc(description, quantity);\n break;\n case \"DVD\":\n obj = createDigitalVideoDisc(description, quantity);\n break;\n }\n\n for (View v : views) {\n v.update(obj);\n }\n\n }", "WithCreate withDescription(String description);", "WithCreate withDescription(String description);", "public void create(String description, Integer quantity, Integer pages) {\n\n Object[][] obj = null;\n\n obj = createBook(description, quantity, pages);\n\n for (View v : views) {\n v.update(obj);\n }\n\n }", "public static void main(String[] args) {\n\tArrayList<Item> hallInventory = new ArrayList<>();\n\tArrayList<Exit> hallExits = new ArrayList<>();\n\tRoom Hall = new Room(\"Entrance Hall\", \"It is an entrance hall of a very grand house\", hallInventory, hallExits);\n\n\t//kitchen\n\tArrayList<Item> kitchenInventory = new ArrayList<>();\n\tArrayList<Exit> kitchenExits = new ArrayList<>();\n\tRoom Kitchen = new Room(\"Kitchen\", \"This is a very large kitchen.\", kitchenInventory, kitchenExits);\n\n\t//dining room\n\tArrayList<Item> diningInventory = new ArrayList<>();\n\tArrayList<Exit> diningExits = new ArrayList<>();\n\tRoom Dining = new Room(\"Dining Room\", \"This dining room is set for 12 people\", diningInventory, diningExits);\n\n\t//lounge\n\tArrayList<Item> loungeInventory = new ArrayList<>();\n\tArrayList<Exit> loungeExits = new ArrayList<>();\n\tRoom Lounge = new Room(\"Lounge\", \"The Lounge is a mess, and there are blood spatters on the wall\", loungeInventory, loungeExits);\n\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"Fill rooms with objects\">\n\thallInventory.add(new Item(\"a fruit bowl\", \"The fruit bowl contains some fruit\"));\n\thallInventory.add(new Item(\"a clock\", \"Tick Tock\"));\n\tkitchenInventory.add(new Item(\"a stove\", \"The stove is very hot\"));\n\tkitchenInventory.add(new Item(\"a knife\", \"The knife is blunt\"));\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"add exits to rooms\">\n\thallExits.add(new Exit(1, Lounge));\n\thallExits.add(new Exit(4, Dining));\n\tloungeExits.add(new Exit(2, Hall));\n\tdiningExits.add(new Exit(3, Hall));\n\tdiningExits.add(new Exit(4, Kitchen));\n\tkitchenExits.add(new Exit(3, Dining));\n\t//</editor-fold>\n\n\t//create character : Avatar\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"character creation\">\n\tArrayList<Item> invent = new ArrayList<>();\n\tCharacter Avatar = new Character(\"Tethys\", \"A tall elf dressed in armour\", 100, invent);\n\tinvent.add(new Item(\"armour\", \"leather armour\"));\n\t//</editor-fold>\n\t//begin\n\tRoom currentLoc = Hall;\n\tSystem.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\tcurrentLoc.printInventory();\n\tcurrentLoc.printExits();\n\n\tBufferedReader command = new BufferedReader(new InputStreamReader(System.in));\n\tString orders = null;\n\twhile (true) {\n\t System.out.print(\"What do you want to do? \");\n\t try {\n\t\torders = command.readLine();\n\t } catch (IOException ioe) {\n\t\tSystem.out.println(\"I'm sorry, I didn't understand that!\");\n\t\tSystem.exit(1);\n\t }\n\n\t String[] orderWords = orders.split(\" \");\n\n//\t for (String s : orderWords){\n//\t\tSystem.out.print(s);\n\t switch (orderWords[0].toLowerCase()) {\n\t\tcase \"go\":\n\t\t int count = 0;\n\t\t for (Exit e : currentLoc.getExits()) {\n\t\t\tString direct = orderWords[1].toUpperCase();\n\t\t\tif (direct.equals(e.getDirectionName())) {\n\t\t\t currentLoc = e.getLeadsTo();\n\t\t\t count++;\n\t\t\t System.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\t\t\t currentLoc.printInventory();\n\t\t\t currentLoc.printExits();\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t if (count == 0) {\n\t\t\tSystem.out.print(\"I'm sorry, I can't go that way.\\n\");\n\t\t }\n\t\t break;\n\n\t\tcase \"pick\":\n\n\n\t\tcase \"put\":\n\n\n\t\tcase \"exit\":\n\t\t System.exit(0);\n\t\t break;\n\t }\n\n\t}\n\n\n }", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public void genLists() {\n\t\tItem noitem = new Item(\"nothing\", \"You don't see that here.\", \"no_item\", \"\", true);\r\n\t\titems.put(noitem.getId(), noitem);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//DataInputStream in = new DataInputStream(new FileInputStream(ITEM_FILE));\r\n\t\t\tDataInputStream in = new DataInputStream(getClass().getResourceAsStream(ITEM_FILE));\r\n\t\t\ttry {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tItem new_item = Item.readItem(in);\r\n\t\t\t\t\titems.put(new_item.getId(), new_item);\r\n\t\t\t\t}\r\n\t\t\t} catch (EOFException eof) {}\r\n\t\t\tin.close();\r\n\t\t\t\r\n\t\t\tin = new DataInputStream(getClass().getResourceAsStream(ROOM_FILE));\r\n\t\t\ttry {\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tRoom new_room = Room.readRoom(in, items);\r\n\t\t\t\t\trooms.put(new_room.getId(), new_room);\r\n\t\t\t\t}\r\n\t\t\t} catch (EOFException eof) {}\r\n\t\t\tin.close();\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t\t\r\n\t\tplayer.setCurrentRoom(getRoom(\"start\"));\r\n\t}", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "private void createRooms()\n {\n // create the rooms\n prison = new Room(\"Prison\", \"Prison. You awake in a cold, dark cell. Luckily, the wall next to you has been blown open. \\nUnaware of your current circumstances, you press on... \\n\");\n promenade = new Room(\"Promenade\",\"Promenade. After stumbling upon a ladder, you decided to climb up. \\n\" + \n \"You appear outside a sprawling promenade. There appears to be something shiny stuck in the ground... \\n\");\n sewers = new Room(\"Sewers\",\"Sewers. It smells... interesting. As you dive deeper, you hear something creak\");\n ramparts = new Room(\"Ramparts\", \"Ramparts. You feel queasy as you peer down below. \\nAs you make your way along, you're greated by a wounded soldier.\" +\n \"\\nIn clear agony, he slowly closes his eyes as he says, 'the king... ki.. kil... kill the king..' \\n\");\n depths = new Room(\"Depths\", \"Depths. You can hardly see as to where you're going...\" + \"\\n\");\n ossuary = new Room(\"Ossuary\", \"Ossuary. A chill runs down your spine as you examine the skulls... \\n\" +\n \"but wait... is.. is one of them... moving? \\n\" +\"\\n\" + \"\\n\" + \"There seems to be a chest in this room!\" + \"\\n\");\n bridge = new Room(\"Bridge\", \"Bridge. A LOUD SHREIK RINGS OUT BEHIND YOU!!! \\n\");\n crypt = new Room(\"Crypt\", \"Crypt. An eerire feeling begins to set in. Something about this place doesn't seem quite right...\" + \"\\n\");\n graveyard = new Room(\"Graveyard\", \"Graveyard. The soil looks rather soft. \\n\" +\n \"As you being to dive deeper, you begin to hear moans coming from behind you...\");\n forest = new Room(\"Forest\", \"Forest. It used to be gorgeous, and gleaming with life; that is, until the king came...\" + \"\\n\" +\n \"there's quite a tall tower in front of you... if only you had something to climb it.\" + \"\\n\");\n tower = new Room(\"Tower\", \"Tower. As you look over the land, you're astounded by the ruin and destruction the malice and king have left behind. \\n\");\n castle = new Room(\"Castle\", \"Castle. Used to be the most elegant and awe-inspiring building in the land. \\n\" +\n \"That is, before the king showed up... \\n\" +\n \"wait... is that... is that a chest? \\n\");\n throneRoomEntrance = new Room(\"Throne Entrance\", \"You have made it to the throne room entrance. Press on, if you dare.\");\n throne = new Room(\"Throne Room\", \"You have entered the throne room. As you enter, the door slams shut behind you! \\n\" +\n \"Before you stands, the king of all malice and destruction, Mr. Rusch\" + \"\\n\");\n deathRoom1 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom2 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom3 = new Room(\"Death Room\", \"THE DOOR SLAMS SHUT BEHIND YOU\");\n deathRoom4 = new Room(\"Death Room\", \"depths of the earth... well part of you at least.\" + \"\\n\" + \"You fell off the peaks of the castle to your untimely death\");\n \n // initialise room exits\n\n currentRoom = prison; // start game outside player.setRoom(currentRoom);\n player.setRoom(currentRoom);\n \n }", "public Room(String name, String description, Item[] items, Character[] chars, Item[] buriedItems) {\n this(name, description, items, chars, buriedItems, false);\n }", "public Room(String name, String description, Item[] items, Character[] chars, Item[] buriedItems, boolean light) {\n this.name = name;\n this.description = description;\n this.items = new ArrayList<Item>();\n for (int i = 0; i < items.length; i++) {\n this.items.add(items[i]);\n }\n this.chars = new ArrayList<Character>();\n for (int i = 0; i < chars.length; i++) {\n this.chars.add(chars[i]);\n }\n if(buriedItems != null) {\n this.buriedItems = new ArrayList<Item>();\n for(int i = 0; i < buriedItems.length; i++) {\n this.buriedItems.add(buriedItems[i]);\n }\n }\n this.alwaysLit = light;\n }", "@Test\n\tvoid descriptionTest() {\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tString expected = \"Name: \" + item.toString() + \"\\nHeal Amount: \" + item.getHealAmount() +\n\t\t\t\t\t\"\\nCures Plague: \" + item.getCure() +\"\\nOutpost Cost: $\" + item.getPrice();\n\t\t\tassertEquals(item.itemDescription(), expected);\n\t\t}\n\t}", "public DirectorOffice(String description, String name,Room room) {\n\t\tsuper(description, name,room);\n\t this.addItem(new Pass(\"pass-G\"));\n\t}", "public void makeTestRoom() {\r\n\t\tthis.boardData = new BoardData();\r\n\t\tthis.boardData.loadLevelOne();\r\n\r\n\t\tif (boardData.getAllRooms().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room list is empty\");\r\n\t\t} else if (boardData.getAllRooms().get(0).getRoomInventory().isEmpty()) {\r\n\t\t\tSystem.out.println(\"room's inventory is empty\");\r\n\t\t}\r\n\t}", "public void placeMandatoryObjects()\r\n {\r\n Random rng = new Random();\r\n //Adds an endgame chest somewhere (NOT in spawn)\r\n Room tempRoom = getRoom(rng.nextInt(dungeonWidth - 1) +1, rng.nextInt(dungeonHeight - 1) +1);\r\n tempRoom.addObject(new RoomObject(\"Endgame Chest\", \"overflowing with coolness!\"));\r\n if (tempRoom.getMonster() != null)\r\n {\r\n tempRoom.removeMonster();\r\n }\r\n tempRoom.addMonster(new Monster(\"Pelo Den Stygge\", \"FINAL BOSS\", 220, 220, 12));\r\n //Adds a merchant to the spawn room\r\n getRoom(0,0).addObject(new RoomObject(\"Merchant\", \"like a nice fella with a lot of goods (type \\\"wares\\\" to see his goods)\"));\r\n }", "public void makeRoom(String name, String desc){\n\tRoom buffer = new Room(name,desc,gx,gy);\n\n\t//Add adjacencies\n\tif(gy > 0 && rooms[gx][gy - 1] != null){\n\t buffer.addCompass(0, rooms[gx][gy - 1].getRoomName());\n\t rooms[gx][gy - 1].addCompass(1, name);\n\t}\n\tif(gy < 6 && rooms[gx][gy + 1] != null){\n\t buffer.addCompass(1, rooms[gx][gy + 1].getRoomName());\n\t rooms[gx][gy + 1].addCompass(0, name);\n\t}\n\tif(gx < 6 && rooms[gx + 1][gy] != null){\n\t buffer.addCompass(2, rooms[gx + 1][gy].getRoomName());\n\t rooms[gx + 1][gy].addCompass(3, name);\n\t}\n\tif(gx > 0 && rooms[gx - 1][gy] != null){\n\t buffer.addCompass(3, rooms[gx - 1][gy].getRoomName());\n\t rooms[gx - 1][gy].addCompass(2, name);\n\t}\n\t\n\trooms[gx][gy] = buffer;\t\n\trevalidate();\n }", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "static void addStuff(Room room, Scanner in) {\n String name = in.nextLine().trim();\n while (name.length() > 0) {\n if(name.equals(\"space gun\")){\n room.add(new SpaceGun());\n } else if(name.equals(\"lightsaber\")){\n room.add(new LightSaber());\n } else if(name.equals(\"pillow\")){\n room.add(new Pillow());\n } else if(name.equals(\"blankets\")){\n room.add(new Blankets());\n } else if(name.equals(\"Charlie McDowell\")){\n room.add(new HorrificBeast());\n } else if(name.equals(\"cryonics files\")){\n room.add(new CryoFiles());\n } else if(name.equals(\"coding transcripts\")){\n room.add(new CodingTranscripts());\n } else if(name.equals(\"bananas\")){\n room.add(new Bananas());\n } else if(name.equals(\"transmitter\")){\n room.add(new Transmitter());\n } else {\n room.add(new Thing(name));\n }\n name = in.nextLine().trim(); \n }\n }", "public Item(String id, String description) {\r\n\t\tthis.id = id;\r\n\t\tthis.description = description;\r\n\t\r\n\t}", "private static void customItems(ItemDefinition itemDef) {\n\n\t\tswitch (itemDef.id) {\n\n\t\tcase 11864:\n\t\tcase 11865:\n\t\tcase 19639:\n\t\tcase 19641:\n\t\tcase 19643:\n\t\tcase 19645:\n\t\tcase 19647:\n\t\tcase 19649:\n\t\tcase 23073:\n\t\tcase 23075:\n\t\t\titemDef.equipActions[2] = \"Log\";\n\t\t\titemDef.equipActions[1] = \"Check\";\n\t\t\tbreak;\n\n\t\tcase 13136:\n\t\t\titemDef.equipActions[2] = \"Elidinis\";\n\t\t\titemDef.equipActions[1] = \"Kalphite Hive\";\n\t\t\tbreak;\n\t\tcase 2550:\n\t\t\titemDef.equipActions[2] = \"Check\";\n\t\t\tbreak;\n\n\t\tcase 1712:\n\t\tcase 1710:\n\t\tcase 1708:\n\t\tcase 1706:\n\t\t\titemDef.equipActions[1] = \"Edgeville\";\n\t\t\titemDef.equipActions[2] = \"Karamja\";\n\t\t\titemDef.equipActions[3] = \"Draynor\";\n\t\t\titemDef.equipActions[4] = \"Al-Kharid\";\n\t\t\tbreak;\n\n\t\tcase 22000:\n\t\t\titemDef.name = \"Lava partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 22001:\n\t\t\titemDef.name = \"Infernal partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 2552:\n\t\tcase 2554:\n\t\tcase 2556:\n\t\tcase 2558:\n\t\tcase 2560:\n\t\tcase 2562:\n\t\tcase 2564:\n\t\tcase 2566: // Ring of duelling\n\t\t\titemDef.equipActions[2] = \"Shantay Pass\";\n\t\t\titemDef.equipActions[1] = \"Clan wars\";\n\t\t\tbreak;\n\n\t\tcase 21307:\n\t\t\titemDef.name = \"Pursuit crate\";\n\t\t\tbreak;\n\n\t\tcase 12792:\n\t\t\titemDef.name = \"Graceful recolor kit\";\n\t\t\tbreak;\n\n\t\tcase 12022:\n\t\t\titemDef.name = \"Bandos Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Bandos gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 12024:\n\t\t\titemDef.name = \"Armadyl Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Armadyl gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 12026:\n\t\t\titemDef.name = \"Saradomin Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Saradomin gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 12028:\n\t\t\titemDef.name = \"Zamorak Casket\";\n\t\t\titemDef.description = \"100% chance for an item off the Zamorak gwds rare drop table.\";\n\t\t\tbreak;\n\n\t\tcase 964:\n\t\t\titemDef.name = \"Pet Petie\";\n\t\t\tbreak;\n\n\t\tcase 20853:\n\t\t\titemDef.name = \"Deep Sea Bait\";\n\t\t\titemDef.stackable = true;\n\t\t\tbreak;\n\n\t\t/*\n\t\t * case 17014: itemDef.name = \"Dragon flail\"; itemDef.modelId = 50083;\n\t\t * itemDef.modelZoom = 1440; itemDef.modelRotation2 = 272;\n\t\t * itemDef.modelRotation1 = 352; itemDef.modelOffset1 = 32;\n\t\t * //itemDef.modelOffset2 = 0; itemDef.maleModel = 50083; itemDef.femaleModel =\n\t\t * 50083; itemDef.anInt164 = -1; itemDef.anInt188 = -1; itemDef.aByte205 = -8;\n\t\t * itemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t * itemDef.inventoryOptions = new String[] { \"Wear\", null, null, null, \"Drop\" };\n\t\t * itemDef.description = \"An Ancient Dragon Flail.\"; break;\n\t\t */\n\n\t\tcase 33272:\n\t\t\titemDef.name = \"Justiciar's Longsword\";\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modelId = 65472;\n\t\t\titemDef.modelZoom = 1726;\n\t\t\titemDef.modelRotation1 = 1576;\n\t\t\titemDef.modelRotation2 = 242;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\t// itemDef.anInt204 = 0;\n\t\t\t// itemDef.aByte205 = -12;\n\t\t\t// itemDef.aByte154 = 0;\n\t\t\titemDef.maleModel = 65465;\n\t\t\titemDef.femaleModel = 65465;\n\t\t\titemDef.description = \"An ancient longsword received from the Trial of Flames.\";\n\t\t\tbreak;\n\n\t\tcase 33168:\n\t\t\titemDef.name = \"Justiciar kiteshield\";\n\t\t\titemDef.modelId = 65471;\n\t\t\titemDef.modelZoom = 1600;\n\t\t\titemDef.modelRotation2 = 250;\n\t\t\titemDef.modelRotation1 = 300;\n\t\t\titemDef.modelOffset1 = -4;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.maleModel = 65473;\n\t\t\titemDef.femaleModel = 65474;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An ancient kiteshield. Part of the Justiciar set.\";\n\t\t\tbreak;\n\n\t\tcase 2996:\n\t\t\titemDef.name = \"PKP Ticket\";\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.description = \"Exchange this for a PK Point.\";\n\t\t\tbreak;\n\t\tcase 13226:\n\t\t\titemDef.name = \"Herb Sack\";\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.description = \"A sack for storing grimy herbs.\";\n\t\t\tbreak;\n\t\tcase 13346:\n\t\t\titemDef.name = \"Raid Mystery Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Open for chances to receive Raid items & other awesome rewards.\";\n\t\t\tbreak;\n\t\tcase 8800:\n\t\t\titemDef.name = \"Donator Tokens\";\n\t\t\titemDef.modelId = 31624;\n\t\t\t// itemDef.stackAmounts = new int[] { 2, 3, 50, 100, 500000, 1000000, 2500000,\n\t\t\t// 10000000, 100000000, 0 };//amount the model will change at\n\t\t\t// itemDef.stackIDs = new int[] { 8801, 8802, 8803, 8804, 8805, 8806, 8807,\n\t\t\t// 8808, 8809, 0 };//new item id to grab the model from\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 853;\n\t\t\titemDef.modelRotation2 = 1885;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8801:\n\t\t\titemDef.name = \"Donator Tokens\";\n\t\t\titemDef.modelId = 15344;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8802:\n\t\t\titemDef.name = \"Donator Tokens\";\n\t\t\titemDef.modelId = 15345;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8803:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15346;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8804:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15347;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8805:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15348;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8806:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15349;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8807:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15350;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8808:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15351;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 8809:\n\t\t\titemDef.name = \"Donator Coins\";\n\t\t\titemDef.modelId = 15352;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modifiedModelColors = new int[] { 5813, 9139 };\n\t\t\titemDef.originalModelColors = new int[] { 22450, 22450 };\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation2 = 1764;\n\t\t\titemDef.modelRotation1 = 202;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Tokens for the Donator Store.\";\n\t\t\tbreak;\n\t\tcase 15098:\n\t\t\titemDef.name = \"Dice (up to 100)\";\n\t\t\titemDef.description = \"A 100-sided dice.\";\n\t\t\titemDef.modelId = 31223;\n\t\t\titemDef.modelZoom = 1104;\n\t\t\titemDef.modelRotation2 = 215;\n\t\t\titemDef.modelRotation1 = 94;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.modelOffset1 = -18;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Public-roll\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.name = \"Dice (up to 100)\";\n\t\t\titemDef.anInt196 = 15;\n\t\t\titemDef.anInt184 = 25;\n\t\t\tbreak;\n\n\t\tcase 32991:\n\t\t\titemDef.name = \"Divine spirit shield\";\n\t\t\titemDef.description = \"An ethereal shield with an divine sigil attached to it.\";\n\t\t\titemDef.modelId = 50001;\n\t\t\titemDef.maleModel = 50002;\n\t\t\titemDef.femaleModel = 50002;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation2 = 1050;\n\t\t\titemDef.modelRotation1 = 396;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\tbreak;\n\t\tcase 32992:\n\t\t\titemDef.name = \"Rainbow spirit shield\";\n\t\t\titemDef.description = \"An ethereal shield with all 4 sigils attached to it.\";\n\t\t\titemDef.modelId = 50004;\n\t\t\titemDef.maleModel = 50005;\n\t\t\titemDef.femaleModel = 50005;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation2 = 1050;\n\t\t\titemDef.modelRotation1 = 396;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32993:\n\t\t\titemDef.name = \"Divine sigil\";\n\t\t\titemDef.description = \"A sigil in the shape of a divine symbol.\";\n\t\t\titemDef.modelId = 50003;\n\t\t\titemDef.modelZoom = 848;\n\t\t\titemDef.modelRotation1 = 267;\n\t\t\titemDef.modelRotation2 = 138;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33060:\n\t\t\titemDef.name = \"Barrows Sword\";\n\t\t\titemDef.description = \"A sword glowing with otherworldy energy.\";\n\t\t\titemDef.modelId = 22325;\n\t\t\titemDef.maleModel = 50010;\n\t\t\titemDef.femaleModel = 50010;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation2 = 1050;\n\t\t\titemDef.modelRotation1 = 396;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\tbreak;\n\t\tcase 32994:\n\t\t\titemDef.name = \"Statius's platebody\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42602;\n\t\t\titemDef.maleModel = 35951;\n\t\t\titemDef.femaleModel = 35964;\n\t\t\titemDef.modelZoom = 1312;\n\t\t\titemDef.modelRotation1 = 272;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -2;\n\t\t\titemDef.modelOffset2 = 39;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32995:\n\t\t\titemDef.name = \"Statius's platelegs\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42590;\n\t\t\titemDef.maleModel = 35947;\n\t\t\titemDef.femaleModel = 35961;\n\t\t\titemDef.modelZoom = 1625;\n\t\t\titemDef.modelRotation1 = 355;\n\t\t\titemDef.modelRotation2 = 2046;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32996:\n\t\t\titemDef.name = \"Statius's full helm\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42596;\n\t\t\titemDef.maleModel = 35943;\n\t\t\titemDef.femaleModel = 35958;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 2039;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32997:\n\t\t\titemDef.name = \"Statius's warhammer\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42577;\n\t\t\titemDef.maleModel = 35968;\n\t\t\titemDef.femaleModel = 35968;\n\t\t\titemDef.modelZoom = 1360;\n\t\t\titemDef.modelRotation1 = 507;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 7;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32998:\n\t\t\titemDef.name = \"Vesta's chainbody\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42593;\n\t\t\titemDef.maleModel = 35953;\n\t\t\titemDef.femaleModel = 35965;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 545;\n\t\t\titemDef.modelRotation2 = 2;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 32999:\n\t\t\titemDef.name = \"Vesta's plateskirt\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42581;\n\t\t\titemDef.maleModel = 35950;\n\t\t\titemDef.femaleModel = 35960;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33000:\n\t\t\titemDef.name = \"Vesta's longsword\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42597;\n\t\t\titemDef.maleModel = 35969;\n\t\t\titemDef.femaleModel = 35969;\n\t\t\titemDef.modelZoom = 1744;\n\t\t\titemDef.modelRotation1 = 738;\n\t\t\titemDef.modelRotation2 = 1985;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33001:\n\t\t\titemDef.name = \"Vesta's spear\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42599;\n\t\t\titemDef.maleModel = 35973;\n\t\t\titemDef.femaleModel = 35973;\n\t\t\titemDef.modelZoom = 2022;\n\t\t\titemDef.modelRotation1 = 480;\n\t\t\titemDef.modelRotation2 = 15;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33002:\n\t\t\titemDef.name = \"Morrigan's leather body\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42578;\n\t\t\titemDef.maleModel = 35954;\n\t\t\titemDef.femaleModel = 35963;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 545;\n\t\t\titemDef.modelRotation2 = 2;\n\t\t\titemDef.modelOffset1 = -2;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33003:\n\t\t\titemDef.name = \"Morrigan's leather chaps\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42603;\n\t\t\titemDef.maleModel = 35948;\n\t\t\titemDef.femaleModel = 35959;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 482;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33004:\n\t\t\titemDef.name = \"Morrigan's coif\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42583;\n\t\t\titemDef.maleModel = 35945;\n\t\t\titemDef.femaleModel = 35956;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 537;\n\t\t\titemDef.modelRotation2 = 5;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33005:\n\t\t\titemDef.name = \"Morrigan's javelin\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42592;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.maleModel = 42613;\n\t\t\titemDef.femaleModel = 42613;\n\t\t\titemDef.modelZoom = 1872;\n\t\t\titemDef.modelRotation1 = 282;\n\t\t\titemDef.modelRotation2 = 2009;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33006:\n\t\t\titemDef.name = \"Morrigan's throwing axe\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42582;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.maleModel = 42611;\n\t\t\titemDef.femaleModel = 42611;\n\t\t\titemDef.modelZoom = 976;\n\t\t\titemDef.modelRotation1 = 672;\n\t\t\titemDef.modelRotation2 = 2024;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33007:\n\t\t\titemDef.name = \"Zuriels robe top\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42591;\n\t\t\titemDef.maleModel = 35952;\n\t\t\titemDef.femaleModel = 35966;\n\t\t\titemDef.modelZoom = 1373;\n\t\t\titemDef.modelRotation1 = 373;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33008:\n\t\t\titemDef.name = \"Zuriels robe bottom\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42588;\n\t\t\titemDef.maleModel = 35949;\n\t\t\titemDef.femaleModel = 35962;\n\t\t\titemDef.modelZoom = 1697;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33009:\n\t\t\titemDef.name = \"Zuriels hood\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42604;\n\t\t\titemDef.maleModel = 35944;\n\t\t\titemDef.femaleModel = 35957;\n\t\t\titemDef.modelZoom = 720;\n\t\t\titemDef.modelRotation1 = 28;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33010:\n\t\t\titemDef.name = \"Zuriels staff\";\n\t\t\titemDef.description = \"This item degrades in combat, and will turn to dust.\";\n\t\t\titemDef.modelId = 42595;\n\t\t\titemDef.maleModel = 35971;\n\t\t\titemDef.femaleModel = 35971;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 366;\n\t\t\titemDef.modelRotation2 = 3;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33011:\n\t\t\titemDef.name = \"Craw's bow (u)\";\n\t\t\titemDef.description = \"This bow once belonged to a formidable follower of Armadyl.\";\n\t\t\titemDef.modelId = 35777;\n\t\t\titemDef.maleModel = 35768;\n\t\t\titemDef.femaleModel = 35768;\n\t\t\titemDef.modelZoom = 1979;\n\t\t\titemDef.modelRotation1 = 1463;\n\t\t\titemDef.modelRotation2 = 510;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33012:\n\t\t\titemDef.name = \"Craw's bow\";\n\t\t\titemDef.description = \"This bow once belonged to a formidable follower of Armadyl.\";\n\t\t\titemDef.modelId = 35777;\n\t\t\titemDef.maleModel = 35769;\n\t\t\titemDef.femaleModel = 35769;\n\t\t\titemDef.modelZoom = 1979;\n\t\t\titemDef.modelRotation1 = 1463;\n\t\t\titemDef.modelRotation2 = 510;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33013:\n\t\t\titemDef.name = \"Thammaron's sceptre (u)\";\n\t\t\titemDef.description = \"A mighty sceptre used in long forgotten battles.\";\n\t\t\titemDef.modelId = 35776;\n\t\t\titemDef.maleModel = 35772;\n\t\t\titemDef.femaleModel = 35772;\n\t\t\titemDef.modelZoom = 2105;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33014:\n\t\t\titemDef.name = \"Thammaron's sceptre\";\n\t\t\titemDef.description = \"A mighty sceptre used in long forgotten battles.\";\n\t\t\titemDef.modelId = 35776;\n\t\t\titemDef.maleModel = 35773;\n\t\t\titemDef.femaleModel = 35773;\n\t\t\titemDef.modelZoom = 2105;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33015:\n\t\t\titemDef.name = \"Viggora's chainmace (u)\";\n\t\t\titemDef.description = \"An ancient chainmace with a peculiar mechanism that allows for varying attack styles.\";\n\t\t\titemDef.modelId = 35778;\n\t\t\titemDef.maleModel = 35770;\n\t\t\titemDef.femaleModel = 35770;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 944;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33016:\n\t\t\titemDef.name = \"Viggora's chainmace\";\n\t\t\titemDef.description = \"An ancient chainmace with a peculiar mechanism that allows for varying attack styles.\";\n\t\t\titemDef.modelId = 35778;\n\t\t\titemDef.maleModel = 35771;\n\t\t\titemDef.femaleModel = 35771;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 944;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33018:\n\t\t\titemDef.name = \"Amulet of avarice\";\n\t\t\titemDef.description = \"A hauntingly beautiful amulet bearing the shape of a skull.\";\n\t\t\titemDef.modelId = 35779;\n\t\t\titemDef.maleModel = 35766;\n\t\t\titemDef.femaleModel = 35766;\n\t\t\titemDef.modelZoom = 420;\n\t\t\titemDef.modelRotation1 = 191;\n\t\t\titemDef.modelRotation2 = 86;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33019:\n\t\t\titemDef.name = \"Completionist cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modelId = 65270;\n\t\t\titemDef.maleModel = 65297;\n\t\t\titemDef.femaleModel = 65316;\n\t\t\titemDef.modelZoom = 1316;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 24;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33020:\n\t\t\titemDef.name = \"Completionist cape (t)\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modelId = 65258;\n\t\t\titemDef.maleModel = 65295;\n\t\t\titemDef.femaleModel = 65328;\n\t\t\titemDef.modelZoom = 1316;\n\t\t\titemDef.modelRotation1 = 252;\n\t\t\titemDef.modelRotation2 = 1020;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 24;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33021:\n\t\t\titemDef.name = \"Torva full helm\";\n\t\t\titemDef.description = \"An ancient warrior's full helm.\";\n\t\t\titemDef.modelId = 62714;\n\t\t\titemDef.maleModel = 62738;\n\t\t\titemDef.femaleModel = 62738;\n\t\t\titemDef.modelZoom = 672;\n\t\t\titemDef.modelRotation1 = 85;\n\t\t\titemDef.modelRotation2 = 1867;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33022:\n\t\t\titemDef.name = \"Torva platebody\";\n\t\t\titemDef.description = \"An ancient warrior's platebody.\";\n\t\t\titemDef.modelId = 62699;\n\t\t\titemDef.maleModel = 62746;\n\t\t\titemDef.femaleModel = 62746;\n\t\t\titemDef.modelZoom = 1506;\n\t\t\titemDef.modelRotation1 = 473;\n\t\t\titemDef.modelRotation2 = 2042;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33023:\n\t\t\titemDef.name = \"Torva platelegs\";\n\t\t\titemDef.description = \"An ancient warrior's platelegs.\";\n\t\t\titemDef.modelId = 62701;\n\t\t\titemDef.maleModel = 62740;\n\t\t\titemDef.femaleModel = 62740;\n\t\t\titemDef.modelZoom = 1740;\n\t\t\titemDef.modelRotation1 = 474;\n\t\t\titemDef.modelRotation2 = 2045;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33024:\n\t\t\titemDef.name = \"Pernix cowl\";\n\t\t\titemDef.description = \"An ancient warrior's cowl.\";\n\t\t\titemDef.modelId = 62693;\n\t\t\titemDef.maleModel = 62739;\n\t\t\titemDef.femaleModel = 62739;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 532;\n\t\t\titemDef.modelRotation2 = 14;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33025:\n\t\t\titemDef.name = \"Pernix body\";\n\t\t\titemDef.description = \"An ancient warrior's leather body.\";\n\t\t\titemDef.modelId = 62709;\n\t\t\titemDef.maleModel = 62744;\n\t\t\titemDef.femaleModel = 62744;\n\t\t\titemDef.modelZoom = 1378;\n\t\t\titemDef.modelRotation1 = 485;\n\t\t\titemDef.modelRotation2 = 2042;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33026:\n\t\t\titemDef.name = \"Pernix chaps\";\n\t\t\titemDef.description = \"An ancient warrior's chaps.\";\n\t\t\titemDef.modelId = 62695;\n\t\t\titemDef.maleModel = 62741;\n\t\t\titemDef.femaleModel = 62741;\n\t\t\titemDef.modelZoom = 1740;\n\t\t\titemDef.modelRotation1 = 504;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33027:\n\t\t\titemDef.name = \"Virtus mask\";\n\t\t\titemDef.description = \"An ancient warrior's mask.\";\n\t\t\titemDef.modelId = 62710;\n\t\t\titemDef.maleModel = 62736;\n\t\t\titemDef.femaleModel = 62736;\n\t\t\titemDef.modelZoom = 928;\n\t\t\titemDef.modelRotation1 = 406;\n\t\t\titemDef.modelRotation2 = 2041;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33028:\n\t\t\titemDef.name = \"Virtus robe top\";\n\t\t\titemDef.description = \"An ancient warrior's robe top.\";\n\t\t\titemDef.modelId = 62704;\n\t\t\titemDef.maleModel = 62748;\n\t\t\titemDef.femaleModel = 62748;\n\t\t\titemDef.modelZoom = 1122;\n\t\t\titemDef.modelRotation1 = 488;\n\t\t\titemDef.modelRotation2 = 3;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33029:\n\t\t\titemDef.name = \"Virtus robe legs\";\n\t\t\titemDef.description = \"An ancient warrior's robe legs.\";\n\t\t\titemDef.modelId = 62700;\n\t\t\titemDef.maleModel = 62742;\n\t\t\titemDef.femaleModel = 62742;\n\t\t\titemDef.modelZoom = 1740;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 2045;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33030:\n\t\t\titemDef.name = \"Zaryte bow\";\n\t\t\titemDef.description = \"An ancient warrior's bow.\";\n\t\t\titemDef.modelId = 62692;\n\t\t\titemDef.maleModel = 62750;\n\t\t\titemDef.femaleModel = 62750;\n\t\t\titemDef.modelZoom = 1703;\n\t\t\titemDef.modelRotation1 = 221;\n\t\t\titemDef.modelRotation2 = 404;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -13;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33083:\n\t\t\titemDef.name = \"Tokhaar-kal\";\n\t\t\titemDef.description = \"\tA cape made of ancient, enchanted obsidian.\";\n\t\t\titemDef.modelId = 52073;\n\t\t\titemDef.maleModel = 52072;\n\t\t\titemDef.femaleModel = 52071;\n\t\t\titemDef.modelZoom = 1615;\n\t\t\titemDef.modelRotation1 = 339;\n\t\t\titemDef.modelRotation2 = 192;\n\t\t\titemDef.modelOffset1 = -4;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33089:\n\t\t\titemDef.name = \"Chaotic maul\";\n\t\t\titemDef.description = \"A maul used to claim life from those who don't deserve it.\";\n\t\t\titemDef.modelId = 54286;\n\t\t\titemDef.maleModel = 56294;\n\t\t\titemDef.femaleModel = 56294;\n\t\t\titemDef.modelZoom = 1447;\n\t\t\titemDef.modelRotation1 = 525;\n\t\t\titemDef.modelRotation2 = 350;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33094:\n\t\t\titemDef.name = \"Chaotic crossbow\";\n\t\t\titemDef.description = \"A small crossbow, only effective at short distance.\";\n\t\t\titemDef.modelId = 54331;\n\t\t\titemDef.maleModel = 56307;\n\t\t\titemDef.femaleModel = 56307;\n\t\t\titemDef.modelZoom = 1028;\n\t\t\titemDef.modelRotation1 = 249;\n\t\t\titemDef.modelRotation2 = 2021;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -54;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33095:\n\t\t\titemDef.name = \"Chaotic staff\";\n\t\t\titemDef.description = \"This staff makes destructive spells more powerful.\";\n\t\t\titemDef.modelId = 54367;\n\t\t\titemDef.maleModel = 56286;\n\t\t\titemDef.femaleModel = 56286;\n\t\t\titemDef.modelZoom = 1711;\n\t\t\titemDef.modelRotation1 = 471;\n\t\t\titemDef.modelRotation2 = 391;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33096:\n\t\t\titemDef.name = \"Chaotic kiteshield\";\n\t\t\titemDef.description = \"A large metal shield.\";\n\t\t\titemDef.modelId = 54358;\n\t\t\titemDef.maleModel = 56038;\n\t\t\titemDef.femaleModel = 56038;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 276;\n\t\t\titemDef.modelRotation2 = 1101;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33031:\n\t\t\titemDef.name = \"Chaotic rapier\";\n\t\t\titemDef.description = \"A razor-sharp rapier.\";\n\t\t\titemDef.modelId = 54197;\n\t\t\titemDef.maleModel = 56252;\n\t\t\titemDef.femaleModel = 56252;\n\t\t\titemDef.modelZoom = 1425;\n\t\t\titemDef.modelRotation1 = 540;\n\t\t\titemDef.modelRotation2 = 1370;\n\t\t\titemDef.modelOffset1 = 9;\n\t\t\titemDef.modelOffset2 = 13;\n\t\t\titemDef.maleOffset = -12;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33032:\n\t\t\titemDef.name = \"Chaotic longsword\";\n\t\t\titemDef.description = \"A razor-sharp longsword.\";\n\t\t\titemDef.modelId = 54204;\n\t\t\titemDef.maleModel = 56237;\n\t\t\titemDef.femaleModel = 56237;\n\t\t\titemDef.modelZoom = 1650;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 1300;\n\t\t\t// itemDef.aByte154 = -14;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -7;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\tbreak;\n\t\tcase 33097:\n\t\t\titemDef.name = \"Sword of Onyxia\";\n\t\t\titemDef.description = \"A razor-sharp longsword.\";\n\t\t\titemDef.modelId = 53091;\n\t\t\titemDef.maleModel = 53092;\n\t\t\titemDef.femaleModel = 53092;\n\t\t\titemDef.modelZoom = 2007;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33098:\n\t\t\titemDef.name = \"Onyxia longsword\";\n\t\t\titemDef.description = \"A razor-sharp 2h sword.\";\n\t\t\titemDef.modelId = 53093;\n\t\t\titemDef.maleModel = 53094;\n\t\t\titemDef.femaleModel = 53094;\n\t\t\titemDef.modelZoom = 4007;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.maleOffset = -8;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33099:\n\t\t\titemDef.name = \"White scimitar\";\n\t\t\titemDef.description = \"A razor-sharp scimitar.\";\n\t\t\titemDef.modelId = 53097;\n\t\t\titemDef.maleModel = 53098;\n\t\t\titemDef.femaleModel = 53098;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 312;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\t// itemDef.aByte154 = -14;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33100:\n\t\t\titemDef.name = \"White kiteshield\";\n\t\t\titemDef.description = \"a heavy kiteshield.\";\n\t\t\titemDef.modelId = 53095;\n\t\t\titemDef.maleModel = 53096;\n\t\t\titemDef.femaleModel = 53096;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelRotation1 = 303;\n\t\t\titemDef.modelRotation2 = 180;\n\t\t\t// itemDef.aByte154 = -14;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33033:\n\t\t\titemDef.name = \"Agility master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 677, 801, 43540, 43543, 43546, 43549, 43550, 43552, 43554, 43558,\n\t\t\t\t\t43560, 43575 };\n\t\t\titemDef.modelId = 50030;\n\t\t\titemDef.maleModel = 50031;\n\t\t\titemDef.femaleModel = 50031;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33034:\n\t\t\titemDef.name = \"Attack master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 7104, 9151, 911, 914, 917, 920, 921, 923, 925, 929, 931, 946 };\n\t\t\titemDef.modelId = 50032;\n\t\t\titemDef.maleModel = 50033;\n\t\t\titemDef.femaleModel = 50033;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33035:\n\t\t\titemDef.name = \"Construction master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 6061, 5945, 6327, 6330, 6333, 6336, 6337, 6339, 6341, 6345, 6347,\n\t\t\t\t\t6362 };\n\t\t\titemDef.modelId = 50034;\n\t\t\titemDef.maleModel = 50035;\n\t\t\titemDef.femaleModel = 50035;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33036:\n\t\t\titemDef.name = \"Cooking master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 920, 920, 51856, 51859, 51862, 51865, 51866, 51868, 51870, 51874,\n\t\t\t\t\t51876, 51891 };\n\t\t\titemDef.modelId = 50036;\n\t\t\titemDef.maleModel = 50037;\n\t\t\titemDef.femaleModel = 50037;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33037:\n\t\t\titemDef.name = \"Crafting master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9142, 9152, 4511, 4514, 4517, 4520, 4521, 4523, 4525, 4529, 4531,\n\t\t\t\t\t4546 };\n\t\t\titemDef.modelId = 50038;\n\t\t\titemDef.maleModel = 50039;\n\t\t\titemDef.femaleModel = 50039;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33038:\n\t\t\titemDef.name = \"Defence master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 10460, 10473, 41410, 41413, 41416, 41419, 41420, 41422, 41424,\n\t\t\t\t\t41428, 41430, 41445 };\n\t\t\titemDef.modelId = 50040;\n\t\t\titemDef.maleModel = 50041;\n\t\t\titemDef.femaleModel = 50041;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33039:\n\t\t\titemDef.name = \"Farming master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 14775, 14792, 22026, 22029, 22032, 22035, 22036, 22038, 22040,\n\t\t\t\t\t22044, 22046, 22061 };\n\t\t\titemDef.modelId = 50042;\n\t\t\titemDef.maleModel = 50043;\n\t\t\titemDef.femaleModel = 50043;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33040:\n\t\t\titemDef.name = \"Firemaking master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 8125, 9152, 4015, 4018, 4021, 4024, 4025, 4027, 4029, 4033, 4035,\n\t\t\t\t\t4050 };\n\t\t\titemDef.modelId = 50044;\n\t\t\titemDef.maleModel = 50045;\n\t\t\titemDef.femaleModel = 50045;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33041:\n\t\t\titemDef.name = \"Fishing master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9144, 9152, 38202, 38205, 38208, 38211, 38212, 38214, 38216,\n\t\t\t\t\t38220, 38222, 38237 };\n\t\t\titemDef.modelId = 50046;\n\t\t\titemDef.maleModel = 50047;\n\t\t\titemDef.femaleModel = 50047;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33042:\n\t\t\titemDef.name = \"Fletching master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 6067, 9152, 33670, 33673, 33676, 33679, 33680, 33682, 33684,\n\t\t\t\t\t33688, 33690, 33705 };\n\t\t\titemDef.modelId = 50048;\n\t\t\titemDef.maleModel = 50049;\n\t\t\titemDef.femaleModel = 50049;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33043:\n\t\t\titemDef.name = \"Herblore master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9145, 9156, 22414, 22417, 22420, 22423, 22424, 22426, 22428,\n\t\t\t\t\t22432, 22434, 22449 };\n\t\t\titemDef.modelId = 50050;\n\t\t\titemDef.maleModel = 50051;\n\t\t\titemDef.femaleModel = 50051;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33044:\n\t\t\titemDef.name = \"Hitpoints master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 818, 951, 8291, 8294, 8297, 8300, 8301, 8303, 8305, 8309, 8311,\n\t\t\t\t\t8319 };\n\t\t\titemDef.modelId = 50052;\n\t\t\titemDef.maleModel = 50053;\n\t\t\titemDef.femaleModel = 50053;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\titemDef.femaleOffset = 4;\n\t\t\tbreak;\n\t\tcase 33045:\n\t\t\titemDef.name = \"Hunter master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 5262, 6020, 8472, 8475, 8478, 8481, 8482, 8484, 8486, 8490, 8492,\n\t\t\t\t\t8507 };\n\t\t\titemDef.modelId = 50054;\n\t\t\titemDef.maleModel = 50055;\n\t\t\titemDef.femaleModel = 50055;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33046:\n\t\t\titemDef.name = \"Magic master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 43569, 43685, 6336, 6339, 6342, 6345, 6346, 6348, 6350, 6354,\n\t\t\t\t\t6356, 6371 };\n\t\t\titemDef.modelId = 50056;\n\t\t\titemDef.maleModel = 50057;\n\t\t\titemDef.femaleModel = 50057;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33047:\n\t\t\titemDef.name = \"Mining master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 36296, 36279, 10386, 10389, 10392, 10395, 10396, 10398, 10400,\n\t\t\t\t\t10404, 10406, 10421 };\n\t\t\titemDef.modelId = 50058;\n\t\t\titemDef.maleModel = 50059;\n\t\t\titemDef.femaleModel = 50059;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33048:\n\t\t\titemDef.name = \"Prayer master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9163, 9168, 117, 120, 123, 126, 127, 127, 127, 127, 127, 127 };\n\t\t\titemDef.modelId = 50060;\n\t\t\titemDef.maleModel = 50061;\n\t\t\titemDef.femaleModel = 50061;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33049:\n\t\t\titemDef.name = \"Range master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 3755, 3998, 15122, 15125, 15128, 15131, 15132, 15134, 15136,\n\t\t\t\t\t15140, 15142, 15157 };\n\t\t\titemDef.modelId = 50062;\n\t\t\titemDef.maleModel = 50063;\n\t\t\titemDef.femaleModel = 50063;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33050:\n\t\t\titemDef.name = \"Runecrafting master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\t// 4 //7 //10 //13 //14//16//18//22 //24//39\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 9152, 8128, 10318, 10321, 10324, 10327, 10328, 10330, 10332,\n\t\t\t\t\t10336, 10338, 10353 };\n\t\t\titemDef.modelId = 50064;\n\t\t\titemDef.maleModel = 50065;\n\t\t\titemDef.femaleModel = 50065;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33051:\n\t\t\titemDef.name = \"Slayer master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811 };\n\t\t\titemDef.originalModelColors = new int[] { 912, 920 };\n\t\t\titemDef.modelId = 50066;\n\t\t\titemDef.maleModel = 50067;\n\t\t\titemDef.femaleModel = 50067;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33052:\n\t\t\titemDef.name = \"Smithing master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 8115, 9148, 10386, 10389, 10392, 10395, 10396, 10398, 10400,\n\t\t\t\t\t10404, 10406, 10421 };\n\t\t\titemDef.modelId = 50068;\n\t\t\titemDef.maleModel = 50069;\n\t\t\titemDef.femaleModel = 50069;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33053:\n\t\t\titemDef.name = \"Strength master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 935, 931, 27538, 27541, 27544, 27547, 27548, 27550, 27552, 27556,\n\t\t\t\t\t27558, 27573 };\n\t\t\titemDef.modelId = 50070;\n\t\t\titemDef.maleModel = 50071;\n\t\t\titemDef.femaleModel = 50071;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33054:\n\t\t\titemDef.name = \"Thieving master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 11, 0, 58779, 58782, 58785, 58788, 58789, 57891, 58793, 58797,\n\t\t\t\t\t58799, 58814 };\n\t\t\titemDef.modelId = 50072;\n\t\t\titemDef.maleModel = 50073;\n\t\t\titemDef.femaleModel = 50073;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33055:\n\t\t\titemDef.name = \"Woodcutting master cape\";\n\t\t\titemDef.description = \"\tA cape worn by those who've overachieved.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 57022, 48811, 2, 1029, 1032, 11, 12, 14, 16, 20, 22, 2 };\n\t\t\titemDef.originalModelColors = new int[] { 25109, 24088, 6693, 6696, 6699, 6702, 6703, 6705, 6707, 6711,\n\t\t\t\t\t6713, 6728 };\n\t\t\titemDef.modelId = 50074;\n\t\t\titemDef.maleModel = 50075;\n\t\t\titemDef.femaleModel = 50075;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 5;\n\t\t\tbreak;\n\t\tcase 33057:\n\t\t\titemDef.name = \"Abyssal Scythe\";\n\t\t\titemDef.description = \"\tA Scythe recieved from the Trials of Xeric CUSTOM RAID.\";\n\t\t\titemDef.modelId = 50081;\n\t\t\titemDef.maleModel = 50080;\n\t\t\titemDef.femaleModel = 50080;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.maleOffset = -12;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33090:\n\t\t\titemDef.name = \"Goliath gloves (Black)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50100;\n\t\t\titemDef.femaleModel = 50101;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33091:\n\t\t\titemDef.name = \"Goliath gloves (Red)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50102;\n\t\t\titemDef.femaleModel = 50103;\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 65046, 65051, 65056 };\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33092:\n\t\t\titemDef.name = \"Goliath gloves (White)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50104;\n\t\t\titemDef.femaleModel = 50105;\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 64585, 64590, 64595 };\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33093:\n\t\t\titemDef.name = \"Goliath gloves (Yellow)\";\n\t\t\titemDef.description = \"\tA pair of gloves earned with blood.\";\n\t\t\titemDef.modelId = 50108;\n\t\t\titemDef.maleModel = 50106;\n\t\t\titemDef.femaleModel = 50107;\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 9767, 9772, 9777 };\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 40;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 12639:\n\t\tcase 12637:\n\t\tcase 12638:\n\t\t\titemDef.description = \"Provides players with infinite run energy!\";\n\t\t\tbreak;\n\t\tcase 33056:\n\t\t\titemDef.name = \"Events cape (slayer)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 933, 0, 0, 0, 0 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33081:\n\t\t\titemDef.name = \"Events cape (agility)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 669, 43430, 43430, 43430, 43430 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33080:\n\t\t\titemDef.name = \"Events cape (attack)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 9926, 1815, 1815, 1815, 1815 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33059:\n\t\t\titemDef.name = \"Events cape (construction)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 6967, 6343, 6343, 6343, 6343 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33061:\n\t\t\titemDef.name = \"Events cape (cooking)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 1819, 49685, 49685, 49685, 49685 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33062:\n\t\t\titemDef.name = \"Events cape (crafting)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 7994, 4516, 4516, 4516, 4516 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33063:\n\t\t\titemDef.name = \"Events cape (defence)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 39367, 10472, 10472, 10472, 10472 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33064:\n\t\t\titemDef.name = \"Events cape (farming)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10698, 19734, 19734, 19734, 19734 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33065:\n\t\t\titemDef.name = \"Events cape (firemaking)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10059, 4922, 4922, 4922, 4922 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33066:\n\t\t\titemDef.name = \"Events cape (fishing)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10047, 36165, 36165, 36165, 36165 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33067:\n\t\t\titemDef.name = \"Events cape (fletching)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10047, 31500, 31500, 31500, 31500 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33068:\n\t\t\titemDef.name = \"Events cape (herblore)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10051, 20889, 20889, 20889, 20889 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33069:\n\t\t\titemDef.name = \"Events cape (hitpoints)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 1836, 8296, 8296, 8296, 8296 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33070:\n\t\t\titemDef.name = \"Events cape (hunter)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 6916, 8477, 8477, 8477, 8477 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33071:\n\t\t\titemDef.name = \"Events cape (magic)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 43556, 6339, 6339, 6339, 6339 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33072:\n\t\t\titemDef.name = \"Events cape (mining)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 34111, 10391, 10391, 10391, 10391 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33073:\n\t\t\titemDef.name = \"Events cape (prayer)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 9927, 2169, 2169, 2169, 2169 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33074:\n\t\t\titemDef.name = \"Events cape (range)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 3626, 20913, 20913, 20913, 20913 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33075:\n\t\t\titemDef.name = \"Events cape (runecrafting)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10047, 10323, 10323, 10323, 10323 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33076:\n\t\t\titemDef.name = \"Events cape (smithing)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 10044, 5412, 5412, 5412, 5412 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33077:\n\t\t\titemDef.name = \"Events cape (strength)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 1819, 30487, 30487, 30487, 30487 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33078:\n\t\t\titemDef.name = \"Events cape (thieveing)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 8, 57636, 57636, 57636, 57636 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33079:\n\t\t\titemDef.name = \"Events cape (woodcutting)\";\n\t\t\titemDef.description = \"events cape.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 38333, 127, 107, 115, 90 };\n\t\t\titemDef.originalModelColors = new int[] { 26007, 6570, 6570, 6570, 6570 };\n\t\t\titemDef.modelId = 34418;\n\t\t\titemDef.maleModel = 34271;\n\t\t\titemDef.femaleModel = 34288;\n\t\t\titemDef.modelZoom = 1960;\n\t\t\titemDef.modelRotation1 = 528;\n\t\t\titemDef.modelRotation2 = 1583;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33101:\n\t\t\titemDef.name = \"Vorkath platebody\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53100;\n\t\t\titemDef.maleModel = 53099;\n\t\t\titemDef.femaleModel = 53099;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33102:\n\t\t\titemDef.name = \"Vorkath platelegs\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53102;\n\t\t\titemDef.maleModel = 53101;\n\t\t\titemDef.femaleModel = 53101;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33103:\n\t\t\titemDef.name = \"Vorkath boots\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53104;\n\t\t\titemDef.maleModel = 53103;\n\t\t\titemDef.femaleModel = 53103;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33104:\n\t\t\titemDef.name = \"Vorkath gloves\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53106;\n\t\t\titemDef.maleModel = 53105;\n\t\t\titemDef.femaleModel = 53105;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33105:\n\t\t\titemDef.name = \"Vorkath helmet\";\n\t\t\titemDef.description = \"Vorkath armour.\";\n\t\t\titemDef.modelId = 53108;\n\t\t\titemDef.maleModel = 53107;\n\t\t\titemDef.femaleModel = 53107;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33106:\n\t\t\titemDef.name = \"Tekton helmet\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53118;\n\t\t\titemDef.maleModel = 53117;\n\t\t\titemDef.femaleModel = 53117;\n\t\t\titemDef.modelZoom = 724;\n\t\t\titemDef.modelRotation1 = 81;\n\t\t\titemDef.modelRotation2 = 1670;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33107:\n\t\t\titemDef.name = \"Tekton platebody\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53110;\n\t\t\titemDef.maleModel = 53109;\n\t\t\titemDef.femaleModel = 53109;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33108:\n\t\t\titemDef.name = \"Tekton platelegs\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53112;\n\t\t\titemDef.maleModel = 53111;\n\t\t\titemDef.femaleModel = 53111;\n\t\t\titemDef.modelZoom = 1550;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 186;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 11;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33109:\n\t\t\titemDef.name = \"Tekton gloves\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53116;\n\t\t\titemDef.maleModel = 53115;\n\t\t\titemDef.femaleModel = 53115;\n\t\t\titemDef.modelZoom = 830;\n\t\t\titemDef.modelRotation1 = 536;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33110:\n\t\t\titemDef.name = \"Tekton boots\";\n\t\t\titemDef.description = \"Tekton armour.\";\n\t\t\titemDef.modelId = 53114;\n\t\t\titemDef.maleModel = 53113;\n\t\t\titemDef.femaleModel = 53113;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33111:\n\t\t\titemDef.name = \"Anti-santa scythe\";\n\t\t\titemDef.description = \"Legend says this is the biggest arse scratcher around.\";\n\t\t\titemDef.modelId = 57002;\n\t\t\titemDef.maleModel = 57001;\n\t\t\titemDef.femaleModel = 57001;\n\t\t\titemDef.modelZoom = 3224;\n\t\t\titemDef.modelRotation1 = 539;\n\t\t\titemDef.modelRotation2 = 714;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33112:\n\t\t\titemDef.name = \"Dominion staff\";\n\t\t\titemDef.description = \"Dominion staff.\";\n\t\t\titemDef.modelId = 59029;\n\t\t\titemDef.maleModel = 59305;\n\t\t\titemDef.femaleModel = 59305;\n\t\t\titemDef.modelZoom = 1872;\n\t\t\titemDef.modelRotation1 = 288;\n\t\t\titemDef.modelRotation2 = 1685;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33113:\n\t\t\titemDef.name = \"Dominion sword\";\n\t\t\titemDef.description = \"Dominion sword.\";\n\t\t\titemDef.modelId = 59832;\n\t\t\titemDef.maleModel = 59306;\n\t\t\titemDef.femaleModel = 59306;\n\t\t\titemDef.modelZoom = 1829;\n\t\t\titemDef.modelRotation1 = 513;\n\t\t\titemDef.modelRotation2 = 546;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33114:\n\t\t\titemDef.name = \"Dominion crossbow\";\n\t\t\titemDef.description = \"Dominion crossbow.\";\n\t\t\titemDef.modelId = 59839;\n\t\t\titemDef.maleModel = 59304;\n\t\t\titemDef.femaleModel = 59304;\n\t\t\titemDef.modelZoom = 1490;\n\t\t\titemDef.modelRotation1 = 362;\n\t\t\titemDef.modelRotation2 = 791;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33115:\n\t\t\titemDef.name = \"Dragonfire Shield (e)\";\n\t\t\titemDef.description = \"unamed shield.\";\n\t\t\titemDef.modelId = 53120;\n\t\t\titemDef.maleModel = 53119;\n\t\t\titemDef.femaleModel = 53119;\n\t\t\titemDef.modelZoom = 2022;\n\t\t\titemDef.modelRotation1 = 540;\n\t\t\titemDef.modelRotation2 = 123;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[] { null, \"Wear\", \"Inspect\", \"Empty\", \"Drop\" };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33116:\n\t\t\titemDef.name = \"Zilyana's longbow\";\n\t\t\titemDef.description = \"A bow belonged to Zilyana.\";\n\t\t\titemDef.modelId = 53122;\n\t\t\titemDef.maleModel = 53121;\n\t\t\titemDef.femaleModel = 53121;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 636;\n\t\t\titemDef.modelRotation2 = 1010;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33117:\n\t\t\titemDef.name = \"Black dragon hunter crossbow\";\n\t\t\titemDef.description = \"Black dragon hunter crossbow.\";\n\t\t\titemDef.modelId = 53124;\n\t\t\titemDef.maleModel = 53123;\n\t\t\titemDef.femaleModel = 53123;\n\t\t\titemDef.modelZoom = 1554;\n\t\t\titemDef.modelRotation1 = 636;\n\t\t\titemDef.modelRotation2 = 1010;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33118:\n\t\t\titemDef.name = \"Vorkath blowpipe\";\n\t\t\titemDef.description = \"Vorkath blowpipe.\";\n\t\t\titemDef.modelId = 53126;\n\t\t\titemDef.maleModel = 53125;\n\t\t\titemDef.femaleModel = 53125;\n\t\t\titemDef.modelZoom = 1158;\n\t\t\titemDef.modelRotation1 = 768;\n\t\t\titemDef.modelRotation2 = 189;\n\t\t\titemDef.modelOffset1 = -7;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33119:\n\t\t\titemDef.name = \"Superior twisted bow\";\n\t\t\titemDef.description = \"An upgraded twisted bow.\";\n\t\t\titemDef.modelId = 53128;\n\t\t\titemDef.maleModel = 53127;\n\t\t\titemDef.femaleModel = 53127;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\titemDef.maleOffset = -4;\n\t\t\titemDef.femaleOffset = -4;\n\t\t\tbreak;\n\t\tcase 33123:\n\t\t\titemDef.name = \"Staff of sliske\";\n\t\t\titemDef.description = \"Staff of sliske.\";\n\t\t\titemDef.modelId = 59234;\n\t\t\titemDef.maleModel = 59233;\n\t\t\titemDef.femaleModel = 59233;\n\t\t\titemDef.modelZoom = 1872;\n\t\t\titemDef.modelRotation1 = 288;\n\t\t\titemDef.modelRotation2 = 1685;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33124:\n\t\t\titemDef.name = \"Twisted crossbow\";\n\t\t\titemDef.description = \"Twisted crossbow.\";\n\t\t\titemDef.modelId = 62777;\n\t\t\titemDef.maleModel = 62776;\n\t\t\titemDef.femaleModel = 62776;\n\t\t\titemDef.modelZoom = 926;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 258;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33125:\n\t\t\titemDef.name = \"Present\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modelId = 2426;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.modifiedModelColors = new int[] { 22410, 2999 };\n\t\t\titemDef.originalModelColors = new int[] { 933, 24410 };\n\t\t\titemDef.description = \"Santa's stolen present\";\n\t\t\tbreak;\n\t\tcase 33126:\n\t\t\titemDef.name = \"Christmas tree branch\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modelId = 2412;\n\t\t\titemDef.modelZoom = 940;\n\t\t\titemDef.modelRotation1 = 268;\n\t\t\titemDef.modelRotation2 = 152;\n\t\t\titemDef.modelOffset1 = -8;\n\t\t\titemDef.modelOffset2 = -21;\n\t\t\titemDef.modifiedModelColors = new int[] { 11144 };\n\t\t\titemDef.originalModelColors = new int[] { 6047 };\n\t\t\titemDef.description = \"Enter examine here.\";\n\t\t\tbreak;\n\t\tcase 33127:\n\t\t\titemDef.name = \"Kbd gloves\";\n\t\t\titemDef.description = \"Kbd gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 33085 };\n\t\t\titemDef.originalModelColors = new int[] { 1060 };\n\t\t\titemDef.modelId = 53106;\n\t\t\titemDef.maleModel = 53105;\n\t\t\titemDef.femaleModel = 53105;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33128:\n\t\t\titemDef.name = \"Kbd boots\";\n\t\t\titemDef.description = \"Kbd boots.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 33198, 33202, 33206, 33215, 33210 };\n\t\t\titemDef.originalModelColors = new int[] { 1060, 1061, 1063, 1064, 1065 };\n\t\t\titemDef.modelId = 53104;\n\t\t\titemDef.maleModel = 53103;\n\t\t\titemDef.femaleModel = 53103;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33129:\n\t\t\titemDef.name = \"Kbd platelegs\";\n\t\t\titemDef.description = \"Kbd platelegs.\";\n\t\t\titemDef.modelId = 59994;\n\t\t\titemDef.maleModel = 59995;\n\t\t\titemDef.femaleModel = 59995;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33130:\n\t\t\titemDef.name = \"Kbd platebody\";\n\t\t\titemDef.description = \"Kbd platebody.\";\n\t\t\titemDef.modelId = 59998;\n\t\t\titemDef.maleModel = 59999;\n\t\t\titemDef.femaleModel = 59999;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33131:\n\t\t\titemDef.name = \"Kbd helmet\";\n\t\t\titemDef.description = \"Kbd helmet.\";\n\t\t\titemDef.modelId = 59996;\n\t\t\titemDef.maleModel = 59997;\n\t\t\titemDef.femaleModel = 59997;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33132:\n\t\t\titemDef.name = \"Kbd cape\";\n\t\t\titemDef.description = \"Kbd cape.\";\n\t\t\titemDef.modelId = 59992;\n\t\t\titemDef.maleModel = 59993;\n\t\t\titemDef.femaleModel = 59993;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33133:\n\t\t\titemDef.name = \"Anti-imp pet\";\n\t\t\titemDef.description = \"Anti-imp pet.\";\n\t\t\titemDef.modelId = 45294;\n\t\t\titemDef.modelZoom = 1500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33134:\n\t\t\titemDef.name = \"Anti-santa pet\";\n\t\t\titemDef.description = \"Anti-santa pet.\";\n\t\t\titemDef.modelId = 29030;\n\t\t\titemDef.modelZoom = 653;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 1966;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33135:\n\t\t\titemDef.name = \"Bandos mask\";\n\t\t\titemDef.description = \"Bandos helmet.\";\n\t\t\titemDef.modelId = 59987;\n\t\t\titemDef.maleModel = 59991;\n\t\t\titemDef.femaleModel = 59991;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33136:\n\t\t\titemDef.name = \"Armadyl mask\";\n\t\t\titemDef.description = \"Armadyl mask.\";\n\t\t\titemDef.modelId = 59986;\n\t\t\titemDef.maleModel = 59990;\n\t\t\titemDef.femaleModel = 59990;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33137:\n\t\t\titemDef.name = \"Zamorak mask\";\n\t\t\titemDef.description = \"Zamorak mask.\";\n\t\t\titemDef.modelId = 59985;\n\t\t\titemDef.maleModel = 59989;\n\t\t\titemDef.femaleModel = 59989;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33138:\n\t\t\titemDef.name = \"Saradomin mask\";\n\t\t\titemDef.description = \"Saradomin mask.\";\n\t\t\titemDef.modelId = 59984;\n\t\t\titemDef.maleModel = 59988;\n\t\t\titemDef.femaleModel = 59988;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33139:\n\t\t\titemDef.name = \"Zamarok godbow\";\n\t\t\titemDef.description = \"Zamarok godbow.\";\n\t\t\titemDef.modelId = 60560;//60553\n\t\t\titemDef.maleModel = 60560;\n\t\t\titemDef.femaleModel = 60560;\n\t\t\titemDef.modelZoom = 2100;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33140:\n\t\t\titemDef.name = \"Saradomin godbow\";\n\t\t\titemDef.description = \"Saradomin godbow.\";\n\t\t\titemDef.modelId = 60555;\n\t\t\titemDef.maleModel = 60554;\n\t\t\titemDef.femaleModel = 60554;\n\t\t\titemDef.modelZoom = 2100;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33141:\n\t\t\titemDef.name = \"Bandos godbow\";\n\t\t\titemDef.description = \"Bandos godbow.\";\n\t\t\titemDef.modelId = 60559;\n\t\t\titemDef.maleModel = 60558;\n\t\t\titemDef.femaleModel = 60558;\n\t\t\titemDef.modelZoom = 2100;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33142:\n\t\t\titemDef.name = \"Fire cape (purple)\";\n\t\t\titemDef.description = \"Fire cape (purple).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33148:\n\t\t\titemDef.name = \"Fire cape (cyan)\";\n\t\t\titemDef.description = \"Fire cape (cyan).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33144:\n\t\t\titemDef.name = \"Fire cape (green)\";\n\t\t\titemDef.description = \"Fire cape (green).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33145:\n\t\t\titemDef.name = \"Fire cape (red)\";\n\t\t\titemDef.description = \"Fire cape (red).\";\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33143:\n\t\t\titemDef.name = \"Infernal cape (blue)\";\n\t\t\titemDef.description = \"Infernal cape (blue).\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5056, 5066, 924, 3005 };\n\t\t\titemDef.originalModelColors = new int[] { 39851, 39851, 39851, 39851 };\n\t\t\titemDef.modelId = 33144;\n\t\t\titemDef.maleModel = 33103;\n\t\t\titemDef.femaleModel = 33111;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33146:\n\t\t\titemDef.name = \"Infernal cape (green)\";\n\t\t\titemDef.description = \"Infernal cape (green).\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5056, 5066, 924, 3005 };\n\t\t\titemDef.originalModelColors = new int[] { 21167, 21167, 21167, 21167 };\n\t\t\titemDef.modelId = 33144;\n\t\t\titemDef.maleModel = 33103;\n\t\t\titemDef.femaleModel = 33111;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33147:\n\t\t\titemDef.name = \"Infernal cape (purple)\";\n\t\t\titemDef.description = \"Infernal cape (purple).\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5056, 5066, 924, 3005 };\n\t\t\titemDef.originalModelColors = new int[] { 53160, 53160, 53160, 53160 };\n\t\t\titemDef.modelId = 33144;\n\t\t\titemDef.maleModel = 33103;\n\t\t\titemDef.femaleModel = 33111;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33150:\n\t\t\titemDef.name = \"Infernal key piece 1\";\n\t\t\titemDef.description = \"Infernal key piece 1.\";\n\t\t\titemDef.modelId = 61001;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Combine\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33151:\n\t\t\titemDef.name = \"Infernal key piece 2\";\n\t\t\titemDef.description = \"Infernal key piece 2.\";\n\t\t\titemDef.modelId = 61002;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Combine\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33152:\n\t\t\titemDef.name = \"Infernal key piece 3\";\n\t\t\titemDef.description = \"Infernal key piece 3.\";\n\t\t\titemDef.modelId = 61003;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Combine\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33153:\n\t\t\titemDef.name = \"Infernal key\";\n\t\t\titemDef.description = \"Infernal key.\";\n\t\t\titemDef.modelId = 61111;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 534;\n\t\t\titemDef.modelRotation2 = 222;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\t\t//DOPES ITEMS NIGGAHAHAHAHAHAHAH\n\t\tcase 2749:\n\t\t\titemDef.name = \"Bloody Axe\";\n\t\t\titemDef.description = \"Look at all that blood!\";\n\t\t\titemDef.modelId = 65495;\n\t\t\titemDef.femaleModel = 65495;\n\t\t\titemDef.maleModel = 65495;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 2750:\n\t\t\titemDef.name = \"Bloody Axe Offhand\";\n\t\t\titemDef.description = \"Look at all that blood!\";\n\t\t\titemDef.modelId = 65496;\n\t\t\titemDef.femaleModel = 65496;\n\t\t\titemDef.maleModel = 65496;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33154:\n\t\t\titemDef.name = \"Infernal mystery box\";\n\t\t\titemDef.description = \"Infernal mystery box.\";\n\t\t\titemDef.modelId = 61110;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Open\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33155:\n\t\t\titemDef.name = \"Ethereal sword (red)\";\n\t\t\titemDef.description = \"Ethereal sword (red).\";\n\t\t\titemDef.modelId = 61005;\n\t\t\titemDef.maleModel = 61004;\n\t\t\titemDef.femaleModel = 61004;\n\t\t\titemDef.modelZoom = 1645;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33156:\n\t\t\titemDef.name = \"Ethereal sword (blue)\";\n\t\t\titemDef.description = \"Ethereal sword (blue).\";\n\t\t\titemDef.modelId = 61006;\n\t\t\titemDef.maleModel = 61007;\n\t\t\titemDef.femaleModel = 61007;\n\t\t\titemDef.modelZoom = 1645;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33157:\n\t\t\titemDef.name = \"Ethereal sword (green)\";\n\t\t\titemDef.description = \"Ethereal sword (green).\";\n\t\t\titemDef.modelId = 61008;\n\t\t\titemDef.maleModel = 61009;\n\t\t\titemDef.femaleModel = 61009;\n\t\t\titemDef.modelZoom = 1645;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33158:\n\t\t\titemDef.name = \"Dagon' hai top\";\n\t\t\titemDef.description = \"An elite dark mages robes.\";\n\t\t\titemDef.modelId = 60317;\n\t\t\titemDef.maleModel = 43614;\n\t\t\titemDef.femaleModel = 43689;\n\t\t\titemDef.anInt188 = 44594;\n\t\t\titemDef.anInt164 = 43681;\n\t\t\titemDef.modelZoom = 1697;\n\t\t\titemDef.modelRotation1 = 536;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33159:\n\t\t\titemDef.name = \"Dagon' hai hat\";\n\t\t\titemDef.description = \"An elite dark mages hat.\";\n\t\t\titemDef.modelId = 60319;\n\t\t\titemDef.maleModel = 60318;\n\t\t\titemDef.femaleModel = 60318;\n\t\t\titemDef.anInt188 = -1;\n\t\t\titemDef.anInt164 = -1;\n\t\t\titemDef.modelZoom = 1373;\n\t\t\titemDef.modelRotation1 = 98;\n\t\t\titemDef.modelRotation2 = 1988;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33160:\n\t\t\titemDef.name = \"Dagon' hai robe\";\n\t\t\titemDef.description = \"An elite dark mages robe.\";\n\t\t\titemDef.modelId = 60321;\n\t\t\titemDef.maleModel = 60320;\n\t\t\titemDef.femaleModel = 60320;\n\t\t\titemDef.anInt188 = -1;\n\t\t\titemDef.anInt164 = -1;\n\t\t\titemDef.modelZoom = 2216;\n\t\t\titemDef.modelRotation1 = 572;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 14;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33161:\n\t\t\titemDef.name = \"Blue infernal cape mix\";\n\t\t\titemDef.description = \"Changes the color of the Infernal Cape to Blue.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33162:\n\t\t\titemDef.name = \"Green infernal cape mix\";\n\t\t\titemDef.description = \"Changes the color of the Infernal Cape to Green.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33163:\n\t\t\titemDef.name = \"Purple infernal cape mix\";\n\t\t\titemDef.description = \"Changes the color of the Infernal Cape to Purple.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33164:\n\t\t\titemDef.name = \"Purple firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to purple.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33165:\n\t\t\titemDef.name = \"Cyan firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to cyan.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33166:\n\t\t\titemDef.name = \"Green firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to green.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33167:\n\t\t\titemDef.name = \"Red firecape mix\";\n\t\t\titemDef.description = \"Changes the color of the firecape to red.\";\n\t\t\titemDef.modelId = 8956;\n\t\t\titemDef.modelZoom = 842;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Use\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33169:\n\t\t\titemDef.name = \"K'ril robe top\";\n\t\t\titemDef.description = \"A top worn by magic-using followers of Zamorak.\";\n\t\t\titemDef.modelId = 62558;\n\t\t\titemDef.maleModel = 62559;\n\t\t\titemDef.femaleModel = 62559;\n\t\t\titemDef.modelZoom = 1358;\n\t\t\titemDef.modelRotation1 = 514;\n\t\t\titemDef.modelRotation2 = 2041;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33170:\n\t\t\titemDef.name = \"K'ril robe bottom\";\n\t\t\titemDef.description = \"A robe worn by magic-using followers of Zamorak.\";\n\t\t\titemDef.modelId = 62553;\n\t\t\titemDef.maleModel = 62554;\n\t\t\titemDef.femaleModel = 62554;\n\t\t\titemDef.modelZoom = 1690;\n\t\t\titemDef.modelRotation1 = 435;\n\t\t\titemDef.modelRotation2 = 9;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 7;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33171:\n\t\t\titemDef.name = \"K'ril hat\";\n\t\t\titemDef.description = \"A hat worn by magic-using followers of Zamorak.\";\n\t\t\titemDef.modelId = 62551;\n\t\t\titemDef.maleModel = 62552;\n\t\t\titemDef.femaleModel = 62552;\n\t\t\titemDef.modelZoom = 1236;\n\t\t\titemDef.modelRotation1 = 118;\n\t\t\titemDef.modelRotation2 = 10;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -12;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33172:\n\t\t\titemDef.name = \"K'ril swords\";\n\t\t\titemDef.description = \"Sheath & Unsheath this sword in the Equipment tab. Hits an enemy twice.\";\n\t\t\titemDef.equipActions[2] = \"Sheath\";\n\t\t\titemDef.modelId = 62556;\n\t\t\titemDef.maleModel = 62557;\n\t\t\titemDef.femaleModel = 62557;\n\t\t\titemDef.modelZoom = 1650;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 1300;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33173:\n\t\t\titemDef.name = \"K'ril swords (sheathed)\";\n\t\t\titemDef.description = \"Sheath & Unsheath this sword in the Equipment tab. Hits an enemy twice.\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 62556;\n\t\t\titemDef.maleModel = 62556;\n\t\t\titemDef.femaleModel = 62556;\n\t\t\titemDef.modelZoom = 1650;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 1300;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33174:\n\t\t\titemDef.name = \"Pet demonic gorilla\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 31241;\n\t\t\titemDef.modelZoom = 16000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33175:\n\t\t\titemDef.name = \"Pet crawling hand\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5071;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33176:\n\t\t\titemDef.name = \"Pet cave bug\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 23854;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33177:\n\t\t\titemDef.name = \"Pet cave crawler\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5066;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33178:\n\t\t\titemDef.name = \"Pet banshee\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5063;\n\t\t\titemDef.modelZoom = 3200;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33179:\n\t\t\titemDef.name = \"Pet cave slime\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5786;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33180:\n\t\t\titemDef.name = \"Pet rockslug\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5084;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33181:\n\t\t\titemDef.name = \"Pet cockatrice\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5070;\n\t\t\titemDef.modelZoom = 3200;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33182:\n\t\t\titemDef.name = \"Pet pyrefiend\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5083;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33183:\n\t\t\titemDef.name = \"Pet basilisk\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5064;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33184:\n\t\t\titemDef.name = \"Pet infernal mage\";\n\t\t\titemDef.modifiedModelColors = new int[] { -26527, -24618, -25152, -25491, 119 };\n\t\t\titemDef.originalModelColors = new int[] { 924, 148, 0, 924, 924 };\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5047;\n\t\t\titemDef.modelZoom = 3940;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 84;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33185:\n\t\t\titemDef.name = \"Pet bloodveld\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5065;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33186:\n\t\t\titemDef.name = \"Pet jelly\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5081;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33187:\n\t\t\titemDef.name = \"Pet turoth\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5086;\n\t\t\titemDef.modelZoom = 2600;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33188:\n\t\t\titemDef.name = \"Pet aberrant spectre\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5085;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 450;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33189:\n\t\t\titemDef.name = \"Pet dust devil\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5076;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33190:\n\t\t\titemDef.name = \"Pet kurask\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5082;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33191:\n\t\t\titemDef.name = \"Pet skeletal wyvern\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 10350;\n\t\t\titemDef.modelZoom = 1104;\n\t\t\titemDef.modelRotation1 = 27;\n\t\t\titemDef.modelRotation2 = 1634;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33192:\n\t\t\titemDef.name = \"Pet garygoyle\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5078;\n\t\t\titemDef.modelZoom = 4000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33193:\n\t\t\titemDef.name = \"Pet nechryael\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5074;\n\t\t\titemDef.modelZoom = 4000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33194:\n\t\t\titemDef.name = \"Pet abyssal demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 5062;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33195:\n\t\t\titemDef.name = \"Pet dark beast\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 26395;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33196:\n\t\t\titemDef.name = \"Pet night beast\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32933;\n\t\t\titemDef.modelZoom = 7000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33197:\n\t\t\titemDef.name = \"Pet greater abyssal demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32921;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33198:\n\t\t\titemDef.name = \"Pet crushing hand\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32922;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33199:\n\t\t\titemDef.name = \"Pet chasm crawler\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32918;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33200:\n\t\t\titemDef.name = \"Pet screaming banshee\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32823;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33201:\n\t\t\titemDef.name = \"Pet twisted banshee\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32847;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33202:\n\t\t\titemDef.name = \"Pet giant rockslug\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32919;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33203:\n\t\t\titemDef.name = \"Pet cockathrice\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32920;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33204:\n\t\t\titemDef.name = \"Pet flaming pyrelord\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32923;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33205:\n\t\t\titemDef.name = \"Pet monstrous basilisk\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32924;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33206:\n\t\t\titemDef.name = \"Pet malevolent mage\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32929;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33207:\n\t\t\titemDef.name = \"Pet insatiable bloodveld\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32926;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33208:\n\t\t\titemDef.name = \"Pet insatiable mutated bloodveld\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32925;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33209:\n\t\t\titemDef.name = \"Pet vitreous jelly\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32852;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33210:\n\t\t\titemDef.name = \"Pet vitreous warped jelly\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32917;\n\t\t\titemDef.modelZoom = 6000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33211:\n\t\t\titemDef.name = \"Pet cave abomination\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32935;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33212:\n\t\t\titemDef.name = \"Pet abhorrent spectre\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32930;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33213:\n\t\t\titemDef.name = \"pet repugnant spectre\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32926;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33214:\n\t\t\titemDef.name = \"Pet choke devil\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32927;\n\t\t\titemDef.modelZoom = 6000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33215:\n\t\t\titemDef.name = \"Pet king kurask\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32934;\n\t\t\titemDef.modelZoom = 8000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33217:\n\t\t\titemDef.name = \"Pet nuclear smoke devil\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32928;\n\t\t\titemDef.modelZoom = 5500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33218:\n\t\t\titemDef.name = \"Pet marble gargoyle\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34251;\n\t\t\titemDef.modelZoom = 8000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33219:\n\t\t\titemDef.name = \"Pet nechryarch\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32932;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33220:\n\t\t\titemDef.name = \"Pet Patrity\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32035;\n\t\t\titemDef.modelZoom = 653;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1535;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33221:\n\t\t\titemDef.name = \"Pet xarpus\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35383;\n\t\t\titemDef.modelZoom = 14000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33222:\n\t\t\titemDef.name = \"Pet nyclocas vasilias\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35182;\n\t\t\titemDef.modelZoom = 12000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33223:\n\t\t\titemDef.name = \"Pet pestilent bloat\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35404;\n\t\t\titemDef.modelZoom = 8500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33224:\n\t\t\titemDef.name = \"Pet maiden of sugadinti\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35385;\n\t\t\titemDef.modelZoom = 8500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33225:\n\t\t\titemDef.name = \"Pet lizardman shaman\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 4039;\n\t\t\titemDef.modelZoom = 8500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33226:\n\t\t\titemDef.name = \"Pet abyssal sire\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 29477;\n\t\t\titemDef.modelZoom = 9000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33227:\n\t\t\titemDef.name = \"Pet black demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 31984;\n\t\t\titemDef.modelZoom = 1104;\n\t\t\titemDef.modelRotation1 = 144;\n\t\t\titemDef.modelRotation2 = 1826;\n\t\t\titemDef.modelOffset1 = 7;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 11802:\n\t\tcase 11804:\n\t\tcase 11806:\n\t\tcase 11808:\n\t\t\titemDef.equipActions[2] = \"Sheath\";\n\t\t\tbreak;// godsword sheathing operating\n\n\t\tcase 33228:\n\t\t\titemDef.name = \"Pet greater demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32015;\n\t\t\titemDef.modelZoom = 902;\n\t\t\titemDef.modelRotation1 = 216;\n\t\t\titemDef.modelRotation2 = 138;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = -16;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33229:\n\t\t\titemDef.name = \"Armadyl godsword (sheathed)\";\n\t\t\titemDef.description = \"Armadyl godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28075;\n\t\t\titemDef.maleModel = 62683;\n\t\t\titemDef.femaleModel = 62683;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33230:\n\t\t\titemDef.name = \"Bandos godsword (sheathed)\";\n\t\t\titemDef.description = \"Bandos godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28059;\n\t\t\titemDef.maleModel = 62684;\n\t\t\titemDef.femaleModel = 62684;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33231:\n\t\t\titemDef.name = \"Saradomin godsword (sheathed)\";\n\t\t\titemDef.description = \"Saradomin godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28070;\n\t\t\titemDef.maleModel = 62685;\n\t\t\titemDef.femaleModel = 62685;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33232:\n\t\t\titemDef.name = \"Zamorak godsword (sheathed)\";\n\t\t\titemDef.description = \"Zamorak godsword (sheathed)\";\n\t\t\titemDef.equipActions[2] = \"Unsheath\";\n\t\t\titemDef.modelId = 28060;\n\t\t\titemDef.maleModel = 62686;\n\t\t\titemDef.femaleModel = 62686;\n\t\t\titemDef.modelZoom = 1957;\n\t\t\titemDef.modelRotation1 = 498;\n\t\t\titemDef.modelRotation2 = 494;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33233:\n\t\t\titemDef.name = \"Pet revenant imp\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34156;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33234:\n\t\t\titemDef.name = \"Pet revenant goblin\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34262;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33235:\n\t\t\titemDef.name = \"Pet revenant pyrefiend\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34142;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33236:\n\t\t\titemDef.name = \"Pet revenant hobgoblin\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34157;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33237:\n\t\t\titemDef.name = \"Pet revenant cyclops\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34155;\n\t\t\titemDef.modelZoom = 4500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33238:\n\t\t\titemDef.name = \"Pet revenant hellhound\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34143;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33239:\n\t\t\titemDef.name = \"Pet revenant demon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32015;\n\t\t\titemDef.modifiedModelColors = new int[] { 1690, 910, 912, 1814, 1938 };\n\t\t\titemDef.originalModelColors = new int[] { 43078, 43078, 43078, 43078, 43078, 43078 };\n\t\t\titemDef.modelZoom = 902;\n\t\t\titemDef.modelRotation1 = 216;\n\t\t\titemDef.modelRotation2 = 138;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = -16;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33240:\n\t\t\titemDef.name = \"Pet revenant ork\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34154;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33242:\n\t\t\titemDef.name = \"Pet revenant dark beast\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34158;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33243:\n\t\t\titemDef.name = \"Pet revenant knight\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34145;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33244:\n\t\t\titemDef.name = \"Pet revenant dragon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34163;\n\t\t\titemDef.modelZoom = 7500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33245:\n\t\t\titemDef.name = \"Pet glob\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 26074;\n\t\t\titemDef.modelZoom = 10000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33246:\n\t\t\titemDef.name = \"Pet ice queen\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 104;\n\t\t\titemDef.modifiedModelColors = new int[] { 41, 61, 4550, 12224, 25238, 6798 };\n\t\t\titemDef.originalModelColors = new int[] { -22052, -26150, -24343, -22052, -22052, -23327 };\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33247:\n\t\t\titemDef.name = \"Pet enraged tarn\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60322;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33248:\n\t\t\titemDef.name = \"Pet jaltok-jad\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 33012;\n\t\t\titemDef.modelZoom = 12000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33249:\n\t\t\titemDef.name = \"Pet rune dragon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 34668;\n\t\t\titemDef.modelZoom = 2541;\n\t\t\titemDef.modelRotation1 = 83;\n\t\t\titemDef.modelRotation2 = 1826;\n\t\t\titemDef.modelOffset1 = -97;\n\t\t\titemDef.modelOffset2 = 9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33271:\n\t\t\titemDef.name = \"Moo\";\n\t\t\titemDef.description = \"cow goes moo.\";\n\t\t\titemDef.modelId = 23889;\n\t\t\titemDef.modelZoom = 2541;\n\t\t\titemDef.modelRotation1 = 83;\n\t\t\titemDef.modelRotation2 = 1826;\n\t\t\titemDef.modelOffset1 = -97;\n\t\t\titemDef.modelOffset2 = 9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33250:\n\t\t\titemDef.name = \"Swift gloves (Black)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62657;\n\t\t\titemDef.femaleModel = 62658;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33251:\n\t\t\titemDef.name = \"Swift gloves (Red)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 65046, 65051, 65056 };\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62659;\n\t\t\titemDef.femaleModel = 62660;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33252:\n\t\t\titemDef.name = \"Swift gloves (White)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 64585, 64590, 64595 };\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62661;\n\t\t\titemDef.femaleModel = 62662;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33253:\n\t\t\titemDef.name = \"Swift gloves (Yellow)\";\n\t\t\titemDef.description = \"Watch my speedy hands!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 9767, 9772, 9777 };\n\t\t\titemDef.modelId = 62655;\n\t\t\titemDef.maleModel = 62663;\n\t\t\titemDef.femaleModel = 62664;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33254:\n\t\t\titemDef.name = \"Spellcaster gloves (Black)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62665;\n\t\t\titemDef.femaleModel = 62666;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33255:\n\t\t\titemDef.name = \"Spellcaster gloves (Red)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 65046, 65051, 65056 };\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62667;\n\t\t\titemDef.femaleModel = 62668;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33256:\n\t\t\titemDef.name = \"Spellcaster gloves (White)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 64585, 64590, 64595 };\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62669;\n\t\t\titemDef.femaleModel = 62670;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33257:\n\t\t\titemDef.name = \"Spellcaster gloves (Yellow)\";\n\t\t\titemDef.description = \"\tSome pretty fantastical gloves.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 10, 15, 20 };\n\t\t\titemDef.originalModelColors = new int[] { 9767, 9772, 9777 };\n\t\t\titemDef.modelId = 62656;\n\t\t\titemDef.maleModel = 62671;\n\t\t\titemDef.femaleModel = 62672;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33258:\n\t\t\titemDef.name = \"Tekton longsword\";\n\t\t\titemDef.description = \"Tekton longsword.\";\n\t\t\titemDef.modelId = 62682;\n\t\t\titemDef.maleModel = 62681;\n\t\t\titemDef.femaleModel = 62681;\n\t\t\titemDef.modelZoom = 1445;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33259:\n\t\t\titemDef.name = \"Pet wyrm\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 36922;\n\t\t\titemDef.modelZoom = 2547;\n\t\t\titemDef.modelRotation1 = 97;\n\t\t\titemDef.modelRotation2 = 1820;\n\t\t\titemDef.modelOffset1 = -7;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33260:\n\t\t\titemDef.name = \"Pet drake\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 36160;\n\t\t\titemDef.modelZoom = 6500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33261:\n\t\t\titemDef.name = \"Pet wyrm\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 36922;\n\t\t\titemDef.modelZoom = 2547;\n\t\t\titemDef.modelRotation1 = 97;\n\t\t\titemDef.modelRotation2 = 1820;\n\t\t\titemDef.modelOffset1 = -7;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33262:\n\t\t\titemDef.name = \"Valentines Balloon\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62766;\n\t\t\titemDef.maleModel = 62767;\n\t\t\titemDef.femaleModel = 62767;\n\t\t\titemDef.modelZoom = 2200;\n\t\t\titemDef.modelRotation1 = 270;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33263:\n\t\t\titemDef.name = \"Cupid bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62768;\n\t\t\titemDef.maleModel = 62769;\n\t\t\titemDef.femaleModel = 62769;\n\t\t\titemDef.modelZoom = 1072;\n\t\t\titemDef.modelRotation1 = 127;\n\t\t\titemDef.modelRotation2 = 103;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.modelOffset2 = 2;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33264:\n\t\t\titemDef.name = \"Halo and horns\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62771;\n\t\t\titemDef.maleModel = 62770;\n\t\t\titemDef.femaleModel = 62770;\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation1 = 228;\n\t\t\titemDef.modelRotation2 = 141;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33265:\n\t\t\titemDef.name = \"Heart\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62782;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33266:\n\t\t\titemDef.name = \"Valentines mystery box\";\n\t\t\titemDef.description = \"You make me hard.\";\n\t\t\titemDef.modelId = 62773;\n\t\t\titemDef.modelZoom = 464;\n\t\t\titemDef.modelRotation1 = 423;\n\t\t\titemDef.modelRotation2 = 1928;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Open\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33267:\n\t\t\titemDef.name = \"Staff of adoration\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62774;\n\t\t\titemDef.maleModel = 62775;\n\t\t\titemDef.femaleModel = 62775;\n\t\t\titemDef.modelZoom = 1579;\n\t\t\titemDef.modelRotation1 = 660;\n\t\t\titemDef.modelRotation2 = 48;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33268:\n\t\t\titemDef.name = \"Valentines crossbow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 62778;\n\t\t\titemDef.maleModel = 62779;\n\t\t\titemDef.femaleModel = 62779;\n\t\t\titemDef.modelZoom = 1200;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 258;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33269:\n\t\t\titemDef.name = \"Onyxia Mystery Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 2426;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.modifiedModelColors = new int[] { 22410, 2999 };\n\t\t\titemDef.originalModelColors = new int[] { 2130, 38693 };\n\t\t\titemDef.description = \"Chances at several unqiue items found only in this box! (ex: Tekton Armor)\";\n\t\t\tbreak;\n\t\tcase 33270:\n\t\t\titemDef.name = \"Dragon Hunter Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 2426;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\titemDef.modifiedModelColors = new int[] { 22410, 2999 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 1050 };\n\t\t\titemDef.description = \"Chances for items that give bonuses toward dragons. (ex: Dragonhunter Lance)\";\n\t\t\tbreak;\n\t\tcase 33273:\n\t\t\titemDef.name = \"Ancient sword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60201;\n\t\t\titemDef.maleModel = 60200;\n\t\t\titemDef.femaleModel = 60200;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33274:\n\t\t\titemDef.name = \"Armadyl staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60203;\n\t\t\titemDef.maleModel = 60202;\n\t\t\titemDef.femaleModel = 60202;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33275:\n\t\t\titemDef.name = \"Bork axe\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60205;\n\t\t\titemDef.maleModel = 60204;\n\t\t\titemDef.femaleModel = 60204;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33276:\n\t\t\titemDef.name = \"Bree bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60207;\n\t\t\titemDef.maleModel = 60206;\n\t\t\titemDef.femaleModel = 60206;\n\t\t\titemDef.modelZoom = 1700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33277:\n\t\t\titemDef.name = \"Infernal staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60209;\n\t\t\titemDef.maleModel = 60208;\n\t\t\titemDef.femaleModel = 60208;\n\t\t\titemDef.modelZoom = 2200;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33278:\n\t\t\titemDef.name = \"Infernal longsword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60211;\n\t\t\titemDef.maleModel = 60210;\n\t\t\titemDef.femaleModel = 60210;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33279:\n\t\t\titemDef.name = \"Necrolord staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60213;\n\t\t\titemDef.maleModel = 60212;\n\t\t\titemDef.femaleModel = 60212;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33280:\n\t\t\titemDef.name = \"Insert name here\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60215;\n\t\t\titemDef.maleModel = 60214;\n\t\t\titemDef.femaleModel = 60214;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33281:\n\t\t\titemDef.name = \"Infernal bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60219;\n\t\t\titemDef.maleModel = 60218;\n\t\t\titemDef.femaleModel = 60218;\n\t\t\titemDef.modelZoom = 3334;\n\t\t\titemDef.modelRotation1 = 533;\n\t\t\titemDef.modelRotation2 = 1294;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33282:\n\t\t\titemDef.name = \"Infernal warhammer\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60221;\n\t\t\titemDef.maleModel = 60220;\n\t\t\titemDef.femaleModel = 60220;\n\t\t\titemDef.modelZoom = 2512;\n\t\t\titemDef.modelRotation1 = 317;\n\t\t\titemDef.modelRotation2 = 1988;\n\t\t\titemDef.modelOffset1 = -8;\n\t\t\titemDef.modelOffset2 = 45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33283:\n\t\t\titemDef.name = \"Imbued Porazdir's heart\";\n\t\t\titemDef.modelId = 32298;\n\t\t\titemDef.modelZoom = 1168;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 1690;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 60826, 59796, 54544, 58904, 54561 };\n\t\t\titemDef.originalModelColors = new int[] { 13263, 13014, 13243, 13000, 13275 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Invigorate\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Boosts your strength for a period of time.\";\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33284:\n\t\t\titemDef.name = \"Imbued Justiciar's heart\";\n\t\t\titemDef.modelId = 32298;\n\t\t\titemDef.modelZoom = 1168;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 1690;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 60826, 59796, 54544, 58904, 54561 };\n\t\t\titemDef.originalModelColors = new int[] { 31661, 31418, 31661, 31167, 31445 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Invigorate\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Boosts your Defence for a period of time.\";\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32285:\n\t\t\titemDef.name = \"Imbued Derwen's heart\";\n\t\t\titemDef.modelId = 32298;\n\t\t\titemDef.modelZoom = 1168;\n\t\t\titemDef.modelRotation1 = 96;\n\t\t\titemDef.modelRotation2 = 1690;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 60826, 59796, 54544, 58904, 54561 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 930, 936, 940, 950 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Invigorate\", null, null, null, \"Drop\" };\n\t\t\titemDef.description = \"Boosts your Attack for a period of time.\";\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32286:\n\t\t\titemDef.name = \"Bronze fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 5652, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32287:\n\t\t\titemDef.name = \"Iron fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 33, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32288:\n\t\t\titemDef.name = \"Steel fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 61, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32289:\n\t\t\titemDef.name = \"Black fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32290:\n\t\t\titemDef.name = \"Mithril fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 43297, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32291:\n\t\t\titemDef.name = \"Adamant fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 21662, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32292:\n\t\t\titemDef.name = \"Rune fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 36133, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32293:\n\t\t\titemDef.name = \"Dragon fishing rod\";\n\t\t\titemDef.description = \"Used for Bait and Fly fishing. Can also be used for Deep sea fishing.\";\n\t\t\titemDef.modelId = 36128;\n\t\t\titemDef.maleModel = 36317;\n\t\t\titemDef.femaleModel = 36312;\n\t\t\titemDef.modelZoom = 1853;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 27;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.modifiedModelColors = new int[] { 59499, 24 };\n\t\t\titemDef.originalModelColors = new int[] { 924, 9152 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32294:\n\t\t\titemDef.name = \"Raw eel\";\n\t\t\titemDef.description = \"Slimy\";\n\t\t\titemDef.modelId = 6856;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 296;\n\t\t\titemDef.modelRotation2 = 352;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = 42;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32295:\n\t\t\titemDef.name = \"Burnt eel\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 6856;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 296;\n\t\t\titemDef.modelRotation2 = 352;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = 42;\n\t\t\titemDef.modifiedModelColors = new int[] { 8485, 14622, 12589 };\n\t\t\titemDef.originalModelColors = new int[] { 8724, 3226, 9754 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32296:\n\t\t\titemDef.name = \"Eel\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Eat\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 6856;\n\t\t\titemDef.modelZoom = 1440;\n\t\t\titemDef.modelRotation1 = 296;\n\t\t\titemDef.modelRotation2 = 352;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = 42;\n\t\t\titemDef.modifiedModelColors = new int[] { 8485, 14622, 8386, 12589 };\n\t\t\titemDef.originalModelColors = new int[] { 8088, 6032, 57, 2960 };\n\t\t\titemDef.description = \"None\";\n\t\t\tbreak;\n\n\t\tcase 32297:\n\t\t\titemDef.name = \"Raw baron shark\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 2594;\n\t\t\titemDef.modelZoom = 1860;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 12;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 12;\n\t\t\titemDef.modifiedModelColors = new int[] { 103, 103 };\n\t\t\titemDef.originalModelColors = new int[] { 7756, 5349 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32298:\n\t\t\titemDef.name = \"Burnt baron shark\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 2594;\n\t\t\titemDef.modelZoom = 1860;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 12;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 12;\n\t\t\titemDef.modifiedModelColors = new int[] { 61, 103 };\n\t\t\titemDef.originalModelColors = new int[] { 28, 41 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32299:\n\t\t\titemDef.name = \"Baron shark\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Eat\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 2594;\n\t\t\titemDef.modelZoom = 1860;\n\t\t\titemDef.modelRotation1 = 344;\n\t\t\titemDef.modelRotation2 = 12;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 12;\n\t\t\titemDef.modifiedModelColors = new int[] { 61, 103 };\n\t\t\titemDef.originalModelColors = new int[] { 8109, 4795 };\n\t\t\titemDef.description = \"None\";\n\t\t\tbreak;\n\n\t\tcase 32300:\n\t\t\titemDef.name = \"Raw cavefish\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60223;\n\t\t\titemDef.modelZoom = 1284;\n\t\t\titemDef.modelRotation1 = 499;\n\t\t\titemDef.modelRotation2 = 1907;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32301:\n\t\t\titemDef.name = \"Burnt cavefish\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60227;\n\t\t\titemDef.modelZoom = 1284;\n\t\t\titemDef.modelRotation1 = 499;\n\t\t\titemDef.modelRotation2 = 1907;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 32302:\n\t\t\titemDef.name = \"Cavefish\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Eat\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 60228;\n\t\t\titemDef.modelZoom = 1284;\n\t\t\titemDef.modelRotation1 = 499;\n\t\t\titemDef.modelRotation2 = 1907;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.description = \"None\";\n\t\t\tbreak;\n\n\t\tcase 32303:\n\t\t\titemDef.name = \"Dragonfire visage (e)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 26456;\n\t\t\titemDef.modelZoom = 1697;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 152;\n\t\t\titemDef.modelOffset1 = -5;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.modifiedModelColors = new int[] { 45, 41, 33, 24, 20, 57, 22, 37 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 1, 2, 3, 4, 5, 6, 7 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33285:\n\t\t\titemDef.name = \"Easter Mystery Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 61110;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\t// itemDef.modifiedModelColors = new int[] {22410, 2999};\n\t\t\t// itemDef.originalModelColors = new int[] {35321, 350};\n\t\t\titemDef.description = \"Chances for all sorts of Easter Items!\";\n\t\t\tbreak;\n\n\t\tcase 33286:\n\t\t\titemDef.name = \"Easter Cape\";\n\t\t\titemDef.inventoryOptions = new String[] { null, \"wear\", null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 9631;\n\t\t\titemDef.maleModel = 9638;\n\t\t\titemDef.femaleModel = 9640;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"An Easter Cape.\";\n\t\t\tbreak;\n\n\t\tcase 33287:\n\t\t\titemDef.name = \"Pet Easter Bunny\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"You've captured the Easter bunny!\";\n\t\t\tbreak;\n\n\t\tcase 33288:\n\t\t\titemDef.name = \"Pet Choco\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"mmm... a chocolate bunny\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 7079 };\n\t\t\tbreak;\n\n\t\tcase 33289:\n\t\t\titemDef.name = \"Pet Milkie\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"mmm... a chocolate bunny\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 6040 };\n\t\t\tbreak;\n\n\t\tcase 33290:\n\t\t\titemDef.name = \"Pet Goldie\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"oh wow... a rare golden bunny!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 9152 };\n\t\t\tbreak;\n\n\t\tcase 33291:\n\t\t\titemDef.name = \"Pet Blue\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 37239;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"A blue bunny... kinda looks like the easter bunny!\";\n\t\t\titemDef.modifiedModelColors = new int[] { 2378 };\n\t\t\titemDef.originalModelColors = new int[] { 35321 };\n\t\t\tbreak;\n\n\t\tcase 33292:\n\t\t\titemDef.name = \"Crazed bunny\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 23901;\n\t\t\titemDef.modelZoom = 500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"What a bloody mess...\";\n\t\t\titemDef.modifiedModelColors = new int[] { 5413, 5417, 5421 };\n\t\t\titemDef.originalModelColors = new int[] { 935, 111, 127 };\n\t\t\tbreak;\n\n\t\tcase 33293:\n\t\t\titemDef.name = \"Peter Rabbit\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 28602;\n\t\t\titemDef.modelZoom = 500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1931;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"Hi Peter!\";\n\t\t\tbreak;\n\n\t\tcase 33294:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947 };\n\t\t\titemDef.originalModelColors = new int[] { 8128 };\n\t\t\tbreak;\n\n\t\tcase 33295:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947, 8301 };\n\t\t\titemDef.originalModelColors = new int[] { 8128, 25511 };\n\t\t\tbreak;\n\n\t\tcase 33296:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947, 8301 };\n\t\t\titemDef.originalModelColors = new int[] { 8128, 38835 };\n\t\t\tbreak;\n\n\t\tcase 33297:\n\t\t\titemDef.name = \"Chocolate Chicken\";\n\t\t\titemDef.inventoryOptions = new String[] { null, null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 35150;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 1731;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.description = \"a chocolate chicken\";\n\t\t\titemDef.modifiedModelColors = new int[] { 947, 8301 };\n\t\t\titemDef.originalModelColors = new int[] { 8128, 947 };\n\t\t\tbreak;\n\n\t\tcase 33305:\n\t\t\titemDef.name = \"$10 bond\";\n\t\t\titemDef.description = \"$10 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 84, 84, 84, 84, 84, 84, 84 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33306:\n\t\t\titemDef.name = \"$25 bond\";\n\t\t\titemDef.description = \"$25 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 87, 87, 87, 87, 87, 87, 87 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33307:\n\t\t\titemDef.name = \"$50 bond\";\n\t\t\titemDef.description = \"$50 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 65, 65, 65, 65, 65, 65, 65 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33308:\n\t\t\titemDef.name = \"$100 bond\";\n\t\t\titemDef.description = \"$25 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 75, 75, 75, 75, 75, 75, 75 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33309:\n\t\t\titemDef.name = \"$200 bond\";\n\t\t\titemDef.description = \"$200 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 88, 88, 88, 88, 88, 88, 88 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33310:\n\t\t\titemDef.name = \"$500 bond\";\n\t\t\titemDef.description = \"$500 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 85, 85, 85, 85, 85, 85, 85 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33311:\n\t\t\titemDef.name = \"$1000 bond\";\n\t\t\titemDef.description = \"$1000 bond.\";\n\t\t\titemDef.modelId = 29210;\n\t\t\titemDef.modelZoom = 2300;\n\t\t\titemDef.modelRotation1 = 512;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.modifiedTextureColors = new int[] { 86, 86, 86, 86, 86, 86, 86 };\n\t\t\titemDef.originalTextureColors = new int[] { 22451, 20416, 22181, 22449, 22305, 21435, 22464 };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[0] = \"Redeem\";\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33312:\n\t\t\titemDef.name = \"Armadyl battlestaff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60332;\n\t\t\titemDef.maleModel = 60333;\n\t\t\titemDef.femaleModel = 60333;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 225;\n\t\t\titemDef.modelRotation2 = 1994;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\n\t\tcase 33313:\n\t\t\titemDef.name = \"Colossal platebody\";\n\t\t\titemDef.description = \"Colossal platebody.\";\n\t\t\titemDef.modelId = 60323;\n\t\t\titemDef.maleModel = 60324;\n\t\t\titemDef.femaleModel = 60324;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33314:\n\t\t\titemDef.name = \"Colossal platelegs\";\n\t\t\titemDef.description = \"Colossal platelegs.\";\n\t\t\titemDef.modelId = 60325;\n\t\t\titemDef.maleModel = 60326;\n\t\t\titemDef.femaleModel = 60326;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33315:\n\t\t\titemDef.name = \"Colossal boots\";\n\t\t\titemDef.description = \"Colossal boots.\";\n\t\t\titemDef.modelId = 60329;\n\t\t\titemDef.maleModel = 60329;\n\t\t\titemDef.femaleModel = 60329;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33316:\n\t\t\titemDef.name = \"Colossal gloves\";\n\t\t\titemDef.description = \"Colossal gloves.\";\n\t\t\titemDef.modelId = 60330;\n\t\t\titemDef.maleModel = 60331;\n\t\t\titemDef.femaleModel = 60331;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33317:\n\t\t\titemDef.name = \"Colossal helmet\";\n\t\t\titemDef.description = \"Colossal helmet.\";\n\t\t\titemDef.modelId = 60327;\n\t\t\titemDef.maleModel = 60328;\n\t\t\titemDef.femaleModel = 60328;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33318:\n\t\t\titemDef.name = \"Polypore staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60334;\n\t\t\titemDef.maleModel = 60335;\n\t\t\titemDef.femaleModel = 60335;\n\t\t\titemDef.modelZoom = 3750;\n\t\t\titemDef.modelRotation1 = 1454;\n\t\t\titemDef.modelRotation2 = 997;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\n\t\tcase 33319:\n\t\t\titemDef.name = \"Ganodermic platebody\";\n\t\t\titemDef.description = \"Ganodermic platebody.\";\n\t\t\titemDef.modelId = 60338;\n\t\t\titemDef.maleModel = 60339;\n\t\t\titemDef.femaleModel = 60339;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33320:\n\t\t\titemDef.name = \"Ganodermic platelegs\";\n\t\t\titemDef.description = \"Ganodermic platelegs.\";\n\t\t\titemDef.modelId = 60340;\n\t\t\titemDef.maleModel = 60341;\n\t\t\titemDef.femaleModel = 60341;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33321:\n\t\t\titemDef.name = \"Ganodermic helmet\";\n\t\t\titemDef.description = \"Ganodermic helmet.\";\n\t\t\titemDef.modelId = 60336;\n\t\t\titemDef.maleModel = 60337;\n\t\t\titemDef.femaleModel = 60337;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33322:\n\t\t\titemDef.name = \"Grotesque platebody\";\n\t\t\titemDef.description = \"Grosteq platebody.\";\n\t\t\titemDef.modelId = 60347;\n\t\t\titemDef.maleModel = 60348;\n\t\t\titemDef.femaleModel = 60348;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33323:\n\t\t\titemDef.name = \"Grotesque platelegs\";\n\t\t\titemDef.description = \"Grosteq platelegs.\";\n\t\t\titemDef.modelId = 60349;\n\t\t\titemDef.maleModel = 60350;\n\t\t\titemDef.femaleModel = 60350;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33324:\n\t\t\titemDef.name = \"Grotesque helmet\";\n\t\t\titemDef.description = \"Grosteqc helmet.\";\n\t\t\titemDef.modelId = 60345;\n\t\t\titemDef.maleModel = 60346;\n\t\t\titemDef.femaleModel = 60346;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33325:\n\t\t\titemDef.name = \"Grotesque cape\";\n\t\t\titemDef.description = \"Grosteq cape.\";\n\t\t\titemDef.modelId = 60351;\n\t\t\titemDef.maleModel = 60352;\n\t\t\titemDef.femaleModel = 60352;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33326:\n\t\t\titemDef.name = \"Stunning Hammer\";\n\t\t\titemDef.description = \"Has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60353;\n\t\t\titemDef.maleModel = 60354;\n\t\t\titemDef.femaleModel = 60354;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1985;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\n\t\tcase 33327:\n\t\t\titemDef.name = \"Stunning Katagon platebody\";\n\t\t\titemDef.description = \"has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60356;\n\t\t\titemDef.maleModel = 60357;\n\t\t\titemDef.femaleModel = 60357;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33328:\n\t\t\titemDef.name = \"Stunning Katagon platelegs\";\n\t\t\titemDef.description = \"has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60358;\n\t\t\titemDef.maleModel = 60359;\n\t\t\titemDef.femaleModel = 60359;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33329:\n\t\t\titemDef.name = \"Stunning Katagon helmet\";\n\t\t\titemDef.description = \"has a chance to stun an enemy.\";\n\t\t\titemDef.modelId = 60360;\n\t\t\titemDef.maleModel = 60361;\n\t\t\titemDef.femaleModel = 60361;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33331:\n\t\t\titemDef.name = \"Ancient platebody\";\n\t\t\titemDef.description = \"Ancient platebody.\";\n\t\t\titemDef.modelId = 60366;\n\t\t\titemDef.maleModel = 60367;\n\t\t\titemDef.femaleModel = 60367;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33332:\n\t\t\titemDef.name = \"Ancient platelegs\";\n\t\t\titemDef.description = \"Ancient platelegs.\";\n\t\t\titemDef.modelId = 60368;\n\t\t\titemDef.maleModel = 60369;\n\t\t\titemDef.femaleModel = 60369;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33334:\n\t\t\titemDef.name = \"Ancient boots\";\n\t\t\titemDef.description = \"Ancient boots.\";\n\t\t\titemDef.modelId = 60372;\n\t\t\titemDef.maleModel = 60372;\n\t\t\titemDef.femaleModel = 60372;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33335:\n\t\t\titemDef.name = \"Ancient gloves\";\n\t\t\titemDef.description = \"Ancient gloves.\";\n\t\t\titemDef.modelId = 60370;\n\t\t\titemDef.maleModel = 60371;\n\t\t\titemDef.femaleModel = 60371;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\tbreak;\n\t\tcase 33336:\n\t\t\titemDef.name = \"Ancient helmet\";\n\t\t\titemDef.description = \"Ancient helmet.\";\n\t\t\titemDef.modelId = 60364;\n\t\t\titemDef.maleModel = 60365;\n\t\t\titemDef.femaleModel = 60365;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33341:\n\t\t\titemDef.name = \"Vanguard helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60391;\n\t\t\titemDef.maleModel = 60392;\n\t\t\titemDef.femaleModel = 60392;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\n\t\tcase 33342:\n\t\t\titemDef.name = \"Vanguard platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60393;\n\t\t\titemDef.maleModel = 60394;\n\t\t\titemDef.femaleModel = 60394;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = 3;\n\t\t\tbreak;\n\t\tcase 33343:\n\t\t\titemDef.name = \"Vanguard platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60395;\n\t\t\titemDef.maleModel = 60396;\n\t\t\titemDef.femaleModel = 60396;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33344:\n\t\t\titemDef.name = \"Vanguard boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60398;\n\t\t\titemDef.maleModel = 60398;\n\t\t\titemDef.femaleModel = 60398;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33345:\n\t\t\titemDef.name = \"Vanguard gloves\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60373;\n\t\t\titemDef.maleModel = 60397;\n\t\t\titemDef.femaleModel = 60397;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33346:\n\t\t\titemDef.name = \"Celestial staff of light\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60401;\n\t\t\titemDef.maleModel = 60402;\n\t\t\titemDef.femaleModel = 60402;\n\t\t\titemDef.modelZoom = 3200;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 101 };\n\t\t\titemDef.originalModelColors = new int[] { 12 };\n\t\t\titemDef.maleOffset = -6;\n\t\t\titemDef.femaleOffset = -6;\n\t\t\tbreak;\n\n\t\tcase 33347:\n\t\t\titemDef.name = \"Hood of sorrow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60438;\n\t\t\titemDef.maleModel = 60403;\n\t\t\titemDef.femaleModel = 60403;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33348:\n\t\t\titemDef.name = \"Celestial robe top\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60404;\n\t\t\titemDef.maleModel = 60405;\n\t\t\titemDef.femaleModel = 60405;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33349:\n\t\t\titemDef.name = \"Celestial robe legs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60406;\n\t\t\titemDef.maleModel = 60407;\n\t\t\titemDef.femaleModel = 60407;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33350:\n\t\t\titemDef.name = \"Primal 2h sword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60408;\n\t\t\titemDef.maleModel = 60409;\n\t\t\titemDef.femaleModel = 60409;\n\t\t\titemDef.modelZoom = 1701;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.modelRotation2 = 1529;\n\t\t\titemDef.modelRotation1 = 1713;\n\t\t\titemDef.modelRotationY = 898;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33353:\n\t\t\titemDef.name = \"Primal longsword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60417;\n\t\t\titemDef.maleModel = 60418;\n\t\t\titemDef.femaleModel = 60418;\n\t\t\titemDef.modelZoom = 1616;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.modelRotation2 = 1793;\n\t\t\titemDef.modelRotation1 = 1473;\n\t\t\titemDef.modelRotationY = 1121;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33354:\n\t\t\titemDef.name = \"Primal maul\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60419;\n\t\t\titemDef.maleModel = 60420;\n\t\t\titemDef.femaleModel = 60420;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 525;\n\t\t\titemDef.modelRotation2 = 350;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33359:\n\t\t\titemDef.name = \"Primal rapier\";\n\t\t\titemDef.description = \"Good for fighting the ...\";\n\t\t\titemDef.modelId = 60433;\n\t\t\titemDef.maleModel = 60433;\n\t\t\titemDef.femaleModel = 60433;\n\t\t\titemDef.modelZoom = 1300;\n\t\t\titemDef.modelRotation1 = 1401;\n\t\t\titemDef.modelRotation2 = 1724;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 15;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33360:\n\t\t\titemDef.name = \"Primal spear\";\n\t\t\titemDef.description = \"Good for fighting the Corperal Beast.\";\n\t\t\titemDef.modelId = 60434;\n\t\t\titemDef.maleModel = 60435;\n\t\t\titemDef.femaleModel = 60435;\n\t\t\titemDef.modelZoom = 1711;\n\t\t\titemDef.modelRotation1 = 485;\n\t\t\titemDef.modelRotation2 = 391;\n\t\t\titemDef.modelOffset1 = 5;\n\t\t\titemDef.modelOffset2 = -5;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -10;\n\t\t\titemDef.maleOffset = -10;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33361:\n\t\t\titemDef.name = \"Primal warhammer\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60436;\n\t\t\titemDef.maleModel = 60437;\n\t\t\titemDef.femaleModel = 60437;\n\t\t\titemDef.modelZoom = 1330;\n\t\t\titemDef.modelRotation1 = 552;\n\t\t\titemDef.modelRotation2 = 148;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.femaleOffset = -7;\n\t\t\titemDef.maleOffset = -7;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33362:\n\t\t\titemDef.name = \"Chitin helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60445;\n\t\t\titemDef.maleModel = 60446;\n\t\t\titemDef.femaleModel = 60446;\n\t\t\titemDef.modelZoom = 1010;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33364:\n\t\t\titemDef.name = \"Chitin platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60447;\n\t\t\titemDef.maleModel = 60448;\n\t\t\titemDef.femaleModel = 60448;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33365:\n\t\t\titemDef.name = \"Chitin platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60449;\n\t\t\titemDef.maleModel = 60450;\n\t\t\titemDef.femaleModel = 60450;\n\t\t\titemDef.modelZoom = 1753;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33366:\n\t\t\titemDef.name = \"Chitin cape\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60443;\n\t\t\titemDef.maleModel = 60444;\n\t\t\titemDef.femaleModel = 60444;\n\t\t\titemDef.modelZoom = 1500;\n\t\t\titemDef.modelRotation1 = 567;\n\t\t\titemDef.modelRotation2 = 2031;\n\t\t\titemDef.modelOffset1 = -4;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33367:\n\t\t\titemDef.name = \"Supreme void helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60467;\n\t\t\titemDef.maleModel = 60464;\n\t\t\titemDef.femaleModel = 60464;\n\t\t\titemDef.modelZoom = 900;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33368:\n\t\t\titemDef.name = \"Supreme void robe top\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60468;\n\t\t\titemDef.maleModel = 60465;\n\t\t\titemDef.femaleModel = 60465;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33369:\n\t\t\titemDef.name = \"Supreme void robe\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60469;\n\t\t\titemDef.maleModel = 60466;\n\t\t\titemDef.femaleModel = 60466;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33370:\n\t\t\titemDef.name = \"Korasi's sword\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60471;\n\t\t\titemDef.maleModel = 60470;\n\t\t\titemDef.femaleModel = 60470;\n\t\t\titemDef.modelZoom = 1744;\n\t\t\titemDef.modelRotation1 = 330;\n\t\t\titemDef.modelRotation2 = 1505;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.maleOffset = -4;\n\t\t\titemDef.femaleOffset = -4;\n\t\t\tbreak;\n\n\t\tcase 33371:\n\t\t\titemDef.name = \"Spiked slayer helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60475;\n\t\t\titemDef.maleModel = 60476;\n\t\t\titemDef.femaleModel = 60476;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33372:\n\t\t\titemDef.name = \"Slayer platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60478;\n\t\t\titemDef.maleModel = 60479;\n\t\t\titemDef.femaleModel = 60479;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33373:\n\t\t\titemDef.name = \"Slayer platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60474;\n\t\t\titemDef.maleModel = 60477;\n\t\t\titemDef.femaleModel = 60477;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33374:\n\t\t\titemDef.name = \"Slayer boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60472;\n\t\t\titemDef.maleModel = 60473;\n\t\t\titemDef.femaleModel = 60473;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 164;\n\t\t\titemDef.modelRotation2 = 156;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33375:\n\t\t\titemDef.name = \"Blood Justiciar helmet\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60482;\n\t\t\titemDef.maleModel = 60483;\n\t\t\titemDef.femaleModel = 60483;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 16;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 2;\n\t\t\titemDef.modelOffset2 = -4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33376:\n\t\t\titemDef.name = \"Blood Justiciar platebody\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60484;\n\t\t\titemDef.maleModel = 60485;\n\t\t\titemDef.femaleModel = 60485;\n\t\t\titemDef.modelZoom = 1513;\n\t\t\titemDef.modelRotation1 = 566;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33377:\n\t\t\titemDef.name = \"Blood justiciar platelegs\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60486;\n\t\t\titemDef.maleModel = 60487;\n\t\t\titemDef.femaleModel = 60487;\n\t\t\titemDef.modelZoom = 1900;\n\t\t\titemDef.modelRotation1 = 562;\n\t\t\titemDef.modelRotation2 = 1;\n\t\t\titemDef.modelOffset1 = 11;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33378:\n\t\t\titemDef.name = \"Blood justiciar boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60488;\n\t\t\titemDef.maleModel = 60488;\n\t\t\titemDef.femaleModel = 60488;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 164;\n\t\t\titemDef.modelRotation2 = 156;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33379:\n\t\t\titemDef.name = \"Blood justiciar gloves\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60489;\n\t\t\titemDef.maleModel = 60490;\n\t\t\titemDef.femaleModel = 60490;\n\t\t\titemDef.modelZoom = 855;\n\t\t\titemDef.modelRotation1 = 215;\n\t\t\titemDef.modelRotation2 = 94;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = -32;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33380:\n\t\t\titemDef.name = \"Blood scythe of vitur\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60480;\n\t\t\titemDef.maleModel = 60481;\n\t\t\titemDef.femaleModel = 60481;\n\t\t\titemDef.modelZoom = 3850;\n\t\t\titemDef.modelRotation1 = 727;\n\t\t\titemDef.modelRotation2 = 997;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33381:\n\t\t\titemDef.name = \"Skiller cape\";\n\t\t\titemDef.description = \"Skiller cape.\";\n\t\t\titemDef.modelId = 60494;\n\t\t\titemDef.maleModel = 60493;\n\t\t\titemDef.femaleModel = 60492;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 400;\n\t\t\titemDef.modelRotation2 = 948;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 6;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33382:\n\t\t\titemDef.name = \"Justiciar faceguard (zamorak)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33383:\n\t\t\titemDef.name = \"Justiciar faceguard (guthix)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33384:\n\t\t\titemDef.name = \"Justiciar faceguard (saradomin)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33385:\n\t\t\titemDef.name = \"Justiciar faceguard (ancient)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33387:\n\t\t\titemDef.name = \"Justiciar faceguard (bandos)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33389:\n\t\t\titemDef.name = \"Justiciar faceguard (armadyl)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 4550 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33390:\n\t\t\titemDef.name = \"Justiciar chestguard (zamorak)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33391:\n\t\t\titemDef.name = \"Justiciar chestguard (guthix)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33392:\n\t\t\titemDef.name = \"Justiciar chestguard (saradomin)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33393:\n\t\t\titemDef.name = \"Justiciar chestguard (ancient)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33394:\n\t\t\titemDef.name = \"Justiciar chestguard (bandos)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33395:\n\t\t\titemDef.name = \"Justiciar chestguard (armadyl)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35750;\n\t\t\titemDef.maleModel = 35359;\n\t\t\titemDef.femaleModel = 35368;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 432;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 4;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33396:\n\t\t\titemDef.name = \"Justiciar legguards (zamorak)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33397:\n\t\t\titemDef.name = \"Justiciar legguards (guthix)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33398:\n\t\t\titemDef.name = \"Justiciar legguards (saradomin)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33399:\n\t\t\titemDef.name = \"Justiciar legguards (ancient)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33400:\n\t\t\titemDef.name = \"Justiciar legguards (bandos)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33401:\n\t\t\titemDef.name = \"Justiciar legguards (armadyl)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35752;\n\t\t\titemDef.maleModel = 35356;\n\t\t\titemDef.femaleModel = 35357;\n\t\t\titemDef.modelZoom = 1720;\n\t\t\titemDef.modelRotation1 = 468;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 6709, 6736, 6602, 6699 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33402:\n\t\t\titemDef.name = \"Pet andy\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 50169;\n\t\t\titemDef.modelZoom = 1500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33403:\n\t\t\titemDef.name = \"Pet mod divine\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 14283;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33404:\n\t\t\titemDef.name = \"Celestial fairy\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60491;\n\t\t\titemDef.modelZoom = 3500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 947 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 937, 11200 };\n\t\t\titemDef.originalModelColors = new int[] { 42663, 41883 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33405:\n\t\t\titemDef.name = \"Lava partyhat (red)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33406:\n\t\t\titemDef.name = \"Lava partyhat (green)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33407:\n\t\t\titemDef.name = \"Lava partyhat (cyan)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33408:\n\t\t\titemDef.name = \"Lava partyhat (purple)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"A lava partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33409:\n\t\t\titemDef.name = \"Infernal partyhat (blue)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33410:\n\t\t\titemDef.name = \"Infernal partyhat (green)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33411:\n\t\t\titemDef.name = \"Infernal partyhat (purple)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33412:\n\t\t\titemDef.name = \"Infernal partyhat (rainbow)\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"An Infernal partyhat.\";\n\t\t\tbreak;\n\n\t\tcase 33413:\n\t\t\titemDef.name = \"Celestial partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33414:\n\t\t\titemDef.name = \"Blood partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33415:\n\t\t\titemDef.name = \"Shadow partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33416:\n\t\t\titemDef.name = \"Light blue partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33417:\n\t\t\titemDef.name = \"Easter partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33418:\n\t\t\titemDef.name = \"Dark sparkle partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33419:\n\t\t\titemDef.name = \"Rainbow partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33420:\n\t\t\titemDef.name = \"Fire partyhat\";\n\t\t\titemDef.modelId = 2635;\n\t\t\titemDef.modelZoom = 440;\n\t\t\titemDef.modelRotation2 = 1852;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.maleModel = 187;\n\t\t\titemDef.femaleModel = 363;\n\t\t\t// itemDef.anInt164 = -1;\n\t\t\t// itemDef.anInt188 = -1;\n\t\t\t// itemDef.aByte205 = -8;\n\t\t\titemDef.groundOptions = new String[] { null, null, \"Take\", null, null };\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.description = \"none.\";\n\t\t\tbreak;\n\n\t\tcase 33421:\n\t\t\titemDef.name = \"Pet star sprite\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60506;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\t\tcase 33422:\n\t\t\titemDef.name = \"Stargaze Box\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = false;\n\t\t\titemDef.modelId = 61110;\n\t\t\titemDef.modelZoom = 1180;\n\t\t\titemDef.modelRotation1 = 160;\n\t\t\titemDef.modelRotation2 = 172;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -14;\n\t\t\t// itemDef.modifiedModelColors = new int[] {22410, 2999};\n\t\t\t// itemDef.originalModelColors = new int[] {35321, 350};\n\t\t\titemDef.description = \"none\";\n\t\t\tbreak;\n\n\t\tcase 33423:\n\t\t\titemDef.name = \"Star Dust\";\n\t\t\titemDef.inventoryOptions = new String[] { \"Exchange\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.modelId = 60496;\n\t\t\titemDef.modelZoom = 2086;\n\t\t\titemDef.modelRotation1 = 279;\n\t\t\titemDef.modelRotation2 = 1994;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 47;\n\t\t\t// itemDef.modifiedModelColors = new int[] {22410, 2999};\n\t\t\t// itemDef.originalModelColors = new int[] {35321, 350};\n\t\t\titemDef.description = \"none\";\n\t\t\tbreak;\n\n\t\tcase 33424:\n\t\t\titemDef.name = \"Blood twisted bow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 32799;\n\t\t\titemDef.maleModel = 32674;\n\t\t\titemDef.femaleModel = 32674;\n\t\t\titemDef.modelZoom = 2000;\n\t\t\titemDef.modelRotation1 = 720;\n\t\t\titemDef.modelRotation2 = 1500;\n\t\t\titemDef.modelOffset1 = -3;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10318, 10334 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 66, 66 };\n\t\t\titemDef.modifiedModelColors = new int[] { 14236, 13223 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33425:\n\t\t\titemDef.name = \"Celestial crow\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60507;\n\t\t\titemDef.modelZoom = 1000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10382 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 10378, 10502 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33426:\n\t\t\titemDef.name = \"Celestial penguin\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60508;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10343 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 16, 12, 20, 24, 8, 10332, 10337 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0, 0, 0, 0, 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33427:\n\t\t\titemDef.name = \"Celestial snake\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60509;\n\t\t\titemDef.modelZoom = 1800;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 10644, 10512 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78, 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 10413, 10405, 10524 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33428:\n\t\t\titemDef.name = \"Celestial scorpion\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60510;\n\t\t\titemDef.modelZoom = 2500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 142 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.modifiedModelColors = new int[] { 4884, 4636, 3974, 4525, 4645 };\n\t\t\titemDef.originalModelColors = new int[] { 0, 0, 0, 0, 0 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33429:\n\t\t\titemDef.name = \"Armadyl dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 10467, 10474, 10482, 10484 };\n\t\t\tbreak;\n\n\t\tcase 33430:\n\t\t\titemDef.name = \"Guthix dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 21939, 21945, 21952, 21954 };\n\t\t\tbreak;\n\n\t\tcase 33431:\n\t\t\titemDef.name = \"Zamorak dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 926, 926, 926, 926 };\n\t\t\tbreak;\n\n\t\tcase 33432:\n\t\t\titemDef.name = \"Ancient dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { -10854, -10860, -10872, -10874 };\n\t\t\tbreak;\n\n\t\tcase 33433:\n\t\t\titemDef.name = \"Bandos dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 7062, 7062, 7062, 7062 };\n\t\t\tbreak;\n\n\t\tcase 33434:\n\t\t\titemDef.name = \"Saradomin dye\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60513;\n\t\t\titemDef.modelZoom = 809;\n\t\t\titemDef.modelRotation1 = 90;\n\t\t\titemDef.modelRotation2 = 2047;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -9;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 30814, 30809, 30799, 30804 };\n\t\t\titemDef.originalModelColors = new int[] { 43929, 43929, 43929, 43929 };\n\t\t\tbreak;\n\n\t\tcase 33435:\n\t\t\titemDef.name = \"Celestial egg\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 7171;\n\t\t\titemDef.modelZoom = 550;\n\t\t\titemDef.modelRotation1 = 76;\n\t\t\titemDef.modelRotation2 = 16;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.originalTextureColors = new int[] { 476 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 78 };\n\t\t\titemDef.inventoryOptions = new String[] { \"Hatch\", null, null, null, \"Drop\" };\n\t\t\titemDef.stackable = true;\n\t\t\tbreak;\n\n\t\tcase 33436:\n\t\t\titemDef.name = \"Elite void top (placeholder)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 10586;\n\t\t\titemDef.maleModel = 10687;\n\t\t\titemDef.anInt188 = 10681;\n\t\t\titemDef.femaleModel = 10694;\n\t\t\titemDef.anInt164 = 10688;\n\t\t\titemDef.modelZoom = 1221;\n\t\t\titemDef.modelRotation1 = 459;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\t// itemDef.originalTextureColors = new int [] { 695};\n\t\t\t// itemDef.modifiedTextureColors = new int [] { 66};\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33437:\n\t\t\titemDef.name = \"Elite void robe (placeholder)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60528;\n\t\t\titemDef.maleModel = 60526;\n\t\t\titemDef.femaleModel = 60527;\n\t\t\titemDef.modelZoom = 2105;\n\t\t\titemDef.modelRotation1 = 525;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 1;\n\t\t\t// itemDef.originalTextureColors = new int [] { 695};\n\t\t\t// itemDef.modifiedTextureColors = new int [] { 66};\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33438:\n\t\t\titemDef.name = \"Blood chest\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60516;\n\t\t\titemDef.modelZoom = 2640;\n\t\t\titemDef.modelRotation1 = 114;\n\t\t\titemDef.modelRotation2 = 1883;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33439:\n\t\t\titemDef.name = \"Blood bird\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60517;\n\t\t\titemDef.modelZoom = 2768;\n\t\t\titemDef.modelRotation1 = 141;\n\t\t\titemDef.modelRotation2 = 1790;\n\t\t\titemDef.modelOffset1 = -8;\n\t\t\titemDef.modelOffset2 = -13;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\titemDef.originalTextureColors = new int[] { 1946, 2983, 6084, 2735, 5053, 6082, 4013, 2733, 4011, 2880,\n\t\t\t\t\t8150 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 };\n\t\t\tbreak;\n\n\t\tcase 33440:\n\t\t\titemDef.name = \"Blood Death\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60441;\n\t\t\titemDef.modelZoom = 16000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33442:\n\t\t\titemDef.name = \"10 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Claim\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33446:\n\t\t\titemDef.name = \"10 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Claim\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33450:\n\t\t\titemDef.name = \"10 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Claim\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33454:\n\t\t\titemDef.name = \"10 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33458:\n\t\t\titemDef.name = \"10 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33462:\n\t\t\titemDef.name = \"10 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33443:\n\t\t\titemDef.name = \"30 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33447:\n\t\t\titemDef.name = \"30 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33451:\n\t\t\titemDef.name = \"30 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33455:\n\t\t\titemDef.name = \"30 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33459:\n\t\t\titemDef.name = \"30 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33463:\n\t\t\titemDef.name = \"30 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33444:\n\t\t\titemDef.name = \"60 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33448:\n\t\t\titemDef.name = \"60 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33452:\n\t\t\titemDef.name = \"60 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33456:\n\t\t\titemDef.name = \"60 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33460:\n\t\t\titemDef.name = \"60 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33464:\n\t\t\titemDef.name = \"60 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33445:\n\t\t\titemDef.name = \"120 Min XP boost (25%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33449:\n\t\t\titemDef.name = \"120 Min XP boost (50%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33453:\n\t\t\titemDef.name = \"120 Min XP boost (75%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33457:\n\t\t\titemDef.name = \"120 Min XP boost (100%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33461:\n\t\t\titemDef.name = \"120 Min XP boost (150%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33465:\n\t\t\titemDef.name = \"120 Min XP boost (200%)\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60531;\n\t\t\titemDef.modelZoom = 1488;\n\t\t\titemDef.modelRotation1 = 246;\n\t\t\titemDef.modelRotation2 = 1721;\n\t\t\titemDef.modelOffset1 = -11;\n\t\t\titemDef.modelOffset2 = -45;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\titemDef.originalTextureColors = new int[] { 54302, 54312, 54307, 54297, 54315, 54310, 54305, 54287, 55292,\n\t\t\t\t\t54300, 10281, 10274 };\n\t\t\titemDef.modifiedTextureColors = new int[] { 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33466:\n\t\t\titemDef.name = \"Deathtouched dart\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60534;\n\t\t\titemDef.maleModel = 60533;\n\t\t\titemDef.femaleModel = 60533;\n\t\t\titemDef.modelZoom = 1053;\n\t\t\titemDef.modelRotation1 = 471;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.stackable = true;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33467:\n\t\t\titemDef.name = \"Justiciar boots\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60535;\n\t\t\titemDef.maleModel = 60535;\n\t\t\titemDef.femaleModel = 60535;\n\t\t\titemDef.modelZoom = 789;\n\t\t\titemDef.modelRotation1 = 164;\n\t\t\titemDef.modelRotation2 = 156;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = -8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33468:\n\t\t\titemDef.name = \"Justiciar gloves\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 31022;\n\t\t\titemDef.maleModel = 31006;\n\t\t\titemDef.femaleModel = 31013;\n\t\t\titemDef.modelZoom = 592;\n\t\t\titemDef.modelRotation1 = 636;\n\t\t\titemDef.modelRotation2 = 2015;\n\t\t\titemDef.modelOffset1 = 3;\n\t\t\titemDef.modelOffset2 = 3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { 123, 70 };\n\t\t\titemDef.originalModelColors = new int[] { 6736, 59441 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33469:\n\t\t\titemDef.name = \"Magic mushroom\";\n\t\t\titemDef.description = \"offers a 10% droprate increase while this pet follows you.\";\n\t\t\titemDef.modelId = 60532;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33470:\n\t\t\titemDef.name = \"Twisted staff\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60538;\n\t\t\titemDef.maleModel = 60539;\n\t\t\titemDef.femaleModel = 60539;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 1549;\n\t\t\titemDef.modelRotation2 = 1791;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = -3;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33471:\n\t\t\titemDef.name = \"Cowboy hat\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60540;\n\t\t\titemDef.maleModel = 60541;\n\t\t\titemDef.femaleModel = 60541;\n\t\t\titemDef.modelZoom = 800;\n\t\t\titemDef.modelRotation1 = 108;\n\t\t\titemDef.modelRotation2 = 1535;\n\t\t\titemDef.modelOffset1 = -1;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33472:\n\t\t\titemDef.name = \"Stick\";\n\t\t\titemDef.description = \"Careful of that chub.\";\n\t\t\titemDef.modelId = 60545;\n\t\t\titemDef.maleModel = 60545;\n\t\t\titemDef.femaleModel = 60545;\n\t\t\titemDef.modelZoom = 3000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33473:\n\t\t\titemDef.name = \"#1 Tob cape\";\n\t\t\titemDef.description = \"Reward to the first to complete tob solo and in a team.\";\n\t\t\titemDef.modelId = 60551;\n\t\t\titemDef.maleModel = 60550;\n\t\t\titemDef.femaleModel = 60550;\n\t\t\titemDef.modelZoom = 2295;\n\t\t\titemDef.modelRotation1 = 367;\n\t\t\titemDef.modelRotation2 = 1212;\n\t\t\titemDef.modelOffset1 = 4;\n\t\t\titemDef.modelOffset2 = 8;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33474:\n\t\t\titemDef.name = \"Supreme void upgrade kit\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 4847;\n\t\t\titemDef.modelZoom = 1310;\n\t\t\titemDef.modelRotation1 = 163;\n\t\t\titemDef.modelRotation2 = 73;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\titemDef.modifiedModelColors = new int[] { -32709, 10295, 10304, 10287, 10275, 10283 };\n\t\t\titemDef.originalModelColors = new int[] { 10, 10, 10, 10, 10, 10 };\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33475:\n\t\t\titemDef.name = \"Hunter's penguin\";\n\t\t\titemDef.description = \"the one and only's pet.\";\n\t\t\titemDef.modelId = 60548;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33476:\n\t\t\titemDef.name = \"Chef Harambe\";\n\t\t\titemDef.description = \"I like to dip my balls in a deep fryer.\";\n\t\t\titemDef.modelId = 60921;\n\t\t\titemDef.modelZoom = 5000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33477:\n\t\t\titemDef.name = \"Void knight champion jr\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60463;\n\t\t\titemDef.modelZoom = 14000;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 6;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33478:\n\t\t\titemDef.name = \"Custom pet token\";\n\t\t\titemDef.description = \"Trade this to corey after filling out a form on the forums post custom pets\";\n\t\t\titemDef.modelId = 13838;\n\t\t\titemDef.modelZoom = 530;\n\t\t\titemDef.modelRotation1 = 415;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33479:\n\t\t\titemDef.name = \"Mr jaycorr\";\n\t\t\titemDef.description = \"The autistic one.\";\n\t\t\titemDef.modelId = 60592;\n\t\t\titemDef.modelZoom = 7500;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 270;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = null;\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33480:\n\t\t\titemDef.name = \"Broom broom\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 60593;\n\t\t\titemDef.maleModel = 60593;\n\t\t\titemDef.femaleModel = 60593;\n\t\t\titemDef.modelZoom = 2700;\n\t\t\titemDef.modelRotation1 = 0;\n\t\t\titemDef.modelRotation2 = 0;\n\t\t\titemDef.modelOffset1 = 0;\n\t\t\titemDef.modelOffset2 = 0;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 33481:\n\t\t\titemDef.name = \"Test\";\n\t\t\titemDef.description = \"none.\";\n\t\t\titemDef.modelId = 35751;\n\t\t\titemDef.maleModel = 35349;\n\t\t\titemDef.femaleModel = 35361;\n\t\t\titemDef.modelZoom = 777;\n\t\t\titemDef.modelRotation1 = 22;\n\t\t\titemDef.modelRotation2 = 1972;\n\t\t\titemDef.modelOffset1 = 1;\n\t\t\titemDef.modelOffset2 = -1;\n\t\t\titemDef.inventoryOptions = new String[5];\n\t\t\titemDef.inventoryOptions[1] = \"Wear\";\n\t\t\titemDef.inventoryOptions[2] = null;\n\t\t\t// itemDef.aByte205 = 3;\n\t\t\tbreak;\n\n\t\tcase 11773:\n\t\tcase 11771:\n\t\tcase 11770:\n\t\tcase 11772:\n\t\t\titemDef.anInt196 += 45;\n\t\t\tbreak;\n\t\tcase 22610:\n\t\t\titemDef.name = \"Vesta's spear (deg)\";\n\t\t\tbreak;\n\t\tcase 22614:\n\t\t\titemDef.name = \"Vesta's longsword (deg)\";\n\t\t\tbreak;\n\t\tcase 22616:\n\t\t\titemDef.name = \"Vesta's chainbody (deg)\";\n\t\t\tbreak;\n\t\tcase 22619:\n\t\t\titemDef.name = \"Vesta's plateskirt (deg)\";\n\t\t\tbreak;\n\t\tcase 22622:\n\t\t\titemDef.name = \"Statius's warhammer (deg)\";\n\t\t\tbreak;\n\t\tcase 22625:\n\t\t\titemDef.name = \"Statius's full helm (deg)\";\n\t\t\tbreak;\n\t\tcase 22628:\n\t\t\titemDef.name = \"Statius's platebody (deg)\";\n\t\t\tbreak;\n\t\tcase 22631:\n\t\t\titemDef.name = \"Statius's platelegs (deg)\";\n\t\t\tbreak;\n\t\tcase 22638:\n\t\t\titemDef.name = \"Morrigan's coif (deg)\";\n\t\t\tbreak;\n\t\tcase 22641:\n\t\t\titemDef.name = \"Morrigan's leather body (deg)\";\n\t\t\tbreak;\n\t\tcase 22644:\n\t\t\titemDef.name = \"Morrigan's leather chaps (deg)\";\n\t\t\tbreak;\n\t\tcase 22647:\n\t\t\titemDef.name = \"Zuriel's staff (deg)\";\n\t\t\tbreak;\n\t\tcase 22650:\n\t\t\titemDef.name = \"Zuriel's hood (deg)\";\n\t\t\tbreak;\n\t\tcase 22653:\n\t\t\titemDef.name = \"Zuriel's robe top (deg)\";\n\t\t\tbreak;\n\t\tcase 22656:\n\t\t\titemDef.name = \"Zuriel's robe bottom (deg)\";\n\t\t\tbreak;\n\n\t\tcase 13303:\n\t\t\titemDef.name = \"Event Key (Tarn)\";\n\t\t\titemDef.description = \"Use this to open the Event Boss chest.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 8128 };\n\t\t\titemDef.originalModelColors = new int[] { 933 };\n\t\t\tbreak;\n\t\tcase 13302:\n\t\t\titemDef.name = \"Event Key (Graardor)\";\n\t\t\titemDef.description = \"Use this to open the Event Boss chest.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 8128 };\n\t\t\titemDef.originalModelColors = new int[] { 933 };\n\t\t\tbreak;\n\t\tcase 13305:\n\t\t\titemDef.name = \"Tastey-Looking Key\";\n\t\t\titemDef.description = \"Use this to open the Event Boss chest.\";\n\t\t\titemDef.modifiedModelColors = new int[] { 8128 };\n\t\t\titemDef.originalModelColors = new int[] { 933 };\n\t\t\tbreak;\n\t\tcase 2697:\n\t\t\titemDef.name = \"$10 Scroll\";\n\t\t\titemDef.description = \"Get donor status at a cheaper cost!\";\n\t\t\tbreak;\n\t\tcase 2698:\n\t\t\titemDef.name = \"$50 Scroll\";\n\t\t\titemDef.description = \"Read this scroll to be rewarded with the Super Donator status.\";\n\t\t\tbreak;\n\t\tcase 2699:\n\t\t\titemDef.name = \"$100 Donator\";\n\t\t\titemDef.description = \"Read this scroll to be rewarded with the Extreme Donator status.\";\n\t\t\tbreak;\n\t\tcase 2700:\n\t\t\titemDef.name = \"$5 Scroll\";\n\t\t\titemDef.description = \"Read this scroll to be rewarded with the Legendary Donator status.\";\n\t\t\tbreak;\n\t\tcase 1464:\n\t\t\titemDef.name = \"Vote ticket\";\n\t\t\titemDef.description = \"This ticket can be exchanged for a voting point.\";\n\t\t\tbreak;\n\n\t\tcase 11739:\n\t\t\titemDef.name = \"Daily reward box\";\n\t\t\titemDef.description = \"Open this box for a daily reward.\";\n\t\t\tbreak;\n\n\t\tcase 13066:// super set\n\t\tcase 12873:// barrows\n\t\tcase 12875:\n\t\tcase 12877:\n\t\tcase 12879:\n\t\tcase 12881:\n\t\tcase 12883:\n\t\tcase 12789:// clue box\n\t\t\titemDef.inventoryOptions = new String[] { \"Open\", null, null, null, \"Drop\" };\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "Items(){\r\n\t\tname=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//Parts to the vaccine[1-3]\r\n\t\t\t\t\"Mysterious Vial\", \"Piece of alien meteorite\",\"Alien X\",\r\n\t\t\t\t//Keys[4-6]\r\n\t\t\t\t\"Mysterious Key\",\"Office Key\",\"Captian's Key\",\r\n\t\t\t\t//suit[7,8]\r\n\t\t\t\t\"Hazmat Suit\",\"Gas Mask\",\r\n\t\t\t\t//vials[9-11]\r\n\t\t\t\t\"Blue Vial\",\"Pink Vial\", \"Gold Vial\",\r\n\t\t\t\t//other[12,13]\r\n\t\t\t\t\"X Files\", \"Demon's Bane Flower\",\"Reinforced Armor\"\r\n\t\t};\r\n\t\tdescription=new String[]{\r\n\t\t\t\t\"\",\r\n\t\t\t\t//vaccine parts[2-4]\r\n\t\t\t\t\"A special vial coated with a mysterious substance\",\r\n\t\t\t\t\"Part of an alien meteorite that the crew excavated\",\r\n\t\t\t\t\"A powerful allergen that instantly kills one’s immune system and their whole well-being, mutating them into something inhuman\",\r\n\t\t\t\t//keys\r\n\t\t\t\t\"A metal key that must open a door\",\r\n\t\t\t\t\"Looks like a normal key\",\r\n\t\t\t\t\"A metal key used to unlock something\",\r\n\t\t\t\t//Suit\r\n\t\t\t\t\"A full-body suit designed to keep harmful toxins away from the wearer. The face mask is missing, however\",\r\n\t\t\t\t\"A mask that goes over the wearer’s head and filters out all harmful substances in the air\",\r\n\t\t\t\t//Vials\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows light blue\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows bright pink\",\r\n\t\t\t\t\"A vial similar to the ones in the DNA Library, it glows golden yellow\",\r\n\t\t\t\t//other\r\n\t\t\t\t\"Recorded documentation of all experiments and research done while in space. Most importantly it contains reports on events leading up to the virus spreading throughout the ship\",\r\n\t\t\t\t\"A beautiful flower that seems to survive unattached to the ground, the veins running through its petals give a faint glow as a heavenly scent fills the room\",\r\n\t\t\t\t\"A set of fine leather armor with metal plates reinforcing vulnerable areas\"\r\n\t\t};\r\n\t}", "static void addStuff(Room room, Scanner in) {\n String name = in.nextLine();\n while (name.length() > 0) {\n if(name.equals(\"sword\")){\n room.add(new Sword());\n }\n else{\n room.add(new Thing(name));\n }\n name = in.nextLine();\n \n }\n }", "void createSportItem (String name, String description, double price, String sportType);", "private void createRoom(Connection connection, Scanner scan) throws SQLException {\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs1 = dmd.getTables(null, null, \"ROOM\", null);\n ResultSet rs2 = dmd.getTables(null, null, \"HOTEL_ROOMS\", null);\n\n if (rs1.next() && rs2.next()){\n\n String sql = \"INSERT INTO Room VALUES (?, ?, ?, ?)\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n pStmt.setString(1, getHotelName());\n pStmt.setInt(2, getBranchID());\n\n System.out.print(\"Please provide the room type a name: \");\n setType(scan.nextLine());\n pStmt.setString(3, getType());\n\n System.out.print(\"Please provide a guest capacity for this type: \"); // branch id, room type, capacity\n setCapacity(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(4, getCapacity());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { e.printStackTrace(); }\n finally {\n pStmt.close();\n rs1.close();\n rs2.close();\n }\n\n linkHotelRoom(connection, scan);\n }\n else {\n System.out.println(\"ERROR: Error loading ROOM or HOTEL_ROOMS Table.\");\n }\n }", "public void addNewToDo(String description) {\n Todo todo = new Todo(description);\n taskList.add(todo);\n printSuccessfulAddMessage(todo.toString());\n }", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "@Override\n\t\tpublic Integer insertItem(String name, int locationID, int descriptionID) {\n\t\t\treturn null;\n\t\t}", "public String getRoomDescription() {\n\treturn this.description;\n\t\n}", "public String addTodo(String description) {\n Todo toAdd = new Todo(description);\n records.add(toAdd);\n return String.format(\"Got it. I've added this todo:\\n\\t %1$s \\n\\t\" +\n \"Now you have %2$d tasks in the list.\\n\\t\", toAdd.toString(), records.size());\n }", "public void createRoom(int roomId, String featureSummary) throws NumberFormatException, IOException {\n\t\tSystem.out.println(\"Would you like to add a Standard Room or a Suite?\");\n\t\tSystem.out.println(\"1: Standard Room\");\n\t\tSystem.out.println(\"2: Suite\");\n\n\t\tint input = Integer.parseInt(br.readLine());\n\n\t\tif (input == 1) {\n\t\t\tSystem.out.println(\"Creating Standard Room...\");\n\t\t\tcreateStandardRoom(roomId, featureSummary);\n\t\t\tmenu();\n\n\t\t} else if (input == 2) {\n\t\t\tSystem.out.println(\"Creating Suite...\");\n\t\t\tcreateSuite(roomId, featureSummary);\n\t\t\tmenu();\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Please select a valid option\\n\");\n\t\t\tcreateRoom(roomId, featureSummary);\n\t\t} \n\n\t}", "public void buildItems() {\n try (PreparedStatement prep = Database.getConnection()\n .prepareStatement(\"CREATE TABLE IF NOT\"\n + \" EXISTS items (order_id TEXT, item TEXT, FOREIGN KEY (order_id)\"\n + \" REFERENCES orders(id) ON DELETE CASCADE ON UPDATE CASCADE);\")) {\n prep.executeUpdate();\n } catch (final SQLException exc) {\n exc.printStackTrace();\n }\n }", "public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "private String makeEventDescription(String description) {\n return \"DESCRIPTION:\" + description + \"\\n\";\n }", "public NormalRoom(String description, List<Action> actions) {\n\t\tsuper(description, actions);\n\t}", "@Test\r\n\tpublic final void testAddRoom() {\n\t\tboolean success = roomServices.addRoom(expected2);\r\n\t\t// check if added successfully\r\n\t\tassertTrue(success);\r\n\t\t// need to copy the id from database since it autoincrements\r\n\t\tRoom actual = roomServices.getRoomByName(expected2.getName());\r\n\t\texpected2.setId(actual.getId());\r\n\t\t// check content of data\r\n\t\tassertEquals(expected2, actual);\r\n\t\t// delete room on exit\r\n\t\troomServices.deleteRoom(actual);\r\n\t}", "private String getMeetingDescription(MeetingItem item) {\n StringBuilder descriptionBuilder = new StringBuilder();\n\n if(!item.getMeeting().getAgenda().isEmpty()) {\n descriptionBuilder.append(\"<h3>Agenda</h3>\");\n descriptionBuilder.append(\"<p><pre>\" + item.getMeeting().getAgenda() + \"</pre></p>\");\n }\n\n if(!item.getMeeting().getNotes().isEmpty() || !item.getMeeting().getPlannotes().isEmpty()) {\n descriptionBuilder.append(\"<h3>Opmerkingen</h3>\");\n\n if(!item.getMeeting().getNotes().isEmpty())\n descriptionBuilder.append(\"<p>\" + item.getMeeting().getNotes() + \"</p>\");\n\n if(!item.getMeeting().getPlannotes().isEmpty())\n descriptionBuilder.append(\"<p>\" + item.getMeeting().getPlannotes() + \"</p>\");\n }\n\n return descriptionBuilder.toString();\n }", "public Scenario() {\n Room ninjaRoom, weaponroom, meetingRoom, zenTemple, stealthRoom, restRoom, masterRoom, ninjaTransporter;\n\n // create the rooms\n ninjaRoom = new Room(\"in the main enterence to the camp. You'll need to walk 10000 steps to get to the next room.\");\n weaponroom = new Room(\"in the Weapon's room. Normally this is where you go to grab your Nunchaku, but not today.\");\n meetingRoom = new Room(\"in the Meeting room. This is where classes are normally held. We will be here tomorrow to be sure\");\n zenTemple = new Room(\"in the Meditation room. When done for the day, this is where you clear your head.\");\n stealthRoom = new Room(\"in the Stealth training room. Ninja are made here, slow but steady will keep you alive.\");\n restRoom = new Room(\"in the Barracks. When I am done for th day, I will come back here for some rest.\");\n masterRoom = new Room(\"in the Master's room. Master is current meditating right now. Better leave him alone.\");\n ninjaTransporter = new TransporterRoom(\"in the secret Shumpo room...with this I can teleport anywhere\", this);\n\n weaponroom.addItem(new Item(\"Katana\", 3));\n weaponroom.addItem(new Item(\"Nunchaku\", 1));\n weaponroom.addItem(new Item(\"Bo\", 2));\n weaponroom.addItem(new Item(\"Sai\", 2));\n ninjaRoom.addItem(new Item(\"Master's Keys\", 1));\n meetingRoom.addItem(new Item(\"Secret Plans\", 1));\n zenTemple.addItem(new Item(\"Prayer beads\", 1));\n stealthRoom.addItem(new Item(\"Throwing Star\", 2));\n restRoom.addItem(new Item(\"Risque magazines\", 1));\n masterRoom.addItem(new Item(\"Ancient Shinobi Scroll\", 5));\n\n // initialise room exits\n ninjaRoom.setExits(\"north\", ninjaTransporter);\n\n ninjaTransporter.setExits(\"north\", weaponroom);\n ninjaTransporter.setExits(\"south\", ninjaRoom);\n\n weaponroom.setExits(\"north\", meetingRoom);\n weaponroom.setExits(\"south\", ninjaTransporter);\n\n meetingRoom.setExits(\"north\", stealthRoom);\n meetingRoom.setExits(\"east\", restRoom);\n meetingRoom.setExits(\"south\", weaponroom);\n meetingRoom.setExits(\"west\", zenTemple);\n\n zenTemple.setExits(\"east\", meetingRoom);\n\n stealthRoom.setExits(\"south\", meetingRoom);\n\n restRoom.setExits(\"east\", masterRoom);\n restRoom.setExits(\"west\", meetingRoom);\n\n masterRoom.setExits(\"west\", restRoom);\n\n // Set the start room\n startRoom = ninjaRoom; // start game @ ninjaRoom\n\n rooms = new ArrayList();\n rooms.add(ninjaRoom);\n rooms.add(weaponroom);\n rooms.add(meetingRoom);\n rooms.add(zenTemple);\n rooms.add(stealthRoom);\n rooms.add(restRoom);\n rooms.add(masterRoom);\n rooms.add(ninjaTransporter);\n\n random = new Random();\n }", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }", "public Room(String name, String shortDescription, String longDescription) {\n\t\tsuper(name, shortDescription, longDescription);\n\t}", "public List<Item> findItemByDescription(String description)\n {\n return auctionManager.findItemByDescription(description);\n }", "public void createCharacters()\n {\n Item item_chambermaid = new Item(\"Broom\",\"The brush that she uses\");\n Item item_bob_taylor = new Item(\"Toys\",\"Bob Taylor toys\");\n Item item_mr_Cunningham = new Item(\"Black hat\",\"The nice hat of Mr Cunningham\");\n Item item_ms_Wellington = new Item(\"Ring\", \"This is the wedding ring\");\n \n // Neutral characters creation //\n mr_Taylor = new Neutral(\"Mr Taylor\",\" \", poolroom, \"..\\\\pictures\\\\Characters\\\\MrTaylor2.png\");\n ms_Taylor = new Neutral(\"Ms Taylor\",\"Oh no ! My poor husband is dead ! What am I going to do now ?!\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsTaylor2.png\");\n ms_Cunningham = new Neutral(\"Ms Cunningham\",\"My husband was the best old friend of Mr Taylor\", poolroom, \"..\\\\pictures\\\\Characters\\\\MsCunningham2.png\");\n \n // Ally characters creation //\n chambermaid = new Ally(\"Chambermaid\",\"I was in the dancing room to serve the guests.I was not with the master\", poolroom, item_chambermaid, \"..\\\\pictures\\\\Characters\\\\Chambermaid.png\");\n bob_Taylor = new Ally(\"Bob Taylor\",\"What happened to my father ? \", poolroom, item_bob_taylor, \"..\\\\pictures\\\\Characters\\\\BobTaylor2.png\");\n mr_Cunningham = new Ally(\"Mr Cunningham\", \"I was in my bedroom when I heard someone screaming. So I went down stairs quickly\", poolroom, item_mr_Cunningham, \"..\\\\pictures\\\\Characters\\\\MrCunningham2.png\");\n ms_Wellington = new Ally(\"Ms Wellington\", \"I was in the dancing room with my husband. The chambermaid served us.\", poolroom, item_ms_Wellington, \"..\\\\pictures\\\\Characters\\\\MsWellington2.png\");\n \n // Enemy characters ceration //\n valet = new Enemy(\"Valet\",\"I was in the kitchen. I checked the wine delivery\", poolroom,4,80,12,\"..\\\\pictures\\\\Characters\\\\Valet2.png\"); // damage =4 accuraccy = 80, HP=12\n caretaker = new Enemy(\"Caretaker\",\"I was in my hut to repair the fork\",poolroom, 2,20,5, \"..\\\\pictures\\\\Characters\\\\Caretaker2.png\"); // damage =2 accuraccy = 20, HP=5\n mr_Wellington = new Enemy(\"Mr Wellington\",\"I was in the dancing room with my wife\", poolroom, 1,10,7, \"..\\\\pictures\\\\Characters\\\\MrWellington2.png\"); // damage =1 accuraccy = 10, HP=7\n nina_Taylor = new Enemy(\"Nina Taylor\", \"I was in the library and I read a good book\", poolroom, 2, 30, 8,\"..\\\\pictures\\\\Characters\\\\NinaTaylor2.png\"); // damage =2 accuraccy = 30, HP=8\n skeleton = new Enemy(\"Oscar the skeleton\",\"A human skeleton\", laboratory, 2, 80, 5,\"..\\\\pictures\\\\Characters\\\\skeleton.png\");\n ghost = new Enemy(\"Casper the Ghost\", \"A little green ghost\", livingroom, 1, 50, 4, \"..\\\\pictures\\\\Characters\\\\ghost.png\");\n \n listOfPNG = new ArrayList();\n listOfPNG.add(ms_Taylor);\n listOfPNG.add(ms_Cunningham);\n listOfPNG.add(chambermaid);\n listOfPNG.add(bob_Taylor);\n listOfPNG.add(mr_Cunningham);\n listOfPNG.add(ms_Wellington);\n //listOfPNG.add(valet);\n //listOfPNG.add(caretaker);\n listOfPNG.add(mr_Wellington);\n listOfPNG.add(nina_Taylor);\n \n \n }", "@Override\n public void run(String... args) throws Exception {\n Outfit outfit = new Outfit();\n outfit.setCurrentoutfit(true);\n outfitRepository.save(outfit);\n\n\n// Category category = new Category();\n//\n// category.setTops(\"Tops\");\n// category.setBottoms(\"Bottoms\");\n// category.setShoes(\"sneakers\");\n// category.setAccessories(\"\");\n// category.setJackets(\"\");\n// categoryRepository.save(category);\n Category tops = new Category();\n tops.setCategoryType(\"Tops\");\n categoryRepository.save(tops);\n\n Category bottoms = new Category();\n bottoms.setCategoryType(\"Bottoms\");\n categoryRepository.save(bottoms);\n\n Category accessories = new Category();\n accessories.setCategoryType(\"Accessories\");\n categoryRepository.save(accessories);\n\n Category shoes = new Category();\n shoes.setCategoryType(\"Shoes\");\n categoryRepository.save(shoes);\n\n Category jackets = new Category();\n jackets.setCategoryType(\"Jacket\");\n categoryRepository.save(jackets);\n/**\n * Here is where the items start for Outfit 1\n * */\n Item topOne = new Item();\n topOne.setCategory(tops);\n topOne.setColor(\"Black\");\n topOne.setFabricMaterial(\"cotton\");\n topOne.setSize(7);\n topOne.setItemName(\"Shirt\");\n topOne.setImages(\"image/women.png\");\n itemRepository.save(topOne);\n\n Item bottomOne = new Item();\n bottomOne.setCategory(bottoms);\n bottomOne.setColor(\"Light Blue\");\n bottomOne.setFabricMaterial(\"Denim\");\n bottomOne.setSize(31);\n bottomOne.setItemName(\"Bleached Light Blue Jeans\");\n itemRepository.save(bottomOne);\n\n Item shoeOne = new Item();\n shoeOne.setCategory(shoes);\n shoeOne.setColor(\"Black\");\n shoeOne.setFabricMaterial(\"Mesh\");\n shoeOne.setSize(7);\n shoeOne.setItemName(\"Shoe\");\n itemRepository.save(shoeOne);\n\n Item accessoryOne = new Item();\n accessoryOne.setCategory(accessories);\n accessoryOne.setColor(\"Gold\");\n accessoryOne.setFabricMaterial(\"Gold\");\n accessoryOne.setSize(1);\n accessoryOne.setItemName(\"Gold Watch\");\n itemRepository.save(accessoryOne);\n\n\n Item jacketOne = new Item();\n jacketOne.setCategory(jackets);\n jacketOne.setColor(\"Black\");\n jacketOne.setFabricMaterial(\"Leather\");\n jacketOne.setSize(30);\n jacketOne.setItemName(jacketOne.getColor() + \" Jacket\");\n itemRepository.save(jacketOne);\n\n\n /**\n * Here is where the items start for Outfit 2\n * */\n Item topTwo = new Item();\n topTwo.setCategory(tops);\n topTwo.setColor(\"White\");\n topTwo.setFabricMaterial(\"Blend\");\n topTwo.setSize(7);\n topTwo.setItemName(\"Crew Neck Tee Shirt\");\n itemRepository.save(topTwo);\n\n Item bottomTwo = new Item();\n bottomTwo.setCategory(bottoms);\n bottomTwo.setColor(\"Grey\");\n bottomTwo.setFabricMaterial(\"Denim\");\n bottomTwo.setSize(34);\n bottomTwo.setItemName(\"Skinny Jeans\");\n itemRepository.save(bottomTwo);\n\n Item shoeTwo = new Item();\n shoeTwo.setCategory(shoes);\n shoeTwo.setColor(\"White, Black, Red\");\n shoeTwo.setFabricMaterial(\"Mesh\");\n shoeTwo.setSize(7);\n shoeTwo.setItemName(\"Tennis Shoes\");\n itemRepository.save(shoeTwo);\n\n Item accessoryTwo = new Item();\n accessoryTwo.setCategory(accessories);\n accessoryTwo.setColor(\"Green\");\n accessoryTwo.setFabricMaterial(\"\");\n accessoryTwo.setSize(7);\n accessoryTwo.setItemName(\"Shirt\");\n itemRepository.save(accessoryTwo);\n\n Item jacketTwo = new Item();\n jacketTwo.setCategory(jackets);\n jacketTwo.setColor(\"Tan\");\n jacketTwo.setFabricMaterial(\"Leather\");\n jacketTwo.setSize(30);\n jacketTwo.setItemName(jacketTwo.getColor() + \" Jacket\");\n itemRepository.save(jacketTwo);\n\n\n /**\n * Here is where the items start for Outfit 3\n * */\n Item topThree = new Item();\n topThree.setCategory(tops);\n topThree.setColor(\"red\");\n topThree.setFabricMaterial(\"cotton\");\n topThree.setSize(7);\n topThree.setItemName(\"Shirt\");\n itemRepository.save(topThree);\n\n Item bottomThree = new Item();\n bottomThree.setCategory(bottoms);\n bottomThree.setColor(\"green\");\n bottomThree.setFabricMaterial(\"cotton\");\n bottomThree.setSize(31);\n bottomThree.setItemName(\"Jeans\");\n itemRepository.save(bottomThree);\n\n Item shoeThree = new Item();\n shoeThree.setCategory(shoes);\n shoeThree.setColor(\"green\");\n shoeThree.setFabricMaterial(\"\");\n shoeThree.setSize(7);\n shoeThree.setItemName(\"Shoe\");\n itemRepository.save(shoeThree);\n\n Item accessoryThree = new Item();\n accessoryThree.setCategory(accessories);\n accessoryThree.setColor(\"green\");\n accessoryThree.setFabricMaterial(\"\");\n accessoryThree.setSize(7);\n accessoryThree.setItemName(\"Shirt\");\n itemRepository.save(accessoryThree);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 4\n * */\n Item topFour = new Item();\n topFour.setCategory(tops);\n topFour.setColor(\"red\");\n topFour.setFabricMaterial(\"cotton\");\n topFour.setSize(7);\n topFour.setItemName(\"Shirt\");\n itemRepository.save(topFour);\n\n Item bottomFour = new Item();\n bottomFour.setCategory(bottoms);\n bottomFour.setColor(\"green\");\n bottomFour.setFabricMaterial(\"cotton\");\n bottomFour.setSize(31);\n bottomFour.setItemName(\"Jeans\");\n itemRepository.save(bottomFour);\n\n Item shoeFour = new Item();\n shoeFour.setCategory(shoes);\n shoeFour.setColor(\"green\");\n shoeFour.setFabricMaterial(\"\");\n shoeFour.setSize(7);\n shoeFour.setItemName(\"Shoe\");\n itemRepository.save(shoeFour);\n\n Item accessoryFour = new Item();\n accessoryFour.setCategory(accessories);\n accessoryFour.setColor(\"green\");\n accessoryFour.setFabricMaterial(\"\");\n accessoryFour.setSize(7);\n accessoryFour.setItemName(\"Shirt\");\n itemRepository.save(accessoryFour);\n\n\n\n\n\n /**\n * Here is where the items start for Outfit 5\n * */\n Item topFive = new Item();\n topFive.setCategory(tops);\n topFive.setColor(\"red\");\n topFive.setFabricMaterial(\"cotton\");\n topFive.setSize(7);\n topFive.setItemName(\"Shirt\");\n itemRepository.save(topFive);\n\n Item bottomFive = new Item();\n bottomFive.setCategory(bottoms);\n bottomFive.setColor(\"green\");\n bottomFive.setFabricMaterial(\"cotton\");\n bottomFive.setSize(31);\n bottomFive.setItemName(\"Jeans\");\n itemRepository.save(bottomFive);\n\n Item shoeFive = new Item();\n shoeFive.setCategory(shoes);\n shoeFive.setColor(\"green\");\n shoeFive.setFabricMaterial(\"\");\n shoeFive.setSize(7);\n shoeFive.setItemName(\"Shoe\");\n itemRepository.save(shoeFive);\n\n Item accessoriesFive = new Item();\n accessoriesFive.setCategory(accessories);\n accessoriesFive.setColor(\"green\");\n accessoriesFive.setFabricMaterial(\"\");\n accessoriesFive.setSize(7);\n accessoriesFive.setItemName(\"Shirt\");\n itemRepository.save(accessoriesFive);\n }", "public void createRoom(int len, int leftWid, int rightWid) {\n switch (facing) {\n case \"Up\":\n addUpBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Down\":\n addDownBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Left\":\n addLeftBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n case \"Right\":\n addRightBlock(position, Tileset.FLOOR, len, leftWid, rightWid);\n break;\n default:\n System.out.println(\"The wizard loses his direction!\");\n\n }\n }", "public void addDescription(String description) {\n\t\tthis.description = description;\n\t}", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}", "@Test\n public void testFindByDescription() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add item\n\n String name = \"task1\";\n String desc = \"desc1\";\n String create = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name, desc, create, yes});\n new StartUI(input1).init(tracker);\n\n // find item\n\n String action2 = \"5\";\n\n Input input2 = new StubInput(new String[]{action2, desc, yes});\n new StartUI(input2).init(tracker);\n\n }", "private boolean finalizeItemCreation() {\n String itemName = nameField.getText().toString();\n\n // Names must be unique, check to see if it exists\n if(database.checkItemInDB(itemName))\n return false;\n\n // Process Item contents\n item.set_ITEM_NAME(itemName);\n item.set_ITEM_DESC(descField.getText().toString());\n item.set_ITEM_ACCESS(datetime);\n item.set_ITEM_CREATED(datetime);\n item.set_ITEM_VIEW_CNT(0);\n\n boolean success = database.addNewItemToDB(item);\n return success;\n }", "Builder addDescription(Text value);", "public Item(String itemName, String itemDescription){\n this.itemName = itemName;\n this.itemDescription = itemDescription;\n}", "public static void main(String[] args) {\n\n Room woods = new Room(\"Woods\");\n woods.setStory(\"You are a ferocious wolf, hungry, and tired after a long excursion \" +\n \"out in the deep dark woods. You have just heard some rumors that there are three little \" +\n \"pigs who have recently done some construction in the neighborhood…\");\n woods.setDescription(\"These woods are dark and scary.\");\n\n Room house1 = new Room (\"The Straw House\");\n house1.setStory(\"You’ve trekked out of the woods and followed the rocky dirt road until you\" +\n \" find a neighborhood full of questionably constructed straw houses. Your nose twitches \" +\n \"and you realize the one right in front of you contains some tasty bacon named Billy\");\n house1.setDescription(\"This is the site of the straw house.\");\n\n Room house2 = new Room(\"The Stick House\");\n house2.setStory(\"You decide to look for some more food and continue on to the next neighborhood,\" +\n \" filled with stick houses. You sniff the air and know immediately that the house to your left\" +\n \"houses Reginald -- a chunky pig\");\n house2.setDescription(\"Here is the site of a stick house.\");\n house2.setAccessible(false);// must set accessible again after the first pig is eaten\n\n Room house3 = new Room(\"The Brick House\");\n house3.setStory(\"You decide to look for some more food and continue on to the next neighborhood, filled with \" +\n \"brick houses. You sniff the air and have a good feeling about a house up ahead, which is made of bricks \" +\n \"and has a lovely skylight.\");\n house3.setDescription(\"Here is the site of the brick house.\");\n house3.setAccessible(false);// must set accessible again after the second pig is eaten\n\n Room house3Interior = new Room(\"Inside the brick house.\");\n house3Interior.setStory(\"Aha! Here is the delicious pig -- Spike! Your stomach is rumbling . . . \");\n house3Interior.setDescription(\"This is a nice house made for a pig. Above the fireplace is a framed photo eat \" +\n \"of the pig who lives here and his two brothers.\");\n house3Interior.setAccessible(false);// must set accessible again after the window is broken\n\n Room woods2 = new Room(\"More Woods\");\n woods2.setStory(\"You're feeling pretty good now, having gobbled up some pigs and successfully stopped your stomach from growling.\" +\n \"You walk out of the pig neighborhood and back towards the forest. \" +\n \"But you have a feeling that you're not out of the woods yet-- literally. There's a pig cop here, and if you don't get out of here fast, \" +\n \"you might find yourself in trouble again.\");\n woods2.setDescription(\"A dark and ominous forest.\");\n woods2.setAccessible(false); // must set accessible again after the third pig is eaten\n\n Room river = new Room (\"River shore\");\n river.setStory(\"You've run from the pig cop into another section of woods, but there's a wide rushing river in front of you. Surely you won't be able \" +\n \"to cross it without some sort of bridge . . .\");\n river.setDescription(\"A river cuts through the forest, rushing by quickly.\" );\n\n Room home = new Room(\"Home\");\n home.setStory(\"You're home! After a long and harrowing trip through the woods and a neighborhood full of pigs, you've managed to evade the cops\" +\n \"and arrive home. Your family cheers when they see you and you swear to never trek into the woods without some extra provisions\" +\n \"ever again.\" );\n home.setDescription(\"\");\n home.setAccessible(false); //must set accessible again after the river is crossed\n\n //END OF GAME\n //now possible to add another story...\n\n\n //Characters and their related actions\n\n Character owl = new Character(\"Owl\", \"A wise elderly owl who might have some helpful advice\", null);\n owl.setFirstDialogue(\"I'm an owl, hoot hoot.\");\n owl.setGeneralGreeting(\"Hello again. Hoot hoot!\");\n owl.populateDialogueByTopics(\"advice\", \"That straw house over there looks pretty flimsy. Even a slight breeze could knock it down!\" +\n \"Hoot hoot!\");\n owl.populateDialogueByTopics(\"owl things\", \"I eat mice. Hoot hoot!\");\n owl.populateDialogueByTopics(\"the forest\", \"It sure is dark and scary in here. Hoot hoot!\");\n\n Character pig1 = new Character(\"Billy\", \"A fat, delicious-looking pig\", null);\n pig1.setFirstDialogue(\"Hi, I'm Billy, the pig! You're not a wolf, are you?\");\n pig1.setGeneralGreeting(\"It's Billy the pig again!\");\n pig1.populateDialogueByTopics(\"new house\", \"I've just built a new house out of straw! I think it looks great.\");\n// pig1.setIsEatable(true);\n\n Character pig2 = new Character(\"Reginald\", \"A fat, delicious-looking pig\", null);\n pig2.setFirstDialogue(\"Hi, I'm Reginald, the pig! Have you heard from my brothers?\");\n pig2.setGeneralGreeting(\"It's Reginald again. I'm a little worried about my brothers.\");\n pig2.populateDialogueByTopics(\"new house\", \"I just built a house out of sticks. I bet it can withstand anything!\");\n// pig2.setIsEatable(true);\n\n Character pig3 = new Character(\"Spike\", \"A fat, delicious-looking pig\", null);\n pig3.setFirstDialogue(\"What's up? I'm Spike, the pig! Have you seen a wolf around here? I think one is prowling around . . .\");\n pig3.setGeneralGreeting(\"It's Reginald again. You should stay away, there's a wolf on the loose!\");\n pig3.populateDialogueByTopics(\"the wolf\", \"I think my brothers were eaten by a wolf! Thankfully I \" +\n \"have my strong brick house to protect me.\");\n pig3.setIsEatable(true);\n\n Character cop = new Character(\"Officer Pig\", \"A pig cop looking to find the wolf who ate his friends\", null);\n cop.setFirstDialogue(\"I'm Officer Pig. Hey! You look like the wolf who ate my friends!\");\n cop.setGeneralGreeting(\"I'm Officer Pig.\");\n cop.populateDialogueByTopics(\"wolf\", \"A wolf has been terrorizing the neighborhood. And you look quite a lot like a wolf . . .\");\n\n //Items that are spread throughout the game + what can happen to them\n\n Item house1Item = new Item(\"straw house\", \"a flimsy straw house\", null);\n house1Item.setPickUpAble(false);\n Item house2Item = new Item(\"stick house\", \"a slightly sturdier stick house\", null);\n house2Item.setPickUpAble(false);\n Item house3Item = new Item(\"brick house\", \"a strong, well-built brick house\", null);\n house3Item.setPickUpAble(false);\n\n Item leafBlower = new Item(\"leaf blower\", \"a gardening tool that generates a lot of wind\", null);\n Item brick = new Item(\"brick\", \"looks like a leftover brick from building a house\", null);\n Item window = new Item (\"window\", \"a nice skylight on the roof of the brick house\", null);\n window.setPickUpAble(false);\n Item rock = new Item(\"rock\", \"a flat gray rock\", null);\n Item vine = new Item(\"vine\", \"a long green vine suspended from a tree branch\", null);\n vine.setPickUpAble(false);\n\n //Where the items are placed in the game\n woods.addCharacter(owl);\n house1.addCharacter(pig1);\n house1.addItemToRoom(house1Item);\n house2.addCharacter(pig2);\n house2.addItemToRoom(leafBlower);\n house2.addItemToRoom(house2Item);\n house3.addItemToRoom(brick);\n house3.addItemToRoom(window);\n house3.addItemToRoom(house3Item);\n house3Interior.addCharacter(pig3);\n woods2.addCharacter(cop);\n river.addItemToRoom(rock);\n river.addItemToRoom(vine);\n\n //What directions the user can move throughout the game\n //Order of directions : N , S, E, W, in, out\n woods.setConnections(new Room[] {null, null, house1, null, null, null});\n house1.setConnections(new Room[] {null, house2, null, woods, null, null});\n house2.setConnections(new Room[] {house1, null, house3, null, null, null});\n house3.setConnections(new Room[] {null, null, null, house2, house3Interior, null});\n house3Interior.setConnections(new Room[] {null, null, null, null, null, house3});\n woods2.setConnections(new Room[] {house3, null, null, null, null, null});\n //river\n //home\n\n //Commands possible\n ArrayList<String> commands = new ArrayList<>(List.of(\"go\", \"show inventory\", \"pick up\", \"drop\", \"open\", \"eat\", \"talk\"));\n //Existing rooms in game\n ArrayList<Room> rooms = new ArrayList<>((List.of(woods, house1, house2, house3, house3Interior, woods2, river, home)));\n threeLittlePigs = new TextAdventure(\"Three Little Pigs\", commands, rooms, woods);\n\n //Item + item interactions possible\n threeLittlePigs.addInteraction(leafBlower, house1Item, () ->{\n house1.removeItemFromRoom(house1Item);\n house2.setAccessible(true);\n threeLittlePigs.addPoints(10);\n pig1.setIsEatable(true);\n// System.out.println(\"You have destroyed the Straw House.\");\n return \"You have destroyed the Straw House.\";\n\n });\n threeLittlePigs.addInteraction(leafBlower, house2Item, () ->{\n house2.removeItemFromRoom(house2Item);\n house3.setAccessible(true);\n threeLittlePigs.addPoints(10);\n pig2.setIsEatable(true);\n// System.out.println(\"You have destroyed the Stick House.\");\n return \"You have destroyed the Stick House\";\n });\n threeLittlePigs.addInteraction(brick, window, () ->{\n house3Interior.setAccessible(true);\n woods2.setAccessible(true);\n river.setAccessible(true);\n threeLittlePigs.getCurrentRoom().removeItemFromRoom(window);\n threeLittlePigs.getCurrentRoom().removeItemFromRoom(brick);\n house3Interior.addItemToRoom(brick);\n// System.out.println(\"You broke the window with the brick!\");\n return \"You broke the window with the brick!\";\n });\n threeLittlePigs.addInteraction(vine, rock, () -> {\n river.setAccessible(false);\n home.setAccessible(true);\n// System.out.println(\"You move the rock so that you can reach the vine and you swing across the river! The \" +\n// \"vine snaps just as you hit the other shore. You walk forwards from the shore and see a familiar neighborhood. \" +\n// \"Congratulations, you've made it home!\");\n threeLittlePigs.moveUserTo(home);\n return \"You move the rock so that you can reach the vine and you swing across the river! The \" +\n \"vine snaps just as you hit the other shore. You walk forwards from the shore and see a familiar neighborhood. \" +\n \"Congratulations, you've made it home!\";\n });\n\n //OUTLINE FOR LITTLE RED RIDING HOOD TEXT ADVENTURE\n\n Room woods3 = new Room(\"More Woods\");\n woods3.setStory(\"Congrats! You made it through a day of pig-eating and law-evading! After a good nights rest you are ready to\" +\n \" venture back out into the woods and try your luck at finding breakfast. You've recently heard that Grandma Riding-Hood\" +\n \"has fallen ill...Perhaps this is a good opportunity...\");\n woods3.setDescription(\"A dark and ominous forest.\");\n woods2.setAccessible(false); //is this needed?\n\n Room clearing = new Room(\"Clearing\");\n clearing.setStory(\"You heard whistling so you followed the noise which led you to a clearing in the woods where a wee girl in a\" +\n \"red-hooded poncho cape was bending over to pick flowers. To her left is a basket filled with muffins.\");\n clearing.setDescription(\"A sunny clearing in the woods\");\n clearing.setAccessible(false); //is this needed?\n\n Room grandmaHouse = new Room(\"Grandma's House\");\n grandmaHouse.setStory(\"You trot along the path for a while until you get to a wee cabin on a hill. \" +\n \"You smell a human inside!!\");\n grandmaHouse.setDescription(\"A cabin on a hill\");\n grandmaHouse.setAccessible(false); //Unlock once you have 'gotten directions' from lil Red\n\n Room insideGhouse = new Room(\"Inside Grandma's House\");\n insideGhouse.setStory(\"Poor Grandma lying asleep in the bed, she looks very ill, and you are very hungry...\");\n insideGhouse.setDescription(\"A rustic cabin with a huge, four poster bed and many quilts\");\n insideGhouse.setAccessible(false);\n\n Room inBed = new Room(\"Lying in Bed\");\n inBed.setStory(\"After eating Grandma and disguising yourself with her clothes, you decide to take a wee nap before lil Red arrives...\");\n inBed.setDescription(\"Lying amongst the quilts in Grandma's bed\");\n inBed.setAccessible(false); //ONLY UNLOCK ONCE GRANDMA IS EATEN\n\n Room woods4 = new Room(\"More Woods\");\n woods4.setStory(\"Congrats! You feel very full after eating so much today, perhaps its time to return home and get a good nights sleep\");\n woods4.setDescription(\"A dark and ominous forest.\");\n woods4.setAccessible(false); ////ONLY UNLOCK ONCE GRANDMA and lil Red are eaten\n\n //Now make it possible to go back to the original Room -- \"Home??\"\n\n }", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "public static void createItem(String inputCommand) {\r\n\t\tString[] value = inputCommand.split(\" \");\r\n\t\tif(value.length == 4 && \"create\".equalsIgnoreCase(value[0])) {\r\n\t\t\tInventory inventory = new Inventory();\r\n\t\t\tinventory.setItemName(value[1]);\r\n\t\t\tinventory.setItemCostPrice(Double.parseDouble(value[2]));\r\n\t\t\tinventory.setItemSellPrice(Double.parseDouble(value[3]));\r\n\t\t\tinventoryList.put(value[1], inventory);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Entered wrong input command\");\r\n\t\t}\r\n\t}", "private void makeDescription() {\n List switchInfo = InteractDB.getTheList(InteractDB.getFromDB(\"SwitchInfo\", idSwitch.toString()));\n\n DescriptionGen descr = new DescriptionGen(switchInfo);\n description = descr.getDescription();\n }", "@Override\r\n\tpublic Room buildRoom(final XMLTag piece, final Map<String,Object> defined, final Exit[] exits, final int direction) throws CMException\r\n\t{\r\n\t\taddDefinition(\"DIRECTION\",CMLib.directions().getDirectionName(direction).toLowerCase(),defined);\r\n\r\n\t\tfinal String classID = findStringNow(\"class\",piece,defined);\r\n\t\tfinal Room R = CMClass.getLocale(classID);\r\n\t\tif(R == null)\r\n\t\t\tthrow new CMException(\"Unable to build room on classID '\"+classID+\"', Data: \"+CMParms.toKeyValueSlashListString(piece.parms())+\":\"+CMStrings.limit(piece.value(),100));\r\n\t\taddDefinition(\"ROOM_CLASS\",classID,defined);\r\n\t\tfinal List<String> ignoreStats=new XArrayList<String>(new String[]{\"CLASS\",\"DISPLAY\",\"DESCRIPTION\"});\r\n\t\tfillOutRequiredStatCodeSafe(R, ignoreStats, \"ROOM_\", \"TITLE\", \"DISPLAY\", piece, defined);\r\n\t\tfillOutRequiredStatCodeSafe(R, ignoreStats, \"ROOM_\", \"DESCRIPTION\", \"DESCRIPTION\", piece, defined);\r\n\t\tfillOutCopyCodes(R, ignoreStats, \"ROOM_\", piece, defined);\r\n\t\tfillOutStatCodes(R, ignoreStats, \"ROOM_\", piece, defined);\r\n\t\tignoreStats.addAll(Arrays.asList(R.getStatCodes()));\r\n\t\tfillOutStatCodes(R.basePhyStats(),ignoreStats,\"ROOM_\",piece,defined);\r\n\t\tfinal List<MOB> mV = findMobs(piece,defined);\r\n\t\tfor(int i=0;i<mV.size();i++)\r\n\t\t{\r\n\t\t\tfinal MOB M=mV.get(i);\r\n\t\t\tM.setSavable(true);\r\n\t\t\tM.bringToLife(R,true);\r\n\t\t}\r\n\t\tfinal List<Item> iV = findItems(piece,defined);\r\n\t\tfor(int i=0;i<iV.size();i++)\r\n\t\t{\r\n\t\t\tfinal Item I=iV.get(i);\r\n\t\t\tR.addItem(I);\r\n\t\t\tI.setSavable(true);\r\n\t\t\tI.setExpirationDate(0);\r\n\t\t}\r\n\t\tfinal List<Ability> aV = findAffects(R,piece,defined,null);\r\n\t\tfor(int i=0;i<aV.size();i++)\r\n\t\t{\r\n\t\t\tfinal Ability A=aV.get(i);\r\n\t\t\tA.setSavable(true);\r\n\t\t\tR.addNonUninvokableEffect(A);\r\n\t\t}\r\n\t\tfinal List<Behavior> bV = findBehaviors(R,piece,defined);\r\n\t\tfor(int i=0;i<bV.size();i++)\r\n\t\t{\r\n\t\t\tfinal Behavior B=bV.get(i);\r\n\t\t\tB.setSavable(true);\r\n\t\t\tR.addBehavior(B);\r\n\t\t}\r\n\t\tfor(int dir=0;dir<Directions.NUM_DIRECTIONS();dir++)\r\n\t\t{\r\n\t\t\tExit E=exits[dir];\r\n\t\t\tif((E==null)&&(defined.containsKey(\"ROOMLINK_\"+CMLib.directions().getDirectionChar(dir).toUpperCase())))\r\n\t\t\t{\r\n\t\t\t\tdefined.put(\"ROOMLINK_DIR\",CMLib.directions().getDirectionChar(dir).toUpperCase());\r\n\t\t\t\tfinal Exit E2=findExit(R,piece, defined);\r\n\t\t\t\tif(E2!=null)\r\n\t\t\t\t\tE=E2;\r\n\t\t\t\tdefined.remove(\"ROOMLINK_DIR\");\r\n\t\t\t\tif(CMSecurity.isDebugging(CMSecurity.DbgFlag.MUDPERCOLATOR))\r\n\t\t\t\t\tLog.debugOut(\"MUDPercolator\",\"EXIT:NEW:\"+((E==null)?\"null\":E.ID())+\":DIR=\"+CMLib.directions().getDirectionChar(dir).toUpperCase()+\":ROOM=\"+R.getStat(\"DISPLAY\"));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\tif((CMSecurity.isDebugging(CMSecurity.DbgFlag.MUDPERCOLATOR))\r\n\t\t\t&&defined.containsKey(\"ROOMLINK_\"+CMLib.directions().getDirectionChar(dir).toUpperCase()))\r\n\t\t\t\tLog.debugOut(\"MUDPercolator\",\"EXIT:OLD:\"+((E==null)?\"null\":E.ID())+\":DIR=\"+CMLib.directions().getDirectionChar(dir).toUpperCase()+\":ROOM=\"+R.getStat(\"DISPLAY\"));\r\n\t\t\tR.setRawExit(dir, E);\r\n\t\t\tR.startItemRejuv();\r\n\t\t}\r\n\t\treturn R;\r\n\t}", "public InventoryItem addInventoryItem(int charId, String name, String desc) {\n\t\tSQLiteDatabase database = getWritableDatabase();\n\n\t\tContentValues gamevals = new ContentValues();\n\t\tgamevals.put(\"name\", name);\n\t\tgamevals.put(\"description\", desc);\n\t\tgamevals.put(\"character_id\", charId);\n\n\t\tlong rowid = database.insert(\"inventory_item\", null, gamevals);\n\n\t\tString[] args = new String[] { \"\" + rowid };\n\t\tCursor c = database.rawQuery(\n\t\t\t\t\"SELECT * FROM inventory_item WHERE inventory_item.ROWID =?\",\n\t\t\t\targs);\n\t\tc.moveToFirst();\n\n\t\treturn new InventoryItem(\n\t\t\t\tc.getInt(c.getColumnIndex(\"_id\")), c.getString(c\n\t\t\t\t\t\t.getColumnIndex(\"name\")), c.getString(c\n\t\t\t\t\t\t.getColumnIndex(\"description\")));\n\t}", "@Override\r\n\tpublic void creerEnchere(String desc, String dl) {\n\t\t\r\n\t}", "private void addDeviceItem() throws SQLException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry{\r\n\t\t\tnameDevice = edtNameDevice.getText().toString().trim();\r\n\t\t\tportDevice = Integer.parseInt(edtPortDevice.getText().toString().trim());\r\n\t\t\troomID = getIntent().getExtras().getInt(\"room_id\");\r\n\t\t\t\r\n\t\t\tDeviceItem item = new DeviceItem(roomID, nameDevice, typeDevice, portDevice, statusDevice);\r\n\t\t\tDeviceItemController.getInstance(AddDeviceItemActivity.this).createDeviceItem(item);\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\tToast.makeText(AddDeviceItemActivity.this, \"Add device item error. Please verify your device infomations!\", Toast.LENGTH_SHORT).show();\r\n\t\t}\r\n\t}", "public void createRoom(Rect room) {\n for(int x = room.x1 + 1; x < room.x2; x++) {\n for(int y = room.y1 + 1; y < room.y2; y++ ) {\n dungeon.map[x][y].blocked = false;\n dungeon.map[x][y].blockSight = false;\n }\n }\n }", "public void setBasicNewGameWorld()\r\n\t{\r\n\t\tlistCharacter = new ArrayList<Character>();\r\n\t\tlistRelationship = new ArrayList<Relationship>();\r\n\t\tlistLocation = new ArrayList<Location>();\r\n\t\t\r\n\t\t//Location;\r\n\t\t\r\n\t\tLocation newLocationCity = new Location();\r\n\t\tnewLocationCity.setToGenericCity();\r\n\t\tLocation newLocationDungeon = new Location();\r\n\t\tnewLocationDungeon.setToGenericDungeon();\r\n\t\tLocation newLocationForest = new Location();\r\n\t\tnewLocationForest.setToGenericForest();\r\n\t\tLocation newLocationJail = new Location();\r\n\t\tnewLocationJail.setToGenericJail();\r\n\t\tLocation newLocationPalace = new Location();\r\n\t\tnewLocationPalace.setToGenericPalace();\r\n\t\t\r\n\t\tlistLocation.add(newLocationCity);\r\n\t\tlistLocation.add(newLocationDungeon);\r\n\t\tlistLocation.add(newLocationForest);\r\n\t\tlistLocation.add(newLocationJail);\r\n\t\tlistLocation.add(newLocationPalace);\r\n\t\t\r\n\t\t\r\n\t\t//Item\r\n\t\tItem newItem = new Item();\r\n\t\t\r\n\t\tString[] type =\t\tnew String[]\t{\"luxury\"};\r\n\t\tString[] function = new String[]\t{\"object\"};\t\r\n\t\tString[] property = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900101,\"diamond\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationPalace.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"weapon\"};\r\n\t\tfunction = new String[]\t{\"equipment\"};\t\r\n\t\tproperty = new String[]\t{\"weapon\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(500101,\"dagger\", type, function, \"null\", property, 1, false);\t\t\r\n\t\tnewLocationJail.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\ttype =\t\tnew String[]\t{\"quest\"};\r\n\t\tfunction = new String[]\t{\"object\"};\t\r\n\t\tproperty = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900201,\"treasure_map\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationDungeon.addOrUpdateItem(newItem);\r\n\r\n\t\t\r\n\t\t////// Add very generic item (10+ items of same name)\r\n\t\t////// These item start ID at 100000\r\n\t\t\r\n\t\t//Add 1 berry\r\n\t\t//100000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"berry\"};\r\n\t\tnewItem.setNewItem(100101,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100103,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t*/\r\n\r\n\t\t\r\n\t\t//Add 2 poison_plant\r\n\t\t//101000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem.setNewItem(100201,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100202,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\r\n\t\t//player\r\n\t\tCharacter newChar = new Character(\"player\", 1, true,\"city\", 0, false);\r\n\t\tnewChar.setIsPlayer(true);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//UNIQUE NPC\r\n\t\tnewChar = new Character(\"mob_NPC_1\", 15, true,\"city\", 0, false);\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\t\t\r\n\t\tnewChar = new Character(\"king\", 20, true,\"palace\", 3, true);\r\n\t\tnewChar.addOccupation(\"king\");\r\n\t\tnewChar.addOccupation(\"noble\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\r\n\t\t//Mob character\r\n\t\tnewChar = new Character(\"soldier1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// REMOVE to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"soldier2\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"soldier3\", 20, true,\"palace\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//listLocation.add(newLocationCity);\r\n\t\t//listLocation.add(newLocationDungeon);\r\n\t\t//listLocation.add(newLocationForest);\r\n\t\t//listLocation.add(newLocationJail);\r\n\t\t//listLocation.add(newLocationPalace);\r\n\t\t\r\n\t\tnewChar = new Character(\"doctor1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addSkill(\"heal\");\r\n\t\tnewChar.addOccupation(\"doctor\");\r\n\t\tlistCharacter.add(newChar);\t\r\n\t\tnewChar = new Character(\"blacksmith1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"blacksmith\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"thief1\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"thief\");\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"unlock\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(300101,\"lockpick\", type, function, \"thief1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// Remove to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"messenger1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"messenger\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\tnewChar = new Character(\"miner1\", 20, true,\"dungeon\", 1, true);\r\n\t\tnewChar.addOccupation(\"miner\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"lumberjack1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"lumberjack\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewChar = new Character(\"scout1\", 20, true,\"forest\", 2, true);\r\n\t\tnewChar.addOccupation(\"scout\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"farmer1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"farmer\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"merchant1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addOccupation(\"merchant\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\t// Merchant Item\r\n\t\t//NPC item start at 50000\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200101,\"potion_poison\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"healing\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200201,\"potion_heal\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"cure_poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200301,\"antidote\", type, function, \"merchant1\", property, 1, false);\t\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\t//add merchant to List\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Relation\r\n\t\tRelationship newRelation = new Relationship();\r\n\t\tnewRelation.setRelationship(\"merchant1\", \"soldier1\", \"friend\");\r\n\t\tlistRelationship.add(newRelation);\r\n\t\t\r\n\t\t//\r\n\t\r\n\t}", "public Room createRoom(Room room);", "public Builder description(String description) {\r\n this.description = description;\r\n return this;\r\n }", "public ItemStack createItem(ItemType type, int damage,List<Text> lore);", "public @NotNull Item newItem(@NotNull @Size(min = 1, max = 255) final String name,\r\n\t\t\t@NotNull @Size(min = 1, max = 255) final String description, @NotNull final Category category);", "private void createGroup(String groupName, String description, List<String> tags) {\n trCreateNewGroup.setGroupName(groupName);\n trCreateNewGroup.setOwner(user);\n trCreateNewGroup.setDescription(description);\n trCreateNewGroup.setTags(tags);\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-d\");\n Date date = new Date();\n String strData = dateFormat.format(date);\n\n trCreateNewGroup.setCreationDate(DateTime.Builder.buildDateString(strData));\n\n try {\n trCreateNewGroup.execute();\n } catch (GroupAlreadyExistingException e) {\n Toast toast = Toast.makeText(this, getString(R.string.group_already_created), Toast.LENGTH_LONG);\n toast.show();\n }\n\n updateMedalProgress(UserAchievement.FOUNDER);\n }", "void setdescription(String description) {\n\t\tthis.description = description;\n\t}", "public String getDesc() {\n ListIterator<Item> roomContents = contents.listIterator();\n String contentString = \"\";\n while (roomContents.hasNext()) {\n contentString\n = contentString + (roomContents.next()).getDesc() + \" \";\n }\n\n return description + '\\n' + '\\n'\n + \"Room Contents: \" + contentString + '\\n';\n }", "public static String addRoom(ArrayList<Room> roomList) {\n System.out.println(\"Add a room:\");\n String name = getRoomName();\n System.out.println(\"Room capacity?\");\n int capacity = keyboard.nextInt();\n System.out.println(\"Room buliding?\");\n String building1 = keyboard.next();\n System.out.println(\"Room location?\");\n String location1 = keyboard.next();\n Room newRoom = new Room(name, capacity, building1, location1);\n roomList.add(newRoom);\n if (capacity == 0)\n System.out.println(\"\");\n return \"Room '\" + newRoom.getName() + \"' added successfully!\";\n\n }", "public MotelRoom createRoom(String type, Iterable<String> amenities)\n {\n MotelRoom room = null;\n if(type.equals(\"regular\"))\n {\n room = new RegularRoom();\n }\n else if(type.equals(\"deluxe\"))\n {\n room = new DeluxeRoom();\n }\n else if(type.equals(\"suite\"))\n {\n room = new SuiteRoom();\n }\n else\n {\n // throw exception?\n return room;\n }\n \n for(String amenity : amenities)\n {\n room = addAmenity(room, amenity);\n }\n \n return room;\n }", "public static void main(String[] ar){\n Room living = new Room(\"Living\");\n Room kitchen = new Room(\"Kitchen\");\n Room bathroom = new Room(\"Bathroom\");\n Room garage = new Room(\"Garage\");\n \n Room bedroom1 = new Room(\"Bedroom1\");\n Room bedroom2 = new Room(\"Bedroom2\");\n Room bathroom1stf=new Room(\"Bathroom\");\n \n \n //Living\n living.addDevice(new Device(\"Aire acondicionado\", \"LG\", \"pm07sp\", true));\n living.addDevice(new Device(\"Luces\", \"Philips\", \"Hue\", true));\n //Kitchen\n kitchen.addDevice(new Device(\"luces\",\"Ahorradoras\",\"34234\", true));\n //Bathroom\n bathroom.addDevice(new Device(\"luce\",\"simple\",\"354676\", true));\n //Garage\n garage.addDevice(new Device(\"lightbulb\",\"the best\",\"X3000\",true));\n \n //Bedroom 1\n bedroom1.addDevice(new Device(\"Aire acondicionado\", \"Mabe\" , \"Mmt12cdbs3\", true));\n bedroom1.addDevice(new Device(\"Luces\",\"Philips\",\"EcoVantage\",true));\n \n //Bedroom 2\n bedroom2.addDevice(new Device(\"Aire acondicionado\", \"Hisense\" , \"AS-12CR5FVETD/1TR\", true));\n bedroom2.addDevice(new Device(\"Luces\",\"Ho Iluminacion\",\"A19 60W Claro\",true));\n \n //baño primer piso\n bathroom1stf.addDevice(new Device(\"Luces\",\"Alefco\",\"lw100\",true));\n \n \n \n Level groundFloor = new Level(\"Ground Floor\");\n Level firstFloor = new Level(\"First Floor\");\n \n \n groundFloor.addRoom(living);\n groundFloor.addRoom(kitchen);\n groundFloor.addRoom(bathroom);\n groundFloor.addRoom(garage);\n \n firstFloor.addRoom(bedroom1);\n firstFloor.addRoom(bedroom2);\n firstFloor.addRoom(bathroom1stf);\n \n\n House myhouse = new House(\"MyHome\");\n \n myhouse.addLevel(groundFloor);\n myhouse.addLevel(firstFloor);\n \n System.out.println(myhouse);\n \n \n /*\n room.addDevice(new Device(\"Reynaldo\", \"LG\", \"123456\", true));\n room.addDevice(new Device(\"Andrea\", \"Nokia\", \"Lumia-520\", true));\n room.addDevice(new Device(\"Karina\",\"Panasonic\",\"465464\", true));\n room.addDevice(new Device(\"Martin\", \"ZTE\", \"V7\",true));\n room.addDevice(new Device(\"Antonio\",\"Samsung\",\"J5\",true));\n room.addDevice(new Device(\"Roberto\",\"HP\",\"SpectreX360\",true));\n room.addDevice(new Device(\"Gabriel\",\"Linu\",\"Ilium_S106\",true));\n room.addDevice(new Device (\"Limberth\",\"LG\", \"lg-206\",true));\n room.addDevice(new Device(\"jesus\", \"hp\",\"2997\", true));\n room.addDevice(new Device(\"Rich\", \"Asus\",\"Zenfone_4_Max\",true));\n room.addDevice(new Device(\"Adrian\",\"Apple\",\"SE\",true));\n room.addDevice(new Device (\"Jonatan\",\"samsung\",\"J5\",true));\n room.addDevice(new Device(\"Jessica\", \"Huaweii\", \"P9LITE\", true));\n */\n \n \n \n \n \n }", "public Data(String itemId, String itemDescription) {\n this.itemId = itemId;\n this.itemDescription = itemDescription;\n }", "protected abstract void makeItem();", "public void CreateProgram(int id, String name, String title, String description) throws SQLException {\n\t\ttry {\n\t\t\tString query = \"INSERT INTO program VALUES ('\" + id + \"', '\" + description + \"', '\" + name + \"', '\" + title + \"')\";\n\t\t\tstatement.execute(query); \n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (conex != null) {\n\t\t\t\tconex.close();\n\t\t\t}\n\t\t}\n\t}", "public void addItem(Item item,Room room) {\n\t\troom.addItems(item);\n\t}", "public static void create(String description, int priority) {\n\t\tmodels.Todo todo = new models.Todo(description, priority);\n\t\t\n\t\t//todo.save(); //(Iteration 4)\t\n\n\t\t//Iteration 10\n\t\tif (!todo.validateAndSave()) {\n\t\t\tvalidation.keep();\n\t\t\tadd();\n\t\t}\n\t\t//End 11. \n\t\t\n\t\t//Iteration 6. \n\t\tindex();\n\t}", "public void addDescription(String description) {\n String desc = getDescription();\n if (desc == null) {\n setDescription(description);\n } else {\n setDescription(desc + \" | \" + description);\n }\n }", "public static ItemDefinition itemDef(int i, ItemDefinition itemDef) {\n void var1_1;\n int n;\n switch (itemDef.id) {\n case 19892: {\n itemDef.name = \"Immortal Charm\";\n break;\n }\n case 1654: {\n itemDef.name = \"Necklace of Lightning\";\n itemDef.description = \"A necklace used to deflect some lightning damage.\";\n break;\n }\n case 1655: {\n itemDef.name = \"Necklace of Lightning\";\n itemDef.description = \"A necklace used to deflect some lightning damage.\";\n break;\n }\n case 1609: {\n itemDef.name = \"Stone of Lightning\";\n itemDef.description = \"A stone used to create the Necklace of Lightning.\";\n itemDef.originalModelColors[0] = ItemDef_8.RGB_to_RS2HSB(52, 145, 130);\n itemDef.originalModelColors[1] = ItemDef_8.RGB_to_RS2HSB(52, 145, 130);\n itemDef.originalModelColors[2] = ItemDef_8.RGB_to_RS2HSB(52, 145, 130);\n itemDef.originalModelColors[3] = ItemDef_8.RGB_to_RS2HSB(52, 145, 130);\n break;\n }\n case 746: {\n itemDef.name = \"Sword of Zeus\";\n itemDef.description = \"The famous sword of the God of Lightning Zeus.\";\n itemDef.modelZoom = 2500;\n itemDef.modelRotation1 = 292;\n itemDef.modelRotation2 = 1899;\n break;\n }\n case 747: {\n itemDef.name = \"Sword of Zeus\";\n itemDef.description = \"The famous sword of the God of Lightning Zeus.\";\n itemDef.modelZoom = 2500;\n itemDef.modelRotation1 = 292;\n itemDef.modelRotation2 = 1899;\n itemDef.certTemplateID = 799;\n itemDef.certID = 746;\n itemDef.toNote();\n break;\n }\n case 936: {\n itemDef.name = \"Staff of Zeus\";\n itemDef.description = \"A powerful staff of the God of Lightning.\";\n itemDef.modelOffset1 = -3;\n itemDef.modelOffset2 = 2;\n itemDef.modelZoom = 1874;\n itemDef.modelRotation1 = 292;\n itemDef.modelRotation2 = 1499;\n itemDef.groundModelId = 3;\n itemDef.maleEquipt = 4;\n itemDef.femaleEquipt = 4;\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.stackable = false;\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 937: {\n itemDef.name = \"Staff of Zeus\";\n itemDef.description = \"A powerful staff of the God of Lightning.\";\n itemDef.modelOffset1 = -3;\n itemDef.modelOffset2 = 2;\n itemDef.modelZoom = 1874;\n itemDef.modelRotation1 = 292;\n itemDef.modelRotation2 = 1499;\n itemDef.certTemplateID = 540;\n itemDef.certID = 936;\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 538: {\n itemDef.name = \"Zeus robe bottom\";\n itemDef.maleEquipt = 428;\n itemDef.femaleEquipt = 428;\n break;\n }\n case 539: {\n itemDef.name = \"Zeus robe bottom\";\n itemDef.maleEquipt = 428;\n itemDef.femaleEquipt = 428;\n break;\n }\n case 540: {\n itemDef.copy(799);\n itemDef.groundModelId = 9;\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 14114: {\n itemDef.name = \"Zeus robe top\";\n itemDef.femaleEquipt = 8;\n itemDef.maleEquipt = 8;\n itemDef.groundModelId = 7;\n itemDef.modelZoom = 1150;\n itemDef.anInt188 = 10;\n itemDef.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 14115: {\n itemDef.name = \"Zeus robe top\";\n itemDef.maleEquipt = 8;\n itemDef.femaleEquipt = 8;\n itemDef.groundModelId = 7;\n itemDef.modelZoom = 1150;\n itemDef.anInt188 = 10;\n itemDef.certID = 14114;\n itemDef.certTemplateID = 540;\n itemDef.itemActions = new String[]{null, null, null, null, \"Drop\"};\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 626: {\n itemDef.name = \"Zeus boots\";\n itemDef.maleEquipt = 1;\n itemDef.femaleEquipt = 1;\n itemDef.groundModelId = 2;\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 627: {\n itemDef.name = \"Zeus boots\";\n itemDef.certID = 626;\n itemDef.certTemplateID = 540;\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 628: {\n itemDef.name = \"Zeus wings\";\n itemDef.maleEquipt = 14;\n itemDef.femaleEquipt = 14;\n itemDef.groundModelId = 13;\n itemDef.modelOffset1 = -60;\n itemDef.modelOffset2 = 0;\n itemDef.modelZoom = 1900;\n itemDef.modelRotation1 = 445;\n itemDef.modelRotation2 = 487;\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 629: {\n itemDef.name = \"Zeus wings\";\n itemDef.groundModelId = 185;\n break;\n }\n case 74: {\n itemDef.name = \"Zeus helmet\";\n itemDef.maleEquipt = 40436;\n itemDef.femaleEquipt = 40436;\n itemDef.modelRotation1 = 1500;\n itemDef.modelRotation2 = 600;\n itemDef.modelOffset1 = 1;\n itemDef.modelOffset2 = 0;\n itemDef.modelZoom = 724;\n break;\n }\n case 75: {\n itemDef.name = \"Zeus helmet\";\n itemDef.maleEquipt = 40436;\n itemDef.femaleEquipt = 40436;\n itemDef.groundModelId = 40637;\n itemDef.certID = 74;\n itemDef.certTemplateID = 799;\n itemDef.toNote();\n break;\n }\n case 2902: {\n itemDef.name = \"Zeus gloves\";\n itemDef.groundModelId = 5;\n itemDef.maleEquipt = 6;\n itemDef.femaleEquipt = 6;\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 2903: {\n itemDef.name = \"Zeus gloves\";\n itemDef.groundModelId = 5;\n itemDef.maleEquipt = 6;\n itemDef.femaleEquipt = 6;\n itemDef.certID = 2902;\n itemDef.certTemplateID = 9;\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 19879: {\n itemDef.name = \"Immortal Band\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 22044: {\n itemDef.groundModelId = 46409;\n itemDef.modelZoom = 2750;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset1 = 1;\n itemDef.name = \"$5 Bond\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Claim Credits\";\n itemDef.stackable = false;\n break;\n }\n case 22046: {\n itemDef.groundModelId = 46409;\n itemDef.modelZoom = 2700;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset1 = 1;\n itemDef.name = \"$10 Bond\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Claim Credits\";\n break;\n }\n case 22048: {\n itemDef.groundModelId = 46409;\n itemDef.modelZoom = 2650;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset1 = 1;\n itemDef.name = \"$25 Bond\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Claim Credits\";\n break;\n }\n case 22050: {\n itemDef.groundModelId = 46409;\n itemDef.modelZoom = 2600;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset1 = 1;\n itemDef.name = \"$50 Bond\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Claim Credits\";\n break;\n }\n case 22052: {\n itemDef.groundModelId = 46409;\n itemDef.modelZoom = 2550;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset1 = 1;\n itemDef.name = \"$100 Bond\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Claim Credits\";\n break;\n }\n case 22054: {\n itemDef.groundModelId = 46409;\n itemDef.modelZoom = 2500;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset1 = 1;\n itemDef.name = \"$150 Bond\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Claim Credits\";\n break;\n }\n case 22056: {\n itemDef.groundModelId = 46409;\n itemDef.modelZoom = 2450;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset1 = 1;\n itemDef.name = \"$250 Bond\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Claim Credits\";\n break;\n }\n case 22058: {\n itemDef.groundModelId = 46409;\n itemDef.modelZoom = 2400;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset1 = 1;\n itemDef.name = \"$500 Bond\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Claim Credits\";\n break;\n }\n case 22060: {\n itemDef.groundModelId = 46409;\n itemDef.modelZoom = 2350;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset1 = 1;\n itemDef.name = \"$1000 Bond\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Claim Credits\";\n break;\n }\n case 21183: {\n itemDef.groundModelId = 71001;\n itemDef.maleEquipt = 71002;\n itemDef.femaleEquipt = 71003;\n itemDef.modelZoom = 825;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -8;\n itemDef.modelRotation1 = 380;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Skeletal Full Helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21185: {\n itemDef.groundModelId = 71004;\n itemDef.maleEquipt = 71005;\n itemDef.femaleEquipt = 71006;\n itemDef.modelZoom = 1450;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 12;\n itemDef.modelRotation1 = 425;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Skeletal Platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21187: {\n itemDef.groundModelId = 71007;\n itemDef.maleEquipt = 71008;\n itemDef.femaleEquipt = 71009;\n itemDef.modelZoom = 1660;\n itemDef.modelOffset1 = -5;\n itemDef.modelOffset2 = -3;\n itemDef.modelRotation1 = 515;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Skeletal Platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 19626: {\n itemDef.name = \"Memory Scroll\";\n itemDef.modelZoom = 3170;\n itemDef.modelOffset1 = 6;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 395;\n itemDef.modelRotation2 = 47;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Read\";\n break;\n }\n case 22000: {\n itemDef.groundModelId = 46377;\n itemDef.modelZoom = 625;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 1050;\n itemDef.modelRotation2 = 60;\n itemDef.name = \"Jawbreaker\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Break\";\n itemDef.stackable = true;\n break;\n }\n case 22002: {\n itemDef.groundModelId = 46378;\n itemDef.modelZoom = 1640;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 160;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Empty Basket\";\n itemDef.itemActions = new String[5];\n itemDef.stackable = true;\n break;\n }\n case 22004: {\n itemDef.groundModelId = 46379;\n itemDef.maleEquipt = 46380;\n itemDef.femaleEquipt = 46380;\n itemDef.modelZoom = 916;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset2 = 1;\n itemDef.modelRotation1 = 428;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Pumpkin Head\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 22006: {\n itemDef.groundModelId = 46381;\n itemDef.modelZoom = 880;\n itemDef.modelOffset1 = 2;\n itemDef.modelOffset2 = 1;\n itemDef.modelRotation1 = 440;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Halloween Candy\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Eat\";\n itemDef.stackable = true;\n break;\n }\n case 22008: {\n itemDef.groundModelId = 46382;\n itemDef.modelZoom = 1388;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -3;\n itemDef.modelRotation1 = 521;\n itemDef.modelRotation2 = 50;\n itemDef.name = \"Halloween Candy\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Eat\";\n itemDef.stackable = true;\n break;\n }\n case 22010: {\n itemDef.groundModelId = 46383;\n itemDef.modelZoom = 861;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset2 = 18;\n itemDef.modelRotation1 = 323;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Halloween Candy\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Eat\";\n itemDef.stackable = true;\n break;\n }\n case 22012: {\n itemDef.groundModelId = 46384;\n itemDef.modelZoom = 1195;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 450;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Halloween Candy\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Eat\";\n itemDef.stackable = true;\n break;\n }\n case 22014: {\n itemDef.groundModelId = 46385;\n itemDef.modelZoom = 1481;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset2 = -12;\n itemDef.modelRotation1 = 408;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Halloween Candy\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Eat\";\n itemDef.stackable = true;\n break;\n }\n case 22016: {\n itemDef.groundModelId = 46386;\n itemDef.modelZoom = 1195;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 525;\n itemDef.modelRotation2 = 5;\n itemDef.name = \"Halloween Candy\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Eat\";\n itemDef.stackable = true;\n break;\n }\n case 22018: {\n itemDef.groundModelId = 46387;\n itemDef.modelZoom = 1030;\n itemDef.modelOffset1 = -4;\n itemDef.modelOffset2 = 4;\n itemDef.modelRotation1 = 595;\n itemDef.modelRotation2 = 125;\n itemDef.name = \"Voucher of Good Taste\";\n itemDef.itemActions = new String[5];\n itemDef.stackable = true;\n break;\n }\n case 22020: {\n itemDef.groundModelId = 46388;\n itemDef.modelZoom = 1174;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 7;\n itemDef.modelRotation1 = 401;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Voucher of Bad Taste\";\n itemDef.itemActions = new String[5];\n itemDef.stackable = true;\n break;\n }\n case 22022: {\n itemDef.groundModelId = 46389;\n itemDef.modelZoom = 1950;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 390;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Party Invitation\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Read\";\n itemDef.stackable = false;\n break;\n }\n case 22024: {\n itemDef.groundModelId = 46390;\n itemDef.modelZoom = 1470;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 63;\n itemDef.modelRotation1 = 268;\n itemDef.modelRotation2 = 1964;\n itemDef.name = \"Pumpkin\";\n itemDef.itemActions = new String[5];\n itemDef.stackable = true;\n break;\n }\n case 22026: {\n itemDef.groundModelId = 46391;\n itemDef.modelZoom = 1140;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset2 = 4;\n itemDef.modelRotation1 = 336;\n itemDef.modelRotation2 = 131;\n itemDef.name = \"Halloween Token Box\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Open\";\n itemDef.stackable = false;\n break;\n }\n case 22028: {\n itemDef.groundModelId = 46392;\n itemDef.modelZoom = 730;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset2 = 2;\n itemDef.modelRotation1 = 358;\n itemDef.modelRotation2 = 1949;\n itemDef.name = \"Halloween Token\";\n itemDef.itemActions = new String[5];\n itemDef.stackable = true;\n break;\n }\n case 22030: {\n itemDef.groundModelId = 46393;\n itemDef.modelZoom = 1390;\n itemDef.modelOffset1 = 4;\n itemDef.modelOffset2 = -10;\n itemDef.modelRotation1 = 191;\n itemDef.modelRotation2 = 76;\n itemDef.name = \"Basket of Candies\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[0] = \"Check\";\n itemDef.stackable = false;\n break;\n }\n case 22032: {\n itemDef.groundModelId = 46394;\n itemDef.maleEquipt = 46395;\n itemDef.femaleEquipt = 46395;\n itemDef.modelZoom = 755;\n itemDef.modelOffset1 = 8;\n itemDef.modelOffset2 = 11;\n itemDef.modelRotation1 = 426;\n itemDef.modelRotation2 = 196;\n itemDef.name = \"Ghost Mask\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 22034: {\n itemDef.groundModelId = 46396;\n itemDef.maleEquipt = 46397;\n itemDef.femaleEquipt = 46397;\n itemDef.modelZoom = 580;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 7;\n itemDef.modelRotation1 = 331;\n itemDef.modelRotation2 = 226;\n itemDef.name = \"Jason Mask\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 22036: {\n itemDef.groundModelId = 46398;\n itemDef.maleEquipt = 46399;\n itemDef.femaleEquipt = 46399;\n itemDef.modelZoom = 700;\n itemDef.modelOffset1 = 2;\n itemDef.modelOffset2 = 6;\n itemDef.modelRotation1 = 396;\n itemDef.modelRotation2 = 160;\n itemDef.name = \"Scream Mask\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 22038: {\n itemDef.groundModelId = 46400;\n itemDef.maleEquipt = 46401;\n itemDef.femaleEquipt = 46401;\n itemDef.modelZoom = 975;\n itemDef.modelOffset1 = 9;\n itemDef.modelOffset2 = 7;\n itemDef.modelRotation1 = 388;\n itemDef.modelRotation2 = 193;\n itemDef.name = \"Halloween Wizard Hat (R)\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 22040: {\n itemDef.groundModelId = 46402;\n itemDef.maleEquipt = 46403;\n itemDef.femaleEquipt = 46403;\n itemDef.modelZoom = 915;\n itemDef.modelOffset1 = 7;\n itemDef.modelOffset2 = 6;\n itemDef.modelRotation1 = 433;\n itemDef.modelRotation2 = 124;\n itemDef.name = \"Halloween Wizard Hat (G)\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 22042: {\n itemDef.groundModelId = 46404;\n itemDef.name = \"Pumpkin Pet\";\n itemDef.modelZoom = 2645;\n itemDef.modelOffset1 = 1;\n itemDef.modelOffset2 = -25;\n itemDef.modelRotation1 = 155;\n itemDef.modelRotation2 = 106;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[3] = \"Summon\";\n itemDef.stackable = false;\n break;\n }\n case 21171: {\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.groundModelId = 72;\n itemDef.maleEquipt = 73;\n itemDef.femaleEquipt = 74;\n itemDef.modelZoom = 1200;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 3;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 135;\n itemDef.name = \"Tyrant Full Helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21173: {\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.groundModelId = 75;\n itemDef.maleEquipt = 76;\n itemDef.femaleEquipt = 77;\n itemDef.modelZoom = 1710;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 595;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Tyrant Platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21175: {\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.groundModelId = 78;\n itemDef.maleEquipt = 79;\n itemDef.femaleEquipt = 80;\n itemDef.modelZoom = 2000;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Tyrant Platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21177: {\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.groundModelId = 81;\n itemDef.maleEquipt = 82;\n itemDef.femaleEquipt = 83;\n itemDef.modelZoom = 760;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 590;\n itemDef.modelRotation2 = 0;\n itemDef.name = \"Tyrant Gloves\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21179: {\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.groundModelId = 84;\n itemDef.maleEquipt = 85;\n itemDef.femaleEquipt = 86;\n itemDef.modelZoom = 635;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 110;\n itemDef.modelRotation2 = 180;\n itemDef.name = \"Tyrant Boots\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21181: {\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.groundModelId = 87;\n itemDef.maleEquipt = 88;\n itemDef.femaleEquipt = 88;\n itemDef.modelZoom = 2070;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 470;\n itemDef.modelRotation2 = 1015;\n itemDef.name = \"Tyrant Cape\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21161: {\n itemDef.groundModelId = 46358;\n itemDef.maleEquipt = 46359;\n itemDef.femaleEquipt = 46359;\n itemDef.name = \"LALA Axe\";\n itemDef.description = \"LALA Axe.\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21153: {\n itemDef.groundModelId = 46356;\n itemDef.name = \"Extreme Donator Sword\";\n itemDef.description = \"A Extreme Donator Sword.\";\n itemDef.maleEquipt = 46357;\n itemDef.femaleEquipt = 46357;\n itemDef.modelZoom = 1785;\n itemDef.modelOffset1 = 2;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 560;\n itemDef.modelRotation2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21010: {\n itemDef.groundModelId = 29216;\n itemDef.name = \"Zeus's Lightning Bolt\";\n itemDef.description = \"The Weapon Of The Gods!\";\n itemDef.maleEquipt = 29217;\n itemDef.femaleEquipt = 29217;\n itemDef.modelZoom = 750;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 3;\n itemDef.modelRotation1 = 488;\n itemDef.modelRotation2 = 600;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = true;\n break;\n }\n case 21001: {\n itemDef.groundModelId = 46336;\n itemDef.name = \"Diablo Sword\";\n itemDef.description = \"A Diablo sword!.\";\n itemDef.maleEquipt = 46337;\n itemDef.femaleEquipt = 46337;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21003: {\n itemDef.groundModelId = 46338;\n itemDef.name = \"Diablo Shield\";\n itemDef.description = \"A Diablo shield!.\";\n itemDef.maleEquipt = 46339;\n itemDef.femaleEquipt = 46339;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 575;\n itemDef.modelRotation2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21005: {\n itemDef.groundModelId = 46340;\n itemDef.name = \"Diablo Bow\";\n itemDef.description = \"A Diablo bow!.\";\n itemDef.maleEquipt = 46341;\n itemDef.femaleEquipt = 46341;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21007: {\n itemDef.groundModelId = 46342;\n itemDef.name = \"Diablo Wings\";\n itemDef.description = \"A Diablo wings!.\";\n itemDef.maleEquipt = 46343;\n itemDef.femaleEquipt = 46343;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 450;\n itemDef.modelRotation2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21009: {\n itemDef.groundModelId = 46344;\n itemDef.name = \"Blood Edge Sword\";\n itemDef.description = \"A Blood's Edge sword!.\";\n itemDef.modelZoom = 1750;\n itemDef.maleEquipt = 46345;\n itemDef.femaleEquipt = 46345;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 1575;\n itemDef.modelRotation2 = 1040;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21011: {\n itemDef.groundModelId = 46346;\n itemDef.name = \"HellSlayer Sword\";\n itemDef.description = \"A HellSlayer sword!.\";\n itemDef.modelZoom = 2550;\n itemDef.maleEquipt = 46347;\n itemDef.femaleEquipt = 46347;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 1630;\n itemDef.modelRotation2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21013: {\n itemDef.groundModelId = 46348;\n itemDef.name = \"Equilibrium Sword [T1]\";\n itemDef.description = \"A Equilibrium sword.\";\n itemDef.modelZoom = 1750;\n itemDef.maleEquipt = 46349;\n itemDef.femaleEquipt = 46349;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 1575;\n itemDef.modelRotation2 = 1040;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21015: {\n itemDef.groundModelId = 46350;\n itemDef.name = \"Equilibrium Shield [T1]\";\n itemDef.description = \"A Equilibrium shield!.\";\n itemDef.modelZoom = 1930;\n itemDef.maleEquipt = 46351;\n itemDef.femaleEquipt = 46351;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 425;\n itemDef.modelRotation2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21017: {\n itemDef.groundModelId = 46352;\n itemDef.name = \"Equilibrium Sword [T2]\";\n itemDef.description = \"A Equilibrium sword.\";\n itemDef.modelZoom = 1750;\n itemDef.maleEquipt = 46353;\n itemDef.femaleEquipt = 46353;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 550;\n itemDef.modelRotation2 = 500;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21019: {\n itemDef.groundModelId = 46354;\n itemDef.name = \"Equilibrium Shield [T2]\";\n itemDef.description = \"A Equilibrium shield!.\";\n itemDef.modelZoom = 1880;\n itemDef.maleEquipt = 46355;\n itemDef.femaleEquipt = 46355;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 550;\n itemDef.modelRotation2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 21151: {\n itemDef.groundModelId = 50025;\n itemDef.name = \"Diablo pet\";\n itemDef.description = \"A Diablo pet!.\";\n itemDef.modelZoom = 9000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[3] = \"Summon\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.stackable = false;\n break;\n }\n case 21152: {\n itemDef.groundModelId = 57393;\n itemDef.name = \"Zeus pet\";\n itemDef.description = \"A Zeus pet!.\";\n itemDef.modelZoom = 3000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[3] = \"Summon\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.stackable = false;\n break;\n }\n case 20191: {\n itemDef.name = \"Phantom helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46327;\n itemDef.maleEquipt = 46328;\n itemDef.femaleEquipt = 46329;\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 1750;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.certID = -1;\n itemDef.certTemplateID = -1;\n break;\n }\n case 20193: {\n itemDef.name = \"Phantom platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46330;\n itemDef.maleEquipt = 46331;\n itemDef.femaleEquipt = 46332;\n itemDef.modelZoom = 1500;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.certID = -1;\n itemDef.certTemplateID = -1;\n break;\n }\n case 20195: {\n itemDef.name = \"Phantom platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46333;\n itemDef.maleEquipt = 46334;\n itemDef.femaleEquipt = 46335;\n itemDef.modelZoom = 1750;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.certID = -1;\n itemDef.certTemplateID = -1;\n break;\n }\n case 20185: {\n itemDef.name = \"Elite full helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46318;\n itemDef.maleEquipt = 46319;\n itemDef.femaleEquipt = 46320;\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 1750;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.certID = -1;\n itemDef.certTemplateID = -1;\n break;\n }\n case 20187: {\n itemDef.name = \"Elite platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46321;\n itemDef.maleEquipt = 46322;\n itemDef.femaleEquipt = 46323;\n itemDef.modelZoom = 1500;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.certID = -1;\n itemDef.certTemplateID = -1;\n break;\n }\n case 20189: {\n itemDef.name = \"Elite platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46324;\n itemDef.maleEquipt = 46325;\n itemDef.femaleEquipt = 46326;\n itemDef.modelZoom = 1750;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.certID = -1;\n itemDef.certTemplateID = -1;\n break;\n }\n case 20197: {\n itemDef.name = \"K'ril Tsutsaroth Cape\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46316;\n itemDef.maleEquipt = 46317;\n itemDef.femaleEquipt = 46317;\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.certID = -1;\n itemDef.certTemplateID = -1;\n break;\n }\n case 20155: {\n itemDef.name = \"Elite full helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46280;\n itemDef.maleEquipt = 46283;\n itemDef.femaleEquipt = 46286;\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 1750;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20157: {\n itemDef.name = \"Elite platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46281;\n itemDef.maleEquipt = 46284;\n itemDef.femaleEquipt = 46287;\n itemDef.modelZoom = 1500;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20159: {\n itemDef.name = \"Elite platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46282;\n itemDef.maleEquipt = 46285;\n itemDef.femaleEquipt = 46288;\n itemDef.modelZoom = 1750;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20161: {\n itemDef.name = \"Elite full helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46238;\n itemDef.maleEquipt = 46241;\n itemDef.femaleEquipt = 46244;\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 1750;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20163: {\n itemDef.name = \"Elite platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46239;\n itemDef.maleEquipt = 46242;\n itemDef.femaleEquipt = 46245;\n itemDef.modelZoom = 1500;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20165: {\n itemDef.name = \"Elite platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46240;\n itemDef.maleEquipt = 46243;\n itemDef.femaleEquipt = 46246;\n itemDef.modelZoom = 1750;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20167: {\n itemDef.name = \"Elite full helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46289;\n itemDef.maleEquipt = 46292;\n itemDef.femaleEquipt = 46295;\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 1750;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20169: {\n itemDef.name = \"Elite platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46290;\n itemDef.maleEquipt = 46293;\n itemDef.femaleEquipt = 46296;\n itemDef.modelZoom = 1500;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20171: {\n itemDef.name = \"Elite platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46291;\n itemDef.maleEquipt = 46294;\n itemDef.femaleEquipt = 46297;\n itemDef.modelZoom = 1750;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20173: {\n itemDef.name = \"Elite full helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46298;\n itemDef.maleEquipt = 46301;\n itemDef.femaleEquipt = 46304;\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 1750;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20175: {\n itemDef.name = \"Elite platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46299;\n itemDef.maleEquipt = 46302;\n itemDef.femaleEquipt = 46305;\n itemDef.modelZoom = 1500;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20177: {\n itemDef.name = \"Elite platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46300;\n itemDef.maleEquipt = 46303;\n itemDef.femaleEquipt = 46306;\n itemDef.modelZoom = 1750;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20179: {\n itemDef.name = \"Elite full helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46307;\n itemDef.maleEquipt = 46310;\n itemDef.femaleEquipt = 46313;\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 1750;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20181: {\n itemDef.name = \"Elite platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46308;\n itemDef.maleEquipt = 46311;\n itemDef.femaleEquipt = 46314;\n itemDef.modelZoom = 1500;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20183: {\n itemDef.name = \"Elite platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46309;\n itemDef.maleEquipt = 46312;\n itemDef.femaleEquipt = 46315;\n itemDef.modelZoom = 1750;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.certID = -1;\n itemDef.certTemplateID = -1;\n break;\n }\n case 20143: {\n itemDef.name = \"QBD Helm\";\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 54;\n itemDef.maleEquipt = 55;\n itemDef.femaleEquipt = 56;\n itemDef.modelRotation1 = 0;\n itemDef.modelRotation2 = 1750;\n itemDef.modelZoom = 750;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20145: {\n itemDef.name = \"QBD Body\";\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 57;\n itemDef.maleEquipt = 58;\n itemDef.femaleEquipt = 59;\n itemDef.modelZoom = 1250;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20147: {\n itemDef.name = \"QBD Legs\";\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 60;\n itemDef.maleEquipt = 61;\n itemDef.femaleEquipt = 62;\n itemDef.modelZoom = 1750;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20149: {\n itemDef.name = \"QBD Gloves\";\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 63;\n itemDef.maleEquipt = 64;\n itemDef.femaleEquipt = 65;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20151: {\n itemDef.name = \"QBD Boots\";\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 66;\n itemDef.maleEquipt = 67;\n itemDef.femaleEquipt = 68;\n itemDef.modelZoom = 750;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 20153: {\n itemDef.name = \"QBD Wings\";\n itemDef.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 69;\n itemDef.maleEquipt = 70;\n itemDef.femaleEquipt = 71;\n itemDef.modelZoom = 1000;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n break;\n }\n case 201323: {\n itemDef.name = \"Youtuber Cape\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46247;\n itemDef.maleEquipt = 46248;\n itemDef.femaleEquipt = 46248;\n itemDef.stackable = false;\n break;\n }\n case 20135: {\n itemDef.name = \"Helper Cape\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46249;\n itemDef.maleEquipt = 46250;\n itemDef.femaleEquipt = 46250;\n itemDef.stackable = false;\n break;\n }\n case 20137: {\n itemDef.name = \"Moderator Cape\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46251;\n itemDef.maleEquipt = 46252;\n itemDef.femaleEquipt = 46252;\n itemDef.stackable = false;\n break;\n }\n case 20139: {\n itemDef.name = \"Admin Cape\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46253;\n itemDef.maleEquipt = 46254;\n itemDef.femaleEquipt = 46254;\n itemDef.stackable = false;\n break;\n }\n case 20141: {\n itemDef.name = \"Developer Cape\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.groundModelId = 46255;\n itemDef.maleEquipt = 46256;\n itemDef.femaleEquipt = 46256;\n itemDef.stackable = false;\n break;\n }\n case 6542: {\n itemDef.name = \"Requirements Mystery Box\";\n itemDef.description = \"Requirements mystery box.\";\n itemDef.stackable = false;\n break;\n }\n case 19810: {\n itemDef.name = \"NPC Kill Medal [T1]\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modelZoom = 1550;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.groundModelId = 49819;\n itemDef.femaleEquipt = 49814;\n itemDef.maleEquipt = 49814;\n itemDef.description = \"A great honor to have.\";\n itemDef.stackable = false;\n break;\n }\n case 19811: {\n itemDef.name = \"NPC Kill Medal [T2]\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modelZoom = 2000;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.groundModelId = 49820;\n itemDef.femaleEquipt = 49815;\n itemDef.maleEquipt = 49815;\n itemDef.description = \"A great honor to have.\";\n itemDef.stackable = false;\n break;\n }\n case 19812: {\n itemDef.name = \"NPC Kill Medal [T3]\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modelZoom = 2000;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.groundModelId = 49821;\n itemDef.femaleEquipt = 49816;\n itemDef.maleEquipt = 49816;\n itemDef.description = \"A great honor to have.\";\n itemDef.stackable = false;\n break;\n }\n case 19813: {\n itemDef.name = \"NPC Kill Medal [T4]\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modelZoom = 2000;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.groundModelId = 49822;\n itemDef.femaleEquipt = 49817;\n itemDef.maleEquipt = 49817;\n itemDef.description = \"A great honor to have.\";\n itemDef.stackable = false;\n break;\n }\n case 19814: {\n itemDef.name = \"NPC Kill Medal [T5]\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modelZoom = 2000;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.groundModelId = 49823;\n itemDef.femaleEquipt = 49818;\n itemDef.maleEquipt = 49818;\n itemDef.description = \"A great honor to have.\";\n itemDef.stackable = false;\n break;\n }\n case 19815: {\n itemDef.name = \"Nightmare Full Helm\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.groundModelId = 49824;\n itemDef.femaleEquipt = 49827;\n itemDef.maleEquipt = 49828;\n itemDef.description = \"A great honor to have.\";\n itemDef.stackable = false;\n break;\n }\n case 19816: {\n itemDef.name = \"Nightmare Platebody\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.groundModelId = 49825;\n itemDef.femaleEquipt = 49831;\n itemDef.maleEquipt = 49832;\n itemDef.description = \"A great honor to have.\";\n itemDef.stackable = false;\n break;\n }\n case 19817: {\n itemDef.name = \"Nightmare Platelegs\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.groundModelId = 49826;\n itemDef.femaleEquipt = 49831;\n itemDef.maleEquipt = 49832;\n itemDef.description = \"A great honor to have.\";\n itemDef.stackable = false;\n break;\n }\n case 19123: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.description = \"A Cape made from Dandelion flowers.\";\n itemDef.groundModelId = 79240;\n itemDef.femaleEquipt = 79239;\n itemDef.maleEquipt = 79239;\n itemDef.modelZoom = 2128;\n itemDef.modelRotation1 = 504;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 1;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.anInt175 = 14;\n itemDef.anInt197 = 7;\n itemDef.name = \"Dandelion Death Cape\";\n break;\n }\n case 13362: {\n itemDef.groundModelId = 62714;\n itemDef.name = \"Torva full helm\";\n itemDef.description = \"Torva full helm.\";\n itemDef.modelZoom = 672;\n itemDef.modelRotation1 = 85;\n itemDef.modelRotation2 = 1867;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -3;\n itemDef.femaleEquipt = 62738;\n itemDef.maleEquipt = 62754;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 19111: {\n itemDef.name = \"TokHaar-Kal\";\n itemDef.value = 60000;\n itemDef.femaleEquipt = 62575;\n itemDef.maleEquipt = 62582;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -4;\n itemDef.groundModelId = 62592;\n itemDef.stackable = false;\n itemDef.description = \"A cape made of ancient, enchanted rocks.\";\n itemDef.modelZoom = 2086;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 533;\n itemDef.modelRotation2 = 333;\n break;\n }\n case 15651: {\n itemDef.groundModelId = 62820;\n itemDef.name = \"Obsidian boots\";\n itemDef.description = \"Obsidian boots.\";\n itemDef.modelZoom = 676;\n itemDef.modelRotation1 = 63;\n itemDef.modelRotation2 = 106;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = -1;\n itemDef.femaleEquipt = 62818;\n itemDef.maleEquipt = 62818;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 15653: {\n itemDef.groundModelId = 62825;\n itemDef.name = \"Obsidian gloves\";\n itemDef.description = \"Obsidian Gloves.\";\n itemDef.modelZoom = 548;\n itemDef.modelRotation1 = 618;\n itemDef.modelRotation2 = 1143;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62824;\n itemDef.maleEquipt = 62824;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 15654: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.groundModelId = 62827;\n itemDef.femaleEquipt = 62826;\n itemDef.modelZoom = 1886;\n itemDef.modelRotation1 = 477;\n itemDef.modelRotation2 = 757;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 13;\n itemDef.stackable = false;\n itemDef.rdc2 = 304782;\n itemDef.name = \"Evil shield\";\n itemDef.description = \"A Shield said to be able to corrupt even the purest of hearts.\";\n break;\n }\n case 15662: {\n itemDef.groundModelId = 62803;\n itemDef.name = \"Tok-Tkzar Platebody\";\n itemDef.description = \"Tok-Tkzar legs\";\n itemDef.modelZoom = 1358;\n itemDef.modelOffset1 = 2;\n itemDef.modelOffset2 = 6;\n itemDef.modelRotation1 = 539;\n itemDef.modelRotation2 = 0;\n itemDef.femaleEquipt = 62802;\n itemDef.maleEquipt = 62802;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.anInt204 = 40;\n itemDef.anInt196 = 30;\n itemDef.anInt184 = 100;\n break;\n }\n case 15656: {\n itemDef.groundModelId = 62805;\n itemDef.name = \"Tok-Tkzar legs\";\n itemDef.description = \"Tok-Tkzar legs\";\n itemDef.modelZoom = 1828;\n itemDef.modelRotation1 = 539;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = 0;\n itemDef.femaleEquipt = 62804;\n itemDef.maleEquipt = 62804;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.anInt204 = 40;\n itemDef.anInt196 = 30;\n itemDef.anInt184 = 100;\n break;\n }\n case 15657: {\n itemDef.groundModelId = 62807;\n itemDef.name = \"Tok-Tkzar cloak\";\n itemDef.description = \"Tok-Tkzar cloak\";\n itemDef.stackable = false;\n itemDef.modelZoom = 2713;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 29;\n itemDef.modelRotation1 = 504;\n itemDef.modelRotation2 = 1030;\n itemDef.femaleEquipt = 62806;\n itemDef.maleEquipt = 62806;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 15658: {\n itemDef.groundModelId = 62809;\n itemDef.name = \"Tok-Tkzar boots\";\n itemDef.description = \"Tok-Tkzar boots\";\n itemDef.modelZoom = 676;\n itemDef.modelRotation1 = 63;\n itemDef.modelRotation2 = 106;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = -1;\n itemDef.femaleEquipt = 62808;\n itemDef.maleEquipt = 62808;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 15659: {\n itemDef.groundModelId = 62811;\n itemDef.name = \"Tok-Tkzar Gloves\";\n itemDef.description = \"Tok-Tkzar Gloves\";\n itemDef.modelZoom = 648;\n itemDef.modelRotation1 = 618;\n itemDef.modelRotation2 = 1143;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62810;\n itemDef.maleEquipt = 62810;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 15660: {\n itemDef.groundModelId = 62813;\n itemDef.name = \"Tok-Tkzar Helm\";\n itemDef.description = \"Tok-Tkzar Helm.\";\n itemDef.modelZoom = 672;\n itemDef.modelRotation1 = 85;\n itemDef.modelRotation2 = 1867;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -3;\n itemDef.femaleEquipt = 62812;\n itemDef.maleEquipt = 62812;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 15661: {\n itemDef.groundModelId = 62815;\n itemDef.name = \"Tok-Tkzar Mace\";\n itemDef.description = \"Tok-Tkzar Mace.\";\n itemDef.modelZoom = 1672;\n itemDef.modelRotation1 = 285;\n itemDef.modelRotation2 = 607;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -3;\n itemDef.femaleEquipt = 62814;\n itemDef.maleEquipt = 62814;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16603: {\n itemDef.groundModelId = 62841;\n itemDef.name = \"Max platelegs\";\n itemDef.description = \"Max platelegs\";\n itemDef.modelZoom = 1740;\n itemDef.modelRotation1 = 474;\n itemDef.modelRotation2 = 2045;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62840;\n itemDef.maleEquipt = 62840;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16604: {\n itemDef.groundModelId = 62843;\n itemDef.name = \"Max boots\";\n itemDef.description = \"Max boots\";\n itemDef.modelZoom = 676;\n itemDef.modelRotation1 = 63;\n itemDef.modelRotation2 = 106;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = -1;\n itemDef.femaleEquipt = 62842;\n itemDef.maleEquipt = 62842;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16605: {\n itemDef.groundModelId = 62845;\n itemDef.name = \"Max gloves\";\n itemDef.description = \"Max gloves\";\n itemDef.modelZoom = 548;\n itemDef.modelRotation1 = 618;\n itemDef.modelRotation2 = 1143;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62844;\n itemDef.maleEquipt = 62844;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16606: {\n itemDef.groundModelId = 62867;\n itemDef.name = \"Max Plate\";\n itemDef.description = \"Max Plate\";\n itemDef.modelZoom = 1506;\n itemDef.modelRotation1 = 473;\n itemDef.modelRotation2 = 2042;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.femaleEquipt = 62846;\n itemDef.maleEquipt = 62846;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16608: {\n itemDef.groundModelId = 62849;\n itemDef.name = \"Max Helm\";\n itemDef.description = \"Max Helm.\";\n itemDef.modelZoom = 672;\n itemDef.modelRotation1 = 85;\n itemDef.modelRotation2 = 1867;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -3;\n itemDef.femaleEquipt = 62848;\n itemDef.maleEquipt = 62848;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16609: {\n itemDef.groundModelId = 62851;\n itemDef.name = \"Max Dual longsword\";\n itemDef.description = \"Max Dual longsword.\";\n itemDef.modelZoom = 1316;\n itemDef.modelRotation1 = 477;\n itemDef.modelRotation2 = 9;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 13;\n itemDef.femaleEquipt = 62850;\n itemDef.maleEquipt = 62850;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16610: {\n itemDef.groundModelId = 62883;\n itemDef.name = \"Corrupt Dragon Fullhelm\";\n itemDef.modelZoom = 980;\n itemDef.description = \"You feel the corruption pulse through you.\";\n itemDef.modelRotation1 = 208;\n itemDef.modelRotation2 = 220;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -18;\n itemDef.stackable = false;\n itemDef.femaleEquipt = 62871;\n itemDef.maleEquipt = 62871;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.anInt175 = 62730;\n itemDef.anInt197 = 62730;\n break;\n }\n case 16611: {\n itemDef.groundModelId = 62879;\n itemDef.name = \"Corrupt Dragon Plate\";\n itemDef.description = \"You feel the corruption pulse through you\";\n itemDef.modelZoom = 1506;\n itemDef.modelRotation1 = 473;\n itemDef.modelRotation2 = 2042;\n itemDef.modelOffset1 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset2 = 0;\n itemDef.femaleEquipt = 62869;\n itemDef.maleEquipt = 62873;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16613: {\n itemDef.groundModelId = 62880;\n itemDef.name = \"Corrupt Dragon Platelegs\";\n itemDef.description = \"You feel the corruption pulse through you.\";\n itemDef.modelZoom = 1740;\n itemDef.modelRotation1 = 474;\n itemDef.modelRotation2 = 2045;\n itemDef.modelOffset1 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62870;\n itemDef.maleEquipt = 62874;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16614: {\n itemDef.groundModelId = 62881;\n itemDef.name = \"Corrupt Dragon Gloves\";\n itemDef.description = \"You feel the corruption pulse through you\";\n itemDef.modelZoom = 548;\n itemDef.modelRotation1 = 618;\n itemDef.modelRotation2 = 1143;\n itemDef.modelOffset1 = 0;\n itemDef.stackable = false;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62878;\n itemDef.maleEquipt = 62877;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16615: {\n itemDef.groundModelId = 62882;\n itemDef.name = \"Corrupt Dragon Boots\";\n itemDef.modelZoom = 676;\n itemDef.description = \"You feel the corruption pulse through you\";\n itemDef.modelRotation1 = 63;\n itemDef.modelRotation2 = 106;\n itemDef.modelOffset1 = 5;\n itemDef.stackable = false;\n itemDef.modelOffset2 = -1;\n itemDef.femaleEquipt = 62872;\n itemDef.maleEquipt = 62876;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16616: {\n itemDef.groundModelId = 62884;\n itemDef.name = \"Corrupt Dragon wings\";\n itemDef.description = \"Enchanted wings torn from the back of a Corrupt Dragon \";\n itemDef.modelZoom = 850;\n itemDef.modelRotation1 = 252;\n itemDef.modelRotation2 = 1020;\n itemDef.modelOffset1 = -1;\n itemDef.stackable = false;\n itemDef.modelOffset2 = 24;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 62868;\n itemDef.maleEquipt = 62868;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17751: {\n itemDef.groundModelId = 62866;\n itemDef.name = \"@red@Corrupt Dragon wings\";\n itemDef.description = \"Enchanted wings torn from the back of a Corrupt Dragon \";\n itemDef.modelZoom = 850;\n itemDef.modelRotation1 = 252;\n itemDef.modelRotation2 = 1020;\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = 24;\n itemDef.stackable = false;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 62867;\n itemDef.maleEquipt = 62867;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 16618: {\n itemDef.groundModelId = 62778;\n itemDef.name = \"Blood mage hood\";\n itemDef.description = \"Deathy Hood from a lost order of mages.\";\n itemDef.modelZoom = 724;\n itemDef.modelRotation1 = 81;\n itemDef.modelRotation2 = 1670;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -4;\n itemDef.femaleEquipt = 62779;\n itemDef.maleEquipt = 62779;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16619: {\n itemDef.groundModelId = 62787;\n itemDef.name = \"Blood mage robe top\";\n itemDef.description = \"Deathy robe top from a lost order of mages\";\n itemDef.modelZoom = 1513;\n itemDef.modelRotation1 = 566;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 1;\n itemDef.modelOffset2 = -8;\n itemDef.femaleEquipt = 62780;\n itemDef.maleEquipt = 62780;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16620: {\n itemDef.groundModelId = 62781;\n itemDef.name = \"Blood Mage robe bottom \";\n itemDef.description = \"Deathy Hood from a lost order of mages\";\n itemDef.modelZoom = 1550;\n itemDef.modelRotation1 = 344;\n itemDef.modelRotation2 = 186;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = 11;\n itemDef.femaleEquipt = 62782;\n itemDef.maleEquipt = 62782;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16621: {\n itemDef.groundModelId = 62785;\n itemDef.name = \"Book of Cataclysm\";\n itemDef.description = \"This book contains the knowledge of generations of powerfull dark mages \";\n itemDef.modelZoom = 850;\n itemDef.modelRotation1 = 252;\n itemDef.modelRotation2 = 1020;\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = 24;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 62786;\n itemDef.maleEquipt = 62786;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 16623: {\n itemDef.groundModelId = 62783;\n itemDef.name = \"Staff of Sanguine\";\n itemDef.description = \"A powerfull staff able to suck the blood out of its enemies\";\n itemDef.modelZoom = 850;\n itemDef.modelRotation1 = 252;\n itemDef.modelRotation2 = 1020;\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = 24;\n itemDef.stackable = false;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 62784;\n itemDef.maleEquipt = 62784;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Weild\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16624: {\n itemDef.groundModelId = 62832;\n itemDef.name = \"BeastMaster Plate\";\n itemDef.description = \"BeastMaster Plate.\";\n itemDef.modelZoom = 1506;\n itemDef.modelRotation1 = 473;\n itemDef.modelRotation2 = 2042;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.femaleEquipt = 62831;\n itemDef.maleEquipt = 62831;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16625: {\n itemDef.groundModelId = 62833;\n itemDef.name = \"BeastMaster platelegs\";\n itemDef.description = \"BeastMaster platelegs.\";\n itemDef.modelZoom = 1740;\n itemDef.modelRotation1 = 474;\n itemDef.modelRotation2 = 2045;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62930;\n itemDef.maleEquipt = 62930;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16626: {\n itemDef.groundModelId = 62837;\n itemDef.name = \"BeastMaster boots\";\n itemDef.description = \"BeastMaster boots.\";\n itemDef.modelZoom = 676;\n itemDef.modelRotation1 = 63;\n itemDef.modelRotation2 = 106;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = -1;\n itemDef.femaleEquipt = 62836;\n itemDef.maleEquipt = 62836;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16628: {\n itemDef.groundModelId = 62835;\n itemDef.name = \"BeastMaster helm\";\n itemDef.description = \"BeastMaster helm.\";\n itemDef.modelZoom = 672;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -3;\n itemDef.modelRotation1 = 50;\n itemDef.modelRotation2 = 2027;\n itemDef.femaleEquipt = 62834;\n itemDef.maleEquipt = 62834;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16629: {\n itemDef.groundModelId = 62839;\n itemDef.name = \"BeastMaster gloves\";\n itemDef.description = \"BeastMaster gloves.\";\n itemDef.modelZoom = 548;\n itemDef.modelRotation1 = 618;\n itemDef.modelRotation2 = 1143;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62838;\n itemDef.maleEquipt = 62838;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.stackable = false;\n break;\n }\n case 16630: {\n itemDef.groundModelId = 62771;\n itemDef.name = \"Ares`s full helm\";\n itemDef.description = \"Helm of the war god, Ares.\";\n itemDef.modelZoom = 972;\n itemDef.modelOffset1 = 2;\n itemDef.modelOffset2 = -3;\n itemDef.modelRotation1 = 100;\n itemDef.modelRotation2 = 1667;\n itemDef.femaleEquipt = 62770;\n itemDef.maleEquipt = 62770;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 16631: {\n itemDef.groundModelId = 62773;\n itemDef.name = \"Ares' Platelegs\";\n itemDef.description = \"Platelegs of the war god, Ares.\";\n itemDef.modelZoom = 1740;\n itemDef.modelRotation1 = 474;\n itemDef.modelRotation2 = 2045;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62772;\n itemDef.maleEquipt = 62772;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 16633: {\n itemDef.groundModelId = 62767;\n itemDef.name = \"Ares' Platebody\";\n itemDef.description = \"Platebody of the war god, Ares.\";\n itemDef.modelZoom = 1576;\n itemDef.modelOffset1 = -8;\n itemDef.modelOffset2 = 2;\n itemDef.modelRotation1 = 473;\n itemDef.modelRotation2 = 2042;\n itemDef.femaleEquipt = 62766;\n itemDef.maleEquipt = 62766;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 16634: {\n itemDef.groundModelId = 62829;\n itemDef.name = \"Ares' gloves\";\n itemDef.description = \"Gloves of the war god, Ares.\";\n itemDef.modelZoom = 418;\n itemDef.modelOffset1 = -3;\n itemDef.modelOffset2 = 3;\n itemDef.modelRotation1 = 618;\n itemDef.modelRotation2 = 1143;\n itemDef.femaleEquipt = 62830;\n itemDef.maleEquipt = 62830;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16635: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.groundModelId = 62789;\n itemDef.femaleEquipt = 62828;\n itemDef.maleEquipt = 62828;\n itemDef.modelZoom = 1316;\n itemDef.modelRotation1 = 477;\n itemDef.modelRotation2 = 9;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 13;\n itemDef.stackable = false;\n itemDef.name = \"Crossbow of Devastation\";\n itemDef.description = \"A Crossbow said to be able to lay waste to entire cities. One of the three Items of armageddon \";\n break;\n }\n case 16636: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.groundModelId = 62777;\n itemDef.femaleEquipt = 62776;\n itemDef.maleEquipt = 62776;\n itemDef.modelZoom = 1316;\n itemDef.modelRotation1 = 477;\n itemDef.modelRotation2 = 9;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 13;\n itemDef.stackable = false;\n itemDef.name = \"Spear of Rapture\";\n itemDef.description = \"A Spear said to be able to reap the soul out of a body. One of the three items of armageddon.\";\n break;\n }\n case 16638: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.groundModelId = 62775;\n itemDef.femaleEquipt = 62774;\n itemDef.modelZoom = 1316;\n itemDef.modelRotation1 = 477;\n itemDef.modelRotation2 = 9;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 13;\n itemDef.stackable = false;\n itemDef.name = \"Shield of Wrath\";\n itemDef.description = \"A Shield said to be able harness the power of the heavens. One of the three items of armageddon.\";\n break;\n }\n case 16639: {\n itemDef.groundModelId = 78000;\n itemDef.name = \"Knightmare Plate\";\n itemDef.description = \"22222222222222222 \";\n itemDef.modelZoom = 1506;\n itemDef.modelRotation1 = 473;\n itemDef.modelRotation2 = 2042;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.femaleEquipt = 78001;\n itemDef.maleEquipt = 78001;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16640: {\n itemDef.groundModelId = 78002;\n itemDef.name = \"Knightmare platelegs\";\n itemDef.description = \"2222222222222222222222222.\";\n itemDef.modelZoom = 1740;\n itemDef.modelRotation1 = 474;\n itemDef.modelRotation2 = 2045;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 78003;\n itemDef.maleEquipt = 78003;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16641: {\n itemDef.groundModelId = 78004;\n itemDef.name = \"Knightmare boots\";\n itemDef.description = \"2222222222222222222222222.\";\n itemDef.modelZoom = 676;\n itemDef.modelRotation1 = 63;\n itemDef.modelRotation2 = 106;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = -1;\n itemDef.femaleEquipt = 78005;\n itemDef.maleEquipt = 78005;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16644: {\n itemDef.groundModelId = 78008;\n itemDef.name = \"Knightmare Helm\";\n itemDef.description = \"2222222222222222222222222.\";\n itemDef.modelZoom = 1172;\n itemDef.modelRotation1 = 85;\n itemDef.modelRotation2 = 1867;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -3;\n itemDef.femaleEquipt = 78009;\n itemDef.maleEquipt = 78009;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 16645: {\n itemDef.groundModelId = 78010;\n itemDef.name = \"Souledge\";\n itemDef.stackable = false;\n itemDef.description = \"A powerful weapon.\";\n itemDef.modelZoom = 2200;\n itemDef.modelRotation1 = 9;\n itemDef.modelRotation2 = 477;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 13;\n itemDef.femaleEquipt = 78011;\n itemDef.maleEquipt = 78011;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 17743: {\n itemDef.groundModelId = 62853;\n itemDef.name = \"Completionest Plate\";\n itemDef.description = \"22222222222222222 \";\n itemDef.modelZoom = 1506;\n itemDef.modelRotation1 = 473;\n itemDef.modelRotation2 = 2042;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.femaleEquipt = 62852;\n itemDef.maleEquipt = 62852;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 17744: {\n itemDef.groundModelId = 62855;\n itemDef.name = \"Completionest platelegs\";\n itemDef.description = \"2222222222222222222222222.\";\n itemDef.modelZoom = 1740;\n itemDef.modelRotation1 = 474;\n itemDef.modelRotation2 = 2045;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62854;\n itemDef.maleEquipt = 62854;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 17745: {\n itemDef.groundModelId = 62861;\n itemDef.name = \"Completionest boots\";\n itemDef.description = \"2222222222222222222222222.\";\n itemDef.modelZoom = 676;\n itemDef.modelRotation1 = 63;\n itemDef.modelRotation2 = 106;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = -1;\n itemDef.femaleEquipt = 62860;\n itemDef.maleEquipt = 62860;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 17746: {\n itemDef.groundModelId = 62859;\n itemDef.name = \"Completionest gloves\";\n itemDef.description = \"2222222222222222222222222.\";\n itemDef.modelZoom = 548;\n itemDef.modelRotation1 = 618;\n itemDef.modelRotation2 = 1143;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -5;\n itemDef.femaleEquipt = 62858;\n itemDef.maleEquipt = 62858;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 17748: {\n itemDef.groundModelId = 62857;\n itemDef.name = \"Completionest Helm\";\n itemDef.description = \"2222222222222222222222222.\";\n itemDef.modelZoom = 672;\n itemDef.modelRotation1 = 85;\n itemDef.modelRotation2 = 1867;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -3;\n itemDef.femaleEquipt = 62856;\n itemDef.maleEquipt = 62856;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 17749: {\n itemDef.groundModelId = 62863;\n itemDef.name = \"Completionest longsword (main Hand)\";\n itemDef.description = \"2222222222222222222222222.\";\n itemDef.modelZoom = 1300;\n itemDef.modelRotation1 = 477;\n itemDef.modelRotation2 = 9;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 13;\n itemDef.femaleEquipt = 62862;\n itemDef.maleEquipt = 62862;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 17750: {\n itemDef.groundModelId = 62863;\n itemDef.name = \"Completionest longsword (Off Hand)\";\n itemDef.description = \"2222222222222222222222222.\";\n itemDef.modelZoom = 1300;\n itemDef.modelRotation1 = 477;\n itemDef.modelRotation2 = 9;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 13;\n itemDef.femaleEquipt = 62864;\n itemDef.maleEquipt = 62864;\n itemDef.stackable = false;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Morph\";\n itemDef.itemActions[2] = \"Check-charges\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 17779: {\n itemDef.groundModelId = 78013;\n itemDef.name = \"@red@Advanced Comp Cape\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1316;\n itemDef.modelRotation1 = 252;\n itemDef.modelRotation2 = 1020;\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = 24;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78012;\n itemDef.maleEquipt = 78012;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17851: {\n itemDef.groundModelId = 78025;\n itemDef.name = \"@red@Advanced Dung cape\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1316;\n itemDef.modelRotation1 = 252;\n itemDef.modelRotation2 = 1020;\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = 24;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78024;\n itemDef.maleEquipt = 78024;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 4279: {\n itemDef.groundModelId = 78014;\n itemDef.name = \"@blu@Trident of the MOON\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 3355;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 256;\n itemDef.modelOffset1 = 3;\n itemDef.modelOffset2 = -9;\n itemDef.femaleEquipt = 78014;\n itemDef.maleEquipt = 78014;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 17845: {\n itemDef.groundModelId = 78016;\n itemDef.name = \"@blu@Chronic Greataxe\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 2500;\n itemDef.modelRotation1 = 228;\n itemDef.modelRotation2 = 1155;\n itemDef.modelOffset1 = -5;\n itemDef.modelOffset2 = 65;\n itemDef.membersObject = true;\n itemDef.stackable = false;\n itemDef.femaleEquipt = 78015;\n itemDef.maleEquipt = 78015;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17846: {\n itemDef.groundModelId = 78018;\n itemDef.name = \"@blu@Chronic Godsword\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 2000;\n itemDef.modelRotation1 = 228;\n itemDef.modelRotation2 = 1225;\n itemDef.modelOffset1 = -5;\n itemDef.modelOffset2 = 65;\n itemDef.membersObject = true;\n itemDef.stackable = false;\n itemDef.femaleEquipt = 78017;\n itemDef.maleEquipt = 78017;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17847: {\n itemDef.groundModelId = 79610;\n itemDef.name = \"Lavaflow Godsword\";\n itemDef.description = \"What in the world ? You really got that ? Youre amazing dude! \";\n itemDef.modelZoom = 1500;\n itemDef.modelRotation1 = 228;\n itemDef.modelRotation2 = 1985;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = -55;\n itemDef.stackable = false;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78019;\n itemDef.maleEquipt = 78019;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17848: {\n itemDef.groundModelId = 78021;\n itemDef.name = \"Blazing Sword\";\n itemDef.description = \"What in the world ? You really got that ? Youre amazing dude! \";\n itemDef.modelZoom = 2000;\n itemDef.modelRotation1 = 228;\n itemDef.modelRotation2 = 1985;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = -55;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78020;\n itemDef.maleEquipt = 78020;\n itemDef.stackable = false;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17849: {\n itemDef.groundModelId = 79464;\n itemDef.name = \"Flaming Whip\";\n itemDef.description = \"What in the world ? You really got that ? Youre amazing dude! \";\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 601;\n itemDef.modelRotation2 = 1000;\n itemDef.modelOffset1 = 4;\n itemDef.modelOffset2 = 8;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78022;\n itemDef.maleEquipt = 78022;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17850: {\n itemDef.groundModelId = 79465;\n itemDef.name = \"Razor Whip\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1000;\n itemDef.modelRotation1 = 601;\n itemDef.modelRotation2 = 1000;\n itemDef.modelOffset1 = 4;\n itemDef.modelOffset2 = 8;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78023;\n itemDef.maleEquipt = 78023;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17854: {\n itemDef.groundModelId = 78028;\n itemDef.name = \"Brutal longsword ( offhand )\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1447;\n itemDef.modelRotation1 = 444;\n itemDef.modelRotation2 = 1217;\n itemDef.modelOffset1 = -5;\n itemDef.modelOffset2 = -4;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78028;\n itemDef.maleEquipt = 78028;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 17855: {\n itemDef.groundModelId = 78029;\n itemDef.name = \"@yel@Sword of Edictation\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1744;\n itemDef.modelRotation1 = 738;\n itemDef.modelRotation2 = 1985;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 0;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78029;\n itemDef.maleEquipt = 78029;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 17856: {\n itemDef.groundModelId = 78027;\n itemDef.name = \"@bla@Obsidian rapier\";\n itemDef.description = \"What in the world ? You really got that ? Youre amazing dude! \";\n itemDef.modelZoom = 2079;\n itemDef.modelRotation1 = 459;\n itemDef.modelRotation2 = 77;\n itemDef.modelOffset1 = 5;\n itemDef.stackable = false;\n itemDef.modelOffset2 = -7;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78030;\n itemDef.maleEquipt = 78030;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17857: {\n itemDef.groundModelId = 78032;\n itemDef.name = \"@yel@Corrupt Korasi sword\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1779;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = 0;\n itemDef.modelRotation1 = 500;\n itemDef.modelRotation2 = 0;\n itemDef.membersObject = true;\n itemDef.stackable = false;\n itemDef.femaleEquipt = 78031;\n itemDef.maleEquipt = 78031;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17858: {\n itemDef.groundModelId = 78034;\n itemDef.name = \"Red Anchor of Death\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1104;\n itemDef.modelRotation1 = 321;\n itemDef.modelRotation2 = 24;\n itemDef.modelOffset1 = -5;\n itemDef.modelOffset2 = 2;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78033;\n itemDef.maleEquipt = 78033;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modifiedModelColors = new int[7];\n itemDef.originalModelColors = new int[7];\n itemDef.modifiedModelColors[0] = 10283;\n itemDef.originalModelColors[0] = 1818;\n itemDef.modifiedModelColors[1] = 10287;\n itemDef.originalModelColors[1] = 1820;\n itemDef.modifiedModelColors[2] = 10279;\n itemDef.originalModelColors[2] = 1825;\n itemDef.modifiedModelColors[3] = 10291;\n itemDef.originalModelColors[3] = 1818;\n itemDef.modifiedModelColors[4] = 10275;\n itemDef.originalModelColors[4] = 1819;\n itemDef.stackable = false;\n break;\n }\n case 17859: {\n itemDef.groundModelId = 78036;\n itemDef.name = \"Upgraded Armadyl Godsword\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 2000;\n itemDef.modelRotation1 = 228;\n itemDef.modelRotation2 = 1985;\n itemDef.modelOffset1 = 5;\n itemDef.modelOffset2 = 55;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78035;\n itemDef.maleEquipt = 78035;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17860: {\n itemDef.groundModelId = 78038;\n itemDef.name = \"Christmas TreeHat\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 996;\n itemDef.modelRotation1 = 9;\n itemDef.modelRotation2 = 1815;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 1;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78037;\n itemDef.maleEquipt = 78037;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17861: {\n itemDef.groundModelId = 78042;\n itemDef.stackable = false;\n itemDef.name = \"Tzhaar Whip\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 987;\n itemDef.modelRotation1 = 440;\n itemDef.modelRotation2 = 630;\n itemDef.modelOffset1 = 8;\n itemDef.modelOffset2 = -1;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78041;\n itemDef.maleEquipt = 78041;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17862: {\n itemDef.groundModelId = 79476;\n itemDef.stackable = false;\n itemDef.name = \"Tzhaar body\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1500;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -1;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78043;\n itemDef.maleEquipt = 78043;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17863: {\n itemDef.groundModelId = 79475;\n itemDef.stackable = false;\n itemDef.name = \"Tzhaar legs\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 2000;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -1;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78044;\n itemDef.maleEquipt = 78044;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17864: {\n itemDef.groundModelId = 78046;\n itemDef.name = \"Obsidian Body\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1650;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -1;\n itemDef.stackable = false;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78045;\n itemDef.maleEquipt = 78045;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 17865: {\n itemDef.groundModelId = 78048;\n itemDef.name = \"Obsidian legs\";\n itemDef.description = \"What in the world ? You really got that ? Your amazing dude! \";\n itemDef.modelZoom = 1850;\n itemDef.modelRotation1 = 512;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -1;\n itemDef.stackable = false;\n itemDef.membersObject = true;\n itemDef.femaleEquipt = 78047;\n itemDef.maleEquipt = 78047;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 15001: {\n itemDef.name = \"White wings\";\n itemDef.value = 60000;\n itemDef.femaleEquipt = 79242;\n itemDef.maleEquipt = 79242;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.groundModelId = 79243;\n itemDef.stackable = false;\n itemDef.description = \"White WINS!.\";\n itemDef.modelZoom = 850;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelOffset2 = 24;\n itemDef.modelRotation1 = 252;\n itemDef.modelRotation2 = 1020;\n break;\n }\n case 16428: {\n itemDef.groundModelId = 9001;\n itemDef.name = \"Rainbow Partyhat\";\n itemDef.description = \"Rainbow Partyhat.\";\n itemDef.modelZoom = 440;\n itemDef.value = 60000;\n itemDef.modelRotation2 = 1845;\n itemDef.modelRotation1 = 121;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = 1;\n itemDef.femaleEquipt = 9000;\n itemDef.maleEquipt = 9002;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.stackable = false;\n break;\n }\n case 9500: {\n itemDef.name = \"@yel@Wizard Hat\";\n itemDef.value = 20000000;\n itemDef.femaleEquipt = 13079;\n itemDef.maleEquipt = 13082;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 11400;\n itemDef.stackable = false;\n itemDef.description = \"Its a wizard hat.\";\n itemDef.modelZoom = 800;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelRotation1 = 152;\n itemDef.modelRotation2 = 156;\n break;\n }\n case 9501: {\n itemDef.name = \"@yel@Zaros Godsword\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 7997;\n itemDef.maleEquipt = 7997;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 7998;\n itemDef.stackable = false;\n itemDef.description = \"Its a zaros godsword.\";\n itemDef.modelZoom = 1957;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 9502: {\n itemDef.name = \"@yel@Masamune\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 13083;\n itemDef.maleEquipt = 13083;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 13084;\n itemDef.stackable = false;\n itemDef.description = \"Auron's Celestial Weapon: The Masamune.\";\n itemDef.modelZoom = 1957;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 19000: {\n itemDef.name = \"@yel@drygore Mace\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 19001;\n itemDef.maleEquipt = 19001;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19000;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.modelZoom = 1250;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 18999: {\n itemDef.name = \"@yel@Upgraded drygore Mace\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 18999;\n itemDef.maleEquipt = 18999;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19000;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.modelZoom = 1250;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 19001: {\n itemDef.name = \"@yel@drygore Mace ( broken )\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = -1;\n itemDef.maleEquipt = -1;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19002;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 8671: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 11200;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Yellow h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 19002: {\n itemDef.name = \"@yel@drygore Mace ( off-hand )\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 19003;\n itemDef.maleEquipt = 19003;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19003;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 19003: {\n itemDef.name = \"@yel@drygore Longsword ( off-hand )\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 19004;\n itemDef.maleEquipt = 19004;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19005;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 19004: {\n itemDef.name = \"@yel@drygore Longsword ( broken )\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = -1;\n itemDef.maleEquipt = -1;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19006;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 19005: {\n itemDef.name = \"@yel@drygore Longsword\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 19007;\n itemDef.maleEquipt = 19007;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19005;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 19006: {\n itemDef.name = \"@yel@drygore Rapier ( off-hand )\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 19008;\n itemDef.maleEquipt = 19008;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19009;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 19007: {\n itemDef.name = \"@yel@drygore Rapier\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 19010;\n itemDef.maleEquipt = 19010;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19009;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 19008: {\n itemDef.name = \"@yel@drygore Rapier ( broken )\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = -1;\n itemDef.maleEquipt = -1;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19011;\n itemDef.stackable = false;\n itemDef.description = \"Its's a drygore weapon.\";\n itemDef.modelZoom = 1250;\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 19009: {\n itemDef.name = \"Halo Sword\";\n itemDef.value = 2000000000;\n itemDef.femaleEquipt = 19013;\n itemDef.maleEquipt = 19013;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.modelOffset1 = -1;\n itemDef.modelOffset2 = -1;\n itemDef.groundModelId = 19012;\n itemDef.stackable = false;\n itemDef.description = \"its a sword from halo game.\";\n itemDef.modelZoom = 1250;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wield\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modelRotation1 = 498;\n itemDef.modelRotation2 = 484;\n break;\n }\n case 8673: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 6073;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Orange h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 8675: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 32895;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Random h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 8695: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 57300;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Hot h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 8697: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 34503;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Winter h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 8677: {\n itemDef.groundModelId = 40920;\n itemDef.name = \"Pink Special spirit shield\";\n itemDef.description = \"It's a Spectral spirit shield\";\n itemDef.modifiedModelColors = new int[13];\n itemDef.originalModelColors = new int[13];\n itemDef.modifiedModelColors[0] = 44635;\n itemDef.originalModelColors[0] = 62135;\n itemDef.modifiedModelColors[1] = 44612;\n itemDef.originalModelColors[1] = 62135;\n itemDef.modifiedModelColors[2] = 44606;\n itemDef.originalModelColors[2] = 62135;\n itemDef.modifiedModelColors[3] = 44615;\n itemDef.originalModelColors[3] = 62135;\n itemDef.modifiedModelColors[4] = 44641;\n itemDef.originalModelColors[4] = 62135;\n itemDef.modifiedModelColors[5] = 44564;\n itemDef.originalModelColors[5] = 62135;\n itemDef.modifiedModelColors[6] = 44575;\n itemDef.originalModelColors[6] = 62135;\n itemDef.modifiedModelColors[7] = 44618;\n itemDef.originalModelColors[7] = 62135;\n itemDef.modifiedModelColors[8] = 105;\n itemDef.originalModelColors[8] = 6073;\n itemDef.modifiedModelColors[9] = 44603;\n itemDef.originalModelColors[9] = 62135;\n itemDef.modifiedModelColors[10] = 44570;\n itemDef.originalModelColors[10] = 62135;\n itemDef.modifiedModelColors[11] = 4500;\n itemDef.originalModelColors[11] = 62135;\n itemDef.modelZoom = 1616;\n itemDef.modelRotation1 = 396;\n itemDef.modelRotation2 = 1050;\n itemDef.modelOffset2 = -3;\n itemDef.modelOffset1 = 4;\n itemDef.femaleEquipt = 40940;\n itemDef.maleEquipt = 40940;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 8679: {\n itemDef.groundModelId = 5412;\n itemDef.name = \"Cyan Whip\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modelZoom = 840;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.aByte205 = (byte)7;\n itemDef.aByte154 = (byte)-7;\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors[0] = 34503;\n itemDef.modifiedModelColors[0] = 944;\n itemDef.stackable = false;\n break;\n }\n case 8687: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 34503;\n itemDef.groundModelId = 2635;\n itemDef.modelZoom = 440;\n itemDef.modelRotation1 = 76;\n itemDef.modelRotation2 = 1850;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 1;\n itemDef.modelOffset2 = 1;\n itemDef.femaleEquipt = 187;\n itemDef.maleEquipt = 363;\n itemDef.anInt175 = 29;\n itemDef.anInt197 = 87;\n itemDef.name = \"Cyan Party Hat\";\n itemDef.description = \"An Cyan Party Hat.\";\n break;\n }\n case 8689: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 57300;\n itemDef.groundModelId = 2635;\n itemDef.modelZoom = 440;\n itemDef.modelRotation1 = 76;\n itemDef.modelRotation2 = 1850;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 1;\n itemDef.modelOffset2 = 1;\n itemDef.femaleEquipt = 187;\n itemDef.maleEquipt = 363;\n itemDef.anInt175 = 29;\n itemDef.anInt197 = 87;\n itemDef.name = \"Random Party Hat\";\n itemDef.description = \"An Random Party Hat.\";\n break;\n }\n case 8691: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 14898140;\n itemDef.groundModelId = 2635;\n itemDef.modelZoom = 440;\n itemDef.modelRotation1 = 76;\n itemDef.modelRotation2 = 1850;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 1;\n itemDef.modelOffset2 = 1;\n itemDef.femaleEquipt = 187;\n itemDef.maleEquipt = 363;\n itemDef.anInt175 = 29;\n itemDef.anInt197 = 87;\n itemDef.name = \"Random Party Hat\";\n itemDef.description = \"An Random Party Hat.\";\n break;\n }\n case 8693: {\n itemDef.groundModelId = 40920;\n itemDef.name = \"De'Vil spirit shield\";\n itemDef.description = \"It's a Spectral spirit shield\";\n itemDef.modifiedModelColors = new int[13];\n itemDef.originalModelColors = new int[13];\n itemDef.modifiedModelColors[0] = 44635;\n itemDef.originalModelColors[0] = 924;\n itemDef.modifiedModelColors[1] = 44612;\n itemDef.originalModelColors[1] = 924;\n itemDef.modifiedModelColors[2] = 44606;\n itemDef.originalModelColors[2] = 924;\n itemDef.modifiedModelColors[3] = 44615;\n itemDef.originalModelColors[3] = 924;\n itemDef.modifiedModelColors[4] = 44641;\n itemDef.originalModelColors[4] = 924;\n itemDef.modifiedModelColors[5] = 44564;\n itemDef.originalModelColors[5] = 924;\n itemDef.modifiedModelColors[6] = 44575;\n itemDef.originalModelColors[6] = 924;\n itemDef.modifiedModelColors[7] = 44618;\n itemDef.originalModelColors[7] = 924;\n itemDef.modifiedModelColors[8] = 105;\n itemDef.originalModelColors[8] = 105;\n itemDef.modifiedModelColors[9] = 44603;\n itemDef.originalModelColors[9] = 924;\n itemDef.modifiedModelColors[10] = 44570;\n itemDef.originalModelColors[10] = 924;\n itemDef.modifiedModelColors[11] = 4500;\n itemDef.originalModelColors[11] = 924;\n itemDef.modelZoom = 1616;\n itemDef.modelRotation1 = 396;\n itemDef.modelRotation2 = 1050;\n itemDef.modelOffset2 = -3;\n itemDef.modelOffset1 = 4;\n itemDef.femaleEquipt = 40940;\n itemDef.maleEquipt = 40940;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 8699: {\n itemDef.groundModelId = 40920;\n itemDef.name = \"Saradomin spirit shield\";\n itemDef.description = \"It's a Spectral spirit shield\";\n itemDef.modifiedModelColors = new int[13];\n itemDef.originalModelColors = new int[13];\n itemDef.modifiedModelColors[0] = 44635;\n itemDef.originalModelColors[0] = 105;\n itemDef.modifiedModelColors[1] = 44612;\n itemDef.originalModelColors[1] = 105;\n itemDef.modifiedModelColors[2] = 44606;\n itemDef.originalModelColors[2] = 105;\n itemDef.modifiedModelColors[3] = 44615;\n itemDef.originalModelColors[3] = 105;\n itemDef.modifiedModelColors[4] = 44641;\n itemDef.originalModelColors[4] = 105;\n itemDef.modifiedModelColors[5] = 44564;\n itemDef.originalModelColors[5] = 105;\n itemDef.modifiedModelColors[6] = 44575;\n itemDef.originalModelColors[6] = 105;\n itemDef.modifiedModelColors[7] = 44618;\n itemDef.originalModelColors[7] = 105;\n itemDef.modifiedModelColors[8] = 105;\n itemDef.originalModelColors[8] = 105;\n itemDef.modifiedModelColors[9] = 44603;\n itemDef.originalModelColors[9] = 105;\n itemDef.modifiedModelColors[10] = 44570;\n itemDef.originalModelColors[10] = 105;\n itemDef.modifiedModelColors[11] = 4500;\n itemDef.originalModelColors[11] = 105;\n itemDef.modelZoom = 1616;\n itemDef.modelRotation1 = 396;\n itemDef.modelRotation2 = 1050;\n itemDef.modelOffset2 = -3;\n itemDef.modelOffset1 = 4;\n itemDef.femaleEquipt = 40940;\n itemDef.maleEquipt = 40940;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 8701: {\n itemDef.groundModelId = 40920;\n itemDef.name = \"Lava spirit shield\";\n itemDef.description = \"It's a Spectral spirit shield\";\n itemDef.modifiedModelColors = new int[13];\n itemDef.originalModelColors = new int[13];\n itemDef.modifiedModelColors[0] = 44635;\n itemDef.originalModelColors[0] = 6073;\n itemDef.modifiedModelColors[1] = 44612;\n itemDef.originalModelColors[1] = 6073;\n itemDef.modifiedModelColors[2] = 44606;\n itemDef.originalModelColors[2] = 6073;\n itemDef.modifiedModelColors[3] = 44615;\n itemDef.originalModelColors[3] = 6073;\n itemDef.modifiedModelColors[4] = 44641;\n itemDef.originalModelColors[4] = 6073;\n itemDef.modifiedModelColors[5] = 44564;\n itemDef.originalModelColors[5] = 6073;\n itemDef.modifiedModelColors[6] = 44575;\n itemDef.originalModelColors[6] = 6073;\n itemDef.modifiedModelColors[7] = 44618;\n itemDef.originalModelColors[7] = 6073;\n itemDef.modifiedModelColors[8] = 105;\n itemDef.originalModelColors[8] = 105;\n itemDef.modifiedModelColors[9] = 44603;\n itemDef.originalModelColors[9] = 6073;\n itemDef.modifiedModelColors[10] = 44570;\n itemDef.originalModelColors[10] = 6073;\n itemDef.modifiedModelColors[11] = 4500;\n itemDef.originalModelColors[11] = 6073;\n itemDef.modelZoom = 1616;\n itemDef.modelRotation1 = 396;\n itemDef.modelRotation2 = 1050;\n itemDef.modelOffset2 = -3;\n itemDef.modelOffset1 = 4;\n itemDef.femaleEquipt = 40940;\n itemDef.maleEquipt = 40940;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 8717: {\n itemDef.groundModelId = 40920;\n itemDef.name = \"DOOM spirit shield\";\n itemDef.description = \"It's a Spectral spirit shield\";\n itemDef.modifiedModelColors = new int[13];\n itemDef.originalModelColors = new int[13];\n itemDef.modifiedModelColors[0] = 44635;\n itemDef.originalModelColors[0] = 1;\n itemDef.modifiedModelColors[1] = 44612;\n itemDef.originalModelColors[1] = 1;\n itemDef.modifiedModelColors[2] = 44606;\n itemDef.originalModelColors[2] = 1;\n itemDef.modifiedModelColors[3] = 44615;\n itemDef.originalModelColors[3] = 1;\n itemDef.modifiedModelColors[4] = 44641;\n itemDef.originalModelColors[4] = 1;\n itemDef.modifiedModelColors[5] = 44564;\n itemDef.originalModelColors[5] = 1;\n itemDef.modifiedModelColors[6] = 44575;\n itemDef.originalModelColors[6] = 1;\n itemDef.modifiedModelColors[7] = 44618;\n itemDef.originalModelColors[7] = 1;\n itemDef.modifiedModelColors[8] = 105;\n itemDef.originalModelColors[8] = 17350;\n itemDef.modifiedModelColors[9] = 44603;\n itemDef.originalModelColors[9] = 1;\n itemDef.modifiedModelColors[10] = 44570;\n itemDef.originalModelColors[10] = 1;\n itemDef.modifiedModelColors[11] = 4500;\n itemDef.originalModelColors[11] = 1;\n itemDef.modelZoom = 1616;\n itemDef.modelRotation1 = 396;\n itemDef.modelRotation2 = 1050;\n itemDef.modelOffset2 = -3;\n itemDef.modelOffset1 = 4;\n itemDef.femaleEquipt = 40940;\n itemDef.maleEquipt = 40940;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 8719: {\n itemDef.groundModelId = 40920;\n itemDef.name = \"Lime spirit shield\";\n itemDef.description = \"It's a Spectral spirit shield\";\n itemDef.modifiedModelColors = new int[13];\n itemDef.originalModelColors = new int[13];\n itemDef.modifiedModelColors[0] = 44635;\n itemDef.originalModelColors[0] = 17350;\n itemDef.modifiedModelColors[1] = 44612;\n itemDef.originalModelColors[1] = 17350;\n itemDef.modifiedModelColors[2] = 44606;\n itemDef.originalModelColors[2] = 17350;\n itemDef.modifiedModelColors[3] = 44615;\n itemDef.originalModelColors[3] = 17350;\n itemDef.modifiedModelColors[4] = 44641;\n itemDef.originalModelColors[4] = 17350;\n itemDef.modifiedModelColors[5] = 44564;\n itemDef.originalModelColors[5] = 17350;\n itemDef.modifiedModelColors[6] = 44575;\n itemDef.originalModelColors[6] = 17350;\n itemDef.modifiedModelColors[7] = 44618;\n itemDef.originalModelColors[7] = 17350;\n itemDef.modifiedModelColors[8] = 105;\n itemDef.originalModelColors[8] = 105;\n itemDef.modifiedModelColors[9] = 44603;\n itemDef.originalModelColors[9] = 17350;\n itemDef.modifiedModelColors[10] = 44570;\n itemDef.originalModelColors[10] = 17350;\n itemDef.modifiedModelColors[11] = 4500;\n itemDef.originalModelColors[11] = 17350;\n itemDef.modelZoom = 1616;\n itemDef.modelRotation1 = 396;\n itemDef.modelRotation2 = 1050;\n itemDef.modelOffset2 = -3;\n itemDef.modelOffset1 = 4;\n itemDef.femaleEquipt = 40940;\n itemDef.maleEquipt = 40940;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 8721: {\n itemDef.groundModelId = 40920;\n itemDef.name = \"Shaded spirit shield\";\n itemDef.description = \"It's a Spectral spirit shield\";\n itemDef.modifiedModelColors = new int[13];\n itemDef.originalModelColors = new int[13];\n itemDef.modifiedModelColors[0] = 44635;\n itemDef.originalModelColors[0] = 6028;\n itemDef.modifiedModelColors[1] = 44612;\n itemDef.originalModelColors[1] = 6028;\n itemDef.modifiedModelColors[2] = 44606;\n itemDef.originalModelColors[2] = 6028;\n itemDef.modifiedModelColors[3] = 44615;\n itemDef.originalModelColors[3] = 6028;\n itemDef.modifiedModelColors[4] = 44641;\n itemDef.originalModelColors[4] = 6028;\n itemDef.modifiedModelColors[5] = 44564;\n itemDef.originalModelColors[5] = 6028;\n itemDef.modifiedModelColors[6] = 44575;\n itemDef.originalModelColors[6] = 6028;\n itemDef.modifiedModelColors[7] = 44618;\n itemDef.originalModelColors[7] = 6028;\n itemDef.modifiedModelColors[8] = 105;\n itemDef.originalModelColors[8] = 105;\n itemDef.modifiedModelColors[9] = 44603;\n itemDef.originalModelColors[9] = 6028;\n itemDef.modifiedModelColors[10] = 44570;\n itemDef.originalModelColors[10] = 6028;\n itemDef.modifiedModelColors[11] = 4500;\n itemDef.originalModelColors[11] = 6028;\n itemDef.modelZoom = 1616;\n itemDef.modelRotation1 = 396;\n itemDef.modelRotation2 = 1050;\n itemDef.modelOffset2 = -3;\n itemDef.modelOffset1 = 4;\n itemDef.femaleEquipt = 40940;\n itemDef.maleEquipt = 40940;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 8723: {\n itemDef.groundModelId = 40920;\n itemDef.name = \"DragonBone shield\";\n itemDef.description = \"It's a Spectral spirit shield\";\n itemDef.modifiedModelColors = new int[13];\n itemDef.originalModelColors = new int[13];\n itemDef.modifiedModelColors[0] = 44635;\n itemDef.originalModelColors[0] = 44635;\n itemDef.modifiedModelColors[1] = 44612;\n itemDef.originalModelColors[1] = 44612;\n itemDef.modifiedModelColors[2] = 44606;\n itemDef.originalModelColors[2] = 44606;\n itemDef.modifiedModelColors[3] = 44615;\n itemDef.originalModelColors[3] = 44615;\n itemDef.modifiedModelColors[4] = 44641;\n itemDef.originalModelColors[4] = 6028;\n itemDef.modifiedModelColors[5] = 44564;\n itemDef.originalModelColors[5] = 44564;\n itemDef.modifiedModelColors[6] = 44575;\n itemDef.originalModelColors[6] = 44575;\n itemDef.modifiedModelColors[7] = 44618;\n itemDef.originalModelColors[7] = 44618;\n itemDef.modifiedModelColors[8] = 105;\n itemDef.originalModelColors[8] = 1;\n itemDef.modifiedModelColors[9] = 44603;\n itemDef.originalModelColors[9] = 44603;\n itemDef.modifiedModelColors[10] = 44570;\n itemDef.originalModelColors[10] = 6028;\n itemDef.modifiedModelColors[11] = 4500;\n itemDef.originalModelColors[11] = 4500;\n itemDef.modelZoom = 1616;\n itemDef.modelRotation1 = 396;\n itemDef.modelRotation2 = 1050;\n itemDef.modelOffset2 = -3;\n itemDef.modelOffset1 = 4;\n itemDef.femaleEquipt = 40940;\n itemDef.maleEquipt = 40940;\n itemDef.groundActions = new String[5];\n itemDef.groundActions[2] = \"Take\";\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n break;\n }\n case 8711: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 17350;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Lime h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14018: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 6028;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Bronze h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14019: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 33;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Iron h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14020: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 61;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Steel h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14021: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 6020;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Black h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14022: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 255;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"White h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14023: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 43297;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Mithril h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14024: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 21662;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Adamant h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14025: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 36252;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Rune h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14026: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 945;\n itemDef.originalModelColors[0] = 926;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Dragon h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14027: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 6073;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Lava h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14028: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.rdc3 = 521111;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Pink hell h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14029: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.rdc3 = 225555;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Green hell h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14030: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.rdc3 = 152222;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Lime hell h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14031: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.rdc3 = 834788;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"White hell h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14032: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.rdc3 = 1555;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Bronze hell h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14033: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.rdc3 = 52666;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Purple hell h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14034: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 51136;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Purple h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14035: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 290770;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Blurite h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 14036: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.itemActions[4] = \"Drop\";\n itemDef.modifiedModelColors = new int[1];\n itemDef.originalModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 926;\n itemDef.originalModelColors[0] = 226770;\n itemDef.groundModelId = 2438;\n itemDef.modelZoom = 730;\n itemDef.modelRotation1 = 516;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.modelOffset2 = -10;\n itemDef.femaleEquipt = 3188;\n itemDef.maleEquipt = 3192;\n itemDef.name = \"Aqua h'ween Mask\";\n itemDef.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 938: {\n itemDef.name = \"Robin hood hat\";\n itemDef.groundModelId = 3021;\n itemDef.stackable = false;\n itemDef.modifiedModelColors = new int[3];\n itemDef.originalModelColors = new int[3];\n itemDef.modifiedModelColors[0] = 15009;\n itemDef.originalModelColors[0] = 3745;\n itemDef.modifiedModelColors[1] = 17294;\n itemDef.originalModelColors[1] = 3982;\n itemDef.modifiedModelColors[2] = 15252;\n itemDef.originalModelColors[2] = 3988;\n itemDef.modelZoom = 650;\n itemDef.modelRotation1 = 2044;\n itemDef.modelRotation2 = 256;\n itemDef.modelOffset1 = -3;\n itemDef.modelOffset2 = -2;\n itemDef.femaleEquipt = 3378;\n itemDef.maleEquipt = 3382;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 939: {\n itemDef.name = \"Robin hood hat\";\n itemDef.groundModelId = 3021;\n itemDef.stackable = false;\n itemDef.modifiedModelColors = new int[3];\n itemDef.originalModelColors = new int[3];\n itemDef.modifiedModelColors[0] = 15009;\n itemDef.originalModelColors[0] = 30847;\n itemDef.modifiedModelColors[1] = 17294;\n itemDef.originalModelColors[1] = 32895;\n itemDef.modifiedModelColors[2] = 15252;\n itemDef.originalModelColors[2] = 30847;\n itemDef.modelZoom = 650;\n itemDef.modelRotation1 = 2044;\n itemDef.modelRotation2 = 256;\n itemDef.modelOffset1 = -3;\n itemDef.modelOffset2 = -2;\n itemDef.femaleEquipt = 3378;\n itemDef.maleEquipt = 3382;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 940: {\n itemDef.name = \"Robin hood hat\";\n itemDef.groundModelId = 3021;\n itemDef.stackable = false;\n itemDef.modifiedModelColors = new int[3];\n itemDef.originalModelColors = new int[3];\n itemDef.modifiedModelColors[0] = 15009;\n itemDef.originalModelColors[0] = 10015;\n itemDef.modifiedModelColors[1] = 17294;\n itemDef.originalModelColors[1] = 7730;\n itemDef.modifiedModelColors[2] = 15252;\n itemDef.originalModelColors[2] = 7973;\n itemDef.modelZoom = 650;\n itemDef.modelRotation1 = 2044;\n itemDef.modelRotation2 = 256;\n itemDef.modelOffset1 = -3;\n itemDef.modelOffset2 = -2;\n itemDef.femaleEquipt = 3378;\n itemDef.maleEquipt = 3382;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 941: {\n itemDef.name = \"Robin hood hat\";\n itemDef.groundModelId = 3021;\n itemDef.stackable = false;\n itemDef.modifiedModelColors = new int[3];\n itemDef.originalModelColors = new int[3];\n itemDef.modifiedModelColors[0] = 15009;\n itemDef.originalModelColors[0] = 35489;\n itemDef.modifiedModelColors[1] = 17294;\n itemDef.originalModelColors[1] = 37774;\n itemDef.modifiedModelColors[2] = 15252;\n itemDef.originalModelColors[2] = 35732;\n itemDef.modelZoom = 650;\n itemDef.modelRotation1 = 2044;\n itemDef.modelRotation2 = 256;\n itemDef.modelOffset1 = -3;\n itemDef.modelOffset2 = -2;\n itemDef.femaleEquipt = 3378;\n itemDef.maleEquipt = 3382;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 904: {\n itemDef.name = \"Gnome scarf\";\n itemDef.stackable = false;\n itemDef.groundModelId = 17125;\n itemDef.modifiedModelColors = new int[3];\n itemDef.originalModelColors = new int[3];\n itemDef.modifiedModelColors[0] = 119;\n itemDef.originalModelColors[0] = 7737;\n itemDef.modifiedModelColors[1] = 103;\n itemDef.originalModelColors[1] = 7737;\n itemDef.modifiedModelColors[2] = 127;\n itemDef.originalModelColors[2] = 7737;\n itemDef.modelZoom = 919;\n itemDef.modelRotation1 = 595;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = -7;\n itemDef.modelOffset2 = 8;\n itemDef.femaleEquipt = 17155;\n itemDef.maleEquipt = 17157;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 943: {\n itemDef.name = \"Gnome scarf\";\n itemDef.groundModelId = 17125;\n itemDef.stackable = false;\n itemDef.modifiedModelColors = new int[3];\n itemDef.originalModelColors = new int[3];\n itemDef.modifiedModelColors[0] = 119;\n itemDef.originalModelColors[0] = 725;\n itemDef.modifiedModelColors[1] = 103;\n itemDef.originalModelColors[1] = 725;\n itemDef.modifiedModelColors[2] = 127;\n itemDef.originalModelColors[2] = 725;\n itemDef.modelZoom = 919;\n itemDef.modelRotation1 = 595;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = -7;\n itemDef.modelOffset2 = 8;\n itemDef.femaleEquipt = 17155;\n itemDef.maleEquipt = 17157;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 906: {\n itemDef.name = \"Gnome scarf\";\n itemDef.groundModelId = 17125;\n itemDef.stackable = false;\n itemDef.modifiedModelColors = new int[3];\n itemDef.originalModelColors = new int[3];\n itemDef.modifiedModelColors[0] = 119;\n itemDef.originalModelColors[0] = -22250;\n itemDef.modifiedModelColors[1] = 103;\n itemDef.originalModelColors[1] = -22250;\n itemDef.modifiedModelColors[2] = 127;\n itemDef.originalModelColors[2] = -22250;\n itemDef.modelZoom = 919;\n itemDef.modelRotation1 = 595;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = -7;\n itemDef.modelOffset2 = 8;\n itemDef.femaleEquipt = 17155;\n itemDef.maleEquipt = 17157;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 899: {\n itemDef.name = \"Gnome scarf\";\n itemDef.groundModelId = 17125;\n itemDef.stackable = false;\n itemDef.modifiedModelColors = new int[3];\n itemDef.originalModelColors = new int[3];\n itemDef.modifiedModelColors[0] = 119;\n itemDef.originalModelColors[0] = 23970;\n itemDef.modifiedModelColors[1] = 103;\n itemDef.originalModelColors[1] = 23970;\n itemDef.modifiedModelColors[2] = 127;\n itemDef.originalModelColors[2] = 23970;\n itemDef.modelZoom = 919;\n itemDef.modelRotation1 = 595;\n itemDef.modelRotation2 = 0;\n itemDef.modelOffset1 = -7;\n itemDef.modelOffset2 = 8;\n itemDef.femaleEquipt = 17155;\n itemDef.maleEquipt = 17157;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 19904: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 57300;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Pink Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19905: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 1;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Black Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19906: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 33;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Iron Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19908: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 21662;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Adamant Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19909: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 43297;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Mithirl Whip\";\n itemDef.stackable = false;\n itemDef.description = \"a weapon from the abyss\";\n break;\n }\n case 19910: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 49823;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Elemental Whip\";\n itemDef.stackable = false;\n itemDef.description = \"a weapon from the abyss\";\n break;\n }\n case 19911: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 17350;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Lime Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19913: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 43072;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Steel Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19914: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 36133;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Rune Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19915: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 7833;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Barrows Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19916: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 6073;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Lava Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19907: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 6028;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Bronze Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19912: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 1000;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"Dragon Whip\";\n itemDef.stackable = false;\n itemDef.description = \"A weapon from the abyss.\";\n break;\n }\n case 19917: {\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.originalModelColors = new int[1];\n itemDef.originalModelColors[0] = 255;\n itemDef.modifiedModelColors = new int[1];\n itemDef.modifiedModelColors[0] = 944;\n itemDef.groundModelId = 5412;\n itemDef.modelZoom = 840;\n itemDef.modelRotation1 = 280;\n itemDef.modelRotation2 = 0;\n itemDef.anInt204 = 0;\n itemDef.modelOffset1 = -2;\n itemDef.modelOffset2 = 56;\n itemDef.femaleEquipt = 5409;\n itemDef.maleEquipt = 5409;\n itemDef.anInt188 = -1;\n itemDef.anInt164 = -1;\n itemDef.anInt175 = -1;\n itemDef.anInt197 = -1;\n itemDef.name = \"White Whip\";\n itemDef.description = \"A weapon from the abyss.\";\n itemDef.stackable = false;\n break;\n }\n case 798: {\n itemDef.name = \"Trickster helm\";\n itemDef.description = \"Its a Trickster helm\";\n itemDef.maleEquipt = 44764;\n itemDef.femaleEquipt = 44764;\n itemDef.groundModelId = 45328;\n itemDef.modelRotation1 = 5;\n itemDef.modelRotation2 = 1889;\n itemDef.modelZoom = 738;\n itemDef.modelOffset2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 796: {\n itemDef.name = \"Trickster robe\";\n itemDef.description = \"Its a Trickster robe\";\n itemDef.maleEquipt = 44786;\n itemDef.femaleEquipt = 44786;\n itemDef.groundModelId = 45329;\n itemDef.modelRotation1 = 593;\n itemDef.modelRotation2 = 2041;\n itemDef.modelZoom = 1420;\n itemDef.modelOffset2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 797: {\n itemDef.name = \"Trickster robe legs\";\n itemDef.description = \"Its a Trickster robe\";\n itemDef.maleEquipt = 44770;\n itemDef.femaleEquipt = 44770;\n itemDef.groundModelId = 45335;\n itemDef.modelRotation1 = 567;\n itemDef.modelRotation2 = 1023;\n itemDef.modelZoom = 2105;\n itemDef.modelOffset2 = 0;\n itemDef.modelOffset1 = 0;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n break;\n }\n case 1685: {\n itemDef.groundModelId = 45316;\n itemDef.name = \"Trickster boots\";\n itemDef.description = \"Its a Trickster boot\";\n itemDef.modelZoom = 848;\n itemDef.modelRotation2 = 141;\n itemDef.modelRotation1 = 141;\n itemDef.modelOffset1 = -9;\n itemDef.modelOffset2 = 0;\n itemDef.stackable = false;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.maleEquipt = 44757;\n itemDef.femaleEquipt = 44757;\n break;\n }\n case 894: {\n itemDef.groundModelId = 45317;\n itemDef.name = \"Trickster gloves\";\n itemDef.description = \"Its a Trickster glove\";\n itemDef.modelZoom = 830;\n itemDef.modelRotation2 = 150;\n itemDef.modelRotation1 = 536;\n itemDef.modelOffset1 = 1;\n itemDef.modelOffset2 = 3;\n itemDef.stackable = false;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.maleEquipt = 44761;\n itemDef.femaleEquipt = 44761;\n break;\n }\n case 895: {\n itemDef.groundModelId = 44633;\n itemDef.name = \"Vanguard helm\";\n itemDef.description = \"Its a Vanguard helm\";\n itemDef.modelZoom = 855;\n itemDef.modelRotation1 = 1966;\n itemDef.modelRotation2 = 5;\n itemDef.modelOffset2 = 4;\n itemDef.modelOffset1 = -1;\n itemDef.stackable = false;\n itemDef.itemActions = new String[5];\n itemDef.itemActions[1] = \"Wear\";\n itemDef.maleEquipt = 44769;\n itemDef.femaleEquipt = 44769;\n break;\n }\n case 896: {\n itemDef.groundModelId = 44627;\n itemDef.name = \"Vanguard body\";\n itemDef.description = \"Its a Vanguard body\";\n itemDef.modelZoom = 1513;\n itemDef.modelRotation2 = 2041;\n itemDef.modelRotation1 = 593;\n var1_1.modelOffset1 = 3;\n var1_1.modelOffset2 = -11;\n var1_1.stackable = false;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.maleEquipt = 44812;\n var1_1.femaleEquipt = 44812;\n break;\n }\n case 2052: {\n var1_1.groundModelId = 79903;\n var1_1.name = \"Vanguard legs\";\n var1_1.description = \"Its a Vanguard legs\";\n var1_1.modelZoom = 1711;\n var1_1.modelRotation2 = 0;\n var1_1.modelRotation1 = 360;\n var1_1.modelOffset1 = 3;\n var1_1.modelOffset2 = -11;\n var1_1.stackable = false;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.maleEquipt = 44768;\n var1_1.femaleEquipt = 44768;\n break;\n }\n case 898: {\n var1_1.groundModelId = 79340;\n var1_1.name = \"Vanguard gloves\";\n var1_1.description = \"Its a Vanguard glove\";\n var1_1.modelZoom = 830;\n var1_1.modelRotation2 = 0;\n var1_1.modelRotation1 = 536;\n var1_1.modelOffset1 = 9;\n var1_1.modelOffset2 = 3;\n var1_1.stackable = false;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.maleEquipt = 44758;\n var1_1.femaleEquipt = 44758;\n break;\n }\n case 18995: {\n var1_1.groundModelId = 44700;\n var1_1.name = \"Vanguard boots\";\n var1_1.description = \"Its a Vanguard boot\";\n var1_1.modelZoom = 848;\n var1_1.modelRotation2 = 141;\n var1_1.modelRotation1 = 141;\n var1_1.modelOffset1 = 4;\n var1_1.modelOffset2 = 0;\n var1_1.stackable = false;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.maleEquipt = 44752;\n var1_1.femaleEquipt = 44752;\n break;\n }\n case 900: {\n var1_1.groundModelId = 44704;\n var1_1.name = \"Battle-mage hat\";\n var1_1.description = \"Its a Battle-mage hat\";\n var1_1.modelZoom = 658;\n var1_1.modelRotation2 = 1898;\n var1_1.modelRotation1 = 2;\n var1_1.modelOffset1 = 12;\n var1_1.modelOffset2 = 3;\n var1_1.stackable = false;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.maleEquipt = 44767;\n var1_1.femaleEquipt = 44767;\n break;\n }\n case 901: {\n var1_1.groundModelId = 44631;\n var1_1.name = \"Battle-mage robe\";\n var1_1.description = \"Its a Battle-mage robe\";\n var1_1.modelZoom = 1382;\n var1_1.modelRotation2 = 3;\n var1_1.modelRotation1 = 488;\n var1_1.modelOffset1 = 1;\n var1_1.modelOffset2 = 0;\n var1_1.stackable = false;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.maleEquipt = 44818;\n var1_1.femaleEquipt = 44818;\n break;\n }\n case 902: {\n var1_1.groundModelId = 44672;\n var1_1.name = \"Battle-mage robe legs\";\n var1_1.description = \"Its a Battle-mage legs\";\n var1_1.modelZoom = 1842;\n var1_1.modelRotation2 = 1024;\n var1_1.modelRotation1 = 498;\n var1_1.modelOffset1 = 4;\n var1_1.modelOffset2 = -1;\n var1_1.stackable = false;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.maleEquipt = 44775;\n var1_1.femaleEquipt = 44775;\n break;\n }\n case 903: {\n var1_1.groundModelId = 44662;\n var1_1.name = \"Battle-mage boots\";\n var1_1.description = \"Its a Battle-mage boot\";\n var1_1.modelZoom = 987;\n var1_1.modelRotation2 = 1988;\n var1_1.modelRotation1 = 188;\n var1_1.modelOffset1 = -8;\n var1_1.modelOffset2 = 5;\n var1_1.stackable = false;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.maleEquipt = 44755;\n var1_1.femaleEquipt = 44755;\n break;\n }\n case 18994: {\n var1_1.groundModelId = 79341;\n var1_1.name = \"Battle-mage gloves\";\n var1_1.description = \"Its a Battle-mage glove\";\n var1_1.modelZoom = 1053;\n var1_1.modelRotation2 = 0;\n var1_1.modelRotation1 = 536;\n var1_1.modelOffset1 = 3;\n var1_1.modelOffset2 = 0;\n var1_1.stackable = false;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.maleEquipt = 44762;\n var1_1.femaleEquipt = 44762;\n break;\n }\n case 19016: {\n var1_1.name = \"Mario chomp chomp\";\n var1_1.value = 2000000000;\n var1_1.femaleEquipt = 19016;\n var1_1.maleEquipt = 19016;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n var1_1.groundModelId = 19016;\n var1_1.stackable = false;\n var1_1.description = \"Chomp Chomp!!\";\n var1_1.modelZoom = 1250;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wield\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 484;\n break;\n }\n case 19017: {\n var1_1.name = \"Iron Man Hat\";\n var1_1.value = 2000000000;\n var1_1.femaleEquipt = 71924;\n var1_1.maleEquipt = 71924;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n var1_1.groundModelId = 728;\n var1_1.stackable = false;\n var1_1.description = \"Some metalics shits!\";\n var1_1.modelZoom = 1250;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wield\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 484;\n break;\n }\n case 19019: {\n var1_1.groundModelId = 4423;\n var1_1.name = \"MineCraft Helm\";\n var1_1.description = \"MineCraft Helmet\";\n var1_1.modelZoom = 980;\n var1_1.modelRotation1 = 208;\n var1_1.modelRotation2 = 220;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -18;\n var1_1.femaleEquipt = 4424;\n var1_1.maleEquipt = 4424;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Craft\";\n break;\n }\n case 19022: {\n var1_1.groundModelId = 12234;\n var1_1.name = \"Bandos C'bow\";\n var1_1.description = \"Its a cbow make be bandos.\";\n var1_1.modelZoom = 1100;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 550;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -1;\n var1_1.femaleEquipt = 12233;\n var1_1.maleEquipt = 12233;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 19023: {\n var1_1.groundModelId = 13421;\n var1_1.name = \"Dragon C'bow\";\n var1_1.description = \"Its a cbow make be dragon plate.\";\n var1_1.modelZoom = 1100;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 550;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -1;\n var1_1.femaleEquipt = 13422;\n var1_1.maleEquipt = 13422;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 19024: {\n var1_1.groundModelId = 13086;\n var1_1.name = \"Obsidian bandos shield\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 2000;\n var1_1.modelRotation1 = 572;\n var1_1.modelRotation2 = 1000;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 16;\n var1_1.femaleEquipt = 13087;\n var1_1.maleEquipt = 13087;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 19025: {\n var1_1.groundModelId = 8394;\n var1_1.name = \"Birdy suit\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1250;\n var1_1.modelRotation1 = 494;\n var1_1.modelRotation2 = 484;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n var1_1.femaleEquipt = 8394;\n var1_1.maleEquipt = 8394;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 8878: {\n var1_1.groundModelId = 13088;\n var1_1.name = \"Demon wind\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1967;\n var1_1.modelRotation1 = 434;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.femaleEquipt = 13089;\n var1_1.maleEquipt = 13089;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 19031: {\n var1_1.groundModelId = 10031;\n var1_1.name = \"Paper Bag\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 2500;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 383;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -1;\n var1_1.femaleEquipt = 10031;\n var1_1.maleEquipt = 10031;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 19033: {\n var1_1.groundModelId = 14680;\n var1_1.name = \"Bow of Fame\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1957;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 484;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -1;\n var1_1.femaleEquipt = 14679;\n var1_1.maleEquipt = 14679;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 19035: {\n var1_1.groundModelId = 13701;\n var1_1.name = \"Deathful Kite\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1560;\n var1_1.modelRotation1 = 344;\n var1_1.modelRotation2 = 1104;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -6;\n var1_1.femaleEquipt = 13700;\n var1_1.maleEquipt = 13700;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 19036: {\n var1_1.groundModelId = 13701;\n var1_1.name = \"@yel@Yellow Deathful Kite\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1560;\n var1_1.modelRotation1 = 344;\n var1_1.modelRotation2 = 1104;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -6;\n var1_1.femaleEquipt = 13700;\n var1_1.maleEquipt = 13700;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 782;\n var1_1.originalModelColors[0] = 14030;\n var1_1.modifiedModelColors[1] = 1818;\n var1_1.originalModelColors[1] = 14304;\n var1_1.modifiedModelColors[2] = 10317;\n var1_1.originalModelColors[2] = 1818;\n break;\n }\n case 19037: {\n var1_1.groundModelId = 13701;\n var1_1.name = \"@gre@Lime Deathful Kite\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1560;\n var1_1.modelRotation1 = 344;\n var1_1.modelRotation2 = 1104;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -6;\n var1_1.femaleEquipt = 13700;\n var1_1.maleEquipt = 13700;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 782;\n var1_1.originalModelColors[0] = 22974;\n var1_1.modifiedModelColors[1] = 1818;\n var1_1.originalModelColors[1] = 17350;\n var1_1.modifiedModelColors[2] = 10317;\n var1_1.originalModelColors[2] = 1818;\n break;\n }\n case 19038: {\n var1_1.groundModelId = 13701;\n var1_1.name = \"@blu@Purple Deathful Kite\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1560;\n var1_1.modelRotation1 = 344;\n var1_1.modelRotation2 = 1104;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -6;\n var1_1.femaleEquipt = 13700;\n var1_1.maleEquipt = 13700;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 782;\n var1_1.originalModelColors[0] = 46777;\n var1_1.modifiedModelColors[1] = 1818;\n var1_1.originalModelColors[1] = 45510;\n var1_1.modifiedModelColors[2] = 10317;\n var1_1.originalModelColors[2] = 1818;\n break;\n }\n case 19039: {\n var1_1.groundModelId = 13701;\n var1_1.name = \"@whi@White Deathful Kite\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1560;\n var1_1.modelRotation1 = 344;\n var1_1.modelRotation2 = 1104;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -6;\n var1_1.femaleEquipt = 13700;\n var1_1.maleEquipt = 13700;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 782;\n var1_1.originalModelColors[0] = 255;\n var1_1.modifiedModelColors[1] = 1818;\n var1_1.originalModelColors[1] = 255;\n var1_1.modifiedModelColors[2] = 10317;\n var1_1.originalModelColors[2] = 1818;\n break;\n }\n case 19040: {\n var1_1.groundModelId = 13701;\n var1_1.name = \"@bla@Black Deathful Kite\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1560;\n var1_1.modelRotation1 = 344;\n var1_1.modelRotation2 = 1104;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -6;\n var1_1.femaleEquipt = 13700;\n var1_1.maleEquipt = 13700;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 782;\n var1_1.originalModelColors[0] = 1;\n var1_1.modifiedModelColors[1] = 1818;\n var1_1.originalModelColors[1] = 1;\n var1_1.modifiedModelColors[2] = 10317;\n var1_1.originalModelColors[2] = 1818;\n break;\n }\n case 19034: {\n var1_1.groundModelId = 13701;\n var1_1.name = \"@blu@Blue Deathful Kite\";\n var1_1.description = \"Blablabla\";\n var1_1.modelZoom = 1560;\n var1_1.modelRotation1 = 344;\n var1_1.modelRotation2 = 1104;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -6;\n var1_1.femaleEquipt = 13700;\n var1_1.maleEquipt = 13700;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 782;\n var1_1.originalModelColors[0] = 33743;\n var1_1.modifiedModelColors[1] = 1818;\n var1_1.originalModelColors[1] = 33251;\n var1_1.modifiedModelColors[2] = 10317;\n var1_1.originalModelColors[2] = 1818;\n break;\n }\n case 9506: {\n var1_1.name = \"imagine's epic sword\";\n var1_1.value = 2000000000;\n var1_1.femaleEquipt = 546;\n var1_1.maleEquipt = 546;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.groundModelId = 2754;\n var1_1.stackable = false;\n var1_1.description = \"Nothing to say.\";\n var1_1.modelZoom = 1561;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"@yel@ Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 354;\n var1_1.modelRotation2 = 1513;\n var1_1.modifiedModelColors = new int[6];\n var1_1.originalModelColors = new int[6];\n var1_1.modifiedModelColors[0] = 127;\n var1_1.originalModelColors[0] = 45877;\n var1_1.modifiedModelColors[1] = 82;\n var1_1.originalModelColors[1] = 35292;\n var1_1.modifiedModelColors[2] = 75;\n var1_1.originalModelColors[2] = 13013;\n var1_1.modifiedModelColors[3] = 41;\n var1_1.originalModelColors[3] = 22845;\n var1_1.modifiedModelColors[4] = 48;\n var1_1.originalModelColors[4] = 694;\n var1_1.modifiedModelColors[5] = 57;\n var1_1.originalModelColors[5] = 694;\n break;\n }\n case 9507: {\n var1_1.name = \"imagine's epic scim\";\n var1_1.value = 2000000000;\n var1_1.femaleEquipt = 490;\n var1_1.maleEquipt = 490;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 4;\n var1_1.modelOffset2 = -3;\n var1_1.groundModelId = 2373;\n var1_1.stackable = false;\n var1_1.description = \"Nothing to say.\";\n var1_1.modelZoom = 1513;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"@yel@ Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 525;\n var1_1.modelRotation2 = 40;\n var1_1.modifiedModelColors = new int[6];\n var1_1.originalModelColors = new int[6];\n var1_1.modifiedModelColors[0] = 127;\n var1_1.originalModelColors[0] = 45877;\n var1_1.modifiedModelColors[1] = 82;\n var1_1.originalModelColors[1] = 35292;\n var1_1.modifiedModelColors[2] = 75;\n var1_1.originalModelColors[2] = 13013;\n var1_1.modifiedModelColors[3] = 41;\n var1_1.originalModelColors[3] = 22845;\n var1_1.modifiedModelColors[4] = 48;\n var1_1.originalModelColors[4] = 694;\n var1_1.modifiedModelColors[5] = 57;\n var1_1.originalModelColors[5] = 694;\n break;\n }\n case 4000: {\n var1_1.name = \"@blu@Mastering ranging cape\";\n var1_1.value = 2147000000;\n var1_1.femaleEquipt = 18948;\n var1_1.maleEquipt = 18985;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.groundModelId = 19063;\n var1_1.stackable = false;\n var1_1.description = \"You must be 126 ranging to wear this mastered cape.\";\n var1_1.modelZoom = 2128;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 504;\n var1_1.modelRotation2 = 0;\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 57280;\n var1_1.originalModelColors[0] = 34776;\n var1_1.modifiedModelColors[1] = 15128;\n var1_1.originalModelColors[1] = 44981;\n break;\n }\n case 4001: {\n var1_1.name = \"@blu@Mastered ranging hood\";\n var1_1.value = 2147000000;\n var1_1.femaleEquipt = 18914;\n var1_1.maleEquipt = 18967;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.groundModelId = 19058;\n var1_1.stackable = false;\n var1_1.description = \"A hood from masted ranging.\";\n var1_1.modelZoom = 720;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Put on\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 21;\n var1_1.modelRotation2 = 18;\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 960;\n var1_1.originalModelColors[0] = 44981;\n var1_1.modifiedModelColors[1] = 15128;\n var1_1.originalModelColors[1] = 34776;\n var1_1.modifiedModelColors[2] = 15252;\n var1_1.originalModelColors[2] = 34776;\n var1_1.modifiedModelColors[3] = 43968;\n var1_1.originalModelColors[3] = 34776;\n break;\n }\n case 4002: {\n var1_1.name = \"@yel@Spongebob Bones\";\n var1_1.value = 2147000000;\n var1_1.femaleEquipt = -1;\n var1_1.maleEquipt = -1;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.groundModelId = 2768;\n var1_1.stackable = false;\n var1_1.description = \"its a bone from spongebob.\";\n var1_1.modelZoom = 1830;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[0] = \"Give to spongebob mom\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 216;\n var1_1.modelRotation2 = 648;\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 127;\n var1_1.originalModelColors[0] = 14302;\n break;\n }\n case 4004: {\n var1_1.name = \"@yel@Perfect Hood\";\n var1_1.value = 2147000000;\n var1_1.femaleEquipt = 33200;\n var1_1.maleEquipt = 33254;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -4;\n var1_1.groundModelId = 33185;\n var1_1.stackable = false;\n var1_1.description = \"Its a pefect hood.\";\n var1_1.modelZoom = 724;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Give a damn\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 84;\n var1_1.modelRotation2 = 1979;\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 50079;\n var1_1.originalModelColors[0] = 3002;\n var1_1.modifiedModelColors[1] = 50086;\n var1_1.originalModelColors[1] = 12761;\n var1_1.modifiedModelColors[2] = 50072;\n var1_1.originalModelColors[2] = 34784;\n var1_1.modifiedModelColors[3] = 50058;\n var1_1.originalModelColors[3] = 46015;\n break;\n }\n case 4005: {\n var1_1.name = \"@yel@Perfect coins\";\n var1_1.value = 2147000000;\n var1_1.femaleEquipt = -1;\n var1_1.maleEquipt = -1;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 3;\n var1_1.modelOffset2 = 0;\n var1_1.groundModelId = 2484;\n var1_1.stackable = true;\n var1_1.description = \"Its a pefect key.\";\n var1_1.modelZoom = 710;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 184;\n var1_1.modelRotation2 = 2012;\n var1_1.modifiedModelColors = new int[5];\n var1_1.originalModelColors = new int[5];\n var1_1.modifiedModelColors[0] = 8128;\n var1_1.originalModelColors[0] = 46767;\n break;\n }\n case 12150: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.groundModelId = 14125;\n var1_1.modelZoom = 2000;\n var1_1.modelRotation1 = 572;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.anInt204 = 0;\n var1_1.femaleEquipt = 14126;\n var1_1.maleEquipt = 14126;\n var1_1.anInt188 = -1;\n var1_1.anInt164 = -1;\n var1_1.anInt175 = -1;\n var1_1.anInt197 = -1;\n var1_1.name = \"Mod Cape\";\n var1_1.stackable = false;\n var1_1.description = \"A cape worn by player Moderators.\";\n break;\n }\n case 12151: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.groundModelId = 14127;\n var1_1.modelZoom = 2000;\n var1_1.modelRotation1 = 572;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.anInt204 = 0;\n var1_1.femaleEquipt = 14128;\n var1_1.maleEquipt = 14128;\n var1_1.anInt188 = -1;\n var1_1.anInt164 = -1;\n var1_1.anInt175 = -1;\n var1_1.anInt197 = -1;\n var1_1.name = \"Admin Cape\";\n var1_1.description = \"A cape worn by Administrators\";\n break;\n }\n case 1391: {\n var1_1.name = \"Ethereal battlestaff\";\n var1_1.description = \"Provides extra damage while casting the storm of ethereal\";\n var1_1.maleEquipt = 53577;\n var1_1.femaleEquipt = 53577;\n var1_1.groundModelId = 58945;\n var1_1.modelRotation1 = 450;\n var1_1.modelRotation2 = 1330;\n var1_1.modelZoom = 2925;\n var1_1.modelOffset2 = 0;\n var1_1.modelOffset1 = 0;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n break;\n }\n case 12152: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.groundModelId = 14129;\n var1_1.modelZoom = 2000;\n var1_1.modelRotation1 = 572;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.anInt204 = 0;\n var1_1.femaleEquipt = 14130;\n var1_1.maleEquipt = 14130;\n var1_1.anInt188 = -1;\n var1_1.anInt164 = -1;\n var1_1.anInt175 = -1;\n var1_1.anInt197 = -1;\n var1_1.name = \"Owner Cape\";\n var1_1.description = \"A cape worn by Owners.\";\n break;\n }\n case 8713: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 10388;\n var1_1.groundModelId = 2438;\n var1_1.modelZoom = 730;\n var1_1.modelRotation1 = 516;\n var1_1.modelRotation2 = 0;\n var1_1.anInt204 = 0;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -10;\n var1_1.femaleEquipt = 3188;\n var1_1.maleEquipt = 3192;\n var1_1.name = \"Barrows h'ween Mask\";\n var1_1.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 8715: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 6028;\n var1_1.groundModelId = 2438;\n var1_1.modelZoom = 730;\n var1_1.modelRotation1 = 516;\n var1_1.modelRotation2 = 0;\n var1_1.anInt204 = 0;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -10;\n var1_1.femaleEquipt = 3188;\n var1_1.maleEquipt = 3192;\n var1_1.name = \"Shaded h'ween Mask\";\n var1_1.description = \"AaaarrrgmodelRotation1h... I'm a monster.\";\n break;\n }\n case 19997: {\n var1_1.name = \"Mod body\";\n var1_1.value = 60000;\n var1_1.femaleEquipt = 12847;\n var1_1.maleEquipt = 14436;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 1;\n var1_1.modelOffset2 = 0;\n var1_1.groundModelId = 19853;\n var1_1.stackable = false;\n var1_1.description = \"mod body bitch gtfo if your not a mod.\";\n var1_1.modelZoom = 1447;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 539;\n var1_1.modelRotation2 = 0;\n break;\n }\n case 19996: {\n var1_1.name = \"Mod legs\";\n var1_1.value = 60000;\n var1_1.femaleEquipt = 12845;\n var1_1.maleEquipt = 14418;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 8;\n var1_1.modelOffset2 = 7;\n var1_1.groundModelId = 18109;\n var1_1.stackable = false;\n var1_1.description = \"mod legs bitch gtfo if your not a mod.\";\n var1_1.modelZoom = 1742;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 526;\n var1_1.modelRotation2 = 229;\n break;\n }\n case 19995: {\n var1_1.name = \"Mod boots\";\n var1_1.value = 60000;\n var1_1.femaleEquipt = 10367;\n var1_1.maleEquipt = 14398;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -7;\n var1_1.groundModelId = 21879;\n var1_1.stackable = false;\n var1_1.description = \"mod boots bitch gtfo if your not a mod.\";\n var1_1.modelZoom = 615;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 173;\n var1_1.modelRotation2 = 2039;\n break;\n }\n case 19994: {\n var1_1.name = \"Mod gloves\";\n var1_1.value = 60000;\n var1_1.femaleEquipt = 12839;\n var1_1.maleEquipt = 14406;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelOffset1 = 3;\n var1_1.modelOffset2 = -4;\n var1_1.groundModelId = 12839;\n var1_1.stackable = false;\n var1_1.description = \"mod gloves bitch gtfo if your not a mod.\";\n var1_1.modelZoom = 658;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modelRotation1 = 485;\n var1_1.modelRotation2 = 0;\n break;\n }\n case 4278: {\n var1_1.name = \"@gre@Unicorns Token\";\n break;\n }\n case 3606: {\n var1_1.name = \"@yel@Yellow Key\";\n break;\n }\n case 13234: {\n var1_1.name = \"@yel@Custom Key\";\n break;\n }\n case 13360: {\n var1_1.groundModelId = 62701;\n var1_1.name = \"Torva platelegs\";\n var1_1.description = \"Torva platelegs.\";\n var1_1.modelZoom = 1740;\n var1_1.modelRotation1 = 474;\n var1_1.modelRotation2 = 2045;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -5;\n var1_1.femaleEquipt = 62743;\n var1_1.maleEquipt = 62760;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[2] = \"Check-charges\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 13358: {\n var1_1.groundModelId = 62699;\n var1_1.name = \"Torva platebody\";\n var1_1.description = \"Torva Platebody.\";\n var1_1.modelZoom = 1506;\n var1_1.modelRotation1 = 473;\n var1_1.modelRotation2 = 2042;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.femaleEquipt = 62746;\n var1_1.maleEquipt = 62762;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[2] = \"Check-charges\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 13355: {\n var1_1.groundModelId = 62693;\n var1_1.name = \"Pernix cowl\";\n var1_1.description = \"Pernix cowl\";\n var1_1.modelZoom = 800;\n var1_1.modelRotation1 = 532;\n var1_1.modelRotation2 = 14;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = 1;\n var1_1.femaleEquipt = 62739;\n var1_1.maleEquipt = 62756;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[2] = \"Check-charges\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.anInt175 = 62731;\n var1_1.anInt197 = 62727;\n break;\n }\n case 15152: {\n var1_1.groundModelId = 2635;\n var1_1.name = \"Black Partyhat\";\n var1_1.description = \"A new color :3\";\n var1_1.modelZoom = 440;\n var1_1.modelRotation2 = 1845;\n var1_1.modelRotation1 = 121;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.stackable = false;\n var1_1.value = 1;\n var1_1.femaleEquipt = 187;\n var1_1.maleEquipt = 363;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 1;\n break;\n }\n case 19877: {\n var1_1.groundModelId = 2635;\n var1_1.name = \"Pink Partyhat\";\n var1_1.description = \"A new color :3\";\n var1_1.modelZoom = 440;\n var1_1.modelRotation2 = 1845;\n var1_1.modelRotation1 = 121;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.stackable = false;\n var1_1.value = 1;\n var1_1.femaleEquipt = 187;\n var1_1.maleEquipt = 363;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 57050;\n break;\n }\n case 15154: {\n var1_1.groundModelId = 2635;\n var1_1.name = \"Cyan Partyhat\";\n var1_1.description = \"A new color :3\";\n var1_1.modelZoom = 440;\n var1_1.modelRotation2 = 1845;\n var1_1.modelRotation1 = 121;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.stackable = false;\n var1_1.value = 1;\n var1_1.femaleEquipt = 187;\n var1_1.maleEquipt = 363;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 30296;\n break;\n }\n case 15156: {\n var1_1.groundModelId = 2635;\n var1_1.name = \"Orange Partyhat\";\n var1_1.description = \"A new color :3\";\n var1_1.modelZoom = 440;\n var1_1.modelRotation2 = 1845;\n var1_1.modelRotation1 = 121;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.stackable = false;\n var1_1.value = 1;\n var1_1.femaleEquipt = 187;\n var1_1.maleEquipt = 363;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 5947;\n break;\n }\n case 15158: {\n var1_1.groundModelId = 2635;\n var1_1.name = \"God Partyhat\";\n var1_1.description = \"A new color :3\";\n var1_1.modelZoom = 440;\n var1_1.modelRotation2 = 1845;\n var1_1.modelRotation1 = 121;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.stackable = false;\n var1_1.value = 1;\n var1_1.femaleEquipt = 187;\n var1_1.maleEquipt = 363;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 44580;\n break;\n }\n case 15160: {\n var1_1.groundModelId = 2635;\n var1_1.name = \"Abyss Partyhat\";\n var1_1.description = \"A new color :3\";\n var1_1.modelZoom = 440;\n var1_1.modelRotation2 = 1845;\n var1_1.modelRotation1 = 121;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.stackable = false;\n var1_1.value = 1;\n var1_1.femaleEquipt = 187;\n var1_1.maleEquipt = 363;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 63650;\n break;\n }\n case 15162: {\n var1_1.groundModelId = 2635;\n var1_1.name = \"Forest Partyhat\";\n var1_1.description = \"A new color :3\";\n var1_1.modelZoom = 440;\n var1_1.modelRotation2 = 1845;\n var1_1.modelRotation1 = 121;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.stackable = false;\n var1_1.value = 1;\n var1_1.femaleEquipt = 187;\n var1_1.maleEquipt = 363;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 25371;\n break;\n }\n case 15164: {\n var1_1.groundModelId = 2635;\n var1_1.name = \"Sky Partyhat\";\n var1_1.description = \"A new color :3\";\n var1_1.modelZoom = 440;\n var1_1.modelRotation2 = 1845;\n var1_1.modelRotation1 = 121;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 1;\n var1_1.stackable = false;\n var1_1.value = 1;\n var1_1.femaleEquipt = 187;\n var1_1.maleEquipt = 363;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 34258;\n break;\n }\n case 18743: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 0;\n var1_1.groundModelId = 3288;\n var1_1.modelZoom = 2500;\n var1_1.modelRotation1 = 1500;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = -40;\n var1_1.modelOffset2 = -90;\n var1_1.femaleEquipt = 79902;\n var1_1.maleEquipt = 79902;\n var1_1.anInt175 = 14;\n var1_1.anInt197 = 7;\n var1_1.name = \"@red@Death cape@red@\";\n break;\n }\n case 19010: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 0;\n var1_1.groundModelId = 3288;\n var1_1.modelZoom = 2500;\n var1_1.modelRotation1 = 1500;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = -40;\n var1_1.modelOffset2 = -90;\n var1_1.femaleEquipt = 79902;\n var1_1.maleEquipt = 79902;\n var1_1.anInt175 = 14;\n var1_1.anInt197 = 7;\n var1_1.name = \"@yel@Death cape@red@\";\n var1_1.modifiedModelColors = new int[7];\n var1_1.originalModelColors = new int[7];\n var1_1.modifiedModelColors[0] = 1;\n var1_1.originalModelColors[0] = 14030;\n var1_1.modifiedModelColors[1] = 9230;\n var1_1.originalModelColors[1] = 14304;\n var1_1.modifiedModelColors[2] = 11013;\n var1_1.originalModelColors[2] = 14304;\n var1_1.modifiedModelColors[3] = 23;\n var1_1.originalModelColors[3] = 14030;\n var1_1.modifiedModelColors[4] = 40036;\n var1_1.originalModelColors[4] = 14030;\n var1_1.modifiedModelColors[5] = 10348;\n var1_1.originalModelColors[5] = 14030;\n var1_1.modifiedModelColors[6] = 1822;\n var1_1.originalModelColors[6] = 14030;\n break;\n }\n case 19013: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 0;\n var1_1.groundModelId = 3288;\n var1_1.modelZoom = 2500;\n var1_1.modelRotation1 = 1500;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = -40;\n var1_1.modelOffset2 = -90;\n var1_1.femaleEquipt = 79902;\n var1_1.maleEquipt = 79902;\n var1_1.anInt175 = 14;\n var1_1.anInt197 = 7;\n var1_1.name = \"@blu@Death cape@red@\";\n var1_1.modifiedModelColors = new int[7];\n var1_1.originalModelColors = new int[7];\n var1_1.modifiedModelColors[0] = 1;\n var1_1.originalModelColors[0] = 33743;\n var1_1.modifiedModelColors[1] = 9230;\n var1_1.originalModelColors[1] = 33251;\n var1_1.modifiedModelColors[2] = 11013;\n var1_1.originalModelColors[2] = 33251;\n var1_1.modifiedModelColors[3] = 23;\n var1_1.originalModelColors[3] = 33743;\n var1_1.modifiedModelColors[4] = 40036;\n var1_1.originalModelColors[4] = 33743;\n var1_1.modifiedModelColors[5] = 10348;\n var1_1.originalModelColors[5] = 33743;\n var1_1.modifiedModelColors[6] = 1822;\n var1_1.originalModelColors[6] = 33743;\n break;\n }\n case 19014: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 926;\n var1_1.originalModelColors[0] = 0;\n var1_1.groundModelId = 3288;\n var1_1.modelZoom = 2500;\n var1_1.modelRotation1 = 1500;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = -40;\n var1_1.modelOffset2 = -90;\n var1_1.femaleEquipt = 79902;\n var1_1.maleEquipt = 79902;\n var1_1.anInt175 = 14;\n var1_1.anInt197 = 7;\n var1_1.name = \"@gre@Death cape@red@\";\n var1_1.modifiedModelColors = new int[7];\n var1_1.originalModelColors = new int[7];\n var1_1.modifiedModelColors[0] = 1;\n var1_1.originalModelColors[0] = 22974;\n var1_1.modifiedModelColors[1] = 9230;\n var1_1.originalModelColors[1] = 17350;\n var1_1.modifiedModelColors[2] = 11013;\n var1_1.originalModelColors[2] = 17350;\n var1_1.modifiedModelColors[3] = 23;\n var1_1.originalModelColors[3] = 22974;\n var1_1.modifiedModelColors[4] = 40036;\n var1_1.originalModelColors[4] = 22974;\n var1_1.modifiedModelColors[5] = 10348;\n var1_1.originalModelColors[5] = 22974;\n var1_1.modifiedModelColors[6] = 1822;\n var1_1.originalModelColors[6] = 22974;\n break;\n }\n case 23000: {\n var1_1.groundModelId = 78026;\n var1_1.name = \"@yel@Golden AK-47\";\n var1_1.description = \"The thug life chose you.\";\n var1_1.modelZoom = 1579;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation2 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.femaleEquipt = 78027;\n var1_1.maleEquipt = 78027;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.stackable = false;\n var1_1.itemActions[1] = \"Wear\";\n break;\n }\n case 23002: {\n var1_1.groundModelId = 77566;\n var1_1.name = \"Shadow boots\";\n var1_1.description = \"It's a \" + var1_1.name + \".\";\n var1_1.modelZoom = 825;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 400;\n var1_1.femaleEquipt = 77566;\n var1_1.maleEquipt = 77566;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 8334;\n var1_1.originalModelColors[0] = 32703;\n break;\n }\n case 23004: {\n var1_1.groundModelId = 77573;\n var1_1.name = \"Shadow wings\";\n var1_1.description = \"It's a \" + var1_1.name + \".\";\n var1_1.modelZoom = 825;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 400;\n var1_1.femaleEquipt = 77574;\n var1_1.maleEquipt = 77574;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n var1_1.modifiedModelColors = new int[1];\n var1_1.originalModelColors = new int[1];\n var1_1.modifiedModelColors[0] = 8334;\n var1_1.originalModelColors[0] = 32703;\n break;\n }\n case 23006: {\n var1_1.groundModelId = 78010;\n var1_1.name = \"Hot katana\";\n var1_1.description = \"Imagine ninjas only.\";\n var1_1.modelZoom = 1579;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.femaleEquipt = 78011;\n var1_1.maleEquipt = 78011;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.stackable = false;\n var1_1.itemActions[1] = \"Wear\";\n break;\n }\n case 23008: {\n var1_1.groundModelId = 75018;\n var1_1.name = \"Chainsaw\";\n var1_1.description = \"Got any gas?\";\n var1_1.modelZoom = 1579;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.femaleEquipt = 75019;\n var1_1.maleEquipt = 75019;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n break;\n }\n case 23010: {\n var1_1.groundModelId = 90740;\n var1_1.maleEquipt = 90741;\n var1_1.femaleEquipt = 90741;\n var1_1.name = \"Ironman Helmet\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 494;\n var1_1.modelOffset1 = -2;\n var1_1.modelOffset2 = 1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 0;\n break;\n }\n case 23012: {\n var1_1.groundModelId = 90742;\n var1_1.maleEquipt = 90743;\n var1_1.femaleEquipt = 90743;\n var1_1.name = \"Ironman platebody\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 1224;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 5;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 10;\n break;\n }\n case 23014: {\n var1_1.groundModelId = 90744;\n var1_1.maleEquipt = 90745;\n var1_1.femaleEquipt = 90745;\n var1_1.name = \"Ironman platelegs\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 1784;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = 7;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 10;\n break;\n }\n case 23016: {\n var1_1.groundModelId = 90746;\n var1_1.maleEquipt = 90747;\n var1_1.femaleEquipt = 90747;\n var1_1.name = \"Ironman boots\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 729;\n var1_1.modelOffset1 = -6;\n var1_1.modelOffset2 = 10;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 2040;\n break;\n }\n case 23018: {\n var1_1.groundModelId = 90748;\n var1_1.maleEquipt = 90749;\n var1_1.femaleEquipt = 90749;\n var1_1.name = \"Ironman gloves\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 494;\n var1_1.modelOffset1 = 6;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n break;\n }\n case 23020: {\n var1_1.groundModelId = 91009;\n var1_1.name = \"@cya@Imagine Helm\";\n var1_1.description = \"Imagine a dream that came true...\";\n var1_1.modelZoom = 850;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 16;\n var1_1.modelRotation1 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.femaleEquipt = 91010;\n var1_1.maleEquipt = 91010;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 23022: {\n var1_1.groundModelId = 91011;\n var1_1.name = \"@cya@Imagine Body\";\n var1_1.description = \"Imagine a dream that came true...\";\n var1_1.modelZoom = 1506;\n var1_1.modelRotation1 = 473;\n var1_1.modelRotation2 = 2042;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.femaleEquipt = 91012;\n var1_1.maleEquipt = 91012;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 23024: {\n var1_1.groundModelId = 91013;\n var1_1.name = \"@cya@Imagine Legs\";\n var1_1.description = \"Imagine a dream that came true...\";\n var1_1.modelZoom = 1579;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 333;\n var1_1.modelRotation2 = 73;\n var1_1.femaleEquipt = 91014;\n var1_1.maleEquipt = 91014;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 23026: {\n var1_1.groundModelId = 91015;\n var1_1.name = \"@cya@I@or1@m@cya@a@or1@g@cya@g@or2@i@blu@n@gre@e @or1@K@cya@a@or1@t@cya@a@or1@n@cya@a\";\n var1_1.description = \"Imagine a dream that came true...\";\n var1_1.modelZoom = 676;\n var1_1.modelRotation1 = 0;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = 3;\n var1_1.modelOffset2 = -14;\n var1_1.femaleEquipt = 91016;\n var1_1.maleEquipt = 91016;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 23028: {\n var1_1.groundModelId = 91018;\n var1_1.name = \"@cya@I@or1@m@cya@a@or1@g@cya@g@or2@i@blu@n@gre@e @or1@G@cya@l@or1@o@cya@v@or1@e@cya@s\";\n var1_1.description = \"Imagine a dream that came true...\";\n var1_1.modelZoom = 676;\n var1_1.modelRotation1 = 0;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = 3;\n var1_1.modelOffset2 = -14;\n var1_1.femaleEquipt = 91019;\n var1_1.maleEquipt = 91019;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 23030: {\n var1_1.groundModelId = 91017;\n var1_1.name = \"@cya@Imagine Boots\";\n var1_1.description = \"Imagine a dream that came true...\";\n var1_1.modelZoom = 676;\n var1_1.modelRotation1 = 0;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = 3;\n var1_1.modelOffset2 = -14;\n var1_1.femaleEquipt = 91017;\n var1_1.maleEquipt = 91017;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n break;\n }\n case 23032: {\n var1_1.name = \"Trainee platelegs\";\n var1_1.description = \"It's a \" + var1_1.name;\n var1_1.groundModelId = 91050;\n var1_1.femaleEquipt = 91051;\n var1_1.maleEquipt = 91051;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wield\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelZoom = 540;\n var1_1.modelRotation1 = 72;\n var1_1.modelRotation2 = 136;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.stackable = false;\n break;\n }\n case 23034: {\n var1_1.name = \"Trainee full helm\";\n var1_1.description = \"It's a \" + var1_1.name;\n var1_1.groundModelId = 91052;\n var1_1.femaleEquipt = 91053;\n var1_1.maleEquipt = 91053;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wield\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelZoom = 540;\n var1_1.modelRotation1 = 72;\n var1_1.modelRotation2 = 136;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.stackable = false;\n break;\n }\n case 23036: {\n var1_1.name = \"Trainee platebody\";\n var1_1.description = \"It's a \" + var1_1.name;\n var1_1.groundModelId = 91055;\n var1_1.femaleEquipt = 91054;\n var1_1.maleEquipt = 91054;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelZoom = 540;\n var1_1.modelRotation1 = 72;\n var1_1.modelRotation2 = 136;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.stackable = false;\n break;\n }\n case 23038: {\n var1_1.name = \"Trainee Sword\";\n var1_1.description = \"It's a \" + var1_1.name;\n var1_1.groundModelId = 91057;\n var1_1.femaleEquipt = 91056;\n var1_1.maleEquipt = 91056;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wield\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelZoom = 540;\n var1_1.modelRotation1 = 72;\n var1_1.modelRotation2 = 136;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.stackable = false;\n break;\n }\n case 23040: {\n var1_1.groundModelId = 91100;\n var1_1.name = \"Luigi's head\";\n var1_1.description = \"It's a Luigi's head.\";\n var1_1.modelZoom = 579;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.femaleEquipt = 91101;\n var1_1.maleEquipt = 91101;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wield\";\n break;\n }\n case 23042: {\n var1_1.name = \"Mario's head\";\n var1_1.description = \"It's a Mario head.\";\n var1_1.groundModelId = 91104;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wield\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.femaleEquipt = 91105;\n var1_1.maleEquipt = 91105;\n var1_1.modelZoom = 625;\n var1_1.modelRotation1 = 72;\n var1_1.modelRotation2 = 20;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -10;\n var1_1.stackable = false;\n break;\n }\n case 23044: {\n var1_1.groundModelId = 91315;\n var1_1.femaleEquipt = 91316;\n var1_1.maleEquipt = 91316;\n var1_1.name = \"@blc@Emperor Platebody\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1506;\n var1_1.modelRotation1 = 473;\n var1_1.modelRotation2 = 2042;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23046: {\n var1_1.groundModelId = 91317;\n var1_1.femaleEquipt = 91317;\n var1_1.maleEquipt = 91317;\n var1_1.name = \"@blc@Emperor Boots\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 850;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 16;\n var1_1.modelRotation1 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23048: {\n var1_1.groundModelId = 91318;\n var1_1.femaleEquipt = 91319;\n var1_1.maleEquipt = 91319;\n var1_1.name = \"@blc@Emperor Gloves\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1053;\n var1_1.modelRotation2 = 0;\n var1_1.modelRotation1 = 536;\n var1_1.modelOffset1 = 3;\n var1_1.modelOffset2 = 0;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23050: {\n var1_1.groundModelId = 91320;\n var1_1.femaleEquipt = 91321;\n var1_1.maleEquipt = 91321;\n var1_1.name = \"@blc@Emperors Helmet\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1500;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 900;\n var1_1.modelRotation2 = 1200;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23052: {\n var1_1.groundModelId = 91323;\n var1_1.femaleEquipt = 91322;\n var1_1.maleEquipt = 91322;\n var1_1.name = \"@blc@Emperors Platelegs\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1500;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 900;\n var1_1.modelRotation2 = 1200;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23054: {\n var1_1.name = \"Nex soul\";\n var1_1.description = \"A soul\";\n var1_1.groundModelId = 91349;\n var1_1.femaleEquipt = 91349;\n var1_1.maleEquipt = 91349;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[4] = \"Drop\";\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelZoom = 2500;\n var1_1.modelRotation1 = 700;\n var1_1.modelRotation2 = 20;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 5;\n break;\n }\n case 23056: {\n var1_1.name = \"@blc@Emperor's soul\";\n var1_1.description = \"A soul\";\n var1_1.groundModelId = 91439;\n var1_1.femaleEquipt = 91439;\n var1_1.maleEquipt = 91439;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[0] = \"Combine\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.modelZoom = 2500;\n var1_1.modelRotation1 = 700;\n var1_1.modelRotation2 = 20;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 5;\n break;\n }\n case 23058: {\n var1_1.groundModelId = 91415;\n var1_1.name = \"@yel@Platinum AK-47\";\n var1_1.description = \"The thug life chose you.\";\n var1_1.modelZoom = 1579;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.femaleEquipt = 91416;\n var1_1.maleEquipt = 91416;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.stackable = false;\n var1_1.itemActions[1] = \"Wear\";\n break;\n }\n case 23060: {\n var1_1.groundModelId = 91500;\n var1_1.femaleEquipt = 91501;\n var1_1.maleEquipt = 91501;\n var1_1.name = \"Hunters helm\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 850;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 16;\n var1_1.modelRotation1 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23062: {\n var1_1.groundModelId = 91502;\n var1_1.femaleEquipt = 91503;\n var1_1.maleEquipt = 91503;\n var1_1.name = \"Hunters platelegs\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1579;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 333;\n var1_1.modelRotation2 = 73;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23064: {\n var1_1.groundModelId = 91504;\n var1_1.femaleEquipt = 91505;\n var1_1.maleEquipt = 91505;\n var1_1.name = \"Hunters platebody\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1506;\n var1_1.modelRotation1 = 473;\n var1_1.modelRotation2 = 2042;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23066: {\n var1_1.name = \"Staff of 1000 Truths\";\n var1_1.groundModelId = 91512;\n var1_1.modelZoom = 2256;\n var1_1.modelRotation1 = 456;\n var1_1.modelRotation2 = 513;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.femaleEquipt = 91513;\n var1_1.maleEquipt = 91513;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wield\";\n break;\n }\n case 23068: {\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.groundModelId = 91514;\n var1_1.modelZoom = 1325;\n var1_1.modelRotation1 = 240;\n var1_1.modelRotation2 = 110;\n var1_1.modelOffset1 = -6;\n var1_1.modelOffset2 = -40;\n var1_1.femaleEquipt = 91516;\n var1_1.maleEquipt = 91516;\n var1_1.name = \"Ascension Crossbow Offhand\";\n var1_1.description = \"A weapon originally developed for Armadyl's forces\";\n break;\n }\n case 23070: {\n var1_1.groundModelId = 91517;\n var1_1.femaleEquipt = 91518;\n var1_1.maleEquipt = 91518;\n var1_1.name = \"@sly@Oblivion helm\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 850;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 16;\n var1_1.modelRotation1 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23072: {\n var1_1.groundModelId = 91519;\n var1_1.femaleEquipt = 91520;\n var1_1.maleEquipt = 91520;\n var1_1.name = \"@sly@Oblivion platelegs\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1579;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 333;\n var1_1.modelRotation2 = 73;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23074: {\n var1_1.groundModelId = 91521;\n var1_1.femaleEquipt = 91522;\n var1_1.maleEquipt = 91522;\n var1_1.name = \"@sly@Oblivion platebody\";\n var1_1.description = \"It's an \" + var1_1.name;\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1506;\n var1_1.modelRotation1 = 473;\n var1_1.modelRotation2 = 2042;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23076: {\n var1_1.groundModelId = 91523;\n var1_1.name = \"@sly@Oblivion Wings\";\n var1_1.description = \"It's a \" + var1_1.name + \".\";\n var1_1.modelZoom = 1579;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 533;\n var1_1.modelRotation1 = 333;\n var1_1.femaleEquipt = 91524;\n var1_1.maleEquipt = 91524;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.stackable = false;\n var1_1.itemActions[1] = \"Wear\";\n break;\n }\n case 23078: {\n var1_1.groundModelId = 91581;\n var1_1.femaleEquipt = 91582;\n var1_1.maleEquipt = 91582;\n var1_1.name = \"Black Knight Platebody\";\n var1_1.description = \"you are one rich son of a bitch\";\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1506;\n var1_1.modelRotation1 = 473;\n var1_1.modelRotation2 = 2042;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23080: {\n var1_1.groundModelId = 91583;\n var1_1.femaleEquipt = 91584;\n var1_1.maleEquipt = 91584;\n var1_1.name = \"Black Knight Helmet\";\n var1_1.description = \"you are one rich son of a bitch\";\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1500;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 900;\n var1_1.modelRotation2 = 1200;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23082: {\n var1_1.groundModelId = 91585;\n var1_1.femaleEquipt = 91586;\n var1_1.maleEquipt = 91586;\n var1_1.name = \"Black Knight Platelegs\";\n var1_1.description = \"you are one rich son of a bitch\";\n var1_1.itemActions = new String[]{null, \"Wield\", null, null, \"Drop\"};\n var1_1.modelZoom = 1500;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 900;\n var1_1.modelRotation2 = 1200;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n break;\n }\n case 23084: {\n var1_1.groundModelId = 94116;\n var1_1.maleEquipt = 94117;\n var1_1.femaleEquipt = 94117;\n var1_1.name = \"Samurai Hat\";\n var1_1.description = \"Recoloured samurai set.\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 964;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n break;\n }\n case 23086: {\n var1_1.groundModelId = 94118;\n var1_1.maleEquipt = 94119;\n var1_1.femaleEquipt = 94119;\n var1_1.name = \"Samurai Body\";\n var1_1.description = \"Recoloured samurai set.\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 964;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n break;\n }\n case 23088: {\n var1_1.groundModelId = 94120;\n var1_1.maleEquipt = 94121;\n var1_1.femaleEquipt = 94121;\n var1_1.name = \"Samurai Legs\";\n var1_1.description = \"Recoloured samurai set.\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 964;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n break;\n }\n case 23090: {\n var1_1.groundModelId = 94127;\n var1_1.maleEquipt = 94128;\n var1_1.femaleEquipt = 94128;\n var1_1.name = \"Raiden Helm\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 1179;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n break;\n }\n case 23092: {\n var1_1.groundModelId = 94129;\n var1_1.maleEquipt = 94130;\n var1_1.femaleEquipt = 94130;\n var1_1.name = \"Raiden Body\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 1054;\n var1_1.modelOffset1 = 1;\n var1_1.modelOffset2 = -3;\n var1_1.modelRotation1 = 578;\n var1_1.modelRotation2 = 10;\n break;\n }\n case 23094: {\n var1_1.groundModelId = 94131;\n var1_1.maleEquipt = 94132;\n var1_1.femaleEquipt = 94132;\n var1_1.name = \"Raiden Legs\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 1614;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = 1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 2040;\n break;\n }\n case 23096: {\n var1_1.groundModelId = 94133;\n var1_1.maleEquipt = 94134;\n var1_1.femaleEquipt = 94134;\n var1_1.name = \"Dark Raiden Helm\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 1109;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n break;\n }\n case 23098: {\n var1_1.groundModelId = 94135;\n var1_1.maleEquipt = 94136;\n var1_1.femaleEquipt = 94136;\n var1_1.name = \"Dark Raiden Body\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 1239;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 0;\n break;\n }\n case 23100: {\n var1_1.groundModelId = 94137;\n var1_1.maleEquipt = 94138;\n var1_1.femaleEquipt = 94138;\n var1_1.name = \"Dark Raiden Legs\";\n var1_1.itemActions = new String[]{null, \"Wear\", null, null, \"Drop\"};\n var1_1.modelZoom = 1624;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = 1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 2040;\n break;\n }\n case 23102: {\n var1_1.groundModelId = 90092;\n var1_1.name = \"Malevolent cuirass\";\n var1_1.description = \"It's a \" + var1_1.name + \".\";\n var1_1.modelZoom = 1524;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -73;\n var1_1.modelRotation1 = 333;\n var1_1.modelRotation2 = 31;\n var1_1.femaleEquipt = 90092;\n var1_1.maleEquipt = 90092;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.stackable = false;\n var1_1.itemActions[1] = \"Wear\";\n break;\n }\n case 23104: {\n var1_1.groundModelId = 90094;\n var1_1.name = \"Malevolent greaves\";\n var1_1.description = \"It's a \" + var1_1.name + \".\";\n var1_1.modelZoom = 1244;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 0;\n var1_1.modelRotation1 = 333;\n var1_1.modelRotation2 = 5;\n var1_1.femaleEquipt = 90094;\n var1_1.maleEquipt = 90094;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.stackable = false;\n var1_1.itemActions[1] = \"Wear\";\n break;\n }\n case 23106: {\n var1_1.groundModelId = 90096;\n var1_1.name = \"Malevolent helm\";\n var1_1.description = \"It's a \" + var1_1.name + \".\";\n var1_1.modelZoom = 1239;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -127;\n var1_1.modelRotation1 = 333;\n var1_1.modelRotation2 = 26;\n var1_1.femaleEquipt = 90096;\n var1_1.maleEquipt = 90096;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.stackable = false;\n var1_1.itemActions[1] = \"Wear\";\n break;\n }\n case 23108: {\n var1_1.name = \"@dgr@T@gra@y@dgr@r@gra@a@dgr@n@gra@t@dgr@i@gra@t@dgr@o@gra@'@dgr@s @gra@C@dgr@a@gra@p@dgr@e\";\n var1_1.groundModelId = 80346;\n var1_1.femaleEquipt = 80346;\n var1_1.maleEquipt = 80346;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n break;\n }\n case 23110: {\n var1_1.name = \"The Pummeller\";\n var1_1.groundModelId = 11;\n var1_1.femaleEquipt = 12;\n var1_1.maleEquipt = 12;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelRotation1 = 607;\n var1_1.modelRotation2 = 267;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.modelZoom = 1560;\n break;\n }\n case 23112: {\n var1_1.name = \"Donor boots\";\n var1_1.maleEquipt = 15;\n var1_1.femaleEquipt = 15;\n var1_1.groundModelId = 16;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 645;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 25;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 11;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n break;\n }\n case 23114: {\n var1_1.name = \"Donor Demon Cape\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.groundModelId = 18;\n var1_1.maleEquipt = 17;\n var1_1.modelZoom = 1700;\n var1_1.modelOffset1 = -20;\n var1_1.modelOffset2 = -10;\n var1_1.modelRotation1 = 305;\n var1_1.modelRotation2 = 0;\n var1_1.femaleEquipt = 17;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23116: {\n var1_1.name = \"Donor gloves\";\n var1_1.groundModelId = 20;\n var1_1.maleEquipt = 19;\n var1_1.femaleEquipt = 19;\n var1_1.modelZoom = 610;\n var1_1.modelOffset1 = 1;\n var1_1.modelOffset2 = -6;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23118: {\n var1_1.name = \"Donor Helm\";\n var1_1.maleEquipt = 21;\n var1_1.femaleEquipt = 21;\n var1_1.groundModelId = 22;\n var1_1.modelZoom = 865;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 12;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23120: {\n var1_1.name = \"Donor Body\";\n var1_1.maleEquipt = 23;\n var1_1.femaleEquipt = 23;\n var1_1.groundModelId = 24;\n var1_1.modelZoom = 1320;\n var1_1.modelOffset1 = 1;\n var1_1.modelOffset2 = 12;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23122: {\n var1_1.name = \"Donor Legs\";\n var1_1.maleEquipt = 25;\n var1_1.femaleEquipt = 25;\n var1_1.groundModelId = 26;\n var1_1.modelZoom = 1555;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 9;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23124: {\n var1_1.name = \"Superior Slayer Helm\";\n var1_1.maleEquipt = 27;\n var1_1.femaleEquipt = 27;\n var1_1.groundModelId = 28;\n var1_1.modelZoom = 770;\n var1_1.modelOffset1 = -5;\n var1_1.modelOffset2 = 17;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23126: {\n var1_1.name = \"Superior Slayer Cape\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.groundModelId = 30;\n var1_1.maleEquipt = 29;\n var1_1.femaleEquipt = 29;\n var1_1.modelZoom = 2885;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 76;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 5;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23128: {\n var1_1.name = \"Superior Slayer Scarf\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.groundModelId = 32;\n var1_1.maleEquipt = 31;\n var1_1.femaleEquipt = 31;\n var1_1.modelZoom = 1040;\n var1_1.modelOffset1 = -6;\n var1_1.modelOffset2 = 4;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 876;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23130: {\n var1_1.name = \"Superior Slayer PlateBody\";\n var1_1.maleEquipt = 33;\n var1_1.femaleEquipt = 33;\n var1_1.groundModelId = 34;\n var1_1.modelZoom = 1415;\n var1_1.modelOffset1 = 2;\n var1_1.modelOffset2 = -13;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 1;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23132: {\n var1_1.name = \"Superior Slayer PlateLegs\";\n var1_1.maleEquipt = 35;\n var1_1.femaleEquipt = 35;\n var1_1.groundModelId = 36;\n var1_1.modelZoom = 1755;\n var1_1.modelOffset1 = -8;\n var1_1.modelOffset2 = 7;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 1;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23134: {\n var1_1.name = \"Superior Slayer KiteShield\";\n var1_1.maleEquipt = 37;\n var1_1.femaleEquipt = 37;\n var1_1.groundModelId = 38;\n var1_1.modelZoom = 1755;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 12;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 11;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23136: {\n var1_1.name = \"Superior Slayer Gloves\";\n var1_1.maleEquipt = 39;\n var1_1.femaleEquipt = 39;\n var1_1.groundModelId = 40;\n var1_1.modelZoom = 665;\n var1_1.modelOffset1 = 1;\n var1_1.modelOffset2 = -4;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 431;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23138: {\n var1_1.name = \"Superior Slayer Boots\";\n var1_1.maleEquipt = 41;\n var1_1.femaleEquipt = 41;\n var1_1.groundModelId = 42;\n var1_1.modelZoom = 655;\n var1_1.modelOffset1 = 1;\n var1_1.modelOffset2 = 18;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23140: {\n var1_1.name = \"Hailstorm Sword\";\n var1_1.maleEquipt = 43;\n var1_1.femaleEquipt = 43;\n var1_1.groundModelId = 44;\n var1_1.modelZoom = 2100;\n var1_1.modelOffset1 = -5;\n var1_1.modelOffset2 = 13;\n var1_1.modelRotation1 = 350;\n var1_1.modelRotation2 = 545;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"HOLY SHIT\";\n var1_1.stackable = false;\n break;\n }\n case 23142: {\n var1_1.name = \"Omega Helm\";\n var1_1.maleEquipt = 45;\n var1_1.femaleEquipt = 45;\n var1_1.groundModelId = 46;\n var1_1.modelZoom = 540;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = 27;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23144: {\n var1_1.name = \"Omega PlateBody\";\n var1_1.maleEquipt = 47;\n var1_1.femaleEquipt = 47;\n var1_1.groundModelId = 48;\n var1_1.modelZoom = 1305;\n var1_1.modelOffset1 = -2;\n var1_1.modelOffset2 = 12;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23146: {\n var1_1.name = \"Omega PlateLegs\";\n var1_1.maleEquipt = 49;\n var1_1.femaleEquipt = 49;\n var1_1.groundModelId = 50;\n var1_1.modelZoom = 1620;\n var1_1.modelOffset1 = -8;\n var1_1.modelOffset2 = 12;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23148: {\n var1_1.name = \"Omega Gloves\";\n var1_1.maleEquipt = 51;\n var1_1.femaleEquipt = 51;\n var1_1.groundModelId = 52;\n var1_1.modelZoom = 450;\n var1_1.modelOffset1 = -3;\n var1_1.modelOffset2 = -8;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23150: {\n var1_1.name = \"Omega Boots\";\n var1_1.maleEquipt = 53;\n var1_1.femaleEquipt = 53;\n var1_1.groundModelId = 53;\n var1_1.modelZoom = 680;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 29;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 41;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23152: {\n var1_1.name = \"Sword\";\n var1_1.maleEquipt = 53;\n var1_1.femaleEquipt = 53;\n var1_1.groundModelId = 54;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n break;\n }\n case 23154: {\n var1_1.name = \"Morty Pet\";\n var1_1.maleEquipt = 94004;\n var1_1.femaleEquipt = 94004;\n var1_1.groundModelId = 94004;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Drop\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 964;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n break;\n }\n case 23156: {\n var1_1.name = \"Rick Pet\";\n var1_1.maleEquipt = 94005;\n var1_1.femaleEquipt = 94005;\n var1_1.groundModelId = 94005;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Drop\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 964;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n break;\n }\n case 23158: {\n var1_1.name = \"Crash Bandicoot jr\";\n var1_1.maleEquipt = 94218;\n var1_1.femaleEquipt = 94218;\n var1_1.groundModelId = 94218;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Drop\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 964;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n break;\n }\n case 23160: {\n var1_1.name = \"Space Invader jr\";\n var1_1.maleEquipt = 94214;\n var1_1.femaleEquipt = 94214;\n var1_1.groundModelId = 94214;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Drop\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 964;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n break;\n }\n case 23162: {\n var1_1.name = \"Pacman jr\";\n var1_1.maleEquipt = 94205;\n var1_1.femaleEquipt = 94205;\n var1_1.groundModelId = 94205;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Drop\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 964;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n break;\n }\n case 18449: {\n var1_1.name = \"Imagine PlateBody\";\n var1_1.groundModelId = 89;\n var1_1.maleEquipt = 90;\n var1_1.femaleEquipt = 90;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1244;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 5;\n break;\n }\n case 18450: {\n var1_1.name = \"Imagine Helm\";\n var1_1.groundModelId = 91;\n var1_1.maleEquipt = 92;\n var1_1.femaleEquipt = 92;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 649;\n var1_1.modelOffset1 = 2;\n var1_1.modelOffset2 = 4;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 2035;\n break;\n }\n case 18451: {\n var1_1.name = \"Imagine Platelegs\";\n var1_1.groundModelId = 93;\n var1_1.maleEquipt = 94;\n var1_1.femaleEquipt = 94;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1614;\n var1_1.modelOffset1 = -7;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 0;\n break;\n }\n case 18452: {\n var1_1.name = \"Imagine Sword\";\n var1_1.groundModelId = 95;\n var1_1.maleEquipt = 96;\n var1_1.femaleEquipt = 96;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1649;\n var1_1.modelOffset1 = -2;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 1753;\n var1_1.modelRotation2 = 1520;\n break;\n }\n case 18453: {\n var1_1.name = \"Imagine Sword\";\n var1_1.groundModelId = 95;\n var1_1.maleEquipt = 96;\n var1_1.femaleEquipt = 96;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1649;\n var1_1.modelOffset1 = -2;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 1753;\n var1_1.modelRotation2 = 1520;\n break;\n }\n case 18454: {\n var1_1.name = \"Imagine Spirit Shield\";\n var1_1.groundModelId = 97;\n var1_1.maleEquipt = 98;\n var1_1.femaleEquipt = 98;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1694;\n var1_1.modelOffset1 = -3;\n var1_1.modelOffset2 = -6;\n var1_1.modelRotation1 = 513;\n var1_1.modelRotation2 = 2025;\n break;\n }\n case 18455: {\n var1_1.name = \"Imagine Fire Cape\";\n var1_1.groundModelId = 99;\n var1_1.maleEquipt = 100;\n var1_1.femaleEquipt = 100;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1809;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -9;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1005;\n break;\n }\n case 23164: {\n var1_1.name = \"Imagine Gloves\";\n var1_1.groundModelId = 101;\n var1_1.maleEquipt = 102;\n var1_1.femaleEquipt = 102;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 579;\n var1_1.modelOffset1 = -2;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 498;\n var1_1.modelRotation2 = 1150;\n break;\n }\n case 23166: {\n var1_1.name = \"Imagine Boots\";\n var1_1.groundModelId = 103;\n var1_1.maleEquipt = 103;\n var1_1.femaleEquipt = 103;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 644;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 2;\n var1_1.modelRotation1 = 28;\n var1_1.modelRotation2 = 2025;\n break;\n }\n case 23168: {\n var1_1.name = \"Imagine Chest(MBox)\";\n var1_1.groundModelId = 104;\n var1_1.maleEquipt = 104;\n var1_1.femaleEquipt = 104;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Open\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 964;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = 2;\n var1_1.modelRotation1 = 2038;\n var1_1.modelRotation2 = 2025;\n break;\n }\n case 23169: {\n var1_1.name = \"Beginner Trophy\";\n var1_1.groundModelId = 105;\n var1_1.maleEquipt = 105;\n var1_1.femaleEquipt = 105;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 776;\n break;\n }\n case 23170: {\n var1_1.name = \"Easy Trophy\";\n var1_1.groundModelId = 106;\n var1_1.maleEquipt = 106;\n var1_1.femaleEquipt = 106;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 776;\n break;\n }\n case 23171: {\n var1_1.name = \"Medium Trophy\";\n var1_1.groundModelId = 107;\n var1_1.maleEquipt = 107;\n var1_1.femaleEquipt = 107;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 776;\n break;\n }\n case 23172: {\n var1_1.name = \"Hard Trophy\";\n var1_1.groundModelId = 108;\n var1_1.maleEquipt = 108;\n var1_1.femaleEquipt = 108;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 776;\n break;\n }\n case 23173: {\n var1_1.name = \"Elite Trophy\";\n var1_1.groundModelId = 109;\n var1_1.maleEquipt = 109;\n var1_1.femaleEquipt = 109;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 776;\n break;\n }\n case 23174: {\n var1_1.name = \"Hailstorm Shield\";\n var1_1.maleEquipt = 110;\n var1_1.femaleEquipt = 110;\n var1_1.groundModelId = 111;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"HOLY SHIT\";\n var1_1.stackable = false;\n var1_1.modelZoom = 1760;\n var1_1.modelOffset1 = -2;\n var1_1.modelOffset2 = 4;\n var1_1.modelRotation1 = 555;\n var1_1.modelRotation2 = 0;\n break;\n }\n case 23176: {\n var1_1.name = \"Finest Rune\";\n var1_1.groundModelId = 112;\n var1_1.maleEquipt = 112;\n var1_1.femaleEquipt = 112;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 776;\n break;\n }\n case 23177: {\n var1_1.name = \"Lucky Rune\";\n var1_1.groundModelId = 113;\n var1_1.maleEquipt = 113;\n var1_1.femaleEquipt = 113;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 776;\n break;\n }\n case 23178: {\n var1_1.name = \"Chaos Stone\";\n var1_1.groundModelId = 114;\n var1_1.maleEquipt = 114;\n var1_1.femaleEquipt = 114;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 15;\n var1_1.modelRotation1 = 800;\n var1_1.modelRotation2 = 1031;\n break;\n }\n case 23179: {\n var1_1.name = \"Extreme Stone\";\n var1_1.groundModelId = 115;\n var1_1.maleEquipt = 115;\n var1_1.femaleEquipt = 115;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 15;\n var1_1.modelRotation1 = 800;\n var1_1.modelRotation2 = 1031;\n break;\n }\n case 23180: {\n var1_1.name = \"Rune of Protection I\";\n var1_1.groundModelId = 116;\n var1_1.maleEquipt = 116;\n var1_1.femaleEquipt = 116;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 460;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 2;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1;\n break;\n }\n case 23181: {\n var1_1.name = \"Rune of Protection II\";\n var1_1.groundModelId = 117;\n var1_1.maleEquipt = 117;\n var1_1.femaleEquipt = 117;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 460;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 2;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1;\n break;\n }\n case 23182: {\n var1_1.name = \"Rune of Protection III\";\n var1_1.groundModelId = 118;\n var1_1.maleEquipt = 118;\n var1_1.femaleEquipt = 118;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 460;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 2;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1;\n break;\n }\n case 23183: {\n var1_1.name = \"Rune of Protection IV\";\n var1_1.groundModelId = 119;\n var1_1.maleEquipt = 119;\n var1_1.femaleEquipt = 119;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 460;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 2;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1;\n break;\n }\n case 23184: {\n var1_1.name = \"Master Stone +17\";\n var1_1.groundModelId = 120;\n var1_1.maleEquipt = 120;\n var1_1.femaleEquipt = 120;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1031;\n break;\n }\n case 23185: {\n var1_1.name = \"Master Stone +18\";\n var1_1.groundModelId = 121;\n var1_1.maleEquipt = 121;\n var1_1.femaleEquipt = 121;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1006;\n break;\n }\n case 23186: {\n var1_1.name = \"Master Stone +19\";\n var1_1.groundModelId = 122;\n var1_1.maleEquipt = 122;\n var1_1.femaleEquipt = 122;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1355;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1006;\n break;\n }\n case 23187: {\n var1_1.name = \"Master Stone +20\";\n var1_1.groundModelId = 123;\n var1_1.maleEquipt = 123;\n var1_1.femaleEquipt = 123;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1165;\n var1_1.modelOffset1 = -3;\n var1_1.modelOffset2 = 5;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1026;\n break;\n }\n case 23188: {\n var1_1.name = \"Master Stone +21\";\n var1_1.groundModelId = 124;\n var1_1.maleEquipt = 124;\n var1_1.femaleEquipt = 124;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1170;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1001;\n break;\n }\n case 23189: {\n var1_1.name = \"Master Stone +23\";\n var1_1.groundModelId = 125;\n var1_1.maleEquipt = 125;\n var1_1.femaleEquipt = 125;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1190;\n var1_1.modelOffset1 = -4;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1011;\n break;\n }\n case 23190: {\n var1_1.name = \"Master Stone +25\";\n var1_1.groundModelId = 126;\n var1_1.maleEquipt = 126;\n var1_1.femaleEquipt = 126;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 900;\n var1_1.modelOffset1 = -3;\n var1_1.modelOffset2 = -5;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1016;\n break;\n }\n case 23191: {\n var1_1.name = \"Master Stone +26\";\n var1_1.groundModelId = 127;\n var1_1.maleEquipt = 127;\n var1_1.femaleEquipt = 127;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1100;\n var1_1.modelOffset1 = -3;\n var1_1.modelOffset2 = 3;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1016;\n break;\n }\n case 23192: {\n var1_1.name = \"Master Stone +27\";\n var1_1.groundModelId = 128;\n var1_1.maleEquipt = 128;\n var1_1.femaleEquipt = 128;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 995;\n var1_1.modelOffset1 = 2;\n var1_1.modelOffset2 = 4;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1016;\n break;\n }\n case 23193: {\n var1_1.name = \"Master Stone +28\";\n var1_1.groundModelId = 129;\n var1_1.maleEquipt = 129;\n var1_1.femaleEquipt = 129;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 935;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1036;\n break;\n }\n case 23194: {\n var1_1.name = \"Master Stone +29\";\n var1_1.groundModelId = 130;\n var1_1.maleEquipt = 130;\n var1_1.femaleEquipt = 130;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1165;\n var1_1.modelOffset1 = -2;\n var1_1.modelOffset2 = 6;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1036;\n break;\n }\n case 23195: {\n var1_1.name = \"Master Stone +30\";\n var1_1.groundModelId = 131;\n var1_1.maleEquipt = 131;\n var1_1.femaleEquipt = 131;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 1310;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = -1;\n var1_1.modelRotation1 = 550;\n var1_1.modelRotation2 = 1036;\n break;\n }\n case 13151: {\n var1_1.name = \"Vote Book\";\n break;\n }\n case 23196: {\n var1_1.name = \"Necklace of Virtue\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.groundModelId = 132;\n var1_1.maleEquipt = 133;\n var1_1.femaleEquipt = 133;\n var1_1.modelZoom = 1005;\n var1_1.modelOffset1 = 2;\n var1_1.modelOffset2 = 12;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 31;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 23197: {\n var1_1.name = \"Band of Virtue\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.groundModelId = 134;\n var1_1.maleEquipt = 134;\n var1_1.femaleEquipt = 134;\n var1_1.modelZoom = 740;\n var1_1.modelOffset1 = 6;\n var1_1.modelOffset2 = 29;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 271;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 23198: {\n var1_1.groundModelId = 135;\n var1_1.name = \"Medusa's Bow\";\n var1_1.description = \"A Medusa bow!.\";\n var1_1.maleEquipt = 135;\n var1_1.femaleEquipt = 135;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Wear\";\n var1_1.stackable = false;\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n break;\n }\n case 23199: {\n var1_1.groundModelId = 94277;\n var1_1.name = \"Thanos pet\";\n var1_1.description = \"A Thanos pet!.\";\n var1_1.modelZoom = 3000;\n var1_1.modelRotation1 = 0;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[3] = \"Summon\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.stackable = false;\n break;\n }\n case 23200: {\n var1_1.groundModelId = 94259;\n var1_1.name = \"Hulk pet\";\n var1_1.description = \"A Hulk pet!.\";\n var1_1.modelZoom = 3000;\n var1_1.modelRotation1 = 0;\n var1_1.modelRotation2 = 0;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 0;\n var1_1.itemActions = new String[5];\n var1_1.itemActions[3] = \"Summon\";\n var1_1.itemActions[4] = \"Drop\";\n var1_1.stackable = false;\n break;\n }\n case 23201: {\n var1_1.name = \"Skeletal Plate Gloves\";\n var1_1.groundModelId = 136;\n var1_1.maleEquipt = 137;\n var1_1.femaleEquipt = 137;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 585;\n var1_1.modelOffset1 = 0;\n var1_1.modelOffset2 = 2;\n var1_1.modelRotation1 = 320;\n var1_1.modelRotation2 = 0;\n break;\n }\n case 23202: {\n var1_1.name = \"Skeletal Plate Boots\";\n var1_1.groundModelId = 138;\n var1_1.maleEquipt = 139;\n var1_1.femaleEquipt = 139;\n var1_1.groundActions = new String[5];\n var1_1.groundActions[2] = \"Take\";\n var1_1.itemActions = new String[5];\n var1_1.itemActions[1] = \"Equip\";\n var1_1.revisionType = RevisionType.CUSTOM_ITEM_MODELS;\n var1_1.modelZoom = 735;\n var1_1.modelOffset1 = -1;\n var1_1.modelOffset2 = 22;\n var1_1.modelRotation1 = 370;\n var1_1.modelRotation2 = 0;\n break;\n }\n }\n if (n >= 23000 && n <= 23111 && (n & 1) == 1) {\n ItemDefinition.convertToNote((ItemDefinition)var1_1, n - 1, 799);\n }\n boolean bl = false;\n String[] arrstring = var1_1.itemActions;\n int n2 = arrstring.length;\n int n3 = 0;\n do {\n if (n3 >= n2) {\n if (!bl) return var1_1;\n var1_1.aByte154 = (byte)-15;\n return var1_1;\n }\n String string = arrstring[n3];\n if (string != null && string.length() != 0 && string.equalsIgnoreCase(\"Wear\")) {\n bl = true;\n }\n ++n3;\n } while (true);\n }", "@Override\r\n\t\tpublic boolean createItem() {\n\t\t\treturn false;\r\n\t\t}", "public void createMainInventor() {\n String name = _plugin.getConfigManager().getGeneralSettingsMap().get(\"Name\");\r\n String colorizedName = _plugin.getUtilsManager().colorizeString(name);\r\n //Size of the Inventory;\r\n int inventorySize = Integer.valueOf(_plugin.getConfigManager().getGeneralSettingsMap().get(\"InventorySize\"));\r\n //Initialize Inventory;\r\n mainInventory = _plugin.getServer().createInventory(null, inventorySize, colorizedName);\r\n //Retrieve the HashMaps for the plugin;\r\n HashMap<Integer, CategoryItem> categoryInformationMap = _plugin.getConfigManager().getCategoryInformationMap();\r\n HashMap<String, String> languageInformation = _plugin.getConfigManager().getLanguageInformationMap();\r\n //Add items to Inventory;\r\n for (Integer i : categoryInformationMap.keySet()) {\r\n CategoryItem categoryItem = categoryInformationMap.get(i);\r\n ItemStack item = categoryItem.getItem();\r\n ItemMeta itemMeta = item.getItemMeta();\r\n itemMeta.setDisplayName(_plugin.getUtilsManager().colorizeString(languageInformation.get(\"CategoryName\").replace(\"%cat%\", categoryItem.getName())));\r\n List<String> lore = new ArrayList<>();\r\n lore.add(_plugin.getUtilsManager().colorizeString(categoryItem.getDescription()));\r\n item.setItemMeta(itemMeta);\r\n mainInventory.addItem(item);\r\n }\r\n }" ]
[ "0.69533986", "0.6779655", "0.6490897", "0.64851695", "0.64583945", "0.6386655", "0.63339126", "0.62671", "0.61064243", "0.608861", "0.6076432", "0.6002834", "0.5995647", "0.59844464", "0.59795284", "0.5965877", "0.5950731", "0.59453195", "0.59438366", "0.59269404", "0.590244", "0.57496375", "0.57228625", "0.57228625", "0.57138216", "0.5708065", "0.5692206", "0.56822985", "0.5676815", "0.56744003", "0.56640273", "0.565759", "0.5648924", "0.5646445", "0.5635217", "0.55907834", "0.5585069", "0.5583408", "0.5570105", "0.5549985", "0.5534899", "0.552574", "0.5504537", "0.5478189", "0.54708374", "0.5454759", "0.54528236", "0.5439124", "0.5437094", "0.5425937", "0.5425374", "0.54163843", "0.5413421", "0.54061496", "0.5383544", "0.5359611", "0.5348276", "0.53433496", "0.5340125", "0.5337843", "0.53232825", "0.5314199", "0.53063196", "0.52965856", "0.5295956", "0.52919", "0.5287718", "0.5274983", "0.52617186", "0.52593416", "0.52489054", "0.5242231", "0.5234346", "0.52288026", "0.52281666", "0.5224958", "0.5220905", "0.52207196", "0.5202658", "0.5190293", "0.5186362", "0.51857233", "0.518158", "0.51776457", "0.5175598", "0.5165477", "0.5161917", "0.51602376", "0.51558834", "0.51520973", "0.51497877", "0.51456887", "0.51446164", "0.5134993", "0.5134053", "0.5128882", "0.5124366", "0.5122208", "0.51211095", "0.511723" ]
0.73110163
0
Adds an item into a room's ArrayList of items.
public void addItem(String name,String description, int weight, boolean key) { items.add(new Item(name,description,weight,key)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addItemToRoom(Item item) {\n this.ItemsInRoom.put(item.getName(), item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n if (winner(item)) {\n listItems.add(item);\n }\n }", "public void addItem(Item item) {\n _items.add(item);\n }", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public void addItem(Item item) {\r\n if (items == null) {\r\n items = new ArrayList();\r\n }\r\n items.add(item);\r\n }", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "public void addItem(Item item,Room room) {\n\t\troom.addItems(item);\n\t}", "public void addItemtoInventoryList(String item) {\r\n InventoryList.add(item);\r\n }", "public void addItem(Item item) {\n\t\titems.add(item);\n\t}", "public void addItem(Item i) {\n this.items.add(i);\n }", "public void addItem(LibraryItem item){\r\n\t\t// use add method of list.class\r\n\t\tthis.inverntory.add(item);\r\n\t}", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "public void addItem( Item anItem) {\n currentItems.add(anItem);\n }", "public static void addItem(Item item)\n {\n inventory.add(item);\n if(!(item.getRoomNumber() == -1 || item.getEventNumber() == -1))\n {\n Map.getRoom(item.getRoomNumber()).getEvent(item.getEventNumber()).enable();\n }\n }", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "void add(Item item);", "public void addItem(Object obj) {\n items.add(obj);\n }", "public void addItem(Item toAdd) throws ImpossiblePositionException, NoSuchItemException {\n int itemX = (int) toAdd.getXyLocation().getX();\n int itemY = (int) toAdd.getXyLocation().getY();\n ArrayList<Item> rogueItems = getRogue().getItems();\n int itemFound = 0;\n if ((itemX >= getWidth() - 1) || (itemX <= 0) || (itemY >= getHeight() - 1)\n || (itemY <= 0) || !(roomDisplayArray[itemY][itemX].equals(\"FLOOR\"))) {\n throw new ImpossiblePositionException();\n } else {\n roomItems.add(toAdd);\n }\n for (Item singleItem : rogueItems) {\n if (toAdd.getId() == singleItem.getId()) {\n itemFound = 1;\n }\n }\n if (itemFound != 1) {\n throw new NoSuchItemException();\n }\n\n }", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "public void addItem(Object item) {\r\n\t\tlistModel.addElement(item);\r\n\t}", "public void addItemToList(Item item) {\n\t\tif (item != null) {\n\t\t\tif (!items.contains(item)) {\n\t\t\t\titems.add(item);\n\t\t\t}\n\t\t}\n\t}", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }", "public void add(Item item) {\n for (int i = 0; i < items.length; i++) {\n if (items[i] == null) {\n items[i] = item;\n break;\n }\n }\n }", "public void addItem(Item item) {\r\n for (Item i : inventoryItems) {\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() + item.getCount());\r\n return;\r\n }\r\n }\r\n inventoryItems.add(item);\r\n }", "public void addReservable(Reservable item){\n // Adds an item to the manager\n listI.add(item);\n }", "public void add(ToDoItem item) {\n mItems.add(item);\n notifyDataSetChanged();\n }", "private void addItemToList(String item) {\n itemList.add(item);\n\n // ListView aktualisieren\n adapter.notifyDataSetChanged();\n }", "public void addItem(Item item) {\n this.reservationItems.add(new ReservationItem(item, this));\n }", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "public void addItem(Item item)\n\t{\n\t\tif(inventory.size()<=9)\n\t\t\tinventory.add(item);\n\t\telse\n\t\t\tSystem.out.println(\"Inventory is full.\");\n\t}", "public Item addItem(Item item) {\r\n uniqueCounter++;\r\n items.add(item);\r\n return item;\r\n }", "public void addItem(String item){\n adapter.add(item);\n }", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }", "public void addItem(Item e) {\n\t\tItem o = new Item(e);\n\t\titems.add(o);\n\t}", "public void addItem(Item item) {\n inventory.add(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "void addFruit(Fruit item){\n\t\tfruitList.add(item);\n\t}", "public synchronized void addItem(IJABXAdvertisementItem item) {\n\t\tidMap.put(item.getSerialNo(), item);\n\t\titemList.add(item);\n\t}", "public void addProduct(Product item){\n inventory.add(item);\n }", "public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}", "@Override\n public void add(Object item)\n {\n if (size == list.length)\n {\n Object [] itemInListCurrently = deepCopy();\n list = new Object[size * 2];\n\n System.arraycopy(itemInListCurrently, 0, list, 0, size);\n }\n\n list[size++] = item;\n }", "public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }", "private void addToInventory(Item item) {\n inventory.put(item.getName(), item);\n }", "public void addItem(Item item, int x, int y) {\n\t\tInventory items = getItemsAt(x, y);\n\t\titems.add(item);\n\t}", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }", "public void add(int item) {\r\n if (!contains(item)) {\r\n items[NumItems++] = item;\r\n } else if (NumItems == MAX_LIST) {\r\n throw new ListFullException(\"List is full\");\r\n }\r\n }", "public void addItem(Item theItem) {\n\t\tif (inventory != null) {\n\t\t\tif (!isAuctionAtMaxCapacity()) {\n\t\t\t\t// Check item doesn't already exist as key in map\n\t\t\t\tif (inventory.containsKey(theItem)) {\n\t\t\t\t\t//ERROR CODE: ITEM ALREADY EXISTS\n\t\t\t\t\tSystem.out.println(\"That item already exists in the inventory.\");\n\t\t\t\t} else\n\t\t\t\t\tinventory.put(theItem, new ArrayList<Bid>());\n\t\t\t} else if (isAuctionAtMaxCapacity()) {\n\t\t\t\t//ERROR CODE: AUCTION AT MAX CAPACITY\n\t\t\t\tSystem.out.println(\"\\nYour auction is at maximum capacity\");\n\t\t\t} \n\t\t} else {\n\t\t\tinventory = new HashMap<Item, ArrayList<Bid>>();\n\t\t\tinventory.put(theItem, new ArrayList<Bid>());\t\t\t\t\n\t\t} \t\t\t\t\t\t\n\t}", "public void addItem(Collectable item){\n \tif (!(item instanceof Token)) {\n \t\titems.add(item);\n \t}\n }", "public void addItemToList(String[] item) {\n \t\n \tcurrentTaskItems.add(item);\n }", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "public void addItem(CSVItem item)\n\t{\n\t\titemList.add(item);\n\t}", "public void append(Object item);", "public void addItem(Item param) {\r\n if (localItem == null) {\r\n localItem = new Item[] { };\r\n }\r\n\r\n //update the setting tracker\r\n localItemTracker = true;\r\n\r\n java.util.List list = org.apache.axis2.databinding.utils.ConverterUtil.toList(localItem);\r\n list.add(param);\r\n this.localItem = (Item[]) list.toArray(new Item[list.size()]);\r\n }", "public boolean putItem(@NonNull Item item) {\n return items.add(item);\n }", "public void addItem(SoldItem item) {\n\n items.add(item);\n log.debug(\"Added \" + item.getName() + \" quantity of \" + item.getQuantity());\n\n }", "public abstract void addItem(AbstractItemAPI item);", "public void store(Item item) {\n this.items.add(item);\n }", "private void addItem(Movie item) {\n mDataset.add(item);\n notifyItemInserted(mDataset.size() );\n notifyDataSetChanged();\n }", "public void addItem(Item newItem) {\n for (Item i : inventory) {\n if (newItem.getClass().equals(i.getClass())) {\n i.setQuantity(i.getQuantity() + newItem.getQuantity());\n return;\n }\n }\n inventory.add(newItem);\n }", "public static void putCraftableItemInArrayList() {\n\n craftableItem.addItemToCraftableList(campfire);\n craftableItem.addItemToCraftableList(raft);\n craftableItem.addItemToCraftableList(axe);\n craftableItem.addItemToCraftableList(spear);\n }", "public void add(Item item) {\r\n\t\tcatalog.add(item);\r\n\t}", "public void addItem(Item newItem){\n // check for duplicate item ID\n for (Item item: items) {\n if (item.getItemID() == newItem.getItemID()) {\n item.setQuantity(item.getQuantity() + 1);\n return;\n }\n }\n newItem.setQuantity(1);\n this.items.add(newItem);\n }", "public int addItem(Item i);", "public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}", "@Override\n public void onReceiveItem(InventoryItem itemReceived) {\n inventory.add(itemReceived);\n }", "public void addOrderItem(OrderItem item)\r\n\t{\r\n\t\torderItemList.add(item);\r\n\t}", "public void addItem(Item i) {\r\n assert (ic != null);\r\n \r\n ic.setItem(i);\r\n ic.setHandler(handler);\r\n items.add(ic.getItem());\r\n }", "public void push(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "public Boolean add(Item item) {\n \tif (itemCollection.containsKey(item.getItemName())) {\r\n \tif (checkAvailability(item, 1)) {\r\n \t\titem.setQuatity(item.getQuatity() + 1);\r\n \t\titemCollection.put(item.getItemName(), item);\r\n \t\treturn true;\r\n \t} else return false;\r\n } else {\r\n \titemCollection.put(item.getItemName(), item);\r\n \treturn true;\r\n }\r\n \t\r\n }", "public void add(Thing newThing)\r\n {\r\n \titems.add(newThing);\r\n }", "private void addItem() {\n\t\tString message = edtMessage.getText().toString();\n\t\t// build the human\n\t\tHuman hum = new Human(message, humans.size());\n\t\t// 1° method\n\t\tarrayAdapter.add(hum);\n\t\t// 2° method\n\t\t// messages.add(message);\n\t\t// arrayAdapter.notifyDataSetChanged();\n\t\t// and flush\n\t\tedtMessage.setText(\"\");\n\t}", "public void addItem(String nomItem, Item item) {\r\n \t\titems.putItem(nomItem, item);\r\n \t}", "public int addItem(Item i, int x, int y) {\n i.setMapRelation(new MapItem_Relation(this, i));\n int error_code = this.map_grid_[y][x].addItem(i);\n if (error_code == 0) {\n items_list_.add(i);\n } else {\n i.setMapRelation(null);\n }\n return error_code;\n }", "public boolean add(Type item);", "public void addGroceryItem(String item){\n groceryList.add(item);\n }", "public void add(int index, Object item)\n {\n items[index] = item;\n numItems++;\n }", "void addCpItem(ICpItem item);", "@SafeVarargs\n public final void add(int position, Item... items) {\n add(position, asList(items));\n }", "public void setRoomItems(ArrayList<Item> newRoomItems) {\n roomItems = newRoomItems;\n }", "public boolean add(T item) {\n\t\treturn list.add(item);\n\t}", "public void addItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n\n db.insert(TABLE_NAME, null, values); //Insert query to store the record in the database\n db.close();\n\n }", "public void addItem(Item item) {\r\n\t\tif (items.containsKey(item)) {\r\n\t\t\titem.increaseCount();\r\n\t\t\titems.put(item, item.getCount());\r\n\t\t} else {\r\n\t\t\titems.put(item, item.getCount());\r\n\t\t}\r\n\t}", "public void addItems(ResultItem rItem) {\r\n\t\titems.add(rItem);\r\n\t}", "public void add(E item);", "public void addItem(Object item) {\n\t\tListItem newEnd = new ListItem(item); // Create a new ListItem\n\t\tif (start == null) { // Is the list empty?\n\t\t\tstart = end = newEnd; // Yes, so new element is start and end\n\t\t\tstart.prev = start; \t\t// Prev start refers to itself\n\t\t} else { // No, so append new element\n\t\t\tend.next = newEnd; // Set next variable for old end\n\t\t\tcurrent = end;\t\t\t\t// To reference previous end object \n\n\t\t\t//Point end to the new ListItem object\n\t\t\tend = newEnd; // Store new item as end\n\t\t\tend.prev = current;\t\t// Set prev item in new end\n\t\t}\n\t}", "public boolean addItemToInventory(InventoryItem itemToAdd) {\n if (inventory.size() >= MAX_ITEMS) {\n // Inventory full, could not add the item\n return false;\n }\n\n // Let the strategy know this player received an item\n strategy.onReceiveItem(itemToAdd);\n inventory.add(itemToAdd);\n return true;\n }", "@Override\n\tpublic boolean add(E item) {\n\t\tif (this.numberOfElements == this.size) {\n\t\t\tE[] newArrayList = (E[]) new Object[this.size * 2];\n\t\t\tint i = 0;\n\t\t\twhile (i < this.size) {\n\t\t\t\tnewArrayList[i] = this.arrayList[i];\n\t\t\t\ti += 1;\n\t\t\t}\n\t\t\tthis.arrayList = newArrayList;\n\t\t\tthis.size = this.size * 2;\n\t\t}\n\t\tthis.arrayList[this.numberOfElements] = item;\n\t\tthis.numberOfElements += 1;\n\t\treturn true;\n\t}", "@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "public void addItem(LineItem item)\r\n {\r\n\t ChangeEvent event = new ChangeEvent(this);\r\n\t if(items.contains(item))\r\n\t {\r\n\t\t \r\n\t\t counter = 0;\r\n\t\t items.add(item);\r\n\t\t //tem.addQuantity();\r\n\t\t //tem.getQuantity();\r\n\t\t for(int i = 0; i < items.size(); i++)\r\n\t\t {\r\n\t\t\t if(items.get(i).equals(item))\r\n\t\t\t {\r\n\t\t\t counter++;\r\n\t\t\t }\r\n\t\t }\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t\t System.out.print(\"\\r Quantity of \" + item.toString() + \": \"+ counter);\r\n\t\t \r\n\t }\r\n\t else\r\n\t {\r\n\t\t counter = 1;\r\n\t// item.addQuantity();\r\n\t// item.getQuantity();\r\n\t\t items.add(item);\r\n\t// System.out.println(item.getQuantity());\r\n\t\t for (ChangeListener listener : listeners)\r\n\t\t listener.stateChanged(event);\r\n\t \t\r\n\t \tSystem.out.print(\"\\n Quantity of \" + item.toString() + \": \"+ counter);\r\n\t \r\n\t\t \r\n\t }\r\n\t\t\r\n \r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }", "public void addInventoryList(ArrayList<? extends Item> toAddList){\n\t\tinventoryList.addAll(toAddList);\n\t}", "public Inventory<T> add(final T item) {\n if (item == null) {\n return this;\n }\n final HashMap<T, Integer> freshMap = new HashMap<>(items);\n freshMap.put(item, items.get(item) + 1);\n return new Inventory<T>(enums, Collections.unmodifiableMap(freshMap));\n }", "public boolean addPlayerItem(PlayerItem playerItem);", "public void addItem(LayoutElementParcelable e) {\n if (mainFrag.IS_LIST && itemsDigested.size() > 0) {\n itemsDigested.add(itemsDigested.size() - 1, new ListItem(e));\n } else if (mainFrag.IS_LIST) {\n itemsDigested.add(new ListItem(e));\n itemsDigested.add(new ListItem(EMPTY_LAST_ITEM));\n } else {\n itemsDigested.add(new ListItem(e));\n }\n\n notifyItemInserted(getItemCount());\n }" ]
[ "0.79137594", "0.75455856", "0.75455856", "0.7452719", "0.74387425", "0.74076897", "0.7404734", "0.73640466", "0.7341031", "0.73239887", "0.7293481", "0.72783774", "0.72734994", "0.72533655", "0.71067274", "0.7106385", "0.71005315", "0.71003276", "0.7083023", "0.70674044", "0.7062323", "0.7050739", "0.69993806", "0.69908744", "0.69538575", "0.68920946", "0.6884116", "0.6880614", "0.68188184", "0.68053794", "0.67901903", "0.67777216", "0.67642", "0.6759929", "0.6750074", "0.67449605", "0.6744175", "0.67335516", "0.67131895", "0.67083985", "0.6691682", "0.66802895", "0.6670135", "0.6666395", "0.66583985", "0.6649584", "0.66492915", "0.6640062", "0.66338885", "0.6629712", "0.66284037", "0.6624007", "0.6620477", "0.6615658", "0.65695065", "0.65552425", "0.6544197", "0.6525558", "0.652099", "0.65127116", "0.6511796", "0.6479334", "0.64725626", "0.6456061", "0.6453659", "0.64322114", "0.641358", "0.64125323", "0.640979", "0.63354033", "0.63281786", "0.632516", "0.6323836", "0.63201225", "0.6315265", "0.63094354", "0.62899745", "0.62738395", "0.62686247", "0.6261632", "0.62363946", "0.6230886", "0.6230026", "0.6228978", "0.6216673", "0.6214169", "0.6213174", "0.6203694", "0.61899734", "0.6184355", "0.6182572", "0.61703384", "0.6165557", "0.6162708", "0.61551917", "0.61546135", "0.61509293", "0.6142448", "0.61388993", "0.6135964", "0.6126198" ]
0.0
-1
Removes an item from a room's ArrayList of items.
public void removeItem(int n) { items.remove(n); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeRoomItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = currentRoom.getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's item arraylist.\n if(item.getName().equals(seekItem.getName())){\n\n it.remove(); // removes the item.\n }\n }\n }", "public void removeItem(Item item) {\n _items.remove(item);\n }", "public void removeItem(Item e) {\n\t\tif (items.contains(e))\n\t\t\titems.remove(e);\n\t}", "public void removeItem(int id);", "public void removeInventoryList(Item item) {\n\t\tinventoryList.remove(item);\n\t}", "public void removeItem(){\n\t\tthis.item = null;\n\t}", "protected abstract void removeItem();", "public void removeItem(Item item) {\r\n for (Iterator<Item> it = inventoryItems.iterator(); it.hasNext(); ) {\r\n Item i = it.next();\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() - 1);\r\n }\r\n if (i.getCount() <= 0) {\r\n it.remove();\r\n }\r\n }\r\n }", "public void removeItem(Item theItem) {\n\t\tinventory.remove(theItem);\t\n\t}", "public void removeItem(T itemModel) {\n\t\tthis.removeItem(this.getItemIndex(itemModel));\n\t}", "public void remove(Item item) {\n for (int i = 0; i < items.length; i++) {\n if (items[i] == item) {\n items[i] = null;\n return;\n }\n }\n }", "public void removeItem(Item item)\n\t{\n\t\tinventory.remove(item);\n\t}", "public void removeItem(CargoItem item) {\n\t\t\n\t\tif (cargoList.contains(item))\n\t\t{\n\t\t\tcurrentWeight = currentWeight-item.getWeight();\n\t\t\tcurrentVolume = currentVolume-item.getVolume();\n\t\t\tcargoList.remove(item);\n\t\t\tSystem.out.println(\"Item removed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Item not found\");\n\t\t}\n\t\t\n\t}", "public void rmItem(Item item) {\n\t\titems.remove(item);\n\t}", "public void removeRoomFromList(String roomname){\n\t\troomlist.remove(roomname);\t\t\t\n\t}", "public void deleteItem(LibraryItem item){\r\n\t\tif(this.inverntory.empty())\r\n\t\t\tthrow new RuntimeException(\"Inventory is empty.\");\r\n\t\t// as long as the list is not empty\r\n\t\twhile(!this.inverntory.endpos()){\r\n\t\t\t// check if current head of list is item you want deleted\r\n\t\t\tif(this.inverntory.elem() == item){\r\n\t\t\t\t// if it is, then delete item and report deletion\r\n\t\t\t\tthis.inverntory.delete();\r\n\t\t\t\tSystem.out.println(item+\" removed from inventory.\");\r\n\t\t\t}\r\n\t\t\t// if it is not head of list, advance in list\r\n\t\t\telse{\r\n\t\t\t\tthis.inverntory.advance();\r\n\t\t\t}\r\n\t\t// do so until you reach end of list/inventory\r\n\t\t}\r\n\t}", "public void removePlayerItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = getPerson(PLAYER).getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's item arraylist.\n if(item.getName().equals(seekItem.getName())){\n\n it.remove(); // removes the item.\n }\n }\n }", "public void removeItemFromList(Item item, ShoppingList list) {\r\n \t\tif (item == null || list == null)\r\n \t\t\tthrow new IllegalArgumentException(\"null is not allowed\");\r\n \t\tpersistenceManager.remove(item, list);\r\n \t}", "public void removeItem(Item item) {\n this.reservationItems = this.reservationItems.stream()\n .filter(ri -> ri.isForItem(item))\n .collect(Collectors.toSet());\n }", "public boolean removeWallItemFromWall(WallItem wallItem);", "public void removeItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.remove(item);\n\t}", "public void removeItemFromRoomMap(String string) {\n this.ItemsInRoom.remove(string);\n }", "public void remove(Item item) {\r\n \t\tfor (ShoppingList list : shoppingLists)\r\n \t\t\tremoveItemFromList(item, list);\r\n \t\tpersistenceManager.remove(item);\r\n \r\n \t}", "public void remove(Thing aThing)\r\n {\r\n boolean found = false;\r\n for (int i = 0; i < items.size() && !found; i++)\r\n {\r\n if (items.get(i) == aThing)\r\n {\r\n items.remove(i);\r\n found = true;\r\n }\r\n }\r\n\r\n if(!found) throw new IllegalArgumentException(\"Item not found: \" + aThing);\r\n }", "public void removeItem(Item item) {\r\n\t\tif (items.containsKey(item)) {\r\n\t\t\titems.remove(item);\r\n\t\t}\r\n\t}", "public void removeItemInventory(Item item){\r\n playerItem.remove(item);\r\n System.out.println(item.getName() + \" was removed from your inventory\");\r\n }", "public void excluirItem(Cerveja cerveja){\r\n\t\tint indice = IntStream.range(0, itens.size())\r\n\t\t\t\t.filter(i -> itens.get(i).getCerveja().equals(cerveja)) \r\n\t\t .findAny().getAsInt(); // getAsInt forca o retornar o valor do indice\r\n\t\t\r\n\t\t// remove o item da lista, pelo indice do item passado como parametro\r\n\t\titens.remove(indice);\r\n\t}", "public void removeItem(int idx)\n\t{\n\t\titemList.remove(idx);\n\t\t\n\t}", "@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}", "public void removeItem(int itemToRemove){\n\t\tinventoryItems[itemToRemove] = null;\n\t}", "public void removeItemInventory(Item item){\n playerItem.remove(item);\n System.out.println(item.getName() + \" was removed from your inventory\");\n }", "public void remove(TradeItem newItem) {\n items.remove(newItem);\n }", "public boolean removeItem(Item item) {\r\n\t\treturn items.remove(item);\r\n\t}", "public void hapusItem(Item objItem) {\n arrItem.remove(objItem); //buang item\n }", "protected static String removeRoom(ArrayList<Room> roomList) {\n System.out.println(\"Remove a room:\");\n\n int index = findRoomIndex(roomList, getRoomName());\n\n if (index != 0) {\n roomList.remove(index);\n return \"Room removed successfully\";\n } else {\n return \"Room doesn't exist!\";\n }\n }", "public void removeItem(Carryable g) {\r\n for (int i=0; i<numItems; i++) {\r\n if (cart[i] == g) {\r\n cart[i] = cart[numItems - 1];\r\n numItems -= 1;\r\n return;\r\n }\r\n }\r\n }", "public void removeItem() {\n if (this.size() == 0) {\n System.out.println(\"Empty List.\");\n return;\n }\n this.print();\n String code;\n System.out.println(\"Enter the code of removed item: \");\n code = sc.nextLine().toUpperCase();\n int pos = find(code);\n if (pos < 0) {\n System.out.println(\"This code does not exist.\");\n } else {\n this.remove(pos);\n System.out.println(\"The item \" + code + \" has been removed.\");\n\n }\n }", "public void removeAllItems ();", "public void removeRoom(Room room) {\n rooms.remove(room);\n }", "@Override\n\tpublic void itemRemove(final HomeItem item)\n\t{\n\t\tfileService().removeExcept(item.getReference(), null);\n\n\t\tsqlService().transact(new Runnable()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\titemRemoveTx(item);\n\t\t\t}\n\t\t}, \"remove\");\n\t}", "public void removeItem(int i) {\n checkIndex(i);\n\n if (items[i] != null) {\n size--;\n }\n items[i] = null;\n }", "@Override\n public boolean remove(T item) {\n //find where the item is in the array\n int index = this.findIndex(item);\n //if it is not in the array, return false\n if(index == -1)\n return false;\n //otherwise, move the last item in the array to the removed items\n //spot, decrement numItems and return true\n else{\n arr[index] = arr[--numItems];\n return true;\n }\n }", "public Item dropItem(String itemName) {\n Item item = items.remove(itemName);\n if(item != null) {\n currentRoom.addItem(item);\n }\n return item;\n }", "public void removeWorkoutItem(String item) {\n\n String toDelete = KEY_WORKOUT + \"=?\";\n String[] deleteArguments = new String[]{item};\n db.delete(DATABASE_TABLE_WORKOUTS, toDelete, deleteArguments);\n }", "public Object removeItem (String key);", "private void removeItem(int item) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == item) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"없어진 상품:\"+products[i].toString());\r\n\t\t\t\tproducts[i] = null;\r\n\t\t\t\tindex--;\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 상품이 없습니다.\");\r\n\t}", "public void removeProduct(Product item) {\n inventory.remove(item);\n }", "public void remove(ItemData data) {\n int position = list.indexOf(data);\n list.remove(position);\n notifyItemRemoved(position);\n }", "public void removeGroceryItem(String item){\n int position = findItem(item);\n if(position > 0)\n myGrocery.remove(position);\n }", "public void removeItem() {\n tvItem.setOnLongClickListener(new View.OnLongClickListener() {\n @Override\n public boolean onLongClick(View v) {\n // Notify the listener which position was long pressed.\n longClickListener.onItemLongClicked(getBindingAdapterPosition());\n return true;\n }\n });\n }", "public void removeListItem(int position){\n mList.remove(position);\n notifyItemRemoved(position);\n }", "public void remove() {\n removed = true;\n if (room == null)\n return;\n room.removeEntity(this);\n }", "public static void removeItem(String itemName)\n {\n inventory.remove(getItem(itemName));\n }", "public void remove(int index) {\n items.remove(index);\n }", "public Objects removeObject(String itemName)\n {\n return items.remove(itemName);\n }", "public Item removeLast();", "public void deleteItem() {\n\t\tIntent intent = new Intent(this, AlarmActivity.class);\n\t\tint alarmId = itemsAdapter.getSelectedItem().getId();\n\t\tLog.d(TAG, \"Cancelling Alarm with ID \" + alarmId); \n\t\tPendingIntent sender = PendingIntent.getBroadcast(this, alarmId, intent, 0);\n\t\tAlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n\t\talarmManager.cancel(sender);\n\t\t\n\t\titemsAdapter.remove(itemsAdapter.getSelectedPosition());\n\t\titemsAdapter.unsetSelectedPosition();\n\t\tgetActionBar().hide();\n\t}", "@Override\r\n\tpublic void sellItem(AbstractItemAPI item) {\n\t\titems.remove(item);\r\n\t\t\r\n\t}", "public Item remove(@NonNull Item item) {\n if (items.contains(item) && item instanceof Valuable) {\n \titems.remove(item);\n return item;\n }\n return null;\n }", "public DataItem removeItem()\r\n\t{\r\n\t\tDataItem temp=itemArray[numItems-1];\r\n\t\titemArray[numItems-1]=null;\r\n\t\tnumItems--;\r\n\t\treturn temp;\r\n\t}", "public void removeExistingItem(Item item) {\n inventory.remove(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public boolean remove(T item) {\n\t\treturn list.remove(item);\n\t}", "public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n System.out.println(\"You have placed the \"+ item.getName() +\" in the \" + currentRoom.getName() + \".\");\n }\n }\n }", "public void removeAllItem() {\n orderList.clear();\n }", "public DataItem removeItem()\n\t{\n\t\tDataItem temp = itemArray[numItems-1];\n\t\titemArray[numItems-1] = null;\n\t\tnumItems--;\n\t\treturn temp;\n\t}", "public void itemRemoved(E item);", "public void deleteItem(MySmsMessage item){\n if(dataset.contains(item)){\n int pos=dataset.indexOf(item);\n dataset.remove(pos);\n notifyItemRemoved(pos);\n }\n }", "public void deleteItem(String string) {\n itemArrayList.remove(string);\n saveArrayList(itemArrayList, \"itemArrayList\");\n }", "public void removeItem(int position) {\r\n productList.remove(position);\r\n notifyItemRemoved(position);\r\n }", "public void removeItem() {\r\n\t\tlog.info(\"Remove item\");\r\n\t\tsu.waitElementClickableAndClick(LocatorType.Xpath, CartSplitViewField.Remove.getName());\r\n\t}", "public void removeFromCart(final Item item) {\n for (Item f : cart) {\n if (f.getName().equals(item.getName())) {\n if (\n f.getQuantity() == item.getQuantity()) {\n cart.remove(f);\n return;\n }\n f.setQuantity(f.getQuantity() - item.getQuantity());\n return;\n }\n }\n }", "public void removeItem(int position) {\n cartList.remove(position);\n notifyItemRemoved(position);\n }", "public void unScheduleItem(IItem item, BankFusionEnvironment env) {\n removeItem(item);\n }", "private DefaultListModel<String> removeItem(JList<String> list, DefaultListModel<String> listModel) {\r\n\t\tint[] selectedItems = list.getSelectedIndices();\r\n\t\tfor(int i=selectedItems.length; i>0; i--)\r\n\t\t\tlistModel.removeElementAt(selectedItems[i-1]);\r\n\t\treturn listModel;\r\n\t}", "public void deleteItem(String nomItem) {\r\n \t\titems.removeItem(nomItem);\r\n \t}", "public void deleteItem(int index) {\n this.items.remove(index);\n }", "@FXML\n public void removeListItem(ActionEvent event) throws IOException {\n int removeItemIndex = unseenPacketList.getSelectionModel().getSelectedIndex();\n if (removeItemIndex < 0) {\n \tJOptionPane.showMessageDialog(null, \"Cannot remove from already empty list.\");\n } else {\n \tUpdateHandler.getAllPacketsList().remove(removeItemIndex);\n unseenPacketList.getItems().remove(removeItemIndex);\n UpdateHandler.getUnseenPacketListIndex().remove(removeItemIndex);\n }\n \n }", "public void remove(int location,Object o){\n feedList.remove(location);\n notifyItemRemoved(location);\n notifyItemRangeChanged(location, feedList.size());\n }", "public void remove(Equipment equipment) {\n equipments.remove(equipment);\n }", "public void remove(E e) {\n Position<Item<E>> p = findPosition(e);\n if (p != null) // element's position is found\n list.remove(p);\n }", "public void deleteItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, KEY_ID + \" = ?\",\n new String[]{String.valueOf(item.getId())});\n db.close();\n }", "public void removeItems(ResultItem itemRemove) {\r\n\t\titems.remove(itemRemove);\r\n\t}", "public void deleteTodoItem(TodoItem item) {\n todoItems.remove(item);\n }", "private void sendRemoveItem(Item item, boolean moving) {\n/* 2590 */ if (this.watchers != null)\n/* */ {\n/* 2592 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 2596 */ if (!moving || !vz.isVisible(item, this)) {\n/* 2597 */ vz.removeItem(item);\n/* */ }\n/* 2599 */ } catch (Exception e) {\n/* */ \n/* 2601 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }\n/* */ }", "@Override\n\tpublic void removeRoom(int rid) {\n\t\tfor (Person p : findAll()) {\n\t\t\tfor (Room r : findRooms(p.getId())) {\n\t\t\t\tif (r.getId() == rid) {\n\t\t\t\t\tremoveRoom(p.getId(), r);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public void removeExerciseItem(String item) {\n\n String toDelete = KEY_EXERCISE + \"=?\";\n String[] deleteArguments = new String[]{item};\n db.delete(DATABASE_TABLE_EXERCISES, toDelete, deleteArguments);\n }", "public void removeItem(Object item) throws SetException {\n\t\tfor (Object element : list)\n\t\t\tif (element.equals(item)) {\n\t\t\t\tlist.remove(item);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\tthrow new SetException(\"Item not already in set.\");\n\t}", "@Override\n\tpublic void removeItem(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*--------------Remove Items here--------------*\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id\n\t\t\tSystem.out.print(\"Enter Item Id to delete the item: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.removeItem(session,itemId);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "public boolean removeItem(Item item, int x, int y) {\n\t\tInventory items = getItemsAt(x, y);\n\t\tif (!items.any()) {\n\t\t\tLog.warning(\"Failed! no items at \" + x + \",\" + y);\n\t\t\treturn false;\n\t\t}\n\t\tboolean removed = items.remove(item);\n\t\treturn removed;\n\t}", "public void remove(int pos) throws IndexOutOfBoundsException {\n list.remove(pos);\n }", "protected void removeItem(Item item, boolean moving) {\n/* 2393 */ if (this.vitems != null)\n/* */ {\n/* 2395 */ if (!this.vitems.isEmpty()) {\n/* */ \n/* 2397 */ if (item.getTemplateId() == 726)\n/* 2398 */ Zones.removeDuelRing(item); \n/* 2399 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* 2400 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2402 */ this.vitems.removePileItem(item.getFloorLevel());\n/* 2403 */ if (this.vitems.isEmpty())\n/* */ {\n/* */ \n/* 2406 */ this.vitems.destroy(this);\n/* 2407 */ this.vitems = null;\n/* */ }\n/* */ \n/* 2410 */ } else if (this.vitems.removeItem(item)) {\n/* */ \n/* */ \n/* 2413 */ this.vitems.destroy(this);\n/* */ \n/* 2415 */ this.vitems = null;\n/* 2416 */ if (pileItem != null)\n/* */ {\n/* 2418 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* */ }\n/* 2421 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(pileItem.getFloorLevel())) {\n/* */ \n/* 2423 */ if (!moving) {\n/* 2424 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* 2426 */ } else if (!item.isDecoration() && pileItem != null) {\n/* */ \n/* 2428 */ checkIfRenamePileItem(pileItem);\n/* */ } \n/* 2430 */ if (item.isDomainItem())\n/* 2431 */ Zones.removeAltar(item, moving); \n/* 2432 */ if (item.getTemplateId() == 1175 || item.getTemplateId() == 1239)\n/* 2433 */ Zones.removeHive(item, moving); \n/* 2434 */ if (item.getTemplateId() == 939 || item.isEnchantedTurret())\n/* 2435 */ Zones.removeTurret(item, moving); \n/* 2436 */ if (item.isEpicTargetItem())\n/* 2437 */ EpicTargetItems.removeRitualTargetItem(item); \n/* 2438 */ if (item.isKingdomMarker())\n/* */ {\n/* 2440 */ if (item.getTemplateId() != 328)\n/* 2441 */ Kingdoms.destroyTower(item); \n/* */ }\n/* 2443 */ if (item.getTemplateId() == 521) {\n/* */ \n/* 2445 */ this.zone.creatureSpawn = null;\n/* 2446 */ Zone.spawnPoints--;\n/* */ } \n/* 2448 */ if (this.village != null && item.getTemplateId() == 757)\n/* */ {\n/* 2450 */ this.village.removeBarrel(item);\n/* */ }\n/* */ }\n/* */ else {\n/* */ \n/* 2455 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* */ \n/* 2457 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2459 */ this.vitems.removePileItem(item.getFloorLevel());\n/* */ }\n/* 2461 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(item.getFloorLevel())) {\n/* */ \n/* 2463 */ destroyPileItem(item.getFloorLevel());\n/* */ } \n/* */ } \n/* */ }\n/* 2467 */ if (item.isFence()) {\n/* */ \n/* 2469 */ int offz = 0;\n/* */ \n/* */ try {\n/* 2472 */ offz = (int)((item.getPosZ() - Zones.calculateHeight(item.getPosX(), item.getPosY(), item\n/* 2473 */ .isOnSurface())) / 10.0F);\n/* */ }\n/* 2475 */ catch (NoSuchZoneException nsz) {\n/* */ \n/* 2477 */ logger.log(Level.WARNING, \"Dropping fence item outside zones.\");\n/* */ } \n/* 2479 */ float rot = Creature.normalizeAngle(item.getRotation());\n/* 2480 */ if (rot >= 45.0F && rot < 135.0F) {\n/* */ \n/* 2482 */ VolaTile next = Zones.getOrCreateTile(this.tilex + 1, this.tiley, (item\n/* 2483 */ .isOnSurface() || this.isTransition));\n/* 2484 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex + 1, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, next\n/* 2485 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2487 */ else if (rot >= 135.0F && rot < 225.0F) {\n/* */ \n/* 2489 */ VolaTile next = Zones.getOrCreateTile(this.tilex, this.tiley + 1, (item\n/* 2490 */ .isOnSurface() || this.isTransition));\n/* 2491 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley + 1, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, next\n/* 2492 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2494 */ else if (rot >= 225.0F && rot < 315.0F) {\n/* */ \n/* 2496 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, \n/* 2497 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ }\n/* */ else {\n/* */ \n/* 2501 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, \n/* 2502 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ } \n/* */ } \n/* */ \n/* 2506 */ sendRemoveItem(item, moving);\n/* 2507 */ if (!moving) {\n/* 2508 */ item.setZoneId(-10, this.surfaced);\n/* */ }\n/* */ }", "@Override\n\tpublic void remove(Component component) {\n\t\tlist.remove(component);\n\t}", "public boolean removeRoom(String id){\n for(int i = 0; i < rooms.size(); i++){\n Room roomAti = (Room)rooms.get(i);\n if(roomAti.id.equals(id)){\n rooms.remove(i);\n return true;\n }\n }\n return false;\n }", "public void remove()\r\n { Exceptions.unmodifiable(\"list\"); }", "public static void removeItem(long id) {\n List<Equipment> equipmentList = EquipmentCommunication.getEquipmentByItem(id);\n if (equipmentList != null) {\n for (Equipment e : equipmentList) {\n EquipmentCommunication.removeEquipment(e.getId());\n }\n }\n\n HttpRequest request = HttpRequest.newBuilder().DELETE().uri(URI.create(String.format(\"http://localhost:8080/item/delete/%s\", id))).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n }", "@SuppressWarnings(\"unchecked\") // stops Java complaining about the call to compare\n public boolean remove(Object item) {\n E itm = (E) item; //this here is cast statment, which allows an object of anytype to be cast as a generic element, which means multiple types of elements can be use in this program\n if (itm == null) { //if the item is null it sends but null, if the item at index is null rerun false, and if the item does not equal the item at the position it returns null\n return false;\n }\n int indexValue = findIndexOf(itm);\n if (data[indexValue] == null) return false;\n if (!data[indexValue].equals(item))\n return false;\n\n for (int i = indexValue; i < count; i++) { //iterates through the list, moving all the elements to the on in front,\n data[i] = data[i + 1];\n }\n count--; //the decrments the count to show an item has been remove, it has not been removed but instead moved to the end, from there the item is overwritten when something is added.\n return true; //the count prevents the item from being seen.\n }", "public void removeElement(String selectedItem, final int position) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Remove \" + selectedItem + \"?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n masterItems.remove(position);\n Collections.sort(masterItems);\n storeArrayVal(masterItems, getApplicationContext());\n lv.setAdapter(adapter);\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n builder.show();\n }", "@Override\n public void remove() {\n if (lastItem == null)\n throw new IllegalStateException();\n bag.remove(lastItem);\n lastItem = null;\n }", "public void removeByequip_id(long equip_id);", "void removeMenuItem(int itemId, String itemName);" ]
[ "0.70182717", "0.6961992", "0.6821198", "0.67318535", "0.67195123", "0.67159206", "0.6715581", "0.6695189", "0.66786003", "0.6629739", "0.66012454", "0.6597204", "0.65816855", "0.6580486", "0.6577888", "0.65570736", "0.6535793", "0.6403388", "0.63920885", "0.63783795", "0.63660884", "0.63454485", "0.63198966", "0.6304274", "0.63017064", "0.62833464", "0.62722087", "0.62656116", "0.6258068", "0.6251705", "0.6242234", "0.6239423", "0.62212896", "0.6215165", "0.6193362", "0.6189266", "0.6167393", "0.6141706", "0.6125744", "0.61025494", "0.60965294", "0.6090928", "0.6082585", "0.606713", "0.6055436", "0.6049128", "0.6046824", "0.6045342", "0.6032075", "0.6023137", "0.60181797", "0.6001266", "0.59911644", "0.5988814", "0.5985874", "0.5984867", "0.5979799", "0.5979092", "0.5978146", "0.59718114", "0.59503585", "0.5932778", "0.59229714", "0.5917439", "0.5916184", "0.5914992", "0.58887905", "0.5888206", "0.5869566", "0.5850876", "0.58469015", "0.58312523", "0.5815355", "0.58037937", "0.57889926", "0.5783843", "0.57816327", "0.57763505", "0.5769339", "0.5761976", "0.57564825", "0.5754232", "0.57515174", "0.57494134", "0.5747022", "0.5732743", "0.5731054", "0.5713938", "0.57058513", "0.570212", "0.56924874", "0.5689183", "0.5688866", "0.56825596", "0.5677522", "0.56765425", "0.5660841", "0.566009", "0.5659875", "0.56573385" ]
0.5814644
73
Removes an item into a room's ArrayList of items, and places it into the players inventory Searches by name, prints based on the results.
public void takeItem(String name, Player player) { int i=items.size()-1; while(i>=0){ if(items.get(i).getName().equals(name)) { player.addItem(items.get(i)); System.out.println("You take the "+items.get(i).getName()+"!"); items.remove(i); return; } i--; } System.out.println("Action failed. Review your input and try again!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dropItem(Item seekItem)\n {\n //get each item from the items's array list.\n for (Item item : items){\n if(item.getName().equals(seekItem.getName())){\n currentRoom.getInventory().getItems().add(item);\n removePlayerItem(item);\n System.out.println(\"You have placed the \"+ item.getName() +\" in the \" + currentRoom.getName() + \".\");\n }\n }\n }", "public void removeRoomItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = currentRoom.getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's item arraylist.\n if(item.getName().equals(seekItem.getName())){\n\n it.remove(); // removes the item.\n }\n }\n }", "public void removeItemInventory(Item item){\n playerItem.remove(item);\n System.out.println(item.getName() + \" was removed from your inventory\");\n }", "public void removeItemInventory(Item item){\r\n playerItem.remove(item);\r\n System.out.println(item.getName() + \" was removed from your inventory\");\r\n }", "void dropItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n// int indexItem = -1;\n String nameOfItem = \"\";\n String dropFromInventory = \"debug\";\n\n while (iterator.hasNext()) {\n HashMap.Entry liste = (HashMap.Entry) iterator.next();\n String itemName = (String) liste.getKey();\n if (itemName.equalsIgnoreCase(command.getSecondWord())) {\n dropFromInventory = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\")) {\n itemLocation.addItem(currentRoom, new PickableItem(nameOfItem, inventory.getItemWeight(nameOfItem), inventory.getUseable(nameOfItem)));\n inventory.removeItemInventory(nameOfItem);\n System.out.println(\"You have dropped: \" + nameOfItem);\n\n } else {\n System.out.println(\"Can't drop item that isn't in inventory \" + command.getSecondWord());\n }\n }", "public void removePlayerItem(Item seekItem )\n {\n // Gets the iterator of the currentRoom's item arraylist.\n for(Iterator<Item> it = getPerson(PLAYER).getInventory().getItems().iterator();it.hasNext();){\n\n Item item = it.next();\n\n // if seekItem is found in the currentRoom's item arraylist.\n if(item.getName().equals(seekItem.getName())){\n\n it.remove(); // removes the item.\n }\n }\n }", "public void dropItem(String secondWord)\n {\n if(secondWord == null){\n System.out.println(\"Drop what?\");\n }\n else{\n if(!inventory.isEmpty()){\n boolean found = false;\n for(int i = 0; i < inventory.size() && !found; i++){\n Item itemToDrop = inventory.get(i);\n if(itemToDrop.getId().equals(secondWord)){\n if(itemToDrop.getId().equals(\"wheelchair\")){\n maxWeight = 5;\n for(Item patient : inventory){\n if(patient.getId().equals(\"patient\")){\n patient.changePickUpItem(false);\n }\n }\n }\n if(itemToDrop.getId().equals(\"patient\")){\n itemToDrop.changePickUpItem(false);\n } \n currentRoom.addItem(itemToDrop);\n inventoryWeight -= itemToDrop.getItemWeight();\n inventory.remove(itemToDrop);\n found = true;\n System.out.println(\"You have droped the item: \" + itemToDrop.getId() + \".\");\n }\n }\n }\n else{\n System.out.println(\"Your inventory is empty.\");\n }\n }\n }", "private void dropItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryDel(itemFound);\n }\n }", "public void addItemInventory(Item item){\n playerItem.add(item);\n System.out.println(item.getDescription() + \" was taken \");\n System.out.println(item.getDescription() + \" was removed from the room\"); // add extra information to inform user that the item has been taken\n }", "private static void removeItemFromCart() {\r\n\t\tString itemName = getValidItemNameInput(scanner);\r\n\t\tfor (Iterator<Map.Entry<Product, Integer>> it = cart.getCartProductsEntries().iterator(); it.hasNext();){\r\n\t\t Map.Entry<Product, Integer> item = it.next();\r\n\t\t if( item.getKey().getName().equals(itemName) ) {\r\n\t\t\t it.remove();\r\n\t\t }\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Item removed from the cart successfully\");\r\n\t\tSystem.out.println();\r\n\t}", "public void removeItem(CargoItem item) {\n\t\t\n\t\tif (cargoList.contains(item))\n\t\t{\n\t\t\tcurrentWeight = currentWeight-item.getWeight();\n\t\t\tcurrentVolume = currentVolume-item.getVolume();\n\t\t\tcargoList.remove(item);\n\t\t\tSystem.out.println(\"Item removed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Item not found\");\n\t\t}\n\t\t\n\t}", "private void grabItem(String item)//Made by Justin\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n player.inventoryAdd(itemFound, currentRoom);\n }\n }", "public void takeItemsFromChest() {\r\n currentRoom = player.getCurrentRoom();\r\n for (int i = 0; i < currentRoom.getChest().size(); i++) {\r\n player.addToInventory(currentRoom.getChest().get(i));\r\n currentRoom.getChest().remove(i);\r\n }\r\n\r\n }", "public void removeItem() {\n if (this.size() == 0) {\n System.out.println(\"Empty List.\");\n return;\n }\n this.print();\n String code;\n System.out.println(\"Enter the code of removed item: \");\n code = sc.nextLine().toUpperCase();\n int pos = find(code);\n if (pos < 0) {\n System.out.println(\"This code does not exist.\");\n } else {\n this.remove(pos);\n System.out.println(\"The item \" + code + \" has been removed.\");\n\n }\n }", "public void drop(String itemName, World world) {\n\t\tItem item = world.dbItems().get(itemName);\n\n\t\tList<Item> items = super.getItems();\n\t\tRoom room = super.getRoom();\n\t\tList<Item> roomItems = room.getItems();\n\n\t\tif (items.contains(item)) {\n\t\t\troom.addItem(item);\n\t\t\tsuper.removeItem(item);\n\t\t\tSystem.out.println(\"Dropped \" + item + \" on the floor.\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No \" + item + \" in inventory.\");\n\t\t}\n\t}", "public void removeItem(Item item) {\r\n for (Iterator<Item> it = inventoryItems.iterator(); it.hasNext(); ) {\r\n Item i = it.next();\r\n if (i.getId() == item.getId()) {\r\n i.setCount(i.getCount() - 1);\r\n }\r\n if (i.getCount() <= 0) {\r\n it.remove();\r\n }\r\n }\r\n }", "public void removeItem(Item item)\n\t{\n\t\tinventory.remove(item);\n\t}", "public void removeItem(Item theItem) {\n\t\tinventory.remove(theItem);\t\n\t}", "public void deleteItem(LibraryItem item){\r\n\t\tif(this.inverntory.empty())\r\n\t\t\tthrow new RuntimeException(\"Inventory is empty.\");\r\n\t\t// as long as the list is not empty\r\n\t\twhile(!this.inverntory.endpos()){\r\n\t\t\t// check if current head of list is item you want deleted\r\n\t\t\tif(this.inverntory.elem() == item){\r\n\t\t\t\t// if it is, then delete item and report deletion\r\n\t\t\t\tthis.inverntory.delete();\r\n\t\t\t\tSystem.out.println(item+\" removed from inventory.\");\r\n\t\t\t}\r\n\t\t\t// if it is not head of list, advance in list\r\n\t\t\telse{\r\n\t\t\t\tthis.inverntory.advance();\r\n\t\t\t}\r\n\t\t// do so until you reach end of list/inventory\r\n\t\t}\r\n\t}", "public void printItems()\n {\n if (getItems().size()==0){\n System.out.println(\"There are no items in this room.\");\n }\n else{\n System.out.print(\"The item(s) in this room are: \");\n int i=0;\n while(i<getItems().size()){\n if(i<getItems().size()-1){\n System.out.print(getItems().get(i).getName()+\", \");\n }\n else{\n System.out.println(getItems().get(i).getName()+\".\");\n }\n i++;\n }\n }\n }", "public static void removeOrderedItem() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Removing ordered item************\");\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tOrderedItem orderedItem = null;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tSystem.out.println();\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to remove the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\n\t\t\tdo {\n\t\t\t\tSystem.out.println();\n\t\t\t\tif (listOfOrderedItems.size() == 0) {\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\tSystem.out.println(\"There is no ordered items!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfor (i = 0; i < listOfOrderedItems.size(); i++) {\n\t\t\t\t\torderedItem = (OrderedItem) listOfOrderedItems.get(i);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((i + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Done\");\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.print(\"Select an ordered item to remove from order: \");\n\t\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\t\tif (choice != (i + 1)) {\n\t\t\t\t\torderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(choice - 1);\n\n\t\t\t\t\tcheck = orderedItemManager.removeOrderedItem(orderedItem);\n\n\t\t\t\t\tif (check) {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Ordered item removed from order successfully!\");\n\t\t\t\t\t\tlistOfOrderedItems.remove(orderedItem);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t.println(\"Failed to remove ordered item from order!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (choice != (i + 1));\n\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of removing items************\");\n\t}", "private void remove(GroceryItem itemObj, String itemName, double itemPrice) {\n\t\tif (!bag.remove(itemObj)) {\n\t\t\tSystem.out.println(\"Unable to remove, this item is not in the bag.\");\n\t\t} else {\n\t\t\tSystem.out.println(itemName + \" \" + itemPrice + \" removed.\");\n\t\t}\n\t}", "public void eatItem(Command command) {\n if (!command.hasSecondWord()) { // check if there's a second word\n System.out.println(\"Eat what?\");\n return;\n }\n String itemToBeEaten = command.getSecondWord();\n List<Item> playerInventory = player.getPlayerInventory(); // load the inventory of the player\n\n boolean somethingToUse = false;\n int notThisItem = 0;\n int loop;\n\n for (loop = 0; loop < playerInventory.size(); loop++) { // loop through the player inventory\n Item currentItem = playerInventory.get(loop); // set currentitem on the item that is currently in the loop\n if (itemToBeEaten.equals(currentItem.getItemName()) ){ // get the item name, then check if that matches the secondWord\n if (currentItem.getItemCategory().equals(\"food\")){ // check if the item used is an item in the \"food\" category\n if((player.getHealth())<(20)) { // check if the player's health is full\n player.addHealth(currentItem.getHealAmount()); // heal the player\n player.removeItemFromInventory(currentItem); // remove item from inventory\n System.out.println(\"You eat the \" + itemToBeEaten + \". It heals for \" + currentItem.getHealAmount()+\".\");\n } else { // the player's health is full\n System.out.println(\"Your are at full health!\");\n }\n } else { // item is not a food item\n System.out.println(\"You can't eat that item!\");\n }\n } else { // the item did not match the player provided name\n notThisItem++;\n }\n somethingToUse = true;\n }\n\n //errors afvangen\n if (!somethingToUse) { // the item is not found in the player inventory\n System.out.println(\"You can't eat that!\");\n }\n\n if (loop == notThisItem) { // the player has nothing to burn secondWord with\n //ThisItem is the same amount as loop. Then the player put something in that is not in the room\n System.out.println(\"You cannot eat \" + itemToBeEaten + \" because you don't have it in your inventory!\");\n }\n }", "private static String[] removeFromBag(String[] inventory, String item){\r\n for(int i=0; i<inventory.length; i++){\r\n if(inventory[i].equals(item)){\r\n inventory[i] = \"\";\r\n break;\r\n }\r\n }\r\n return inventory;\r\n }", "public void removeItem(String itemName, int Qty) {\n if (checkExist(itemName, Qty) == true) {\n int i;\n //System.out.println(checkExist(itemName));\n for (i = 0; i < inventory.size(); i++) {\n Map<String, Object> removedItem = new HashMap<>();\n removedItem = inventory.get(i);\n\n if (itemName.equals(removedItem.get(\"Name\").toString())) {\n int a = Integer.parseInt((String) removedItem.get(\"Amount\"));\n removedItem.put(\"Amount\", a - Qty);\n\n if (a - Qty < 1) {\n removedItem.put(\"Existence\", \"N\");\n }\n }\n }\n } else {\n System.out.println(\"Item \" + itemName + \" is not available.\");\n for (int i = 0; i < inventory.size(); i++) {\n Map<String, Object> removedItem = new HashMap<>();\n removedItem = inventory.get(i);\n\n if (itemName.equals(removedItem.get(\"Name\").toString())) {\n System.out.println(\"Since item \" + itemName + \"'s amout is not enough, try less amount.\");\n }\n }\n }\n outPutFile();\n }", "private void removeItem(int item) {\n\t\tboolean flag = false;\r\n\t\tfor(int i=0; i<index; i++) {\r\n\t\t\tif(products[i].getTag() == item) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"없어진 상품:\"+products[i].toString());\r\n\t\t\t\tproducts[i] = null;\r\n\t\t\t\tindex--;\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(flag == false)\r\n\t\t\tSystem.out.println(\"해당하는 상품이 없습니다.\");\r\n\t}", "private void takeItem(Command command) \n { \n if(!command.hasSecondWord()) { \n // if there is no second word, we don't know where to go... \n Logger.Log(\"What are you trying to take?\"); \n return; \n } \n \n String itemName = command.getSecondWord();\n String secondName = itemName + \"2\";\n \n Item thisItem = currentRoom.getItem(itemName);\n Item secondItem = currentRoom.getItem(secondName);\n \n if (thisItem == null) {\n Logger.Log(\"There isn't a \" + itemName + \"in here!\");\n }\n else if (player.inventory.containsKey(itemName)){\n Logger.Log(\"You take another \" + itemName + \" and put it in your backpack.\");\n player.addItem(secondName, secondItem); \n }\n else if (player.inventory.containsKey(itemName)&&(player.inventory.containsKey(secondName))){\n Logger.Log(\"You don't need any more \" + itemName + \"s!\");\n }\n else { \n Logger.Log(\"You take the \" + itemName + \" and put it in your backpack.\");\n player.addItem(itemName, thisItem);\n } \n \n }", "public String removeItem() {\n userFacade.printUsersCart(user);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n //user.getCart().remove(selectedItem);\n userFacade.removeFromCart(user, selectedItem);\n System.out.println(\"Item to be removed....\" + selectedItem.getName());\n userFacade.printUsersCart(user);\n return \"\";\n }", "@Override\r\n public void uncall() {\r\n Player player = MbPets.getInstance().getServer().getPlayer(getOwner());\r\n if (player != null) {\r\n if (getEntity().getInventory().getDecor() != null) {\r\n if (player.getInventory().firstEmpty() >= 0) {\r\n player.getInventory().addItem(getEntity().getInventory().getDecor());\r\n } else {\r\n player.getWorld().dropItemNaturally(player.getLocation(),\r\n getEntity().getInventory().getDecor());\r\n }\r\n }\r\n }\r\n super.uncall();\r\n }", "public String dropItem(String item){\n if(hasGrabbedItem(item)){\n grabbedItems.remove(item);\n return \"You have dropped: \" + item;\n }else{\n return \"You don't have one to drop.\";\n }\n }", "public Item dropItem(String itemName) {\n Item item = items.remove(itemName);\n if(item != null) {\n currentRoom.addItem(item);\n }\n return item;\n }", "public static void removeItem(String itemName)\n {\n inventory.remove(getItem(itemName));\n }", "public Item checkForItem(String name) {\r\n Item output = null;\r\n for (Item item : inventory) {\r\n String check = item.getName().replaceAll(\" \", \"\");\r\n if (name.equals(check.toLowerCase())) {\r\n output = item;\r\n }\r\n }\r\n for (Item item : potionInventory) {\r\n String check = item.getName().replaceAll(\" \", \"\");\r\n if (name.equals(check.toLowerCase())) {\r\n output = item;\r\n }\r\n }\r\n return output;\r\n }", "@Override\n\tpublic void removeItem(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*--------------Remove Items here--------------*\\n\");\n\t\t\t//scanner class allows the admin to enter his/her input\n\t\t\tScanner scanner = new Scanner(System.in);\n\t\t\t//read input item id\n\t\t\tSystem.out.print(\"Enter Item Id to delete the item: \");\n\t\t\tint itemId = scanner.nextInt();\n\n\t\t\t//pass these input items to client controller\n\t\t\tsamp=mvc.removeItem(session,itemId);\n\t\t\tSystem.out.println(samp);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Items Exception: \" +e.getMessage());\n\t\t}\n\t}", "public void popItems() {\n\t\t\n\t\tItemList.add(HPup);\n\t\tItemList.add(SHPup);\n\t\tItemList.add(DMGup);\n\t\tItemList.add(SDMGup);\n\t\tItemList.add(EVup);\n\t\tItemList.add(SEVup);\n\t\t\n\t\trandomDrops.add(HPup);\n\t\trandomDrops.add(SHPup);\n\t\trandomDrops.add(DMGup);\n\t\trandomDrops.add(SDMGup);\n\t\trandomDrops.add(EVup);\n\t\trandomDrops.add(SEVup);\n\t\t\n\t\tcombatDrops.add(SHPup);\n\t\tcombatDrops.add(SDMGup);\n\t\tcombatDrops.add(SEVup);\n\t}", "public boolean dropItem(Items item)\n {\n boolean itemDropped = false;\n if(haveItem(item) && !currentRoom.haveItem(item)){ //if item in inventory not room\n \n Inventory.remove(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld --; //inventory tracker -1\n itemDropped = true;\n \n }\n return itemDropped;\n //if(haveItem(item))\n //Inventory.remove(item);\n //itemsHeld --; //inventory tracker -1\n \n }", "public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }", "public void removeInventoryList(Item item) {\n\t\tinventoryList.remove(item);\n\t}", "public void removeItemFromRoomMap(String string) {\n this.ItemsInRoom.remove(string);\n }", "public void delete(String title){\r\n \t boolean found = false;\t\t\t\t\t\r\n \t Iterator<Item> i = items.iterator();\r\n \t Item current = new Item();\r\n\r\n\t while(i.hasNext()){\r\n\t current = i.next();\r\n\t \r\n\t \t //First we find the item we are looking for.\r\n\t if(title.compareTo(current.getTitle()) == 0) {\r\n\t System.out.print(\"Are you sure you wish to remove \" + current.toString());\r\n\t System.out.println(\"from the library (y/n)?\");\r\n\t\t Scanner sc = new Scanner(System.in);\r\n\t\t String result = sc.next().toUpperCase();\r\n if(result.charAt(0) == 'Y'){\r\n \t//This deletes that specific item.\r\n \t i.remove(); \r\n\t System.out.println(\"Title: \" + title + \" has been removed.\");\r\n }\r\n\t found = true;\r\n\t }\r\n\t }\r\n\t if(found != true)\r\n\t {\r\n\t System.out.println(\"Title \" + title + \" could not be found.\");\r\n\t System.out.println(\"Check the spelling and try again.\");\r\n\t }\r\n\t\r\n }", "public void removeExistingItem(Item item) {\n inventory.remove(item);\n Thread updateUserThread = userController.new UpdateUserThread(LoginActivity.USERLOGIN);\n updateUserThread.start();\n synchronized (updateUserThread) {\n try {\n updateUserThread.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "public void removeItem(Carryable g) {\r\n for (int i=0; i<numItems; i++) {\r\n if (cart[i] == g) {\r\n cart[i] = cart[numItems - 1];\r\n numItems -= 1;\r\n return;\r\n }\r\n }\r\n }", "public void printAndDeleteHighestItem(){\n RankedItem highestItem = new RankedItem();\n\n //find the highest ranked item\n for (RankedItem rankedItem: rankedResults){\n if(rankedItem.getWin() >= highestItem.getWin()){\n highestItem = rankedItem;\n }\n }\n //print the highest ranked item if the item doesn't have all 0 values\n if(highestItem.getWin() != 0 || highestItem.getLoss() != 0 || highestItem.getTie() != 0) {\n resultList.append(highestItem.getItemText() + \"\\t\" +\n highestItem.getWin() + \"\\t\" +\n highestItem.getLoss() + \"\\t\" +\n highestItem.getTie() + \"\\n\");\n }\n //remove the highest ranked item from the list\n rankedResults.remove(highestItem);\n }", "protected void removeItem(Item item, boolean moving) {\n/* 2393 */ if (this.vitems != null)\n/* */ {\n/* 2395 */ if (!this.vitems.isEmpty()) {\n/* */ \n/* 2397 */ if (item.getTemplateId() == 726)\n/* 2398 */ Zones.removeDuelRing(item); \n/* 2399 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* 2400 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2402 */ this.vitems.removePileItem(item.getFloorLevel());\n/* 2403 */ if (this.vitems.isEmpty())\n/* */ {\n/* */ \n/* 2406 */ this.vitems.destroy(this);\n/* 2407 */ this.vitems = null;\n/* */ }\n/* */ \n/* 2410 */ } else if (this.vitems.removeItem(item)) {\n/* */ \n/* */ \n/* 2413 */ this.vitems.destroy(this);\n/* */ \n/* 2415 */ this.vitems = null;\n/* 2416 */ if (pileItem != null)\n/* */ {\n/* 2418 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* */ }\n/* 2421 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(pileItem.getFloorLevel())) {\n/* */ \n/* 2423 */ if (!moving) {\n/* 2424 */ destroyPileItem(pileItem.getFloorLevel());\n/* */ }\n/* 2426 */ } else if (!item.isDecoration() && pileItem != null) {\n/* */ \n/* 2428 */ checkIfRenamePileItem(pileItem);\n/* */ } \n/* 2430 */ if (item.isDomainItem())\n/* 2431 */ Zones.removeAltar(item, moving); \n/* 2432 */ if (item.getTemplateId() == 1175 || item.getTemplateId() == 1239)\n/* 2433 */ Zones.removeHive(item, moving); \n/* 2434 */ if (item.getTemplateId() == 939 || item.isEnchantedTurret())\n/* 2435 */ Zones.removeTurret(item, moving); \n/* 2436 */ if (item.isEpicTargetItem())\n/* 2437 */ EpicTargetItems.removeRitualTargetItem(item); \n/* 2438 */ if (item.isKingdomMarker())\n/* */ {\n/* 2440 */ if (item.getTemplateId() != 328)\n/* 2441 */ Kingdoms.destroyTower(item); \n/* */ }\n/* 2443 */ if (item.getTemplateId() == 521) {\n/* */ \n/* 2445 */ this.zone.creatureSpawn = null;\n/* 2446 */ Zone.spawnPoints--;\n/* */ } \n/* 2448 */ if (this.village != null && item.getTemplateId() == 757)\n/* */ {\n/* 2450 */ this.village.removeBarrel(item);\n/* */ }\n/* */ }\n/* */ else {\n/* */ \n/* 2455 */ Item pileItem = this.vitems.getPileItem(item.getFloorLevel());\n/* */ \n/* 2457 */ if (pileItem != null && item.getWurmId() == pileItem.getWurmId()) {\n/* */ \n/* 2459 */ this.vitems.removePileItem(item.getFloorLevel());\n/* */ }\n/* 2461 */ else if (pileItem != null && this.vitems.checkIfRemovePileItem(item.getFloorLevel())) {\n/* */ \n/* 2463 */ destroyPileItem(item.getFloorLevel());\n/* */ } \n/* */ } \n/* */ }\n/* 2467 */ if (item.isFence()) {\n/* */ \n/* 2469 */ int offz = 0;\n/* */ \n/* */ try {\n/* 2472 */ offz = (int)((item.getPosZ() - Zones.calculateHeight(item.getPosX(), item.getPosY(), item\n/* 2473 */ .isOnSurface())) / 10.0F);\n/* */ }\n/* 2475 */ catch (NoSuchZoneException nsz) {\n/* */ \n/* 2477 */ logger.log(Level.WARNING, \"Dropping fence item outside zones.\");\n/* */ } \n/* 2479 */ float rot = Creature.normalizeAngle(item.getRotation());\n/* 2480 */ if (rot >= 45.0F && rot < 135.0F) {\n/* */ \n/* 2482 */ VolaTile next = Zones.getOrCreateTile(this.tilex + 1, this.tiley, (item\n/* 2483 */ .isOnSurface() || this.isTransition));\n/* 2484 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex + 1, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, next\n/* 2485 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2487 */ else if (rot >= 135.0F && rot < 225.0F) {\n/* */ \n/* 2489 */ VolaTile next = Zones.getOrCreateTile(this.tilex, this.tiley + 1, (item\n/* 2490 */ .isOnSurface() || this.isTransition));\n/* 2491 */ next.removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley + 1, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, next\n/* 2492 */ .getZone().getId(), Math.max(0, next.getLayer())));\n/* */ }\n/* 2494 */ else if (rot >= 225.0F && rot < 315.0F) {\n/* */ \n/* 2496 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_DOWN, \n/* 2497 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ }\n/* */ else {\n/* */ \n/* 2501 */ removeFence((Fence)new TempFence(StructureConstantsEnum.FENCE_SIEGEWALL, this.tilex, this.tiley, offz, item, Tiles.TileBorderDirection.DIR_HORIZ, \n/* 2502 */ getZone().getId(), Math.max(0, getLayer())));\n/* */ } \n/* */ } \n/* */ \n/* 2506 */ sendRemoveItem(item, moving);\n/* 2507 */ if (!moving) {\n/* 2508 */ item.setZoneId(-10, this.surfaced);\n/* */ }\n/* */ }", "public void removeGroceryItem(String item){\n int position = findItem(item);\n if(position > 0)\n myGrocery.remove(position);\n }", "boolean useItem(Command command) {\n HashMap newInventory = inventory.getInventory();\n Iterator iterator = newInventory.entrySet().iterator();\n String seeItem;\n String nameOfItem = \"\";\n String useItem = \"debug\";\n\n while (iterator.hasNext()) {\n HashMap.Entry liste = (HashMap.Entry) iterator.next();\n String itemName = (String) liste.getKey();\n if (itemName.equalsIgnoreCase(command.getSecondWord())) {\n useItem = itemName;\n nameOfItem = itemName;\n break;\n }\n }\n if (!nameOfItem.equals(\"\") && inventory.getUseable(nameOfItem)) {\n\n System.out.println(\"You have dropped: \" + nameOfItem);\n inventory.removeItemInventory(nameOfItem);\n player.setEnergy(player.getEnergy() + 20);\n player.setHealth(player.getHealth() + 5);\n\n return true;\n }\n return false;\n }", "public void deleteItemFromInventory(Item item) {\n\t\tinventory.deleteItem(item);\n\t}", "@Test\r\n\tpublic void testRemoveItem() {\r\n\t\tVendingMachineItem test = new VendingMachineItem(\"test\", 10.0);\r\n\t\tvendMachine.addItem(test, \"B\");\r\n\t\tassertEquals(test, vendMachine.removeItem(\"B\"));\r\n\t}", "public void removeItem(int itemToRemove){\n\t\tinventoryItems[itemToRemove] = null;\n\t}", "private void inspectItem(String item)//Made by Lexi\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n System.out.println(\"The item is: \" + itemFound.getTitle());\n System.out.println(\"Description of the item: \" + itemFound.getDescription());\n System.out.println(\"Item Weight: \" + itemFound.getWeight());\n System.out.println(\"Room item was found in: \" + itemFound.getLocation().getTitle());\n }\n }", "@Override\n\tpublic boolean inventory(Player player, Item item, int opcode) {\n\t\treturn false;\n// Clan channel = ClanRepository.get(player.clan);\n// if (channel == null) {\n// player.send(new SendMessage(\"You need to be in a clan to do this!\"));\n// return true;\n// }\n// player.inventory.remove(item);\n// Item showcaseReward = new Item(Utility.randomElement(ClanUtility.getRewardItems(channel)));\n// channel.showcaseItems.add(showcaseReward.getId());\n// player.send(new SendMessage(\"Inside the box you found \" + showcaseReward.getName() + \"! Showcase size: \" + channel.showcaseItems.size() + \"/28\", SendMessage.MessageColor.DARK_PURPLE));\n// return true;\n\t}", "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "private void removeItemFromList(String nameStr) {\n for (int i = 0; i < ingredientList.size(); i++) {\n if (ingredientList.get(i).getName().toLowerCase().equals(nameStr.toLowerCase())) {\n ingredientList.remove(i);\n return;\n }\n }\n }", "public void addItemInventory(Item item){\r\n playerItem.add(item);\r\n System.out.println(item.getDescription() + \" was taken \");\r\n }", "public void removeProduct(Product item) {\n inventory.remove(item);\n }", "@Override\n public void execute(final Player pPlayer)\n {\n if( ! hasSecondWord())\n {\n GameEngine.aGui.println(\"What Item do tou want to drop ?\");\n }\n else\n {\n String vC = getSecondWord();\n Item vItemInv = pPlayer.getInventaire().get(vC);\n\n if( vItemInv == null)\n {\n GameEngine.aGui.println(\"You don't have this Item in you're possession\");\n }\n else\n {\n pPlayer.removeInventaire(vC);\n pPlayer.getCurrentRoom().getItems().put(vItemInv);\n GameEngine.aGui.println(\"You droped this \" + vItemInv.getName());\n }\n }\n }", "public void removeRoomFromList(String roomname){\n\t\troomlist.remove(roomname);\t\t\t\n\t}", "public void removeFromCart(final Item item) {\n for (Item f : cart) {\n if (f.getName().equals(item.getName())) {\n if (\n f.getQuantity() == item.getQuantity()) {\n cart.remove(f);\n return;\n }\n f.setQuantity(f.getQuantity() - item.getQuantity());\n return;\n }\n }\n }", "protected static String removeRoom(ArrayList<Room> roomList) {\n System.out.println(\"Remove a room:\");\n\n int index = findRoomIndex(roomList, getRoomName());\n\n if (index != 0) {\n roomList.remove(index);\n return \"Room removed successfully\";\n } else {\n return \"Room doesn't exist!\";\n }\n }", "public void die()\r\n { \r\n say(\"SHREEEEK! I, uh, suddenly feel very faint...\");\r\n\r\n if (type == HERO)\r\n {\r\n // say goodbye and die\r\n System.out.println(\"You died.\");\r\n \r\n }\r\n else if (name.toLowerCase().equals(\"grendel\"))\r\n {\r\n System.out.println(\"You defeated overlord Grendel!\");\r\n System.out.println(\"Thanks for playing!\");\r\n System.exit(0);\r\n }\r\n //not end of the game \r\n else\r\n {\r\n //this person will drop his weapon or armor each with 1/3 chance\r\n if (Game.random(3)==0)\r\n {\r\n if (weapon!=null) \r\n items.add(weapon);\r\n }\r\n if (Game.random(3)==0)\r\n {\r\n if (armor!=null) \r\n items.add(armor);\r\n }\r\n \r\n //create string of items this person had\r\n String thingsDropped = Game.makeQuantityList(items);\r\n if (items.size()==0)\r\n System.out.println(name + \" didn't drop anything\");\r\n else \r\n System.out.println(name + \" dropped: \" + thingsDropped);\r\n \r\n //put this person's things into the room\r\n for (int i=items.size()-1; i>=0; i--)\r\n items.get(i).changeOwner(room);\r\n \r\n room.remove(this);\r\n System.out.println();\r\n System.out.println(room.otherPeopleString() + \"\\n\" + room.thingString());\r\n room = null;\r\n }\r\n }", "public Item pickUpItem(String itemName) {\n Item item = currentRoom.removeItem(itemName);\n if(item != null) {\n items.put(item.getName(), item);\n }\n return item;\n }", "public void dropItem(int x, int y, int i) {\n \n ParentItem item = getInventory()[i];\n \n if (item != null) {\n \n inventory.removeItem(i);\n \n item.putOnBoard(x, y, gameboard);\n \n }\n \n }", "public void remove(Thing aThing)\r\n {\r\n boolean found = false;\r\n for (int i = 0; i < items.size() && !found; i++)\r\n {\r\n if (items.get(i) == aThing)\r\n {\r\n items.remove(i);\r\n found = true;\r\n }\r\n }\r\n\r\n if(!found) throw new IllegalArgumentException(\"Item not found: \" + aThing);\r\n }", "public void removeItem(int id);", "private void sendRemoveItem(Item item, boolean moving) {\n/* 2590 */ if (this.watchers != null)\n/* */ {\n/* 2592 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 2596 */ if (!moving || !vz.isVisible(item, this)) {\n/* 2597 */ vz.removeItem(item);\n/* */ }\n/* 2599 */ } catch (Exception e) {\n/* */ \n/* 2601 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }\n/* */ }", "public void unbookRoom(int room) {\n availableRooms.add(availableRooms.size(), room);\n unavailableRooms.remove(unavailableRooms.indexOf(room));\n unavailableRooms = unavailableRooms.stream().sorted().collect(Collectors.toList());\n availableRooms = availableRooms.stream().sorted().collect(Collectors.toList());\n System.out.println(\"Thank you for staying! See you next time.\");\n }", "public void dropItems() {\n\t\tlocation.getChunk().load();\n\t\tArrays.stream(inventory.getContents())\n\t\t\t.filter(ItemStackUtils::isValid)\n\t\t\t.forEach((item) -> location.getWorld().dropItemNaturally(location, item));\n\t\tinventory.clear();\n\t}", "@Override\r\n\tpublic void sellItem(AbstractItemAPI item) {\n\t\titems.remove(item);\r\n\t\t\r\n\t}", "protected abstract void removeItem();", "private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }", "public void unRegAll(){\n \t\t\n \t\tfor(ShopItem shopItem : itemList){\n \t\t\t//TODO: process more then one item at the same time.\n \t\t\t/*\n \t\t\tint position = shopItem.getShopPosition().getSlot();\n \t\t\tif(processedPositions.contains(position))\n \t\t\t\tcontinue;\n \t\t\tprocessedPositions.add(position);\n \t\t\tint amount = getItemAmount(position);\n \t\t\t*/\n \t\t\tint amount = 1;\n \t\t\tgetOwner().getClient().sendPacket(Type.U_SHOP, \"unreg\", 1, shopItem.getShopPosition().getSlot(), amount);\n \t\t\t\n \t\t\t//int[] freePosition = getOwner().getInventory().getFreeSlots(shopItem.getItem(), -1);\n \t\t\t//InventoryPosition inventoryPosition = new InventoryPosition(freePosition[1],freePosition[2],freePosition[0]);\n \t\t\t//InventoryItem inventoryItem = new InventoryItem(shopItem.getItem(),\tinventoryPosition);\n \t\t\t//getOwner().getInventory().addInventoryItem(inventoryItem);\n \t\t\tInventoryItem inventoryItem = getOwner().getInventory().storeItem(shopItem.getItem(), -1);\n \t\t\tgetOwner().getClient().sendPacket(Type.INVEN, inventoryItem, getOwner().getClient().getVersion());\n \t\t}\n \t\titemList.clear();\n \t}", "private void filterItems()\n {\n System.out.println(\"filtered items (name containing 's'):\");\n Set<ClothingItem> items = ctrl.filterItemsByName(\"s\");\n items.stream().forEach(System.out::println);\n }", "private static String displayItemFromBag(String[] inventory, String option){\r\n String itemToDoAction;\r\n int counter = 1;\r\n if(option.equals(\"Equip\")){\r\n for(int i = 0; i < inventory.length; i++){\r\n if(inventory[i].equals(\"Short Sword\") || inventory[i].equals(\"Leather Helmet\") || inventory[i].equals(\"Leather Chest Plate\")\r\n || inventory[i].equals(\"Long Sword\") || inventory[i].equals(\"Great Sword\") || inventory[i].equals(\"Iron Helmet\") \r\n ||inventory[i].equals(\"Iron Chest Plate\") || inventory[i].equals(\"Iron Boots\") || inventory[i].equals(\"Iron Gloves\")){\r\n System.out.println(\"\\t\" + counter + \") \" + inventory[i]);\r\n counter++;\r\n }\r\n }\r\n System.out.println(\"\\t\" + counter + \") Exit\");\r\n itemToDoAction = getUserInput(\"Which item would you like to equip? \\n(Type the name of the item) \");\r\n }else if(option.equals(\"Sell\")){\r\n for(int i = 0; i < inventory.length; i++){\r\n if(inventory[i].equals(\"Short Sword\") || inventory[i].equals(\"Leather Helmet\") || inventory[i].equals(\"Leather Chest Plate\")\r\n || inventory[i].equals(\"Long Sword\") || inventory[i].equals(\"Great Sword\") || inventory[i].equals(\"Iron Helmet\") \r\n ||inventory[i].equals(\"Iron Chest Plate\") || inventory[i].equals(\"Iron Boots\") || inventory[i].equals(\"Iron Gloves\")){\r\n System.out.println(\"\\t\" + counter + \") \" + inventory[i]);\r\n counter++;\r\n }\r\n }\r\n System.out.println(\"\\t\" + counter + \") Exit\");\r\n itemToDoAction = getUserInput(\"Which item would you like to sell? \\n(Type the name of the item) \");\r\n }else if(option.equals(\"Use\")){\r\n System.out.println(\"we here\");\r\n for(int i = 0; i < inventory.length; i++){\r\n if(inventory[i].equals(\"Healing Potion\") || inventory[i].equals(\"Greater Healing Potion\") || inventory[i].equals(\"Scroll of Fireball\")){\r\n System.out.println(\"\\t\" + counter + \") \" + inventory[i]);\r\n counter++;\r\n }\r\n }\r\n System.out.println(\"\\t\" + counter + \") Exit\");\r\n itemToDoAction = getUserInput(\"Which item would you like to use? \\n(Type the name of the item) \");\r\n }else{\r\n itemToDoAction = \"\";\r\n }\r\n return itemToDoAction;\r\n }", "public void pickUp(String itemName, World world) {\n\t\tItem item = world.dbItems().get(itemName);\n\t\tRoom room = super.getRoom();\n\t\tList<Item> roomItems = room.getItems();\n\n\t\tif (roomItems.contains(item)) {\n\t\t\tif (checkCapacity(item)) {\n\t\t\t\tsuper.addItem(item);\n\t\t\t\troom.removeItem(item);\n\t\t\t\tSystem.out.println(\"Picked up \" + item);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Not enough capacity.\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"No item '\" + itemName + \"' in the room.\");\n\t\t}\n\t}", "public String unequipItem(String itemName) {\r\n\t\t\tif(itemName == \"unarmored\") {\r\n\t\t\t\treturn \"You do not have any armor to unequip.\"; // handles unarmored situation\r\n\t\t\t}\r\n\t\t\telse if(itemName.equals(this.getPlayer().getBodyArmor().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBodyArmor().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBodyArmor());\r\n\t\t\t\tthis.getPlayer().setBodyArmor(this.getDefaultBodyArmor());\t\t// set armor to default on unequip\r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getHeadgear().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getHeadgear().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getHeadgear());\r\n\t\t\t\tthis.getPlayer().setHeadgear(this.getDefaultHeadgear());\t\t// set headgear to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getGloves().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getGloves().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getGloves());\r\n\t\t\t\tthis.getPlayer().setGloves(this.getDefaultGloves());\t\t\t// set gloves to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getBoots().getName())) {\r\n\t\t\t\tthis.getPlayer().changeMaxHealth(0-this.getPlayer().getBoots().getArmor());\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getBoots());\r\n\t\t\t\tthis.getPlayer().setBoots(this.getDefaultBoots());\t\t\t\t// set boots to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse if (itemName.equals(this.getPlayer().getWeapon().getName())) {\r\n\t\t\t\tthis.getPlayer().addUnequippedItemToInventory(this.getPlayer().getWeapon());\r\n\t\t\t\tthis.getPlayer().setWeapon(this.getDefaultWeapon());\t\t\t// set weapon to default on unequip \r\n\t\t\t\treturn \"You unequip \" + itemName + \".\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"You cannot unequip an item you are not wearing.\";\r\n\t\t\t}\r\n\t\t}", "public String dropItem(String itemName) {\r\n\t\t\tif(this.getPlayer().getItem(itemName) == null) {\r\n\t\t\t\treturn \"You do not have this item in your inventory.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.handleDecQuestrelatedItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().addItem(this.getPlayer().getItem(itemName));\r\n\t\t\t\tthis.getPlayer().removeItem(itemName);\r\n\t\t\t\treturn \"You drop \" + itemName + \". \\n\"\r\n\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight.\";\r\n\t\t\t}\r\n\t\t}", "private void useItem(Command command) \n { \n if(!command.hasSecondWord()) { \n // if there is no second word, we don't know where to go... \n Logger.Log(\"What are you trying to use?\"); \n return; \n } \n \n String itemUsed = command.getSecondWord();\n String secondUsed = itemUsed + \"2\";\n \n Item thisItem = player.getItem(itemUsed);\n Item secondItem = player.getItem(secondUsed);\n \n Creature thisFriend = player.getCompanion(itemUsed);\n \n //Tries to retrieve which item or creature to use. If not, an error message is returned \n if (thisItem == null&&secondItem == null&&thisFriend == null) {\n Logger.Log(\"You don't have a \" + itemUsed);\n }\n else if (player.inventory.containsKey(itemUsed)) { \n player.removeItem(itemUsed); //The item is removed from inventory\n thisItem.UseItem(this);\n }\n else if (player.inventory.containsKey(secondUsed)) {\n player.removeItem(secondUsed); //The item is removed from inventory\n secondItem.UseItem(this);\n }\n else if (player.friends.containsKey(itemUsed)){ \n thisFriend.UseCompanion(this);\n if (thisFriend.flees){\n player.removeCompanion(itemUsed); //Companions do not get removed from inventory unless the flees boolean has been set to true.\n }\n } \n }", "public void useWheelChair(String secondWord)\n {\n if(secondWord == null){\n System.out.println(\"Take who?\");\n }\n else{\n //if there are items in the rooms\n if(currentRoom.emptyRoom() == false){\n Item chairWheel = null;\n for(Item chairWheelItem : inventory){\n if(chairWheelItem.getId().equals(\"wheelchair\")){\n chairWheel = chairWheelItem;\n }\n }\n if(chairWheel != null){\n maxWeight = 100;\n Item patient = currentRoom.getItemRoom(secondWord);\n if(patient != null){\n patient.changePickUpItem(true);\n if(patient.canBePickedUp() == true){\n if((inventoryWeight + patient.getItemWeight()) <= maxWeight){\n //take current item\n inventory.add(patient);\n inventoryWeight += patient.getItemWeight();\n currentRoom.removeItem(patient.getId());\n System.out.println(\"You are moving the patient: \" + patient.getId() + \".\");\n }\n else{\n System.out.println(\"You canīt get over the max weight.\");\n }\n }\n else{\n System.out.println(\"This patient canīt be moved.\");\n }\n }\n else{\n System.out.println(\"This patient donīt exist.\");\n }\n }\n else{\n System.out.println(\"You havenīt the wheelchair in your inventory.\");\n }\n }\n else{\n System.out.println(\"There are no items to take in this room.\");\n }\n }\n }", "void Search_for_item(String itemname) \n\t{ \n item it=new item();\n \n for(int i=0;i<it.itemfoundWithDescription.size();i++)\n {\n if(it.itemfoundWithDescription.get(i).equals(itemname))\n \t{\n System.out.println(\"item founded\");\n\t\t\texit(0);\n \t}\n \n }\n System.out.println(\"item not founded\");\n \n\t}", "void removeMenuItem(int itemId, String itemName);", "void examineItems(){\n\t\t\tif (!this.items.isEmpty())\n\t\t\t\tfor (int i = 0; i < this.items.size(); i++)\n\t\t\t\t\tSystem.out.print(this.items.get(i).itemName + \", \");\n\t\t}", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public void removeItem(Product p) throws IOException {\n for(Product l: this.cartContents)\n System.out.println(l.getProductName());\n this.cartContents.remove(p);\n this.saveCart();\n }", "public void hapusItem(Item objItem) {\n arrItem.remove(objItem); //buang item\n }", "private static void DelRoom (){\n boolean DelRoomLoop = true;\n //loop for delete room process\n while (DelRoomLoop) {\n //checking if there are rooms to delete\n if (HotelRoom.roomList.isEmpty() || HotelRoom.AllRoomsOccupied() == true) {\n System.out.println(\"Apologies, there are no available rooms!\");\n break;\n } \n else {\n System.out.println(\"Here is a list of rooms:\");\n //call the method for showing a list of all rooms\n HotelRoom.DisplayAllRooms();\n System.out.println(\"-----------------------------\");\n System.out.print(\"Room number: \");\n //try/catch for delete room input\n try {\n //get the user's input\n int delRoomNumber = RecInput.nextInt();\n //loop through the room list to find whether the room number matches one of the rooms\n //and delete the one asked by the user\n boolean roomNumberExist = false;\n for (int i = 0; i < HotelRoom.roomList.size(); i++){\n\n if (delRoomNumber == HotelRoom.roomList.get(i).roomNumber && HotelRoom.roomList.get(i).occupied == false){\n roomNumberExist = true;\n //room is deleted\n HotelRoom.roomList.remove(i);\n System.out.println(\"The room number \" + delRoomNumber + \" is deleted\");\n System.out.println(\"-----------------------------\");\n //breaking loop to exit process\n DelRoomLoop = false;\n } \n\n }\n if(roomNumberExist == false) {\n //handling if user inputs incorrect room number\n System.out.println(\"The room number you entered is invalid\");\n System.out.println(\"-----------------------------\");\n }\n }\n catch (Exception InputMismatchException) {\n //handling if user input is not integer\n System.out.println(\"Please enter a number\");\n System.out.println(\"-----------------------------\");\n\n //Cleaning scanner\n RecInput.next();\n }\n }\n }\n }", "@Override\r\n\tpublic void imprimirItemLista(String item) {\n\t\tSystem.out.println(marcador +\" \"+ item);\r\n\t\t\r\n\t}", "private void deleteItem() {\n // Only perform the delete if this is an existing inventory item\n if (mCurrentInventoryUri != null) {\n // Call the ContentResolver to delete the inventory item at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentInventoryUri\n // content URI already identifies the inventory item that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentInventoryUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_inventory_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n\n // Close the activity\n finish();\n }", "public void buy(Item item) {\n // remove money from wallet\n try { \n wallet.removeMoney(item.getPrice());\n // remove item from room\n currentRoom.removeItem(item);\n // add item to inventory\n addToInventory(item);\n } catch (IllegalArgumentException e) {\n System.err.println(\"You don't have enough money to purchase \" + item.getDescription());\n }\n\n\n }", "public void removeItem(Item item) {\n _items.remove(item);\n }", "private void remove(String name) {\n if (team.getPokemon(name) != null) {\n System.out.println(\"You are going to remove \" + name);\n System.out.println(\"This process is inrevertable, are you sure? [y/n]\");\n String command = input.next();\n if (command.equals(\"y\") || command.equals(\"yes\")) {\n team.remove(name);\n System.out.println(name + \" has been removed form your team\");\n System.out.println(\"You currently have \" + team.count() + \" pokemons in your team\");\n }\n } else {\n System.out.println(name + \" is not found within your team\");\n }\n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "private void sellItem(ShopItem item) {\n if (!world.ifHasItem(item.getName())) {\n System.out.println(\"You don't have Item : \" + item.getName());\n return;\n }\n world.removeItem(item.getName());\n int gold = world.getCharacter().getGold().get();\n world.getCharacter().setGold(gold + item.getPrice());\n System.out.println(\"You have sold Item : \" + item.getName());\n }", "@Override\n\tpublic void execute() {\n\t\t_inventory = _game.getInventory();\n\t\tif (_examineInventory)\n\t\t\t_game.print(_inventory.showInventory());\n\t\telse\n\t\t\t_game.print(_inventory.examineItem(_itemName));\n\t}", "public void removeItem(){\n\t\tthis.item = null;\n\t}", "public final void consume(Player player, Collection<ItemStack> items)\n\t{\n\t\tInventoryHelper.remove(player, items);\n\t}", "boolean removAble(InputItem item);", "public void removeItem() {\r\n\t\tlog.info(\"Remove item\");\r\n\t\tsu.waitElementClickableAndClick(LocatorType.Xpath, CartSplitViewField.Remove.getName());\r\n\t}", "public void checkOut(String title){\r\n Iterator<Item> i = items.iterator();\r\n \t Item current = new Item();\r\n \t \r\n \t while(i.hasNext()){\r\n \t current = i.next();\r\n \t if(title.compareTo(current.getTitle()) == 0) {\r\n\t System.out.print(\"Is this the item you are checking out: \" + current.toString());\r\n\t System.out.println(\"(y/n)?\");\r\n\t\t Scanner sc = new Scanner(System.in);\r\n\t\t String result = sc.next().toUpperCase();\r\n\t\t \r\n if(result.charAt(0) == 'Y'){\r\n \t\r\n if(current.getAvailability() == false){\r\n \t System.out.println(\"This item has is already checked out of the library.\");\r\n \t System.out.println();\r\n \r\n }else if(current.getAvailability() == true){\r\n \t current.setAvailability(false);\r\n\t System.out.println(\"You have checked \" + title + \" out of the library.\");\r\n }\r\n \r\n }\r\n \t }\r\n \t }\r\n\r\n }", "public void removeItem(Item e) {\n\t\tif (items.contains(e))\n\t\t\titems.remove(e);\n\t}", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }" ]
[ "0.7334055", "0.72122395", "0.7135339", "0.7121764", "0.70497304", "0.69823575", "0.69513977", "0.6897426", "0.66826713", "0.6424184", "0.64216125", "0.6420704", "0.64183754", "0.6416889", "0.6416624", "0.6380373", "0.63629365", "0.62989604", "0.62747324", "0.62688845", "0.626187", "0.6248851", "0.6227586", "0.62266845", "0.6196378", "0.6141426", "0.61292404", "0.6086678", "0.6081592", "0.60618746", "0.6054542", "0.60239756", "0.6021653", "0.5998343", "0.5995003", "0.5978326", "0.5974525", "0.5963217", "0.59591526", "0.5946908", "0.59462184", "0.5928799", "0.59221375", "0.5917515", "0.58961016", "0.5871737", "0.58437943", "0.5794358", "0.57920533", "0.5789993", "0.5789584", "0.57823116", "0.57788175", "0.5772405", "0.5768563", "0.5765781", "0.5763175", "0.5760686", "0.57519984", "0.5733744", "0.5729858", "0.572659", "0.57234865", "0.5707795", "0.5702801", "0.5684909", "0.5671876", "0.56655645", "0.5663342", "0.5660527", "0.5654952", "0.56533813", "0.56415385", "0.56362057", "0.56162333", "0.5614074", "0.5602239", "0.55839103", "0.55800086", "0.5576607", "0.55717754", "0.55678684", "0.5560894", "0.555628", "0.5554585", "0.55543745", "0.55524516", "0.5550588", "0.55312943", "0.55285865", "0.55234116", "0.5516465", "0.55159104", "0.54976475", "0.54835695", "0.54826224", "0.54810447", "0.5475324", "0.54580826", "0.545451" ]
0.7017703
5
Returns a room's item ArrayList
public ArrayList<Item> getItems() { return items; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Item> getRoomItems() {\n return (roomItems);\n }", "public ArrayList getRooms();", "public List<Room> getRooms(){\n ArrayList<Room> returnedList = (ArrayList<Room>) rooms;\n return (ArrayList<Room>) returnedList.clone();\n }", "public ArrayList<Room> getRooms() {\n return rooms;\n }", "public ArrayList<RoomList> getRoomList() {\r\n return RoomList;\r\n }", "public List<Item> getItemList();", "public List<Room> getRooms() {\n return rooms;\n }", "@Override\n public Object getItem(int arg0) {\n Log.d(TAG, \"getItem: \"+fromName.get(arg0));\n return rooms.get(arg0);\n }", "public Item[] getRoomContents() {\n Item[] contentsArray = new Item[contents.size()];\n contentsArray = contents.toArray(contentsArray);\n return contentsArray;\n }", "java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();", "private ArrayList<Room> createRooms() {\n //Adding starting position, always rooms(index0)\n\n rooms.add(new Room(\n \"Du sidder på dit kontor. Du kigger på uret og opdager, at du er sent på den. WTF! FISKEDAG! Bare der er fiskefilet tilbage, når du når kantinen. Du må hellere finde en vej ud herfra og hen til kantinen.\",\n false,\n null,\n null\n ));\n\n //Adding offices to <>officerooms, randomly placed later \n officeRooms.add(new Room(\n \"Du bliver kort blændet af en kontorlampe, som peger lige mod døråbningen. Du ser en gammel dame.\",\n false,\n monsterList.getMonster(4),\n itemList.getItem(13)\n ));\n\n officeRooms.add(new Room(\n \"Der er ingen i rummet, men rodet afslører, at det nok er Phillipas kontor.\",\n false,\n null,\n itemList.getItem(15)\n ));\n\n officeRooms.add(new Room(\n \"Du vader ind i et lokale, som er dunkelt oplyst af små, blinkende lamper og har en stank, der siger så meget spar fem, at det kun kan være IT-lokalet. Du når lige at høre ordene \\\"Rick & Morty\\\".\",\n false,\n monsterList.getMonster(6),\n itemList.getItem(7)\n ));\n\n officeRooms.add(new Room(\n \"Det var ikke kantinen det her, men hvorfor er der så krummer på gulvet?\",\n false,\n null,\n itemList.getItem(1)\n ));\n\n officeRooms.add(new Room(\n \"Tine sidder ved sit skrivebord. Du kan se, at hun er ved at skrive en lang indkøbsseddel. Hun skal nok have gæster i aften.\",\n false,\n monsterList.getMonster(0),\n itemList.getItem(18)\n ));\n\n officeRooms.add(new Room(\n \"Du træder ind i det tekøkken, hvor Thomas plejer at opholde sig. Du ved, hvad det betyder!\",\n false,\n null,\n itemList.getItem(0)\n ));\n\n officeRooms.add(new Room(\n \"Du går ind i det nok mest intetsigende rum, som du nogensinde har set. Det er så intetsigende, at der faktisk ikke er mere at sige om det.\",\n false,\n monsterList.getMonster(1),\n itemList.getItem(9)\n ));\n\n //Adding copyrooms to <>copyrooms, randomly placed later \n copyRooms.add(new Room(\n \"Døren knirker, som du åbner den. Et kopirum! Det burde du have set komme. Især fordi det var en glasdør.\",\n false,\n null,\n itemList.getItem(19)\n ));\n\n copyRooms.add(new Room(\n \"Kopimaskinen summer stadig. Den er åbenbart lige blevet færdig. Du går nysgerrigt over og kigger på alle de udskrevne papirer.\",\n false,\n null,\n itemList.getItem(12)\n ));\n\n //Adding restrooms to <>restrooms, randomly placed later \n restRooms.add(new Room(\n \"Ups! Dametoilettet. Der hænger en klam stank i luften. Det må være Ruth, som har været i gang.\",\n false,\n null,\n itemList.getItem(5)\n ));\n\n restRooms.add(new Room(\n \"Pedersen er på vej ud fra toilettet. Han vasker ikke fingre! Slut med at give ham hånden.\",\n false,\n monsterList.getMonster(7),\n itemList.getItem(11)\n ));\n\n restRooms.add(new Room(\n \"Du kommer ind på herretoilettet. Du skal simpelthen tisse så meget, at fiskefileterne må vente lidt. Du åbner toiletdøren.\",\n false,\n monsterList.getMonster(2),\n null\n ));\n\n restRooms.add(new Room(\n \"Lisette står og pudrer næse på dametoilettet. Hvorfor gik du herud?\",\n false,\n monsterList.getMonster(8),\n itemList.getItem(14)\n ));\n\n //Adding meetingrooms to<>meetingrooms, randomly placed later\n meetingRooms.add(new Room(\n \"Du træder ind i et lokale, hvor et vigtigt møde med en potentiel kunde er i gang. Du bliver nødt til at lade som om, at du er en sekretær.\",\n false,\n monsterList.getMonster(9),\n itemList.getItem(6)\n ));\n\n meetingRooms.add(new Room(\n \"Mødelokalet er tomt, men der står kopper og service fra sidste møde. Sikke et rod!\",\n false,\n null,\n itemList.getItem(3)\n ));\n\n meetingRooms.add(new Room(\n \"Projektgruppen sidder i mødelokalet. Vil du forsøge at forsinke dem i at nå fiskefileterne i kantinen?\",\n false,\n monsterList.getMonster(10),\n itemList.getItem(2)\n ));\n\n //Adding specialrooms to<>specialrooms, randomly placed later\n specialRooms.add(new Room(\n \"Du vader ind på chefens kontor. På hans skrivebord sidder sekretæren Phillipa.\",\n false,\n monsterList.getMonster(5),\n itemList.getItem(8)\n ));\n\n specialRooms.add(new Room(\n \"Det her ligner øjensynligt det kosteskab, Harry Potter boede i.\",\n false,\n monsterList.getMonster(3),\n itemList.getItem(4)\n ));\n\n specialRooms.add(new Room(\n \"OMG! Hvad er det syn?! KANTINEN!! Du klarede det! Du skynder dig op i køen lige foran ham den arrogante fra din afdeling. Da du når frem til fadet er der kun 4 fiskefileter tilbage. Du snupper alle 4!\",\n true,\n null,\n null\n ));\n\n //Adding rooms(Inde1-5)\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addMeetingRoom(rooms, meetingRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n\n //Adding rooms(Inde6-10)\n addMeetingRoom(rooms, meetingRooms);\n addCopyRoom(rooms, copyRooms);\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n addCopyRoom(rooms, copyRooms);\n\n //Adding rooms(Inde11-15)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addOfficeRoom();\n addRestRoom(rooms, restRooms);\n addOfficeRoom();\n\n //Adding rooms(Inde16-19)\n addOfficeRoom();\n addSpecialRoom(rooms, specialRooms);\n addSpecialRoom(rooms, specialRooms);\n addMeetingRoom(rooms, meetingRooms);\n\n return rooms;\n }", "Collection<Room> getRooms() throws DataAccessException;", "public Rooms getRooms(int i) {\n\t\t\tRooms buff = RoomDetails.get(i);\r\n\t\t\treturn buff;\r\n\t\t}", "public ArrayList<Item> getItemList(){\n\t\treturn inventoryList;\n\t}", "public ArrayList<roomContents> getContents() {\n return contents;\n }", "@Override\n\tpublic List<Room> getAll() {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "ArrayList<IItem> getItems(Position position);", "public ArrayList<Item> getItems() {\r\n\t\titems.clear();\r\n\t\tCursor cursor = db.query(SkyleConstants.TABLE_ITEMS, allColumns, null, null, null, null, null);\r\n\t\tcursor.moveToFirst();\r\n\t\t\r\n\t\twhile (!cursor.isAfterLast()) {\r\n\t\t\tString ID = cursor.getString(cursor.getColumnIndex(SkyleConstants.KEY_ID));\r\n\t\t\tString type = cursor.getString(cursor.getColumnIndex(SkyleConstants.ITEMS_TYPE));\r\n\t\t\tString date = cursor.getString(cursor.getColumnIndex(SkyleConstants.DATE_NAME));\r\n\t\t\tString path = cursor.getString(cursor.getColumnIndex(SkyleConstants.ITEMS_PATH));\r\n\t\t\t\r\n\t\t\tLog.i(TAG, \"elements: \"+type+\", \"+path);\r\n\t\t\t\r\n\t\t\tItem item = new Item(ID, type, date, path);\t\t\t\r\n\t\t\titems.add(item);\r\n\t\t\tcursor.moveToNext();\r\n\t\t}\r\n\t\tcursor.close();\r\n\t\tLog.i(TAG, \"arraylist: \"+items.toString());\r\n\t\treturn items;\r\n\t}", "@Override\n\tpublic List<RoomInterface> getRooms() {\n\t\treturn rooms;\n\t}", "public ArrayList<Item> getList() {\r\n\t\treturn inventory;\r\n\t}", "protected ArrayList<Long> getRoomMembers() {\n\treturn roomMembers;\n }", "public LinkedList getList() {\n\treturn this.roomList;\n}", "List<InventoryItem> getInventory();", "public ArrayList<Item> getAllItems(){\n\t\treturn itemList; \n\t}", "private List<String> retrieveObjectsInRoom(Room room) {\n List<String> retirevedInRoom = new ArrayList<>();\n for (String object : room.getObjects()) {\n if (wantedObjects.contains(object)) {\n retirevedInRoom.add(object);\n }\n }\n return retirevedInRoom;\n }", "Collection<Item> getInventory();", "public ArrayList<Collectable> getItems(){\n return items;\n }", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "@GET\n @Produces(\"application/json\")\n public static List<CRoom> roomAll() {\n return (List<CRoom>) sCrudRoom.findWithNamedQuery(CRoom.FIND_ROOM_BY_ALL);\n }", "@Override\n public int getItemCount() {\n return restrooms.size();\n }", "public List<Room> findAllRooms();", "public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}", "public ChatRoom[] getChatRooms();", "public ArrayList<GamesItemHome> getVirtualGamesData() {\n\n ArrayList<GamesItemHome> data = new ArrayList<>();\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(\"select * from \" + DATABASE_TABLE_VIRTUAL_GAMES + \" ;\", null);\n StringBuffer stringBuffer = new StringBuffer();\n GamesItemHome gamesItem = null;\n while (cursor.moveToNext()) {\n gamesItem = new GamesItemHome();\n String id = cursor.getString(cursor.getColumnIndexOrThrow(\"_id\"));\n String title = cursor.getString(cursor.getColumnIndexOrThrow(\"title\"));\n String category = cursor.getString(cursor.getColumnIndexOrThrow(\"category\"));\n String image = cursor.getString(cursor.getColumnIndexOrThrow(\"image\"));\n gamesItem.setTitle(title);\n gamesItem.setCategory(category);\n gamesItem.setImage(image);\n gamesItem.setID(id);\n\n stringBuffer.append(gamesItem);\n data.add(gamesItem);\n }\n\n\n return data;\n }", "public List<Stockitem> getItem() {\n\t\treturn (ArrayList<Stockitem>) stockitemDAO.findAllStockitem();\n\t}", "@Override\r\n\tpublic List<Room> listAll() throws SQLException {\n\t\treturn null;\r\n\t}", "@Override\n public List<UserRoom> getUserRoomList() {\n logger.info(\"Start getUserRoomList\");\n List<UserRoom> userRoomList = new ArrayList<>();\n try {\n connection = DBManager.getConnection();\n preparedStatement = connection.prepareStatement(Requests.SELECT_FROM_USER_ROOM);\n rs = preparedStatement.executeQuery();\n while (rs.next()) {\n userRoomList.add(myResultSet(rs));\n }\n } catch (SQLException sqlException) {\n Logger.getLogger(sqlException.getMessage());\n } finally {\n closing(connection, preparedStatement, rs);\n }\n logger.info(\"Completed getUserRoomList\");\n return userRoomList;\n }", "List<Item> getItems(IDAOSession session);", "public List<Room> getCurrentRooms() {\n return currentRooms;\n }", "private static List<Item> getItems() {\n\t\treturn items;\n\t}", "public List<Item> getAllItemsAvailable();", "public ArrayList<Item> getItemList(){\r\n\t\treturn itemList;\r\n\t}", "public List<Item> getItems(){\n\t\treturn data;\n\t}", "public List<PlayerItem> getAll();", "public List<Items> list() {\n\t\treturn itemDao.list();\r\n\t}", "private List<Room> addRooms() {\n List<Room> rooms = new ArrayList<>();\n int numRooms = RandomUtils.uniform(random, MINROOMNUM, MAXROOMNUM);\n int playerRoomNum = RandomUtils.uniform(random, 0, numRooms);\n for (int i = 0; i < numRooms; i++) {\n rooms.add(addRandomRoom(random));\n if (i == playerRoomNum) {\n setPlayerInitialPosition(rooms, playerRoomNum);\n }\n }\n return rooms;\n }", "public List<Room> getByType(int idRoomType) {\n\t\tArrayList<Room> list = new ArrayList<>();\n\t\tConnection cn = ConnectionPool.getInstance().getConnection();\n\t\ttry {\n\t\t\tStatement st = cn.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT * FROM room WHERE id_room_type=\" + idRoomType);\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(new Room(rs.getInt(1), rs.getInt(2)));\n\t\t\t}\n\t\t\treturn list;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionPool.getInstance().closeConnection(cn);\n\t\t}\n\t\treturn new ArrayList<Room>();\n\t}", "@GetMapping(path = \"/rooms\")\n public List<Room> findAllRooms() {\n return new ArrayList<>(roomService.findAllRooms());\n }", "com.rpg.framework.database.Protocol.Item getItems(int index);", "public Object[] getElements(Object arg0) {\n\t\t\t\tRoomFactory roomFactory=(RoomFactory)arg0;\r\n\t\t\t\treturn roomFactory.getRoomList().toArray();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "private List<String> getEmptyRoomsFromResultSet(ResultSet emptyQueryResults) {\n ArrayList<String> rooms = new ArrayList<String>();\n boolean hasNext = emptyQueryResults.next();\n while(hasNext) {\n String room = emptyQueryResults.getString(\"r1.roomid\");\n rooms.add(room);\n hasNext = emptyQueryResults.next();\n }\n return rooms;\n}", "public List<Inventory> getInventory();", "public abstract List<String> getInventory();", "public void populateRooms(){\n }", "public Item[] getItems() {\n/* 3068 */ if (this.vitems != null) {\n/* 3069 */ return this.vitems.getAllItemsAsArray();\n/* */ }\n/* 3071 */ return emptyItems;\n/* */ }", "public List<Room> selectAll() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\treturn session.createCriteria(Room.class).list();\n\n\t}", "java.util.List<java.lang.Integer> getItemList();", "@Override\n public List<Room> findAllRooms() throws AppException {\n log.info(\"RoomDAO#findAllRooms(-)\");\n Connection con = null;\n List<Room> rooms;\n try {\n con = DataSource.getConnection();\n rooms = new ArrayList<>(findAllRooms(con));\n con.commit();\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem at findAllRooms(no param)\", e);\n throw new AppException(\"Can not find all rooms, try again\");\n } finally {\n close(con);\n }\n return rooms;\n }", "@Override\n\tpublic List<Marca> listaporitem() {\n\t\treturn marcadao.listaporitem();\n\t}", "public ArrayList<Item> getItemList() {\n return this.items;\n }", "@Transactional\r\n\tpublic List<Room> getAllRooms(){\r\n\t\tList<Room> list= new ArrayList<Room>();\r\n\t\tIterable<Room> iterable= this.roomRepository.findAll();\r\n\t\tfor(Room room: iterable)\tlist.add(room);\r\n\t\treturn list;\r\n\t}", "public Item[] getItems()\n {\n return items;\n }", "public List<Item> getItems() {\n return items;\n }", "public List<Item> getItems() {\n return items;\n }", "private Room createRooms(){\n Room inicio, pasilloCeldas, celdaVacia1,celdaVacia2, pasilloExterior,vestuarioGuardias, \n comedorReclusos,enfermeria,ventanaAbierta,salidaEnfermeria,patioReclusos,tunelPatio,salidaPatio;\n\n Item mochila,medicamentos,comida,itemInutil,itemPesado;\n mochila = new Item(\"Mochila\",1,50,true,true);\n medicamentos = new Item(\"Medicamentos\",5,10,true,false);\n comida = new Item(\"Comida\",2,5,true,false);\n itemInutil = new Item(\"Inutil\",10,0,false,false);\n itemPesado = new Item(\"Pesas\",50,0,false,false);\n\n // create the rooms\n inicio = new Room(\"Tu celda de la prision\");\n pasilloCeldas = new Room(\"Pasillo donde se encuentan las celdas\");\n celdaVacia1 = new Room(\"Celda vacia enfrente de la tuya\");\n celdaVacia2 = new Room(\"Celda de tu compaņero, esta vacia\");\n pasilloExterior = new Room(\"Pasillo exterior separado de las celdas\");\n vestuarioGuardias = new Room(\"Vestuario de los guardias de la prision\");\n comedorReclusos = new Room(\"Comedor de reclusos\");\n enfermeria = new Room(\"Enfermeria de la prision\");\n ventanaAbierta = new Room(\"Saliente de ventana de la enfermeria\");\n salidaEnfermeria = new Room(\"Salida de la prision por la enfermeria\");\n patioReclusos = new Room(\"Patio exterior de los reclusos\");\n tunelPatio = new Room(\"Tunel escondido para escapar de la prision\");\n salidaPatio = new Room(\"Salida de la prision a traves del tunel del patio\");\n\n // initialise room items\n\n comedorReclusos.addItem(\"Comida\",comida);\n enfermeria.addItem(\"Medicamentos\",medicamentos);\n pasilloCeldas.addItem(\"Inutil\",itemInutil);\n patioReclusos.addItem(\"Pesas\",itemPesado);\n vestuarioGuardias.addItem(\"Mochila\",mochila);\n\n // initialise room exits\n\n inicio.setExits(\"east\", pasilloCeldas);\n pasilloCeldas.setExits(\"north\",pasilloExterior);\n pasilloCeldas.setExits(\"east\",celdaVacia1);\n pasilloCeldas.setExits(\"south\",patioReclusos);\n pasilloCeldas.setExits(\"west\",inicio);\n pasilloCeldas.setExits(\"suroeste\",celdaVacia2);\n celdaVacia1.setExits(\"west\", pasilloCeldas);\n pasilloExterior.setExits(\"north\",comedorReclusos);\n pasilloExterior.setExits(\"west\",enfermeria);\n pasilloExterior.setExits(\"east\",vestuarioGuardias);\n comedorReclusos.setExits(\"south\", pasilloExterior);\n enfermeria.setExits(\"east\",pasilloExterior);\n enfermeria.setExits(\"south\", ventanaAbierta);\n ventanaAbierta.setExits(\"north\",enfermeria);\n ventanaAbierta.setExits(\"south\", salidaEnfermeria);\n patioReclusos.setExits(\"north\", pasilloCeldas);\n patioReclusos.setExits(\"east\", tunelPatio);\n tunelPatio.setExits(\"east\",salidaPatio);\n tunelPatio.setExits(\"west\", patioReclusos);\n // casilla de salida\n\n return inicio;\n }", "public ArrayList<Thing> getThings()\r\n {\r\n \tArrayList<Thing> inventory = new ArrayList<Thing>();\r\n \tfor (int i=0; i<items.size(); i++)\r\n \t\tinventory.add(items.get(i));\r\n \treturn inventory;\r\n }", "public ArrayList<Item> getItems(){\n\t\tArrayList<Item> items = new ArrayList<Item>();\n\t\tcreateFile(itemsFile);\n\t\ttry {\n\t\t\tString[] data;\n\t\t\treader = new BufferedReader(new FileReader(itemsFile));\n\n\t\t\tString strLine;\n\t\t\twhile((strLine = getLine()) != null){\n\t\t\t\tdata = strLine.split(\",\");\n\n\n\t\t\t\tItem item = new Item(Integer.parseInt(data[0]), data[1],data[2],Integer.parseInt(data[3]), data[4], data[5], data[6],data[7]);\n\t\t\t\titems.add(item);\n\n\t\t\t}\n\t\t}catch (IOException e){\n\t\t\t//TODO auto generated catch block\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t\treturn items;\n\t}", "List<SimpleInventory> getInventories();", "public ArrayList<GameItemSingle> getVirtualGameData(){\n\n ArrayList<GameItemSingle> data=new ArrayList<>();\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(\"select * from \"+DATABASE_TABLE_SINGLE_PAGE + \" WHERE _type LIKE \" + \" '%virtual_pet_games%'\"+ \" ;\",null);\n StringBuffer stringBuffer = new StringBuffer();\n GameItemSingle singlePageItem = null;\n while (cursor.moveToNext()) {\n\n singlePageItem= new GameItemSingle();\n String id = cursor.getString(cursor.getColumnIndexOrThrow(\"id\"));\n String title = cursor.getString(cursor.getColumnIndexOrThrow(\"title_rendered\"));\n String content = cursor.getString(cursor.getColumnIndexOrThrow(\"content_rendered\"));\n String date = cursor.getString(cursor.getColumnIndexOrThrow(\"date\"));\n String app_icon = cursor.getString(cursor.getColumnIndexOrThrow(\"app_icon_image\"));\n singlePageItem.setTitle_rendered(title);\n singlePageItem.setContent_rendered(content);\n singlePageItem.set_date(date);\n singlePageItem.setApp_icon(app_icon);\n singlePageItem.set_id(id);\n\n stringBuffer.append(singlePageItem);\n data.add(singlePageItem);\n }\n\n return data;\n }", "public java.util.List<com.rpg.framework.database.Protocol.Item> getItemsList() {\n return items_;\n }", "public Item getItems() {\n return items;\n }", "public ChatRoomTableModel getRoomlist() {\n\t\treturn roomlist;\n\t}", "protected List<View> getItems() {\n return items;\n }", "public ArrayList<String> readItem();", "public Set<Room> getRooms() {\n return rooms;\n }", "public ArrayList<Item> getListItemFromLocationAll()\r\n\t{\r\n\t\tArrayList<Item> tempListItem = new ArrayList<Item>();\r\n\t\tfor(int i = 0; i < this.listLocation.size(); i++) \r\n\t\t{\r\n\t\t\tLocation tempLocation = this.listLocation.get(i);\r\n\t\t\ttempListItem.addAll(tempLocation.getListItem());\r\n\t\t}\r\n\t\treturn tempListItem;\r\n\t}", "Room getRoom();", "Room getRoom();", "public List<ItemDTO> getItems()\n\t{\t\n\t\tList<ItemDTO> itemsList = new ArrayList<>();\n\t\tfor (ItemData item : items) \n\t\t\titemsList.add(new ItemDTO(item.idItem,item.description,item.price,item.VAT,item.quantitySold));\t\n\t\treturn itemsList;\n\t}", "@Override\n public List<Room> findAll() {\n return roomRepository.findAll();\n }", "public List<Room> getAllRooms(){\n\n List<Room> rooms = null;\n\n EntityManager entityManager = getEntityManagerFactory().createEntityManager();\n entityManager.getTransaction().begin();\n\n try{\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Room> roomCriteriaQuery = criteriaBuilder.createQuery(Room.class);\n Root<Room> roomsRoot = roomCriteriaQuery.from(Room.class);\n\n roomCriteriaQuery.select(roomsRoot);\n\n rooms = entityManager.createQuery(roomCriteriaQuery).getResultList();\n }\n catch (Exception ex){\n entityManager.getTransaction().rollback();\n }\n finally {\n entityManager.close();\n }\n\n return rooms;\n }", "@SuppressWarnings (\"rawtypes\") public java.util.List getItems(){\n return this.items;\n }", "public AsyncResult<List<ChatRoom>> discoverRooms() {\r\n return serviceDiscoveryManager.discoverItems(serviceAddress).thenApply(itemNode -> {\r\n List<ChatRoom> chatRooms = new ArrayList<>();\r\n for (Item item : itemNode.getItems()) {\r\n ChatRoom chatRoom = new ChatRoom(item.getJid(), item.getName(), xmppSession, serviceDiscoveryManager, multiUserChatManager);\r\n chatRoom.initialize();\r\n chatRooms.add(chatRoom);\r\n }\r\n return chatRooms;\r\n });\r\n }", "public List<BaseObject> getAllItems() {\n ArrayList<BaseObject> list = new ArrayList<BaseObject>(ufos);\n list.add(ship);\n list.addAll(bombs);\n list.addAll(rockets);\n return list;\n }", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "public List<T> getItems() {\n return SerDes.unmirrorList(getElement().getItems(), getItemClass());\n }", "public ResultSet getItemList() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , CATEG, auc_start, auc_end_date , startbid , currentbid,status \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' \";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }", "@Override\n public int getCount() {\n Log.d(TAG, \"getCount: size\" +fromName.size());\n return rooms.size();\n }", "java.util.List<java.lang.Integer> getItemsList();", "public Object[] getItems()\n {\n return items.toArray();\n }", "@Override\r\n\t\tpublic List<Item> getItems() {\n\t\t\treturn null;\r\n\t\t}", "public ArrayList<Item> getAllItems() throws IllegalArgumentException {\r\n\r\n\t\tArrayList<Item> allItems = this.itemMapper.findAll();\r\n\r\n\t\treturn allItems;\r\n\r\n\t}", "public ArrayList<Book> getListBook();", "public ArrayList<Item> createItemList() {\n return itemLines\n .stream()\n .map(this::writeLineItemNumber)\n .map(this::createItem)\n .collect(Collectors.toCollection(ArrayList::new));\n }", "public static ArrayList<Item> find()\n {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n ArrayList<Item> items=new ArrayList<Item>();\n items=null;\n \n String query = \"select * from item\";\n try\n { \n ps = connection.prepareStatement(query);\n ResultSet rs = null;\n\t rs = ps.executeQuery();\n while(rs.next()){\n Item item = new Item();\n\t\titem.setAttribute(rs.getString(2));\n\t\titem.setItemname(rs.getString(3));\n\t\titem.setDescription(rs.getString(4));\n\t\titem.setPrice(rs.getDouble(5));\n items.add(item);\n }\n return items;\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n return null;\n }\n finally\n {\n DButil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n } \n }", "public ArrayList<GameRoom> execute() {\n\t\tif(GameRooms.rooms == null) {\n\t\t\tGameRooms.rooms = new ArrayList<GameRoom>();\n\t\t}\n\t\treturn GameRooms.rooms;\n\t}", "@Override\n public Object getItem(int position) {\n return buildings.get(position);\n }", "public List<T> getItems() {\n if (items == null) {\n items = this.ejbFacade.findAll();\n }\n return items;\n }", "public List<Item> getAllItems() {\r\n\t\tList<Item> itemList = new ArrayList<Item>();\r\n\t\tif(this.itemMap != null) {\r\n\t\t\tfor(Category2ItemMap map : this.itemMap) {\r\n\t\t\t\titemList.add(map.getItem());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn itemList;\r\n\t}", "public ArrayList<Item> getItems() {\r\n\t\treturn items;\r\n\t}" ]
[ "0.8303385", "0.77727836", "0.72751373", "0.71930516", "0.7122392", "0.70594585", "0.703678", "0.69818425", "0.6964283", "0.6960588", "0.6917166", "0.67895246", "0.6768357", "0.6761752", "0.6758163", "0.6753135", "0.67236733", "0.6712764", "0.6695086", "0.6690632", "0.65991765", "0.6597246", "0.6592741", "0.65521127", "0.6550491", "0.65133", "0.6491459", "0.64642566", "0.64482653", "0.64173603", "0.6411972", "0.6411199", "0.64050233", "0.63935834", "0.6383014", "0.63772315", "0.63755053", "0.6342471", "0.63424176", "0.63245404", "0.6321926", "0.6318497", "0.63179153", "0.63035995", "0.629195", "0.6288762", "0.62761456", "0.62399226", "0.62285715", "0.62249726", "0.6224629", "0.62153196", "0.62152976", "0.6190955", "0.61855614", "0.61692363", "0.6168658", "0.616704", "0.6156064", "0.6140525", "0.613656", "0.6134649", "0.61228853", "0.61228853", "0.612019", "0.6119919", "0.61117643", "0.6095646", "0.60912156", "0.608398", "0.6079988", "0.60671103", "0.60624206", "0.6060315", "0.6058892", "0.6052612", "0.60500365", "0.60500365", "0.60401165", "0.6027347", "0.6021029", "0.6020948", "0.60192174", "0.6011836", "0.60074025", "0.6000646", "0.6000288", "0.59972197", "0.59741443", "0.5973314", "0.5962535", "0.5957865", "0.5953618", "0.5943737", "0.59426147", "0.5942322", "0.59393114", "0.59360474", "0.5936017", "0.592777" ]
0.6337884
39
Define an exit from this room.
public void setExit(String direction, Room neighbor) { exits.put(direction, neighbor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onAgentExit(Event event, Agent agent, Cell cell, Direction dir) {\r\n }", "public Direction getExit(){\n\t\t\treturn exit;\n\t\t}", "public Room getExit(String direction) \n {\n return exits.get(direction);\n }", "public Room getExit(String direction) \n {\n return exits.get(direction);\n }", "public Room getExit(String direction) \n {\n return exits.get(direction);\n }", "public void setExit(Direction d){\n\t\t\tthis.exit = d;\n\t\t}", "public Room getExit(String direction)\n {\n return exits.get(direction);\n }", "public Room getExit(String direction)\n {\n return exits.get(direction);\n }", "public void touchExit() \n {\n if (getOneIntersectingObject(Exit.class) != null)\n Level1.transitionToGameWinWorld(); \n }", "public void setExit(String direction, Room neighbor) {\n exits.put(direction, neighbor);\n }", "public void setExit(String direction, Room neighbor)\n {\n exits.put(direction, neighbor);\n }", "public void setExit(String direction, Room neighbor)\n {\n exits.put(direction, neighbor);\n }", "public Room getExit(int choice) {\n\t\treturn Exits.get(choice);\n\t}", "@Override\r\n\tpublic void exit() {\n\t\t\r\n\t}", "public void exit() {\n\t\tnextPlace = exitName;\n\t\tOrganizer.getOrganizer().deleteSuspended();\n\t\texit(Values.LANDSCAPE);\n\t}", "@Override\n\tpublic void exit() {\n\n\t}", "@Override\n\tpublic void DoExitRestaurant() {\n\t\t\n\t}", "public final EObject ruleExitEvent() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2156:28: ( ( () otherlv_1= 'exit' ) )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2157:1: ( () otherlv_1= 'exit' )\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2157:1: ( () otherlv_1= 'exit' )\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2157:2: () otherlv_1= 'exit'\r\n {\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2157:2: ()\r\n // ../org.yakindu.sct.model.stext/src-gen/org/yakindu/sct/model/stext/parser/antlr/internal/InternalSText.g:2158:5: \r\n {\r\n if ( state.backtracking==0 ) {\r\n\r\n current = forceCreateModelElement(\r\n grammarAccess.getExitEventAccess().getExitEventAction_0(),\r\n current);\r\n \r\n }\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,40,FOLLOW_40_in_ruleExitEvent4829); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getExitEventAccess().getExitKeyword_1());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \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 }", "@Override\n\tpublic void exit() {\n\t\t\n\t}", "@Override\n\tpublic void exit() {\n\t\t\n\t}", "public void addExit(Room exit) {\n\t\tExits.add(exit);\n\t}", "public void onTileExit(Tile tile) {}", "@Override\n\tpublic void exit() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void onExit();", "abstract public void exit();", "private void setExits()\n {\n promenade.setExit(\"up\", ossuary);\n promenade.setExit(\"deep\", depths);\n \n ossuary.setExit(\"down\", promenade);\n ossuary.setExit(\"left\", forest);\n ossuary.setExit(\"straight\", crypt);\n \n forest.setExit(\"right\", ossuary);\n forest.setExit(\"left\", graveyard);\n \n tower.setExit(\"straight\", ramparts);\n tower.setExit(\"down\", forest);\n tower.setExit(\"left\", deathRoom4);\n \n ramparts.setExit(\"down\", bridge);\n ramparts.setExit(\"straight\", castle);\n ramparts.setExit(\"left\", deathRoom4);\n \n prison.setExit(\"up\", promenade);\n prison.setExit(\"down\", sewers);\n prison.setExit(\"straight\", deathRoom2);\n \n \n sewers.setExit(\"down\", depths);\n sewers.setExit(\"left\", deathRoom1);\n \n depths.setExit(\"up\", sewers);\n depths.setExit(\"right\", crypt);\n depths.setExit(\"left\", deathRoom3);\n \n \n crypt.setExit(\"up\", graveyard);\n crypt.setExit(\"straight\", deathRoom3);\n crypt.setExit(\"left\", depths);\n crypt.setExit(\"back\", ossuary);\n \n graveyard.setExit(\"right\", forest);\n graveyard.setExit(\"straight\", bridge);\n graveyard.setExit(\"down\", crypt);\n \n bridge.setExit(\"up\", ramparts);\n bridge.setExit(\"back\", graveyard);\n bridge.setExit(\"down\", deathRoom2);\n \n throneRoomEntrance.setExit(\"straight\", throne);\n \n }", "@Override\r\n\tpublic void exit() {\n\r\n\t}", "public T caseExitEvent(ExitEvent object) {\r\n\t\treturn null;\r\n\t}", "public abstract void exit();", "public void setExit(boolean exit) {\r\n this.exit = exit;\r\n }", "public void exitHospital()\n\t{\n\t\tworld.getHospital().dischargeIndividual();\n\t\tworld.dischargedIndividual();\n\t}", "public void setExit(boolean exit) {\n this.exit = exit;\n }", "public void exit();", "public void setExit(Boolean exit) {\r\n this.exit = exit;\r\n }", "public Exit(int x, int y) {\n\n super('E');\n this.x = x;\n this.y = y;\n }", "@Override\n\tpublic void exit() {\n\t\t//do nothing\n\t}", "private void exitAction() {\n\t}", "void onExit();", "void endEntry();", "@Override\n\tpublic void onExit() {\n\t\t\n\t}", "@Override\n public void exit() {\n super.exit();\n }", "IRBasicBlock getExit();", "@NonNull\n public Builder setExitTransition(@NonNull ExitTransition exitTransition) {\n mImpl.setExitTransition(exitTransition.toProto());\n mFingerprint.recordPropertyUpdate(\n 2, checkNotNull(exitTransition.getFingerprint()).aggregateValueAsInt());\n return this;\n }", "@Override\n\tpublic void exit() {\n\t\tMessenger.unregister(this, Message.KEY_DOWN, Message.Move, Message.Scale, Message.Rotate);\n\t}", "private void exit(int intersection, double time, Vehicle veh, Direction direction) {\n switch (direction) {\n case N:\n exitFromSouth(intersection, time, veh);\n break;\n case E:\n exitFromEast(intersection, time, veh);\n break;\n case W:\n exitFromWest(intersection, time, veh);\n break;\n default:\n System.out.println(\"Error - EventHandler.exit: No such direction!\");\n }\n }", "public Exit()\n {\n super(\"Exit\");\n putValue(Action.NAME, \"Exit\");\n IconSetter iconSetter = new IconSetter(\"/config/images/exiticon.gif\");\n Icon icon = iconSetter.getIcon();\n putValue(Action.SMALL_ICON, icon);\n putValue(Action.ACCELERATOR_KEY,\n KeyStroke.getKeyStroke('Q',\n Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));\n putValue(Action.MNEMONIC_KEY, new Integer(KeyEvent.VK_Q));\n }", "public Location getExitLocation() {\r\n return exitLocation;\r\n }", "@Override\n\t public void onExit() {\n\t\t super.onExit();\n\t }", "@Override\n public void exit() {\n model.exit();\n }", "@Override\r\n\tpublic void exit(long dateTime) {\n\t\t\r\n\t}", "@DISPID(-2147412094)\n @PropPut\n void onrowexit(\n java.lang.Object rhs);", "public Exit getExit() {\n\t\treturn exit;\n\t}", "public Room getExit(String dir) {\n\t\treturn exits.get(dir);\n\t}", "public boolean getExit() {\r\n return exit;\r\n }", "@Override\n\tpublic void exit(String outGate) throws ServiceException, UnknownPlaceException, WrongPlaceException {\n\t\t\n\t}", "@Override\n public void exit(EventObject event)\n {\n shutdown();\n }", "void end(String roomId);", "protected Exit buildExit(final XMLTag piece, final Map<String,Object> defined) throws CMException\r\n\t{\r\n\t\tfinal List<String> ignoreStats=new XArrayList<String>();\r\n\t\tfinal String classID = findStringNow(\"class\",piece,defined);\r\n\t\tfinal Exit E = CMClass.getExit(classID);\r\n\t\tif(E == null)\r\n\t\t\tthrow new CMException(\"Unable to build exit on classID '\"+classID+\"', Data: \"+CMParms.toKeyValueSlashListString(piece.parms())+\":\"+CMStrings.limit(piece.value(),100));\r\n\t\taddDefinition(\"EXIT_CLASS\",classID,defined);\r\n\t\tignoreStats.add(\"CLASS\");\r\n\t\tfillOutCopyCodes(E,ignoreStats,\"EXIT_\",piece,defined);\r\n\t\tfillOutStatCodes(E,ignoreStats,\"EXIT_\",piece,defined);\r\n\t\tignoreStats.addAll(Arrays.asList(E.getStatCodes()));\r\n\t\tfillOutStatCodes(E.basePhyStats(),ignoreStats,\"EXIT_\",piece,defined);\r\n\t\tfinal List<Ability> aV = findAffects(E,piece,defined,null);\r\n\t\tfor(int i=0;i<aV.size();i++)\r\n\t\t{\r\n\t\t\tfinal Ability A=aV.get(i);\r\n\t\t\tA.setSavable(true);\r\n\t\t\tE.addNonUninvokableEffect(A);\r\n\t\t}\r\n\t\tfinal List<Behavior> bV= findBehaviors(E,piece,defined);\r\n\t\tfor(int i=0;i<bV.size();i++)\r\n\t\t{\r\n\t\t\tfinal Behavior B=bV.get(i);\r\n\t\t\tB.setSavable(true);\r\n\t\t\tE.addBehavior(B);\r\n\t\t}\r\n\t\tE.text();\r\n\t\tE.setMiscText(E.text());\r\n\t\tE.recoverPhyStats();\r\n\t\treturn E;\r\n\t}", "public void Exit(){\n\t\t\t\tclose();\n\t\t\t}", "public ExitAction() {\n super(tr(\"Exit\"), \"exit\", tr(\"Exit the application.\"),\n Shortcut.registerShortcut(\"system:menuexit\", tr(\"Exit\"), KeyEvent.VK_Q, Shortcut.GROUP_MENU), true);\n putValue(\"help\", ht(\"/Action/Exit\"));\n }", "public void exit() {\n cancel();\n\n // Scale the outer max opacity and opacity velocity based\n // on the size of the outer radius.\n final int opacityDuration = (int) (1000 / WAVE_OPACITY_DECAY_VELOCITY + 0.5f);\n final float outerSizeInfluence = MathUtils.constrain(\n (mOuterRadius - WAVE_OUTER_SIZE_INFLUENCE_MIN * mDensity)\n / (WAVE_OUTER_SIZE_INFLUENCE_MAX * mDensity), 0, 1);\n final float outerOpacityVelocity = MathUtils.lerp(WAVE_OUTER_OPACITY_EXIT_VELOCITY_MIN,\n WAVE_OUTER_OPACITY_EXIT_VELOCITY_MAX, outerSizeInfluence);\n\n // Determine at what time the inner and outer opacity intersect.\n // inner(t) = mOpacity - t * WAVE_OPACITY_DECAY_VELOCITY / 1000\n // outer(t) = mOuterOpacity + t * WAVE_OUTER_OPACITY_VELOCITY / 1000\n final int inflectionDuration = Math.max(0, (int) (1000 * (1 - mOuterOpacity)\n / (WAVE_OPACITY_DECAY_VELOCITY + outerOpacityVelocity) + 0.5f));\n final int inflectionOpacity = (int) (Color.alpha(mColor) * (mOuterOpacity\n + inflectionDuration * outerOpacityVelocity * outerSizeInfluence / 1000) + 0.5f);\n\n exitSoftware(opacityDuration, inflectionDuration, inflectionOpacity);\n }", "public void exitToMenu()\n {\n exitToMenuFlag = true;\n }", "public void Exit() {\n\t\tif(currentCar == null)\n\t\t\treturn;\n\n\t\tcurrentCar.setRoad(roads.get(nextDir));\n\t\tRoad nextRoad = roads.get(nextDir);\n\t\tif(currentCar != null){\n\t\t\tnextRoad.Enter(currentCar);\n\t\t\tcurrentCar = null;\n\t\t}\n\n\t\t//currentCar.curVelocity = 0;\n\t}", "exitLockedTile(int row, int col){\r\n this.row = row;\r\n this.col = col;\r\n }", "public Grid getExit(){\n\t\treturn getpos((byte)3);\n\t}", "public String getType() {\n\t\treturn \"Exit\";\n\t}", "@NonNull\n public static RegionTriggerBuilder newExitRegionTriggerBuilder() {\n return new RegionTriggerBuilder(Trigger.REGION_EXIT);\n }", "Node exit();", "public ItemActionExit() {\n }", "public abstract boolean isExit();", "@Override\n public boolean isExit() {\n return true;\n }", "public abstract void leaveRoom();", "@Override\r\n\tpublic void leave() {\n\t\t\r\n\t}", "@Test\r\n\tpublic void testRoomExit()\r\n\t{\r\n\t\t// Take one step, essentially just the adj list\r\n\t\tboard.calcTargets(8, 2, 1);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\t// Ensure doesn't exit through the wall\r\n\t\tassertEquals(1, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\t// Take two steps\r\n\t\tboard.calcTargets(8, 2, 2);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(3, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 1)));\r\n\t}", "void btn_Exit_actionPerformed(ActionEvent e) {\n\t\t// TODO : changer le behaviour oneshot ? le remplacer par le notre ?\n m_owner.addBehaviour( new OneShotBehaviour() {\n public void action() {\n ((TinderSupervisorAgent) myAgent).terminateHost();\n }\n } );\n }", "@Test\n\t\t\tpublic void testRoomExit()\n\t\t\t{\n\t\t\t\t// One step from room\n\t\t\t\tboard.calcTargets(13, 14, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 14)));\n\n\t\t\t\t// Take two steps\n\t\t\t\tboard.calcTargets(13, 14, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(11, 14)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 13)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 15)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void addExit(String direction, int position) {\n this.exits.put(direction, position);\n }", "abstract boolean isExit();", "public boolean isExit() {\n return exit;\n }", "public Command getExitCommand() {\n if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit\n // write pre-init user code here\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit\n // write post-init user code here\n }//GEN-BEGIN:|18-getter|2|\n return exitCommand;\n }", "public Command getExitCommand() {\n if (exitCommand == null) {//GEN-END:|18-getter|0|18-preInit\n // write pre-init user code here\n exitCommand = new Command(\"Exit\", Command.EXIT, 0);//GEN-LINE:|18-getter|1|18-postInit\n // write post-init user code here\n }//GEN-BEGIN:|18-getter|2|\n return exitCommand;\n }", "public void exit() {\n\tif (hasPlayed) {\n\t hasPlayed = false;\n\t lastExit = System.currentTimeMillis(); // note the time of exit\n\t}\n }", "public void exitMenu(){\n }", "@Override\n public void exitObject(final ProgramParser.ObjectContext ctx) {\n }", "@Override\n public void exit() {\n player.steeringBehaviorsManager.removeBehavior(ballPursuit);\n }", "public final void requestExit() {\n exitRequested = true;\n }", "public boolean isExit(){\n return true;\n }", "@Override\n public boolean isExit() {\n return false;\n }", "@Override\n public boolean isExit() {\n return false;\n }", "@Override\n public boolean isExit() {\n return false;\n }", "@Override\n public boolean isExit() {\n return false;\n }", "@Override\n public boolean isExit() {\n return false;\n }", "private void exit() {\n\t\tRobot.SUB_DRIVE.setDriveValue(0, 0);\r\n\t}", "public void exitScope() {\n\t\tif (map.size() > 0) {\n\t\t\tmap.remove(map.size() - 1);\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\"There is no other level.\");\n\t\t}\n\t}", "public ExitAction(String name, Questionaire app) {\n\t\tsuper(name, app);\n\t}", "private Node getExitNode(IStatementContainer nd) {\n Node exit = exitNodeCache.get(nd);\n if (exit == null) {\n exit =\n new Node(\"Exit\", new SourceLocation(\"\", nd.getLoc().getEnd(), nd.getLoc().getEnd())) {\n @Override\n public <Q, A> A accept(Visitor<Q, A> v, Q q) {\n return null;\n }\n };\n Label lbl = trapwriter.localID(exit);\n trapwriter.addTuple(\n \"exit_cfg_node\", lbl, nd instanceof Program ? toplevelLabel : trapwriter.localID(nd));\n locationManager.emitNodeLocation(exit, lbl);\n exitNodeCache.put(nd, exit);\n }\n return exit;\n }", "@Test\n\tpublic void testRoomExit()\n\t{\n\t\t// Take one step, essentially just the adj list\n\t\tboard.calcTargets(18, 21, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\t// Ensure doesn't exit through the wall\n\t\tassertEquals(1, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 21)));\n\t\t// Take two steps\n\t\tboard.calcTargets(18, 21, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 20)));\n\t}", "@Override\r\n\tpublic void exitRequest() {\n\t\t\r\n\t}", "private MenuItem getJMenuItemExit() {\r\n if (jMenuItemExit == null) {\r\n jMenuItemExit = new MenuItem();\r\n //jMenuItemExit.setIcon(IconMgr.getExit());\r\n jMenuItemExit.setLabel(\"Exit\");\r\n jMenuItemExit.addActionListener(new java.awt.event.ActionListener() {\r\n\r\n public void actionPerformed(java.awt.event.ActionEvent e) {\r\n //WorkDayPlanner.getInstance().exitProgram();\r\n }\r\n });\r\n }\r\n return jMenuItemExit;\r\n }" ]
[ "0.7060786", "0.7039888", "0.6702058", "0.6702058", "0.6702058", "0.6670439", "0.6611962", "0.6611962", "0.65165126", "0.6495489", "0.6478507", "0.6478507", "0.6459517", "0.6443124", "0.6428666", "0.6402384", "0.6395064", "0.63472205", "0.6346814", "0.6346814", "0.6322985", "0.6272018", "0.62493575", "0.62447834", "0.6244277", "0.6231094", "0.6220512", "0.6215195", "0.6211871", "0.61892027", "0.6166603", "0.61655325", "0.6118312", "0.6114949", "0.611091", "0.61030716", "0.6099557", "0.6098697", "0.6092585", "0.6087188", "0.6057488", "0.6038704", "0.6028647", "0.60255075", "0.6008245", "0.5996534", "0.59870374", "0.5981785", "0.59794784", "0.59669894", "0.5941574", "0.5924119", "0.59164983", "0.59085965", "0.5895841", "0.5862467", "0.5856685", "0.5853447", "0.58532465", "0.58482045", "0.58388966", "0.5834688", "0.58167523", "0.5806345", "0.5802696", "0.5801429", "0.5799532", "0.57824594", "0.57822263", "0.57726824", "0.57496613", "0.57399076", "0.5739206", "0.57227707", "0.57133335", "0.5690698", "0.5684684", "0.56837183", "0.5678669", "0.56768596", "0.56768596", "0.56764364", "0.5675847", "0.5673091", "0.5667038", "0.5661904", "0.5654028", "0.5643337", "0.5643337", "0.5643337", "0.5643337", "0.5643337", "0.56364834", "0.56204724", "0.5618286", "0.5598698", "0.55947614", "0.5588986", "0.55729365" ]
0.6548538
9
Return a description of the room in the form: You are in the kitchen. Exits: north west
public String getLongDescription() { return "You are " + description + ".\n" + getExitString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void look()\n {\n System.out.println(currentRoom.getLongDescription()); \n }", "public String getRoomName() {\n switch (description) {\n case \"You are standing outside Hogwarts School of Witchcraft and\\n\"\n + \"Wizardry, near the Whomping Willow. You are searching\\n\"\n + \"for the hidden Galleons that may perhaps be in the cave that\\n\"\n + \"opens straight below you (outside).\":\n return \"outside\";\n \n case \"Too bad this cave is not on the Marauder's Map. You shout\\n\"\n + \"'Lumos' to ignite your wand, and you see there is a narrow,\\n\"\n + \" dark passage to the east (r1).\":\n return \"r1\";\n \n case \"You are in a gloomy oval shaped room with grey walls.\\n\"\n + \" \\\"Enemies of the heir, beware\\\" is written on the wall.\\n\"\n + \"There is a dim light to the west, and a narrow\\n\"\n + \"dark hole to the east only about 18 inches high (r2).\":\n return \"r2\";\n \n case \"You really need your wand here. \\n\"\n + \"There is a wide passage that quickly narrows\\n\"\n + \"to the west, a bright opening to the east,\\n\"\n + \"and a deep hole that appears to have no bottom\\n\"\n + \"in the middle of the room (r3).\":\n return \"r3\";\n \n case \"There is what looks like a giant snake skin\\n\"\n + \"in the corner. Perhaps from the Basilisk? A passage leads to\\n\"\n + \" the west, another one to the north, and a slippery route\\n\"\n + \"goes down steeply. You can hear the shrieks of mandrakes (r4).\":\n return \"r4\";\n \n case \"There is a dim light from above and the shrieks\\n\"\n + \"are clearly coming from a passageway to the east (r5).\":\n return \"r5\";\n \n case \"The ceiling is full of pixies.\\n\"\n + \"Make sure to cover your head (r6)!\":\n return \"r6\";\n \n case \"This room is very damp. There are puddles on the floor\\n\"\n + \"and a steady dripping from above. Let's hope Moaning\\n\"\n + \"Myrtle didn't flood the girls' lavatory(r7).\":\n return \"r7\";\n \n case \"Ron's rat, Scabbers runs across your foot, and woah! Here \"\n + \"comes Crookshanks chasing behind. A narrow passage runs\\n\"\n + \"to the east and an even narrower one runs to the west (r8).\":\n return \"r8\";\n \n case \"Water drips from the ceiling as you cover your head.\\n \"\n + \"There is no exit from this room with only the option to turn back east.\\n\"\n + \"Will you decide to enter the chamber again? (r9)\":\n return \"r9\";\n \n case \"It appears that someone has been here. The harp is\\n\"\n + \"playing to put Fluffy, the three-headed dog asleep.\\n\"\n + \"Oh wait! It looks like Fluffy is gaurding something.\\n\"\n + \"There's a trap door on the floor, but it is locked.\\n\"\n + \"'Alohomora' won't help you here, you need a key (r10).\":\n return \"r10\";\n \n case \"This room is very dark. You can just barely see (r11).\":\n return \"r11\";\n \n default:\n return \"your hands\";\n } \n }", "public void look() \n {\n System.out.println(currentRoom.getLongDescription());\n }", "public String getRoomDescription() {\n\treturn this.description;\n\t\n}", "public String look() {\r\n currentRoom = player.getCurrentRoom();\r\n String res;\r\n res = currentRoom.getTitle() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getDescription() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getAvailableDirections() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getMonstersToString();\r\n\r\n return res;\r\n }", "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "@Override\n\tpublic String enterRoom() {\n\t\treturn this.getDescription()+displayActions();\n\t}", "public void look()\n {\n System.out.println(currentRoom.getLongDescription());\n }", "public String search() {\r\n currentRoom = player.getCurrentRoom();\r\n String res = \"You start searching the room....\";\r\n if (currentRoom.getChestSize() > 0) {\r\n res += \"You find a treasure chest in the corner...\" + System.lineSeparator();\r\n res += \"You pick up the following items from the chest and put them in your backpack\" + System.lineSeparator();\r\n res += currentRoom.getItemsInChest();\r\n } else {\r\n res = \"You find nothing of intrest in the room...\";\r\n }\r\n return res;\r\n }", "public String getExitString()\n {\n return (\"\\nSaída(s):\\n \" + roomExits.keySet());\n }", "public String getDescription() {\n return roomType.getDescription() + \" with a spray-resistant shower\";\n }", "public String printDetail(){\r\n\t\tString str=\"Room Details: \\n\";\r\n\t\tString str1=\"\";\r\n\t\tString str2=\"\";\r\n\t\tString str3=\"\";\r\n\t\tString str4=\"\";\r\n\t\tstr3=\"\\tSeats: \"+this.getNumSeats()+\"\\n\";\r\n\t\tif(this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tHas Whiteboard\\n \";\r\n\t\tif(!this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tDoesn't have Whiteboard\\n\";\r\n\t\tif(this.hasChalkboard)\r\n\t\t\tstr2=\"\\tHas Chalkboard\\n \";\r\n\t\tif(!this.hasChalkboard)\r\n\t\t\tstr2=\"\\tDoen't have Chalkboard\";\r\n\t\tstr4=\"\\tAV Amenities: \"+this.getAVEquipmentList().toString()+\"\\n\";\r\n\t\tstr=str+str3+str1+str2+str4;\r\n\t\treturn str;\r\n\t}", "public String displayRoom() {\n String roomDisplayString = \"\";\n roomDisplayArray = new String[roomHeight][roomWidth];\n initalizeRoomDisplayArray();\n addDoorsToRoomDisplayArray();\n addContentsToRoomDisplayArray();\n roomDisplayString = convertDisplayArrayToString(roomDisplayString);\n return (roomDisplayString);\n }", "private void printRoomInfo(Room room, List<String> retirevedInRoom, StringBuilder sb) {\n sb.append(room.getId());\n insertSpacing(sb, room.getId().toString());\n sb.append(room.getName());\n insertSpacing(sb, room.getName());\n if (CollectionUtils.isNotEmpty(retirevedInRoom)) {\n for (String obj : retirevedInRoom) {\n sb.append(obj);\n sb.append(\" \");\n }\n } else {\n sb.append(\"None\");\n }\n sb.append(NEWLINE);\n }", "private void printWelcome()//Method was given\n {\n System.out.println();\n System.out.println(\"Welcome to Zork!\");\n System.out.println(\"This Zork is a new adventure game. Find your way through the building and get to the exit by solving riddles and escaping each room. Good luck!\");\n System.out.println(\"Type 'help' to see a list of command words that you can use to play the game.\");\n System.out.println();\n System.out.println(currentRoom.longDescription());\n }", "protected static String getRoomName() {\n System.out.println(\"Room Name?\");\n return keyboard.next();\n }", "public String showRoomType()\r\n {\r\n return typeOfRoom + \"\\nAntall sengeplasser: \" + nrOfBedspaces + \"\\nSenger: \" + typeOfBeds;\r\n }", "public void printLocationInfo()\n {\n System.out.println(currentRoom.getLongDescription());\n System.out.println();\n }", "java.lang.String getRoomName();", "private String printHelp()//refactored\n { String result = \"\";\n result += \"\\n\";\n result += \"You are weak if you have to ask me\\n\";\n result += \"Try not to die, while i´am mocking you.\\n\";\n result += \"\\n\";\n result += \"\" + currentRoom.getDescription() + \"\\n\"; //new\n result += \"\\nExits: \" + currentRoom.getExitDescription() + \"\\n\";//new\n result += \"\\nCommand words:\\n\";\n result += ValidAction.getValidCommandWords();\n result += \"\\n\";\n \n return result;\n }", "public String getRoomStatus() {\n if (isOccupied()) {\r\n return \"Occupied\";\r\n } else {\r\n return \"Unoccupied\";\r\n }\r\n }", "private String formatOccupied(int roomNum) {\n\t\treturn String.format(\"| Occupied:\\t|\\t%s\\t\\t\\t\\t|\", convertBoolean(getHotel().getRoom(roomNum).isBooked()));\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"HotelSearchRoomDetail [id=\" + id + \", search_key=\" + search_key + \", api_provider=\" + api_provider\n\t\t\t\t+ \", hotelsearch_cmd=\" + Arrays.toString(hotelsearch_cmd) + \", roomstay=\" + Arrays.toString(roomstay)\n\t\t\t\t+ \"]\";\n\t}", "private void printExits ()\n {\n System.out.println(\"You are in the \" + currentRoom.getDescription());\n System.out.print(\"Exits: \");\n for(Exit e : currentRoom.getListExits()) {\n System.out.println(e.getDirection());\n } \n }", "public String getDescription() {\n\t\tif (getType() == SpawnType.APPEARS) {\n\t\t\treturn String.format(\"May be found %s\", (mob.hasActFlag(ActFlag.SENTINEL) ? \"in \" : \"around \"));\n\t\t} else if (getType() == SpawnType.PRODUCED_MOB\n\t\t\t\t|| getType() == SpawnType.PRODUCED_ITEM\n\t\t\t\t|| getType() == SpawnType.PRODUCED_ROOM) {\n\t\t\treturn String.format(\"May be summoned %s by\", getProg().getType().getLabel());\n\t\t} else {\n\t\t\treturn \"Unrelated to\";\n\t\t}\n\t}", "public String getLongDescription() \n {\n return \"You are at \" + description + \".\\n\" \n + showItemInfo() + \".\\n\" + getExitString();\n }", "RoomInfo room(String name);", "private String describeLocation() {\n\t\tSWLocation location = this.world.getEntityManager().whereIs(this);\n\t\treturn this.getShortDescription() + \" [\" + this.getHitpoints() + \"] is at \" + location.getShortDescription();\n\t}", "public String look() {\r\n\t\t\tif(this.isLooting() == true) {\r\n\t\t\t\treturn this.getCurrentChest().printContent();\r\n\t\t\t}\r\n\t\t\telse if (this.isTrading()) {\r\n\t\t\t\treturn this.getCurrentTrader().getNpcInventory().printContentWithPrice() + this.getCurrentTrader().printGold();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"You are at \" + this.getPlayer().getCurrentLocation().getDescription() + \"\\n\" +\r\n\t\t\t\t\t\t\"You can move in the following directions: \" + this.getPlayer().getCurrentLocation().getPaths().keySet().toString() + \"\\n\" +\r\n\t\t\t\t\t\tthis.getPlayer().getCurrentLocation().printItems() +\r\n\t\t\t\t\t\tthis.getPlayer().getCurrentLocation().printNpcs();\r\n\t\t\t}\r\n\t\t}", "public void lookAround() {\n\t\t\tdisplay(\"The room is full of gold!\");\n\t\t}", "public int getRoomNumber() {\n switch (description) {\n case \"You are standing outside Hogwarts School of Witchcraft and\\n\"\n + \"Wizardry, near the Whomping Willow. You are searching\\n\"\n + \"for the hidden Galleons that may perhaps be in the cave that\\n\"\n + \"opens straight below you (outside).\":\n return 0;\n \n case \"Too bad this cave is not on the Marauder's Map. You shout\\n\"\n + \"'Lumos' to ignite your wand, and you see there is a narrow,\\n\"\n + \" dark passage to the east (r1).\":\n return 1;\n \n case \"You are in a gloomy oval shaped room with grey walls.\\n\"\n + \" \\\"Enemies of the heir, beware\\\" is written on the wall.\\n\"\n + \"There is a dim light to the west, and a narrow\\n\"\n + \"dark hole to the east only about 18 inches high (r2).\":\n return 2;\n \n case \"You really need your wand here. \\n\"\n + \"There is a wide passage that quickly narrows\\n\"\n + \"to the west, a bright opening to the east,\\n\"\n + \"and a deep hole that appears to have no bottom\\n\"\n + \"in the middle of the room (r3).\":\n return 3;\n \n case \"There is what looks like a giant snake skin\\n\"\n + \"in the corner. Perhaps from the Basilisk? A passage leads to\\n\"\n + \" the west, another one to the north, and a slippery route\\n\"\n + \"goes down steeply. You can hear the shrieks of mandrakes (r4).\":\n return 4;\n \n case \"There is a dim light from above and the shrieks\\n\"\n + \"are clearly coming from a passageway to the east (r5).\":\n return 5;\n \n case \"The ceiling is full of pixies.\\n\"\n + \"Make sure to cover your head (r6)!\":\n return 6;\n \n case \"This room is very damp. There are puddles on the floor\\n\"\n + \"and a steady dripping from above. Let's hope Moaning\\n\"\n + \"Myrtle didn't flood the girls' lavatory(r7).\":\n return 7;\n \n case \"Ron's rat, Scabbers runs across your foot, and woah! Here \"\n + \"comes Crookshanks chasing behind. A narrow passage runs\\n\"\n + \"to the east and an even narrower one runs to the west (r8).\":\n return 8;\n \n case \"Water drips from the ceiling as you cover your head.\\n \"\n + \"There is no exit from this room with only the option to turn back east.\\n\"\n + \"Will you decide to enter the chamber again? (r9)\":\n return 9;\n \n case \"It appears that someone has been here. The harp is\\n\"\n + \"playing to put Fluffy, the three-headed dog asleep.\\n\"\n + \"Oh wait! It looks like Fluffy is gaurding something.\\n\"\n + \"There's a trap door on the floor, but it is locked.\\n\"\n + \"'Alohomora' won't help you here, you need a key (r10).\":\n return 10;\n \n case \"This room is very dark. You can just barely see (r11).\":\n return 11;\n default:\n return -1;\n } \n }", "static String look(Player player) {\n String stuff = player.getLocation().whatStuff();\n if (!stuff.equals(\"\")) {\n if(player.getLocation().contains(\"Charlie McDowell\")){\n return \"-You hear the sound of typing echoing throughout room...\\n\" +\n \"Charlie Bot: Oh my word is that...is that ME? It seems that the mysterious intruder was\\n\" +\n \"simply a robotic copy of myself. On the other hand, I see the transmitter, 525!\\n\" +\n \"However, it appears that it has fallen into the intruder's clutches.\\n\" +\n \"More specifically, it seems to be in his back pocket.\\n\" +\n \"Great. He looks like an ordinary human, but I would brace yourself for battle, 525.\\n\\n\" +\n \"He hasn't noticed you...arm yourself and attempt to take the transmitter from him.\\n\\n\" +\n \"-You see:\\n\" + stuff;\n } else {\n return \"-You see:\\n\" + stuff;\n }\n } else {\n return \"The room is empty.\";\n }\n }", "public String getRoom() {\r\n return room;\r\n }", "private String displayText() {\n // Location is unknown, tell the user as such.\n if (!storage.explored[numX][numY])\n return \" Unknown Location\";\n // Uses the specific cell to generate the name.\n if (numX == 8 && numY == 4)\n return \" Great Hollow Entrance\";\n if ((numY == 3 || numY == 2 || numY == 1) && (numX == 7 || numX == 8 || numX == 9))\n return \" Faron Woods\";\n if (numY == 0 && (numX == 7 || numX == 8))\n return \" Faron Woods\";\n if (numY == 4 && (numX == 7 || numX == 9))\n return \" Faron Woods\";\n if (numY == 5 && (numX == 7 || numX == 9))\n return \" Faron Woods Entrance\";\n if (numY == 5 && numX == 8)\n return \" Carthell Village Outskirts\";\n if ((numY == 7 || numY == 8) && numX == 7)\n return \" Carthell Village Outskirts\";\n if (numY == 6 && numX == 8)\n return \" Aragoth's Fountain\";\n if (numY == 6 && numX == 7)\n return \" Unoccupied House\";\n if (numY == 9 && numX == 11)\n return \" Carthell Library\";\n if (numY == 8 && numX == 10)\n return \" Carthell Marketplace\";\n if (numY == 7 && numX == 11)\n return \" Four Statue Square\";\n if (numY == 6 && (numX == 9 || numX == 10 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 7 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numY == 8 && (numX == 8 || numX == 9 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 9 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numX == 10 && numY == 3)\n return \" Fairy Queen's Fountain\";\n return \"\";\n }", "public static void inspectRoom(Player player) {\n System.out.print(\"You see: \");\n player.getCurrentRoom().inspect();\n }", "public String toString() {\n\t\tif (justnow.equals(\"east\")){\n\t\t\treturn \">\";\n\t\t}\n\t\tif (justnow.equals(\"south\")){\n\t\t\treturn \"v\";\n\t\t}\n\t\tif (justnow.equals(\"west\")){\n\t\t\treturn \"<\";\n\t\t}\n\t\tif (justnow.equals(\"north\")){\n\t\t\treturn \"^\";\n\t\t}\n\t\telse{\n\t\t\treturn \">\";\n\t\t}\n\t}", "public String getDesc() {\n ListIterator<Item> roomContents = contents.listIterator();\n String contentString = \"\";\n while (roomContents.hasNext()) {\n contentString\n = contentString + (roomContents.next()).getDesc() + \" \";\n }\n\n return description + '\\n' + '\\n'\n + \"Room Contents: \" + contentString + '\\n';\n }", "@Override\r\n\tpublic String Land() {\n\t\treturn \"El Helicoptero esta Aterrizando\";\r\n\t}", "public java.lang.CharSequence getRoom() {\n return room;\n }", "@Override\n public String toString() {\n StringBuilder output = new StringBuilder();\n\n output.append(\"Currently \" + _passengersOnboard + \" Passengers Onboard\\r\\n\");\n output.append(\"On Floor : \" + _currentFloor + \"\\r\\n\");\n return output.toString();\n\n }", "static private void TalkTo() {\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(BSChristiansen.getDescription() + \", yet he still gives you good advice:\\n\");\n System.out.println(BSChristiansen.getDialog(0));\n System.out.println(\"\");\n woundedSurvivor();\n } else if (mysteriousCrab.getCurrentRoom() == currentRoom && inventory.getInventory().containsKey(\"Shroom\")) {\n System.out.println(mysteriousCrab.getDescription() + \"\\n\" + mysteriousCrab.getDialog(0));\n } else {\n System.out.println(\"There is nobody to communicate with in this Room\");\n }\n\n }", "private void printWelcome()\n {\n System.out.println();\n System.out.println(\"You are lost in the woods!\");\n System.out.println(\"The sun will go down soon and it is up to you to find your way out!\");\n System.out.println(\"Type '\" + CommandWord.HELP + \"' if you need help.\");\n System.out.println();\n System.out.println(currentRoom.getLongDescription());\n }", "public String describeLocation(Player player)\n {\n StringBuilder narration = new StringBuilder(\"You are in \");\n narration.append(getDescription()).append(\".\\n\");\n narration.append(\"You can see:\\n\");\n // we want all entities present, not including the player that is looking\n for(int i = 0; i < getAllOtherEntities(player).size(); i++){\n narration.append(getAllOtherEntities(player).get(i).getDescription()).append(\"\\n\");\n }\n narration.append(\"You can access from here:\\n\");\n narration.append(pathList());\n return narration.toString();\n }", "public String diagnostic() {\n\t\tString output = \"\";\n\t\tString stateString = \"\";\n\t\tif (this.getState() == Player.HUMAN)\n\t\t\tstateString = \"is selected by the player\";\n\t\telse if (this.getState() == Player.COMPUTER)\n\t\t\tstateString = \"is selected by the computer\";\n\t\telse\n\t\t\tstateString = \"is not selected\";\n\t\t\t\n\t\toutput += \"The point \" + this.toString() + \" \" + stateString +\n\t\t\t\t\t\" and is associated with the rows:\\n\";\n\t\tfor (Row r : containingRows) {\n\t\t\toutput += r + \"\\n\";\n\t\t}\n\t\treturn output;\n\t}", "private String report(){\r\n if(location[0] > plateau[0] || location[0] < 0 || location[1] > plateau[1] || location[1] < 0)\r\n return \"Rover has stopped responding. Last transmission suggests Rover has fallen off the plateau.\\nPlease take better care of the rovers, these things are expensive.\";\r\n else\r\n return location[0] + \" \" + location[1] + \" \" + orientation;\r\n }", "public java.lang.CharSequence getRoom() {\n return room;\n }", "static String enter(Player player, Room room) {\n if (player.moveTo(room)) {\n return \"-Charlie Bot: You have entered \" + player.getLocation();\n } else {\n return \"That way appears to be blocked.\";\n }\n }", "public Room(String description) \n {\n this.description = description;\n exits = new HashMap<>();\n }", "private static void printRoom(Room currentRoom) {\n\t\t\n\t}", "public static void printWelcome(Room currentRoom) {\n System.out.println();\n System.out.println(\"Welcome to the World of Zuul!\");\n System.out.println(\"World of Zuul is a new, incredibly boring adventure game.\");\n System.out.println(\"Type '\" + CommandWord.HELP + \"' if you need help.\");\n System.out.println();\n // Finish off with the long description of the current room.\n System.out.println(currentRoom.getLongDescription());\n displayRoom(currentRoom);\n }", "public String getRoom() {\n\t\treturn room;\n\t}", "public void printRoom() {\n super.printRoom();\n System.out.println(\"Shower: \" + this.hasShower);\n }", "private void printWelcome() {\n System.out.println();\n System.out.println(\"Welcome to the game Stranded!\");\n System.out.println(\"Stranded is an adventure game, where you are to \"\n + \"find out how to escape the island\");\n System.out.println(\"\");\n System.out.println(\"The first step on the journey is to find your lost boardingpass, that has the numeber 126AB, \");\n System.out.println(\"and then board the plane, to get your well deserved long and safe vacation...\");\n System.out.println(\"Good luck\");\n System.out.println(\"Type '\" + CommandWord.HELP + \"' if you need help.\");\n System.out.println();\n System.out.println(currentRoom.getLongDescription());\n }", "private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \n }", "private void printWelcome()\n {\n System.out.println();\n System.out.println(\"Welcome to Hammerfell\");\n System.out.println(\"Hammerfell is an unforgiving, lonely world, brimming with monsters, theieves, and death.\");\n System.out.println(\"For years, Malice has plagued the land. Turning what once was a world gleaming with hope and prosperity into a desolate waste land.\");\n System.out.println(\"You will surely not make it out alive, and your death will most likely end in the brutal whipping and nashing of teeth from your enemies.\");\n System.out.println(\"Good Luck :)\");\n System.out.println(\"Type 'help' if you need help.\");\n System.out.println(\"Name is set to Greggory. If you desire to change it, type name.\");\n System.out.println();\n System.out.println(currentRoom.getLongDescription());\n }", "public String getLongDescription()\n {\n return \"You are \" + description +\".\\n\" + getExitString() + \".\\n\\n\" + getObjectString() + \".\\n\\n\" + getCharacterString() + \".\\n\\n\"\n + (getSecretOutName().equalsIgnoreCase(\"\") ? \"Secret Object: \\\"None\\\"\" : \"Secret Object: \" + getSecretOutName());\n }", "private String goRoom(Command command)//refactored\n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n return \"Go where?\";\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);//new\n \n String result = \"\";\n if (nextRoom == null) {\n result += \"There is no door!\";\n }\n else {\n currentRoom = nextRoom;\n result += currentRoom.getDescription()+\"\\n\";//refactored\n \n result += \"Exits: \" + currentRoom.getExitString()+\"\\n\";//taken from class Room \n \n return result;\n }\n result += \"\\n\";\n\n return result;\n }", "@Override\n public String toString() {\n String toStr = String.format(\"ChiefExecutiveOfHA | %s, leadership %d, medicine %d, experience %d\", isReady() ? \"READY\" : \"DONE\",leadership, medicine, experience);\n return toStr;\n }", "@Override\n public String toString() {\n switch(this) {\n case Lost: return \"Lost\";\n case Won: return \"Won\";\n case NotOverYet: return \"NotOverYet\";\n default: throw new IllegalArgumentException();\n }\n }", "public Room(String description) \n {\n exits = new HashMap<>();\n objects = new HashMap<>();\n this.description = description;\n this.requiredOutfit = null;\n this.locked = false;\n }", "private void printWelcome()//refactored\n {\n System.out.println();\n waitTime(0.5);\n System.out.println(\"Let´s play a game...\");\n waitTime(0.5);\n System.out.println(\"Welcome to the awesome Adventure Game 'Magic Quest'!\");\n waitTime(0.5);\n System.out.println(\"If you want to become a mighty madican - you have to play.\");\n waitTime(0.5);\n System.out.println(\"Type 'help' if you need help.\");\n waitTime(0.5);\n System.out.println();\n waitTime(0.5);\n System.out.println(currentRoom.getDescription() + \"\\n\");//new\n waitTime(0.5);\n System.out.println(currentRoom.getExitDescription() + \"\\n\");//new\n waitTime(0.5);\n System.out.println();\n }", "private void printWelcome()\n {\n System.out.println();\n System.out.println(\"Welcome to the World of Zuul!\");\n System.out.println(\"You are invited to a reception at the Taylor’s mansion.\");\n System.out.println(\"However, during the evening the dead body of Mr Taylor is found in the poolroom.\");\n System.out.println(\"You have to solve this investigation.\");\n System.out.println(\"But be careful the case is not simple as it seems to be.\");\n System.out.println();\n System.out.println(\"You are currently in the \" + currentRoom.getDescription());\n System.out.print(\"Let's start your investigation !\");\n printExits();\n \n }", "public void announce() {\n System.out.println();\n if(firstVisit){\n System.out.println(description != null && !description.isEmpty() ? description : Constants.ROOM_DESCRIPTION_NOT_FOUND);\n }else {\n System.out.println(shortDescription != null && !shortDescription.isEmpty()? shortDescription : Constants.ROOM_SHORT_DESCRIPTION_NOT_FOUND);\n }\n printAvailableItems();\n printConnectedPaths();\n firstVisit = false;\n }", "public void talkToCharacter(Room room)//Made by Lexi\n {\n if (currentRoom.getTitle().equals(\"outside\")) {\n System.out.println(\"All you need to do is unlock the door...\");\n System.out.println(\"Hint: use INSPECT to examine an item in detail.\");\n if (player.inventoryContains(key))\n {\n kitchen.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n \n \n else if (currentRoom.getTitle().equals(\"kitchen\")) {\n System.out.println(\"In order to move on to the next room, you must first find an item which can be found by solving this riddle: \");\n System.out.println(\"A box without hinges, key, or lid, yet golden treasure inside is hid.\");\n System.out.println(\"The answer is an item in this room that will help you escape and move on to the next room.\");\n if (player.inventoryContains(egg))\n {\n poolRoom.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n else if (currentRoom.getTitle().equals(\"pool room\")) {\n System.out.println(\"In order to escape this room you must solve this next riddle: \");\n System.out.println(\"Wash me and I am not clean. Don't wash me and then I'm clean. What I Am?\"); //water\n System.out.println(\"The answer to the riddle is where you'll find the object needed to escape this room... \");\n if (player.inventoryContains(snorkel))\n {\n library.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n else if (currentRoom.getTitle().equals(\"library\")) {\n System.out.println(\"In order to escape this room you must solve this next riddle: \");\n System.out.println(\"The objects, or people, have been removed from their previous localities through the power of a naturally moving phenomenon.\");\n System.out.println(\"Once you have figured out what item belongs to the answer of this riddle you will have escaped the building!\");\n if (player.inventoryContains(blueBook))\n {\n \n exitRoom.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n else {\n System.out.println(\"There is nobody here, so you talk to yourself...\");\n }\n }", "@Test\n\tpublic void testRooms() {\n\t\tMap<Character, String> legend = board.getLegend();\n\t\tassertEquals(LEGEND_SIZE, legend.size());\n\t\t//test first \n\t\tassertEquals(\"Conservatory\", legend.get('C'));\n\t\tassertEquals(\"Library\", legend.get('L'));\n\t\tassertEquals(\"Study\", legend.get('S'));\n\t\tassertEquals(\"Lounge\", legend.get('O'));\n\t\t//test last\n\t\tassertEquals(\"Walkway\", legend.get('W'));\n\t}", "public String toString()\n { String status,requests;\n requests=\"\";\n status= \"\\n+----------Floor \" + floorNum + \"----------\" +\n \"\\n| current occupants: \" + occupants +\n \"\\n+---------------------------\\n\\n\";\n return status;\n }", "public String showItemInfo()\n {\n return \"The room has 1 \" + currentItem.getDescription() \n + \" weighted \" + currentItem.getWeight() + \" pounds\"; \n }", "private String createDescription(WeatherDto weatherDto) {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(\"The weather today looks \");\r\n\t\tif (weatherDto.getTempeture() < 20) {\r\n\t\t\tsb.append(\"cold\");\r\n\t\t} else {\r\n\t\t\tsb.append(\"hot\");\r\n\t\t}\r\n\r\n\t\treturn sb.toString();\r\n\t}", "public String toString()\n\t{\n\t\treturn \"Current Floor: \" + currentFloor +\" Total passangers on board: \" + totalPassengers + \" Direction: \" + currentDirection;\n\t}", "@Override\r\n\tpublic String Land() {\n\t\treturn \"SuperMan I Land\";\r\n\t}", "private void printWelcome()\n {\n System.out.println();\n System.out.println(\"Welcome to the World of Zuul!\");\n System.out.println(\"World of Zuul is a new, incredibly boring adventure game.\");\n System.out.println(\"Type '\" + CommandWord.HELP + \"' if you need help.\");\n System.out.println();\n System.out.println(currentRoom.getLongDescription());\n }", "public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }", "public String toString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif(isFlag()==true){\n\t\t\t\tif(isDownBlock()==true){\n\t\t\t\t\tsb.append(\"g\"); //use G represent the goal\n\t\t\t\t\t\t\t\t\t\t// if down block is a block use small letter\n\t\t\t\t}\n\t\t\t\telse if(isRobot()==true){\n\t\t\t\t\tsb.append(\"V\"); //flag and robot on same position VICTORY!\n\t\t\t\t}\n\t\t\t\telse sb.append(\"G\"); \t\t\n\t\t\t}\n\t\telse if(isRobot()==true){\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"r\");//use R represent the Robot\n\t\t\t\t\t// if down move is a block use small letter\n\t\t\t}\n\t\t\telse sb.append(\"R\");\n\t\t}\n\t\telse{\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"_\"); \n\t\t\t\t//if down move is blocked then use underline\n\t\t\t}\n\t\t\telse sb.append(\"O\"); // use o represent the grid\n\t\t}\n\t\t\t\n\t\tif(isRightBlock()==true){\n\t\t\tsb.append(\"|\"); //best way to represent right block\n\t\t}\n\t\telse{\n\t\t\tsb.append(\" \"); // if no block just a space\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String getInventoryString() {\n String msg = new String(\"Inventory: \\n\");\n for (Map.Entry<String, Item> me : inventory.entrySet()) {\n msg += \" item: \" + me.getKey() + \" description: \" + me.getValue().getDescription() + \"\\n\";\n }\n return msg;\n }", "String describe() {\n switch (this) {\n case NORTH_4M:\n return \"north\";\n case NORTH_16M:\n return \"north_16m\";\n case SOUTH_4M:\n return \"south\";\n case SOUTH_16M:\n return \"south_16m\";\n case WILTSHIRE_4M:\n return \"wiltshire\";\n case WILTSHIRE_16M:\n return \"wiltshire_16m\";\n }\n return \"?\";\n }", "public String getTurnInfo(){\n if(gameState == GAME_STATE.CREATED){\n return \"Game has not been started!\";\n }\n\n String currentPlayerName;\n\n if( currentPlayerTurn == 1 ){\n currentPlayerName = player1Name;\n }else{\n currentPlayerName = player2Name;\n }\n\n StringBuilder reply = new StringBuilder();\n if( gameState == GAME_STATE.WIN ){\n reply.append(\"Game has ended \")\n .append(currentPlayerName)\n .append(\" wins!\");\n }\n else if(gameState == GAME_STATE.DRAW){\n reply.append(\"Game has ended in a draw\");\n }else{\n reply.append(\"<@\")\n .append(currentPlayerName)\n .append(\"> it is your turn to play\");\n }\n return reply.toString();\n }", "public String getRoomTypeDescription() {\n return this.room_type_description;\n }", "private void enterRoom(Room newRoomEntered)\n {\n \n player.setCurrentRoom(newRoomEntered);\n if(player.getCurrentRoom().isDark()){//check to see if room is dark\n System.out.println(\"The room is pitchblack and you are unable to see anything\");\n System.out.println();\n } else {\n System.out.println(player.getCurrentRoom().printLocationInfo());\n System.out.println();\n }\n }", "static void look(Player player) {\n String stuff = player.getLocation().whatStuff();\n if (!stuff.equals(\"\")) {\n System.out.println(\"You see:\\n\" + stuff);\n }\n else {\n System.out.println(\"You see an empty room.\");\n }\n }", "public String getRoomView() {\n\t\t// From room 1 to 4 (include)\n\t\tif (this.getAccommodationNumber() == 101 || this.getAccommodationNumber() == 102\n\t\t\t\t|| this.getAccommodationNumber() == 103 || this.getAccommodationNumber() == 104) {\n\t\t\treturn \"street view\";\n\t\t}\n\t\t// From room 5 to 8 (include)\n\t\telse if (this.getAccommodationNumber() == 105 || this.getAccommodationNumber() == 106\n\t\t\t\t|| this.getAccommodationNumber() == 107 || this.getAccommodationNumber() == 108) {\n\t\t\treturn \"garden view\";\n\t\t} else {\n\t\t\treturn \"sea view\";\n\t\t}\n\t}", "public String toString() {\n //arena info\n String locations = \"The arena is \" + xSize + \" x \" + ySize;\n //pieces info\n for (Pieces d : drones) {\n locations += \"\\n\";\n locations += d.toString();\n }\n\n return locations;\n }", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "public String toString()\n { \n \treturn (\"Door of ID: \" + id + \" connects to Room ID: \" + room.getName() + \", Locked: \" + isLocked +\n \t\t\t\", Unlocking key: \" + keyID);\n }", "public String getContainedDescription() {\n\t\tif (getType() == SpawnType.APPEARS) {\n\t\t\treturn mob.hasActFlag(ActFlag.SENTINEL) ? \"Contains\" : \"May contain\";\n\t\t} else if (getType() == SpawnType.PRODUCED_MOB\n\t\t\t\t|| getType() == SpawnType.PRODUCED_ITEM\n\t\t\t\t|| getType() == SpawnType.PRODUCED_ROOM) {\n\t\t\treturn \"May summon\";\n\t\t} else {\n\t\t\treturn \"Unrelated to\";\n\t\t}\n\t}", "public String info()\n {\n String display = \"The player has $\" + spendingMoney + \" left to spend, and has won \" + prizesWon;\n return display;\n }", "public String toString() {\n\t\treturn \"Road from \" + getLeave() + \" to \" + getArrive() + \" with toll \" + getToll();\n\t}", "public String about() {\n String story = \"\\n\";\n story += \"Admissions Officers appear in the vicinity of Rubik's Cube's prison.\\n\";\n story += \"They serve to prevent entry by any means necessary.\\n\";\n return story;\n }", "public Town getDescription() {\n\t\treturn new Town(\"A visit will teach you everything you ever wanted to know about this world famous beer. \");\r\n\t}", "public String getRoomName() {\n\treturn this.name;\n}" ]
[ "0.7409442", "0.70712507", "0.7051148", "0.70414865", "0.70176214", "0.7008048", "0.6868975", "0.68373036", "0.6752918", "0.6700176", "0.66552716", "0.66203636", "0.65976334", "0.65721697", "0.6441252", "0.6424398", "0.64153403", "0.64084864", "0.6326824", "0.62255883", "0.62233585", "0.6187144", "0.6185277", "0.61778253", "0.6131068", "0.61146796", "0.61068475", "0.61055464", "0.60970163", "0.6077355", "0.6071083", "0.6054657", "0.60519934", "0.6045695", "0.6041739", "0.60309196", "0.6026679", "0.60138583", "0.6000096", "0.5995637", "0.5983385", "0.5981966", "0.5978468", "0.59625906", "0.5956805", "0.5950509", "0.59436375", "0.594188", "0.59390223", "0.5925597", "0.5894031", "0.58890635", "0.58817214", "0.5877582", "0.5875106", "0.5863758", "0.58549756", "0.5835325", "0.5833846", "0.5823344", "0.5823234", "0.58064777", "0.580298", "0.5791184", "0.57717776", "0.5757505", "0.5748598", "0.5748114", "0.5739354", "0.5734681", "0.57227236", "0.57208353", "0.57145005", "0.5714015", "0.5711057", "0.5709067", "0.5701936", "0.5701578", "0.56938887", "0.5679063", "0.56732917", "0.56727743", "0.56727743", "0.56727743", "0.56727743", "0.56727743", "0.56727743", "0.56727743", "0.56727743", "0.56727743", "0.56727743", "0.56727743", "0.56727743", "0.56703025", "0.5667477", "0.5660634", "0.56605935", "0.5660181", "0.56461626", "0.56453776" ]
0.58966786
50
Return a string describing the room's exits, for example "Exits: north west".
private String getExitString() { String returnString = "Exits:"; Set<String> keys = exits.keySet(); for(String exit : keys) { returnString += " " + exit; } return returnString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getExitString()\n {\n return (\"\\nSaída(s):\\n \" + roomExits.keySet());\n }", "public String getExitString() \n {\n String returnString = \"Exits: \";\n Set<String> keys = exits.keySet();\n \n for(String exit : keys) {\n returnString += \" \" + exit;\n }\n \n return returnString;\n }", "private String getExitString()\n {\n StringBuilder returnString = new StringBuilder(\"Exits:\");\n Set<String> keys = exits.keySet();\n for(String exit : keys)\n {\n returnString.append(\" \").append(exit);\n }\n return returnString.toString();\n }", "private String getExitString()\n {\n String returnString = \"Exits:\\n\\t\";\n Set<String> keys = exits.keySet();\n if(exits.size() <= 0) {\n returnString += \"[None]\";\n return returnString;\n }\n for(String exit : keys) {\n returnString += \" [\" + exit + \"]\";\n }\n return returnString;\n }", "private void printExits ()\n {\n System.out.println(\"You are in the \" + currentRoom.getDescription());\n System.out.print(\"Exits: \");\n for(Exit e : currentRoom.getListExits()) {\n System.out.println(e.getDirection());\n } \n }", "public Map<String, Room> getExits() {\n\t\treturn exits;\n\t}", "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "public String getRoomName() {\n switch (description) {\n case \"You are standing outside Hogwarts School of Witchcraft and\\n\"\n + \"Wizardry, near the Whomping Willow. You are searching\\n\"\n + \"for the hidden Galleons that may perhaps be in the cave that\\n\"\n + \"opens straight below you (outside).\":\n return \"outside\";\n \n case \"Too bad this cave is not on the Marauder's Map. You shout\\n\"\n + \"'Lumos' to ignite your wand, and you see there is a narrow,\\n\"\n + \" dark passage to the east (r1).\":\n return \"r1\";\n \n case \"You are in a gloomy oval shaped room with grey walls.\\n\"\n + \" \\\"Enemies of the heir, beware\\\" is written on the wall.\\n\"\n + \"There is a dim light to the west, and a narrow\\n\"\n + \"dark hole to the east only about 18 inches high (r2).\":\n return \"r2\";\n \n case \"You really need your wand here. \\n\"\n + \"There is a wide passage that quickly narrows\\n\"\n + \"to the west, a bright opening to the east,\\n\"\n + \"and a deep hole that appears to have no bottom\\n\"\n + \"in the middle of the room (r3).\":\n return \"r3\";\n \n case \"There is what looks like a giant snake skin\\n\"\n + \"in the corner. Perhaps from the Basilisk? A passage leads to\\n\"\n + \" the west, another one to the north, and a slippery route\\n\"\n + \"goes down steeply. You can hear the shrieks of mandrakes (r4).\":\n return \"r4\";\n \n case \"There is a dim light from above and the shrieks\\n\"\n + \"are clearly coming from a passageway to the east (r5).\":\n return \"r5\";\n \n case \"The ceiling is full of pixies.\\n\"\n + \"Make sure to cover your head (r6)!\":\n return \"r6\";\n \n case \"This room is very damp. There are puddles on the floor\\n\"\n + \"and a steady dripping from above. Let's hope Moaning\\n\"\n + \"Myrtle didn't flood the girls' lavatory(r7).\":\n return \"r7\";\n \n case \"Ron's rat, Scabbers runs across your foot, and woah! Here \"\n + \"comes Crookshanks chasing behind. A narrow passage runs\\n\"\n + \"to the east and an even narrower one runs to the west (r8).\":\n return \"r8\";\n \n case \"Water drips from the ceiling as you cover your head.\\n \"\n + \"There is no exit from this room with only the option to turn back east.\\n\"\n + \"Will you decide to enter the chamber again? (r9)\":\n return \"r9\";\n \n case \"It appears that someone has been here. The harp is\\n\"\n + \"playing to put Fluffy, the three-headed dog asleep.\\n\"\n + \"Oh wait! It looks like Fluffy is gaurding something.\\n\"\n + \"There's a trap door on the floor, but it is locked.\\n\"\n + \"'Alohomora' won't help you here, you need a key (r10).\":\n return \"r10\";\n \n case \"This room is very dark. You can just barely see (r11).\":\n return \"r11\";\n \n default:\n return \"your hands\";\n } \n }", "public String look() {\r\n currentRoom = player.getCurrentRoom();\r\n String res;\r\n res = currentRoom.getTitle() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getDescription() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getAvailableDirections() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getMonstersToString();\r\n\r\n return res;\r\n }", "private void setExits()\n {\n promenade.setExit(\"up\", ossuary);\n promenade.setExit(\"deep\", depths);\n \n ossuary.setExit(\"down\", promenade);\n ossuary.setExit(\"left\", forest);\n ossuary.setExit(\"straight\", crypt);\n \n forest.setExit(\"right\", ossuary);\n forest.setExit(\"left\", graveyard);\n \n tower.setExit(\"straight\", ramparts);\n tower.setExit(\"down\", forest);\n tower.setExit(\"left\", deathRoom4);\n \n ramparts.setExit(\"down\", bridge);\n ramparts.setExit(\"straight\", castle);\n ramparts.setExit(\"left\", deathRoom4);\n \n prison.setExit(\"up\", promenade);\n prison.setExit(\"down\", sewers);\n prison.setExit(\"straight\", deathRoom2);\n \n \n sewers.setExit(\"down\", depths);\n sewers.setExit(\"left\", deathRoom1);\n \n depths.setExit(\"up\", sewers);\n depths.setExit(\"right\", crypt);\n depths.setExit(\"left\", deathRoom3);\n \n \n crypt.setExit(\"up\", graveyard);\n crypt.setExit(\"straight\", deathRoom3);\n crypt.setExit(\"left\", depths);\n crypt.setExit(\"back\", ossuary);\n \n graveyard.setExit(\"right\", forest);\n graveyard.setExit(\"straight\", bridge);\n graveyard.setExit(\"down\", crypt);\n \n bridge.setExit(\"up\", ramparts);\n bridge.setExit(\"back\", graveyard);\n bridge.setExit(\"down\", deathRoom2);\n \n throneRoomEntrance.setExit(\"straight\", throne);\n \n }", "public String displayRoom() {\n String roomDisplayString = \"\";\n roomDisplayArray = new String[roomHeight][roomWidth];\n initalizeRoomDisplayArray();\n addDoorsToRoomDisplayArray();\n addContentsToRoomDisplayArray();\n roomDisplayString = convertDisplayArrayToString(roomDisplayString);\n return (roomDisplayString);\n }", "public String showExit() {\n String exitMessage = \"You're leavin' already?!??! Well, see you again! \"\n + \"BYEEE!!!\";\n return exitMessage;\n }", "@Override\n public String toString() {\n if ((!isOccupied()) && (getLevel()==0)) {\n return \"-- --\";\n }\n else if ((isOccupied()) && (getLevel()==0)) {\n return getColor().abbrev()+\"- --\";\n }\n else if ((!isOccupied()) && (getLevel()>0) && (!isDomed())) {\n return \"-- \"+getLevel()+\"-\";\n }\n else if ((!isOccupied()) && (getLevel()>0) && (isDomed())) {\n return \"-- \"+getLevel()+\"*\";\n }\n else if (isOccupied() && getLevel()>0 && (isDomed())) {\n return getColor().abbrev()+\"- \"+getLevel()+\"*\";\n }\n else if (isOccupied() && getLevel()>0 && (!isDomed())) {\n return getColor().abbrev()+\"- \"+getLevel()+\"-\";\n }\n else return \"err\";\n }", "public String toString() {\n\t\tif (justnow.equals(\"east\")){\n\t\t\treturn \">\";\n\t\t}\n\t\tif (justnow.equals(\"south\")){\n\t\t\treturn \"v\";\n\t\t}\n\t\tif (justnow.equals(\"west\")){\n\t\t\treturn \"<\";\n\t\t}\n\t\tif (justnow.equals(\"north\")){\n\t\t\treturn \"^\";\n\t\t}\n\t\telse{\n\t\t\treturn \">\";\n\t\t}\n\t}", "private String formatOccupied(int roomNum) {\n\t\treturn String.format(\"| Occupied:\\t|\\t%s\\t\\t\\t\\t|\", convertBoolean(getHotel().getRoom(roomNum).isBooked()));\n\t}", "public String printDetail(){\r\n\t\tString str=\"Room Details: \\n\";\r\n\t\tString str1=\"\";\r\n\t\tString str2=\"\";\r\n\t\tString str3=\"\";\r\n\t\tString str4=\"\";\r\n\t\tstr3=\"\\tSeats: \"+this.getNumSeats()+\"\\n\";\r\n\t\tif(this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tHas Whiteboard\\n \";\r\n\t\tif(!this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tDoesn't have Whiteboard\\n\";\r\n\t\tif(this.hasChalkboard)\r\n\t\t\tstr2=\"\\tHas Chalkboard\\n \";\r\n\t\tif(!this.hasChalkboard)\r\n\t\t\tstr2=\"\\tDoen't have Chalkboard\";\r\n\t\tstr4=\"\\tAV Amenities: \"+this.getAVEquipmentList().toString()+\"\\n\";\r\n\t\tstr=str+str3+str1+str2+str4;\r\n\t\treturn str;\r\n\t}", "@Override\n\tpublic String enterRoom() {\n\t\treturn this.getDescription()+displayActions();\n\t}", "private String displayText() {\n // Location is unknown, tell the user as such.\n if (!storage.explored[numX][numY])\n return \" Unknown Location\";\n // Uses the specific cell to generate the name.\n if (numX == 8 && numY == 4)\n return \" Great Hollow Entrance\";\n if ((numY == 3 || numY == 2 || numY == 1) && (numX == 7 || numX == 8 || numX == 9))\n return \" Faron Woods\";\n if (numY == 0 && (numX == 7 || numX == 8))\n return \" Faron Woods\";\n if (numY == 4 && (numX == 7 || numX == 9))\n return \" Faron Woods\";\n if (numY == 5 && (numX == 7 || numX == 9))\n return \" Faron Woods Entrance\";\n if (numY == 5 && numX == 8)\n return \" Carthell Village Outskirts\";\n if ((numY == 7 || numY == 8) && numX == 7)\n return \" Carthell Village Outskirts\";\n if (numY == 6 && numX == 8)\n return \" Aragoth's Fountain\";\n if (numY == 6 && numX == 7)\n return \" Unoccupied House\";\n if (numY == 9 && numX == 11)\n return \" Carthell Library\";\n if (numY == 8 && numX == 10)\n return \" Carthell Marketplace\";\n if (numY == 7 && numX == 11)\n return \" Four Statue Square\";\n if (numY == 6 && (numX == 9 || numX == 10 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 7 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numY == 8 && (numX == 8 || numX == 9 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 9 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numX == 10 && numY == 3)\n return \" Fairy Queen's Fountain\";\n return \"\";\n }", "public String search() {\r\n currentRoom = player.getCurrentRoom();\r\n String res = \"You start searching the room....\";\r\n if (currentRoom.getChestSize() > 0) {\r\n res += \"You find a treasure chest in the corner...\" + System.lineSeparator();\r\n res += \"You pick up the following items from the chest and put them in your backpack\" + System.lineSeparator();\r\n res += currentRoom.getItemsInChest();\r\n } else {\r\n res = \"You find nothing of intrest in the room...\";\r\n }\r\n return res;\r\n }", "@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\tString s = new String(\"\");\r\n\t\tfor (int i = 0; i < maze.length; i++) {\r\n\t\t\ts+= \"\\n\";\r\n\t\t\ts+= \"Floor #\";\r\n\t\t\ts+= (i+1);\r\n\t\t\ts+= \":\";\r\n\t\t\ts+= \"\\n\";\r\n\t\t\tfor (int j = 0; j < maze[0].length; j++) {\r\n\t\t\t\ts+= \"\\n\";\r\n\t\t\t\tfor (int j2 = 0; j2 < maze[0][0].length; j2++) {\r\n\t\t\t\t\ts += this.maze[i][j][j2];\r\n\t\t\t\t\ts += \" \";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ts+= \"\\n\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public String showRoomType()\r\n {\r\n return typeOfRoom + \"\\nAntall sengeplasser: \" + nrOfBedspaces + \"\\nSenger: \" + typeOfBeds;\r\n }", "@Override\n public String toString() {\n StringBuilder output = new StringBuilder();\n for (Tile[] tiles : this.map) {\n StringBuilder line = new StringBuilder();\n for (Tile tile : tiles) {\n if (tile.isVisible()) {\n if (tile.isInhabited()) {\n tile.sortInhabitants();\n line.append(tile.getInhabitants().get(0).getSymbol());\n } else {\n Terrain terrain = tile.getTerrain();\n if (terrain == Terrain.EMPTY) {\n line.append(\" \");\n } else {\n line.append(\"#\");\n }\n }\n } else {\n line.append(\".\");\n }\n if (Main.BETTER_GRAPHICS) line.append(\" \");\n }\n line.append(\" \");\n line.append(\"\\n\");\n output.append(line);\n }\n return output.toString();\n }", "public String seenPokemonMenu() {\n String rv = \"\";\n Iterator<PokemonSpecies> it = this.pokedex.iterator();\n while (it.hasNext()) {\n PokemonSpecies currentSpecies = it.next();\n rv += String.format(\"%s\\n\", currentSpecies.getSpeciesName());\n }\n return rv;\n }", "@Override\r\n public String toString() {\r\n String result = \"\";\r\n for (Map.Entry<Item, Integer> item : inventory.entrySet()) {\r\n if (item.getValue() == 0) {\r\n result += \"SOLD OUT\\n\";\r\n } else {\r\n result += item.getKey();\r\n }\r\n }\r\n return result;\r\n }", "public String toString() {\n //arena info\n String locations = \"The arena is \" + xSize + \" x \" + ySize;\n //pieces info\n for (Pieces d : drones) {\n locations += \"\\n\";\n locations += d.toString();\n }\n\n return locations;\n }", "public String getInventoryString() {\n String msg = new String(\"Inventory: \\n\");\n for (Map.Entry<String, Item> me : inventory.entrySet()) {\n msg += \" item: \" + me.getKey() + \" description: \" + me.getValue().getDescription() + \"\\n\";\n }\n return msg;\n }", "public static String printEndOfGame() {\n return \"Your game of Memory is over. You uncovered all pairs.\" +\n \" Hope you have had a lot of fun and come back soon\";\n }", "@Override\n public void update(Room currentRoom) {\n exitsTextArea.setText(\"\");\n for (Room exit : currentRoom.getExits()) {\n exitsTextArea.append(exit.getName() + \"\\n\");\n }\n }", "public String toString() {\n String mazeVisual = \"\";\n Maze routeMaze = this.getMaze();\n for (int row = 0; row < routeMaze.getTiles().size(); row++) {\n for (int col = 0; col < routeMaze.getTiles().get(0).size(); col++) {\n if (route.contains(routeMaze.getTiles().get(row).get(col))) {\n mazeVisual = (mazeVisual + \"*\");\n } else if (popped.contains(routeMaze.getTiles().get(row).get(col))) {\n mazeVisual = (mazeVisual + \"-\");\n } else {\n mazeVisual = (mazeVisual + routeMaze.getTiles().get(row).get(col).toString());\n }\n if ((col + 1) == routeMaze.getTiles().get(0).size()) {\n mazeVisual = mazeVisual + \"\\n\";\n }\n }\n }\n return mazeVisual;\n }", "public Room getExit(String direction) \n {\n return exits.get(direction);\n }", "public Room getExit(String direction) \n {\n return exits.get(direction);\n }", "public Room getExit(String direction) \n {\n return exits.get(direction);\n }", "public Room(String description) \n {\n this.description = description;\n exits = new HashMap<>();\n }", "public String toString() {\n\t\t// Variables\n\t\tString gameboard;\n\t\tchar[] firstLetter = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O' };\n\n\t\t// Top\n\t\tgameboard = \" ===============================================================\\n\";\n\n\t\t// Middle\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\t// Beginning of the line\n\t\t\tgameboard += \" \" + firstLetter[i] + \" ||\";\n\n\t\t\t// Letters\n\t\t\tfor (int j = 0; j < 15; j++) {\n\t\t\t\tif (this.grid[i][j].getTile().getLetter() == Character.MIN_VALUE) {\n\t\t\t\t\tif (this.grid[i][j].getScoreMult() > 1)\n\t\t\t\t\t\tgameboard += \" * \";\n\t\t\t\t\telse\n\t\t\t\t\t\tgameboard += \" . \";\n\t\t\t\t} else {\n\t\t\t\t\tgameboard += \" \" + this.grid[i][j].getTile().getLetter() + \" \";\n\t\t\t\t}\n\t\t\t\tif (j != 14)\n\t\t\t\t\tgameboard += '|';\n\t\t\t}\n\n\t\t\t// End of the line\n\t\t\tgameboard += \"||\\n\";\n\t\t\tif (i != 14)\n\t\t\t\tgameboard += \" ||---|---|---|---|---|---|---|---|---|---|---|---|---|---|---||\\n\";\n\t\t}\n\n\t\t// Bottom\n\t\tgameboard += \" ===============================================================\\n\";\n\t\tgameboard += \" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15\";\n\n\t\treturn gameboard;\n\t}", "public String toString() {\n\t\treturn \"Road from \" + getLeave() + \" to \" + getArrive() + \" with toll \" + getToll();\n\t}", "private void look()\n {\n System.out.println(currentRoom.getLongDescription()); \n }", "@Override\n public String toString() {\n\treturn Slot.DAYS[day] + start.toString() + \"-\" + end.toString() + \":\" + venue;\n }", "public String getRoomStatus() {\n if (isOccupied()) {\r\n return \"Occupied\";\r\n } else {\r\n return \"Unoccupied\";\r\n }\r\n }", "private String report(){\r\n if(location[0] > plateau[0] || location[0] < 0 || location[1] > plateau[1] || location[1] < 0)\r\n return \"Rover has stopped responding. Last transmission suggests Rover has fallen off the plateau.\\nPlease take better care of the rovers, these things are expensive.\";\r\n else\r\n return location[0] + \" \" + location[1] + \" \" + orientation;\r\n }", "public String getDisplay() {\n\t\tString output;\n\t\tStringBuilder tempout = new StringBuilder();\n\t\tfor(Entry<String, ParkingSpace> entry:hashmap.entrySet()) {\n\t\t\tString key = entry.getKey();\n\t\t\tVehicle temp = entry.getValue().getVehicle();\n\t\t\ttempout.append(\"Plate# \" + key + \" \" + temp.toString() + \"\\n\");\n\t\t}\n\t\toutput = tempout.toString();\n\t\treturn output;\n\t}", "public Room getExit(String direction)\n {\n return exits.get(direction);\n }", "public Room getExit(String direction)\n {\n return exits.get(direction);\n }", "public String toString() {\n String type = \"TYPE: Edge Piece\\n\";\n String[] strColors = colorsAsString(colors);\n String color = \"Color: [\" + strColors[0] + \",\" + strColors[1] + \"]\\n\";;\n String slot;\n switch (loc) {\n case 1 :\n slot = \"Front top\";\n break;\n case 2 :\n slot = \"Front bottom\";\n break;\n case 3 :\n slot = \"Front right\";\n break;\n case 4 :\n slot = \"Front left\";\n break;\n case 5 :\n slot = \"Back top\";\n break;\n case 6 :\n slot = \"Back bottom\";\n break;\n case 7 :\n slot = \"Back left on green side\";\n break;\n case 8 :\n slot = \"Back right on green side\";\n break;\n case 9 :\n slot = \"Top right\";\n break;\n case 10 :\n slot = \"Top left\";\n break;\n case 11 :\n slot = \"Bottom right\";\n break;\n default :\n slot = \"Bottom left\";\n }\n String location = \"Location: \" + slot + \"\\n\";\n String oriented = \"Yes\";\n if (orient == -1) {\n oriented = \"No\";\n }\n String orientation = \"Oriented? \" + oriented + \"\\n\";\n String solved = \"Solved? \" + solved() + \"\\n \";\n return type + color + location + orientation + solved;\n }", "public String toString( )\n{ \n String s=\"\\nThe Mines\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n s = s + theMines[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n }\n s += \"\\nMined neighbor counts\\n \";\n for ( int r = 0; r < rows; r++ )\n {\n for ( int c = 0; c < cols ; c++ )\n if( theCounts[ r ][ c ] == 9 )\n s = s + \"X\" + \" \";\n else\n s = s + theCounts[ r ][ c ] + \" \";\n s = s + \" \\n \" ;\n } \n return( s );\n}", "public String toString()\n\t{\n\t\treturn \"Current Floor: \" + currentFloor +\" Total passangers on board: \" + totalPassengers + \" Direction: \" + currentDirection;\n\t}", "protected static String getRoomName() {\n System.out.println(\"Room Name?\");\n return keyboard.next();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"HotelSearchRoomDetail [id=\" + id + \", search_key=\" + search_key + \", api_provider=\" + api_provider\n\t\t\t\t+ \", hotelsearch_cmd=\" + Arrays.toString(hotelsearch_cmd) + \", roomstay=\" + Arrays.toString(roomstay)\n\t\t\t\t+ \"]\";\n\t}", "public int getRoomNumber() {\n switch (description) {\n case \"You are standing outside Hogwarts School of Witchcraft and\\n\"\n + \"Wizardry, near the Whomping Willow. You are searching\\n\"\n + \"for the hidden Galleons that may perhaps be in the cave that\\n\"\n + \"opens straight below you (outside).\":\n return 0;\n \n case \"Too bad this cave is not on the Marauder's Map. You shout\\n\"\n + \"'Lumos' to ignite your wand, and you see there is a narrow,\\n\"\n + \" dark passage to the east (r1).\":\n return 1;\n \n case \"You are in a gloomy oval shaped room with grey walls.\\n\"\n + \" \\\"Enemies of the heir, beware\\\" is written on the wall.\\n\"\n + \"There is a dim light to the west, and a narrow\\n\"\n + \"dark hole to the east only about 18 inches high (r2).\":\n return 2;\n \n case \"You really need your wand here. \\n\"\n + \"There is a wide passage that quickly narrows\\n\"\n + \"to the west, a bright opening to the east,\\n\"\n + \"and a deep hole that appears to have no bottom\\n\"\n + \"in the middle of the room (r3).\":\n return 3;\n \n case \"There is what looks like a giant snake skin\\n\"\n + \"in the corner. Perhaps from the Basilisk? A passage leads to\\n\"\n + \" the west, another one to the north, and a slippery route\\n\"\n + \"goes down steeply. You can hear the shrieks of mandrakes (r4).\":\n return 4;\n \n case \"There is a dim light from above and the shrieks\\n\"\n + \"are clearly coming from a passageway to the east (r5).\":\n return 5;\n \n case \"The ceiling is full of pixies.\\n\"\n + \"Make sure to cover your head (r6)!\":\n return 6;\n \n case \"This room is very damp. There are puddles on the floor\\n\"\n + \"and a steady dripping from above. Let's hope Moaning\\n\"\n + \"Myrtle didn't flood the girls' lavatory(r7).\":\n return 7;\n \n case \"Ron's rat, Scabbers runs across your foot, and woah! Here \"\n + \"comes Crookshanks chasing behind. A narrow passage runs\\n\"\n + \"to the east and an even narrower one runs to the west (r8).\":\n return 8;\n \n case \"Water drips from the ceiling as you cover your head.\\n \"\n + \"There is no exit from this room with only the option to turn back east.\\n\"\n + \"Will you decide to enter the chamber again? (r9)\":\n return 9;\n \n case \"It appears that someone has been here. The harp is\\n\"\n + \"playing to put Fluffy, the three-headed dog asleep.\\n\"\n + \"Oh wait! It looks like Fluffy is gaurding something.\\n\"\n + \"There's a trap door on the floor, but it is locked.\\n\"\n + \"'Alohomora' won't help you here, you need a key (r10).\":\n return 10;\n \n case \"This room is very dark. You can just barely see (r11).\":\n return 11;\n default:\n return -1;\n } \n }", "public String toString() {\n/* 96 */ return \"Outline (Zigzag)\";\n/* */ }", "public String printGrid() {\n String s = \"KEY: \\n- (sea) = no boat not shot\"\n + \"\\nM (miss) = no boat SHOT \"\n +\" \\nB (boat) = boat not shot\"\n + \"\\nH (hit) = boat SHOT\"\n + \"\\n***********************************************************\\n\";\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n s += decideLetter(grid[i][j]) + \"\\t\";\n }\n s += \"\\n\";\n }\n return s;\n }", "public String toString()\n { String status,requests;\n requests=\"\";\n status= \"\\n+----------Floor \" + floorNum + \"----------\" +\n \"\\n| current occupants: \" + occupants +\n \"\\n+---------------------------\\n\\n\";\n return status;\n }", "@Override\n public String toString() {\n\n \n String str = \"\";\n for(int rowIndex = 0; rowIndex < this.board.length; rowIndex++) {\n \n for(int columnIndex = 0; columnIndex < this.board[rowIndex].length; columnIndex++) {\n\n switch (this.board[rowIndex][columnIndex]) {\n case IBoardState.symbolOfInactiveCell:\n str += \"*|\";\n break;\n case IBoardState.symbolOfEmptyCell:\n str += \"0|\";\n break;\n case IBoardState.symbolOfFirstPlayer:\n str += \"1|\";\n break;\n case IBoardState.symbolOfSecondPlayer:\n str += \"2|\";\n break;\n }\n\n }\n str +=\"\\n\";\n }\n return str;\n }", "public String getAnalysisString() {\n //TODO - change this when we get some measure of monster # and deadly score\n int totalMonsters = 0;\n //If this room should have monsters in it...\n if (roomShouldHaveMonsters()) {\n //If there are none yet, generate them!\n if (numMonstersByType == null) {\n genRandomMonsters();\n } else {\n //if they've already been generated, add them up!\n for (Integer num : numMonstersByType.values()) {\n totalMonsters += num;\n }\n }\n }\n\n int miniBoss = contents.contains(roomContents.MINI_BOSS) ? 1 : 0;\n\n return coords[0] + \",\" + coords[1] + \",\" + totalMonsters + \",\" + miniBoss;\n }", "public String toString(){\n\t\t\tString x = (roomnumber + \" \" + nop + \" \" + equipment + \" \" + price + \" \" + priceoffer + \" \" + rating);\n\t\t\treturn x;\n\t\t}", "@Override\n public String toString() {\n switch(this) {\n case Lost: return \"Lost\";\n case Won: return \"Won\";\n case NotOverYet: return \"NotOverYet\";\n default: throw new IllegalArgumentException();\n }\n }", "public void displayseat() {\n\t\tString occ;\n\t\tif (this.isOccupied()) {\n\t\t\tocc = ANSI_RED+\"XX\"+ANSI_RESET+\"..\"+ANSI_RED+\"XX\"+ANSI_RESET;\n\t\t}\n\t\telse if (this.isReserved()){\n\t\t\tocc = ANSI_GREEN+\"ME\"+ANSI_RESET+\"..\"+ANSI_GREEN+\"ME\"+ANSI_RESET;\n\t\t}\n\t\telse {\n\t\t\tocc = ANSI_BLUE+\"__\"+ANSI_RESET+\"..\"+ANSI_BLUE+\"__\"+ANSI_RESET;\n\t\t}\n\t\tSystem.out.print(\"[\" + occ + \"]\");\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n locations.put(0, new Location(0, \"You are sitting infront of a computer learning java\"));\n locations.put(1, new Location(1, \"You are standing at the end of a road\"));\n locations.put(2, new Location(2, \"You are at the top of the hill\"));\n locations.put(3, new Location(3, \"You are inside a building\"));\n locations.put(4, new Location(4, \"You are in a valley beside the stream\"));\n locations.put(5, new Location(5, \"You are in the forest\"));\n\n locations.get(1).addExit(\"W\", 2);\n locations.get(1).addExit(\"E\", 3);\n locations.get(1).addExit(\"S\", 4);\n locations.get(1).addExit(\"N\", 5);\n// locations.get(1).addExit(\"Q\", 0);\n\n locations.get(2).addExit(\"N\", 5);\n// locations.get(2).addExit(\"Q\", 0);\n\n locations.get(3).addExit(\"W\", 1);\n// locations.get(3).addExit(\"Q\", 0);\n\n locations.get(4).addExit(\"N\", 1);\n locations.get(4).addExit(\"W\", 2);\n// locations.get(4).addExit(\"Q\", 0);\n\n locations.get(5).addExit(\"S\", 1);\n// locations.get(5).addExit(\"Q\", 0);\n\n\n\n// System.out.println(locations.containsKey(6));\n int loc = 1;\n while(true){\n System.out.println(locations.get(loc).getDescription());\n if(loc ==0){\n break;\n }\n\n Map<String , Integer> exits = locations.get(loc).getExits();\n System.out.println(\"Available exits are \");\n for(String exit: exits.keySet()) {\n System.out.print(exit + \", \");\n }\n System.out.println();\n String[] str = sc.nextLine().split(\" \");\n String direction = \"\";\n if(str.length == 1){\n direction = str[0].toUpperCase();\n } else{\n for(String s: str){\n if(s.equalsIgnoreCase(\"North\")){\n direction = \"N\";\n }\n if(s.equalsIgnoreCase(\"South\")){\n direction = \"S\";\n }\n if(s.equalsIgnoreCase(\"West\")){\n direction = \"W\";\n }\n if(s.equalsIgnoreCase(\"East\")){\n direction = \"E\";\n }\n }\n }\n\n// String direction = sc.nextLine().toUpperCase();\n\n if(exits.containsKey(direction)){\n loc = exits.get(direction);\n } else{\n System.out.println(\"You cannot go in that direction\");\n }\n\n// else {\n// loc = sc.nextInt();\n// if(locations.containsKey(loc)){\n//\n// } else {\n// System.out.println(\"You cannot go in that direction\");\n// }\n// }\n }\n\n }", "java.lang.String getRoomName();", "@Override\n public String toString() {\n StringBuilder output = new StringBuilder();\n\n output.append(\"Currently \" + _passengersOnboard + \" Passengers Onboard\\r\\n\");\n output.append(\"On Floor : \" + _currentFloor + \"\\r\\n\");\n return output.toString();\n\n }", "public String message() {\n if (!longestAvailableMoves(2, !lastColor).isEmpty())\n return \"Strike available\";\n else if (isGameOver())\n return \"Game over! Click somewhere to continue\";\n else return \"Turn: \" + (lastColor ? \"White\" : \"Black\");\n }", "public String toString() {\n\t\tString resultString = \"\\r\\n\";\n\t\t//resultString += \"Checkerboard state: \\r\\n\";\n\t\tfor (int i = 0; i < checkerboard.length; i++) {\n\t\t\tfor (int j = 0; j < checkerboard.length; j++) {\n\t\t\t\tif (checkerboard[i][j] == WHITE) {\n\t\t\t\t\tresultString += \"o \";\n\t\t\t\t} else if (checkerboard[i][j] == BLACK) {\n\t\t\t\t\tresultString += \"x \";\n\t\t\t\t} else {\n\t\t\t\t\tresultString += \"- \";\n\t\t\t\t}//Of if\n\t\t\t}//Of for j\n\t\t\tresultString += \"\\r\\n\";\n\t\t}//Of for i\n\t\t\n\t\tresultString += currentState;\n\n\t\t//resultString += \"\\r\\nThe current situation is: \" + gameSituation;\n\t\treturn resultString;\n\t}", "public String toString() {\n\t\tString output = \"Day \" + day + \": \";\n\t\tif (transactionType != null) {\n\t\t\toutput += transactionType + \" \" + item.getName();\n\t\t}\n\t\tif (eventName != null) {\n\t\t\toutput += eventName;\n\t\t}\n\t\tif (damage != 0) {\n\t\t\tif (damage > 0) {\n\t\t\t\toutput += \" taking \";\n\t\t\t}else {\n\t\t\t\toutput += \" repairing \";\n\t\t\t\tdamage *= -1;\n\t\t\t}\n\t\t\toutput += damage + \" damage\";\n\t\t}\n\t\tif (cost != 0) {\n\t\t\tif (cost > 0) {\n\t\t\t\toutput += \" costing $\";\n\t\t\t} else {\n\t\t\t\toutput += \" reciving $\";\n\t\t\t\tcost *= -1;\n\t\t\t}\n\t\t\toutput += cost;\n\t\t}\n\t\tif (location != null) {\n\t\t\toutput += \" at \" + location.getName();\n\t\t}\n\t\toutput += \".\";\n\t\treturn output;\n\t}", "public Room getExit(int choice) {\n\t\treturn Exits.get(choice);\n\t}", "public String toString(){\n return \"This Pass ID number is \"+ id +\n \", number of moves so far today is \"+number_of_moves+\n \", number of hours left is \"+hours_left +\n \", the protection rating is \"+ protection_rating+\n \", the project team name is \"+ name_of_project_team+\n \", the Code of the project team is \"+ code_of_project_team+\n \"\\n*******\\n\";\n }", "public void look() \n {\n System.out.println(currentRoom.getLongDescription());\n }", "public String toString()\n { \n \treturn (\"Door of ID: \" + id + \" connects to Room ID: \" + room.getName() + \", Locked: \" + isLocked +\n \t\t\t\", Unlocking key: \" + keyID);\n }", "public String getGameStr() {\n StringBuilder outStr = new StringBuilder();\n for(int i=0;i<ROWS;i++) {\n for(int j=0;j<COLS;j++){ \n outStr.append(\"|\").append(gameBoard[i][j].show());\n }\n outStr.append(\"|\").append(System.getProperty(\"line.separator\"));\n }\n return outStr.toString();\n }", "public String getHelp() {\r\n String res = \"You can use the following commands:\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"north\\\" to go towards the north\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"south\\\" to go towards the south\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"east\\\" to go towards the south\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"west\\\" to go towards the south\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"attack\\\" to attack a monster\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"look\\\" to look around in the room\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"search\\\" to search the room for treasure\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"use\\\" to use somthing in your inventory\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"gear\\\" to see what gear you got equipped\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"inventory\\\" to see what gear you have in your inventory\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"savegame\\\" to save your progress\" + System.getProperty(\"line.separator\");\r\n res += \"Type \\\"stop\\\" to quit the game.\" + System.lineSeparator();\r\n return res;\r\n }", "private void clearExits()\n {\n promenade.removeExit(\"up\", ossuary);\n \n ossuary.removeExit(\"down\", promenade);\n ossuary.removeExit(\"left\", forest);\n ossuary.removeExit(\"straight\", crypt);\n \n \n \n tower.removeExit(\"straight\", ramparts);\n tower.removeExit(\"down\", forest);\n \n ramparts.removeExit(\"down\", bridge);\n ramparts.removeExit(\"straight\", castle);\n \n \n prison.removeExit(\"up\", promenade);\n prison.removeExit(\"down\", sewers);\n prison.removeExit(\"straight\", deathRoom2);\n \n sewers.removeExit(\"down\", depths);\n sewers.removeExit(\"left\", deathRoom1);\n \n depths.removeExit(\"up\", sewers);\n depths.removeExit(\"right\", crypt);\n \n crypt.removeExit(\"up\", graveyard);\n crypt.removeExit(\"straight\", deathRoom3);\n crypt.removeExit(\"left\", depths);\n crypt.removeExit(\"back\", ossuary);\n \n graveyard.removeExit(\"straight\", bridge);\n graveyard.removeExit(\"down\", crypt);\n \n bridge.removeExit(\"up\", ramparts);\n bridge.removeExit(\"down\", deathRoom2);\n \n throneRoomEntrance.removeExit(\"straight\", throne);\n \n }", "public static void printRoom(char[][] cinemaFloor) {\n int rows = cinemaFloor.length;\n int numSeats = cinemaFloor[0].length;\n\n println(\"Cinema:\");\n for(int i = 1; i <= numSeats; i++) {\n if(i == 1) {\n System.out.print(\" \");\n }\n System.out.print(\" \" + i);\n }\n\n println(\"\");\n \n for(int row = 0; row < rows; row++) {\n System.out.print((row + 1) + \" \");\n for(int col = 0; col < cinemaFloor[row].length; col++) {\n if(cinemaFloor[row][col] == '\\u0000') {\n System.out.print(\"S \");\n } else {\n System.out.print(cinemaFloor[row][col] + \" \");\n }\n }\n println(\"\");\n }\n }", "public String toString() {\n\t\treturn position\n\t\t\t+ \" between \"\n\t\t\t+ worldOrigin\n\t\t\t+ \" and \"\n\t\t\t+ worldEnd;\n\t}", "@Override\n public String toString() {\n String toStr = String.format(\"ChiefExecutiveOfHA | %s, leadership %d, medicine %d, experience %d\", isReady() ? \"READY\" : \"DONE\",leadership, medicine, experience);\n return toStr;\n }", "public String toString() {\n\n\t\tString result = \"\";\n\n\t\tfor(Cell[][] dim : board) {\n\t\t\tfor(Cell[] row : dim) {\n\t\t\t\tfor(Cell col : row) {\n\t\t\t\t\tif(col== Cell.E)\n\t\t\t\t\t\tresult += \"-\";\n\t\t\t\t\telse\n\t\t\t\t\t\tresult += col;\t\n\t\t\t\t}\n\t\t\t\tresult += \"\\n\";\n\t\t\t}\n\t\t\tresult += \"\\n\";\n\t\t}\n\n//\t\tSystem.out.println(\"\\n***********\\n\");\n\t\treturn result;\n\n\t}", "@Override\n\tpublic String toString() {\n\t\tString countCell = \"\";\n\t\tfor ( int row = 0; row < gameGrid.length; row++){\n\t\t\tfor ( int column = 0; column < gameGrid[0].length; column++){\n\t\t\t\tif(gameGrid[row][column] == 1) //this represents a live cell or exist\n\t\t\t\t\tcountCell = countCell + \"0\"; \n\t\t\t\telse{\n\t\t\t\t\tcountCell = countCell + \".\";//this will create little dots if there is no live cell...\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tcountCell = countCell + \"\\n\"; //creates a new line and moves down in the array\n\t\t}\n\n\t\treturn countCell;\n\t}", "public String toString(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tif(isFlag()==true){\n\t\t\t\tif(isDownBlock()==true){\n\t\t\t\t\tsb.append(\"g\"); //use G represent the goal\n\t\t\t\t\t\t\t\t\t\t// if down block is a block use small letter\n\t\t\t\t}\n\t\t\t\telse if(isRobot()==true){\n\t\t\t\t\tsb.append(\"V\"); //flag and robot on same position VICTORY!\n\t\t\t\t}\n\t\t\t\telse sb.append(\"G\"); \t\t\n\t\t\t}\n\t\telse if(isRobot()==true){\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"r\");//use R represent the Robot\n\t\t\t\t\t// if down move is a block use small letter\n\t\t\t}\n\t\t\telse sb.append(\"R\");\n\t\t}\n\t\telse{\n\t\t\tif(isDownBlock()==true){\n\t\t\t\tsb.append(\"_\"); \n\t\t\t\t//if down move is blocked then use underline\n\t\t\t}\n\t\t\telse sb.append(\"O\"); // use o represent the grid\n\t\t}\n\t\t\t\n\t\tif(isRightBlock()==true){\n\t\t\tsb.append(\"|\"); //best way to represent right block\n\t\t}\n\t\telse{\n\t\t\tsb.append(\" \"); // if no block just a space\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String toString()\r\n {\r\n System.out.println(\"SOUT\");\r\n return \"Vroom!!\";\r\n }", "public String toString()\n\t{\n\t\tString result = \"AP Concert Hall - Simplified\\n\";\n\t\tfor(int i = 0; i < seat.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < seat[i].length; j++)\n\t\t\t{\n\t\t\t\tif(seat[i][j] == true)\n\t\t\t\t\tresult += \"X \\t\";\n\t\t\t\telse if(seat[i][j] == false)\n\t\t\t\t\tresult += \"O \\t\";\n\t\t\t}\n\t\t\tresult += \"\\n\";\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n public String toString() {\n String newSubject = subject.trim();\n String newTitle = title.trim();\n String newBuilding = building.trim();\n String newDayTime = dayTime.trim();\n String newFaculty = faculty.trim();\n if (subject.length() > 5) {\n newSubject = subject.substring(0, 29);\n }\n if (title.length() > 33) {\n newTitle = title.substring(0, 29);\n }\n\n if (dayTime.length() > 34) {\n newDayTime = dayTime.substring(0, 20);\n }\n if (building.length() > 6) {\n newBuilding = building.substring(0, 29);\n }\n if (faculty.length() > 20) {\n newFaculty = faculty.substring(0, 16);\n }\n\n return String.format(\"%-11s%-38s%-34s%-15s%-10s%-25s\", \"Sub: \" + newSubject,\n \"Title: \" + newTitle, \" Day/Time: \" + newDayTime, \" Bldg: \" + newBuilding,\n \"Rm: \" + newRoom + oldRoomLetter, \" Fac: \" + newFaculty);\n\n }", "public String toString(){\n\t\tString board = \"\";\n\t\tfor(int i = 0; i < rows; i++){\n\t\t\tfor(int j = 0; j < columns; j++){\n\t\t\t\tif(theGrid[i][j]){ //iterate through, if cell is alive, mark with *\n\t\t\t\t\tboard += \"*\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tboard += \" \"; //else, [space]\n\t\t\t\t}\n\t\t\t}\n\t\t\tboard += \"\\n\";//create a new line, to create the board\n\t\t}\n\t\treturn board; //return the board\n\t}", "String describe() {\n switch (this) {\n case NORTH_4M:\n return \"north\";\n case NORTH_16M:\n return \"north_16m\";\n case SOUTH_4M:\n return \"south\";\n case SOUTH_16M:\n return \"south_16m\";\n case WILTSHIRE_4M:\n return \"wiltshire\";\n case WILTSHIRE_16M:\n return \"wiltshire_16m\";\n }\n return \"?\";\n }", "public String toString() {\r\n return \"\\n\\nTrainer: \"+ name + \", Wins: \" + win + \", team:\" + team;\r\n }", "private String goRoom(Command command)//refactored\n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n return \"Go where?\";\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);//new\n \n String result = \"\";\n if (nextRoom == null) {\n result += \"There is no door!\";\n }\n else {\n currentRoom = nextRoom;\n result += currentRoom.getDescription()+\"\\n\";//refactored\n \n result += \"Exits: \" + currentRoom.getExitString()+\"\\n\";//taken from class Room \n \n return result;\n }\n result += \"\\n\";\n\n return result;\n }", "public String toString(){\n return\"Name \"+name+ \"Address \" +address+ \"Floor \" +floor;\n }", "public String getEnemyAircraft() {\n return \" \\n\" +\n \" \\n\" +\n \" R \\n\" +\n \" RR \\n\" +\n \" R RRRR \\n\" +\n \" RRRRRRRRRRRRR \\n\" +\n \" RRRRRRRRRRRRRRRRRR \\n\" +\n \" RRRRRRRRRRRRR \\n\" +\n \" R RRRR \\n\" +\n \" RR \\n\" +\n \" R \\n\" +\n \" \\n\";\n\n }", "@Override\r\n\tpublic String Land() {\n\t\treturn \"El Helicoptero esta Aterrizando\";\r\n\t}", "public String toString() {\n\t\treturn super.toString() + \", NumberOfSeat: \" + this.numberOfSeats + \", HorsePower: \" + this.power;\n\t}", "private static void createRooms() {\n// Room airport, beach, jungle, mountain, cave, camp, raft, seaBottom;\n\n airport = new Room(\"airport\");\n beach = new Room(\"beach\");\n jungle = new Room(\"jungle\");\n mountain = new Room(\"mountain\");\n cave = new Room(\"cave\");\n camp = new Room(\"camp\");\n seaBottom = new Room(\"seabottom\");\n\n //Setting the the exits in different rooms\n beach.setExit(\"north\", jungle);\n beach.setExit(\"south\", seaBottom);\n beach.setExit(\"west\", camp);\n\n jungle.setExit(\"north\", mountain);\n jungle.setExit(\"east\", cave);\n jungle.setExit(\"south\", beach);\n\n mountain.setExit(\"south\", jungle);\n\n cave.setExit(\"west\", jungle);\n\n camp.setExit(\"east\", beach);\n\n seaBottom.setExit(\"north\", beach);\n\n // Starting room\n currentRoom = airport;\n }", "public String getPlayerInventory() {\r\n String res = \"You have the following items in your inventory:\" + System.getProperty(\"line.separator\");\r\n for (int i = 0; i < player.getInventory().size(); i++) {\r\n res += i + \": \" + player.getInventory().get(i).toString() + System.getProperty(\"line.separator\");\r\n }\r\n return res;\r\n }", "String getElevationWithFlooringAsString();", "public String getRoomView() {\n\t\t// From room 1 to 4 (include)\n\t\tif (this.getAccommodationNumber() == 101 || this.getAccommodationNumber() == 102\n\t\t\t\t|| this.getAccommodationNumber() == 103 || this.getAccommodationNumber() == 104) {\n\t\t\treturn \"street view\";\n\t\t}\n\t\t// From room 5 to 8 (include)\n\t\telse if (this.getAccommodationNumber() == 105 || this.getAccommodationNumber() == 106\n\t\t\t\t|| this.getAccommodationNumber() == 107 || this.getAccommodationNumber() == 108) {\n\t\t\treturn \"garden view\";\n\t\t} else {\n\t\t\treturn \"sea view\";\n\t\t}\n\t}", "public synchronized String printInventory(){\n String inventStr = \"\";\n\n for (int i = 0; i < titleList.size(); i++){\n inventStr += titleList.get(i) + \" \" + quantityList.get(i);\n if(i < titleList.size() - 1) {\n inventStr +=\"___\";\n }\n }\n return inventStr;\n }", "public void look()\n {\n System.out.println(currentRoom.getLongDescription());\n }", "public String toString()\n {\n return \"I am the nice \" + NAME + \", I am now standing on square \" + x + \" , \" + y + \".\";\n }", "public String toString() {\n System.out.println(\"Inventory: \");\n String str = \"\";\n for(int i = 0; i < numItems; i++) {\n if(inventory[i]!= null) {\n str += inventory[i].toString() + \"\\n\";\n }\n }\n return str;\n }", "public String toString()\n {\n String str = \"\";\n switch (align)\n {\n case LEFT :\n str = \",align=left\";\n break;\n case CENTER :\n str = \",align=center\";\n break;\n case RIGHT :\n str = \",align=right\";\n break;\n }\n return getClass().getName() + \"[hgap=\" + hgap + \",vgap=\" + vgap + str + \"]\";\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "public String toString() {\n StringBuilder res = new StringBuilder();\n res.append(n + \"\\n\");\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++)\n res.append(String.format(\" %2d \", tileAt(i, j)));\n res.append(\"\\n\");\n }\n return res.toString();\n }", "public void drawTextualMap(){\n\t\tfor(int i=0; i<grid.length; i++){\n\t\t\tfor(int j=0; j<grid[0].length; j++){\n\t\t\t\tif(grid[i][j] instanceof Room){\n\t\t\t\t\tif(((Room)grid[i][j]).getItems().size()>0)\n\t\t\t\t\t\tSystem.out.print(\" I \");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\" R \");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.print(\" = \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tSystem.out.println(\"rows = \"+grid.length+\" cols = \"+grid[0].length);\n\t\tSystem.out.println(\"I = Room has Item, R = Room has no Item, '=' = Is a Hallway\");\n\n\t}", "public void printExitMessage()\n {\n System.out.println(\"\\t _ _ _ _ \");\n System.out.println(\"\\t | | | | | | | | \");\n System.out.println(\"\\t | |_| | __ _ ___| |_ __ _ | | _ _ ___ __ _ ___ \");\n System.out.println(\"\\t | _ |/ _` / __| __/ _` | | | | | | |/ _ \\\\/ _` |/ _ \\\\ \");\n System.out.println(\"\\t | | | | (_| \\\\__ \\\\ || (_| | | |___| |_| | __/ (_| | (_) | \");\n System.out.println(\"\\t \\\\_| |_/\\\\__,_|___/\\\\__\\\\__,_| \\\\_____/\\\\__,_|\\\\___|\\\\__, |\\\\___/\");\n System.out.println(\"\\t __/ | \");\n System.out.println(\"\\t |___/ \");\n System.out.println(\" \");\n }" ]
[ "0.85942936", "0.78177303", "0.77811915", "0.77630043", "0.709361", "0.657508", "0.63397545", "0.6324325", "0.62927604", "0.62016934", "0.6191224", "0.6133171", "0.6128506", "0.61148196", "0.61130494", "0.60675", "0.6053382", "0.6025673", "0.60179067", "0.60129267", "0.60016465", "0.5995406", "0.59905475", "0.5986676", "0.5960971", "0.59388816", "0.59223187", "0.59044635", "0.58929104", "0.5888198", "0.5888198", "0.5888198", "0.5887326", "0.5857757", "0.58576345", "0.5852097", "0.5806932", "0.58009994", "0.5799774", "0.57762116", "0.575965", "0.575965", "0.57548964", "0.5735636", "0.5727837", "0.57257104", "0.5699782", "0.56755626", "0.5666141", "0.5657892", "0.5638291", "0.5635196", "0.56299615", "0.5628579", "0.561071", "0.56091225", "0.56016994", "0.5590127", "0.5577113", "0.5573535", "0.5561384", "0.555961", "0.5557408", "0.55532116", "0.5547024", "0.5542597", "0.55347663", "0.5519671", "0.5515278", "0.55054057", "0.5504785", "0.5498578", "0.54958516", "0.54825234", "0.5463201", "0.54628026", "0.54623276", "0.54610044", "0.54491794", "0.5428061", "0.5425057", "0.5424352", "0.54241735", "0.5422171", "0.54089296", "0.54078233", "0.54072547", "0.5402577", "0.5399869", "0.53993165", "0.539866", "0.5396927", "0.53963405", "0.5393604", "0.53923655", "0.5389261", "0.53823537", "0.53761524", "0.53661823" ]
0.77418494
5
Return the room's description
public Room getExit(String direction) { return exits.get(direction); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRoomDescription() {\n\treturn this.description;\n\t\n}", "public String getDesc() {\n ListIterator<Item> roomContents = contents.listIterator();\n String contentString = \"\";\n while (roomContents.hasNext()) {\n contentString\n = contentString + (roomContents.next()).getDesc() + \" \";\n }\n\n return description + '\\n' + '\\n'\n + \"Room Contents: \" + contentString + '\\n';\n }", "public String getDescription() {\n return roomType.getDescription() + \" with a spray-resistant shower\";\n }", "private void look()\n {\n System.out.println(currentRoom.getLongDescription()); \n }", "public String getRoomTypeDescription() {\n return this.room_type_description;\n }", "public java.lang.CharSequence getRoom() {\n return room;\n }", "public void look() \n {\n System.out.println(currentRoom.getLongDescription());\n }", "public String getRoomName() {\n switch (description) {\n case \"You are standing outside Hogwarts School of Witchcraft and\\n\"\n + \"Wizardry, near the Whomping Willow. You are searching\\n\"\n + \"for the hidden Galleons that may perhaps be in the cave that\\n\"\n + \"opens straight below you (outside).\":\n return \"outside\";\n \n case \"Too bad this cave is not on the Marauder's Map. You shout\\n\"\n + \"'Lumos' to ignite your wand, and you see there is a narrow,\\n\"\n + \" dark passage to the east (r1).\":\n return \"r1\";\n \n case \"You are in a gloomy oval shaped room with grey walls.\\n\"\n + \" \\\"Enemies of the heir, beware\\\" is written on the wall.\\n\"\n + \"There is a dim light to the west, and a narrow\\n\"\n + \"dark hole to the east only about 18 inches high (r2).\":\n return \"r2\";\n \n case \"You really need your wand here. \\n\"\n + \"There is a wide passage that quickly narrows\\n\"\n + \"to the west, a bright opening to the east,\\n\"\n + \"and a deep hole that appears to have no bottom\\n\"\n + \"in the middle of the room (r3).\":\n return \"r3\";\n \n case \"There is what looks like a giant snake skin\\n\"\n + \"in the corner. Perhaps from the Basilisk? A passage leads to\\n\"\n + \" the west, another one to the north, and a slippery route\\n\"\n + \"goes down steeply. You can hear the shrieks of mandrakes (r4).\":\n return \"r4\";\n \n case \"There is a dim light from above and the shrieks\\n\"\n + \"are clearly coming from a passageway to the east (r5).\":\n return \"r5\";\n \n case \"The ceiling is full of pixies.\\n\"\n + \"Make sure to cover your head (r6)!\":\n return \"r6\";\n \n case \"This room is very damp. There are puddles on the floor\\n\"\n + \"and a steady dripping from above. Let's hope Moaning\\n\"\n + \"Myrtle didn't flood the girls' lavatory(r7).\":\n return \"r7\";\n \n case \"Ron's rat, Scabbers runs across your foot, and woah! Here \"\n + \"comes Crookshanks chasing behind. A narrow passage runs\\n\"\n + \"to the east and an even narrower one runs to the west (r8).\":\n return \"r8\";\n \n case \"Water drips from the ceiling as you cover your head.\\n \"\n + \"There is no exit from this room with only the option to turn back east.\\n\"\n + \"Will you decide to enter the chamber again? (r9)\":\n return \"r9\";\n \n case \"It appears that someone has been here. The harp is\\n\"\n + \"playing to put Fluffy, the three-headed dog asleep.\\n\"\n + \"Oh wait! It looks like Fluffy is gaurding something.\\n\"\n + \"There's a trap door on the floor, but it is locked.\\n\"\n + \"'Alohomora' won't help you here, you need a key (r10).\":\n return \"r10\";\n \n case \"This room is very dark. You can just barely see (r11).\":\n return \"r11\";\n \n default:\n return \"your hands\";\n } \n }", "public java.lang.CharSequence getRoom() {\n return room;\n }", "java.lang.String getRoomName();", "public String getRoom() {\r\n return room;\r\n }", "public String getDescription() {\n EditText descriptionField = (EditText) rootView.findViewById(R.id.hazard_description);\n return descriptionField.getText().toString();\n }", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "String description();", "public String getDescription() {\n\t\tif (getType() == SpawnType.APPEARS) {\n\t\t\treturn String.format(\"May be found %s\", (mob.hasActFlag(ActFlag.SENTINEL) ? \"in \" : \"around \"));\n\t\t} else if (getType() == SpawnType.PRODUCED_MOB\n\t\t\t\t|| getType() == SpawnType.PRODUCED_ITEM\n\t\t\t\t|| getType() == SpawnType.PRODUCED_ROOM) {\n\t\t\treturn String.format(\"May be summoned %s by\", getProg().getType().getLabel());\n\t\t} else {\n\t\t\treturn \"Unrelated to\";\n\t\t}\n\t}", "public String toString() {\n return description;\n }", "@Override\r\n public String toString() {\r\n return String.format(\"%s\",\r\n description);\r\n }", "public String printDetail(){\r\n\t\tString str=\"Room Details: \\n\";\r\n\t\tString str1=\"\";\r\n\t\tString str2=\"\";\r\n\t\tString str3=\"\";\r\n\t\tString str4=\"\";\r\n\t\tstr3=\"\\tSeats: \"+this.getNumSeats()+\"\\n\";\r\n\t\tif(this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tHas Whiteboard\\n \";\r\n\t\tif(!this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tDoesn't have Whiteboard\\n\";\r\n\t\tif(this.hasChalkboard)\r\n\t\t\tstr2=\"\\tHas Chalkboard\\n \";\r\n\t\tif(!this.hasChalkboard)\r\n\t\t\tstr2=\"\\tDoen't have Chalkboard\";\r\n\t\tstr4=\"\\tAV Amenities: \"+this.getAVEquipmentList().toString()+\"\\n\";\r\n\t\tstr=str+str3+str1+str2+str4;\r\n\t\treturn str;\r\n\t}", "public String getRouteDescription() {\n\t\tFlightRoutePersistenceProvider routePersistor = FlightRoutePersistenceProvider.getInstance();\n\t\tByteArrayInputStream inStream;\n\t\tIFlightRoute froute;\n\n\t\tIFlightRouteplanningRemoteService service;\n\t\tBaseServiceProvider provider = MyUI.getProvider();\n\n\t\tString description = \"didnt get description\";\n\t\t// Sends the information to dronology to be saved.\n\t\ttry {\n\t\t\tservice = (IFlightRouteplanningRemoteService) provider.getRemoteManager()\n\t\t\t\t\t.getService(IFlightRouteplanningRemoteService.class);\n\n\t\t\tString id = this.getMainLayout().getControls().getInfoPanel().getHighlightedFRInfoBox().getId();\n\n\t\t\tbyte[] information = service.requestFromServer(id);\n\t\t\tinStream = new ByteArrayInputStream(information);\n\t\t\tfroute = routePersistor.loadItem(inStream);\n\n\t\t\tdescription = froute.getDescription();\n\t\t\tif (description == null) {\n\t\t\t\tdescription = \"No Description\";\n\t\t\t}\n\t\t} catch (DronologyServiceException | RemoteException e1) {\n\t\t\tMyUI.setConnected(false);\n\t\t\te1.printStackTrace();\n\t\t} catch (PersistenceException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\treturn description;\n\t}", "public String getDescription() {\n return description; // returns the appointment's description\n }", "public String getHumanReadableDescription();", "public String getDescription(){\n return getString(KEY_DESCRIPTION);\n }", "public String getLongDescription() \n {\n return \"You are at \" + description + \".\\n\" \n + showItemInfo() + \".\\n\" + getExitString();\n }", "public String getRoom() {\n\t\treturn room;\n\t}", "public String look() {\r\n currentRoom = player.getCurrentRoom();\r\n String res;\r\n res = currentRoom.getTitle() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getDescription() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getAvailableDirections() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getMonstersToString();\r\n\r\n return res;\r\n }", "String getDesc();", "public String displayRoom() {\n String roomDisplayString = \"\";\n roomDisplayArray = new String[roomHeight][roomWidth];\n initalizeRoomDisplayArray();\n addDoorsToRoomDisplayArray();\n addContentsToRoomDisplayArray();\n roomDisplayString = convertDisplayArrayToString(roomDisplayString);\n return (roomDisplayString);\n }", "java.lang.String getDesc();", "public CharSequence getDescription() {\n return description;\n }", "public String description();", "public String getDescription() {\n return (desc);\n }", "public CharSequence getDescription() {\n return description;\n }", "public String toString() {\r\n\t\treturn description;\r\n\t}", "public String toString() {\n return this.description;\n }", "public void look()\n {\n System.out.println(currentRoom.getLongDescription());\n }", "public String getDescription()\r\n\t{\r\n\t\treturn motel.getDescription() + \"Food Bar Refill\";\r\n\t}", "public String toString() {\n\t\treturn description;\n\t}", "public String get_description() {\n return description;\n }", "String getDisplay_description();", "@Override\n\tpublic String toString() {\n\t\treturn description;\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn this.description;\r\n\t}", "@Override\n public String toString() {\n return description;\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "public String getDescription(){\n\n //returns the value of the description field\n return this.description;\n }", "@Override\r\n\t\tpublic String toString() {\r\n\t\t\treturn description;\r\n\t\t}", "public String toString() {\n\t\t\treturn description;\n\t\t}", "public String getDesc()\r\n {\r\n return description;\r\n }", "public String toString() {\n\t\treturn this.description;\n\t}", "@Override\n\tpublic java.lang.String getDescription() {\n\t\treturn _esfTournament.getDescription();\n\t}", "public String getDescription(){\r\n \tString retVal = this.description;\r\n return retVal;\r\n }", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();" ]
[ "0.8764031", "0.8128785", "0.76508415", "0.74902046", "0.7329728", "0.7037558", "0.70375293", "0.7031782", "0.700187", "0.69447786", "0.6943758", "0.69363475", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6924524", "0.6905839", "0.6884541", "0.68831784", "0.6861763", "0.68198884", "0.6819616", "0.6814158", "0.68092287", "0.68084687", "0.68057245", "0.68008226", "0.6799852", "0.6792395", "0.67865413", "0.67832404", "0.67812365", "0.6780389", "0.67729443", "0.6768715", "0.67686075", "0.67649055", "0.67495644", "0.6744674", "0.67236584", "0.67207587", "0.6712098", "0.6707089", "0.6702509", "0.6691157", "0.6691157", "0.6691157", "0.6691157", "0.6691157", "0.6691157", "0.6691157", "0.6691157", "0.6691157", "0.6687003", "0.6668701", "0.66685015", "0.66578037", "0.6656449", "0.6655952", "0.6650307", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594", "0.66449594" ]
0.0
-1
Prints out which items are within a room. No return or parameter values.
public void printItems() { if (getItems().size()==0){ System.out.println("There are no items in this room."); } else{ System.out.print("The item(s) in this room are: "); int i=0; while(i<getItems().size()){ if(i<getItems().size()-1){ System.out.print(getItems().get(i).getName()+", "); } else{ System.out.println(getItems().get(i).getName()+"."); } i++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "private void printInfo()\n {\n if(currentRoom.getItems().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Items in room are: \" );\n ArrayList<Item> items = currentRoom.getItems();\n \n for(Item i : items)\n {\n System.out.println(i.getItemName() + i.getDescription()); \n }\n \n }\n \n \n \n if(currentRoom.getWeapons().size() >= 1)\n {\n System.out.println(\"\\n\" + \"Weapons in room are: \" );\n \n ArrayList<Weapon> weapons = currentRoom.getWeapons();\n for(Weapon w : weapons)\n {\n System.out.println(w.getWeaponName() + w.getDescription());\n }\n \n }\n \n \n }", "public void dispRoomNum(){\n System.out.print(\"Available Rooms: \");\n for(int i=0;i<SearhRoomCounter;i++){\n System.out.print(roomNumResult[i]+\", \");\n }\n System.out.println();\n }", "public static boolean inspectItems(Player player) {\n boolean itemExists = false;\n System.out.println(\"You look for items.\");\n System.out.println(\"You see:\");\n ArrayList<Collectable> items = player.getCurrentRoom().getItems();\n if(items.size() > 0) {\n itemExists = true;\n for (int i = 0; i < items.size(); i++) {\n System.out.print(\"\\t(\" + i + \") \");\n System.out.println(items.get(i).toString());\n }\n System.out.println(\"Which item will you take? (-1 to not collect any items)\");\n } else System.out.println(\"Nothing in sight\");\n return itemExists;\n }", "private static void printRoom(Player p,ArrayList<Item> a, ItemManager im, RoomManager rm) {\n\t\tSystem.out.println(p.getCurrentRoom().getName());\n\t\tSystem.out.println(p.getCurrentRoom().getShortDesc());\n\t\tSystem.out.println(p.getCurrentRoom().getLongDesc());\n\t\tconditionalActions(p,a,im,rm);\n\t\t\t\n\t}", "public static void showAllRoom(){\n ArrayList<Room> roomList = getListFromCSV(FuncGeneric.EntityType.ROOM);\n displayList(roomList);\n showServices();\n }", "void examineItems(){\n\t\t\tif (!this.items.isEmpty())\n\t\t\t\tfor (int i = 0; i < this.items.size(); i++)\n\t\t\t\t\tSystem.out.print(this.items.get(i).itemName + \", \");\n\t\t}", "public static void displayRoom(Room currentRoom) {\n for(int i = 0; i < 10; i++) {\n for(int j = 0; j< 10; j++) {\n if(currentRoom.roomArray[i][j] instanceof Player) {\n System.out.print(\"|\" + \"p\");\n } else if(currentRoom.roomArray[i][j] instanceof Item) {\n System.out.print(\"|\" + \"i\");\n }\n else if(currentRoom.roomArray[i][j] instanceof Student) {\n System.out.print(\"|\" + \"s\");\n }\n else {\n System.out.print(\"| \"); \n }\n }\n System.out.println(\"\");\n }\n \n }", "private static void printRoom(Room currentRoom) {\n\t\t\n\t}", "private void printExits ()\n {\n System.out.println(\"You are in the \" + currentRoom.getDescription());\n System.out.print(\"Exits: \");\n for(Exit e : currentRoom.getListExits()) {\n System.out.println(e.getDirection());\n } \n }", "public void printInventory()\n { \n System.out.println();\n\n // Checks if the player has items.\n if(!(getPerson(PLAYER).getInventory().getItems().isEmpty())){\n System.out.println(\"In your backpack, you have:\");\n\n // Gets each item in the player's inventory.\n for(Item item: getPerson(PLAYER).getInventory().getItems()){\n System.out.print(item.getName() + \",\");\n }\n System.out.println();\n System.out.println(\"You are carrying \"+ getPerson(PLAYER).getWeight() + \"kg.\");\n }\n else{\n System.out.println(\"There are currently no items in your backpack.\");\n }\n System.out.println();\n }", "public String search() {\r\n currentRoom = player.getCurrentRoom();\r\n String res = \"You start searching the room....\";\r\n if (currentRoom.getChestSize() > 0) {\r\n res += \"You find a treasure chest in the corner...\" + System.lineSeparator();\r\n res += \"You pick up the following items from the chest and put them in your backpack\" + System.lineSeparator();\r\n res += currentRoom.getItemsInChest();\r\n } else {\r\n res = \"You find nothing of intrest in the room...\";\r\n }\r\n return res;\r\n }", "public void list(){\n //loop through all inventory items\n for(int i=0; i<this.items.size(); i++){\n //print listing of each item\n System.out.printf(this.items.get(i).getListing()+\"\\n\");\n }\n }", "public void printItems();", "public String showItemInfo()\n {\n return \"The room has 1 \" + currentItem.getDescription() \n + \" weighted \" + currentItem.getWeight() + \" pounds\"; \n }", "public void displayAllRooms(){\n for(int i=0;i<roomCounter;i++){\n myHotel[i].Display();\n System.out.println();\n }\n }", "public void displayAll() {\r\n \t Item currentItem;\r\n \t \r\n \t System.out.println(\"-----BOOKS-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a book.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.BOOK) \r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n \t \t\r\n \t System.out.println(\"-----MAGAZINES-----\");\r\n \t for(int i=0; i<items.size(); i++) {\r\n \t currentItem = items.get(i);\r\n \t \t //This next line checks if the current item is a magazine.\r\n \t if(currentItem.getItemType() == Item.ItemTypes.MAGAZINE)\r\n \t System.out.println(currentItem.toString());\r\n \t }\r\n\r\n }", "private void look()\n {\n System.out.println(currentRoom.getLongDescription()); \n }", "public String printGrabbedItems() {\n return \"Items in your inventory: \" + grabbedItems;\n }", "@SuppressWarnings(\"unused\")\n private void printData()\n {\n\tLog.d(Constants.TAG, \"XMLReader::printData() Called!\");\n\n\tIterator<Room> it = myRooms.iterator();\n\tint count = 0;\n\twhile (it.hasNext())\n\t{\n\t count++;\n\t System.out.println(\"Room \" + count + \"\\n\" + it.next().toString());\n\n\t}\n\n\tLog.d(Constants.TAG, \"XMLReader::printData() Exiting!\");\n }", "private void printRoomInfo(Room room, List<String> retirevedInRoom, StringBuilder sb) {\n sb.append(room.getId());\n insertSpacing(sb, room.getId().toString());\n sb.append(room.getName());\n insertSpacing(sb, room.getName());\n if (CollectionUtils.isNotEmpty(retirevedInRoom)) {\n for (String obj : retirevedInRoom) {\n sb.append(obj);\n sb.append(\" \");\n }\n } else {\n sb.append(\"None\");\n }\n sb.append(NEWLINE);\n }", "public void printStatus(){\n System.out.println();\n System.out.println(\"Status: \");\n System.out.println(currentRoom.getLongDescription());\n currentRoom.printItems();\n System.out.println(\"You have made \" + moves + \" moves so far.\");\n }", "private static void viewRooms() \n {\n String option, roomCode;\n\n displayMyRooms(\" \");\n\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n \n while (!option.equals(\"q\"))\n {\n if (option.equals(\"v\") || option.equals(\"r\"))\n {\n System.out.print(\"Enter a room code: \");\n roomCode = \" '\" + input.next().toUpperCase() + \"'\";\n\n if(option.equals(\"v\"))\n displayDetailedRooms(roomCode);\n else\n displayDetailedReservations(\"WHERE ro.RoomId = \" + roomCode);\n }\n\n System.out.print(\"Type (v)iew [room code] or \"\n + \"(r)eservations [room code], or (q)uit to exit: \");\n \n option = input.next().toLowerCase();\n }\n \n }", "public String printAllInventory(){\r\n\r\n String returnString = \"Items:\";\r\n for(Item item : playerItem){\r\n returnString += \" \" + item.getName(); \r\n }\r\n return returnString;\r\n }", "private void printAllItems() {\n Set<ClothingItem> items = ctrl.getAllItems();\n items.stream().forEach(System.out::println);\n }", "protected static String availableRooms(ArrayList<Room> roomList,String start_date){\n String stringList = \"\";\n for(Room room : roomList){\n System.out.println(room.getName());\n ArrayList<Meeting> meet = room.getMeetings();\n for(Meeting m : meet){\n stringList += m + \"\\t\";\n }\n System.out.println(\"RoomsList\"+stringList);\n }\n return \"\";\n }", "public void displayRoomByStatus(RoomStatus status) {\n\t\tSystem.out.println(status.toString().toUpperCase() + \" ROOMS\\n\");\n\t\trooms.forEach((key,value) -> {\n\t\t\tif(value.status == status) {\n\t\t\t\tSystem.out.println(value.getDetails());\n\t\t\t}\n\t\t});\n\t}", "public void look() \n {\n System.out.println(currentRoom.getLongDescription());\n }", "public String visibleItems() {\n \tStringBuilder s = new StringBuilder(\"\");\n for (Item item : items) {\n if (item instanceof Visible && item.isVisible()) {\n s.append(\"\\nThere is a '\").append(item.detailDescription()).append(\"' (i.e. \" + item.description() + \" ) here.\");\n }\n }\n return s.toString();\n }", "public void printMap()\r\n {\r\n\t\tint x = 0;\r\n for(Room[] row : rooms)\r\n {\r\n \tStringBuilder top = new StringBuilder(); // top row of room\r\n \tStringBuilder mid = new StringBuilder(); // mid row of room\r\n \tStringBuilder bot = null;\r\n \tif (x == row.length - 1) { // if the last row\r\n \t\tbot = new StringBuilder(); // bot row of room\r\n \t}\r\n \t\r\n for (Room room : row)\r\n {\r\n \tString roomStr = room.toString();\r\n top.append(roomStr.substring(0, 3)); // 0-3 top, 3-6, mid, 6-9 bot\r\n mid.append(roomStr.substring(3, 6)); \r\n if (x == row.length - 1) { //if the last row\r\n \tbot.append(roomStr.substring(6, 9)); //append the bot row\r\n }\r\n }\r\n // add new lines\r\n top.append('\\n');\r\n mid.append('\\n');\r\n \r\n System.out.print(top);\r\n System.out.print(mid);\r\n \r\n if (x == row.length - 1) {\r\n \tbot.append('\\n');\r\n \tSystem.out.print(bot);\r\n }\r\n x++;\r\n }\r\n }", "protected static String listRooms(ArrayList<Room> roomList) {\n System.out.println(\"Room Name - Capacity-Building-Location\");\n System.out.println(\"---------------------\");\n\n for (Room room : roomList) {\n System.out.println(room.getName() + \" - \" + room.getCapacity()\n + \" - \" + room.getBuilding() + \" - \" + room.getLocation());\n }\n\n logger.info(\"---------------------\");\n\n return roomList.size() + \" Room(s)\";\n }", "private void printCheckItemQuantityMenu(Shop shop) {\n System.out.println(\"What is the ID of the tool you would like to look up?\");\n int itemId = receiveNumberInput();\n if (shop.searchInventory(itemId)) {\n System.out.println(\"Quantity: \" + shop.checkToolStock(itemId));\n } else {\n System.out.println(\"Tool does not exist or invalid input, please check spelling and try again.\");\n }\n }", "public void getAllSingleRoom() {\n\t\t for(SuiteRoom elem: suiteroom)\n\t {\n\t \t System.out.println (\"capacité : \" +elem.getCapacity());\n\t \t System.out.println (\"prix : \" +elem.getPrice());\n\t \t System.out.println (\"numéro : \" +elem.getIdRoom());\n\t \t System.out.println (\"nom : \" +elem.getName());\n\t \tSystem.out.println (\"-------------------\");\n\t \t \n\t }\n\t}", "void printFilteredItems();", "public void printRoom() {\n super.printRoom();\n System.out.println(\"Shower: \" + this.hasShower);\n }", "public int show(int sit_checker)\n {\n int ret_val = 0;\n for(Room temp : data_set)\n {\n if(temp.get_situation() == sit_checker)\n {\n ++ret_val;\n System.out.print(temp.room_number() + \" - \");\n }\n }\n if(ret_val > 0)\n System.out.println(\"\\n(-1 for cancel operation)\");\n return ret_val;\n }", "public void look()\n {\n System.out.println(currentRoom.getLongDescription());\n }", "public void printItems() {\n for (Item item1 : items) {\n System.out.println(item1.toString());\n }\n }", "public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }", "public static void display(){\n \n //create an array : Remember positions\n //wheat= 0\n //Land = 1 \n //Population = 2\n \n String[] items = {\"Wheat\", \"Land\", \"Population\"};\n \n \n // call the crops object \n Crops theCrops = Game.getCrop();\n \n //get wheat\n int wheat = theCrops.getWheatInStore();\n \n //get land (acres)\n int acres = theCrops.getAcres();\n \n //get population \n \n int population = theCrops.getPopulation();\n \n //print results \n \n System.out.println(\"\\nInventory List:\");\n //wheat \n System.out.println(\"Wheat in Store:\" + wheat + \" bushels of \" + items[0]);\n //acres\n System.out.println(\"Acres of Land owned:\" + acres + \" acres of \" + items[1]);\n \n //population\n System.out.println(\"Current population:\" + population + \" people in the \" + items[2]);\n \n \n \n }", "private void inspectItem(String item)//Made by Lexi\n {\n itemFound = decodeItem(item);\n if (itemFound == null)\n {\n System.out.println(\"I don't know of any \" + item + \".\");\n }\n else\n {\n System.out.println(\"The item is: \" + itemFound.getTitle());\n System.out.println(\"Description of the item: \" + itemFound.getDescription());\n System.out.println(\"Item Weight: \" + itemFound.getWeight());\n System.out.println(\"Room item was found in: \" + itemFound.getLocation().getTitle());\n }\n }", "public static void main(String[] args) {\n\tArrayList<Item> hallInventory = new ArrayList<>();\n\tArrayList<Exit> hallExits = new ArrayList<>();\n\tRoom Hall = new Room(\"Entrance Hall\", \"It is an entrance hall of a very grand house\", hallInventory, hallExits);\n\n\t//kitchen\n\tArrayList<Item> kitchenInventory = new ArrayList<>();\n\tArrayList<Exit> kitchenExits = new ArrayList<>();\n\tRoom Kitchen = new Room(\"Kitchen\", \"This is a very large kitchen.\", kitchenInventory, kitchenExits);\n\n\t//dining room\n\tArrayList<Item> diningInventory = new ArrayList<>();\n\tArrayList<Exit> diningExits = new ArrayList<>();\n\tRoom Dining = new Room(\"Dining Room\", \"This dining room is set for 12 people\", diningInventory, diningExits);\n\n\t//lounge\n\tArrayList<Item> loungeInventory = new ArrayList<>();\n\tArrayList<Exit> loungeExits = new ArrayList<>();\n\tRoom Lounge = new Room(\"Lounge\", \"The Lounge is a mess, and there are blood spatters on the wall\", loungeInventory, loungeExits);\n\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"Fill rooms with objects\">\n\thallInventory.add(new Item(\"a fruit bowl\", \"The fruit bowl contains some fruit\"));\n\thallInventory.add(new Item(\"a clock\", \"Tick Tock\"));\n\tkitchenInventory.add(new Item(\"a stove\", \"The stove is very hot\"));\n\tkitchenInventory.add(new Item(\"a knife\", \"The knife is blunt\"));\n\t//</editor-fold>\n\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"add exits to rooms\">\n\thallExits.add(new Exit(1, Lounge));\n\thallExits.add(new Exit(4, Dining));\n\tloungeExits.add(new Exit(2, Hall));\n\tdiningExits.add(new Exit(3, Hall));\n\tdiningExits.add(new Exit(4, Kitchen));\n\tkitchenExits.add(new Exit(3, Dining));\n\t//</editor-fold>\n\n\t//create character : Avatar\n\t//<editor-fold defaultstate=\"collapsed\" desc=\"character creation\">\n\tArrayList<Item> invent = new ArrayList<>();\n\tCharacter Avatar = new Character(\"Tethys\", \"A tall elf dressed in armour\", 100, invent);\n\tinvent.add(new Item(\"armour\", \"leather armour\"));\n\t//</editor-fold>\n\t//begin\n\tRoom currentLoc = Hall;\n\tSystem.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\tcurrentLoc.printInventory();\n\tcurrentLoc.printExits();\n\n\tBufferedReader command = new BufferedReader(new InputStreamReader(System.in));\n\tString orders = null;\n\twhile (true) {\n\t System.out.print(\"What do you want to do? \");\n\t try {\n\t\torders = command.readLine();\n\t } catch (IOException ioe) {\n\t\tSystem.out.println(\"I'm sorry, I didn't understand that!\");\n\t\tSystem.exit(1);\n\t }\n\n\t String[] orderWords = orders.split(\" \");\n\n//\t for (String s : orderWords){\n//\t\tSystem.out.print(s);\n\t switch (orderWords[0].toLowerCase()) {\n\t\tcase \"go\":\n\t\t int count = 0;\n\t\t for (Exit e : currentLoc.getExits()) {\n\t\t\tString direct = orderWords[1].toUpperCase();\n\t\t\tif (direct.equals(e.getDirectionName())) {\n\t\t\t currentLoc = e.getLeadsTo();\n\t\t\t count++;\n\t\t\t System.out.print(\"You are standing in the \" + currentLoc.getName() + \"\\n\" + currentLoc.getDesc() + \"\\n\");\n\t\t\t currentLoc.printInventory();\n\t\t\t currentLoc.printExits();\n\t\t\t break;\n\t\t\t}\n\t\t }\n\t\t if (count == 0) {\n\t\t\tSystem.out.print(\"I'm sorry, I can't go that way.\\n\");\n\t\t }\n\t\t break;\n\n\t\tcase \"pick\":\n\n\n\t\tcase \"put\":\n\n\n\t\tcase \"exit\":\n\t\t System.exit(0);\n\t\t break;\n\t }\n\n\t}\n\n\n }", "public void diplayAvailableFood() {\n\t\tfor (int i = 0; i < food.size(); i++) {\n\t\t\tSystem.out.print(food.get(i).name + \" \");\n\t\t}\n\t}", "@Test\n\tpublic void insideRoomTests() {\n\t\t//Tests middle of room\n\t\tSet<BoardCell> testList = board.getAdjList(3, 11);\n\t\tassertEquals(0, testList.size());\n\t\t//Tests a room space that is next to a walkway space\n\t\ttestList = board.getAdjList(16, 10);\n\t\tassertEquals(0, testList.size());\n\n\t}", "public void drawTextualMap(){\n\t\tfor(int i=0; i<grid.length; i++){\n\t\t\tfor(int j=0; j<grid[0].length; j++){\n\t\t\t\tif(grid[i][j] instanceof Room){\n\t\t\t\t\tif(((Room)grid[i][j]).getItems().size()>0)\n\t\t\t\t\t\tSystem.out.print(\" I \");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\" R \");\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.print(\" = \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tSystem.out.println(\"rows = \"+grid.length+\" cols = \"+grid[0].length);\n\t\tSystem.out.println(\"I = Room has Item, R = Room has no Item, '=' = Is a Hallway\");\n\n\t}", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "private void printAvailableShips(ArrayList<Ship> availableShips) {\n\t\tint index = 1;\n\t\tfor (Ship ship: availableShips) {\n\t\t\tSystem.out.println(\"(\" + index + \")\" + ship);\n\t\t\tindex++;\n\t\t}\n\t}", "public static void printAllAreas() {\r\n\t for (int i = 0; i <= 2967; i++) {\r\n\t System.out.println(\"Load Shedding Inforamtion: \" + LSItemsArray[i].getInformation()\r\n + \": Corresponding Areas: \" + LSItemsArray[i].getAreas());\r\n\r\n\t }\r\n\t }", "public static void print_all() {\n for (int i = 0; i < roster.size(); i++)\n System.out.println(roster.get(i).print());\n\n System.out.println();\n }", "public void print(){\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\" ~ THREE ROOM DUNGEON GAME ~ \");\n\t\tfor(int i = 0; i < this.area.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tSystem.out.print(\" \");\n\t\t\tfor(int p = 0 ; p < this.area.length; p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tSystem.out.print(\":( \");\n\t\t\t\t}\n\t\t\t\telse if(this.Ari[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" ? \");\n\t\t\t\t}\n\t\t\t\telse if(this.position[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" + \");\n\t\t\t\t}\n\t\t\t\telse if(this.Items[i][p] != null){\n\t\t\t\t\tSystem.out.print(\"<$>\");\n\t\t\t\t}\n\t\t\t\telse if(this.Door[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" D \");\n\t\t\t\t}\n\t\t\t\telse if(this.Stairs[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" S \");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.print(this.area[i][p]);\n\t\t\t\t}\n\t\t\t}//end of inner for print\n\t\t}//end of outter for print\n\n\t}", "@Override\n public int getCount() {\n Log.d(TAG, \"getCount: size\" +fromName.size());\n return rooms.size();\n }", "public void displayAllInfo(){\nSystem.out.println(\"Dimensions of the room - length in feet : \" + room.getLengthInFeet() + \" width in feet :\" + room.getWidthInFeet());\nSystem.out.println(\"Price per square foot :\" + pricePerSquareFoot);\nSystem.out.println(\"Total Cost :\" + calculateTotalCost());\n}", "void examine() {\n\t\t\tif (!isItEmpty()){\n\t\t\t\tprintItemDescriptions();\n\t\t\t\tSystem.out.println(\"\\nWhat's in \" + this.locationName + \": \");\n\t\t\t\texamineItems(); //calls the examine items method.\n\t\t\t\texamineContainers(); //calls the examine containers method.\n\t\t\t\tSystem.out.println(\"\");}\n\t\t}", "public void printInventory(){\n\t\tint i;\n\t\tint listSize = inventory.size();\n\t\tRoll temp;\n\t\tString outputText;\n\t\toutputText = \"Inventory Stocks Per Roll: \";\n\t\t//outputText = inventory.get(0).getRoll().getType() + \" Roll Current stock: \" + inventory.get(0).getStock();\n\t\tfor(i = 0; i < listSize; i++){\n\t\t\tif(i % 3 == 0){\n\t\t\t\toutputText = outputText + \"\\n\";\n\t\t\t}\n\t\t\toutputText = outputText + inventory.get(i).getRoll().getType() + \" : \" + inventory.get(i).getStock() + \" \";\n\t\t}\n\t\tSystem.out.println(outputText);\n\t\tthis.status = outputText;\n\t\tsetChanged();\n notifyObservers();\n\t}", "public String printPlayerEquipment() {\r\n\t\t\treturn this.getPlayer().presentEquippedItems();\r\n\t\t}", "public static void inspectRoom(Player player) {\n System.out.print(\"You see: \");\n player.getCurrentRoom().inspect();\n }", "public void printContents(){\n System.out.println(this);\n System.out.println(\"Occupied by: \" + pieceAtVertex + \"\\n Neighbors:\" + neighbors);\n }", "public String displayRoom() {\n String roomDisplayString = \"\";\n roomDisplayArray = new String[roomHeight][roomWidth];\n initalizeRoomDisplayArray();\n addDoorsToRoomDisplayArray();\n addContentsToRoomDisplayArray();\n roomDisplayString = convertDisplayArrayToString(roomDisplayString);\n return (roomDisplayString);\n }", "public void showInventory()\n\t{\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"\\t\\t\\t\\tInventory\");\n\t\t\n\t\tfor (String s: inventory)\n\t\t{\n\t\t\tSystem.out.print(\"\\n\" + s);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"\\n\\n[R] Return\\n\");\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"Action: \");\n\t\t\n\t}", "public List<Room> showAllRoom() {\r\n\t\t\r\n\t\tif(userService.adminLogIn|| userService.loggedIn) {\r\n\t\t\tList<Room> list = new ArrayList<>();\r\n\t\t\troomRepository.findAll().forEach(list::add);\r\n\t\t\treturn list;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthrow new UserNotLoggedIn(\"you are not logged in!!\");\r\n\t\t}\r\n\r\n\t}", "public String printDetail(){\r\n\t\tString str=\"Room Details: \\n\";\r\n\t\tString str1=\"\";\r\n\t\tString str2=\"\";\r\n\t\tString str3=\"\";\r\n\t\tString str4=\"\";\r\n\t\tstr3=\"\\tSeats: \"+this.getNumSeats()+\"\\n\";\r\n\t\tif(this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tHas Whiteboard\\n \";\r\n\t\tif(!this.hasWhiteboard)\r\n\t\t\tstr1=\"\\tDoesn't have Whiteboard\\n\";\r\n\t\tif(this.hasChalkboard)\r\n\t\t\tstr2=\"\\tHas Chalkboard\\n \";\r\n\t\tif(!this.hasChalkboard)\r\n\t\t\tstr2=\"\\tDoen't have Chalkboard\";\r\n\t\tstr4=\"\\tAV Amenities: \"+this.getAVEquipmentList().toString()+\"\\n\";\r\n\t\tstr=str+str3+str1+str2+str4;\r\n\t\treturn str;\r\n\t}", "public String showRoomType()\r\n {\r\n return typeOfRoom + \"\\nAntall sengeplasser: \" + nrOfBedspaces + \"\\nSenger: \" + typeOfBeds;\r\n }", "private void printToolListMenu(Shop shop) {\n System.out.println(shop.getInventory());\n }", "public void printEquipments(ArrayList<Equipment> equipments) {\n\t\tint num = 1;\n\t\tSystem.out.println(\"Your ship's equipment(s): \");\n\t\tfor (Equipment equipment: equipments) {\n\t\t\tSystem.out.println(\"(\" + num + \") \" + equipment.getName());\n\t\t\tnum++;\n\t\t}\n\t}", "private void displayListOfRooms() {\n DatabaseReference roomsRef = FirebaseDatabase.getInstance().getReference(\"Rooms\");\n\n roomsRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // update rooms every time there's a change\n updateRooms(dataSnapshot);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "public void inventory() {\n\t\tList<Item> items = super.getItems();\n\n\t\tString retStr = \"Items: \";\n\t\tItem item;\n\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\titem = items.get(i);\n\t\t\tretStr += item.toString();\n\t\t\tif (i != items.size()-1)\n \t{\n\t\t\t\tretStr += \", \";\n \t}\n\t\t}\n\t\tretStr += \"\\nCapacity: \" + this.currentCapacity() + \"/\" + this.maxCapacity;\n\t\tSystem.out.println(retStr);\n\t}", "static private void showMissions() {\n\n Iterator iteratorMissionStatus = allMissions.missionStatus.entrySet().iterator();\n\n while (iteratorMissionStatus.hasNext()) {\n HashMap.Entry entry = (HashMap.Entry) iteratorMissionStatus.next();\n System.out.println((String) entry.getKey() + \": \");\n\n if ((boolean) (entry.getValue()) == false) {\n System.out.print(\"mission in progress\");\n System.out.println(\"\");\n }\n if ((boolean) (entry.getValue()) == true) {\n System.out.print(\"mission is complete\");\n System.out.println(\"\");\n }\n System.out.println(\"\");\n\n }\n }", "@Override\n public int getItemCount() {\n return restrooms.size();\n }", "public synchronized String printInventory(){\n String inventStr = \"\";\n\n for (int i = 0; i < titleList.size(); i++){\n inventStr += titleList.get(i) + \" \" + quantityList.get(i);\n if(i < titleList.size() - 1) {\n inventStr +=\"___\";\n }\n }\n return inventStr;\n }", "private void displayAll() {\n\t\tif(inventoryObject.totalNumCards() == 0) { // checks to see if there are 0 StockIndexCards\n\t\t\tSystem.out.println(\"The Inventory is empty\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\tSystem.out.println(inventoryObject.displayAll());\n\t\tgetUserInfo();\n\t\t}\n\t}", "public void printCarte() {\r\n\r\n\t\tSystem.out.println(\"Welcome to Yoyo-Restaurant <3\");\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"-<3----<3----<3----<3----<3----<3----<3----<3----<3----<3\");\r\n\t\tSystem.out.println(\"Our Menu \");\r\n\t\tfor (Menu menu : items) {\r\n\t\t\tmenu.print();\r\n\t\t}\r\n\r\n\t}", "public void showEmptySeats(){\n System.out.println(\"The following seats are empty: \");\n for (PlaneSeat seat:seat){\n if (! seat.isOccupied()){\n System.out.println(\"SeatID \" + seat.getSeatID());\n }\n }\n }", "public void printLocationInfo()\n {\n System.out.println(currentRoom.getLongDescription());\n System.out.println();\n }", "private static void displayMenu() {\n System.out.println(\"Menu : \");\n System.out.println(\"Type any number for selection\");\n for (int i = 1; i <= totalPlayers; i++) {\n System.out.println(i + \")View \" + playerList.get(i - 1) + \" cards\");\n }\n System.out.println(\"8)Display Each Player's Hand Strength\");\n System.out.println(\"9)Declare Winner\");\n System.out.println(\"10)Exit\");\n }", "private String formatOccupied(int roomNum) {\n\t\treturn String.format(\"| Occupied:\\t|\\t%s\\t\\t\\t\\t|\", convertBoolean(getHotel().getRoom(roomNum).isBooked()));\n\t}", "@Override\r\n public String toString() {\r\n String result = \"\";\r\n for (Map.Entry<Item, Integer> item : inventory.entrySet()) {\r\n if (item.getValue() == 0) {\r\n result += \"SOLD OUT\\n\";\r\n } else {\r\n result += item.getKey();\r\n }\r\n }\r\n return result;\r\n }", "private void printSearchToolIDMenu(Shop shop) {\n System.out.println(\"What is the ID of the tool you would like to look up?\");\n int itemId = receiveNumberInput();\n if (shop.searchInventory(itemId) == true) {\n System.out.println(itemId + \" is in the shop.\");\n } else {\n System.out.println(\"Tool does not exist or invalid input, please check spelling and try again.\");\n }\n }", "public void lookAround() {\n\t\t\tdisplay(\"The room is full of gold!\");\n\t\t}", "public void displayAllGuests(RoomList roomList) {\n\t\tSystem.out.println(\"Display All Current Guests By.....\\n\\t1. Lecturer\\n\\t Or\\n\\t2. Student\");\n\t\tint type = keyboard.nextInt();\n\t\tif(type == 1) {\t\t\t\t\t\t\t\t\t\t\t\t//if Lecturer print the start of the this screen\n\t\t\tSystem.out.println(\"\\n ALL LECTURERS CHECKED IN TO THE HOTEL\\n*******************************************\");\n\t\t}\n\t\telse if(type == 2) {\t\t\t\t\t\t\t\t\t\t//if student print the start of this screen\n\t\t\tSystem.out.println(\"\\n ALL STUDENTS CHECKED IN TO THE HOTEL\\n*******************************************\");\n\t\t}\n\n\t\tfor(Room r: roomList.getList()){\t\t\t\t\t\t\t//scan through all the rooms in the roomList\n\t\t\tif(!r.isEmpty(r)) {\t\t\t\t\t\t\t\t\t\t//if room has guest\n\t\t\t\tif(type == 1) {\t\t\t\t\t\t\t\t\t\t//if user picked guest type lecturer\n\t\t\t\t\tr.getNamesOfLecturers(r);\t\t\t\t\t\t//get all the lecturer names\n\t\t\t\t}\n\t\t\t\telse if(type == 2)\t\t\t\t\t\t\t\t\t//if user picked guest type student\n\t\t\t\t\tr.getNamesOfStudents(r);\t\t\t\t\t\t//get all the student names\n\t\t\t}\n\t\t\t//in here room is empty. not needed\n\t\t}\n\t}", "public String getItemsString()\n {\n String returnString =\"\";\n if(Inventory.isEmpty()){\n returnString = \"You are not holding any items\";\n } else {\n returnString = \"Items you are holding:\";\n String temp = \"\";\n for(Items item : Inventory.values()) {\n temp += \", \" + item.getName() ; \n }\n returnString += temp.substring(1);\n }\n return returnString;\n }", "private void getItems() {\n getComputers();\n getPrinters();\n }", "public static void printMenu(){\n System.out.print(\"1. List all writing groups\\n\" +\n \"2. List all the data for one writing group\\n\"+\n \"3. List all publishers\\n\"+\n \"4. List all the data for one publisher\\n\"+\n \"5. List all books\\n\"+\n \"6. List all the data for one book\\n\"+\n \"7. Insert new book\\n\"+\n \"8. Insert new publisher\\n\"+\n \"9. Remove a book\\n\"+\n \"10. Quit\\n\\n\");\n }", "private static void displayItems()\n {\n System.out.println(\"\\n\\tCurrent List of Products in the Store:\\n\");\n for(Sales s : store)\n System.out.println(s.toString());\n }", "public String seenPokemonMenu() {\n String rv = \"\";\n Iterator<PokemonSpecies> it = this.pokedex.iterator();\n while (it.hasNext()) {\n PokemonSpecies currentSpecies = it.next();\n rv += String.format(\"%s\\n\", currentSpecies.getSpeciesName());\n }\n return rv;\n }", "public String look() {\r\n currentRoom = player.getCurrentRoom();\r\n String res;\r\n res = currentRoom.getTitle() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getDescription() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getAvailableDirections() + System.getProperty(\"line.separator\");\r\n res += currentRoom.getMonstersToString();\r\n\r\n return res;\r\n }", "public void seekRooms () {\n\t\tint num = 0;//room number\n\t\tfor (int i=0; i<w; i++) {\n\t\t\tfor (int j=0; j<l; j++) {\n\t\t\t\tif (visited[i][j] == 0) {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t\tnum++;//room number start from 1\n\t\t\t\t\tdfs(i,j,num);\n\t\t\t\t\n\t\t\t\t\t//update the number of rooms and max room size\t\t\t\n\t\t\t\t\tmax = Math.max(max, cnt); \n\t\t\t\t\ttotal = num;\n\t\t\t\t\tmap.put(num, cnt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tfindMaxComb();// find the max size after breaking a wall!!!\n\t\t\n\t}", "public static void printMenu() {\n System.out.print(\"\\n(A)dd Item (R)emove Item (F)ind Item (I)nitialize Tree (N)ew Tree (Q)uit\\n\");\n }", "public void getStatus()\r\n {\r\n //if this person has no weapon or armor, these values are kept\r\n String weaponName = \"bare hands\";\r\n String armorName = \"none\";\r\n int weaponAtk = 0;\r\n int armorDef = 0;\r\n \r\n if (weapon!=null)\r\n {\r\n weaponName = weapon.getName();\r\n weaponAtk = weapon.getRating();\r\n }\r\n if (armor!=null)\r\n {\r\n armorName = armor.getName();\r\n armorDef = armor.getRating();\r\n }\r\n \r\n String itemList = \"\";\r\n for (Thing t : items)\r\n itemList += t.getName() + \", \";\r\n \r\n System.out.println(\"Health: \" + health + \"/\" + maxHealth + \"\\n\" +\r\n \"ATK: \" + attack + \"\\n\" +\r\n \"DEF: \" + defense + \"\\n\" +\r\n \"Weapon: \" + weaponName + \" (\" + weaponAtk + \" ATK\" + \")\" + \"\\n\" +\r\n \"Armor: \" + armorName + \" (\" + armorDef + \" DEF\" + \")\");\r\n }", "private void pickItem() \n {\n if(currentRoom.getShortDescription() == \"in the campus pub\" && i.picked3 == false)\n {\n i.item3 = true;\n i.picked3 = true;\n System.out.println(\"You picked a redbull drink\");\n }\n else if(currentRoom.getShortDescription() == \"in th hallway\" && i.picked2 == false)\n {\n i.item2 = true;\n i.picked2 = true;\n System.out.println(\"You picked a torch\");\n }\n else if(currentRoom.getShortDescription() == \"in the office\" && i.picked1 == false)\n {\n i.item1 = true;\n i.picked1 = true;\n System.out.println(\"You picked a pair of scissors\");\n }\n else\n System.out.println(\"There is no items in the room!\");\n }", "private void displayItem(){\n synchronized(this){\n for(ClientHandler client : clientArray){\n client.getOutput().println(\"\" + currentItem.getItem() +\n \" price starts at \" + currentItem.getStartingPrice() +\n \".\\n\");\n }\n }\n }", "public static void showAllRoomNotDuplicate(){\n showAllNameNotDuplicate(FuncGeneric.EntityType.ROOM);\n }", "private static void displayBag(String[] bag){\r\n for(int i=0; i<bag.length; i++){\r\n //Checks to see if slots 4, 8, or 12 are empty\r\n if((i == 4 || i == 8 || i == 12) && bag[i].equals(\"\")){\r\n System.out.print(\"\\n| \");\r\n System.out.print(\"-\");\r\n System.out.print(\" |\");\r\n //Checks if there is an item in slots 4, 8, or 12\r\n }else if (i == 4 || i == 8 | i == 12){\r\n System.out.print(\"\\n| \");\r\n System.out.print(bag[i]);\r\n System.out.print(\" |\");\r\n //Checks if all other slots are empty\r\n }else if(bag[i].equals(\"\")){\r\n System.out.print(\"| \");\r\n System.out.print(\"-\");\r\n System.out.print(\" |\");\r\n //All other slots have an item and is printed out\r\n }else{\r\n System.out.print(\"| \");\r\n System.out.print(bag[i]);\r\n System.out.print(\" |\");\r\n }\r\n }\r\n }", "public String toString()\n {\n String print = \"\";\n for (int x = 0; x < items.length; x++)\n if (items[x] != null)\n print = print + items[x] + \" \";\n return print;\n }", "public int getNumOfRoom() {\n\t\t\treturn RoomDetails.size();\r\n\t\t}", "public int getNumOfRooms() {\n return internalList.size();\n }", "static void printListOfWeapons(List<WeaponLM> weapons){\n for(WeaponLM weapon : weapons){\n System.out.print(weapon.getName());\n if(weapons.indexOf(weapon) != weapons.size()-1){\n System.out.print(\", \");\n }\n }\n }", "public String printPlayerInventory() {\r\n\t\t\tif(this.getPlayer().getInventory().getContent().isEmpty()) {\r\n\t\t\t\treturn \"You have no items in your inventory.\" + \"\\n\"\r\n\t\t\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight. \\n\"\r\n\t\t\t\t\t\t+ \"You have \" + this.getPlayer().getGold() + \" gold.\";\t\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\treturn \"Your \" + this.getPlayer().getInventory().printContent()\r\n\t\t\t\t+ \"You can carry \" + this.getPlayer().getCarryCapacity() + \" more units of weight. \\n\"\r\n\t\t\t\t\t\t+ \"You have \" + this.getPlayer().getGold() + \" gold.\";\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}", "void printNumberOfFilteredItems();", "public void printBookings(){\r\n\t\t//Treemap is used to sort the bookings into calendar order\r\n\t\tTreeMap<Calendar, Integer> m = new TreeMap<Calendar, Integer>();\r\n\t\tSet<Integer> booking = listBookings();\r\n\t\t\r\n\t\t//loops through getting each booking and puts it into the treemap\r\n\t\tfor (Integer id: booking){\r\n\t\t\tBooking b = bookings.get(id);\r\n\t\t\tm.put(b.start(), b.getLength());\r\n\t\t}\r\n\t\t\r\n\t\t//For each calendar in treemap it prints out the date and length of the booking\r\n\t\tSet<Calendar> cal = m.keySet();\r\n\t\tfor(Calendar c: cal) {\r\n\t\t\tprint(c);\r\n\t\t\tSystem.out.print(\" \" + m.get(c));\r\n\t\t}\r\n\t}", "public List<Item> getAllItemsAvailable();" ]
[ "0.81599957", "0.7428836", "0.68305725", "0.6738367", "0.67150116", "0.6657891", "0.6634443", "0.66262144", "0.65718013", "0.64732265", "0.6465732", "0.64261216", "0.64232993", "0.64127034", "0.63997394", "0.6274639", "0.6263678", "0.61974096", "0.61733353", "0.61642724", "0.6151615", "0.61456686", "0.6136455", "0.609902", "0.6088932", "0.6069789", "0.6062012", "0.6058454", "0.6042795", "0.6034953", "0.60215324", "0.60095227", "0.600167", "0.5986514", "0.59861785", "0.59851813", "0.5967966", "0.59388936", "0.59194666", "0.5905642", "0.59052813", "0.58953017", "0.5880473", "0.58666617", "0.5857548", "0.585504", "0.58534956", "0.582084", "0.58088124", "0.5776055", "0.57666", "0.5765984", "0.57369596", "0.57357", "0.5725187", "0.5724717", "0.5686746", "0.56775725", "0.5657708", "0.5642053", "0.56405765", "0.5631112", "0.5629415", "0.5615045", "0.561433", "0.5610328", "0.56003726", "0.55985403", "0.55917853", "0.5573987", "0.55688894", "0.55541444", "0.5550268", "0.554382", "0.5536674", "0.5532675", "0.552859", "0.55217797", "0.5518559", "0.5501997", "0.5498486", "0.54952544", "0.54943776", "0.54930085", "0.54842734", "0.5481258", "0.5480789", "0.5477024", "0.5466565", "0.5465321", "0.54650956", "0.5460608", "0.5458344", "0.5456751", "0.5442339", "0.54330885", "0.54261714", "0.54229325", "0.542021", "0.5417217" ]
0.759324
1
returns true if a sponsor name is contained within the SponsorSystem
public boolean containsKey(String sponsorName) { return this.containsKey(sponsorName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasOriginName();", "boolean containsStudentWith(String name);", "boolean hasBusinessName();", "boolean hasHasInstitutionName();", "public boolean containsSponsored(){\n for(int i=0; i<flightSponsored.size(); i++){\n if(flightSponsored.get(i).booleanValue()){\n return true;\n }\n }\n return false;\n }", "public void setSponsorName(String sponsorName) {\n this.sponsorName = sponsorName;\n }", "public void setSponsorName(String sponsorName) {\n this.sponsorName = sponsorName;\n }", "boolean hasSurname();", "private void searchSponsor() {\r\n String sponsorCode=null;\r\n try {\r\n CoeusSearch coeusSearch =\r\n new CoeusSearch(mdiForm, \"SPONSORSEARCH\",\r\n CoeusSearch.TWO_TABS_WITH_MULTIPLE_SELECTION );\r\n coeusSearch.showSearchWindow();\r\n javax.swing.JTable tblResultsTable = coeusSearch.getSearchResTable();\r\n if(tblResultsTable == null) return;\r\n int row = tblResultsTable.getSelectedRow();\r\n if(row!=-1){\r\n sponsorCode = (String)tblResultsTable.getValueAt(row, 0);\r\n sponsorCode = sponsorCode+\":\"+(String)tblResultsTable.getValueAt(row, 1);\r\n }else{\r\n CoeusOptionPane.showErrorDialog(\"Please select a Sponsor\");\r\n }\r\n } catch (Exception exception) {\r\n exception.printStackTrace();\r\n }\r\n int startRow = 0;\r\n TreePath root = new TreePath(sponsorHierarchyTree.getModel().getRoot());\r\n // Find the path (regardless of visibility) that matches the\r\n // specified sequence of names\r\n TreePath path = findByName(sponsorHierarchyTree, sponsorCode);\r\n if(path == null) {\r\n CoeusOptionPane.showInfoDialog(\"The sponsor:\"+sponsorCode.substring(0,sponsorCode.indexOf(\":\"))+\" is not found in this hierarchy.\");\r\n sponsorHierarchyTree.collapsePath(root);\r\n sponsorHierarchyTree.setSelectionPath(root);\r\n return;\r\n }\r\n sponsorHierarchyTree.expandPath(root);\r\n sponsorHierarchyTree.expandPath(path);\r\n sponsorHierarchyTree.setSelectionPath(path);\r\n sponsorHierarchyTree.scrollRowToVisible(sponsorHierarchyTree.getRowForPath(path));\r\n }", "@Override\n public boolean containsNameCurso(String Curso) {\n try {\n Curso curso = (Curso) this.findByNameCurso(Curso);\n if(Curso.equals(curso.getNombre())){\n return true;\n } ;\n } catch (Exception ex) {\n //Exception Handler\n }\n return false;\n }", "public String getSponsorName() {\n return sponsorName;\n }", "public String getSponsorName() {\n return sponsorName;\n }", "public void containsString() {\n\t\t\tString name = \"martin\";\n\t\t\tboolean contains = name.contains(\"rti\");\n\t\t\tif(contains) {\n\t\t\t\tSystem.out.println(\"it contains\");\n\t\t\t}\n\t\t}", "boolean contains(String name);", "boolean hasLocationNames();", "boolean isPartOf(String genomeName);", "public static boolean hasToken(String s) {\n\t\tboolean founded=false;\n\t\tfor(int i = 0 ; i < dataList.size() ; i ++ ) {\n\t\t\tif(dataList.get(i).name.equals(s)) {\n\t\t\t\t\n\t\t\t\tfounded = true;\n\t\t\t}\n\t\t}\n\t\treturn founded;\n\t}", "boolean hasCampaignName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "boolean hasName();", "public boolean isCompanyShortNameTaken(String shortName);", "public boolean contains(String str) {\n\t\t\n\t\tif (director.contains(str)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn super.contains(str);\n\t}", "public boolean hasSkill(String name)\r\n\t{\treturn this.skills.contains(name.toLowerCase());\t}", "public boolean containsCustomer(String c){\n\t\tfor (int i = 0; i < this.list.size(); i++){\n\t\t\tif( c.equals(list.get(i).getUsername()) ){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean containsTutor(final String name) {\n for (Tutor tutor : tutors) {\n if (name.equals(tutor.getName())) {\n return true;\n }\n }\n\n return false;\n }", "@SuppressWarnings(\"rawtypes\")\n\tpublic boolean isNameInUse(String name,String idOwner)\n\t{\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(name);\n\t\t\tQuery query=DB.query();\n\t\t\tquery.constrain(Census.class);\n\t\t\tquery.descend(\"idOwner\").constrain(idOwner);\n\t\t\tquery.descend(\"censusName\").constrain(name).endsWith(false);\n\t\t\t\n\t\n\t\t\t\n\t\t\tObjectSet result=query.execute();\n\t\t\t\n\t\t\tif(result.hasNext())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}", "private boolean contains(String name, AssassinNode current) {\n while (current != null) {\n if (current.name.equalsIgnoreCase(name)) {\n return true;\n } else {\n current = current.next;\n }\n }\n return false;\n }", "public boolean isContainedIn(String source) {\n return containsWord(source);\n }", "public boolean isSubscriber(String retailerName) {\n\t\t// begin\n\t\treturn subscribers.contains(retailerName);\n\t\t// end\n\t\t// return false;\n\t}", "public boolean hasSrsName() {\n\t\treturn this.hasSrsName;\n\t}", "public boolean nameSchonVorhanden(String name) {\n List<Benutzer> alleBenutzer = getAllBenutzer();\n\n for (Benutzer benutzer : alleBenutzer) {\n if (benutzer.getBenutzerName().equals(name)) {\n return true;\n }\n }\n return false;\n }", "boolean hasSsn();", "public static boolean contains(String name, Timeable caller) {\n\t\tNameAndCaller nac = new NameAndCaller(name, caller);\n\t\treturn clocks.containsKey(nac);\n\t}", "public boolean contains(String query) {\n query = query.toLowerCase();\n for (PersonInfo personInfo : info) {\n if (personInfo.getRight().toLowerCase().contains(query)) {\n return true;\n }\n }\n return name.toLowerCase().contains(query)\n || (title != null && title.toLowerCase().contains(query))\n || pictureUrl.toLowerCase().contains(query)\n || id.toLowerCase().contains(query);\n }", "@Override\n public boolean equals(Object o) {\n if (this == o) {\n return true;\n }\n if (!(o instanceof Sponsor)) {\n return false;\n }\n return id != null && id.equals(((Sponsor) o).id);\n }", "boolean hasAttackerRoleName();", "private boolean searchSystem(String name) {\n for (ExternalSystem system : connectedExternalSystems) {\n if (system.getSystemName().equals(name)){\n return true;\n }\n }\n\n return false;\n }", "private boolean isContactExist(String name) {\n boolean existance;\n existance = contactList.stream()\n .anyMatch(personElement ->\n personElement.getFirstName().equals(name) ||\n personElement.getLastName().equals(name));\n return existance;\n }", "public boolean isSetFromName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMNAME$4) != 0;\n }\n }", "public boolean contains(String i){\r\n return stream().anyMatch(item -> (item.name.endsWith(i)));\r\n }", "public boolean isSetFriendlyName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(FRIENDLYNAME$2) != 0;\r\n }\r\n }", "private boolean contains(List<SystemDef> systemDefs, SystemDef systemDef) {\n for (SystemDef sd : systemDefs) {\n if (systemDef.getName().equals(sd.getName()))\n return true;\n }\n return false;\n }", "private boolean containsName(String name, Human ... human) {\n boolean result = false;\n\n for(Human h : human) {\n if(h.getName().toLowerCase().contains(name.toLowerCase())) {\n result = true;\n break;\n }\n }\n\n return result;\n }", "private boolean isTenantValid(String s) {\n\n for (int i = 0; i < tenantFullNames.size(); i++) {\n if (tenantFullNames.get(i).matches(s.trim())) {\n addedTenant = tenantList.get(i);\n return true;\n }\n }\n return false;\n }", "public boolean owns(String establishment) {\n for (int i = 0; i < Establishments.size(); i++) {\n if (Establishments.get(i).getName().equals(establishment)) {\n return true;\n }\n }\n return false;\n }", "public boolean contains(String target){\n\t\treturn list.contains(target);\n\t}", "public boolean containsKey(String n){\n\t\treturn name.containsKey(n);\n\t}", "private boolean hasCardNumber(String smsBody) {\n return smsBody.contains(getCardNumber());\n }", "public boolean matches(String name) {\n return aliases.contains(name);\n }", "public boolean containsSearchKey(String key) {\n if (this.name.toLowerCase().contains(key) || this.name.toLowerCase().contains(Dictionary.parseKey(key))) {\n return true;\n }\n if (this.address.toLowerCase().contains(key) || this.address.toLowerCase().contains(Dictionary.parseKey(key))) {\n return true;\n }\n return this.faculty.toLowerCase().contains((key))\n || this.faculty.toLowerCase().contains(Dictionary.parseKey(key));\n }", "public boolean exists()\n\t{\n\t\tArrayList<Customer> customerList = ReadFile.getCustomerList(); \n\t\t\n\t\t// ensure that the list is not empty\n\t\tif ( customerList == null || customerList.isEmpty() )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString lastName = this.getLastName();\n\t\tString firstName = this.getFirstName();\n\t\tString phoneNumber = this.getPhoneNumber();\n\t\tString zipCode = this.getZipCode();\n\t\t\n\t\tfor (Customer c : customerList)\n\t\t{\n\t\t\tif ( c.getLastName().equalsIgnoreCase(lastName) &&\n\t\t\t\t\tc.getFirstName().equalsIgnoreCase(firstName) &&\n\t\t\t\t\tc.getPhoneNumber().equals(phoneNumber) &&\n\t\t\t\t\tc.getZipCode().equals(zipCode) )\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean contains(Town town) {\r\n\t\tboolean containTown = false;\r\n\t\t\r\n\t\tif(source.getName() == town.getName() || destination.getName() == town.getName()) {\r\n\t\t\tcontainTown = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn containTown;\r\n\t\t\r\n\t}", "protected boolean containsName(String full, String prefixes) {\n String[] prefixArray = StringUtils.split(prefixes, \",\");\n for (String prefix : prefixArray) {\n if (StringUtils.startsWith(full, StringUtils.trimToEmpty(prefix))) {\n return true;\n }\n }\n return false;\n }", "public boolean contains(String str);", "private boolean searchName(String username, ArrayList<String> existingList) {\n int low = 0;\n int high = existingList.size() - 1;\n int mid;\n\n while (low <= high) {\n mid = (low + high) / 2;\n String name = existingList.get(mid);\n String substr = name.substring(0, name.indexOf(\" \"));\n\n if (substr.compareToIgnoreCase(username) < 0) {\n low = mid + 1;\n } else if (substr.compareToIgnoreCase(username) > 0) {\n high = mid - 1;\n } else {\n return true;\n }\n\n }\n\n return false;\n }", "private void showSponsorInfo(){\r\n if (txtSponsorCode.getText().equals(\"\") ){\r\n showSponsorSearch();\r\n }else {\r\n SponsorMaintenanceForm frmSponsor = new SponsorMaintenanceForm('D',\r\n txtSponsorCode.getText().toString().trim());\r\n frmSponsor.showForm(mdiForm,DISPLAY_TITLE,true);\r\n \r\n }\r\n isSponsorSearchRequired =false;\r\n }", "public boolean isSetOriginName() {\n return this.originName != null;\n }", "protected boolean existArtist(String s){\n\t\treturn this.artistName.matches(\"^.*(?i)\"+s+\".*$\");\n\t}", "public static boolean in(String strs, String str) {\n\treturn null != strs && null != str && Arrays.asList(strs.split(\",\")).contains(str);\n }", "public boolean hasCampaignName() {\n return campaignNameBuilder_ != null || campaignName_ != null;\n }", "boolean hasVenue();", "public boolean contains(String searchTerm){\n\t\tsearchTerm = searchTerm.toUpperCase();\n\t\tString upperName = this.name.toUpperCase();\n\t\tString upperLocation = this.location.toUpperCase();\n\t\tString upperDescription = this.desc.toUpperCase();\n//\t\tString upperTag = this.tag.toUpperCase();\n\t\t\n\t\tboolean nameMatch = upperName.contains(searchTerm);\n\t\tboolean locationMatch = upperLocation.contains(searchTerm);\n\t\tboolean descMatch = upperDescription.contains(searchTerm);\n//\t\tboolean tagsMatch = upperTag.contains(searchTerm);\n\t\t\n\t\t\n\t\treturn\n\t\t\tnameMatch ||\n\t\t\tlocationMatch ||\n\t\t\tdescMatch;\n//\t\t\ttagsMatch;\n\t}", "boolean hasCompany();", "public boolean isLeadPresent(String firstName, String lastName) {\n\t\tBy LeadXpath = By.xpath(\"//table[@class='list view']/descendant::\"\n\t\t\t\t+ \"a[contains(text(),'\" + firstName + \" \" + lastName + \"')]\");\n\t\treturn actionbot.isElementPresent(LeadXpath);\n\t}", "public Long getSponsorId() {\n return sponsorId;\n }", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$8) != 0;\n }\n }", "boolean belongsTo(String stringa) {\n\t\t stringGenerator.reinit();\n\t\t String current;\n\t\t do {\n\t\t\t current = stringGenerator.next();\n\t\t\t if (ric.belongsTo(current)) {\n\t\t\t\t if(current.equals(stringa)){\n\t\t\t\t \treturn true;\n\t\t\t\t }\n\t\t\t\t if(SLO.compare(current, stringa) > 0){\n\t\t\t\t \treturn false;\n\t\t\t\t }\n\t\t\t }\n\t\t }while (true);\n\t}", "public boolean isNamed(String n) {\n return name.equals(n);\n }", "public boolean contains(String sequence) {\r\n return (depthFirstSearch(sequence).size() != 0);\r\n }", "public boolean hasCampaignName() {\n return campaignName_ != null;\n }", "private boolean hasAccountNumber(String smsBody) {\n return smsBody.contains(getAccountNumber());\n }", "public boolean checkUserNameIsOccupied(String name) {\n \t\tif (users.size() != 0) {\n \t\t\tfor (int i = 0; i < users.size(); i++) {\n \t\t\t\tif (name.equals(users.get(i).getName())) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn false;\n \t}", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }", "public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }", "public boolean hasSurname() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "boolean hasTargetPlayerName();", "boolean hasSenderName();", "boolean hasSenderName();", "public boolean contains(Item i){\r\n return stream().anyMatch(item -> item.name.endsWith(i.name));\r\n }" ]
[ "0.665353", "0.6406481", "0.63618827", "0.63167036", "0.6294984", "0.6275359", "0.6275359", "0.62684834", "0.62113893", "0.62055886", "0.6196074", "0.6196074", "0.6194259", "0.61330044", "0.61286443", "0.59882337", "0.5983769", "0.5981538", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5973038", "0.5953332", "0.58699137", "0.5790154", "0.5732782", "0.5711911", "0.5710124", "0.57082295", "0.5684626", "0.56820947", "0.56346446", "0.559228", "0.5575106", "0.55708706", "0.5557686", "0.5550017", "0.55141306", "0.5507595", "0.5504029", "0.5495651", "0.54585034", "0.54492927", "0.54480195", "0.5439795", "0.5393249", "0.53883684", "0.5367357", "0.5360245", "0.5336586", "0.53355426", "0.53344333", "0.53255814", "0.53193855", "0.5314872", "0.5309363", "0.53038436", "0.5302383", "0.5296245", "0.529338", "0.5288642", "0.5280412", "0.5270761", "0.5266825", "0.52616245", "0.52516484", "0.52468234", "0.52370644", "0.5230011", "0.5222402", "0.5210686", "0.5204991", "0.5198891", "0.51985514", "0.5198259", "0.5198259", "0.51965666", "0.5194794", "0.5192552", "0.5192552", "0.5190167" ]
0.7262949
0
adds or updates a sponsor with a rate if the rate is less than 0 or greater than 0.1, then an InvalidRateException will be thrown OR if a sponsor's rate was lower than their previous, then the a LowerRateException will be thrown
public void updateRate(String sponsorName, Double newRate) throws LowerRateException, InvalidRateException { if (newRate < 0.0 || newRate > 0.1) { throw new InvalidRateException(newRate); } else if (sponsors.containsKey(sponsorName)) { if (newRate < sponsors.get(sponsorName)) { throw new LowerRateException(sponsors.get(sponsorName), newRate); } } else { sponsors.put(sponsorName, newRate); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void updateRate(Rates rates) {\n\t\tsession.saveOrUpdate(rates);\r\n\t\tsession.beginTransaction().commit();\r\n\t}", "public void setRate(int rate) { this.rate = rate; }", "public void setRate(double newRate) {\n this.rate = newRate;\n }", "@Override\n public RateDTO updateRate(RateDTO rateDTO) {\n Rate rate = modelMapper.map(rateDTO, Rate.class);\n return modelMapper.map(rateRepository.save(rate), RateDTO.class);\n }", "public void setRate(Integer rate) {\r\n this.rate = rate;\r\n }", "@Override\n public RateDTO addRate(RateDTO rateDTO) {\n Rate rate = modelMapper.map(rateDTO, Rate.class);\n return modelMapper.map(rateRepository.save(rate), RateDTO.class);\n }", "ExchangeRate saveOrUpdate(ExchangeRate rate);", "public void setSponsorName(String sponsorName) {\n this.sponsorName = sponsorName;\n }", "public void setSponsorName(String sponsorName) {\n this.sponsorName = sponsorName;\n }", "Rate save(Rate u);", "public void setRate(float rate) {\n\t\tthis.rate = rate;\n\t}", "public void setRate(String rate) {\r\n for (int index = 0; index < RATES.length; ++index){\r\n if (RATES[index].equals(rate)) {\r\n Rate = index;\r\n }\r\n }\r\n }", "public void setShipmentRate(int shipmentRate) {\n this.shipmentRate = Float.valueOf(shipmentRate);\n }", "public void updateRate(double r){\r\n rate *= r;\r\n }", "public void setRate(double annualRate) {\nmonthlyInterestRate = annualRate / 100.0 / MONTHS;\n}", "public void applyInterest(double rate) {\n if ((rate > 0) && (balance < 0)) {\n withdraw((int) (-balance*rate));\n } \n if ((rate > 0) && (balance > 0)) {\n deposit((int) (balance*rate));\n }\n }", "public RateModel(final String iCurrency, final Double iRate, final Integer iSource) {\n this.name = iCurrency;\n this.rate = iRate;\n this.source = iSource;\n this.time = new Date();\n }", "public static void rateMarket(Supermarket supermarket, int rating_no, double new_quality) throws SQLException {\r\n\t\tPreparedStatement statement = null;\r\n\t\tString query;\r\n\t\ttry {\r\n\t\t\tquery = \"UPDATE CS_MARKETS\" +\" SET MARKET_REVNO=?, MARKET_QUALITY=? WHERE MARKET_NAME=?\";\r\n\t\t\tstatement = JdbcCommon.connection.prepareStatement(query);\r\n\t\t\tstatement.setInt(1, rating_no);\r\n\t\t\tstatement.setDouble(2, new_quality);\r\n\t\t\tstatement.setString(3, supermarket.getSuper_name());\r\n\t\t\tstatement.executeUpdate();\t\r\n\t\t} catch (SQLException e) {e.printStackTrace();}\r\n\t\tstatement.close();\r\n\t}", "public void updateAmount(double amount, Double rate){\r\n\t\t\tcurrencyAmount = currencyAmount + amount;\r\n\t\t\tdefaultCurrencyAmount = rate == null ? 0 : defaultCurrencyAmount + amount * rate.doubleValue();\r\n\t\t}", "public void setRate();", "public DepreciatingPolicy(float amount, float rate){\r\n super(amount);\r\n this.rate = rate*100;\r\n }", "@Test\n public void testAddNewRate() {\n System.out.println(\"addNewRate\");\n int rate = 0;\n RateList instance = new RateList();\n Rate expResult = new Rate(0);\n Rate result = instance.addNewRate(rate);\n assertEquals(expResult, result);\n }", "public void sendeRate(String spieler);", "public Builder setRate(int value) {\n \n rate_ = value;\n onChanged();\n return this;\n }", "public static double getRate(int GivenCreditScore) throws RateException\r\n\t{\n\t\t\r\n\t\tArrayList <RateDomainModel> aRates = new ArrayList <RateDomainModel> (RateDAL.getAllRates());\r\n\t\tdouble finishediRate = 0;\r\n\t\tfor(RateDomainModel Rate : aRates) {\r\n\t\t\tif(GivenCreditScore == Rate.getiMinCreditScore()) {\r\n\t\t\t\tfinishediRate = Rate.getdInterestRate();\r\n\t\t\t}\r\n\t\t\telse if (aRates.contains(Rate.getdInterestRate())){\r\n\t\t\t\t//If rate is matching pre-existing rate, keep calm and carry on\r\n\t\t\t\tcontinue;\t\r\n\t\t\t}\r\n\t\t\telse { //If rate does not match with anything provided, throw the exception we wrote out.\r\n\t\t\t\tthrow new RateException();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//TODO - RocketBLL RateBLL.getRate\r\n\t\treturn finishediRate;\r\n\t\t\r\n\t\t\r\n\t}", "Rate initRate(Rate iRate)\n {\n iRate.updateElementValue(\"Rate\");\n return iRate;\n }", "public void setCommissionRate(double commissionRate) {\n if(commissionRate <= 0.0 || commissionRate >= 1.0)\n throw new IllegalArgumentException(\"Commsiion rate must be between 0.0 and 1.0\");\n\n this.commissionRate = commissionRate;\n }", "public int setRate(int rateToServer){\r\n\t\tint resultOfRate=1;\r\n\t\t//! send rate to server and check if ok.\r\n\t\tFLAG_RATED=true;\r\n\t\treturn resultOfRate;\r\n\t}", "public void addActivityRates(ActivityRates activityRates) {\n jdbcTemplate.update(\"INSERT INTO Activity_rates VALUES(?, ?, ?)\",\n activityRates.getIdActivity(), activityRates.getRateName(), activityRates.getPrice());\n }", "public abstract void setRate();", "private void checkCommissionRate(double commissionRate) throws ValueOutOfRangeException {\n if (commissionRate < 0 || commissionRate > 1) {\n throw new ValueOutOfRangeException(\"Commission rate has to be between 0 and 1.\");\n }\n }", "public static void rate(Long propID, String userID, Integer newRatingValue)\r\n\t\t\tthrows ServiceException {\r\n\t\tRating rating = ofy.find(Rating.class, buildID(userID, propID));\r\n\r\n\t\t/*\r\n\t\t * if there was no previous rating and the new value indicates a rating\r\n\t\t * deletion, or if the previous rating and the new rating are the same,\r\n\t\t * then there is nothing to do. So, notify the client that it sent a\r\n\t\t * pointless update.\r\n\t\t */\r\n\t\tif ((rating == null && newRatingValue == null)\r\n\t\t\t\t|| ((rating != null && newRatingValue != null) && rating.eval == newRatingValue\r\n\t\t\t\t\t\t.intValue())) {\r\n\t\t\tthrow new ServiceException(\"cannot update rating: old rating (\"\r\n\t\t\t\t\t+ rating.eval + \") is the same as new rating (\"\r\n\t\t\t\t\t+ newRatingValue + \")\");\r\n\t\t}\r\n\r\n\t\tLock lock = Lock.getNodeLock(propID);\r\n\t\ttry {\r\n\t\t\tlock.lock();\r\n\r\n\t\t\tProposition prop = ofy.get(Proposition.class, propID);\r\n\r\n\t\t\t/* if the user has previously rated back out previous rating */\r\n\t\t\tif (rating != null) {\r\n\t\t\t\tprop.ratingSum -= rating.eval;\r\n\t\t\t\tprop.ratingCount--;\r\n\t\t\t}\r\n\t\t\t/*\r\n\t\t\t * otherwise create a new rating object to hold new rating (note\r\n\t\t\t * that in the case where rating == null we always need a new rating\r\n\t\t\t * object here because we have ruled out the case where both rating\r\n\t\t\t * == null and newRatingValue == null by throwing the exception\r\n\t\t\t * above)\r\n\t\t\t */\r\n\t\t\telse {\r\n\t\t\t\trating = new Rating();\r\n\t\t\t\trating.setID(userID, propID);\r\n\t\t\t}\r\n\r\n\t\t\tif (newRatingValue != null) {\r\n\t\t\t\t/* update the proposition with the new evaluation */\r\n\t\t\t\tprop.ratingSum += newRatingValue;\r\n\t\t\t\tprop.ratingCount++;\r\n\r\n\t\t\t\t/* save the new evaluation */\r\n\t\t\t\trating.eval = newRatingValue;\r\n\t\t\t\tofy.put(rating);\r\n\t\t\t} else {\r\n\t\t\t\t/*\r\n\t\t\t\t * if newRatingValue == null we need to delete the rating object\r\n\t\t\t\t * (note this will only happen when there was already a rating\r\n\t\t\t\t * object in the database because we ruled out the possibility\r\n\t\t\t\t * of (rating == null && newRating == null) by throwing\r\n\t\t\t\t * exception above)\r\n\t\t\t\t */\r\n\t\t\t\tofy.delete(rating);\r\n\t\t\t}\r\n\t\t\t/*\r\n\t\t\t * notice that I do not call the ArgMapServiceImpl.updateNode()\r\n\t\t\t * function here because I do not want to have the updated time\r\n\t\t\t * change. The updated time is used by the live refresh system to\r\n\t\t\t * determine when a client refresh is needed, and I don't want to\r\n\t\t\t * trigger a client refresh because, at the moment I'm not even\r\n\t\t\t * sending the ratingSum to the client (and don't plan to) (it's\r\n\t\t\t * marked 'transient', so it doesn't get sent.)\r\n\t\t\t */\r\n\t\t\tofy.put(prop);\r\n\r\n\t\t\t/*\r\n\t\t\t * TODO need to queue a task to recalculate the scores for all the\r\n\t\t\t * nodes that depend on this node's score or average rating.\r\n\t\t\t */\r\n\t\t} finally {\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}", "public synchronized void sponsor(final Operation sponsor, final Account account, final Lock lock) {\r\n\r\n\t\ttry {//tenta colocar a thread em sleep com o valor padrao definido, caso nao consiga, interrompe a thread e imprime o codigo da excecao\r\n\t\t\tThread.sleep((15000));\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tThread.currentThread().interrupt();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//trava, verifica se o saldo é igual a zero, adiciona a quantia determinada, printa as informacoes e por fim destrava a conta\r\n\t\tlock.lock();\r\n\t\ttry {//tenta colocar a thread em sleep com o valor padrao definido, caso nao consiga, interrompe a thread e imprime o codigo da excecao\r\n\t\t\tif(account.getBalance() == 0) {\r\n\t\t\t\taccount.setBalance(account.getBalance() + sponsor.getPull());\r\n\t\t\t\tsponsor.setNumberOfPulls(sponsor.getNumberOfPulls() + 1);\r\n\t\t\t\tsponsor.setBalance(sponsor.getBalance() - sponsor.getPull());\r\n\t\t\t\tSystem.out.println(\"\\n\\nThread: \" + Thread.currentThread().getName() + \" - Accounts new Balance: \" + account.getBalance());\r\n\t\t\t\tSystem.out.println(\"Threads new Balance: \" + sponsor.getBalance() + \"\\n\\n\");\r\n\t\t\t\tthreadSync(sponsor, account);\r\n\t\t\t}\r\n\r\n\t\t} finally {//destrava a conta para uso de outras threads\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}", "private void givenExchangeRateExistsForABaseAndDate() {\n }", "public static void updatePayRate(Statement stmt, String empID, double payRate) throws SQLException{\r\n //create an update statement to update the payrate\r\n //for the specified employee ID\r\n String sqlStatement = \"UPDATE Employee \" +\r\n \"SET HOURLYPAYRATE = \" + Double.toString(payRate) +\r\n \"WHERE EmpID = '\" + empID + \"'\";\r\n\r\n //Send the UPDATE statement to the DBMS\r\n int rows = stmt.executeUpdate(sqlStatement);\r\n\r\n //display the results\r\n System.out.println(rows + \" row(s) updated.\");\r\n }", "public interface IRate {\n\t\n\t//writing the class outline\n\tpublic void setRate();\n\tpublic void increaseRate();\n}", "void addRating(Rating2 rating2);", "public abstract void setDiscountRate(double discountRate);", "@Override protected double convertRate(double rate) {\n return super.convertRate(rate);\n }", "@Then(\"rate gets updated with new rating\")\n\tpublic void rate_gets_updated_with_new_rating() {\n\t throw new io.cucumber.java.PendingException();\n\t}", "protected float computeUpdateRate(float senderupdateRate, float senderDesiredUR){\n float oldMax1 = this.updateRate;\n float oldMax2 = senderupdateRate;\n float maxRateAvg = (this.updateRate + senderupdateRate) / 2;\n if (this.desiredUR + senderDesiredUR <= this.updateRate + senderupdateRate){\n float delta = this.updateRate + senderupdateRate - this.desiredUR - senderDesiredUR;\n this.updateRate = this.desiredUR + delta / 2;\n senderupdateRate = senderDesiredUR + delta / 2;\n }else { // this.desiredUR + senderDesiredUR > this.updateRate + sender updateRate\n if (this.desiredUR >= maxRateAvg && senderDesiredUR >= maxRateAvg){\n // the participants both get the same value\n this.updateRate = senderupdateRate = maxRateAvg;\n }else if (this.desiredUR < maxRateAvg){\n senderupdateRate = this.updateRate + senderupdateRate - this.desiredUR;\n this.updateRate = this.desiredUR;\n }else{ // senderDesiredUR < maxRateAvg\n this.updateRate = this.updateRate + senderupdateRate - senderDesiredUR;\n senderupdateRate = senderDesiredUR;\n }\n }\n\n // in case we were not updating before and the new updateRate is > 0. Need to start updating again.\n if (oldMax1 == 0 && this.updateRate > 0){\n scheduleUpdateTimeout(Math.round(1000/this.updateRate), TimeUnit.MILLISECONDS);\n }\n\n return senderupdateRate;\n }", "public void setInterestRate(double newInterestRate)\n {\n if (!(newInterestRate >= 0.0))\n {\n System.err.println(\"Interest rate must be positive.\");\n }\n else\n {\n this.interestRate = newInterestRate;\n }\n }", "void investmentEditBond(String bondName, String year, String rate, Ui ui)\n throws BankException, BondException {\n throw new BankException(\"This account does not support this feature\");\n }", "@Override\r\n\tpublic void updateDriverRate(int score, String driverID) {\n\t\t\r\n\t}", "public void setBuyerRateStatus(Integer buyerRateStatus) {\n this.buyerRateStatus = buyerRateStatus;\n }", "public void setInterest(double rate)\n {\n interestRate = rate;\n }", "public void setSellerRateStatus(Integer sellerRateStatus) {\n this.sellerRateStatus = sellerRateStatus;\n }", "public void setSponsorId(Long sponsorId) {\n this.sponsorId = sponsorId;\n }", "public void addRating(double points) {\n rating += points;\n }", "public Builder addRate2(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureRate2IsMutable();\n rate2_.add(value);\n onChanged();\n return this;\n }", "public interface CurrencyRatesUpdater {\n\n public static final String ERROR_CONNECTING = \"ERROR_CONNECTING\";\n public static final String ERROR_RESPONSE = \"ERROR_RESPONSE\";\n public static final String ERROR_UNKNOWN = \"ERROR_UNKNOWN\";\n\n public ResponseRateUpdate getRate(String fromCurrencyCode, String toCurrencyCode);\n\n public class ResponseRateUpdate {\n\n public ResponseRateUpdate() {\n }\n\n public ResponseRateUpdate(Double rateValue, Date rateDate) {\n this.rateValue = rateValue;\n this.rateDate = rateDate;\n }\n\n public ResponseRateUpdate(String error) {\n this.error = error;\n }\n\n private Double reverseRateValue;\n private Double rateValue;\n private Date rateDate;\n private String error;\n\n public Double getRateValue() {\n return rateValue;\n }\n\n public void setRateValue(Double rateValue) {\n this.rateValue = rateValue;\n }\n\n public Date getRateDate() {\n return rateDate;\n }\n\n public void setRateDate(Date rateDate) {\n this.rateDate = rateDate;\n }\n\n public Double getReverseRateValue() {\n return reverseRateValue;\n }\n\n public void setReverseRateValue(Double reverseRateValue) {\n this.reverseRateValue = reverseRateValue;\n }\n\n public String getError() {\n return error;\n }\n\n public void setError(String error) {\n this.error = error;\n }\n }\n}", "public static void addRating(Vendor vendor, Rating rating, User user)\n throws EnvoyServletException\n {\n try\n {\n ServerProxy.getVendorManagement().addRating(user, vendor, rating);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }", "public static void updateRating(Vendor vendor, Rating rating, User user)\n throws EnvoyServletException\n {\n try\n {\n ServerProxy.getVendorManagement()\n .updateRating(user, vendor, rating);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }", "private void getSponsorInfo(String sponsorCode){\r\n int resultConfirm =0;\r\n /**\r\n * Updated for REF ID :0003 Feb'21 2003.\r\n * Hour Glass implementation while DB Trsactions Wait\r\n * by Subramanya Feb' 21 2003\r\n */\r\n if( dlgWindow != null){\r\n dlgWindow.setCursor( new Cursor( Cursor.WAIT_CURSOR ) );\r\n }\r\n String sponsorName = rldxController.getSponsorName(sponsorCode);\r\n //Added for COEUSQA-1434 : Add the functionality to set a status on a Sponsor record - start\r\n String sponsorStatus = rldxController.getSponsorStatus();\r\n //Added for COEUSQA-1434 : Add the functionality to set a status on a Sponsor record - end\r\n if( dlgWindow != null ){\r\n dlgWindow.setCursor( new Cursor( Cursor.DEFAULT_CURSOR ) );\r\n }\r\n \r\n //Commented for case#3341 - Sponsor Code Validation - start\r\n// lblSponsorName.setText( trimSponsorName( sponsorName ) );\r\n// txtOrganization.requestFocus();\r\n //Commented for case#3341 - Sponsor Code Validation - end\r\n if ((sponsorName != null) && (!sponsorName.trim().equals(\"\")) && ! INACTIVE_STATUS.equalsIgnoreCase(sponsorStatus)){\r\n //Added for case#3341 - Sponsor Code Validation - start\r\n lblSponsorName.setText(trimSponsorName(sponsorName));\r\n txtOrganization.requestFocus();\r\n //Added for case#3341 - Sponsor Code Validation - end \r\n if ( (!txtOrganization.getText().trim().equals(\"\")) &&\r\n ( !sponsorName.equals(txtOrganization.getText().trim()) ) ){\r\n String msgStr = \"Do you want to overwrite the organization: \" +\r\n txtOrganization.getText().trim() + \" with \" + sponsorName + \"?\";\r\n resultConfirm = CoeusOptionPane.showQuestionDialog(msgStr,\r\n CoeusOptionPane.OPTION_YES_NO,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (resultConfirm == 0) {\r\n txtOrganization.setText(sponsorName.trim());\r\n }\r\n \r\n }else {\r\n txtOrganization.setText(sponsorName.trim());\r\n //do nothing\r\n }\r\n if (!txtSponsorCode.getText().trim().equals(\"\") ) {\r\n if ( !txtAddress1.getText().trim().equals(\"\") ||\r\n !txtAddress2.getText().trim().equals(\"\") ||\r\n !txtAddress3.getText().trim().equals(\"\") ||\r\n !txtCity.getText().trim().equals(\"\") ||\r\n !txtCounty.getText().trim().equals(\"\") ||\r\n //Commented for Case#4252 - Rolodex state dropdown associated with country - Start\r\n// !((ComboBoxBean)cmbCountry.getItemAt(\r\n// cmbCountry.getSelectedIndex())).getCode().trim().equals(\"USA\") ||\r\n //Case#4252 - End\r\n !txtPostalCode.getText().trim().equals(\"\") ||\r\n !txtPhone.getText().trim().equals(\"\") ||\r\n !txtEMail.getText().trim().equals(\"\") ||\r\n !txtFax.getText().trim().equals(\"\") ) {\r\n \r\n String msgStr =\r\n coeusMessageResources.parseMessageKey(\r\n \"roldxMntDetFrm_confirmationCode.1145\");\r\n resultConfirm = CoeusOptionPane.showQuestionDialog(msgStr,\r\n CoeusOptionPane.OPTION_YES_NO,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (resultConfirm == 0) {\r\n /* prompt the user for replacing base address on\r\n * confirmation replace the address\r\n */\r\n replaceWithSponsorBaseAdress(sponsorCode);\r\n }\r\n }else {\r\n replaceWithSponsorBaseAdress(sponsorCode);\r\n }\r\n }\r\n //Added for case#3341 - Sponsor Code Validation\r\n txtOrganization.requestFocus(); \r\n //Added for case#3341 - Sponsor Code Validation - start \r\n }else{\r\n lblSponsorName.setText(\"\");\r\n txtSponsorCode.setText(\"\");\r\n txtSponsorCode.requestFocus(); \r\n //Added for COEUSQA-1434 : Add the functionality to set a status on a Sponsor record - start\r\n txtOrganization.setText(CoeusGuiConstants.EMPTY_STRING); \r\n txtAddress1.setText(CoeusGuiConstants.EMPTY_STRING);\r\n txtAddress2.setText(CoeusGuiConstants.EMPTY_STRING);\r\n txtAddress3.setText(CoeusGuiConstants.EMPTY_STRING);\r\n //Added for COEUSQA-1434 : Add the functionality to set a status on a Sponsor record - end\r\n CoeusOptionPane.showInfoDialog(\r\n coeusMessageResources.parseMessageKey(\"roldxMntDetFrm_exceptionCode.1108\")); \r\n }\r\n //Added for case#3341 - Sponsor Code Validation - end\r\n isSponsorInfoRequired =false;\r\n //Commented for case#3341 - Sponsor Code Validation\r\n //txtOrganization.requestFocus(); \r\n }", "public Rate() {\n this(\"Rate\", null);\n }", "public void setHourlyRate(double newPayRate){\r\n if(newPayRate>=MINIMUMWAGE)\r\n hourlyRate = newPayRate;\r\n else\r\n throw new IllegalArgumentException(\"The hourly rate must be greater than or equal to\"+MINIMUMWAGE);\r\n }", "public boolean setRateLimit (String sliceName, String rate) \n\t\t\tthrows PermissionDeniedException;", "ResponseEntity<String> saveTouRates(TOURates touRates);", "private void UpdateRating(final String userId, long rating, long amtOfRatings, int ratingAsInt, final String rideType){\n final long amtOfRatingsIncludingThis = amtOfRatings + 1;\n final long ratingToAddToDB;\n final float ratingBeforeRounding;\n final long accumulatedRating;\n\n //if the rating is -1 then the driver has never been rated\n //need to check for this as calc is different\n if(rating == -1){\n ratingToAddToDB = ratingAsInt / 1;\n }else{\n accumulatedRating = amtOfRatings * rating;\n ratingBeforeRounding = ((float)ratingAsInt + (float)accumulatedRating) / (float)amtOfRatingsIncludingThis;\n ratingToAddToDB = Math.round(ratingBeforeRounding);\n }\n\n //submit the rating to the db and remove it from the passenger using firebase db methods\n DocumentReference userRef = dataStore.collection(\"users\").document(userId);\n userRef.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> returnedTask) {\n if (returnedTask.isSuccessful()) {\n DocumentSnapshot userDoc = returnedTask.getResult();\n if (userDoc.exists()) {\n Map<String, Object> userMap = new HashMap<>();\n userMap.put(\"rating\", ratingToAddToDB);\n userMap.put(\"amountOfRatings\", amtOfRatingsIncludingThis);\n\n dataStore.collection(\"users\").document(userId)\n .update(userMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void v) {\n Log.d(TAG, \"USER RATINGS UPDATED\");\n DeleteRideFromUser(rideType);\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Failed to update in UpdateRating();\", e);\n }\n });\n } else {\n Log.d(TAG, \"Couldnt find the user\");\n }\n } else {\n Log.d(TAG, \"Exception: \", returnedTask.getException());\n }\n }\n });\n }", "public void pay(Company company, double bonusForDevelopers) {\n\n if (!checkBudgetAvailability(company, bonusForDevelopers)) {\n throw new IllegalArgumentException(INSUFFICIENT_BUDGET_MESSAGE);\n }\n\n //Here goes exact logic for salary payment according to business requirements. For naive implementation, we\n //could define instance field \"double bankAccount\" in Employee and emulate transfers from company's budget:\n\n for (Employee employee : company.getEmployees()) {\n\n double employeeSalary = 0;\n\n if (employee instanceof Developer) {\n employeeSalary = ((Developer) employee).getSalary(bonusForDevelopers);\n } else {\n employeeSalary = employee.getSalary();\n }\n\n company.setBudget(company.getBudget() - employeeSalary);\n employee.setBankAccount(employee.getBankAccount() + employeeSalary);\n }\n }", "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}", "public static void setInfectionRate(double newRate) {\n infectionRate = newRate;\n }", "public double calculateRate(String url) {\n\t\tdouble totalRate = 0.0;\n\t\tfor (String sponsor : sponsors.keySet()) {\n\t\t\tif (url.contains(sponsor)) {\n\t\t\t\ttotalRate = sponsors.get(sponsor) + totalRate;\n\t\t\t}\n\t\t}\n\t\treturn totalRate;\n\t}", "public CommissionCompensationModel(double grossSales, double commissionRate) {\r\n //determines if an input is valid\r\n if(commissionRate < 0 || grossSales < 0) {\r\n throw new Error(\"Invalid Input\");\r\n }\r\n super.commissionRate = commissionRate;\r\n super.grossSales = grossSales;\r\n }", "public com.vodafone.global.er.decoupling.binding.request.UsageAuthRate createUsageAuthRate()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageAuthRateImpl();\n }", "public SavingsAccount(double rate) //setting interest rate with constructor\r\n { \r\n interestRate = rate;\r\n }", "public void addRating(String token, int courseId, int rating)\n throws IllegalParameterException, UnpaidCourseException {\n int userId = userDao.getUserId(token);\n\n if (courseDao.getCourseStatus(courseId) != Status.APPROVED.getStatusId())\n throw new IllegalParameterException();\n\n if (!studentDao.isPaid(token, courseId))\n throw new UnpaidCourseException();\n\n studentDao.addRating(userId, courseId, rating);\n }", "public void setImprovementRelaxRate(double rate) {\n this.exec = this.exec.withProperty(\"sm.improve.relaxRate\", rate);\n }", "@Override\n\tpublic double calcSimple(double amt, int year, float rate) {\n\t\tdouble si = amt * year * rate / 100.0;\n\t\treturn si;\n\t}", "public void setTurnRate (float rate)\n {\n if (rate > 0) {\n _turnRate = rate;\n } else {\n clearTurnRate();\n }\n }", "public interface RateManagementService {\r\n\r\n\t/**\r\n * Method to save a new Tiered Rate object\r\n * @author Nitin K.\r\n * @param tieredRates TieredRates\r\n * @return success/failed message\r\n */\r\n\tResponseEntity<String> saveTieredRates(TieredRates tieredRates);\r\n\r\n\t /**\r\n * Method to get all Tiered Rates\r\n * @author Nitin K.\r\n * @return List<TieredRates>\r\n */\r\n\tResponseEntity<List<TieredRates>> getTieredRates();\r\n\r\n\t/**\r\n * Method to get all Tiered Rates history\r\n * @author Nitin K.\r\n * @return List<TieredRatesHistory>\r\n */\r\n\tResponseEntity<List<TieredRatesHistory>> getTieredRatesHistory();\r\n\r\n\t/**\r\n * Method to save a new tou Rate object\r\n * @author Nitin K.\r\n * @param touRates TOURates\r\n * @return success/failed message\r\n */\r\n\tResponseEntity<String> saveTouRates(TOURates touRates);\r\n\r\n\t/**\r\n * Method to get all Tou Rates\r\n * @author Nitin K.\r\n * @return List<TOURates>\r\n */\r\n\tResponseEntity<List<TOURates>> getTouRates();\r\n\r\n\t/**\r\n * Method to get all Tou Rates History\r\n * @author Nitin K.\r\n * @return List<TOURatesHistory>\r\n */\r\n\tResponseEntity<List<TOURatesHistory>> getTouRatesHistory();\r\n\r\n\t/**\r\n * Method to save a new generic Rate object\r\n * @author Nitin K.\r\n * @param genericRates GenericRates\r\n * @return success/failed message\r\n */\r\n\tResponseEntity<String> saveGenericRates(GenericRates genericRates);\r\n\r\n\t/**\r\n * Method to get all Generic Rates\r\n * @author Nitin K.\r\n * @return List<GenericRates>\r\n */\r\n\tResponseEntity<List<GenericRates>> getGenericRates();\r\n\r\n\t/**\r\n * Method to get all Generic Rates History\r\n * @author Nitin K.\r\n * @return List<GenericRatesHistory>\r\n */\r\n\tResponseEntity<List<GenericRatesHistory>> getGenericRatesHistory();\r\n\r\n}", "private void saveRatesData() throws CoeusUIException {\r\n if(getFunctionType() == TypeConstants.DISPLAY_MODE) {\r\n dlgRates.dispose();\r\n return ;\r\n }\r\n try{\r\n //Bug Fix id 1654\r\n //dlgRates.setCursor(new Cursor(Cursor.WAIT_CURSOR));\r\n try{\r\n if(!validate()) {\r\n throw new CoeusUIException();\r\n }\r\n }catch (CoeusUIException coeusUIException) {\r\n throw coeusUIException;\r\n }\r\n\r\n saveFormData();\r\n \r\n Hashtable ratesData = new Hashtable();\r\n CoeusVector cvData = queryEngine.getDetails(queryKey, InstituteRatesBean.class);\r\n \r\n //Bug Fix: 1742: Performance Fix - Start 1\r\n //cvData.sort(\"acType\");\r\n //Bug Fix: 1742: Performance Fix - End 1\r\n \r\n ratesData.put(InstituteRatesBean.class, cvData);\r\n\r\n cvData = queryEngine.getDetails(queryKey, KeyConstants.RATE_CLASS_DATA);\r\n ratesData.put(KeyConstants.RATE_CLASS_DATA, cvData);\r\n\r\n cvData = queryEngine.getDetails(queryKey, KeyConstants.RATE_TYPE_DATA);\r\n ratesData.put(KeyConstants.RATE_TYPE_DATA, cvData);\r\n \r\n RequesterBean requesterBean = new RequesterBean();\r\n requesterBean.setFunctionType(UPDATE_RATE_DATA);\r\n requesterBean.setDataObject(ratesData);\r\n \r\n AppletServletCommunicator appletServletCommunicator = new \r\n AppletServletCommunicator(CONNECTION_STRING, requesterBean);\r\n appletServletCommunicator.send();\r\n ResponderBean responderBean = appletServletCommunicator.getResponse();\r\n \r\n if(responderBean == null) {\r\n //Could not contact server.\r\n CoeusOptionPane.showErrorDialog(COULD_NOT_CONTACT_SERVER);\r\n throw new CoeusUIException();\r\n }\r\n \r\n if(responderBean.isSuccessfulResponse()) {\r\n cleanUp();\r\n dlgRates.dispose();\r\n }else {\r\n //Server Error\r\n CoeusOptionPane.showErrorDialog(responderBean.getMessage());\r\n throw new CoeusUIException();\r\n }\r\n }catch (CoeusException coeusException){\r\n coeusException.printStackTrace();\r\n }\r\n }", "public interface SponsorService {\n public Sponsor addSponsor(Sponsor sponsor) throws BaseException;\n\n public Integer updateSponsor(Sponsor sponsor) throws BaseException;\n\n public Integer updateSponsorStatusByID(Map<String,String> params) throws BaseException;\n\n public Sponsor findSponsorByID(Map<String,String> params) throws BaseException;\n\n public Page<Sponsor> findSponsorList(Map<String,String> params,PaginationParameters paginationParameters) throws BaseException;\n}", "public void setRateLimiter(RateLimiter rateLimiter) {\n this.rateLimiter = rateLimiter;\n }", "public void addRating(double rating) throws RatingOutOfBoundsException{\n if (rating < minRating || rating > maxRating){\n throw new RatingOutOfBoundsException();\n }\n double totalRating = (averageRating * (double) count) + rating;\n count++;\n averageRating = totalRating / (double) count;\n }", "public void addRate(Rate rate){\n //create ContentValue containning values to be inserted/updated in database in this case only on column\n ContentValues values = new ContentValues();\n\n values.put(COL_CARNUM, rate.getCarnum());\n values.put(COL_DATE, rate.getDate());\n values.put(COL_RATE, rate.getRate());\n values.put(COL_PARKINPNUM, rate.getParkingnum());\n values.put(COL_FLOORNUM, rate.getFloornum());\n\n //create SQLiteDatabase object to enable writing/reading in database\n SQLiteDatabase db = getWritableDatabase();\n long id = db.insert(TABLE_RATE, null, values);\n rate.setId(id);//update the user ID according to the auto incremented id in the DB\n\n //logging for debugging purposes\n Log.d(\"ID \", \"Category id: \"+id+\" added to DB\");\n\n //close connection to database\n db.close();\n }", "public static void updateCalorieRate(Person person) {\n\n double calorieRate = person.getCalorieRate();\n updatePerson(person, \"usercaloryrate\", calorieRate);\n }", "public void setRateLimiter(RateLimiter rateLimiter) {\n this.rateLimiter = rateLimiter;\n }", "void rateStudent(int recordId, int mark) throws ServiceException;", "public void addRating(int userIndex, double rating) {\n if (!this.usersRatings.add(userIndex, rating))\n throw new IllegalArgumentException(\"Provided rating already exist in item: \" + id);\n\n min = Math.min(rating, min);\n max = Math.max(rating, max);\n average =\n (this.usersRatings.size() <= 1)\n ? rating\n : ((average * (this.usersRatings.size() - 1)) + rating) / this.usersRatings.size();\n }", "public void setEntrenchmentRate(int value) {\n this.entrenchmentRate = value;\n }", "public void updateExchangeRate(ExchangeRateVO exchangeRateVO)\n throws RemoteException, ExchangeRateException;", "public Employee(String name, String address, String phone, String secNumber, double rate){\n\t\tsuper(name, address, phone);\n\t\tsocialSecurityNumber = secNumber;\n\t\tpayRate = rate;\n\t}", "public int addRate(String uname, String cid, String rate, String review) {\n\t\ttry {\n\t\t\tPreparedStatement updateStatus = null;\n\t\t\tsql = \"insert into rate values(?,?,?,?)\";\n\t\t\ttry {\n\t\t\t\tupdateStatus = conn.prepareStatement(sql);\n\t\t\t\tupdateStatus.setString(1, uname);\n\t\t\t\tupdateStatus.setString(2, cid);\n\t\t\t\tupdateStatus.setString(3, rate);\n\t\t\t\tupdateStatus.setString(4, review);\n\t\t\t\tupdateStatus.executeUpdate();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn 0;\n\t\t\t} finally {\n\t\t\t\tupdateStatus.close();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"sql error\");\n\t\t\te.printStackTrace();\n\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}", "public void set2320MOA01ReimbursementRate$1(java.lang.CharSequence value) {\n this._2320MOA01ReimbursementRate = value;\n }", "public void setSponsorAvatarPath(String sponsorAvatarPath) {\n this.sponsorAvatarPath = sponsorAvatarPath;\n }", "public SavingsAccount(String accNumber, String accName, double rate) {\n\t\tsuper(accNumber, accName);\n\t\tinterestRate = rate;\n\t}", "public interface BudgetRateAndBaseService {\n\n /**\n * Calculates the applicable F & A rate for the given award. This should be\n * the F&A rate based on the start date of the award's budget.\n *\n * @param award\n * the award to calculate the applicable rate for\n * @return a BudgetDecimal representing the rate, or null or no rate for the\n * given affective date could be found\n * @throws IllegalArgumentException\n * if the given award is null\n * @throws IllegalArgumentException\n * if the given award does not have a budget\n * @throws IllegalStateException\n * if the located budget does not have a start date\n */\n ScaleTwoDecimal calculateApplicableFandARate(Award award);\n\n}", "@ApiModelProperty(value = \"Rates that will be applied during the duration of the car rental requested. These rates are generally not inclusive of tax and are used by the car rental company to compute the total cost at the end of the rental period.\")\n public List<Rate> getRates() {\n return rates;\n }", "public String insertExchangeRate() {\r\n\t\t\r\n\t\tString loginId = com.omp.admin.common.util.CommonUtil.getLoginId(this.req.getSession());\r\n\t\texRateS.setInsBy(loginId);\r\n\t\tservice.insertExchangeRate(exRateS);\r\n\t\t\t\r\n\t\treturn SUCCESS;\r\n\t}", "public com.vodafone.global.er.decoupling.binding.request.UsageAuthRatePlus createUsageAuthRatePlus()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.UsageAuthRatePlusImpl();\n }", "public float getRate(){\r\n return rate;\r\n }", "public void setRateId(String rateId) {\n this.rateId = rateId == null ? null : rateId.trim();\n }", "public void setGrossSales(double grossSales) {\n if (grossSales < 0.0) { // validate\n throw new IllegalArgumentException(\"Gross sales must be >= 0.0\");\n }\n\n this.grossSales = grossSales;\n}", "public void setSponsorMobile(String sponsorMobile) {\n this.sponsorMobile = sponsorMobile;\n }", "public float getRate(JsonObject ratesInfo, String currency){\n return ratesInfo.getAsJsonObject(\"rates\").get(currency).getAsFloat();\n }", "double getRate();", "public void setRateForRewardCustomer(int weekDayCount,int weekEndRate) {\n this.rewardCustomerWeekDayRate = this.rewardCustomerWeekDayRate*weekDayCount;\n this.rewardCustimerWeekEndRate = this.rewardCustimerWeekEndRate*weekEndRate;\n this.totalRewardCustomerRate = this.rewardCustomerWeekDayRate + this.rewardCustimerWeekEndRate;\n }", "public Builder setRate2(\n int index, java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureRate2IsMutable();\n rate2_.set(index, value);\n onChanged();\n return this;\n }", "BonusResponse add(Long customerId, Long authorizedBy, BonusRequest bonus);" ]
[ "0.5893323", "0.573364", "0.5704228", "0.5693531", "0.55495876", "0.5487735", "0.5444346", "0.54205006", "0.54205006", "0.54042375", "0.53851455", "0.530337", "0.52134526", "0.5211501", "0.5101872", "0.5100901", "0.5100016", "0.50964034", "0.5090265", "0.5081881", "0.5081401", "0.5043714", "0.50311613", "0.5029576", "0.5015345", "0.501413", "0.5009735", "0.5009244", "0.5006095", "0.4998211", "0.4993178", "0.49699825", "0.49694872", "0.49674416", "0.49198106", "0.4905887", "0.48953548", "0.48875937", "0.48866534", "0.48790392", "0.48773092", "0.48755732", "0.48598528", "0.48578542", "0.48547608", "0.4838377", "0.48334062", "0.48318523", "0.48261496", "0.48243502", "0.48146716", "0.48130453", "0.48044598", "0.478803", "0.47853184", "0.47802028", "0.47773805", "0.4765661", "0.47556064", "0.4750839", "0.47474608", "0.47470853", "0.47390464", "0.47132173", "0.4711462", "0.469875", "0.4697804", "0.46896863", "0.4683081", "0.4668891", "0.4666525", "0.4663924", "0.46483552", "0.46453708", "0.46386144", "0.46265885", "0.46249366", "0.4622025", "0.46000618", "0.45992187", "0.45954487", "0.45916307", "0.45878392", "0.45873716", "0.4583313", "0.457809", "0.4572", "0.45687655", "0.45656306", "0.45596677", "0.45473742", "0.45421842", "0.45409518", "0.45228252", "0.45099768", "0.45080215", "0.45020902", "0.44988793", "0.4483176", "0.44804028" ]
0.7963271
0
finds the total rate of the sponsor rates for a single page
public double calculateRate(String url) { double totalRate = 0.0; for (String sponsor : sponsors.keySet()) { if (url.contains(sponsor)) { totalRate = sponsors.get(sponsor) + totalRate; } } return totalRate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getAmountPage();", "@Query(\"select count(s)*1./(select count(s1)*1. from Sponsorship s1) from Sponsorship s where s.isActive='1'\")\n\tDouble ratioOfActiveSponsorships();", "public double getRate( ) {\nreturn monthlyInterestRate * 100.0 * MONTHS;\n}", "double getRate();", "public void sendeRate(String spieler);", "@Override\n\tpublic double calcSimple(double amt, int year, float rate) {\n\t\tdouble si = amt * year * rate / 100.0;\n\t\treturn si;\n\t}", "double getPricePerPerson();", "public double getTotalPayments(){return this.total;}", "protected double getPaymentRate() {\n\t\tdouble rate = 0;\n\n\t\tfor (PayloadBuilderSet set : sets) {\n\t\t\tif (set.isActive())\n\t\t\t\trate += set.getPaymentRate();\n\t\t}\n\n\t\treturn rate;\n\t}", "@GetMapping(\"/points/total/{cust_name}\")\n public String getRewardPointsByName(@PathVariable(\"cust_name\") String cus_name) {\n return customerData.rewardPoints(cus_name);\n }", "double getPaid();", "public int getTotalPrice() {\n int total = 0;\n for (Scholar s : this.scholars) {\n Calendar start = (Calendar) s.getStartDate().clone();\n while (start.before(s.getEndDate())) {\n if (start.after(this.startDate) && start.before(this.estimatedEnd)) { //Only lists scholar within the the time frame the project is active\n total += s.getSalary();\n }\n start.add(Calendar.MONTH, 1);\n }\n }\n return total;\n }", "private double calculatePer(double currentRate, Map<String, String> earningsPerShare) {\n double current = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getCurrentYear()).replace(\",\", \".\"));\n return currentRate / current;\n }", "public int getRate() {\n return rate_;\n }", "double getTotalReward();", "public int getRonPayment(boolean isDealer) {\r\n int output;\r\n if (isDealer) {\r\n output = basicPoints * 6;\r\n } else {\r\n output = basicPoints * 4;\r\n }\r\n \r\n return (int)(100*Math.ceil(output/100.0));\r\n }", "ResponseEntity<List<TOURates>> getTouRates();", "public Rate rate() {\n _initialize();\n return rate;\n }", "public void setRate(double annualRate) {\nmonthlyInterestRate = annualRate / 100.0 / MONTHS;\n}", "private static int chargeRate(Thing b, Thing s) {\n \t\tint rate=b.getStat(\"WP\");\r\n \t\t\r\n \t\t// bonus for appropraite recharge skill\r\n \t\trate=rate*(1+b.getStat(rechargeSkill(s)));\r\n \t\t\r\n \t\t// spell specific charge rate\r\n \t\t// default is 100\r\n \t\trate=(rate*s.getStat(\"ChargeRate\"));\r\n \t\t\r\n \t\t// more costly spells take longer to recharge\r\n \t\trate=rate/s.getStat(\"SpellCost\");\r\n \t\t\r\n \t\tif (rate<=0) {\r\n \t\t\tGame.warn(\"Spell.chargeRate(...)==0 for \"+s.name());\r\n \t\t}\r\n \t\t\r\n \t\treturn rate;\r\n \t}", "public double getRate() {\n return rate;\n }", "public double getRate() {\n return rate;\n }", "int getMortgageRate();", "double getPaidAmount();", "public int getRate() {\n return rate_;\n }", "public float getRate(JsonObject ratesInfo, String currency){\n return ratesInfo.getAsJsonObject(\"rates\").get(currency).getAsFloat();\n }", "Page<TurRating> findByTurId(Integer turId, Pageable pageable);", "public Integer getRate() {\r\n return rate;\r\n }", "String getReviewrate();", "static double chooseRate(String selectedRate){\n JsonObject listRates = conversionRates.get(\"rates\").getAsJsonObject();\n return listRates.get(selectedRate).getAsDouble();\n\n }", "private double calculatePer5years(double currentRate, Map<String, String> earningsPerShare) {\n double next = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getNextYear()).replace(\",\", \".\"));\n double current = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getCurrentYear()).replace(\",\", \".\"));\n // If the data is not up to date at onvista...\n String lastYearEps = earningsPerShare.get(fundamentalData.getLastYear());\n if (lastYearEps == null) {\n lastYearEps = earningsPerShare.get(fundamentalData.getLastYear() + \"e\");\n }\n double last = parseToDoubleOrZero(lastYearEps.replace(\",\", \".\"));\n double twoAgo = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getTwoYearsAgo()).replace(\",\", \".\"));\n double threeAgo = parseToDoubleOrZero(earningsPerShare.get(fundamentalData.getThreeYearsAgo()).replace(\",\", \".\"));\n\n double fiveYearsEarnings;\n if (next == 0 && current != 0 && last != 0 && twoAgo != 0 && threeAgo != 0) {\n fiveYearsEarnings = (current + last + twoAgo + threeAgo) / 4;\n } else {\n fiveYearsEarnings = (next + current + last + twoAgo + threeAgo) / 5;\n }\n\n return currentRate / fiveYearsEarnings;\n }", "double getDiscountRate(int catalog_id, int customer_acc_no);", "public double totalInsuranceCost(){\n double cost=0;\n for(InsuredPerson i: insuredPeople){\n cost+=i.getInsuranceCost();\n\n }\n return cost;\n\n }", "public int findTotalPapers() throws DAOException;", "@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }", "public float getRate(){\r\n return rate;\r\n }", "public static double totalcommision(int salesman_id) {\r\n\r\n\t\tResultSet rs = null;\r\n\r\n\t\tdouble total_amount = 0;\r\n\r\n\t\tString query = \"SELECT DISTINCT(appliance_name) AS apname ,(SELECT CountNumberAppliance(apname,\"\r\n\t\t\t\t+ salesman_id + \")) FROM appliance\";\r\n\t\tint count;\r\n\t\tString name;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tPreparedStatement stmt = (PreparedStatement) con\r\n\t\t\t\t\t.prepareStatement(query);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\tSystem.out.println(query);\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tname = rs.getString(1);\r\n\t\t\t\tif (name.equalsIgnoreCase(\"5 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 5;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 10;\r\n\t\t\t\t\t} else if ((count >= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 20;\r\n\t\t\t\t\t} else if ((count >= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 30;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (name.equalsIgnoreCase(\"10 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 15;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 10;\r\n\t\t\t\t\t} else if ((count >= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 20;\r\n\t\t\t\t\t} else if ((count >= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 30;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (name.equalsIgnoreCase(\"15 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 35;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 45;\r\n\t\t\t\t\t} else if ((count <= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 55;\r\n\t\t\t\t\t} else if ((count <= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 65;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (name.equalsIgnoreCase(\"20 wott\")) {\r\n\t\t\t\t\tcount = rs.getInt(2);\r\n\r\n\t\t\t\t\tif ((count >= 10) && (count <= 20)) {\r\n\t\t\t\t\t\ttotal_amount = count * 45;\r\n\t\t\t\t\t} else if ((count >= 21) && (count <= 35)) {\r\n\t\t\t\t\t\ttotal_amount = count * 55;\r\n\t\t\t\t\t} else if ((count >= 36) && (count <= 50)) {\r\n\t\t\t\t\t\ttotal_amount = count * 65;\r\n\t\t\t\t\t} else if ((count >= 51)) {\r\n\t\t\t\t\t\ttotal_amount = count * 75;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn total_amount;\r\n\t}", "float getVacationAccrualRate();", "public double getTotalAmountOfInterest(){\n\t\tdouble amount = getAmountOfFixedPayments()*no_years*no_payments_yearly - principal_amount;\n\t\tdouble result = Math.round(amount*100.0) / 100.0;\n\t\treturn result;\n\t}", "public double getRate() {\r\n\t\treturn (getRate(0)+getRate(1))/2.0;\r\n\t}", "public ArrayList<RewardBean> getTotalCost() {\n/* 28 */ return this.totalCost;\n/* */ }", "public int getTotRuptures();", "public abstract double getDiscountRate();", "public double getRate() {\n\t\treturn rate;\n\t}", "public double getPrincipalAmount(){return this.principal_amount;}", "public void displayAmount(char r,int t,double s){\n ObjectListNode p=payroll.getFirstNode();\n Employee e;\n r=Character.toUpperCase(r);\n System.out.printf(\"\\nEmployees of %d or more years with a %s salary of %.2f or greater:\\n\",t,r=='H'?\"hourly\":\"weekly\",s);\n pw.printf(\"\\nEmployees of %d or more years with a %s salary of %.2f or greater:\\n\",t,r=='H'?\"hourly\":\"weekly\",s);\n while(p!=null){\n e=(Employee)p.getInfo();\n if(e.getTenure()<t&&e.getRate()==r&&\n s<=(e.getSalary())){\n System.out.printf(\"\\n%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 static double cal(final int ratePerHrs, final int totalHrs){\n\tfinal double cal= ratePerHrs*totalHrs;\n\treturn cal;\n}", "public int getTotalAmount();", "abstract double calculateCurrentDiscountRate();", "public static Collection getCostingRates() throws EnvoyServletException\n {\n try\n {\n return ServerProxy.getCostingEngine().getRates();\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }", "@ApiModelProperty(value = \"The total price of staying in this room from the given check-in date to the given check-out date\")\n public List<PeriodRate> getRates() {\n return rates;\n }", "public double getPayRate()\r\n\t{\r\n\treturn payRate;\r\n\t}", "private double calculateTotal(){\r\n double total = 0;\r\n\r\n for(Restaurant restaurant: restaurantMap.getRestaurantMap().values()){\r\n total += restaurant.getRevenue();\r\n }\r\n\r\n return total;\r\n }", "double getTotal();", "public void calculatePoints() {\n /*\n for (int i = 0; i < getRacers().size(); i++) {\n String username = getRacers().get(i).getUsername();\n int total = 0;\n for (int j = 0; j < getRounds().size(); j++) {\n Slot slot = getRounds().get(j).findRacerInRound(username);\n if (slot != null) {\n total = total + slot.getPoints();\n }\n }\n getRacers().get(i).setPoints(total);\n }*/\n }", "public static Collection getRatesForActivity(Activity activity,\n GlobalSightLocale sourceLocale, GlobalSightLocale targetLocale)\n\n throws EnvoyServletException\n {\n try\n {\n return ServerProxy.getCostingEngine().getRates(activity,\n sourceLocale, targetLocale);\n }\n catch (Exception e)\n {\n throw new EnvoyServletException(e);\n }\n }", "public static double getRate(){\r\n Scanner s = new Scanner(System.in);\r\n double rate;\r\n do{\r\n System.out.print(\"Enter the current prime interest rate: \");\r\n rate = parseDouble(s.next());\r\n rate = rate * 0.01;\r\n }while(rate == -1);\r\n System.out.println(\"---------------------------------------------\");\r\n return rate;\r\n }", "public int getChargeRate();", "public BigDecimal getLBR_TaxDeferralRate();", "int getPagesAmount();", "public void setRate(int rate) { this.rate = rate; }", "public void caltotalprice(){\n \tthis.mTotalPrice = 0;\n \tif (this.isCoachSeat) {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.coachprice();\n \t\t}\n \t}else {\n \t\tfor (Flight f: this.mLegs) {\n \t\t\tthis.mTotalPrice += f.firstclassprice();\n \t\t}\n \t}\n }", "public int getStarvationRate ( ) {\n\t\treturn extract ( handle -> handle.getStarvationRate ( ) );\n\t}", "double getSDPrice() {\n ArrayList<Double> allPrices = new ArrayList<>();\n\n for (Firm firm : firms) {\n List<Double> pricesOfFirm = firm.getPrices();\n allPrices.addAll(pricesOfFirm.subList(pricesOfFirm.size() - SimulationManager.sizeOfExaminationInterval, pricesOfFirm.size()));\n }\n\n return Calculation.round(Calculation.getSD(allPrices), 2);\n }", "@Override\r\n\tpublic PageInfo<Users> getStars(Integer userId,Integer pageNum,Integer pageSize) {\n\t\tPageHelper.startPage(pageNum, pageSize, true);\r\n\t\tList<Users> stars = this.uMapper.getStars(userId);\r\n\t\treturn new PageInfo<>(stars);\r\n\t}", "public double getInterestRate(){\n return annualInterestRate;\n }", "public float getRate() {\n\t\treturn rate;\n\t}", "public double getMonthlyInterestRate(){\n return annualInterestRate / 12;\n }", "public IShippingRate getRateObject();", "public static double getInterestRate(){\n\t\t return interest_rate;\r\n\t }", "public double computePageRank(URI pageUri) {\n \treturn this.pageRanks.containsKey(pageUri) ? this.pageRanks.get(pageUri) : 0.0;\n }", "public String getRebillNextAmount()\n\t{\n\t\tif(response.containsKey(\"next_amount\")) {\n\t\t\treturn response.get(\"next_amount\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public TotalPaymentResponse totalPaymentInfo(Integer user_id) {\n\t\t\n\t\tLOGGER.info(\"obteniendo resumen de pagos del usuario {}\", user_id);\n\n\t\tdouble totalPayment = 0d;\n\t\tDate lastPayment = null;\n\t\tList<Payment> allPayments = paymentRepo.findByUserId(user_id);\n\t\tif(!allPayments.isEmpty()) {\n\t\t\ttotalPayment = allPayments.stream().map(c -> c.getAmount()).reduce(0d, (ap1 , ap2) -> ap1 + ap2).doubleValue();\n\t\t\tlastPayment = allPayments.stream().map(c -> c.getDateObj()).reduce(DateHelper.getInstance().getMinTimestamp(), (ap1 , ap2) -> DateHelper.getInstance().max(ap1, ap2));\n\t\t}\n\t\treturn new TotalPaymentResponse(user_id, totalPayment, lastPayment, allPayments.size());\n\t}", "double getTotalCost();", "double getTransRate();", "double requestCurrentRate(String fromCurrency,\n String toCurrency);", "@Override\r\n\tpublic double calculatePremium(ApplicationInsurance applicationInsurance) {\n\t\t\r\n\t\treturn this.iApplicationInsuranceDao.calculatePremium(applicationInsurance);\r\n\t\r\n\t}", "double getMonthlyInterestRate(){\r\n\t\treturn annualInterestRate/12;\r\n\t}", "Double getTotalSpent();", "@Test(enabled = false)\n @JIRATestKey(key = \"TEST-4\")\n public void checkMultipleFlightsTotalSum() {\n SearchResultPage searchResultPage = new WelcomePage()\n .getHomePage()\n .addMultipleDestinations()\n .setOutboundInformation(\"Bologna, Italy\", \"Eindhoven, Netherlands\", \"24 Nov 2017\")\n .setInboundInformation(\"Amsterdam (Schiphol), Netherlands\", \"Casablanca, Morocco\", \"30 Nov 2017\")\n .search()\n .selectFirstOutbound()\n .selectFirstInbound();\n\n Assert.assertEquals(searchResultPage.getTotalPrice(), \"102.00\");\n }", "@GetMapping(value = \"/{id}\", produces = MediaType.APPLICATION_JSON_VALUE)\n @PreAuthorize(value = \"isAuthenticated()\")\n public Rate getRateById(@PathVariable(name = \"id\", required = true) long id, HttpServletRequest request) throws Exception {\n return rateService.getRate(id);\n }", "public double calcTotalEarnings() {\n double total = 0;\n for (int i = 0; i < numRegions; i++) {\n total += regionList[i].calcEarnings();\n }\n return total;\n }", "double getSubtotal();", "double getSubtotal();", "private static int getBonus(int sales) {\n if (sales > 5000) {\n\n return sales / 10;\n\n }\n return 0;\n }", "@Override\n\tint getRateOfInterest() {\n\t\treturn 7;\n\t}", "private void fetchRatesData() {\r\n RequesterBean requesterBean = new RequesterBean();\r\n requesterBean.setFunctionType(GET_RATE_DATA);\r\n requesterBean.setDataObject(instituteRatesBean);\r\n \r\n AppletServletCommunicator appletServletCommunicator = new \r\n AppletServletCommunicator(CONNECTION_STRING, requesterBean);\r\n appletServletCommunicator.setRequest(requesterBean);\r\n appletServletCommunicator.send();\r\n ResponderBean responderBean = appletServletCommunicator.getResponse();\r\n \r\n if(responderBean == null) {\r\n //Could not contact server.\r\n CoeusOptionPane.showErrorDialog(COULD_NOT_CONTACT_SERVER);\r\n return;\r\n }\r\n \r\n if(responderBean.isSuccessfulResponse()) {\r\n Hashtable ratesData = (Hashtable)responderBean.getDataObject();\r\n hasMaintainCodeTablesRt = ((Boolean)ratesData.get(\"HAS_OSP_RIGHT\")).booleanValue();\r\n if( hasMaintainCodeTablesRt ){\r\n setFunctionType(TypeConstants.MODIFY_MODE);\r\n }else {\r\n setFunctionType(TypeConstants.DISPLAY_MODE);\r\n }\r\n //queryKey = RATES + ratesData.get(\"PARENT_UNIT_NUMBER\").toString();\r\n\r\n //Set title\r\n dlgRates.setTitle(RATES + \" for Unit \" + instituteRatesBean.getUnitNumber());\r\n queryEngine.addDataCollection(queryKey, ratesData);\r\n\r\n }else {\r\n //Server Error\r\n CoeusOptionPane.showErrorDialog(responderBean.getMessage());\r\n return;\r\n }\r\n }", "double getTotalPortfolioValue(){\n double total = 0.0;\n for (Listing<P, C> l : this.collectionOfCurrentListings) {\n total += l.getContract().getTotalPrice() * this.commissionRate;\n }\n return total;\n }", "List<ServicePaymentsStatistics> getServicePaymentStats(Date begin, Date end);", "ResponseEntity<List<TieredRates>> getTieredRates();", "public int findDanymicRecordDetailTotal(long sgid,String wbuid,DanymicUserSiftDto siftDto);", "public static int getWinnerTotalGoals(String competition, int year) {\r\n int numGoals = 0;\r\n try\r\n {\r\n String apiUrl = \"https://jsonmock.hackerrank.com/api/football_competitions?name=\" + competition + \"&year=\" + year;\r\n URL url = new URL(apiUrl);\r\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\r\n con.setRequestMethod(\"GET\");\r\n con.addRequestProperty(\"Content-Type\", \"applicaton/json\");\r\n con.connect();\r\n int status = con.getResponseCode();\r\n InputStream is = url.openStream();\r\n JsonReader reader = Json.createReader(is);\r\n JsonObject object = reader.readObject();\r\n String winner = object.get(\"data\").asJsonArray().get(0).asJsonObject().getString(\"winner\");\r\n \r\n //get goals by the winner\r\n apiUrl = \"https://jsonmock.hackerrank.com/api/football_matches?competition=\" + competition + \"&year=\" + year;\r\n url = new URL(apiUrl);\r\n con = (HttpURLConnection) url.openConnection();\r\n con.setRequestMethod(\"GET\");\r\n con.addRequestProperty(\"Content-Type\", \"applicaton/json\");\r\n con.connect();\r\n status = con.getResponseCode();\r\n is = url.openStream();\r\n reader = Json.createReader(is);\r\n object = reader.readObject();\r\n int numPages = object.getInt(\"total_pages\");\r\n JsonArray data = object.getJsonArray(\"data\");\r\n con.disconnect();\r\n \r\n for( int i = 1; i <= numPages; i++ ){\r\n \r\n apiUrl = \"https://jsonmock.hackerrank.com/api/football_matches?competition=\" + competition + \"&year=\" + year+ \"&page=\" + i;\r\n url = new URL(apiUrl);\r\n con = (HttpURLConnection) url.openConnection();\r\n con.setRequestMethod(\"GET\");\r\n con.addRequestProperty(\"Content-Type\", \"applicaton/json\");\r\n con.connect();\r\n status = con.getResponseCode();\r\n is = url.openStream();\r\n reader = Json.createReader(is);\r\n object = reader.readObject();\r\n data = object.getJsonArray(\"data\");\r\n con.disconnect(); \r\n\r\n //loop through the data, sum up draw matches\r\n for ( int j = 0; j < data.size(); j++){\r\n if ( data.get(j).asJsonObject().getString(\"team1\").equals(winner) ) {\r\n numGoals += Integer.valueOf( data.get(j).asJsonObject().getString(\"team1goals\") );\r\n }\r\n if ( data.get(j).asJsonObject().getString(\"team2\").equals(winner) ) {\r\n numGoals += Integer.valueOf( data.get(j).asJsonObject().getString(\"team2goals\") );\r\n }\r\n }\r\n } \r\n }\r\n catch (Exception e){return -1;}\r\n \r\n return numGoals; \r\n }", "@Override\n\tpublic double calRate() {\n\t\treturn 0.9f;\n\t}", "public double getAmountOfFixedPayments(){\n\t\tdouble amount = (principal_amount * (interest_rate / 100)) / (no_payments_yearly * (1 - Math.pow((1+(interest_rate/100)/no_payments_yearly), -no_years*no_payments_yearly)));\n\t\tdouble result = Math.round(amount * 100.0) / 100.0;\n\t\treturn result;\n\t}", "@Override \npublic double getPaymentAmount() { \n return getCommissionRate() * getGrossSales(); \n}", "private TSDBData generateStaticRate() {\n //TODO: check if there is generic method to to return rateData\n ArrayList<String> strArr = StringUtil.strArr(\"resource\", \"rate\", \"rate_policy\");\n TSDBData rateData = createPOJOObject(\"rate\", strArr, load.getStaticRate());\n return rateData;\n }", "private double getDynamicRate(String resourceName) {\n logger.trace(\"BEGIN double getDynamicRate(String resourceName)\");\n double rate;\n RateEngineResponse response;\n RuleEngineClient client = new RuleEngineClient();\n\n response = client.getRate(resourceName);\n rate = response.getRate();\n //System.out.println(\"Got the response from rule engine. Rate: \" + response.getRate());\n logger.trace(\"END double getDynamicRate(String resourceName)\");\n return rate;\n }", "public SearchResults<ConsensusSNPSummaryRow> getNextResults() {\n\t\tif (currentOffset.equals(0)) { totalCount = null; }\n\n\t\tPaginator p = new Paginator();\n\t\tp.setResults(batchSize);\n\t\tp.setStartIndex(currentOffset);\n\t\tsearchParams.setPaginator(p);\n\t\tList<String> matchedMarkerIds = new ArrayList<String>();\n\n\t\tSearchResults<ConsensusSNPSummaryRow> results = finder.getSummarySnps(searchParams, matchedMarkerIds);\n\n\t\tcurrentOffset += batchSize;\n\t\ttotalCount = results.getTotalCount();\n\t\treturn results;\n\t}", "private RateoRisconto getRateoRiscontoPrecedente() {\n\t\tfor(RateoRisconto rateoRisconto : primaNota.getListaRateoRisconto()){\n\t\t\tif(req.getRateo().getUid() == rateoRisconto.getUid()){\n\t\t\t\treturn rateoRisconto;\n\t\t\t}\n\t\t}\n\t\t\n\t\tthrow new IllegalStateException(\"Impossibile trovare il Rateo con uid: \"+req.getRateo().getUid());\n\t}", "public int queryTotal() {\n\t\treturn this.studentMaper.queryTotal();\r\n\t}" ]
[ "0.572549", "0.55178183", "0.5505089", "0.54617673", "0.5327735", "0.53162533", "0.5314013", "0.52569634", "0.5253922", "0.5224232", "0.5206575", "0.5193806", "0.5186117", "0.51422405", "0.5138887", "0.5133107", "0.51319855", "0.51273936", "0.51155704", "0.5106056", "0.50417817", "0.50417817", "0.5041229", "0.5038851", "0.5001953", "0.49877292", "0.49767542", "0.49708316", "0.4961031", "0.49496758", "0.49483275", "0.4947101", "0.49432707", "0.49401522", "0.4939313", "0.492297", "0.49191913", "0.49142048", "0.49101937", "0.4902904", "0.48919645", "0.4891729", "0.48784822", "0.48693162", "0.48623273", "0.4851271", "0.48447186", "0.48444012", "0.48441786", "0.4838323", "0.48280025", "0.4804827", "0.47955143", "0.479374", "0.47889757", "0.47842592", "0.4772929", "0.47719264", "0.4770583", "0.47549155", "0.47539687", "0.47469854", "0.47466937", "0.4743609", "0.47425887", "0.47393614", "0.4724994", "0.47196117", "0.4718183", "0.4706263", "0.47052118", "0.4703572", "0.47034487", "0.46998945", "0.46973816", "0.46941772", "0.46935093", "0.46831676", "0.46830443", "0.46797064", "0.46755534", "0.46706286", "0.46675402", "0.46675402", "0.4667063", "0.46654814", "0.4664866", "0.4664091", "0.46552768", "0.46541774", "0.46525002", "0.46518156", "0.46411696", "0.4638832", "0.46261433", "0.46175778", "0.46140826", "0.46091485", "0.46048564", "0.4601841" ]
0.6571555
0
Compresses the given InputStream using the LZ78 algorithm into the given OutputStream. The latter is closed automatically.
public static void compress(InputStream fins, OutputStream outs) { int value = 1; byte[] pattern = new byte[0]; byte[] byteArray = new byte[8192]; boolean isEmpty = true; Map<Byte, byte[]> dictionary = new TreeMap<>(); boolean patternAlreadyExist; int numberOfBytesRead; try { // While the end of file is not reached. while ((numberOfBytesRead = fins.read(byteArray)) != -1) { for (int i = 0; i < numberOfBytesRead; i++) { //Compress the stream if the dictionary size exceeds 127, // and construct a new dictionary if (dictionary.size() == Byte.MAX_VALUE) { if (!isEmpty) { dictionary.put((byte) value, pattern); } compressStream(dictionary, outs); dictionary.clear(); value = 1; } // Read pattern corresponding to an array of bytes. byte[] temp = Util.mergeBytes(pattern, byteArray[i]); pattern = temp; patternAlreadyExist = doesPatternExist(dictionary, pattern); // Add the pattern to the dictionary if its doesn't exist. if (!patternAlreadyExist) { dictionary.put((byte) value, pattern.clone()); value++; pattern = new byte[0]; isEmpty = true; // If it already exists, read the next byte in the IS } else { isEmpty = false; continue; } } } // Insert the pattern in the dictionary if the end of the file is // reached and the pattern already exist. if (!isEmpty) { dictionary.put((byte) value, pattern.clone()); } compressStream(dictionary, outs); outs.close(); } catch (IOException e) { System.err.println("An error happened while decompressing."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void compress(BitInputStream in, BitOutputStream out){\n\n\t\t\tint[] counts = readForCounts(in);\n\t\t\tHuffNode root = makeTree(counts);\n\t\t\tMap<Integer, String> codings = makeCodingsFromTree(root);\n\t\t\twriter(root, out);\n\t\t\tin.reset();\n\t\t\twriteCompressedBits(in, codings, out);\n\t\t\tout.close();\n\t\t}", "static void decompressStream(Map<Integer, byte[]> dictionary,\n OutputStream os) {\n byte[] byteStream = new byte[0];\n\n for (Integer key : dictionary.keySet()) {\n byteStream = Util.mergeBytes(byteStream,\n dictionary.get(key).clone());\n }\n try {\n os.write(byteStream);\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }", "public void flush() {\n\r\n int inflatedSize = buffer.position();\r\n deflator.setInput(buffer.getBuffer(), 0, inflatedSize);\r\n deflator.finish();\r\n int deflatedSize = deflator.deflate(compressionBuffer.array());\r\n deflator.reset();\r\n\r\n try {\r\n outputStream.writeInt(deflatedSize);\r\n outputStream.writeInt(inflatedSize);\r\n outputStream.write(compressionBuffer.array(), 0, deflatedSize);\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(\"Failed to write compressed data to stream\", e);\r\n }\r\n\r\n buffer.clear();\r\n compressionBuffer.clear();\r\n }", "private void addToOutputStream(ZipOutputStream output, InputStream input, ZipEntry ze) throws IOException{\n try {\n output.putNextEntry(ze); \n } catch (ZipException zipEx) {\n //This entry already exists. So, go with the first one.\n input.close();\n return;\n }\n int numBytes = -1;\n while((numBytes = input.read(buffer)) > 0){\n output.write(buffer, 0, numBytes);\n }\n output.closeEntry();\n input.close();\n }", "public static void zip(final String name, final InputStream inputStream, final int pipeSize, ByteChunkListener byteChunkListener) throws IOException {\r\n\t\t// inputStream -> GZIPOutputStream -> Chunkifier -> chunks of Byte to listener\r\n\t\tfinal PipedInputStream readFromPipe = new PipedInputStream(pipeSize);\r\n\t\tfinal PipedOutputStream writeCompressedIntoPipe = new PipedOutputStream(readFromPipe); // Make sure it's connected now\r\n\t\t\r\n\t\t// Start thread that reads from input and pass it to compressor\r\n\t\tThread thread = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tbyte[] buf = new byte[pipeSize];\r\n\t\t\t\ttry {\r\n\t\t\t\t\tZipOutputStream compressor = new ZipOutputStream(writeCompressedIntoPipe);\r\n\t\t\t\t\tcompressor.putNextEntry(new ZipEntry(name));\r\n\t\t\t\t\tfor(int len = inputStream.read(buf); len != -1; len = inputStream.read(buf)) compressor.write(buf, 0, len);\r\n\t\t\t\t\tcompressor.closeEntry();\r\n\t\t\t\t\tcompressor.finish();\r\n\t\t\t\t\tcompressor.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new RuntimeException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tthread.start();\r\n\t\t\r\n\t\t// Read on pipe end compressed data\r\n\t\tChunkifier.read(readFromPipe, pipeSize, byteChunkListener);\r\n\t\t\r\n\t\t// Cleanup\r\n\t\twhile(thread.isAlive()) try {\r\n\t\t\tthread.join();\r\n\t\t} catch (InterruptedException e) {}\r\n\t\twriteCompressedIntoPipe.close();\r\n\t\treadFromPipe.close();\r\n\t}", "public DefOutputStream(OutputStream out, int size) throws IOException {\n\t\t\tsuper(out, new Deflater(Deflater.BEST_COMPRESSION, true), size);\n\t\t}", "public static void copy(InputStream input, OutputStream output) throws IOException {\n try {\n byte[] buffer = new byte[GCSFetcher.BUFFER_SIZE];\n int bytesRead = input.read(buffer);\n while (bytesRead != -1) {\n output.write(buffer, 0, bytesRead);\n bytesRead = input.read(buffer);\n }\n } finally {\n input.close();\n output.close();\n }\n }", "public int compress(InputStream in, OutputStream out, boolean force) throws IOException {\n int walk = 0; // Temp storage for incoming byte from read file\n int walkCount = 0; // Number of total bits read\n char codeCheck = ' '; // Used as a key to find the code in the code map\n String[] codeMap = HuffEncoder.encoding(); // Stores the character codes, copied from HuffEncode\n String s2b = \"\"; // Temp string storage \n int codeLen = 0; // Temp storage for code length (array storage)\n BitInputStream bitIn = new BitInputStream(in); \n BitOutputStream bitOut = new BitOutputStream(out);\n\n // Writes the code array at the top of the file. It first writes the number of bits in the code, then \n // the code itself. In the decode proccess, the code length is first read, then the code is read using the length\n // as a guide.\n // A space at top of file ensures the following is the array, and the file will correctly decompress\n out.write(32);\n for (int i = 0; i < codeMap.length; i++) {\n // Value of the character\n s2b = codeMap[i];\n // If null, make it zero\n if(s2b == null){\n s2b = \"0\";\n }\n // Record length of code\n codeLen = s2b.length();\n // Write the length of the code, to use for decoding\n bitOut.writeBits(8, codeLen);\n // Write the value of the character\n for (int j = 0; j < s2b.length(); j++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(j)));\n }\n }\n\n // Reads in a byte from the file, converts it to a character, then uses that \n // caracter to look up the huffman code. The huffman code is writen to the new \n // file.\n try {\n while(true){\n // Read first eight bits\n walk = bitIn.read();\n // -1 means the stream has reached the end\n if(walk == -1){break;}\n // convert the binary to a character\n codeCheck = (char) walk;\n // find the huff code for the character\n s2b = codeMap[codeCheck];\n // write the code to new file\n for (int i = 0; i < s2b.length(); i++) {\n bitOut.writeBits(1, Integer.valueOf(s2b.charAt(i)));\n }\n walkCount += 8; // Number of bits read\n }\n bitIn.close();\n bitOut.close();\n return walkCount; \n } catch (IOException e) {\n bitIn.close();\n bitOut.close();\n throw e;\n }\n }", "public static void decompress(InputStream src, OutputStream dst) {\n int key = 1;\n byte[] byteKey = new byte[1];\n byte[] byteValue = new byte[1];\n Map<Integer, byte[]> dictionary = new TreeMap<>();\n\n try {\n // While the end of the file src not reached, read byte.\n while (src.read(byteKey) != -1) {\n // Decompress the stream if the dictionary size exceeds 127 and\n // construct a new dictionary\n if (dictionary.size() == Byte.MAX_VALUE) {\n decompressStream(dictionary, dst);\n dictionary.clear();\n key = 1;\n }\n \n // Get the key\n int result = Util.byteToInt(byteKey[0]);\n \n // Cet the associated value and put it in the dictionary.\n src.read(byteValue);\n if (result == 0) {\n dictionary.put(key, byteValue.clone());\n key++; \n } else if (result > 0) {\n byte[] val = dictionary.get(result);\n byte[] buf = Util.mergeBytes(val, byteValue.clone());\n dictionary.put(key, buf.clone());\n key++;\n }\n }\n decompressStream(dictionary, dst);\n dst.close();\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }", "public StringZipInputStream(InputStream out) {\n\t\tin = new BufferedInputStream(out);\n\t\treadingMap = new String[4096];\n\t\tfor (int charater = 0; charater < 256; charater++)\n\t\t\treadingMap[readingkeysCount++] = \"\" + (char) charater;\n\t\t// readingkeysCount = 256;\n\n\t}", "public CompressionInputStream(InputStream in) {\n super(in);\n }", "public static void zip(File src, OutputStream os) throws IOException {\n\t\tzip(src, os, Charset.defaultCharset().name(), true);\n\t}", "public static void unzip(InputStream is, String outdir) throws IOException {\r\n\r\n\t\tbyte[] buffer = new byte[buffSize];\r\n\r\n\t\tjava.util.zip.ZipInputStream zis = new java.util.zip.ZipInputStream(new BufferedInputStream(is));\r\n\r\n\t\tjava.util.zip.ZipEntry entry;\r\n\r\n\t\ttry {\r\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\r\n\r\n\t\t\t\tFile of = new File(outdir + File.separator + entry.getName());\r\n\r\n\t\t\t\tif (entry.isDirectory()) {\r\n\t\t\t\t\tof.mkdirs();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tFile xx = new File(of.getParent());\r\n\t\t\t\t\tif (!xx.exists()) {\r\n\t\t\t\t\t\tStack<String> todo = new Stack<String>();\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\ttodo.push(xx.getAbsolutePath());\r\n\t\t\t\t\t\t\txx = new File(xx.getParent());\r\n\t\t\t\t\t\t} while (!xx.exists());\r\n\t\t\t\t\t\twhile (todo.size() > 0) {\r\n\t\t\t\t\t\t\txx = new File(todo.pop());\r\n\t\t\t\t\t\t\tif (!xx.exists()) {\r\n\t\t\t\t\t\t\t\txx.mkdirs();\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\r\n\t\t\t\tBufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(of), buffer.length);\r\n\r\n\t\t\t\tcpio(new BufferedInputStream(zis), bos, \"unzip:\" + entry.getName());\r\n\r\n\t\t\t\tbos.flush();\r\n\t\t\t\tbos.close();\r\n\t\t\t}\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t// problem with chars in entry name likely\r\n\t\t}\r\n\t\tzis.close();\r\n\r\n\t}", "void encode(StreamingContent content, OutputStream out) throws IOException;", "@SuppressWarnings(\"PMD.CloseResource\") // PMD does not understand Closer.\n private static void serializeToLz4Data(Serializable object, OutputStream out) {\n try (Closer closer = Closer.create()) {\n OutputStream los = closer.register(new LZ4FrameOutputStream(out));\n ObjectOutputStream oos = closer.register(new ObjectOutputStream(los));\n oos.writeObject(object);\n } catch (Throwable e) {\n throw new BatfishException(\"Failed to convert object to LZ4 data\", e);\n }\n }", "public void mo12621a(InputStream inputStream) throws IOException {\n inputStream.close();\n }", "public void newZipEntry(ZipEntry zipEntry, InputStream inputStream);", "public Pack200CompressorOutputStream(final OutputStream out)\n throws IOException {\n this(out, Pack200Strategy.IN_MEMORY);\n }", "public static OutputStream connect(OutputStream out, InputStream in) {\n return new FilterOutputStream(out) {\n public void close() {\n IO.close(out, in);\n }\n };\n }", "public static void stream(final InputStream in, final OutputStream out) throws IOException {\n\t\tfinal byte buffer[] = new byte[BUFFER_SIZE];\r\n\t\tint len = buffer.length;\r\n\t\twhile (true) {\r\n\t\t\tlen = in.read(buffer);\r\n\t\t\tif (len == -1) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tout.write(buffer, 0, len);\r\n\t\t}\r\n\t\tout.flush();\r\n\t}", "List<CompressResult> compress(Path input, Path output, int maxSizeInMB) throws IOException;", "public void mo12945a(InputStream inputStream) throws IOException {\n inputStream.close();\n }", "public static void encode(InputStream in, OutputStream out)\n throws IOException {\n int[] inBuffer = new int[3];\n\n boolean done = false;\n while (!done && (inBuffer[0] = in.read()) != END_OF_INPUT){\n // Fill the buffer\n inBuffer[1] = in.read();\n inBuffer[2] = in.read();\n\n /*\n * The first byte of input is valid but must check other two bytes\n * are not equal to END_OF_INPUT. Each set of three bytes add up to\n * 24 bits, the 24 bits are split up into 4 bytes of 6 bits and\n * converted to ascii characters.\n *\n * If there are not enough bytes to make a 24 bit group, the\n * remaining ascii characters are converted to the = character.\n */\n\n // Byte 1: first six bits of first byte\n out.write(lookupMap[inBuffer[0]>>2 ]);\n if (inBuffer[1]!=END_OF_INPUT){\n // Byte 2: last two bits of first byte, first four bits of second byte\n out.write(lookupMap[((inBuffer[0]<<4)&0x30)|(inBuffer[1]>>4)]);\n if (inBuffer[2] != END_OF_INPUT){\n // Byte 3: last four bits of second byte, first two bits of third byte\n out.write(lookupMap[((inBuffer[1]<<2)&0x3c)|(inBuffer[2]>>6) ]);\n // Byte 4: last six bits of third byte\n out.write(lookupMap[inBuffer[2]&0x3F]);\n } else {\n // Byte 3: last four bits of second byte\n out.write(lookupMap[((inBuffer[1]<<2)&0x3c)]);\n // Output = if no more characters to write\n out.write('=');\n done = true;\n }\n } else {\n // Byte 2: last two bits of first byte\n out.write(lookupMap[((inBuffer[0]<<4)&0x30)]);\n // Output = if no more characters to write\n out.write('=');\n out.write('=');\n done=true;\n }\n }\n out.flush();\n }", "void flushToOutputStream(OutputStream outputStream) throws IOException;", "private static void compressStream(Map<Byte, byte[]> dictionary,\n OutputStream outs) throws IOException {\n int current_pos = 0;\n byte[] byteStream = new byte[dictionary.size()*2];\n boolean patternExistTwice = false;\n for (Byte key : dictionary.keySet()) {\n patternExistTwice =\n doesPatternExistTwice(dictionary, dictionary.get(key));\n\n // If the pattern already exists twice in the dictionary then it is\n // definitely the end of the dictionary\n if (patternExistTwice && key == dictionary.size()) {\n if (dictionary.get(key).length == 1) {\n byteStream[current_pos] = 0;\n current_pos++;\n } else {\n int realKey =\n getKeyOfSubstring(dictionary, dictionary.get(key));\n byteStream[current_pos] = (byte) realKey;\n current_pos++;\n }\n byteStream[current_pos] = Util.getLastByte(dictionary.get(key));\n current_pos++;\n break;\n }\n\n // Write Node number following by last byte of the corresponding\n // value.\n else {\n if (dictionary.get(key).length == 1) {\n byteStream[current_pos] = 0;\n current_pos++;\n } else {\n int realKey =\n getKeyOfSubstring(dictionary, dictionary.get(key));\n byteStream[current_pos] = (byte) realKey;\n current_pos++;\n }\n byteStream[current_pos] = Util.getLastByte(dictionary.get(key));\n current_pos++;\n }\n }\n\n outs.write(byteStream);\n }", "void readWrite(InputStream in){\r\n try{\r\n jos.putNextEntry(ze);\r\n int i;\r\n byte [] b = new byte[2048];\r\n while((i=in.read(b)) > 0) {\r\n jos.write(b,0,i);\r\n jos.flush();\r\n }\r\n in.close();\r\n }\r\n catch(IOException ie) { ie.printStackTrace(); }\r\n }", "@NotNull OutputStream openOutputStream() throws IOException;", "public static XmlStream streamAndClose(InputStream is) throws Exception {\n return XmlStreamSpec.with(is).closeOnFinish().stream();\n }", "public static void CopyStream(InputStream is, OutputStream os)\n {\n //int total = 0;\n //int size =0;\n\n try\n {\n byte[] bytes = new byte[DEFAULT_BUFFER_SIZE];\n int count;\n while ((count = is.read(bytes, 0, DEFAULT_BUFFER_SIZE)) != -1)\n os.write(bytes, 0, count);\n }\n catch (Exception exp)\n {\n exp.printStackTrace();\n }\n finally\n {\n closeSilently(is, os);\n }\n }", "List<CompressResult> decompress(Path input, Path output) throws IOException;", "protected void redirectStream (InputStream inputStream, OutputStream outputStream)\n throws IOException\n {\n this.logDebug(\"redirectStream 1/2: inputStream = \" + inputStream);\n\n byte[] buffer = new byte[1024];\n int amount = 0;\n while ( (amount = inputStream.read(buffer)) > 0 )\n outputStream.write(buffer, 0, amount);\n outputStream.flush();\n\n this.logDebug(\"redirectStream 2/2\");\n }", "public static final void copyInputStream(InputStream in, OutputStream out) throws IOException {\r\n\t\tcopyInputStream(1024, in, out);\r\n\t}", "public void decompress(BitInputStream in, BitOutputStream out){\n\n\t\tint bits = in.readBits(BITS_PER_INT);\n\t\tif(bits != HUFF_TREE)\n\t\t\tthrow new HuffException(\"Illegal header starts with \"+bits);\n\t\t\n\t\tHuffNode root = readTreeHeader(in);\n\t\treadCompressedBits(root, in, out);\n\t\tout.close();\n\t}", "public void replenish(InputStream inputStream);", "public void useSnappyCompressFile(File in, File out) {\n\n FileInputStream fi = null;\n FileOutputStream fo = null;\n SnappyOutputStream sout = null;\n try {\n fi = new FileInputStream(in);\n fo = new FileOutputStream(out);\n sout = new SnappyOutputStream(fo);\n while (true) {\n int count = fi.read(BUFFER_SIZE, 0, BUFFER_SIZE.length);\n if (count == -1) {\n break;\n }\n sout.write(BUFFER_SIZE, 0, count);\n }\n sout.flush();\n } catch (IOException ex) {\n log.warn(\"compress file failed: {}\",ex.getMessage());\n ex.printStackTrace();\n } finally {\n IOUtils.closeQuietly(sout);\n IOUtils.closeQuietly(fi);\n IOUtils.closeQuietly(fo);\n }\n }", "public static void encode(InputStream in, OutputStream out) throws IOException {\n\t\tencode(in, out, true);\n\t}", "OutputStream createStream(String location);", "String write(InputStream content, boolean noPin);", "public static final void duplicateStream(int bufferSize, InputStream in, OutputStream... out) throws IOException {\r\n\t\tbyte[] buffer = new byte[bufferSize];\r\n\t\tint len;\r\n\t\t\r\n\t while((len = in.read(buffer)) >= 0) {\r\n\t \tfor(OutputStream o : out)\r\n\t\t o.write(buffer, 0, len);\r\n\t }\r\n\t \r\n\t for(OutputStream o : out) {\r\n\t \to.flush();\r\n\t \to.close();\r\n\t }\r\n\t \r\n\t in.close();\r\n\t\t\r\n\t}", "public static void copyStream(InputStream in, OutputStream out) throws IOException {\n\n IOUtilities.copy(in, out);\n }", "public static void copyStream(InputStream input, OutputStream output)\n throws IOException {\n if (input == null || output == null) {\n return;\n }\n IOUtils.copy(input, output);\n }", "public ShpOutputStream(OutputStream os) {\n BufferedOutputStream bos = new BufferedOutputStream(os);\n _leos = new LittleEndianOutputStream(bos);\n }", "public TarInputStream(Stream inputStream)\n\t{\n\t\tthis(inputStream, TarBuffer.DefaultBlockFactor);\n\t}", "public static long copy(InputStream input, OutputStream output) throws IOException {\n byte[] buffer = new byte[1 << 16]; // 64k\n return copy(input, output, buffer);\n }", "public static final void duplicateStream(InputStream in, OutputStream... out) throws IOException {\r\n\t\tduplicateStream(1024, in, out);\r\n\t}", "public static void copyStream(InputStream is, OutputStream os) throws IOException {\r\n copyStream(is, os, DEFAULT_STREAM_BUFFER_SIZE);\r\n }", "public static final void copyInputStream(int bufferSize, InputStream in, OutputStream out) throws IOException {\r\n\t\tbyte[] buffer = new byte[bufferSize];\r\n\t int len;\r\n\r\n\t while((len = in.read(buffer)) >= 0)\r\n\t out.write(buffer, 0, len);\r\n\r\n\t \r\n\t in.close();\r\n\t out.flush();\r\n\t out.close();\r\n\t \r\n\t}", "void serialize(@NotNull OutputStream out) throws IOException;", "public static OutputStream wrapOutput(OutputStream out) throws IOException {\r\n out.write(MARKER);\r\n return new DeflaterOutputStream(new Base64EncoderOutputStream(out));\r\n // you'd think the wrap order would be reversed, but it's not\r\n }", "public static void copyStream(InputStream in, OutputStream out) throws IOException {\n IOUtils.copy(in, out);\n in.close();\n out.close();\n }", "public static void copy(InputStream input, OutputStream output) throws IOException {\n copy(input, output, DEFAULT_BUFFER_SIZE);\n }", "void compress( File input, File output, int level, int language )\r\n throws CompressionException;", "public void finish( OutputStream stream ) throws IOException\n {\n }", "private void streamCopy(InputStream in, OutputStream out) throws IOException {\t \n\t\tsynchronized (in) {\n\t\t\tsynchronized (out) {\n\t\t\t\tbyte[] buffer = new byte[256];\n\t\t\t\twhile (true) {\n\t \t\tint bytesRead = in.read(buffer);\n\t \t\tif (bytesRead == -1) break;\n\t \t\tout.write(buffer, 0, bytesRead);\n\t \t}\n\t \t}\n\t }\n\t}", "public static SnappyOutputStream newChecksumFreeBenchmarkOutputStream(OutputStream out)\n throws IOException\n {\n return new SnappyOutputStream(out, false);\n }", "public static void write(InputStream is, boolean closeInputStream, OutputStream os,\n boolean closeOutputStream) throws IOException {\n try {\n byte[] buffer = new byte[BUFFER_SIZE];\n int count;\n while ((count = is.read(buffer)) != -1) {\n os.write(buffer, 0, count);\n }\n os.flush();\n } finally {\n if (closeInputStream) {\n close(is);\n }\n if (closeOutputStream) {\n close(os);\n }\n }\n }", "private static void copy(InputStream in, OutputStream out) throws IOException {\n byte[] buffer = new byte[4096];\n while (true) {\n int bytesRead = in.read(buffer);\n if (bytesRead < 0) {\n break;\n }\n out.write(buffer, 0, bytesRead);\n }\n }", "byte[] deflate(byte[] data) throws IOException;", "int writeTo(OutputStream out) throws IOException;", "public InflaterInputStream(InputStream in) {\n this(in, in != null ? new Inflater() : null);\n // Android-changed: Unconditionally close external inflaters (b/26462400)\n // usesDefaultInflater = true;\n }", "@Override\n public OutputStream openOutputStream() throws IOException {\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\n return new FilterOutputStream(baos){\n @Override\n public void close() throws IOException {\n writeManifestJarEntry(readManifest(baos));\n }\n };\n }", "public static void unzip(InputStream inputStream, UnzipCallback unzipListener) throws IOException {\r\n\t\tZipInputStream zis = new ZipInputStream(inputStream);\r\n\t\t\r\n\t\tfor(ZipEntry zipEntry = zis.getNextEntry(); zipEntry != null; zipEntry = zis.getNextEntry()) {\r\n\t\t\tunzipListener.newZipEntry(zipEntry, zis);\r\n\t\t\tzis.closeEntry();\r\n\t\t}\r\n\t}", "@Override\n public byte[] compress(byte[] bytes) throws IOException\n {\n try (BinaryIO io = new BinaryIO())\n {\n io.write32Bits(LZW_TAG);\n\n LZWDictionary dict = new LZWDictionary();\n int bitsize = 9, index = -1, newIndex;\n\n for (byte b : bytes)\n {\n newIndex = dict.get(index, b);\n\n if (newIndex > 0)\n index = newIndex;\n else\n {\n io.writeBits(index, bitsize);\n bitsize = dict.put(index, b);\n index = dict.get(-1, b);\n }\n if (dict.isFull())\n dict.reset();\n }\n io\n .writeBits(index, bitsize)\n .write32Bits(0); // EoF marker\n\n return io.getBytesOut();\n }\n }", "protected static synchronized long write(OutputStream out, InputStream in,\n\t\t\tboolean reverseBytePairs) throws IOException {\n\t\tbyte[] block = new byte[4096];\n\n\t\tlong written = 0;\n\t\tint k = read(in, block, block.length);\n\t\tif (reverseBytePairs)\n\t\t\treverseBytePairs(block, k);\n\t\twhile (k != -1) {\n\t\t\twritten += k;\n\t\t\tout.write(block, 0, k);\n\t\t\tk = read(in, block, block.length);\n\t\t\tif (reverseBytePairs)\n\t\t\t\treverseBytePairs(block, k);\n\t\t}\n\t\treturn written;\n\t}", "public final void CopyEntryContents(OutputStream outputStream)\n\t{\n//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:\n//ORIGINAL LINE: byte[] tempBuffer = new byte[32 * 1024];\n\t\tbyte[] tempBuffer = new byte[32 * 1024];\n\n\t\twhile (true)\n\t\t{\n\t\t\tint numRead = Read(tempBuffer, 0, tempBuffer.length);\n\t\t\tif (numRead <= 0)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\toutputStream.write(tempBuffer, 0, numRead);\n\t\t}\n\t}", "public int writeBytes(InputStream in, int length)\r\n/* 617: */ throws IOException\r\n/* 618: */ {\r\n/* 619:628 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 620:629 */ return super.writeBytes(in, length);\r\n/* 621: */ }", "public static ByteArrayOutputStream readZipEntry(ZipInputStream zis)\n \t\t\tthrows IOException {\n \t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n \t\tbyte[] buffer = new byte[BUFFER_SIZE];\n \t\tint size;\n \t\twhile ((size = zis.read(buffer, 0, buffer.length)) != -1) {\n \t\t\tout.write(buffer, 0, size);\n \t\t}\n \t\treturn out;\n \t}", "synchronized void revise(String location, InputStream is)\n throws Exception\n {\n m_archive.revise(location, is);\n try\n {\n Module module = createModule();\n addModule(module);\n }\n catch (Exception ex)\n {\n m_archive.rollbackRevise();\n throw ex;\n }\n }", "public int uncompress(InputStream in, OutputStream out) throws IOException { \n int codeCount = 0;\n int code = 0;\n BitInputStream bitIn = new BitInputStream(in);\n StringBuilder codeString = new StringBuilder(0);\n\n\n // *** Bellow for building array of encoded values ****\n // ****************************************************\n // If the first character in the file is not a space, cannot decompress file\n codeCount = in.read();\n if(codeCount != 32){\n bitIn.close();\n return -1;\n }\n // Read in length of the code, then read the codes number of bits into the code array\n for (int i = 0; i < decodeArr.length; i++) {\n //read in number of bits (length of character code) \n codeCount = bitIn.read();\n \n // Create the code string (reads the number of bits found above)\n for (int j = 0; j < codeCount ; j++) {\n codeString.append(bitIn.readBits(1));\n }\n // Add the code string to the code array\n decodeArr[i] = codeString.toString();\n codeString = new StringBuilder(0);\n }\n // If the character has no code, make it null in array\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i].equals(\"0\")){decodeArr[i] = null;}\n }\n // ****************************************************\n // ****************************************************\n\n\n // ********** Bellow is the decoding process **********\n // ****************************************************\n // Slowly build a sting of binary comparing it to the codes in the map\n // Once a match is found, output the character associated with it.\n try{\n codeString = new StringBuilder(0);\n while (true) { \n // Read in one bit\n code = bitIn.readBits(1);\n // If -1 is returned, reached the end of file\n if(code == -1){break;}\n // Search the code array, writing the character of the code when found\n codeString.append(String.valueOf(code));\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i] != null){ // null means 0 count for a character\n // If the building code string matches a code in the map, write the associated character\n if(decodeArr[i].equals(codeString.toString())){\n out.write(i);\n // vv make ready for next code input\n codeString = new StringBuilder(0);\n }\n }\n }\n }\n }catch (IOException e){\n bitIn.close();\n throw e;\n }\n // ****************************************************\n // ****************************************************\n bitIn.close();\n return 0;\n }", "private static void copy(InputStream is, OutputStream os) throws IOException {\n\t\t int i;\n\t\t byte[] b = new byte[1024];\n\t\t while((i=is.read(b))!=-1) {\n\t\t os.write(b, 0, i);\n\t\t }\n\n\t\t}", "public static int m8443a(int i, InputStream inputStream) {\n if ((i & 128) == 0) {\n return i;\n }\n int i2 = i & 127;\n int i3 = 7;\n while (i3 < 32) {\n int read = inputStream.read();\n if (read != -1) {\n i2 |= (read & 127) << i3;\n if ((read & 128) == 0) {\n return i2;\n }\n i3 += 7;\n } else {\n throw C3606c0.m8181h();\n }\n }\n while (i3 < 64) {\n int read2 = inputStream.read();\n if (read2 == -1) {\n throw C3606c0.m8181h();\n } else if ((read2 & 128) == 0) {\n return i2;\n } else {\n i3 += 7;\n }\n }\n throw C3606c0.m8178e();\n }", "public static int copy(InputStream input, OutputStream output) throws IOException {\n long count = copyLarge(input, output);\n if (count > Integer.MAX_VALUE) {\n return -1;\n }\n return (int) count;\n }", "public void close(InputStream inputStream) {\n inputStream.close();\n }", "@Test\r\n\tpublic void testCompressing() throws ClassNotFoundException,\r\n\t\t\tInstantiationException, IllegalAccessException {\n\r\n\t\tAbstractStream abstractStream = Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.FileStream\");\r\n\t\tCompressingStream stream = (CompressingStream) Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.CompressingStream\");\r\n\t\tstream.setAbstractStream(abstractStream);\r\n\t\tString str = stream.handleBufferFull();\r\n\r\n\t\tbyte[] b = new byte[10];\r\n\t\tfor (int i = 0; i < 10; i++)\r\n\t\t\tb[i] = (byte) i;\r\n\t\tstream.putByte(b);\r\n\t\tSystem.out.println(str);\r\n\t\tassertEquals(\"Compressing Stream. File Stream. \", str);\r\n\t}", "public InputStream inputWrap(InputStream is) \n throws IOException {\n logger.fine(Thread.currentThread().getName() + \" wrapping input\");\n \n // discard any state from previously-recorded input\n this.characterEncoding = null;\n this.inputIsChunked = false;\n this.contentEncoding = null; \n \n this.ris.open(is);\n return this.ris;\n }", "public static void unzip(Context context, InputStream zipFile) {\n try (BufferedInputStream bis = new BufferedInputStream(zipFile)) {\n try (ZipInputStream zis = new ZipInputStream(bis)) {\n ZipEntry ze;\n int count;\n byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\n while ((ze = zis.getNextEntry()) != null) {\n try (FileOutputStream fout = context.openFileOutput(ze.getName(), Context.MODE_PRIVATE)) {\n while ((count = zis.read(buffer)) != -1)\n fout.write(buffer, 0, count);\n }\n }\n }\n } catch (IOException | NullPointerException ex) {\n Log.v(MainActivity.TAG, \"Zip not opened.\\n\"+ex.getMessage());\n }\n }", "public TarOutputStream( OutputStream os, int blockSize ) {\n\t\tthis( os, blockSize, TarBuffer.DEFAULT_RCDSIZE );\n\t\t}", "private static void deploy(SQLiteDatabase sqlLiteDb, InputStream dbStream) throws IOException {\n ZipInputStream zis = new ZipInputStream(new BufferedInputStream(dbStream));\n ZipEntry entry = null;\n while ((entry = zis.getNextEntry()) != null) {\n Log.i(TAG, \"deploying zip entry: \" + entry);\n InputStreamReader dbReader = new InputStreamReader(zis);\n deploy(sqlLiteDb, dbReader);\n }\n }", "public static void transfer(InputStream in, OutputStream out, int offset, int size) throws IOException\n {\n // Read bytes and write to destination until eof\n byte[] buf = new byte[size];\n System.out.println(\"What is it here?\\n\"+buf);\n int lengthBuff = in.read(buf);\n System.out.println(\"The length is: \"+lengthBuff);\n while (lengthBuff != 0)\n {\n out.write(buf, 0, lengthBuff);\n }\n System.out.println(\"End!\");\n }", "@Test\n public void testDERIVATIVE_COMPRESS_CRC() throws IOException {\n// ZipMeVariables.getSINGLETON().setCRC___(true);\n// ZipMeVariables.getSINGLETON().setCOMPRESS___(true);\n// ZipMeVariables.getSINGLETON().setDERIVATIVE_COMPRESS_CRC___(true);\n\t Configuration.CRC=true;\n\t Configuration.COMPRESS=true;\n\t Configuration.DERIVATIVE_COMPRESS_CRC=true;\n if(Configuration.CRC && Configuration.COMPRESS && Configuration.DERIVATIVE_COMPRESS_CRC) { \n ZipOutputStream zout = new ZipOutputStream(new FileOutputStream(new File(\n homeDir + \"/files/src.zip\")));\n zout.crc.update(1);\n ZipEntry ze = new ZipEntry(\"C://\");\n zout.putNextEntry(ze);\n zout.hook41();\n assertTrue(zout.crc.crc == 0);\n\n zout.write(new byte[32], 0, 31);\n assertTrue(zout.size == 31);\n zout.closeEntry();\n assertTrue(ze.getCrc() == zout.crc.crc);\n }\n }", "public static final void transcodeAndWrite(byte[] input, \r\n java.io.OutputStream os,\r\n int offset, int length, int input_encoding, int output_encoding)\r\n throws TranscodeException,\r\n IOException {\n int k = offset;\r\n int c;\r\n while (k < offset + length) {\r\n long l = decode(input, k, input_encoding);\r\n k = (int) (l >> 32);\r\n c = (int) l;\r\n encodeAndWrite(os, c, output_encoding);\r\n }\r\n }", "Archiver(File fileIn, File fileOut) throws IOException {\n\n InputStream fileStreamIn = new FileInputStream(fileIn);\n ArrayList<Integer> bytes = Constants.readBytesAndPushToArray(fileStreamIn);\n HashSet<Integer> uniqueBytesArray = getUniqueBytes(bytes);\n ArrayList<String> bitsArray = Constants.getBitsArray(Constants.chooseBitsSize(uniqueBytesArray.size()), bytes.size());\n HashMap<Integer, String> dictionary = createDictionary(uniqueBytesArray, bitsArray);\n ByteArrayOutputStream archivedFile = archiveFile(bytes, dictionary);\n FileOutputStream newFile = new FileOutputStream(fileOut);\n archivedFile.writeTo(newFile);\n System.out.println( \"The size of the file which was IN: \" + fileIn.length());\n System.out.println(\"The size of the file which was OUT: \" + fileOut.length());\n System.out.println(\"File archived is smaller than unarchived by \" + (100 - ((fileOut.length() * 100) / fileIn.length())) +\"%.\" );\n }", "public static void encode(InputStream in, OutputStream out, int len) \n throws IOException {\n if(len%4!=0)\n throw new IllegalArgumentException(\"Length must be a multiple of 4\");\n\n // Read input stream until end of file\n int bits=0;\n int nbits=0;\n int nbytes=0;\n int b;\n\n while( (b=in.read()) != -1) {\n bits=(bits<<8)|b;\n nbits+=8;\n while(nbits>=6) {\n\tnbits-=6;\n\tout.write(encTab[0x3f&(bits>>nbits)]);\n\tnbytes ++;\n\t// New line\n\tif (len !=0 && nbytes>=len) {\n\t out.write(0x0d);\n\t out.write(0x0a);\n\t nbytes -= len;\n\t}\n }\n }\n\n switch(nbits) {\n case 2:\n out.write(encTab[0x3f&(bits<<4)]);\n out.write(0x3d); // 0x3d = '='\n out.write(0x3d);\n break;\n case 4:\n out.write(encTab[0x3f&(bits<<2)]);\n out.write(0x3d);\n break;\n }\n\n if (len != 0) {\n if (nbytes != 0) {\n\tout.write(0x0d);\n\tout.write(0x0a);\n }\n out.write(0x0d);\n out.write(0x0a);\n }\n }", "public static long copyLarge(InputStream input, OutputStream output)\n throws IOException {\n byte[] buffer = new byte[DEFAULT_BUFFER_SIZE];\n long count = 0;\n int n = 0;\n while (-1 != (n = input.read(buffer))) {\n output.write(buffer, 0, n);\n count += n;\n }\n return count;\n }", "public static InputStream openInputStreamGZ(ResourceLocator locator) throws IOException {\n\n InputStream inputStream = null;\n\n if (isDataURL(locator.getPath())) {\n String dataURL = locator.getPath();\n int commaIndex = dataURL.indexOf(',');\n if (commaIndex < 0) {\n throw new Error(\"dataURL missing commas\");\n }\n // TODO -- check optional media type - only text/plain supported\n String contents = URLDecoder.decode(dataURL.substring(commaIndex + 1), StandardCharsets.UTF_8);\n return new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8));\n } else if (HttpUtils.isRemoteURL(locator.getPath())) {\n URL url = HttpUtils.createURL(locator.getPath());\n inputStream = HttpUtils.getInstance().openConnectionStream(url);\n } else {\n String path = locator.getPath();\n if (path.startsWith(\"file://\")) {\n path = path.substring(7);\n }\n File file = new File(path);\n inputStream = new FileInputStream(file);\n }\n\n if (locator.getPath().endsWith(\"gz\")) {\n return new GZIPInputStream(inputStream);\n } else {\n return inputStream;\n }\n }", "public TarOutputStream( OutputStream os ) {\n\t\tthis( os, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE );\n\t\t}", "public void close() throws IOException {\n\t\tif (keyClass != null) {\n\t\t keySerializer.close();\n\t\t valueSerializer.close();\n\t\t}\n\n\t\t// Write EOF_MARKER for key/value length\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tdecompressedBytesWritten += 2 * WritableUtils.getVIntSize(EOF_MARKER);\n \n\t\t//Flush the stream\n\t\tout.flush();\n \n\t\tif (compressOutput) {\n\t\t // Flush\n\t\t compressedOut.finish();\n\t\t compressedOut.resetState();\n\t\t}\n \n\t\t// Close the underlying stream iff we own it...\n\t\tif (ownOutputStream) {\n\t\t out.close();\n\t\t}\n\t\telse {\n\t\t // Write the checksum\n\t\t checksumOut.finish();\n\t\t}\n\n\t\tcompressedBytesWritten = rawOut.getPos() - start;\n\n\t\tif (compressOutput) {\n\t\t // Return back the compressor\n\t\t CodecPool.returnCompressor(compressor);\n\t\t compressor = null;\n\t\t}\n\n\t\tout = null;\n\t\tif(writtenRecordsCounter != null) {\n\t\t writtenRecordsCounter.increment(numRecordsWritten);\n\t\t}\n\t }", "public void put(Bitstream bitstream, InputStream in) throws IOException {\n try {\n File file = getFile(bitstream);\n\n // Make the parent dirs if necessary\n File parent = file.getParentFile();\n if (!parent.exists()) {\n parent.mkdirs();\n }\n //Create the corresponding file and open it\n file.createNewFile();\n\n try (\n FileOutputStream fos = new FileOutputStream(file);\n // Read through a digest input stream that will work out the MD5\n DigestInputStream dis = new DigestInputStream(in, MessageDigest.getInstance(CSA));\n ) {\n Utils.bufferedCopy(dis, fos);\n in.close();\n\n bitstream.setSizeBytes(file.length());\n bitstream.setChecksum(Utils.toHex(dis.getMessageDigest().digest()));\n bitstream.setChecksumAlgorithm(CSA);\n } catch (NoSuchAlgorithmException nsae) {\n // Should never happen\n log.warn(\"Caught NoSuchAlgorithmException\", nsae);\n }\n } catch (Exception e) {\n log.error(\"put(\" + bitstream.getInternalId() + \", inputstream)\", e);\n throw new IOException(e);\n }\n }", "public static InputStream connect(InputStream in, OutputStream out) {\n return new FilterInputStream(in) {\n public void close() {\n IO.close(out, in);\n }\n };\n }", "public static void write(InputStream is, OutputStream os) throws IOException {\n write(is, true, os, true);\n }", "private String compressString(String input) throws IOException {\n\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\n\t\tGZIPOutputStream gzip = new GZIPOutputStream(output);\n\n\t\tgzip.write(input.getBytes(\"UTF-8\"));\n\t\tgzip.close();\n\t\toutput.close();\n\n\t\treturn Base64.encodeBase64String(output.toByteArray());\n\t}", "public static int copy(final InputStream input, final OutputStream output) throws IOException {\n final long count = copyLarge(input, output);\n if (count > Integer.MAX_VALUE) {\n return -1;\n }\n return (int) count;\n }", "public static int copy(final InputStream input, final OutputStream output) throws IOException {\n final long count = copyLarge(input, output);\n if (count > Integer.MAX_VALUE) {\n return -1;\n }\n return (int) count;\n }", "public SnappyOutputStream(OutputStream out)\n throws IOException\n {\n this(out, true);\n }", "public TarInputStream(Stream inputStream, int blockFactor)\n\t{\n\t\tthis.inputStream = inputStream;\n\t\ttarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);\n\t}", "public Pack200CompressorOutputStream(final OutputStream out,\n final Pack200Strategy mode)\n throws IOException {\n this(out, mode, null);\n }", "public static byte[] compressReference(Reference dto) {\r\n\t\ttry {\r\n\t\t\treturn JDOSecondaryPropertyUtils.compressObject(X_STREAM, dto);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t}", "private ZipCompressor(){}", "static void solve(InputStream is, PrintStream os) {\n }", "public static void decode(InputStream in, OutputStream out) throws IOException {\n\t\tdecode(in, out, true);\n\t}" ]
[ "0.54416233", "0.5251867", "0.52410597", "0.522758", "0.5207178", "0.5152998", "0.51497424", "0.5121275", "0.51033217", "0.50728077", "0.5056724", "0.50348747", "0.49788108", "0.4880499", "0.48206297", "0.4794419", "0.47834048", "0.47755384", "0.4739403", "0.46958232", "0.46156764", "0.4613479", "0.46122852", "0.45924917", "0.45895568", "0.4577896", "0.4570729", "0.45683444", "0.4564644", "0.45618612", "0.45475507", "0.45397997", "0.45259959", "0.45104092", "0.44989014", "0.44957963", "0.4486628", "0.44856006", "0.4475811", "0.44608098", "0.4456997", "0.4447615", "0.44311738", "0.44281828", "0.44133174", "0.44105703", "0.4403816", "0.43971235", "0.43896237", "0.43790582", "0.43594515", "0.43413088", "0.4339736", "0.43268463", "0.43189827", "0.4318141", "0.4317205", "0.43078515", "0.42995718", "0.42887887", "0.428531", "0.42844108", "0.428144", "0.42800647", "0.427907", "0.42778772", "0.42734194", "0.42652142", "0.424849", "0.42472592", "0.42447037", "0.42426097", "0.4225219", "0.4214387", "0.42129332", "0.42086312", "0.42019787", "0.4201602", "0.41998273", "0.41980016", "0.41892928", "0.41892692", "0.4179176", "0.41768783", "0.4173125", "0.41598284", "0.41569406", "0.41521493", "0.41437563", "0.41421777", "0.41415167", "0.4139665", "0.4139665", "0.41376397", "0.41373315", "0.41327313", "0.4126696", "0.4124074", "0.4117774", "0.41140962" ]
0.50937974
9
Decompresses the specified InputStream to the specified OutputStream
public static void decompress(InputStream src, OutputStream dst) { int key = 1; byte[] byteKey = new byte[1]; byte[] byteValue = new byte[1]; Map<Integer, byte[]> dictionary = new TreeMap<>(); try { // While the end of the file src not reached, read byte. while (src.read(byteKey) != -1) { // Decompress the stream if the dictionary size exceeds 127 and // construct a new dictionary if (dictionary.size() == Byte.MAX_VALUE) { decompressStream(dictionary, dst); dictionary.clear(); key = 1; } // Get the key int result = Util.byteToInt(byteKey[0]); // Cet the associated value and put it in the dictionary. src.read(byteValue); if (result == 0) { dictionary.put(key, byteValue.clone()); key++; } else if (result > 0) { byte[] val = dictionary.get(result); byte[] buf = Util.mergeBytes(val, byteValue.clone()); dictionary.put(key, buf.clone()); key++; } } decompressStream(dictionary, dst); dst.close(); } catch (IOException e) { System.err.println("An error happened while decompressing."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void decompressStream(Map<Integer, byte[]> dictionary,\n OutputStream os) {\n byte[] byteStream = new byte[0];\n\n for (Integer key : dictionary.keySet()) {\n byteStream = Util.mergeBytes(byteStream,\n dictionary.get(key).clone());\n }\n try {\n os.write(byteStream);\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }", "public static void decode(InputStream in, OutputStream out) throws IOException {\n\t\tdecode(in, out, true);\n\t}", "void flushToOutputStream(OutputStream outputStream) throws IOException;", "public static void unzip(InputStream is, String outdir) throws IOException {\r\n\r\n\t\tbyte[] buffer = new byte[buffSize];\r\n\r\n\t\tjava.util.zip.ZipInputStream zis = new java.util.zip.ZipInputStream(new BufferedInputStream(is));\r\n\r\n\t\tjava.util.zip.ZipEntry entry;\r\n\r\n\t\ttry {\r\n\t\t\twhile ((entry = zis.getNextEntry()) != null) {\r\n\r\n\t\t\t\tFile of = new File(outdir + File.separator + entry.getName());\r\n\r\n\t\t\t\tif (entry.isDirectory()) {\r\n\t\t\t\t\tof.mkdirs();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tFile xx = new File(of.getParent());\r\n\t\t\t\t\tif (!xx.exists()) {\r\n\t\t\t\t\t\tStack<String> todo = new Stack<String>();\r\n\t\t\t\t\t\tdo {\r\n\t\t\t\t\t\t\ttodo.push(xx.getAbsolutePath());\r\n\t\t\t\t\t\t\txx = new File(xx.getParent());\r\n\t\t\t\t\t\t} while (!xx.exists());\r\n\t\t\t\t\t\twhile (todo.size() > 0) {\r\n\t\t\t\t\t\t\txx = new File(todo.pop());\r\n\t\t\t\t\t\t\tif (!xx.exists()) {\r\n\t\t\t\t\t\t\t\txx.mkdirs();\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\r\n\t\t\t\tBufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(of), buffer.length);\r\n\r\n\t\t\t\tcpio(new BufferedInputStream(zis), bos, \"unzip:\" + entry.getName());\r\n\r\n\t\t\t\tbos.flush();\r\n\t\t\t\tbos.close();\r\n\t\t\t}\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t// problem with chars in entry name likely\r\n\t\t}\r\n\t\tzis.close();\r\n\r\n\t}", "public void finish( OutputStream stream ) throws IOException\n {\n }", "public static void stream(final InputStream in, final OutputStream out) throws IOException {\n\t\tfinal byte buffer[] = new byte[BUFFER_SIZE];\r\n\t\tint len = buffer.length;\r\n\t\twhile (true) {\r\n\t\t\tlen = in.read(buffer);\r\n\t\t\tif (len == -1) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tout.write(buffer, 0, len);\r\n\t\t}\r\n\t\tout.flush();\r\n\t}", "public static void decrypt(String key, InputStream is, OutputStream os) throws Throwable {\n\t\tencryptOrDecrypt(key, Cipher.DECRYPT_MODE, is, os);\n\t}", "public static OutputStream connect(OutputStream out, InputStream in) {\n return new FilterOutputStream(out) {\n public void close() {\n IO.close(out, in);\n }\n };\n }", "public void decompress(BitInputStream in, BitOutputStream out){\n\n\t\tint bits = in.readBits(BITS_PER_INT);\n\t\tif(bits != HUFF_TREE)\n\t\t\tthrow new HuffException(\"Illegal header starts with \"+bits);\n\t\t\n\t\tHuffNode root = readTreeHeader(in);\n\t\treadCompressedBits(root, in, out);\n\t\tout.close();\n\t}", "protected InputStream unarmor(InputStream stream)\r\n\t\t\tthrows IOException, PGPException {\r\n\t\treturn PGPUtil.getDecoderStream(stream);\r\n\t}", "public void close() throws IOException {\n\t\tin.close();\n \n\t\t// Release the buffer\n\t\tdataIn = null;\n\t\tbuffer = null;\n\t\tif(readRecordsCounter != null) {\n\t\t readRecordsCounter.increment(numRecordsRead);\n\t\t}\n\n\t\t// Return the decompressor\n\t\tif (decompressor != null) {\n\t\t decompressor.reset();\n\t\t CodecPool.returnDecompressor(decompressor);\n\t\t decompressor = null;\n\t\t}\n\t }", "public void replenish(InputStream inputStream);", "public static void copy(InputStream input, OutputStream output) throws IOException {\n try {\n byte[] buffer = new byte[GCSFetcher.BUFFER_SIZE];\n int bytesRead = input.read(buffer);\n while (bytesRead != -1) {\n output.write(buffer, 0, bytesRead);\n bytesRead = input.read(buffer);\n }\n } finally {\n input.close();\n output.close();\n }\n }", "protected void redirectStream (InputStream inputStream, OutputStream outputStream)\n throws IOException\n {\n this.logDebug(\"redirectStream 1/2: inputStream = \" + inputStream);\n\n byte[] buffer = new byte[1024];\n int amount = 0;\n while ( (amount = inputStream.read(buffer)) > 0 )\n outputStream.write(buffer, 0, amount);\n outputStream.flush();\n\n this.logDebug(\"redirectStream 2/2\");\n }", "List<CompressResult> decompress(Path input, Path output) throws IOException;", "public StreamUnzipper(InputStream zipStream, File destDir)\n {\n if (zipStream == null)\n throw new IllegalArgumentException(\"zip stream cannot be null\");\n this.zis = new ZipInputStream(zipStream);\n this.destDir = destDir;\n }", "public void decrypt(String key, InputStream inputDataStream, OutputStream outDataStream) throws IOException, InvalidCipherTextException {\n bcAES = new BouncyCastleAPI_AES_CBC(key.getBytes(), initializationVector);\n bcAES.InitCiphers();\n bcAES.CBCDecrypt(inputDataStream, outDataStream);\n }", "static void decompress(final DataInputStream input, final byte[] result, int offset, int length) throws IOException {\n int resultPos = offset;\n int remaining = length;\n\n while (remaining > 0) {\n byte run = input.readByte();\n int runLength;\n\n if ((run & 0x80) != 0) {\n // Compressed run\n runLength = run + 131; // PackBits: -run + 1 and run == 0x80 is no-op... This allows 1 byte longer runs...\n\n byte runData = input.readByte();\n\n for (int i = 0; i < runLength; i++) {\n result[resultPos++] = runData;\n }\n }\n else {\n // Uncompressed run\n runLength = run + 1;\n\n input.readFully(result, resultPos, runLength);\n resultPos += runLength;\n }\n\n remaining -= runLength;\n }\n }", "public static void copyStream(InputStream input, OutputStream output)\n throws IOException {\n if (input == null || output == null) {\n return;\n }\n IOUtils.copy(input, output);\n }", "public byte[] decompress() throws FlateDecompressException {\r\n //byte[] newData = new byte[16384];\r\n byte[] newData = new byte[1024*512];\r\n int len;\r\n try {\r\n while ((len=in.read(newData, 0, newData.length)) != -1) {\r\n out.write(newData, 0, len);\r\n }\r\n out.close();\r\n in.close();\r\n } catch (java.util.zip.ZipException ze) {\r\n ze.printStackTrace();\r\n //throw new FlateDecompressException(\"ZipException during decompression\");\r\n byte[] r = {0x0D, 0x0A};\r\n return r;\r\n } catch (java.io.IOException e) {\r\n e.printStackTrace();\r\n throw new FlateDecompressException(\"IO Exception during decompression\");\r\n }\r\n return out.toByteArray(); \r\n }", "public static void copyStream(InputStream in, OutputStream out) throws IOException {\n IOUtils.copy(in, out);\n in.close();\n out.close();\n }", "public static void copyStreamSilently(InputStream in, OutputStream out) {\n try {\n copyStream(in, out);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static final void copyInputStream(InputStream in, OutputStream out) throws IOException {\r\n\t\tcopyInputStream(1024, in, out);\r\n\t}", "public void closeStream() {\n output.close();\n input.close();\n }", "public static void copyStream(InputStream in, OutputStream out) throws IOException {\n\n IOUtilities.copy(in, out);\n }", "public COSFilterFlateDecode(ASInputStream stream) throws IOException {\n super(stream);\n inflater = new Inflater();\n }", "private byte[] decompress(byte[] content) throws IOException {\n ByteArrayInputStream bais = new ByteArrayInputStream(content);\n try (GZIPInputStream is = new GZIPInputStream(bais)) {\n return IOUtils.toByteArray(is);\n }\n }", "@Override\n\tpublic void Decompress() {\n\t\t\n\t}", "public final static void pipe(final InputStream in, final OutputStream out)\n {\n new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n try\n {\n IOUtils.copy(in, out);\n }\n catch (IOException e)\n {\n // Do nothing\n }\n }\n }).start();\n }", "public static void decodeToStream(byte[] bytes, OutputStream out) throws IOException {\n\t\tByteArrayInputStream in = new ByteArrayInputStream(bytes);\n\t\tdecode(in, out, false);\n\t}", "public static void CopyStream(InputStream is, OutputStream os)\n {\n //int total = 0;\n //int size =0;\n\n try\n {\n byte[] bytes = new byte[DEFAULT_BUFFER_SIZE];\n int count;\n while ((count = is.read(bytes, 0, DEFAULT_BUFFER_SIZE)) != -1)\n os.write(bytes, 0, count);\n }\n catch (Exception exp)\n {\n exp.printStackTrace();\n }\n finally\n {\n closeSilently(is, os);\n }\n }", "private void streamCopy(InputStream in, OutputStream out) throws IOException {\t \n\t\tsynchronized (in) {\n\t\t\tsynchronized (out) {\n\t\t\t\tbyte[] buffer = new byte[256];\n\t\t\t\twhile (true) {\n\t \t\tint bytesRead = in.read(buffer);\n\t \t\tif (bytesRead == -1) break;\n\t \t\tout.write(buffer, 0, bytesRead);\n\t \t}\n\t \t}\n\t }\n\t}", "public static final void copyInputStream(int bufferSize, InputStream in, OutputStream out) throws IOException {\r\n\t\tbyte[] buffer = new byte[bufferSize];\r\n\t int len;\r\n\r\n\t while((len = in.read(buffer)) >= 0)\r\n\t out.write(buffer, 0, len);\r\n\r\n\t \r\n\t in.close();\r\n\t out.flush();\r\n\t out.close();\r\n\t \r\n\t}", "public void close() throws IOException {\n\t\tif (keyClass != null) {\n\t\t keySerializer.close();\n\t\t valueSerializer.close();\n\t\t}\n\n\t\t// Write EOF_MARKER for key/value length\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tdecompressedBytesWritten += 2 * WritableUtils.getVIntSize(EOF_MARKER);\n \n\t\t//Flush the stream\n\t\tout.flush();\n \n\t\tif (compressOutput) {\n\t\t // Flush\n\t\t compressedOut.finish();\n\t\t compressedOut.resetState();\n\t\t}\n \n\t\t// Close the underlying stream iff we own it...\n\t\tif (ownOutputStream) {\n\t\t out.close();\n\t\t}\n\t\telse {\n\t\t // Write the checksum\n\t\t checksumOut.finish();\n\t\t}\n\n\t\tcompressedBytesWritten = rawOut.getPos() - start;\n\n\t\tif (compressOutput) {\n\t\t // Return back the compressor\n\t\t CodecPool.returnCompressor(compressor);\n\t\t compressor = null;\n\t\t}\n\n\t\tout = null;\n\t\tif(writtenRecordsCounter != null) {\n\t\t writtenRecordsCounter.increment(numRecordsWritten);\n\t\t}\n\t }", "public static void copyStream(InputStream is, OutputStream os) throws IOException {\r\n copyStream(is, os, DEFAULT_STREAM_BUFFER_SIZE);\r\n }", "void exportDenormalized(OutputStream outputStream, Settings settings);", "public void flush() {\n\r\n int inflatedSize = buffer.position();\r\n deflator.setInput(buffer.getBuffer(), 0, inflatedSize);\r\n deflator.finish();\r\n int deflatedSize = deflator.deflate(compressionBuffer.array());\r\n deflator.reset();\r\n\r\n try {\r\n outputStream.writeInt(deflatedSize);\r\n outputStream.writeInt(inflatedSize);\r\n outputStream.write(compressionBuffer.array(), 0, deflatedSize);\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(\"Failed to write compressed data to stream\", e);\r\n }\r\n\r\n buffer.clear();\r\n compressionBuffer.clear();\r\n }", "public int uncompress(InputStream in, OutputStream out) throws IOException { \n int codeCount = 0;\n int code = 0;\n BitInputStream bitIn = new BitInputStream(in);\n StringBuilder codeString = new StringBuilder(0);\n\n\n // *** Bellow for building array of encoded values ****\n // ****************************************************\n // If the first character in the file is not a space, cannot decompress file\n codeCount = in.read();\n if(codeCount != 32){\n bitIn.close();\n return -1;\n }\n // Read in length of the code, then read the codes number of bits into the code array\n for (int i = 0; i < decodeArr.length; i++) {\n //read in number of bits (length of character code) \n codeCount = bitIn.read();\n \n // Create the code string (reads the number of bits found above)\n for (int j = 0; j < codeCount ; j++) {\n codeString.append(bitIn.readBits(1));\n }\n // Add the code string to the code array\n decodeArr[i] = codeString.toString();\n codeString = new StringBuilder(0);\n }\n // If the character has no code, make it null in array\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i].equals(\"0\")){decodeArr[i] = null;}\n }\n // ****************************************************\n // ****************************************************\n\n\n // ********** Bellow is the decoding process **********\n // ****************************************************\n // Slowly build a sting of binary comparing it to the codes in the map\n // Once a match is found, output the character associated with it.\n try{\n codeString = new StringBuilder(0);\n while (true) { \n // Read in one bit\n code = bitIn.readBits(1);\n // If -1 is returned, reached the end of file\n if(code == -1){break;}\n // Search the code array, writing the character of the code when found\n codeString.append(String.valueOf(code));\n for (int i = 0; i < decodeArr.length; i++) {\n if(decodeArr[i] != null){ // null means 0 count for a character\n // If the building code string matches a code in the map, write the associated character\n if(decodeArr[i].equals(codeString.toString())){\n out.write(i);\n // vv make ready for next code input\n codeString = new StringBuilder(0);\n }\n }\n }\n }\n }catch (IOException e){\n bitIn.close();\n throw e;\n }\n // ****************************************************\n // ****************************************************\n bitIn.close();\n return 0;\n }", "private void closeStream() throws IOException {\n if (originalInputStream != inputStream) {\n // Close the byte input stream or file input stream, if either is the current one\n inputStream.close();\n }\n\n if (closeOriginalStreamOnClose) {\n originalInputStream.close();\n }\n }", "public void transfer(InputStream in, OutputStream out) throws IOException {\n int byteIn;\n while ((byteIn = in.read()) != -1) {\n out.write(byteIn);\n }\n out.flush();\n }", "void deserialize(@NotNull InputStream in) throws IOException;", "private static void copy(InputStream in, OutputStream out) throws IOException {\n byte[] buffer = new byte[4096];\n while (true) {\n int bytesRead = in.read(buffer);\n if (bytesRead < 0) {\n break;\n }\n out.write(buffer, 0, bytesRead);\n }\n }", "protected static synchronized long write(OutputStream out, InputStream in,\n\t\t\tboolean reverseBytePairs) throws IOException {\n\t\tbyte[] block = new byte[4096];\n\n\t\tlong written = 0;\n\t\tint k = read(in, block, block.length);\n\t\tif (reverseBytePairs)\n\t\t\treverseBytePairs(block, k);\n\t\twhile (k != -1) {\n\t\t\twritten += k;\n\t\t\tout.write(block, 0, k);\n\t\t\tk = read(in, block, block.length);\n\t\t\tif (reverseBytePairs)\n\t\t\t\treverseBytePairs(block, k);\n\t\t}\n\t\treturn written;\n\t}", "Decompress() {\r\n // this.destinationLocation = null ; //destinationLocation;\r\n }", "protected abstract ByteBuf decompress(ByteBuf compressed, int originalLength) throws Exception;", "public static XmlStream streamAndClose(InputStream is) throws Exception {\n return XmlStreamSpec.with(is).closeOnFinish().stream();\n }", "public static void copy(InputStream input, OutputStream output) throws IOException {\n copy(input, output, DEFAULT_BUFFER_SIZE);\n }", "public static void decompress(PfssCompressed _src, PfssDecompressed _dest)\n\t{\n\t\tif (!_src.isLoaded())\n\t\t\treturn;\n\n\t\tif (_dest.isDataAssigned())\n\t\t\treturn;\n\t\t\n\t\ttry (InputStream is = new ByteArrayInputStream(UnRar.unrarData(_src).toByteArray()))\n\t\t{\n\t\t\tFits fits = new Fits(is, false);\n\t\t\tBasicHDU hdus[] = fits.read();\n\t\t\tBinaryTableHDU bhdu = (BinaryTableHDU) hdus[1];\n\n\t\t\tfloat b0 = bhdu.getHeader().getFloatValue(\"B0\");\n\t\t\tfloat l0 = bhdu.getHeader().getFloatValue(\"L0\");\n\t\t\tfloat Q1 = bhdu.getHeader().getFloatValue(\"Q1\");\n\t\t\tfloat Q2 = bhdu.getHeader().getFloatValue(\"Q2\");\n\t\t\tfloat Q3 = bhdu.getHeader().getFloatValue(\"Q3\");\n\n\t\t\tbyte[] line_length = ((byte[][]) bhdu.getColumn(\"LEN\"))[0];\n\t\t\tbyte[] xRaw = ((byte[][]) bhdu.getColumn(\"X\"))[0];\n\t\t\tbyte[] yRaw = ((byte[][]) bhdu.getColumn(\"Y\"))[0];\n\t\t\tbyte[] zRaw = ((byte[][]) bhdu.getColumn(\"Z\"))[0];\n\n\t\t\tint[] lengths = ByteDecoder.decodeAdaptiveUnsigned(line_length);\n\t\t\tint[] xInt = ByteDecoder.decodeAdaptive(xRaw);\n\t\t\tint[] yInt = ByteDecoder.decodeAdaptive(yRaw);\n\t\t\tint[] zInt = ByteDecoder.decodeAdaptive(zRaw);\n\n\t\t\tIntermediateLineData[] lines = IntermediateLineData.splitToLines(lengths, xInt, yInt, zInt);\n\t\t\tfor (IntermediateLineData l : lines)\n\t\t\t\tl.decodePrediction(Q1, Q2, Q3);\n\n\t\t\tArrayList<DecompressedLine> decompressedLines = new ArrayList<>(lines.length);\n\t\t\tfor (IntermediateLineData line : lines)\n\t\t\t\tdecompressedLines.add(new DecompressedLine(line));\n\n\t\t\tconvertToBuffers(decompressedLines, l0, b0, _dest);\n\t\t}\n\t\tcatch (FitsException | IOException e)\n\t\t{\n\t\t\tTelemetry.trackException(e);\n\t\t}\n\t}", "public InputStream decrypt(InputStream encryptedStream, @Nonnull String secret) throws IOException {\n byte[] salt = readSaltHeader(encryptedStream);\n Cipher cipher = createCipher(Cipher.DECRYPT_MODE, secret, salt);\n return new CipherInputStream(encryptedStream, cipher);\n }", "public static void closeOutputStream(OutputStream outputStream) throws Exception {\n\tif (null != outputStream) {\n\t outputStream.close();\n\t}\n }", "public static void compress(InputStream fins, OutputStream outs) {\n int value = 1;\n byte[] pattern = new byte[0];\n byte[] byteArray = new byte[8192];\n boolean isEmpty = true;\n Map<Byte, byte[]> dictionary = new TreeMap<>();\n boolean patternAlreadyExist;\n int numberOfBytesRead;\n\n try {\n // While the end of file is not reached.\n while ((numberOfBytesRead = fins.read(byteArray)) != -1) {\n for (int i = 0; i < numberOfBytesRead; i++) {\n //Compress the stream if the dictionary size exceeds 127,\n // and construct a new dictionary\n if (dictionary.size() == Byte.MAX_VALUE) {\n if (!isEmpty) {\n dictionary.put((byte) value, pattern);\n }\n compressStream(dictionary, outs);\n dictionary.clear();\n value = 1;\n }\n\n // Read pattern corresponding to an array of bytes.\n byte[] temp = Util.mergeBytes(pattern, byteArray[i]);\n pattern = temp;\n patternAlreadyExist = doesPatternExist(dictionary, pattern);\n\n // Add the pattern to the dictionary if its doesn't exist.\n if (!patternAlreadyExist) {\n dictionary.put((byte) value, pattern.clone());\n value++;\n pattern = new byte[0];\n isEmpty = true;\n\n // If it already exists, read the next byte in the IS\n } else {\n isEmpty = false;\n continue;\n }\n }\n }\n\n // Insert the pattern in the dictionary if the end of the file is\n // reached and the pattern already exist.\n if (!isEmpty) {\n dictionary.put((byte) value, pattern.clone());\n }\n compressStream(dictionary, outs);\n outs.close();\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }", "public CompressionInputStream(InputStream in) {\n super(in);\n }", "void serialize(@NotNull OutputStream out) throws IOException;", "public static void copyInputToOutput(\n InputStream input,\n OutputStream output,\n long byteCount)\n throws IOException {\n int bytes;\n long length;\n \n BufferedInputStream in = new BufferedInputStream(input);\n BufferedOutputStream out = new BufferedOutputStream(output);\n \n byte[] buffer;\n buffer = new byte[8192];\n \n for (length = byteCount; length > 0;) {\n bytes = (int) (length > 8192 ? 8192 : length);\n \n try {\n bytes = in.read(buffer, 0, bytes);\n } catch (IOException ex) {\n try {\n in.close();\n out.close();\n } catch (IOException ex1) {\n }\n throw new IOException(\n \"Reading input stream, \" + ex.getMessage());\n }\n \n if (bytes < 0)\n break;\n \n length -= bytes;\n \n try {\n out.write(buffer, 0, bytes);\n } catch (IOException ex) {\n try {\n in.close();\n out.close();\n } catch (IOException ex1) {\n }\n throw new IOException(\n \"Writing output stream, \" + ex.getMessage());\n }\n }\n \n try {\n in.close();\n out.close();\n } catch (IOException ex) {\n throw new IOException(\"Closing file streams, \" + ex.getMessage());\n }\n }", "public void compress(BitInputStream in, BitOutputStream out){\n\n\t\t\tint[] counts = readForCounts(in);\n\t\t\tHuffNode root = makeTree(counts);\n\t\t\tMap<Integer, String> codings = makeCodingsFromTree(root);\n\t\t\twriter(root, out);\n\t\t\tin.reset();\n\t\t\twriteCompressedBits(in, codings, out);\n\t\t\tout.close();\n\t\t}", "public static void transfer(InputStream in, OutputStream out, int offset, int size) throws IOException\n {\n // Read bytes and write to destination until eof\n byte[] buf = new byte[size];\n System.out.println(\"What is it here?\\n\"+buf);\n int lengthBuff = in.read(buf);\n System.out.println(\"The length is: \"+lengthBuff);\n while (lengthBuff != 0)\n {\n out.write(buf, 0, lengthBuff);\n }\n System.out.println(\"End!\");\n }", "protected abstract OutputStream getStream() throws IOException;", "private void closeOutputStream() {\n\t\tPrintStreamManagement.closeOutputStream();\n\t}", "public static InputStream getDecompressingInputStream(final HttpResponse<InputStream> resp) throws IOException {\n final String encoding = resp.headers().firstValue(\"Content-Encoding\").orElse(\"identity\").toLowerCase(Locale.ROOT).trim();\n log.debug(\"HTTP server uses \" + encoding + \" content encoding.\");\n switch (encoding) {\n case \"gzip\": return new GZIPInputStream(resp.body());\n case \"deflate\": return new InflaterInputStream(resp.body());\n case \"identity\": return resp.body();\n }\n throw new IOException(\"Server uses an invalid content encoding: \" + encoding);\n }", "synchronized void revise(String location, InputStream is)\n throws Exception\n {\n m_archive.revise(location, is);\n try\n {\n Module module = createModule();\n addModule(module);\n }\n catch (Exception ex)\n {\n m_archive.rollbackRevise();\n throw ex;\n }\n }", "protected void writeFromStreamToStream(InputStream source, OutputStream destination) throws IOException {\n byte[] buffer = new byte[4096]; // A buffer to hold file contents\n int bytesRead; \n while((bytesRead = source.read(buffer)) != -1) { // Read bytes until EOF\n destination.write(buffer, 0, bytesRead); \n }\n \t}", "public static void closeOutputStream(OutputStream outputStream) {\n\n try {\n\n if (outputStream != null) {\n outputStream.close();\n }\n\n } catch (Exception e) {\n logger.error(e);\n } finally {\n outputStream = null;\n }\n\n }", "public abstract Object decode(InputStream is) ;", "public static final void duplicateStream(int bufferSize, InputStream in, OutputStream... out) throws IOException {\r\n\t\tbyte[] buffer = new byte[bufferSize];\r\n\t\tint len;\r\n\t\t\r\n\t while((len = in.read(buffer)) >= 0) {\r\n\t \tfor(OutputStream o : out)\r\n\t\t o.write(buffer, 0, len);\r\n\t }\r\n\t \r\n\t for(OutputStream o : out) {\r\n\t \to.flush();\r\n\t \to.close();\r\n\t }\r\n\t \r\n\t in.close();\r\n\t\t\r\n\t}", "public static void zip(final String name, final InputStream inputStream, final int pipeSize, ByteChunkListener byteChunkListener) throws IOException {\r\n\t\t// inputStream -> GZIPOutputStream -> Chunkifier -> chunks of Byte to listener\r\n\t\tfinal PipedInputStream readFromPipe = new PipedInputStream(pipeSize);\r\n\t\tfinal PipedOutputStream writeCompressedIntoPipe = new PipedOutputStream(readFromPipe); // Make sure it's connected now\r\n\t\t\r\n\t\t// Start thread that reads from input and pass it to compressor\r\n\t\tThread thread = new Thread(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tbyte[] buf = new byte[pipeSize];\r\n\t\t\t\ttry {\r\n\t\t\t\t\tZipOutputStream compressor = new ZipOutputStream(writeCompressedIntoPipe);\r\n\t\t\t\t\tcompressor.putNextEntry(new ZipEntry(name));\r\n\t\t\t\t\tfor(int len = inputStream.read(buf); len != -1; len = inputStream.read(buf)) compressor.write(buf, 0, len);\r\n\t\t\t\t\tcompressor.closeEntry();\r\n\t\t\t\t\tcompressor.finish();\r\n\t\t\t\t\tcompressor.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new RuntimeException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tthread.start();\r\n\t\t\r\n\t\t// Read on pipe end compressed data\r\n\t\tChunkifier.read(readFromPipe, pipeSize, byteChunkListener);\r\n\t\t\r\n\t\t// Cleanup\r\n\t\twhile(thread.isAlive()) try {\r\n\t\t\tthread.join();\r\n\t\t} catch (InterruptedException e) {}\r\n\t\twriteCompressedIntoPipe.close();\r\n\t\treadFromPipe.close();\r\n\t}", "private void cleanupAfterCommit(\n final FSDataInputStream inputStream,\n final TaskAttemptContext context)\n throws IOException {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n LOG.error(\"Could not close input stream\", e);\n throw e;\n }\n }\n cleanupResources(context);\n }", "public void toStream (OutputStream outputStream)\n throws IOException\n {\n this.logDebug(\"toStream 1/2: outputStream = \" + outputStream);\n\n try\n {\n\tswitch ( this.useMode )\n\t {\n\t case UseMode.SERVE : toStream_SERVE(outputStream); break;\n\t default : this.signalNotRepresentableAsStream();\n\t }\n }\n catch (Exception exception)\n {\n\tthrow new IOException (exception.getMessage());\n }\n\n this.logDebug(\"toStream 2/2\");\n }", "public DefOutputStream(OutputStream out, int size) throws IOException {\n\t\t\tsuper(out, new Deflater(Deflater.BEST_COMPRESSION, true), size);\n\t\t}", "public static void decodeToStream(String string, OutputStream out) throws IOException {\n\t\tdecode(new ByteArrayInputStream(string.getBytes()), out);\n\t}", "public void mo12945a(InputStream inputStream) throws IOException {\n inputStream.close();\n }", "private static void copy(InputStream is, OutputStream os) throws IOException {\n\t\t int i;\n\t\t byte[] b = new byte[1024];\n\t\t while((i=is.read(b))!=-1) {\n\t\t os.write(b, 0, i);\n\t\t }\n\n\t\t}", "@Override\n public void close() throws IOException\n {\n InputStream in = _inputSource;\n\n if (in != null) {\n _inputSource = null;\n if (_autoClose) {\n in.close();\n }\n }\n freeBuffers();\n }", "public static void decode(byte[] bytes, OutputStream out) throws IOException {\n\t\tByteArrayInputStream in = new ByteArrayInputStream(bytes);\n\t\tdecode(in, out, false);\n\t}", "protected static void close(InputStream iStream, OutputStream oStream) throws\r\n IOException {\r\n try {\r\n if (iStream != null) {\r\n iStream.close();\r\n }\r\n }\r\n finally {\r\n if (oStream != null) {\r\n oStream.close();\r\n }\r\n }\r\n }", "public void decipher(ByteBuffer buf, final int offset, final int size)\r\n\t{\r\n\t\tint count = size / 8;\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\t_decrypt.processBlock(buf, offset + i * 8);\r\n\t}", "public static InputStream connect(InputStream in, OutputStream out) {\n return new FilterInputStream(in) {\n public void close() {\n IO.close(out, in);\n }\n };\n }", "OutputStream getOutputStream() throws IOException;", "public static void unzip(InputStream inputStream, UnzipCallback unzipListener) throws IOException {\r\n\t\tZipInputStream zis = new ZipInputStream(inputStream);\r\n\t\t\r\n\t\tfor(ZipEntry zipEntry = zis.getNextEntry(); zipEntry != null; zipEntry = zis.getNextEntry()) {\r\n\t\t\tunzipListener.newZipEntry(zipEntry, zis);\r\n\t\t\tzis.closeEntry();\r\n\t\t}\r\n\t}", "@Override\n public void cleanup() throws Exception {\n outputStream.close();\n }", "public void streamClosed(boolean inStream) throws IOException {\n if (!isGet) {\n if ((!inStream) && (!isDone)) {\n // to deal with outputstream in put operation\n\n boolean more = true;\n\n if ((privateOutput != null) && (privateOutput.size() <= 0)) {\n byte[] headerArray = OBEXHelper.createHeader(requestHeaders, false);\n if (headerArray.length <= 0)\n more = false;\n }\n // If have not sent any data so send all now\n if (replyHeaders.responseCode == -1) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n }\n\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x02);\n }\n\n /*\n * According to the IrOBEX specification, after the final put, you\n * only have a single reply to send. so we don't need the while\n * loop.\n */\n while (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n\n sendRequest(0x82);\n }\n isDone = true;\n } else if ((inStream) && (isDone)) {\n // how to deal with input stream in put stream ?\n isDone = true;\n }\n } else {\n isValidateConnected = false;\n if ((inStream) && (!isDone)) {\n\n // to deal with inputstream in get operation\n // Have not sent any data so send it all now\n\n if (replyHeaders.responseCode == -1) {\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n }\n\n while (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n if (!sendRequest(0x83)) {\n break;\n }\n }\n while (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE) {\n parent.sendRequest(0x83, null, replyHeaders, privateInput);\n }\n isDone = true;\n } else if ((!inStream) && (!isDone)) {\n // to deal with outputstream in get operation\n // part of the data may have been sent in continueOperation.\n\n boolean more = true;\n\n if ((privateOutput != null) && (privateOutput.size() <= 0)) {\n byte[] headerArray = OBEXHelper.createHeader(requestHeaders, false);\n if (headerArray.length <= 0)\n more = false;\n }\n\n if (privateInput == null) {\n privateInput = new PrivateInputStream(this);\n }\n if ((privateOutput != null) && (privateOutput.size() <= 0))\n more = false;\n\n replyHeaders.responseCode = OBEXConstants.OBEX_HTTP_CONTINUE;\n while ((more) && (replyHeaders.responseCode == OBEXConstants.OBEX_HTTP_CONTINUE)) {\n more = sendRequest(0x03);\n }\n sendRequest(0x83);\n // parent.sendRequest(0x83, null, replyHeaders, privateInput);\n if (replyHeaders.responseCode != OBEXConstants.OBEX_HTTP_CONTINUE) {\n isDone = true;\n }\n\n }\n }\n }", "public static int copyInputStream(InputStream in, OutputStream out) throws IOException {\n int bytesCopied = 0;\n byte[] buffer = new byte[1024];\n int bytesReadToBuffer;\n while ((bytesReadToBuffer = in.read(buffer)) >= 0) {\n out.write(buffer, 0, bytesReadToBuffer);\n bytesCopied += bytesReadToBuffer;\n }\n in.close();\n out.close();\n return bytesCopied;\n }", "public void mo12621a(InputStream inputStream) throws IOException {\n inputStream.close();\n }", "@NotNull OutputStream openOutputStream() throws IOException;", "public void copyStreamContent(InputStream inputStream, OutputStream outputStream)\r\n\tthrows IOException {\r\n\t\tbyte[] theCopyBuffer = new byte[BUFFER_SIZE];\r\n\t\tint theNumberOfBytesRead;\r\n\r\n\t\ttheNumberOfBytesRead = inputStream.read(theCopyBuffer);\r\n\t\twhile (theNumberOfBytesRead != -1) {\r\n\t\t\toutputStream.write(theCopyBuffer, 0, theNumberOfBytesRead);\r\n\t\t\ttheNumberOfBytesRead = inputStream.read(theCopyBuffer);\r\n\t\t}\r\n\t}", "public static byte[] dumpInputStream(InputStream instream) \n throws IOException {\n int lastindex = 0;\n int increment;\n byte[] A = new byte[2048];\n byte[] B;\n do {\n B = new byte[2*A.length];\n System.arraycopy(A, 0, B, 0, A.length);\n A = B;\n try {\n increment = instream.read(A, lastindex, A.length - lastindex);\n } catch (IOException e) {\n throw e;\n }\n if (increment == -1)\n /* EOF, no characters read */\n break;\n lastindex += increment;\n } while (lastindex >= A.length);\n\n /* copy A into B of precisely correct length */\n B = new byte[lastindex];\n System.arraycopy(A, 0, B, 0, B.length);\n return B;\n }", "public static long copy(InputStream input, OutputStream output) throws IOException {\n byte[] buffer = new byte[1 << 16]; // 64k\n return copy(input, output, buffer);\n }", "public static void decode(InputStream in, OutputStream out, boolean throwExceptions) throws IOException {\n\t\t// Base64 decoding converts four bytes of input to three bytes of output\n\t\tint[] inBuffer = new int[4];\n\n\t\t// read bytes unmapping them from their ASCII encoding in the process\n\t\t// we must read at least two bytes to be able to output anything\n\t\tboolean done = false;\n\t\twhile (!done && (inBuffer[0] = readBase64(in, throwExceptions)) != END_OF_INPUT\n\t\t\t&& (inBuffer[1] = readBase64(in, throwExceptions)) != END_OF_INPUT){\n\t\t\t// Fill the buffer\n\t\t\tinBuffer[2] = readBase64(in, throwExceptions);\n\t\t\tinBuffer[3] = readBase64(in, throwExceptions);\n\n\t\t\t// Calculate the output\n\t\t\t// The first two bytes of our in buffer will always be valid\n\t\t\t// but we must check to make sure the other two bytes\n\t\t\t// are not END_OF_INPUT before using them.\n\t\t\t// The basic idea is that the four bytes will get reconstituted\n\t\t\t// into three bytes along these lines:\n\t\t\t// [xxAAAAAA] [xxBBBBBB] [xxCCCCCC] [xxDDDDDD]\n\t\t\t// [AAAAAABB] [BBBBCCCC] [CCDDDDDD]\n\t\t\t// bytes are considered to be zero when absent.\n\n\t\t\t// six A and two B\n\t\t\tout.write(inBuffer[0] << 2 | inBuffer[1] >> 4);\n\t\t\tif (inBuffer[2] != END_OF_INPUT){\n\t\t\t\t// four B and four C\n\t\t\t\tout.write(inBuffer[1] << 4 | inBuffer[2] >> 2);\n\t\t\t\tif (inBuffer[3] != END_OF_INPUT){\n\t\t\t\t\t// two C and six D\n\t\t\t\t\tout.write(inBuffer[2] << 6 | inBuffer[3]);\n\t\t\t\t} else {\n\t\t\t\t\tdone = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdone = true;\n\t\t\t}\n\t\t}\n\t\tout.flush();\n\t}", "OutputStream read(String id, OutputStream output);", "public static void copyStream(InputStream is, OutputStream os, int bufferSize) throws IOException {\r\n if(is != null && os != null) {\r\n final byte[] buffer = new byte[bufferSize];\r\n int read;\r\n while((read = is.read(buffer)) >= 0) {\r\n os.write(buffer, 0, read);\r\n }\r\n }\r\n }", "public static void copy(InputStream input, OutputStream output, int bufferSize) throws IOException {\n bufferSize = Math.max(Math.min(MAX_BUFFER_SIZE, bufferSize), MIN_BUFFER_SIZE);\n try(InputStream in = get(input); OutputStream out = get(output)) {\n byte[] buf = new byte[bufferSize];\n int r;\n while((r = in.read(buf)) != -1) {\n out.write(buf, 0, r);\n }\n }\n }", "public static int copy(InputStream input, OutputStream output) throws IOException {\n long count = copyLarge(input, output);\n if (count > Integer.MAX_VALUE) {\n return -1;\n }\n return (int) count;\n }", "public static void write(InputStream is, boolean closeInputStream, OutputStream os,\n boolean closeOutputStream) throws IOException {\n try {\n byte[] buffer = new byte[BUFFER_SIZE];\n int count;\n while ((count = is.read(buffer)) != -1) {\n os.write(buffer, 0, count);\n }\n os.flush();\n } finally {\n if (closeInputStream) {\n close(is);\n }\n if (closeOutputStream) {\n close(os);\n }\n }\n }", "@Override\n public void write(OutputStream outputStream) throws IOException {\n try {\n final Stopwatch watch = new Stopwatch();\n IOUtils.copy(inputStream, outputStream);\n LOGGER.debug(\"Streamed from the cache without resolving in {}\",\n watch);\n } finally {\n inputStream.close();\n // N.B.: Restlet will close the output stream.\n }\n }", "public void close(InputStream inputStream) {\n inputStream.close();\n }", "byte[] deflate(byte[] data) throws IOException;", "InputStream deserialize(InputStream toDeserialize);", "private void gracefullyShutdown() {\n try {\n this.inputStream.close();\n this.outputStream.close();\n } catch (IOException e) {\n // If there is an exception then there's nothing to be done.\n }\n }", "public static void closeInputStream(InputStream inputStream) {\n\n try {\n\n if (inputStream != null) {\n inputStream.close();\n }\n\n } catch (Exception e) {\n logger.error(e);\n } finally {\n inputStream = null;\n }\n\n }", "public static void copyStream(InputStream input, OutputStream output,\n int expected) throws IOException {\n if (input == null || output == null) {\n return;\n }\n if (expected <= 0) {\n copyStream(input, output);\n }\n else {\n byte[] bytes = new byte[Math.min(expected, BUFSIZE)];\n\n int totalRead = 0;\n int bytesRead = 0;\n\n while (totalRead < expected) {\n bytesRead = input.read(bytes, 0, bytes.length);\n output.write(bytes, 0, bytesRead);\n totalRead = totalRead + bytesRead;\n }\n output.flush();\n }\n }", "private void unCompress()\n\t{\n\t\ttry\n\t\t{\n\t\t\tbyte[] buffer = new byte[4096];\n\t\t\tint bytesIn;\n\t\t\tZipFile rfoFile = new ZipFile(path + fileName);\n\t\t\tEnumeration<? extends ZipEntry> allFiles = rfoFile.entries();\n\t\t\twhile(allFiles.hasMoreElements())\n\t\t\t{\n\t\t\t\tZipEntry ze = (ZipEntry)allFiles.nextElement();\n\t\t\t\tInputStream is = rfoFile.getInputStream(ze);\n\t\t\t\tString fName = processSeparators(ze.getName());\n\t\t\t\tFile element = new File(tempDir + fName);\n\t\t\t\torg.reprap.Main.ftd.add(element);\n\t\t\t\tFileOutputStream os = new FileOutputStream(element);\n\t\t\t\twhile((bytesIn = is.read(buffer)) != -1) \n\t\t\t\t\tos.write(buffer, 0, bytesIn);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.unCompress(): \" + e);\n\t\t}\n\t}" ]
[ "0.6090576", "0.60360944", "0.5630376", "0.5437569", "0.54205805", "0.53784376", "0.52875316", "0.5249872", "0.5243826", "0.5232434", "0.5199877", "0.5198482", "0.5143272", "0.5140261", "0.5118318", "0.5110028", "0.5090728", "0.5088063", "0.50798625", "0.5070719", "0.5058566", "0.50365317", "0.50104105", "0.4993645", "0.49790937", "0.49667257", "0.49509737", "0.49170163", "0.4913958", "0.49024716", "0.486078", "0.48540857", "0.48458278", "0.4834082", "0.481082", "0.48091587", "0.48008466", "0.47964913", "0.47932827", "0.47897142", "0.47884336", "0.47770187", "0.47679156", "0.47663188", "0.47587267", "0.47565657", "0.4726927", "0.47240704", "0.47176266", "0.4708043", "0.47079954", "0.46965027", "0.46907002", "0.46830022", "0.46625385", "0.4644804", "0.46424502", "0.46170753", "0.4612378", "0.46077585", "0.46048507", "0.4604685", "0.46044958", "0.45996025", "0.45991838", "0.45946655", "0.45891598", "0.45844108", "0.4583984", "0.4583378", "0.45791212", "0.45761502", "0.45726162", "0.45581874", "0.45574024", "0.45445746", "0.45416766", "0.4535473", "0.4528785", "0.45109314", "0.45078588", "0.45022482", "0.4495552", "0.44829714", "0.44819462", "0.4480966", "0.44783673", "0.44706953", "0.44691455", "0.4465558", "0.44618174", "0.4452902", "0.44318938", "0.44249648", "0.44247946", "0.4415937", "0.4414427", "0.44084984", "0.43967602", "0.43950716" ]
0.60557926
1
Writes a compressed stream from the dictionary in the specified OutputStream
private static void compressStream(Map<Byte, byte[]> dictionary, OutputStream outs) throws IOException { int current_pos = 0; byte[] byteStream = new byte[dictionary.size()*2]; boolean patternExistTwice = false; for (Byte key : dictionary.keySet()) { patternExistTwice = doesPatternExistTwice(dictionary, dictionary.get(key)); // If the pattern already exists twice in the dictionary then it is // definitely the end of the dictionary if (patternExistTwice && key == dictionary.size()) { if (dictionary.get(key).length == 1) { byteStream[current_pos] = 0; current_pos++; } else { int realKey = getKeyOfSubstring(dictionary, dictionary.get(key)); byteStream[current_pos] = (byte) realKey; current_pos++; } byteStream[current_pos] = Util.getLastByte(dictionary.get(key)); current_pos++; break; } // Write Node number following by last byte of the corresponding // value. else { if (dictionary.get(key).length == 1) { byteStream[current_pos] = 0; current_pos++; } else { int realKey = getKeyOfSubstring(dictionary, dictionary.get(key)); byteStream[current_pos] = (byte) realKey; current_pos++; } byteStream[current_pos] = Util.getLastByte(dictionary.get(key)); current_pos++; } } outs.write(byteStream); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void decompressStream(Map<Integer, byte[]> dictionary,\n OutputStream os) {\n byte[] byteStream = new byte[0];\n\n for (Integer key : dictionary.keySet()) {\n byteStream = Util.mergeBytes(byteStream,\n dictionary.get(key).clone());\n }\n try {\n os.write(byteStream);\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }", "private void writeObject(ObjectOutputStream stream) throws IOException {\r\n\t\tstream.defaultWriteObject();\r\n\t\tGZIPOutputStream gzos = new GZIPOutputStream(stream);\r\n\t\tObjectOutputStream oos = new ObjectOutputStream(gzos);\r\n\t\toos.writeObject(map);\r\n\t\toos.writeObject(visibility);\r\n\t\toos.writeObject(occupied);\r\n\t\toos.writeObject(danger);\r\n\t\toos.writeObject(attacking);\r\n\t\toos.writeObject(fade);\r\n\t\toos.writeObject(cost);\r\n\t\toos.writeObject(difficulty);\r\n\t\toos.flush();\r\n\t\tgzos.finish();\r\n\t}", "public void close() throws IOException {\n\t\tif (keyClass != null) {\n\t\t keySerializer.close();\n\t\t valueSerializer.close();\n\t\t}\n\n\t\t// Write EOF_MARKER for key/value length\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tdecompressedBytesWritten += 2 * WritableUtils.getVIntSize(EOF_MARKER);\n \n\t\t//Flush the stream\n\t\tout.flush();\n \n\t\tif (compressOutput) {\n\t\t // Flush\n\t\t compressedOut.finish();\n\t\t compressedOut.resetState();\n\t\t}\n \n\t\t// Close the underlying stream iff we own it...\n\t\tif (ownOutputStream) {\n\t\t out.close();\n\t\t}\n\t\telse {\n\t\t // Write the checksum\n\t\t checksumOut.finish();\n\t\t}\n\n\t\tcompressedBytesWritten = rawOut.getPos() - start;\n\n\t\tif (compressOutput) {\n\t\t // Return back the compressor\n\t\t CodecPool.returnCompressor(compressor);\n\t\t compressor = null;\n\t\t}\n\n\t\tout = null;\n\t\tif(writtenRecordsCounter != null) {\n\t\t writtenRecordsCounter.increment(numRecordsWritten);\n\t\t}\n\t }", "public abstract void writeToStream(java.io.DataOutputStream output) throws java.io.IOException;", "void encode(StreamingContent content, OutputStream out) throws IOException;", "public void writeTo(OutputStream op) throws IOException {\r\n if(gzipOp != null) {\r\n throw new IllegalStateException(\"Cannot writeTo with compression on\");\r\n }\r\n bop.writeTo(op);\r\n }", "public Pack200CompressorOutputStream(final OutputStream out)\n throws IOException {\n this(out, Pack200Strategy.IN_MEMORY);\n }", "public DefOutputStream(OutputStream out, int size) throws IOException {\n\t\t\tsuper(out, new Deflater(Deflater.BEST_COMPRESSION, true), size);\n\t\t}", "void serialize(@NotNull OutputStream out) throws IOException;", "public static void decompress(InputStream src, OutputStream dst) {\n int key = 1;\n byte[] byteKey = new byte[1];\n byte[] byteValue = new byte[1];\n Map<Integer, byte[]> dictionary = new TreeMap<>();\n\n try {\n // While the end of the file src not reached, read byte.\n while (src.read(byteKey) != -1) {\n // Decompress the stream if the dictionary size exceeds 127 and\n // construct a new dictionary\n if (dictionary.size() == Byte.MAX_VALUE) {\n decompressStream(dictionary, dst);\n dictionary.clear();\n key = 1;\n }\n \n // Get the key\n int result = Util.byteToInt(byteKey[0]);\n \n // Cet the associated value and put it in the dictionary.\n src.read(byteValue);\n if (result == 0) {\n dictionary.put(key, byteValue.clone());\n key++; \n } else if (result > 0) {\n byte[] val = dictionary.get(result);\n byte[] buf = Util.mergeBytes(val, byteValue.clone());\n dictionary.put(key, buf.clone());\n key++;\n }\n }\n decompressStream(dictionary, dst);\n dst.close();\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }", "void exportSecretKey(PGPSecretKeyRing key, OutputStream outputStream) throws IOException;", "public Pack200CompressorOutputStream(final OutputStream out,\n final Map<String, String> props)\n throws IOException {\n this(out, Pack200Strategy.IN_MEMORY, props);\n }", "public static ByteArrayOutputStream archiveFile(ArrayList<Integer> bytes, HashMap<Integer, String> dictionary) throws IOException {\n ByteArrayOutputStream result = new ByteArrayOutputStream();\n StringBuilder buffer = new StringBuilder();\n //writing all info and dictionary into the file\n result.write(ByteBuffer.allocate(BYTES_FOR_TABLE_SIZE).putInt(dictionary.size()).array());\n result.write(ByteBuffer.allocate(BYTES_FOR_FILE_SIZE).putInt(bytes.size()).array());\n result.write(convertMapToArray(dictionary));\n\n //writing each byte into the file\n for (int i = 0; i < bytes.size(); i++) {\n if (dictionary.containsKey(bytes.get(i))){\n buffer.append(dictionary.get(bytes.get(i)));\n }\n while (buffer.length() >= BYTE_SIZE){\n result.write(Integer.parseUnsignedInt(buffer.substring(0, BYTE_SIZE), 2));\n if (buffer.length() == BYTE_SIZE){\n buffer = new StringBuilder();\n }else {\n buffer = new StringBuilder(buffer.substring(BYTE_SIZE));\n }\n }\n }\n if (buffer.length() != 0){ //adding zeroes if needed\n StringBuilder remainedZeros = new StringBuilder();\n for (int i = 0; i < BYTE_SIZE - buffer.length(); i++) {\n remainedZeros.append(\"0\");\n }\n result.write(Integer.parseUnsignedInt(String.valueOf(buffer.append(remainedZeros))));\n }\n return result;\n }", "public static void compress(InputStream fins, OutputStream outs) {\n int value = 1;\n byte[] pattern = new byte[0];\n byte[] byteArray = new byte[8192];\n boolean isEmpty = true;\n Map<Byte, byte[]> dictionary = new TreeMap<>();\n boolean patternAlreadyExist;\n int numberOfBytesRead;\n\n try {\n // While the end of file is not reached.\n while ((numberOfBytesRead = fins.read(byteArray)) != -1) {\n for (int i = 0; i < numberOfBytesRead; i++) {\n //Compress the stream if the dictionary size exceeds 127,\n // and construct a new dictionary\n if (dictionary.size() == Byte.MAX_VALUE) {\n if (!isEmpty) {\n dictionary.put((byte) value, pattern);\n }\n compressStream(dictionary, outs);\n dictionary.clear();\n value = 1;\n }\n\n // Read pattern corresponding to an array of bytes.\n byte[] temp = Util.mergeBytes(pattern, byteArray[i]);\n pattern = temp;\n patternAlreadyExist = doesPatternExist(dictionary, pattern);\n\n // Add the pattern to the dictionary if its doesn't exist.\n if (!patternAlreadyExist) {\n dictionary.put((byte) value, pattern.clone());\n value++;\n pattern = new byte[0];\n isEmpty = true;\n\n // If it already exists, read the next byte in the IS\n } else {\n isEmpty = false;\n continue;\n }\n }\n }\n\n // Insert the pattern in the dictionary if the end of the file is\n // reached and the pattern already exist.\n if (!isEmpty) {\n dictionary.put((byte) value, pattern.clone());\n }\n compressStream(dictionary, outs);\n outs.close();\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }", "private void writeObject(ObjectOutputStream stream) throws IOException {\n/* 188 */ stream.defaultWriteObject();\n/* 189 */ stream.writeInt(this.store.size());\n/* 190 */ Set keys = this.store.keySet();\n/* 191 */ Iterator iterator = keys.iterator();\n/* 192 */ while (iterator.hasNext()) {\n/* 193 */ Comparable key = (Comparable)iterator.next();\n/* 194 */ stream.writeObject(key);\n/* 195 */ Stroke stroke = getStroke(key);\n/* 196 */ SerialUtilities.writeStroke(stroke, stream);\n/* */ } \n/* */ }", "private void addToOutputStream(ZipOutputStream output, InputStream input, ZipEntry ze) throws IOException{\n try {\n output.putNextEntry(ze); \n } catch (ZipException zipEx) {\n //This entry already exists. So, go with the first one.\n input.close();\n return;\n }\n int numBytes = -1;\n while((numBytes = input.read(buffer)) > 0){\n output.write(buffer, 0, numBytes);\n }\n output.closeEntry();\n input.close();\n }", "void exportSecretKey(long KeyID, OutputStream outputStream) throws PGPException, IOException, KeyNotFoundException;", "public void write(final OutputStream stream) throws IOException\n {\n // Write the size information for compressed or Cpa animation block\n if (this.type == MsqType.Compressed || this.type == MsqType.CpaAnimation)\n {\n stream.write(this.size & 0xff);\n stream.write((this.size >> 8) & 0xff);\n stream.write((this.size >> 16) & 0xff);\n stream.write((this.size >> 24) & 0xff);\n }\n\n // Write the MSQ identifier\n if (this.type == MsqType.CpaAnimation)\n {\n stream.write(0x08);\n stream.write(0x67);\n stream.write(0x01);\n }\n else\n {\n stream.write('m');\n stream.write('s');\n stream.write('q');\n }\n\n // Write the disk index\n if (this.type == MsqType.Uncompressed)\n {\n stream.write(this.disk + '0');\n }\n else\n {\n stream.write(this.disk);\n }\n }", "private void writeObject(java.io.ObjectOutputStream s)\r\n throws java.io.IOException {\r\n // Write out any hidden serialization magic\r\n s.defaultWriteObject();\r\n\r\n // Write out HashMap capacity and load factor\r\n // s.writeInt(map.capacity());\r\n // s.writeFloat(map.loadFactor());\r\n\r\n // Write out size\r\n s.writeInt(this.map.size());\r\n\r\n // Write out all elements in the proper order.\r\n for (Iterator<E> i = this.map.values().iterator(); i.hasNext();)\r\n s.writeObject(i.next());\r\n }", "private void writeObject(java.io.ObjectOutputStream s)\n throws java.io.IOException {\n s.defaultWriteObject();\n\n // Write out size (number of Mappings)\n s.writeInt(size);\n\n // Write out keys and values (alternating)\n Object[] tab = table;\n for (int i = 0; i < tab.length; i += 2) {\n Object key = tab[i];\n if (key != null) {\n s.writeObject(unmaskNull(key));\n s.writeObject(tab[i + 1]);\n }\n }\n }", "public void writeObject(ZObjectOutputStream out) throws IOException {\n }", "@Override\n public byte[] compress(byte[] bytes) throws IOException\n {\n try (BinaryIO io = new BinaryIO())\n {\n io.write32Bits(LZW_TAG);\n\n LZWDictionary dict = new LZWDictionary();\n int bitsize = 9, index = -1, newIndex;\n\n for (byte b : bytes)\n {\n newIndex = dict.get(index, b);\n\n if (newIndex > 0)\n index = newIndex;\n else\n {\n io.writeBits(index, bitsize);\n bitsize = dict.put(index, b);\n index = dict.get(-1, b);\n }\n if (dict.isFull())\n dict.reset();\n }\n io\n .writeBits(index, bitsize)\n .write32Bits(0); // EoF marker\n\n return io.getBytesOut();\n }\n }", "public void writeObject(OutputStream stream, Object object, int format) throws IOException;", "private void writeObject(ObjectOutputStream _stream)\n/* 428: */ throws IOException\n/* 429: */ {\n/* 430:503 */ _stream.defaultWriteObject();\n/* 431:504 */ writeCustomData(_stream);\n/* 432: */ }", "public static void writeObject(final OutputStream os, final Object obj)\n\t\tthrows JSONException\n\t{\n\t writeObject(os, UTF_8_CHARSET, obj, false, false);\n\t}", "public void writeTo(OutputStream arg0) throws IOException {\n\t\t\r\n\t}", "public void writeToStream(DataOutputStream ostream) throws IOException{\r\n Iterator fieldIterator = headerFields.entrySet().iterator();\r\n while (fieldIterator.hasNext()){\r\n Map.Entry entry = (Map.Entry)fieldIterator.next();\r\n ostream.write((entry.getKey() + \": \" + entry.getValue() + \"\\r\\n\").getBytes());\r\n }\r\n ostream.write(\"\\r\\n\".getBytes());\r\n if(messageBody != null)\r\n ostream.write(messageBody);\r\n ostream.flush();\r\n }", "OutputStream getOutputStream() throws IOException;", "public OutputStream createOutputStream(COSName filter) throws IOException\n {\n return stream.createOutputStream(filter);\n }", "public OutputStream createOutputStream(COSName filter) throws IOException {\n/* 225 */ return this.stream.createOutputStream((COSBase)filter);\n/* */ }", "public void write(OutputStream arg0) throws IOException {\n\n\t}", "public void write_copy_to_stream(OutputStream out) throws IOException, KeePassDataBaseException {\n\t try {\n\t\tHeaderV1 header = new HeaderV1();\n\t\theader.setGroups(groups.size());\n\t\theader.setEntries(entries.size());\n\t\t\n\t\thash = HashFactory.getHash(Hash.SHA_256);\n\t\tcipher = CipherFactory.getCipher(Cipher.AES);\n\t\t\n\t\tmasterSeed = header.getMasterSeed();\n\t\tmasterSeed2 = header.getMasterSeed2();\n\t\tencryptionIv = header.getEncryptionIV();\n\t\tkeyEncRounds = header.getKeyEncRounds();\n\t\t\n\n\t\tint total_length = 0;\n\t\t// calculate buffer size....\n\t\tfor (Group g : groups) {\n\t\t total_length += GroupSerializer.serialize(g, null);\n\t\t}\n\t\t\n\t\tfor (Entry e: entries) {\n\t\t total_length += EntrySerializer.serialize(e, null);\n\t\t}\n\n \t\tByteBuffer bb = ByteBuffer.allocate(total_length);\n\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\n\t\t// serialize groups:\n\n\t\tfor (Group g : groups) {\n\t\t GroupSerializer.serialize(g, bb);\n\t\t}\n\n\t\t// serialize entries:\n\t\tfor (Entry e : entries) {\n\t\t EntrySerializer.serialize(e, bb);\n\t\t}\n\t\t\n\t\tbyte[] plaintext_content = bb.array();\n\t\t\n\t\theader.setContentsHash(hash.hash(plaintext_content));\n\t\t\n\t\tvalidateHeader(header);\n\t\t\n\t\tbyte h[] = header.getHeader();\n\t\tout.write(h);\n\t\t\n\t\tbyte[] content = encrypt(plaintext_content);\n\t\t\n\t\tout.write(content);\n\t\tArrays.fill(plaintext_content, Field.OVERWRITE);\n\t } catch (CipherException ex) {\n\t\tthrow new KeePassDataBaseException(\"encryption failed\", ex);\n\t }\n\t}", "void mo6321a(OutputStream outputStream, Object obj);", "@NotNull OutputStream openOutputStream() throws IOException;", "public void toStream(OutputStream outputStream) {\n final String stringSerialization = toJSON();\n try {\n final OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new BufferedOutputStream(outputStream), Charsets.UTF_8);\n outputStreamWriter.write(stringSerialization);\n outputStreamWriter.close();\n } catch (IOException e) {\n throw Throwables.propagate(e);\n }\n }", "void serialize(Object obj, OutputStream stream) throws IOException;", "public Pack200CompressorOutputStream(final OutputStream out,\n final Pack200Strategy mode,\n final Map<String, String> props)\n throws IOException {\n originalOutput = out;\n abstractStreamBridge = mode.newStreamBridge();\n properties = props;\n }", "@Override\n public void encode(DataOutputStream ostream) throws IOException {\n\n ostream.writeInt(this.location.getWorldMapID());\n ostream.writeInt(this.location.getTownMapID());\n ostream.writeInt(this.location.getBuildingID());\n ostream.writeInt(this.location.getInteriorMapID());\n ostream.writeInt(this.location.getRoomID());\n ostream.writeInt(this.location.getTileMapID());\n\n ostream.writeInt(this.roomLinkIDs.length);\n\n for (int i = 0; i < this.roomLinkIDs.length; i++) {\n ostream.writeInt(this.roomLinkIDs[i]);\n ostream.writeBoolean(this.isOpened[i]);\n }\n }", "boolean getInto(String key, OutputStream stream);", "public void compress(BitInputStream in, BitOutputStream out){\n\n\t\t\tint[] counts = readForCounts(in);\n\t\t\tHuffNode root = makeTree(counts);\n\t\t\tMap<Integer, String> codings = makeCodingsFromTree(root);\n\t\t\twriter(root, out);\n\t\t\tin.reset();\n\t\t\twriteCompressedBits(in, codings, out);\n\t\t\tout.close();\n\t\t}", "OutputStream serialize(OutputStream toSerialize);", "@Override\n\tpublic void writeTo(OutputStream outputStream) {\n\t\ttry {\n\t\t\toutputStream.write(param.jsonParam.getBytes());\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}", "OutputStream createStream(String location);", "void exportDenormalized(OutputStream outputStream, Settings settings);", "int writeTo(OutputStream out) throws IOException;", "@Override\n public void writeCompressed(DataOutput out) throws IOException {\n out.writeInt(length);\n out.write(array);\n }", "public ShpOutputStream(OutputStream os) {\n BufferedOutputStream bos = new BufferedOutputStream(os);\n _leos = new LittleEndianOutputStream(bos);\n }", "public static void write(Hashtable stringHashtable, DataOutputStream dos) throws IOException {\t\r\n\t\tif(stringHashtable != null){\r\n\t\t\tdos.writeByte(stringHashtable.size());\r\n\t\t\tEnumeration keys = stringHashtable.keys();\r\n\t\t\tString key;\r\n\t\t\twhile(keys.hasMoreElements()){\r\n\t\t\t\tkey = (String)keys.nextElement();\r\n\t\t\t\tdos.writeUTF(key);\r\n\t\t\t\tdos.writeUTF((String)stringHashtable.get(key));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tdos.writeByte(0);\r\n\t}", "public abstract void writeToStream(DataOutputStream dataOutputStream);", "@Override\n public void write(byte[] b) throws IOException {\n byte lastByte = 0;\n int count = 0;\n List compressedBytes = new ArrayList();\n out.write(Arrays.copyOfRange(b, 0, metaData));\n for(int i=metaData; i < b.length; i++){\n if(b[i] == lastByte)\n count++;\n else{\n while(count>256){\n compressedBytes.add((byte)255);\n compressedBytes.add((byte)0);\n //out.write(255);\n //out.write(0);\n count = count - 255;\n }\n compressedBytes.add((byte)count);\n //out.write(count);\n count = 1;\n if (lastByte == 0)\n lastByte = 1;\n else\n lastByte = 0;\n }\n }\n compressedBytes.add((byte)count);\n //out.write(count);\n out.write(toByteArray(compressedBytes));\n\n System.out.println ((compressedBytes.size()/b.length)*100);\n }", "void flushToOutputStream(OutputStream outputStream) throws IOException;", "ObjectOutputStream newObjectOutputStream(OutputStream out) throws Exception;", "public void write(CCompatibleOutputStream os) throws Exception {\n header.write(os);\n super.write(os);\n }", "public synchronized int store(FileOutputStream outputStream) throws IOException {\n WritableByteChannel channel = Channels.newChannel(outputStream);\n backingData.position(origo);\n channel.write(backingData); // TODO: Only write bytecount bytes\n return byteCount;\n }", "@Override\n public void write(OutputStream outputStream) throws IOException {\n try {\n final Stopwatch watch = new Stopwatch();\n IOUtils.copy(inputStream, outputStream);\n LOGGER.debug(\"Streamed from the cache without resolving in {}\",\n watch);\n } finally {\n inputStream.close();\n // N.B.: Restlet will close the output stream.\n }\n }", "public TarOutputStream( OutputStream os ) {\n\t\tthis( os, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE );\n\t\t}", "public void flush() {\n\r\n int inflatedSize = buffer.position();\r\n deflator.setInput(buffer.getBuffer(), 0, inflatedSize);\r\n deflator.finish();\r\n int deflatedSize = deflator.deflate(compressionBuffer.array());\r\n deflator.reset();\r\n\r\n try {\r\n outputStream.writeInt(deflatedSize);\r\n outputStream.writeInt(inflatedSize);\r\n outputStream.write(compressionBuffer.array(), 0, deflatedSize);\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(\"Failed to write compressed data to stream\", e);\r\n }\r\n\r\n buffer.clear();\r\n compressionBuffer.clear();\r\n }", "public void writeTo(Object obj, String mimeType, OutputStream os)\n\t throws IOException;", "@Override\n public OutputStream openOutputStream() throws IOException {\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\n return new FilterOutputStream(baos){\n @Override\n public void close() throws IOException {\n writeManifestJarEntry(readManifest(baos));\n }\n };\n }", "void saveFrom(String key, InputStream stream);", "private void writeStream(OutputStream os, String out) {\n try {\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os, \"utf-8\"));\n writer.write(out);\n writer.flush();\n writer.close();\n os.close();\n } catch (IOException e) {\n }\n }", "void write(final OutputStream byteStream, final N source, String encoding) throws IOException, XdmMarshalException;", "public static void zip(File src, OutputStream os) throws IOException {\n\t\tzip(src, os, Charset.defaultCharset().name(), true);\n\t}", "public void save(OutputStream out) throws IOException {\n\t\ttry (GZIPOutputStream zipOut = new GZIPOutputStream(out)) {\n\t\t\ttry (ObjectOutputStream objOut = new ObjectOutputStream(zipOut)) {\n\t\t\t\tobjOut.writeObject(this);\n\t\t\t}\n\t\t}\n\t}", "public SnappyOutputStream(OutputStream out)\n throws IOException\n {\n this(out, true);\n }", "private void writeObject(java.io.ObjectOutputStream s)\r\n throws java.io.IOException {\r\n // Write out any hidden serialization magic\r\n s.defaultWriteObject();\r\n\r\n // Write out size\r\n s.writeInt(size);\r\n\r\n // Write out all elements in the proper order.\r\n for (Entry e = header.next; e != header; e = e.next)\r\n s.writeObject(e.element);\r\n }", "protected abstract OutputStream getStream() throws IOException;", "void generateContent(OutputStream output) throws Exception;", "private void writeObject(final ObjectOutputStream out) throws IOException\n\t{\n\t\t// Read the data\n\t\tif (dfos.isInMemory())\n\t\t{\n\t\t\tcachedContent = get();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcachedContent = null;\n\t\t\tdfosFile = dfos.getFile();\n\t\t}\n\n\t\t// write out values\n\t\tout.defaultWriteObject();\n\t}", "public OutputStream getOutputStream() throws IOException;", "void serializeContents(OutputStream stream, TargetType o) throws IOException {\n val writeVersion = this.versions[getWriteVersion()];\n stream.write(writeVersion.getVersion());\n stream.write(writeVersion.getRevisions().size());\n\n // Write each Revision for this Version, in turn.\n for (val r : writeVersion.getRevisions()) {\n stream.write(r.getRevision());\n try (val revisionOutput = RevisionDataOutputStream.wrap(stream)) {\n r.getWriter().accept(o, revisionOutput);\n }\n }\n }", "public final void CopyEntryContents(OutputStream outputStream)\n\t{\n//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:\n//ORIGINAL LINE: byte[] tempBuffer = new byte[32 * 1024];\n\t\tbyte[] tempBuffer = new byte[32 * 1024];\n\n\t\twhile (true)\n\t\t{\n\t\t\tint numRead = Read(tempBuffer, 0, tempBuffer.length);\n\t\t\tif (numRead <= 0)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\toutputStream.write(tempBuffer, 0, numRead);\n\t\t}\n\t}", "public static void putObjectToStream(Object obj, OutputStream os)\n throws IOException {\n ObjectOutputStream oos = new ObjectOutputStream(os);\n oos.writeObject(obj);\n oos.flush();\n oos.close();\n }", "public void write(OutputStream output) throws IOException {\n // First, we write the taglist\n Compression.multibyte_write(slexicinv.size(), output);\n\n for (int i = 0, limit = slexicinv.size(); i < limit; i++) {\n Compression.String_write(slexicinv.get(i).substring(1, 1 + slexicinv.get(i).length() - 2), output);\n }\n\n // Then we write the list of pairs\n // All numbers are biased + slexicinv.size() to be positive or zero\n int bias = slexicinv.size();\n\n Compression.multibyte_write(spairinv.size(), output);\n for (int i = 0, limit = spairinv.size(); i != limit; i++) {\n Compression.multibyte_write(spairinv.get(i).first + bias, output);\n Compression.multibyte_write(spairinv.get(i).second + bias, output);\n }\n }", "public void write(OutputStream out) throws IOException {\n\t\tMap<String, Object> map = properties.getMap(false, false,\n\t\t\t\tObservableProperties.DEFAULT);\n\t\tProperties properties = new Properties();\n\n\t\t// convert everything to a String:\n\t\tfor (String key : map.keySet()) {\n\t\t\tproperties.put(key, map.get(key).toString());\n\t\t}\n\n\t\tproperties.put(VERSION.toString(), version.toString());\n\t\tproperties.storeToXML(out, \"\");\n\t}", "public abstract void write (DataOutputStream outStream)\r\n throws IOException;", "public Pack200CompressorOutputStream(final OutputStream out,\n final Pack200Strategy mode)\n throws IOException {\n this(out, mode, null);\n }", "public static OutputStream wrapOutput(OutputStream out) throws IOException {\r\n out.write(MARKER);\r\n return new DeflaterOutputStream(new Base64EncoderOutputStream(out));\r\n // you'd think the wrap order would be reversed, but it's not\r\n }", "@Override\n public OutputStream createEncryptor(OutputStream out, EncryptionKey publicKey) throws IOException {\n KeyEncapsulationMechanism.KeyAndCiphertext<SymmetricKey> keyAndCiphertext = kem.encaps(publicKey);\n\n //Serialize the encapsulated key\n byte[] encapsulatedKey = new JSONConverter().serialize(keyAndCiphertext.encapsulatedKey.getRepresentation())\n .getBytes(StandardCharsets.UTF_8);\n\n //Prepare the encapsulated key length as the first four bytes of the ciphertext. That ought to be enough for\n // everybody.\n byte[] keyLenBytes = ByteBuffer.allocate(4).putInt(encapsulatedKey.length).array();\n\n //Write keyLenBytes || encapsulatedKey to stream\n out.write(keyLenBytes);\n out.write(encapsulatedKey);\n\n //Return resulting stream that symmetrically encrypts any input and writes the ciphertext to out\n return symmetricScheme.createEncryptor(out, keyAndCiphertext.key);\n }", "public TarOutputStream( OutputStream os, int blockSize ) {\n\t\tthis( os, blockSize, TarBuffer.DEFAULT_RCDSIZE );\n\t\t}", "void writeTo(DataOutputStream dout) throws IOException {\r\n throw new Error(\"Method no longer available\");\r\n// dout.writeInt(commit_id);\r\n// dout.writeInt(table_id);\r\n// dout.writeInt(journal_entries);\r\n// dout.write(command_journal, 0, journal_entries);\r\n// int size = command_parameters.size();\r\n// dout.writeInt(size);\r\n// for (int i = 0; i < size; ++i) {\r\n// dout.writeInt(command_parameters.intAt(i));\r\n// }\r\n }", "private static void storingTheObjectToDisk1(InputStream objectContent, String key) {\n FileOutputStream fos = null;\n BufferedOutputStream bos = null;\n byte[] buff = new byte[50*1024];\n int count;\n try {\n bos = new BufferedOutputStream(new FileOutputStream(\"/home/ubuntu/\" + key));\n while( (count = objectContent.read(buff)) != -1)\n {\n bos.write(buff, 0, count);\n }\n bos.close();\n objectContent.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void finish( OutputStream stream ) throws IOException\n {\n }", "protected OutputStream decorateOutputStream(HttpExchange exchange, OutputStream os)\n/* */ throws IOException\n/* */ {\n/* 181 */ return os;\n/* */ }", "public StringZipInputStream(InputStream out) {\n\t\tin = new BufferedInputStream(out);\n\t\treadingMap = new String[4096];\n\t\tfor (int charater = 0; charater < 256; charater++)\n\t\t\treadingMap[readingkeysCount++] = \"\" + (char) charater;\n\t\t// readingkeysCount = 256;\n\n\t}", "OutputStream getOutputStream();", "public GZIPOutputStream addGzipStream(String id) throws IOException {\n\t\tGZIPOutputStream gzos = new GZIPOutputStream(outputStream);\n\t\trks.add(id);\n\t\trvs.add(gzos);\n\t\treturn gzos;\n\t}", "private void writeObject(\n ObjectOutputStream aOutputStream\n ) throws IOException {\n aOutputStream.defaultWriteObject();\n }", "public void save(DataOutput stream)\n throws IOException\n {\n stream.write(getBytes());\n }", "public OutputStream encrypt(OutputStream origin, @Nonnull String secret) throws IOException {\n byte[] salt = createSalt();\n writeSaltHeader(origin, salt);\n Cipher cipher = createCipher(Cipher.ENCRYPT_MODE, secret, salt);\n return new CipherOutputStream(origin, cipher);\n }", "public void write(DataOutputStream out) throws IOException {\n final HashMap<NetworkIdentitySet, ArrayList<Key>> keysByIdent = Maps.newHashMap();\n for (Key key : mStats.keySet()) {\n ArrayList<Key> keys = keysByIdent.get(key.ident);\n if (keys == null) {\n keys = Lists.newArrayList();\n keysByIdent.put(key.ident, keys);\n }\n keys.add(key);\n }\n\n out.writeInt(FILE_MAGIC);\n out.writeInt(VERSION_UNIFIED_INIT);\n\n out.writeInt(keysByIdent.size());\n for (NetworkIdentitySet ident : keysByIdent.keySet()) {\n final ArrayList<Key> keys = keysByIdent.get(ident);\n ident.writeToStream(out);\n\n out.writeInt(keys.size());\n for (Key key : keys) {\n final NetworkStatsHistory history = mStats.get(key);\n out.writeInt(key.uid);\n out.writeInt(key.set);\n out.writeInt(key.tag);\n history.writeToStream(out);\n }\n }\n\n out.flush();\n }", "public void writeToStream(final String format, final OutputStream outputStream) {\n try {\n LOGGER.debug(\"Writing WordCloud image data to output stream\");\n ImageIO.write(bufferedImage, format, outputStream);\n LOGGER.debug(\"Done writing WordCloud image data to output stream\");\n\n } catch (final IOException e) {\n LOGGER.error(e.getMessage(), e);\n throw new KumoException(\"Could not write wordcloud to outputstream due to an IOException\", e);\n }\n }", "public void setOutputStream(OutputStream outputStream) {\n this.outputStream = outputStream;\n }", "public void write(OutputBitStream stream, boolean hasColorTransform)\n throws IOException {\n stream.writeUnsignedBits(0, 2);\n stream.writeBooleanBit(hasBlendMode);\n stream.writeBooleanBit(hasFilters);\n stream.writeBooleanBit(hitState);\n stream.writeBooleanBit(downState);\n stream.writeBooleanBit(overState);\n stream.writeBooleanBit(upState);\n stream.writeUI16(characterId);\n stream.writeUI16(placeDepth);\n placeMatrix.write(stream);\n if (hasColorTransform) {\n if (colorTransform != null) {\n colorTransform.write(stream);\n } else {\n new CXformWithAlpha().write(stream);\n }\n }\n if (hasFilters) {\n Filter.writeFilters(filters, stream);\n }\n if (hasBlendMode) {\n stream.writeUI8(blendMode.getCode());\n }\n }", "public OutputStream getOutputStream();", "public static void writeObject(final OutputStream os, final Object obj, final boolean pretty)\n\t\tthrows JSONException\n\t{\n\t writeObject(os, UTF_8_CHARSET, obj, pretty, false);\n\t}", "public OutputStreamWriter(OutputStream os) {\n out = Helper.getStreamWriter(os);\n }", "@Override \n public void write(OutputStream output) throws IOException, \n WebApplicationException {\n IOUtils.copy(inputStream, output); \n }", "void writeObject(OutputSerializer out) throws java.io.IOException;", "public DefOutputStream(OutputStream out) throws IOException {\n\t\t\tthis(out, 512);\n\t\t}" ]
[ "0.73940897", "0.60040486", "0.58882195", "0.5808854", "0.57207006", "0.5713312", "0.56944084", "0.5693622", "0.56874335", "0.56710434", "0.5633956", "0.56325126", "0.5594517", "0.55152637", "0.5506172", "0.54795563", "0.5479", "0.54743725", "0.54609346", "0.5460746", "0.5453759", "0.54228437", "0.53905654", "0.5388705", "0.5382498", "0.5378565", "0.5360958", "0.5343002", "0.53409207", "0.53402793", "0.5329251", "0.53078455", "0.5302752", "0.52925754", "0.5279024", "0.52610916", "0.52592707", "0.52559507", "0.5255198", "0.52531594", "0.52440387", "0.52431697", "0.5240396", "0.52335715", "0.52305096", "0.52179515", "0.52149713", "0.5203581", "0.51986337", "0.51936007", "0.5177581", "0.5172015", "0.51551235", "0.5154225", "0.51438606", "0.5133922", "0.5129764", "0.51169384", "0.5100146", "0.50781167", "0.5078114", "0.50727606", "0.5066553", "0.506445", "0.50630033", "0.5054963", "0.50422466", "0.50343305", "0.5014863", "0.49997526", "0.49949566", "0.4988933", "0.49876738", "0.498353", "0.49711007", "0.49638182", "0.49610713", "0.49530575", "0.49460882", "0.4943723", "0.49373955", "0.49293694", "0.49241966", "0.49240074", "0.4914569", "0.49105406", "0.4899776", "0.48977134", "0.48913434", "0.4886445", "0.48858035", "0.48856372", "0.48845875", "0.48528123", "0.4836944", "0.48353255", "0.48311704", "0.48309496", "0.4823895", "0.48211426" ]
0.69536823
1
method that writes a decompressed stream from the dictionary in the specified output stream
static void decompressStream(Map<Integer, byte[]> dictionary, OutputStream os) { byte[] byteStream = new byte[0]; for (Integer key : dictionary.keySet()) { byteStream = Util.mergeBytes(byteStream, dictionary.get(key).clone()); } try { os.write(byteStream); } catch (IOException e) { System.err.println("An error happened while decompressing."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void compressStream(Map<Byte, byte[]> dictionary,\n OutputStream outs) throws IOException {\n int current_pos = 0;\n byte[] byteStream = new byte[dictionary.size()*2];\n boolean patternExistTwice = false;\n for (Byte key : dictionary.keySet()) {\n patternExistTwice =\n doesPatternExistTwice(dictionary, dictionary.get(key));\n\n // If the pattern already exists twice in the dictionary then it is\n // definitely the end of the dictionary\n if (patternExistTwice && key == dictionary.size()) {\n if (dictionary.get(key).length == 1) {\n byteStream[current_pos] = 0;\n current_pos++;\n } else {\n int realKey =\n getKeyOfSubstring(dictionary, dictionary.get(key));\n byteStream[current_pos] = (byte) realKey;\n current_pos++;\n }\n byteStream[current_pos] = Util.getLastByte(dictionary.get(key));\n current_pos++;\n break;\n }\n\n // Write Node number following by last byte of the corresponding\n // value.\n else {\n if (dictionary.get(key).length == 1) {\n byteStream[current_pos] = 0;\n current_pos++;\n } else {\n int realKey =\n getKeyOfSubstring(dictionary, dictionary.get(key));\n byteStream[current_pos] = (byte) realKey;\n current_pos++;\n }\n byteStream[current_pos] = Util.getLastByte(dictionary.get(key));\n current_pos++;\n }\n }\n\n outs.write(byteStream);\n }", "public static void decompress(InputStream src, OutputStream dst) {\n int key = 1;\n byte[] byteKey = new byte[1];\n byte[] byteValue = new byte[1];\n Map<Integer, byte[]> dictionary = new TreeMap<>();\n\n try {\n // While the end of the file src not reached, read byte.\n while (src.read(byteKey) != -1) {\n // Decompress the stream if the dictionary size exceeds 127 and\n // construct a new dictionary\n if (dictionary.size() == Byte.MAX_VALUE) {\n decompressStream(dictionary, dst);\n dictionary.clear();\n key = 1;\n }\n \n // Get the key\n int result = Util.byteToInt(byteKey[0]);\n \n // Cet the associated value and put it in the dictionary.\n src.read(byteValue);\n if (result == 0) {\n dictionary.put(key, byteValue.clone());\n key++; \n } else if (result > 0) {\n byte[] val = dictionary.get(result);\n byte[] buf = Util.mergeBytes(val, byteValue.clone());\n dictionary.put(key, buf.clone());\n key++;\n }\n }\n decompressStream(dictionary, dst);\n dst.close();\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }", "public void close() throws IOException {\n\t\tif (keyClass != null) {\n\t\t keySerializer.close();\n\t\t valueSerializer.close();\n\t\t}\n\n\t\t// Write EOF_MARKER for key/value length\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tWritableUtils.writeVInt(out, EOF_MARKER);\n\t\tdecompressedBytesWritten += 2 * WritableUtils.getVIntSize(EOF_MARKER);\n \n\t\t//Flush the stream\n\t\tout.flush();\n \n\t\tif (compressOutput) {\n\t\t // Flush\n\t\t compressedOut.finish();\n\t\t compressedOut.resetState();\n\t\t}\n \n\t\t// Close the underlying stream iff we own it...\n\t\tif (ownOutputStream) {\n\t\t out.close();\n\t\t}\n\t\telse {\n\t\t // Write the checksum\n\t\t checksumOut.finish();\n\t\t}\n\n\t\tcompressedBytesWritten = rawOut.getPos() - start;\n\n\t\tif (compressOutput) {\n\t\t // Return back the compressor\n\t\t CodecPool.returnCompressor(compressor);\n\t\t compressor = null;\n\t\t}\n\n\t\tout = null;\n\t\tif(writtenRecordsCounter != null) {\n\t\t writtenRecordsCounter.increment(numRecordsWritten);\n\t\t}\n\t }", "void exportDenormalized(OutputStream outputStream, Settings settings);", "public abstract void writeToStream(java.io.DataOutputStream output) throws java.io.IOException;", "private void writeObject(ObjectOutputStream stream) throws IOException {\r\n\t\tstream.defaultWriteObject();\r\n\t\tGZIPOutputStream gzos = new GZIPOutputStream(stream);\r\n\t\tObjectOutputStream oos = new ObjectOutputStream(gzos);\r\n\t\toos.writeObject(map);\r\n\t\toos.writeObject(visibility);\r\n\t\toos.writeObject(occupied);\r\n\t\toos.writeObject(danger);\r\n\t\toos.writeObject(attacking);\r\n\t\toos.writeObject(fade);\r\n\t\toos.writeObject(cost);\r\n\t\toos.writeObject(difficulty);\r\n\t\toos.flush();\r\n\t\tgzos.finish();\r\n\t}", "void exportSecretKey(long KeyID, OutputStream outputStream) throws PGPException, IOException, KeyNotFoundException;", "boolean getInto(String key, OutputStream stream);", "public static void compress(InputStream fins, OutputStream outs) {\n int value = 1;\n byte[] pattern = new byte[0];\n byte[] byteArray = new byte[8192];\n boolean isEmpty = true;\n Map<Byte, byte[]> dictionary = new TreeMap<>();\n boolean patternAlreadyExist;\n int numberOfBytesRead;\n\n try {\n // While the end of file is not reached.\n while ((numberOfBytesRead = fins.read(byteArray)) != -1) {\n for (int i = 0; i < numberOfBytesRead; i++) {\n //Compress the stream if the dictionary size exceeds 127,\n // and construct a new dictionary\n if (dictionary.size() == Byte.MAX_VALUE) {\n if (!isEmpty) {\n dictionary.put((byte) value, pattern);\n }\n compressStream(dictionary, outs);\n dictionary.clear();\n value = 1;\n }\n\n // Read pattern corresponding to an array of bytes.\n byte[] temp = Util.mergeBytes(pattern, byteArray[i]);\n pattern = temp;\n patternAlreadyExist = doesPatternExist(dictionary, pattern);\n\n // Add the pattern to the dictionary if its doesn't exist.\n if (!patternAlreadyExist) {\n dictionary.put((byte) value, pattern.clone());\n value++;\n pattern = new byte[0];\n isEmpty = true;\n\n // If it already exists, read the next byte in the IS\n } else {\n isEmpty = false;\n continue;\n }\n }\n }\n\n // Insert the pattern in the dictionary if the end of the file is\n // reached and the pattern already exist.\n if (!isEmpty) {\n dictionary.put((byte) value, pattern.clone());\n }\n compressStream(dictionary, outs);\n outs.close();\n } catch (IOException e) {\n System.err.println(\"An error happened while decompressing.\");\n }\n }", "void exportSecretKey(PGPSecretKeyRing key, OutputStream outputStream) throws IOException;", "public DefOutputStream(OutputStream out, int size) throws IOException {\n\t\t\tsuper(out, new Deflater(Deflater.BEST_COMPRESSION, true), size);\n\t\t}", "public void writeToStream(DataOutputStream ostream) throws IOException{\r\n Iterator fieldIterator = headerFields.entrySet().iterator();\r\n while (fieldIterator.hasNext()){\r\n Map.Entry entry = (Map.Entry)fieldIterator.next();\r\n ostream.write((entry.getKey() + \": \" + entry.getValue() + \"\\r\\n\").getBytes());\r\n }\r\n ostream.write(\"\\r\\n\".getBytes());\r\n if(messageBody != null)\r\n ostream.write(messageBody);\r\n ostream.flush();\r\n }", "public static ByteArrayOutputStream archiveFile(ArrayList<Integer> bytes, HashMap<Integer, String> dictionary) throws IOException {\n ByteArrayOutputStream result = new ByteArrayOutputStream();\n StringBuilder buffer = new StringBuilder();\n //writing all info and dictionary into the file\n result.write(ByteBuffer.allocate(BYTES_FOR_TABLE_SIZE).putInt(dictionary.size()).array());\n result.write(ByteBuffer.allocate(BYTES_FOR_FILE_SIZE).putInt(bytes.size()).array());\n result.write(convertMapToArray(dictionary));\n\n //writing each byte into the file\n for (int i = 0; i < bytes.size(); i++) {\n if (dictionary.containsKey(bytes.get(i))){\n buffer.append(dictionary.get(bytes.get(i)));\n }\n while (buffer.length() >= BYTE_SIZE){\n result.write(Integer.parseUnsignedInt(buffer.substring(0, BYTE_SIZE), 2));\n if (buffer.length() == BYTE_SIZE){\n buffer = new StringBuilder();\n }else {\n buffer = new StringBuilder(buffer.substring(BYTE_SIZE));\n }\n }\n }\n if (buffer.length() != 0){ //adding zeroes if needed\n StringBuilder remainedZeros = new StringBuilder();\n for (int i = 0; i < BYTE_SIZE - buffer.length(); i++) {\n remainedZeros.append(\"0\");\n }\n result.write(Integer.parseUnsignedInt(String.valueOf(buffer.append(remainedZeros))));\n }\n return result;\n }", "@Override\n public void write(OutputStream outputStream) throws IOException {\n try {\n final Stopwatch watch = new Stopwatch();\n IOUtils.copy(inputStream, outputStream);\n LOGGER.debug(\"Streamed from the cache without resolving in {}\",\n watch);\n } finally {\n inputStream.close();\n // N.B.: Restlet will close the output stream.\n }\n }", "private void writeObject(final ObjectOutputStream out) throws IOException\n\t{\n\t\t// Read the data\n\t\tif (dfos.isInMemory())\n\t\t{\n\t\t\tcachedContent = get();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcachedContent = null;\n\t\t\tdfosFile = dfos.getFile();\n\t\t}\n\n\t\t// write out values\n\t\tout.defaultWriteObject();\n\t}", "@Override\n\tpublic void Decompress() {\n\t\t\n\t}", "void generateContent(OutputStream output) throws Exception;", "void mo6321a(OutputStream outputStream, Object obj);", "public void flush() {\n\r\n int inflatedSize = buffer.position();\r\n deflator.setInput(buffer.getBuffer(), 0, inflatedSize);\r\n deflator.finish();\r\n int deflatedSize = deflator.deflate(compressionBuffer.array());\r\n deflator.reset();\r\n\r\n try {\r\n outputStream.writeInt(deflatedSize);\r\n outputStream.writeInt(inflatedSize);\r\n outputStream.write(compressionBuffer.array(), 0, deflatedSize);\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(\"Failed to write compressed data to stream\", e);\r\n }\r\n\r\n buffer.clear();\r\n compressionBuffer.clear();\r\n }", "private void addToOutputStream(ZipOutputStream output, InputStream input, ZipEntry ze) throws IOException{\n try {\n output.putNextEntry(ze); \n } catch (ZipException zipEx) {\n //This entry already exists. So, go with the first one.\n input.close();\n return;\n }\n int numBytes = -1;\n while((numBytes = input.read(buffer)) > 0){\n output.write(buffer, 0, numBytes);\n }\n output.closeEntry();\n input.close();\n }", "public void write(OutputStream output) throws IOException {\n // First, we write the taglist\n Compression.multibyte_write(slexicinv.size(), output);\n\n for (int i = 0, limit = slexicinv.size(); i < limit; i++) {\n Compression.String_write(slexicinv.get(i).substring(1, 1 + slexicinv.get(i).length() - 2), output);\n }\n\n // Then we write the list of pairs\n // All numbers are biased + slexicinv.size() to be positive or zero\n int bias = slexicinv.size();\n\n Compression.multibyte_write(spairinv.size(), output);\n for (int i = 0, limit = spairinv.size(); i != limit; i++) {\n Compression.multibyte_write(spairinv.get(i).first + bias, output);\n Compression.multibyte_write(spairinv.get(i).second + bias, output);\n }\n }", "public Pack200CompressorOutputStream(final OutputStream out,\n final Map<String, String> props)\n throws IOException {\n this(out, Pack200Strategy.IN_MEMORY, props);\n }", "void saveFrom(String key, InputStream stream);", "OutputStream createStream(String location);", "public StringZipInputStream(InputStream out) {\n\t\tin = new BufferedInputStream(out);\n\t\treadingMap = new String[4096];\n\t\tfor (int charater = 0; charater < 256; charater++)\n\t\t\treadingMap[readingkeysCount++] = \"\" + (char) charater;\n\t\t// readingkeysCount = 256;\n\n\t}", "private void writeObject(java.io.ObjectOutputStream s)\r\n throws java.io.IOException {\r\n // Write out any hidden serialization magic\r\n s.defaultWriteObject();\r\n\r\n // Write out HashMap capacity and load factor\r\n // s.writeInt(map.capacity());\r\n // s.writeFloat(map.loadFactor());\r\n\r\n // Write out size\r\n s.writeInt(this.map.size());\r\n\r\n // Write out all elements in the proper order.\r\n for (Iterator<E> i = this.map.values().iterator(); i.hasNext();)\r\n s.writeObject(i.next());\r\n }", "private void writeObject(ObjectOutputStream stream) throws IOException {\n/* 188 */ stream.defaultWriteObject();\n/* 189 */ stream.writeInt(this.store.size());\n/* 190 */ Set keys = this.store.keySet();\n/* 191 */ Iterator iterator = keys.iterator();\n/* 192 */ while (iterator.hasNext()) {\n/* 193 */ Comparable key = (Comparable)iterator.next();\n/* 194 */ stream.writeObject(key);\n/* 195 */ Stroke stroke = getStroke(key);\n/* 196 */ SerialUtilities.writeStroke(stroke, stream);\n/* */ } \n/* */ }", "ObjectOutputStream newObjectOutputStream(OutputStream out) throws Exception;", "public static void decompress(String inFile) throws Exception{\n\tIO.Decompressor io = new IO.Decompressor(inFile);\n HashMap<Integer, String> dictionary = new HashMap<Integer, String>();\n int count = 1;\n dictionary.put(new Integer(0), new String() );\n String output = \"\";\n Integer index;\n char character = 1;\n while( character != 0 ) {\n \t IO.Pair next = io.decode();\n index = new Integer(next.getIndex());\n character = next.getCharacter();\n \n output = dictionary.get(index);\n if (character == 0) io.append(output);\n else output = output + character;\n \t io.append(output);\n dictionary.put(new Integer(count), output);\n count++;\n }\n \n \n /* Close all relevant files */\n io.done();\n\n\n\n }", "public Pack200CompressorOutputStream(final OutputStream out)\n throws IOException {\n this(out, Pack200Strategy.IN_MEMORY);\n }", "private void writeObject(ObjectOutputStream _stream)\n/* 428: */ throws IOException\n/* 429: */ {\n/* 430:503 */ _stream.defaultWriteObject();\n/* 431:504 */ writeCustomData(_stream);\n/* 432: */ }", "OutputStream getOutputStream() throws IOException;", "public static void write(Hashtable stringHashtable, DataOutputStream dos) throws IOException {\t\r\n\t\tif(stringHashtable != null){\r\n\t\t\tdos.writeByte(stringHashtable.size());\r\n\t\t\tEnumeration keys = stringHashtable.keys();\r\n\t\t\tString key;\r\n\t\t\twhile(keys.hasMoreElements()){\r\n\t\t\t\tkey = (String)keys.nextElement();\r\n\t\t\t\tdos.writeUTF(key);\r\n\t\t\t\tdos.writeUTF((String)stringHashtable.get(key));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tdos.writeByte(0);\r\n\t}", "public void write(DataOutputStream out) throws IOException {\n final HashMap<NetworkIdentitySet, ArrayList<Key>> keysByIdent = Maps.newHashMap();\n for (Key key : mStats.keySet()) {\n ArrayList<Key> keys = keysByIdent.get(key.ident);\n if (keys == null) {\n keys = Lists.newArrayList();\n keysByIdent.put(key.ident, keys);\n }\n keys.add(key);\n }\n\n out.writeInt(FILE_MAGIC);\n out.writeInt(VERSION_UNIFIED_INIT);\n\n out.writeInt(keysByIdent.size());\n for (NetworkIdentitySet ident : keysByIdent.keySet()) {\n final ArrayList<Key> keys = keysByIdent.get(ident);\n ident.writeToStream(out);\n\n out.writeInt(keys.size());\n for (Key key : keys) {\n final NetworkStatsHistory history = mStats.get(key);\n out.writeInt(key.uid);\n out.writeInt(key.set);\n out.writeInt(key.tag);\n history.writeToStream(out);\n }\n }\n\n out.flush();\n }", "private void writeObject(java.io.ObjectOutputStream s)\n throws java.io.IOException {\n s.defaultWriteObject();\n\n // Write out size (number of Mappings)\n s.writeInt(size);\n\n // Write out keys and values (alternating)\n Object[] tab = table;\n for (int i = 0; i < tab.length; i += 2) {\n Object key = tab[i];\n if (key != null) {\n s.writeObject(unmaskNull(key));\n s.writeObject(tab[i + 1]);\n }\n }\n }", "public void write(final OutputStream stream) throws IOException\n {\n // Write the size information for compressed or Cpa animation block\n if (this.type == MsqType.Compressed || this.type == MsqType.CpaAnimation)\n {\n stream.write(this.size & 0xff);\n stream.write((this.size >> 8) & 0xff);\n stream.write((this.size >> 16) & 0xff);\n stream.write((this.size >> 24) & 0xff);\n }\n\n // Write the MSQ identifier\n if (this.type == MsqType.CpaAnimation)\n {\n stream.write(0x08);\n stream.write(0x67);\n stream.write(0x01);\n }\n else\n {\n stream.write('m');\n stream.write('s');\n stream.write('q');\n }\n\n // Write the disk index\n if (this.type == MsqType.Uncompressed)\n {\n stream.write(this.disk + '0');\n }\n else\n {\n stream.write(this.disk);\n }\n }", "public void finish( OutputStream stream ) throws IOException\n {\n }", "public DefOutputStream(OutputStream out) throws IOException {\n\t\t\tthis(out, 512);\n\t\t}", "Decompress() {\r\n // this.destinationLocation = null ; //destinationLocation;\r\n }", "void writeTo(DataOutputStream dout) throws IOException {\r\n throw new Error(\"Method no longer available\");\r\n// dout.writeInt(commit_id);\r\n// dout.writeInt(table_id);\r\n// dout.writeInt(journal_entries);\r\n// dout.write(command_journal, 0, journal_entries);\r\n// int size = command_parameters.size();\r\n// dout.writeInt(size);\r\n// for (int i = 0; i < size; ++i) {\r\n// dout.writeInt(command_parameters.intAt(i));\r\n// }\r\n }", "public SubstituteResponseOutputStream(String substitute, String outputCharset, OutputStream os) {\n if (substitute == null || outputCharset == null || os == null) {\n throw new NullPointerException();\n }\n this.substitute = substitute;\n this.outputCharset = outputCharset;\n this.stream = os;\n Charset cs = Charset.forName(outputCharset);\n cd = cs.newDecoder().onMalformedInput(CodingErrorAction.REPORT).onUnmappableCharacter(CodingErrorAction.REPLACE);\n }", "public void closeStream() {\n output.close();\n input.close();\n }", "public abstract void writeToStream(DataOutputStream dataOutputStream);", "public OutputStream mo21858g(String str) {\n try {\n File file = new File(str);\n if (!file.isAbsolute()) {\n file = new File(mo21862h(str));\n }\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n return file.getName().toLowerCase().endsWith(\".gz\") ? new GZIPOutputStream(fileOutputStream) : fileOutputStream;\n } catch (IOException e) {\n mo21818a((Throwable) e);\n return null;\n }\n }", "OutputStream read(String id, OutputStream output);", "Map<String, InputStream> extract(TypedValue<InputStream> archive) throws DecompressionException;", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-03 14:59:52.264 -0400\", hash_original_method = \"994F669A59E4B3A0EE398298B336F810\", hash_generated_method = \"2BEECC6B96D4108E92CF5063E98986E9\")\n \npublic ProxyOutputStream(OutputStream proxy) {\r\n super(proxy);\r\n // the proxy is stored in a protected superclass variable named 'out'\r\n }", "public void toStream(OutputStream outputStream) {\n final String stringSerialization = toJSON();\n try {\n final OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new BufferedOutputStream(outputStream), Charsets.UTF_8);\n outputStreamWriter.write(stringSerialization);\n outputStreamWriter.close();\n } catch (IOException e) {\n throw Throwables.propagate(e);\n }\n }", "public void write_copy_to_stream(OutputStream out) throws IOException, KeePassDataBaseException {\n\t try {\n\t\tHeaderV1 header = new HeaderV1();\n\t\theader.setGroups(groups.size());\n\t\theader.setEntries(entries.size());\n\t\t\n\t\thash = HashFactory.getHash(Hash.SHA_256);\n\t\tcipher = CipherFactory.getCipher(Cipher.AES);\n\t\t\n\t\tmasterSeed = header.getMasterSeed();\n\t\tmasterSeed2 = header.getMasterSeed2();\n\t\tencryptionIv = header.getEncryptionIV();\n\t\tkeyEncRounds = header.getKeyEncRounds();\n\t\t\n\n\t\tint total_length = 0;\n\t\t// calculate buffer size....\n\t\tfor (Group g : groups) {\n\t\t total_length += GroupSerializer.serialize(g, null);\n\t\t}\n\t\t\n\t\tfor (Entry e: entries) {\n\t\t total_length += EntrySerializer.serialize(e, null);\n\t\t}\n\n \t\tByteBuffer bb = ByteBuffer.allocate(total_length);\n\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\n\t\t// serialize groups:\n\n\t\tfor (Group g : groups) {\n\t\t GroupSerializer.serialize(g, bb);\n\t\t}\n\n\t\t// serialize entries:\n\t\tfor (Entry e : entries) {\n\t\t EntrySerializer.serialize(e, bb);\n\t\t}\n\t\t\n\t\tbyte[] plaintext_content = bb.array();\n\t\t\n\t\theader.setContentsHash(hash.hash(plaintext_content));\n\t\t\n\t\tvalidateHeader(header);\n\t\t\n\t\tbyte h[] = header.getHeader();\n\t\tout.write(h);\n\t\t\n\t\tbyte[] content = encrypt(plaintext_content);\n\t\t\n\t\tout.write(content);\n\t\tArrays.fill(plaintext_content, Field.OVERWRITE);\n\t } catch (CipherException ex) {\n\t\tthrow new KeePassDataBaseException(\"encryption failed\", ex);\n\t }\n\t}", "@Override\n public OutputStream openOutputStream() throws IOException {\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\n return new FilterOutputStream(baos){\n @Override\n public void close() throws IOException {\n writeManifestJarEntry(readManifest(baos));\n }\n };\n }", "public static void decompress(PfssCompressed _src, PfssDecompressed _dest)\n\t{\n\t\tif (!_src.isLoaded())\n\t\t\treturn;\n\n\t\tif (_dest.isDataAssigned())\n\t\t\treturn;\n\t\t\n\t\ttry (InputStream is = new ByteArrayInputStream(UnRar.unrarData(_src).toByteArray()))\n\t\t{\n\t\t\tFits fits = new Fits(is, false);\n\t\t\tBasicHDU hdus[] = fits.read();\n\t\t\tBinaryTableHDU bhdu = (BinaryTableHDU) hdus[1];\n\n\t\t\tfloat b0 = bhdu.getHeader().getFloatValue(\"B0\");\n\t\t\tfloat l0 = bhdu.getHeader().getFloatValue(\"L0\");\n\t\t\tfloat Q1 = bhdu.getHeader().getFloatValue(\"Q1\");\n\t\t\tfloat Q2 = bhdu.getHeader().getFloatValue(\"Q2\");\n\t\t\tfloat Q3 = bhdu.getHeader().getFloatValue(\"Q3\");\n\n\t\t\tbyte[] line_length = ((byte[][]) bhdu.getColumn(\"LEN\"))[0];\n\t\t\tbyte[] xRaw = ((byte[][]) bhdu.getColumn(\"X\"))[0];\n\t\t\tbyte[] yRaw = ((byte[][]) bhdu.getColumn(\"Y\"))[0];\n\t\t\tbyte[] zRaw = ((byte[][]) bhdu.getColumn(\"Z\"))[0];\n\n\t\t\tint[] lengths = ByteDecoder.decodeAdaptiveUnsigned(line_length);\n\t\t\tint[] xInt = ByteDecoder.decodeAdaptive(xRaw);\n\t\t\tint[] yInt = ByteDecoder.decodeAdaptive(yRaw);\n\t\t\tint[] zInt = ByteDecoder.decodeAdaptive(zRaw);\n\n\t\t\tIntermediateLineData[] lines = IntermediateLineData.splitToLines(lengths, xInt, yInt, zInt);\n\t\t\tfor (IntermediateLineData l : lines)\n\t\t\t\tl.decodePrediction(Q1, Q2, Q3);\n\n\t\t\tArrayList<DecompressedLine> decompressedLines = new ArrayList<>(lines.length);\n\t\t\tfor (IntermediateLineData line : lines)\n\t\t\t\tdecompressedLines.add(new DecompressedLine(line));\n\n\t\t\tconvertToBuffers(decompressedLines, l0, b0, _dest);\n\t\t}\n\t\tcatch (FitsException | IOException e)\n\t\t{\n\t\t\tTelemetry.trackException(e);\n\t\t}\n\t}", "public COSFilterFlateDecode(ASInputStream stream) throws IOException {\n super(stream);\n inflater = new Inflater();\n }", "public synchronized void writeResources(OutputStream stream)\r\n {\r\n writeResources(stream, null);\r\n }", "SDDFOutputStream(DataFile df) {\n this.df = df;\n }", "@SuppressWarnings(\"PMD.CloseResource\") // PMD does not understand Closer.\n private static void serializeToLz4Data(Serializable object, OutputStream out) {\n try (Closer closer = Closer.create()) {\n OutputStream los = closer.register(new LZ4FrameOutputStream(out));\n ObjectOutputStream oos = closer.register(new ObjectOutputStream(los));\n oos.writeObject(object);\n } catch (Throwable e) {\n throw new BatfishException(\"Failed to convert object to LZ4 data\", e);\n }\n }", "public static OutputArchive fromOutputStream(OutputStream stream) throws IOException {\n if (stream instanceof ObjectOutput) {\n return new OutputArchive((ObjectOutput) stream);\n } else {\n return new OutputArchive(new ObjectOutputStream(stream));\n }\n }", "@Override\n public void writeTo(DataOutput dout) throws IOException {\n\n if (!isHeadless()) {\n dout.writeShort(getTransactionID());\n dout.writeShort(getProtocolID());\n dout.writeShort(getDataLength());\n }\n dout.writeByte(getUnitID());\n dout.writeByte(getFunctionCode());\n writeData(dout);\n }", "void serialize(@NotNull OutputStream out) throws IOException;", "public static void generate(SparseStream stream, PrintStream output) {\n stream.position(0);\n byte[] buffer = new byte[1024 * 1024];\n for (Range block : StreamExtent.blocks(stream.getExtents(), buffer.length)) {\n long startPos = block.getOffset() * buffer.length;\n long endPos = Math.min((block.getOffset() + block.getCount()) * buffer.length, stream.getLength());\n stream.position(startPos);\n while (stream.position() < endPos) {\n int numLoaded = 0;\n long readStart = stream.position();\n while (numLoaded < buffer.length) {\n int bytesRead = stream.read(buffer, numLoaded, buffer.length - numLoaded);\n if (bytesRead == 0) {\n break;\n }\n\n numLoaded += bytesRead;\n }\n for (int i = 0; i < numLoaded; i += 16) {\n boolean foundVal = false;\n if (i > 0) {\n for (int j = 0; j < 16; j++) {\n if (buffer[i + j] != buffer[i + j - 16]) {\n foundVal = true;\n break;\n }\n\n }\n } else {\n foundVal = true;\n }\n if (foundVal) {\n output.printf(\"%08x\", i + readStart);\n for (int j = 0; j < 16; j++) {\n if (j % 8 == 0) {\n output.print(\" \");\n }\n\n output.printf(\" %02x\", buffer[i + j]);\n }\n output.print(\" |\");\n for (int j = 0; j < 16; j++) {\n if (j % 8 == 0 && j != 0) {\n output.print(\" \");\n }\n\n output.printf(\"%c\", (buffer[i + j] >= 32 && buffer[i + j] < 127) ? (char) buffer[i + j] : '.');\n }\n output.print(\"|\");\n output.println();\n }\n }\n }\n }\n }", "protected abstract OutputStream getStream() throws IOException;", "public void writeObject(OutputStream stream, Object object, int format) throws IOException;", "public static void generate(Stream stream, PrintStream output) {\n generate(SparseStream.fromStream(stream, Ownership.None), output);\n }", "void flushToOutputStream(OutputStream outputStream) throws IOException;", "public Pack200CompressorOutputStream(final OutputStream out,\n final Pack200Strategy mode,\n final Map<String, String> props)\n throws IOException {\n originalOutput = out;\n abstractStreamBridge = mode.newStreamBridge();\n properties = props;\n }", "public void writeTo(OutputStream op) throws IOException {\r\n if(gzipOp != null) {\r\n throw new IllegalStateException(\"Cannot writeTo with compression on\");\r\n }\r\n bop.writeTo(op);\r\n }", "public SnappyOutputStream(OutputStream out)\n throws IOException\n {\n this(out, true);\n }", "public static OutputStream wrapOutput(OutputStream out) throws IOException {\r\n out.write(MARKER);\r\n return new DeflaterOutputStream(new Base64EncoderOutputStream(out));\r\n // you'd think the wrap order would be reversed, but it's not\r\n }", "public void save(DataOutput stream)\n throws IOException\n {\n stream.write(getBytes());\n }", "public GZIPOutputStream addGzipStream(String id) throws IOException {\n\t\tGZIPOutputStream gzos = new GZIPOutputStream(outputStream);\n\t\trks.add(id);\n\t\trvs.add(gzos);\n\t\treturn gzos;\n\t}", "void serialize(Object obj, OutputStream stream) throws IOException;", "void encode(StreamingContent content, OutputStream out) throws IOException;", "void serializeContents(OutputStream stream, TargetType o) throws IOException {\n val writeVersion = this.versions[getWriteVersion()];\n stream.write(writeVersion.getVersion());\n stream.write(writeVersion.getRevisions().size());\n\n // Write each Revision for this Version, in turn.\n for (val r : writeVersion.getRevisions()) {\n stream.write(r.getRevision());\n try (val revisionOutput = RevisionDataOutputStream.wrap(stream)) {\n r.getWriter().accept(o, revisionOutput);\n }\n }\n }", "public OutputStream createOutputStream(COSName filter) throws IOException {\n/* 225 */ return this.stream.createOutputStream((COSBase)filter);\n/* */ }", "public final void CopyEntryContents(OutputStream outputStream)\n\t{\n//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:\n//ORIGINAL LINE: byte[] tempBuffer = new byte[32 * 1024];\n\t\tbyte[] tempBuffer = new byte[32 * 1024];\n\n\t\twhile (true)\n\t\t{\n\t\t\tint numRead = Read(tempBuffer, 0, tempBuffer.length);\n\t\t\tif (numRead <= 0)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\toutputStream.write(tempBuffer, 0, numRead);\n\t\t}\n\t}", "byte[] deflate(byte[] data) throws IOException;", "private void writeObject(java.io.ObjectOutputStream s)\r\n throws java.io.IOException {\r\n // Write out any hidden serialization magic\r\n s.defaultWriteObject();\r\n\r\n // Write out size\r\n s.writeInt(size);\r\n\r\n // Write out all elements in the proper order.\r\n for (Entry e = header.next; e != header; e = e.next)\r\n s.writeObject(e.element);\r\n }", "public int serialize (IDataOutput stream ,boolean includeAdler32 ,boolean centralDir =false ,int centralDirOffset =0){\r\n\t\t\tif(stream == null) { return 0; }\r\n\t\t\tif(centralDir) {\r\n\t\t\t\t// Write central directory file header signature\r\n\t\t\t\tstream.writeUnsignedInt(FZip.SIG_CENTRAL_FILE_HEADER);\r\n\t\t\t\t// Write \"version made by\" host (usually 0) and number (always 2.0)\r\n\t\t\t\tstream.writeShort((_versionHost << 8) | 0x14);\r\n\t\t\t} else {\r\n\t\t\t\t// Write local file header signature\r\n\t\t\t\tstream.writeUnsignedInt(FZip.SIG_LOCAL_FILE_HEADER);\r\n\t\t\t}\r\n\t\t\t// Write \"version needed to extract\" host (usually 0) and number (always 2.0)\r\n\t\t\tstream.writeShort((_versionHost << 8) | 0x14);\r\n\t\t\t// Write the general purpose flag\r\n\t\t\t// - no encryption\r\n\t\t\t// - normal deflate\r\n\t\t\t// - no data descriptors\r\n\t\t\t// - no compressed patched data\r\n\t\t\t// - unicode as specified in _filenameEncoding\r\n\t\t\tstream.writeShort((_filenameEncoding == \"utf-8\") ? 0x0800 : 0);\r\n\t\t\t// Write compression method (always deflate)\r\n\t\t\tstream.writeShort(isCompressed ? COMPRESSION_DEFLATED : COMPRESSION_NONE);\r\n\t\t\t// Write date\r\n\t\t\tDate d =(_date != null) ? _date : new Date();\r\n\t\t\tint msdosTime =uint(d.getSeconds ())| (uint(d.getMinutes()) << 5) | (uint(d.getHours()) << 11);\r\n\t\t\tint msdosDate =uint(d.getDate ())| (uint(d.getMonth() + 1) << 5) | (uint(d.getFullYear() - 1980) << 9);\r\n\t\t\tstream.writeShort(msdosTime);\r\n\t\t\tstream.writeShort(msdosDate);\r\n\t\t\t// Write CRC32\r\n\t\t\tstream.writeUnsignedInt(_crc32);\r\n\t\t\t// Write compressed size\r\n\t\t\tstream.writeUnsignedInt(_sizeCompressed);\r\n\t\t\t// Write uncompressed size\r\n\t\t\tstream.writeUnsignedInt(_sizeUncompressed);\r\n\t\t\t// Prep filename\r\n\t\t\tByteArray ba =new ByteArray ();\r\n\t\t\tba.endian = Endian.LITTLE_ENDIAN;\r\n\t\t\tif (_filenameEncoding == \"utf-8\") {\r\n\t\t\t\tba.writeUTFBytes(_filename);\r\n\t\t\t} else {\r\n\t\t\t\tba.writeMultiByte(_filename, _filenameEncoding);\r\n\t\t\t}\r\n\t\t\tint filenameSize =ba.position ;\r\n\t\t\t// Prep extra fields\r\n\t\t\tfor(int i0 = 0; i0 < _extraFields .size(); i0++)\r\n\t\t\t{\r\n\t\t\t\t\theaderId = _extraFields .get(i0);\r\n\t\t\t\tif(extraBytes != null) {\r\n\t\t\t\t\tba.writeShort(uint(headerId));\r\n\t\t\t\t\tba.writeShort(uint(extraBytes.length()));\r\n\t\t\t\t\tba.writeBytes(extraBytes);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (includeAdler32) {\r\n\t\t\t\tif (!_hasAdler32) {\r\n\t\t\t\t\tboolean compressed =isCompressed ;\r\n\t\t\t\t\tif (compressed) { uncompress(); }\r\n\t\t\t\t\t_adler32 = ChecksumUtil.Adler32(_content, 0, _content.length());\r\n\t\t\t\t\t_hasAdler32 = true;\r\n\t\t\t\t\tif (compressed) { compress(); }\r\n\t\t\t\t}\r\n\t\t\t\tba.writeShort(0xdada);\r\n\t\t\t\tba.writeShort(4);\r\n\t\t\t\tba.writeUnsignedInt(_adler32);\r\n\t\t\t}\r\n\t\t\tint extrafieldsSize =ba.position -filenameSize ;\r\n\t\t\t// Prep comment (currently unused)\r\n\t\t\tif(centralDir && _comment.length > 0) {\r\n\t\t\t\tif (_filenameEncoding == \"utf-8\") {\r\n\t\t\t\t\tba.writeUTFBytes(_comment);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tba.writeMultiByte(_comment, _filenameEncoding);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tint commentSize =ba.position -filenameSize -extrafieldsSize ;\r\n\t\t\t// Write filename and extra field sizes\r\n\t\t\tstream.writeShort(filenameSize);\r\n\t\t\tstream.writeShort(extrafieldsSize);\r\n\t\t\tif(centralDir) {\r\n\t\t\t\t// Write comment size\r\n\t\t\t\tstream.writeShort(commentSize);\r\n\t\t\t\t// Write disk number start (always 0)\r\n\t\t\t\tstream.writeShort(0);\r\n\t\t\t\t// Write file attributes (always 0)\r\n\t\t\t\tstream.writeShort(0);\r\n\t\t\t\tstream.writeUnsignedInt(0);\r\n\t\t\t\t// Write relative offset of local header\r\n\t\t\t\tstream.writeUnsignedInt(centralDirOffset);\r\n\t\t\t}\r\n\t\t\t// Write filename, extra field and comment\r\n\t\t\tif(filenameSize + extrafieldsSize + commentSize > 0) {\r\n\t\t\t\tstream.writeBytes(ba);\r\n\t\t\t}\r\n\t\t\t// Write file\r\n\t\t\tint fileSize =0;\r\n\t\t\tif(!centralDir && _content.length > 0) {\r\n\t\t\t\tif(isCompressed) {\r\n\t\t\t\t\tif(HAS_UNCOMPRESS || HAS_INFLATE) {\r\n\t\t\t\t\t\tfileSize = _content.length;\r\n\t\t\t\t\t\tstream.writeBytes(_content, 0, fileSize);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfileSize = _content.length - 6;\r\n\t\t\t\t\t\tstream.writeBytes(_content, 2, fileSize);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfileSize = _content.length;\r\n\t\t\t\t\tstream.writeBytes(_content, 0, fileSize);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tint size =30+filenameSize +extrafieldsSize +commentSize +fileSize ;\r\n\t\t\tif(centralDir) {\r\n\t\t\t\tsize += 16;\r\n\t\t\t}\r\n\t\t\treturn size;\r\n\t\t}", "public void setOutputStream(DataOutputStream dos) {\n this.careuOutputStream= dos;\n }", "public OutputArchive(ObjectOutput output) {\n this.output = output;\n }", "private void download(String downloadKey, HttpServletResponse response, boolean compressed){\n File file = creatorService.getDownloadFile(downloadKey, compressed);\n if(file == null){\n throw new UnipooleException(ErrorCodes.FILE_MANIPULATION, \"File not found.\");\n }\n response.setContentType(mimeTypeMap.getContentType(file.getName().toLowerCase()));\n OutputStream os = null;\n try {\n response.setHeader(\"Content-Disposition\",\n \"attachment;filename=\\\"\" + file.getName() + \"\\\"\");\n os = response.getOutputStream();\n os.write(FileCopyUtils.copyToByteArray(file));\n os.flush();\n } catch (IOException e) {\n Logger.getLogger(CreatorController.class).error(\"Failed to write file for download.\", e);\n throw new UnipooleException(ErrorCodes.FILE_MANIPULATION, \"Failed to write file for download.\", e);\n } finally {\n try {\n if(os != null){\n os.close();\n }\n } catch (Exception e) {\n }\n }\n }", "void write(StreamOption streamOpt);", "@NotNull OutputStream openOutputStream() throws IOException;", "public TarOutputStream( OutputStream os ) {\n\t\tthis( os, TarBuffer.DEFAULT_BLKSIZE, TarBuffer.DEFAULT_RCDSIZE );\n\t\t}", "private void dumpMap(PrintStream stream, Map<String, String> map) {\n for (String key : map.keySet()) {\n stream.println(\" \" + key + \" -> \" + map.get(key));\n }\n }", "OutputStream getOutputStream();", "int writeTo(byte[] iStream, int pos, ORecordVersion version);", "public void exportDictionary() \r\n\t{\t\r\n\t\tInputStream is = this.getClass().getResourceAsStream(\"/dictionary.sqlite\");\t\t\r\n\t\tOutputStream os = null;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tos = new FileOutputStream(fDictionaryFile());\r\n\t\t\tbyte[] buffer = new byte[1024];\r\n\t\t\tint length;\r\n\t\t\t\r\n\t\t\t//copy the file content in bytes \r\n\t\t\twhile ((length = is.read(buffer)) > 0) \r\n\t\t\t{\r\n\t\t\t\tos.write(buffer, 0, length);\r\n\t\t\t}\r\n\r\n\t\t\tis.close();\r\n\t\t\tos.close();\r\n\r\n\t\t\tSystem.out.println(\"/* Dictionary export successful! */\");\r\n\t\t} \r\n\t\tcatch(IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "protected InputStream unarmor(InputStream stream)\r\n\t\t\tthrows IOException, PGPException {\r\n\t\treturn PGPUtil.getDecoderStream(stream);\r\n\t}", "public OutputStream createOutputStream(COSName filter) throws IOException\n {\n return stream.createOutputStream(filter);\n }", "public void writeObject(ZObjectOutputStream out) throws IOException {\n }", "private static AOutput<ByteBuffer> export(final Consumer<StreamFinishedEvent> listener,\n final AOutput<ByteBuffer> stream) {\n return AOutputProxyFactory.createProxy(Vat.current(), CountingOutput.countIfNeeded(stream, listener));\n }", "public void setOutputStream(OutputStream outputStream) {\n this.outputStream = outputStream;\n }", "@Override \n public void write(OutputStream output) throws IOException, \n WebApplicationException {\n IOUtils.copy(inputStream, output); \n }", "protected abstract ByteBuf decompress(ByteBuf compressed, int originalLength) throws Exception;", "public void writeTo(OutputStream arg0) throws IOException {\n\t\t\r\n\t}", "public void toStream (OutputStream outputStream)\n throws IOException\n {\n this.logDebug(\"toStream 1/2: outputStream = \" + outputStream);\n\n try\n {\n\tswitch ( this.useMode )\n\t {\n\t case UseMode.SERVE : toStream_SERVE(outputStream); break;\n\t default : this.signalNotRepresentableAsStream();\n\t }\n }\n catch (Exception exception)\n {\n\tthrow new IOException (exception.getMessage());\n }\n\n this.logDebug(\"toStream 2/2\");\n }", "OutputStream serialize(OutputStream toSerialize);", "public TarOutputStream( OutputStream os, int blockSize, int recordSize ) {\n\t\tsuper( os );\n\t\tthis.buffer = new TarBuffer( os, blockSize, recordSize );\n\t\tthis.debug = false;\n\t\tthis.assemLen = 0;\n\t\tthis.assemBuf = new byte[ recordSize ];\n\t\tthis.recordBuf = new byte[ recordSize ];\n\t\tthis.oneBuf = new byte[1];\n\t\t}", "@Override\r\n\tpublic void write(DataOutput out) throws IOException {\n\t\tout.writeUTF(this.url);\r\n\t\tout.writeInt(this.counts);\r\n\t\t\r\n\t}", "void writeObject(OutputSerializer out) throws java.io.IOException;" ]
[ "0.6819097", "0.6304836", "0.59920615", "0.59663683", "0.56838506", "0.5452847", "0.5442336", "0.5380184", "0.5347241", "0.5316983", "0.531577", "0.5279829", "0.5237204", "0.52350926", "0.52323556", "0.50925505", "0.5048893", "0.5038364", "0.50307935", "0.5027249", "0.50083077", "0.50019264", "0.49812162", "0.49625868", "0.49010837", "0.4900425", "0.48888418", "0.48875904", "0.48718047", "0.48666802", "0.48636386", "0.48550284", "0.485064", "0.48451242", "0.4843842", "0.4843536", "0.48325768", "0.48247254", "0.4809042", "0.48000026", "0.47919184", "0.4783227", "0.47755525", "0.47742492", "0.47714335", "0.4766619", "0.47598737", "0.47569782", "0.47501788", "0.4748531", "0.4729631", "0.47289497", "0.47245693", "0.47177395", "0.47172877", "0.47120497", "0.46833855", "0.46833736", "0.46830606", "0.46777847", "0.46748295", "0.46737808", "0.46662056", "0.46643138", "0.4646762", "0.46384797", "0.46353877", "0.4634824", "0.4633966", "0.46277165", "0.4600842", "0.45884535", "0.45808655", "0.45709035", "0.45653653", "0.4565354", "0.45616987", "0.45578483", "0.4554936", "0.45291355", "0.45251706", "0.4518683", "0.45185557", "0.45158044", "0.4514232", "0.45087564", "0.4501578", "0.45002928", "0.4494667", "0.44926924", "0.44909167", "0.44826037", "0.4477958", "0.4465647", "0.4459214", "0.44556752", "0.4452607", "0.44497487", "0.44468856", "0.44468543" ]
0.772299
0
Checks if the specified pattern exists in the specified map.
private static boolean doesPatternExist(Map<Byte, byte[]> haystack, byte[] needle) { if (needle == null) return false; for (Byte key : haystack.keySet()) { if (Arrays.equals(haystack.get(key), needle)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean patternExists(String pattern, String text, int times) {\r\n\t\t// YOUR CODE HERE\r\n\t\treturn false; // Dummy return\r\n\t}", "int containsMatchingPattern(Set<String> values, String pattern, boolean matchPrefix) {\n return memoizer.matches(values, pattern, matchPrefix, () -> {\n int match = -1;\n for(String val : values) {\n String replaced = val.replaceAll(\"\\\\.\", \"\\\\\\\\.\").replaceAll(\"\\\\*\", \".*\");\n if(Pattern.compile(replaced).matcher(pattern).matches() || (matchPrefix && val.startsWith(pattern + \".\"))) {\n match = replaced.contains(\"*\") ? 0 : 1;\n break;\n }\n }\n return match;\n });\n }", "public static boolean mapPatternEntry(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"mapPatternEntry\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, MAP_PATTERN_ENTRY, \"<map pattern entry>\");\n r = consumeToken(b, DOT_DOT_DOT);\n if (!r) r = mapPatternEntry_1(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "public boolean output_contains(String pattern)\n {\n return output.contains(pattern) || error.contains(pattern);\n }", "boolean match(String pattern, String path);", "private static boolean doesPatternExistTwice(Map<Byte, byte[]> haystack,\n byte[] needle) {\n int twice = 0;\n\n for (Byte key : haystack.keySet()) {\n if (Arrays.equals(haystack.get(key), needle)) {\n twice++;\n if (twice == 2) return true;\n }\n }\n\n return false;\n }", "public boolean doesMapExist(String sourceItem, String targetItem,\n\t\t\tint sourceCol, int targetCol);", "boolean contains(String pattern) {\n String str = buffer.toString();\n return str.contains(pattern);\n }", "private static boolean containsAndNotNull(final Map<String, Integer> map, final String node) {\n return map.containsKey(node) && map.get(node) != null;\n }", "public static boolean matches(String value, String pattern) {\n\t\treturn value != null && value.matches(pattern);\n\t}", "public boolean match(String input, String pattern) {\n\t\t// assumption: not null\n\t\t// corner case\n\t\tif (input.length() == 0 || pattern.length() == 0) {\n\t\t\treturn input.length() == 0 && pattern.length() == 0 ? true : false;\n\t\t}\n\n\t\t// pointers for each string\n\t\tint p0 = 0;\n\t\tint p1 = 0;\n\t\treturn match(input, pattern, p0, p1);\n\t}", "boolean isPattern(String path);", "public static boolean contains(String pattern, String text) {\n\n String combined = pattern + \"$\" + text;\n\n int[] prefixes = prefixTable(combined);\n\n for (int singlePrefix : prefixes) {\n if (singlePrefix == pattern.length()) {\n return true;\n }\n }\n\n return false;\n\n }", "boolean matches(String key) {\n int keyLength = key.length();\n int patternLength = pattern.length();\n boolean[][] state = new boolean[keyLength + 1][patternLength + 1];\n state[0][0] = true; // empty key matches empty pattern\n for (int i = 0; i < patternLength; i++) {\n if (pattern.charAt(i) == '*') state[0][i + 1] = state[0][i]; // whether first empty matches pattern\n }\n for (int i = 0; i < keyLength; i++) {\n for (int j = 0; j < patternLength; j++) {\n char ch = pattern.charAt(j);\n if (ch == '?' || key.charAt(i) == ch) {\n state[i + 1][j + 1] = state[i][j];\n } else if (ch == '*') {\n state[i + 1][j + 1] = state[i][j + 1] || state[i + 1][j];\n }\n }\n }\n return state[keyLength][patternLength];\n }", "public static boolean isContainskeyInMap(String key, Map<String, String> keyValuePair) {\n if (keyValuePair.values().contains(key)) {\n return true;\n } else {\n notFoundList.add(key);\n return false;\n }\n }", "protected boolean checkText(Map<String, List<Object>> map, String text) {\n\t\tif (map == null)\n\t\t\treturn false;\n\t\tfor (Map.Entry<String, List<Object>> entry : map.entrySet())\n\t\t\tfor (Object object : entry.getValue())\n\t\t\t\tif (object.toString().contains(text))\n\t\t\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean basemapExists(String basemap) {\r\n ArrayList args = new ArrayList();\r\n args.add(basemap);\r\n int nbase = magicDataTpl.queryForObject(\r\n \"SELECT count(id) FROM \" + env.getProperty(\"postgres.local.mapsTable\") + \" WHERE name=? AND \" + \r\n userAuthoritiesProvider.getInstance().sqlRoleClause(\"allowed_usage\", \"owner_name\", args, \"read\"), \r\n Integer.class, \r\n args.toArray()\r\n );\r\n return(nbase > 0);\r\n }", "public boolean readPattern(String fname, String pattern) {\n\t\tString line;\n\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(fname);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tfis));\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tif (line.indexOf(pattern) != -1)// Si no esta el patron en la\n\t\t\t\t\t\t\t\t\t\t\t\t// linea la guarda de lo\n\t\t\t\t\t\t\t\t\t\t\t\t// contrario la salta\n\t\t\t\t{\n\t\t\t\t\treader.close();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treader.close();\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Encontrado el patron \" + pattern + \" en el fichero \"\n\t\t\t\t\t+ fname);\n\t\t\treturn false;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean wordPattern2(String pattern, String str) {\n\t\tString[] stra = str.split(\" \");\n if (pattern.length() != stra.length){\n return false;\n }\n HashMap<Character, String> map = new HashMap<Character, String>();\n \n for (int i = 0; i < stra.length; i++){\n Character c = pattern.charAt(i);\n String temp = stra[i];\n if (map.containsKey(c)){\n if (!temp.equals(map.get(c))){\n return false;\n }\n }\n else{\n if (map.containsValue(temp)){\n return false;\n }\n map.put(c, temp);\n }\n }\n return true;\n\t\t\n\t}", "static boolean mapPatternEntries(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"mapPatternEntries\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = mapPatternEntry(b, l + 1);\n r = r && mapPatternEntries_1(b, l + 1);\n r = r && mapPatternEntries_2(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "private boolean checkPattern(byte[] sif, byte[] pattern) {\n if (sif.length - SIF_PATTERN_OFFSET != pattern.length) {\n return false;\n }\n for (int i = 0; i < pattern.length; i++) {\n if (sif[i + SIF_PATTERN_OFFSET] != pattern[i]) {\n return false;\n }\n }\n return true;\n }", "private static boolean matches(char[] achName, int ofName, char[] achPattern, int ofPattern)\n {\n int cchName = achName.length;\n int cchPattern = achPattern.length;\n while (ofName < cchName && ofPattern < cchPattern)\n {\n char chName = achName[ofName];\n char chPattern = achPattern[ofPattern];\n\n // latin conversion\n if (chName >= 'A' && chName <= 'Z')\n {\n chName = (char) ('a' + (chName - 'A'));\n }\n if (chPattern >= 'A' && chPattern <= 'Z')\n {\n chPattern = (char) ('a' + (chPattern - 'A'));\n }\n\n switch (chPattern)\n {\n case '?':\n // any char is OK\n break;\n\n case '*':\n {\n if (ofPattern == cchPattern-1)\n {\n // asterisk is at end of pattern ... any name\n // goes at this point\n return true;\n }\n\n char chTag = achPattern[ofPattern+1];\n for (int ofTag = ofName; ofTag < cchName; ++ofTag)\n {\n if ((chTag == '?' || achName[ofTag] == chTag) &&\n matches(achName, ofTag, achPattern, ofPattern+1))\n {\n return true;\n }\n }\n }\n return false;\n\n default:\n if (chName != chPattern)\n {\n return false;\n }\n break;\n }\n\n ++ofName;\n ++ofPattern;\n }\n\n // equal iff both name and pattern were exhausted\n return (ofName == cchName && ofPattern == cchPattern);\n }", "private boolean mapContainsList(HashMap<String,String[]> map, List<String> list){\n\t\tboolean flag = true;\n\t\tSet<String> mapKeys = map.keySet();\n\t\tfor(String temp : list){\n\t\t\tif(!mapKeys.contains(temp)){\n\t\t\t\tflag = false;\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "public boolean matchFilter(Map<String,String> filter);", "public static boolean isPatternMatch(String name, String pattern) {\n \n // check special match cases first\n if (pattern.length() == 0) {\n return name.length() == 0;\n } else if (pattern.charAt(0) == '*') {\n \n // check if the wildcard is all that's left of pattern\n if (pattern.length() == 1) {\n return true;\n } else {\n \n // check if another wildcard follows next segment of text\n pattern = pattern.substring(1);\n int split = pattern.indexOf('*');\n if (split > 0) {\n \n // recurse on each match to text segment\n String piece = pattern.substring(0, split);\n pattern = pattern.substring(split);\n int offset = -1;\n while ((offset = name.indexOf(piece, ++offset)) > 0) {\n int end = offset + piece.length();\n if (isPatternMatch(name.substring(end), pattern)) {\n return true;\n }\n }\n \n } else {\n \n // no more wildcards, need exact match to end of name\n return name.endsWith(pattern);\n \n }\n }\n } else {\n \n // check for leading text before first wildcard\n int split = pattern.indexOf('*');\n if (split > 0) {\n \n // match leading text to start of name\n String piece = pattern.substring(0, split);\n if (name.startsWith(piece)) {\n return isPatternMatch(name.substring(split), pattern.substring(split));\n } else {\n return false;\n }\n \n } else {\n \n // no wildcards, need exact match\n return name.equals(pattern);\n \n }\n }\n return false;\n }", "protected static boolean matchPath( String pattern, String str )\n {\n return matchPath( pattern, str, true );\n }", "private static <T> boolean containsInMap(Map<Class, Set<T>> map, Class key, T element) {\n Set<T> set = map.get(key);\n\n if (set == null) {\n return false;\n }\n\n return set.contains(element);\n }", "public boolean contains(String key);", "public static boolean match( String pattern, String str )\n {\n return match( pattern, str, true );\n }", "public boolean wordPattern(String pattern, String str) {\n Map<Character, String> c2s = new HashMap<Character, String>();\n Map<String, Character> s2c = new HashMap<String, Character>();\n String [] sArr = str.split(\" \");\n if(pattern.length() != sArr.length) return false;\n int len = pattern.length();\n for(int i = 0; i <= len - 1; i ++){\n char c = pattern.charAt(i);\n String s = sArr[i];\n // For a given (c, s) pair, we need result to contain two mappings (c->s and s->c), check if \n // mapping from c, s exist and map to different targets (which violates one-one mapping)\n if((c2s.containsKey(c) && !c2s.get(c).equals(s)) || (s2c.containsKey(s) && s2c.get(s) != c))\n return false;\n if(!c2s.containsKey(c)){\n c2s.put(c, s);\n s2c.put(s, c);\n }\n }\n \n return true;\n }", "protected boolean isPatternFoundInString(String string) {\n if (!StringUtils.isEmpty(string)) {\n Matcher matcher = pattern.matcher(string);\n if (matcher.find()) {\n return true;\n }\n }\n return false;\n }", "boolean hasSimpleMap();", "public static boolean isMatch(final String pattern, final String phrase) {\n if (pattern.length() != phrase.length() ||\n (pattern.charAt(0) != '?' && pattern.charAt(0) != phrase.charAt(0)))\n return false;\n return pattern.length() == 1 ||\n isMatch(pattern.substring(1), phrase.substring(1));\n }", "public static boolean match(String pattern, String fileName) {\n\t\tpattern = pattern.trim();\n\t\tpattern = toMinimalPattern(pattern);\n\t\tpattern = pattern.toUpperCase();\n\t\tchar[] ca1 = pattern.toCharArray();\n\t\tfileName = fileName.trim();\n\t\tfileName = fileName.toUpperCase();\n\t\tchar[] ca2 = fileName.toCharArray();\n\t\treturn match(ca1, 0, ca2, 0);\n\t}", "public static boolean wildcardMatch(String text, String pattern) {\n if (pattern.length() > 0 && pattern.charAt(0) == Symbol.C_CARET) {\n return !wildcardMatch(text, pattern.substring(1));\n }\n return text.matches(pattern.replace(Symbol.QUESTION_MARK, Symbol.DOT + Symbol.QUESTION_MARK).replace(Symbol.STAR, Symbol.DOT + Symbol.STAR + Symbol.QUESTION_MARK));\n }", "public boolean existsInMap(String testString) {\n\t\tif(this.lengthMap.containsKey(testString.length())) {\r\n\t\t\tfor (String x : lengthMap.get(testString.length())) {\r\n\t\t\t\tif(x.equals(testString)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static boolean match(String pattern, String str) {\n int i = 0, j = 0, ii = 0, jj = 0, plen = pattern.length(), slen = str.length();\n int wordStart, wordEnd, lastPossible;\n while (i < plen) {\n // find the next word in pattern\n wordStart = i;\n while (wordStart < plen && pattern.charAt(wordStart) == '*')\n wordStart++;\n if (wordStart == plen) // all left in pattern is '*'\n return true;\n // find the word end\n wordEnd = wordStart + 1;\n while (wordEnd < plen && pattern.charAt(wordEnd) != '*')\n wordEnd++;\n\n // locate the word in string\n lastPossible = slen - (wordEnd - wordStart) + 1;\n for (; j < lastPossible; j++) {\n // check if word matches at j\n for (ii = wordStart, jj = j; ii < wordEnd; ii++, jj++)\n if (pattern.charAt(ii) != '?' && pattern.charAt(ii) != str.charAt(jj))\n break;\n if (ii == wordEnd) // matched at j\n break;\n\n // if there's no '*' before word, then the string must\n // match at j, but it didn't\n if (wordStart == i)\n return false;\n }\n\n // failed to locate the word\n if (!(j < lastPossible))\n return false;\n\n // proceed to the next word\n i = ii;\n j = jj;\n }\n\n // pattern ended, if string also ended, then it's a match;\n // otherwise it's a mismatch\n return j == slen;\n }", "public boolean\tcontains(String e) {\n\t\treturn map.containsKey(e);\n\t}", "private static boolean checkMatch(Pattern p, String s) {\n Matcher mat = p.matcher(s);\n return mat.matches();\n }", "public static boolean matches(String pattern, String string)\r\n {\r\n if (pattern == null)\r\n return (string == null);\r\n \r\n if (string == null)\r\n return false;\r\n \r\n if (pattern.length() == 0)\r\n return (string.length() == 0);\r\n\r\n return matches(pattern, string, 0, 0);\r\n }", "boolean contains(String key);", "boolean contains(String key);", "public boolean containsKey(String key);", "public boolean contains (String key)\n {\n use (key);\n return map.containsKey (key);\n }", "private static boolean isContained(String text, String pattern)\n {\n if (pattern.length() == 0)\n return true;\n else if (pattern.length() > text.length())\n return false;\n else if (isPrefix(text, pattern))\n return true;\n else\n return isContained(text.substring(1), pattern);\n }", "private boolean findMapValue(Map<String, String> map, String searchValue) {\n\t\treturn (findMapKeyByValue(map, searchValue) != null);\r\n\t}", "public boolean existsKey(String inKey);", "private static boolean checkPatternAppropriateness(String pattern,String input){\n Pattern p1=Pattern.compile(pattern);\n Matcher m1=p1.matcher(input);\n return m1.matches();\n }", "private boolean lineMatchesPattern(String line, Pattern p) {\n mCurrentMatcher = p.matcher(line);\n return mCurrentMatcher.matches();\n }", "@Test\n public void mapContains() {\n check(MAPCONT);\n query(MAPCONT.args(MAPNEW.args(), 1), false);\n query(MAPCONT.args(MAPENTRY.args(1, 2), 1), true);\n }", "public final boolean contains(StringToStringTable s)\n {\n\n for (int i = 0; i < m_firstFree; i++)\n {\n if (m_map[i].equals(s))\n return true;\n }\n\n return false;\n }", "protected static boolean hasSubfield(MARCDataField field, String pattern) {\n for (MARCSubfield subfield : field.getSubfields()) {\n if (matches(subfield, pattern)) {\n return true;\n }\n }\n return false;\n }", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "protected boolean isValidPattern(String pattern) {\n \t\t\tfor (int i= 0; i < pattern.length(); i++) {\n \t\t\t\tchar ch= pattern.charAt(i);\n \t\t\t\tif (!(ch == 9 || ch == 10 || ch == 13 || ch >= 32))\n \t\t\t\t\treturn false;\n \t\t\t}\n \t\t\treturn true;\n \t\t}", "public boolean isMatch(String target, String pattern) {\n if(pattern.isEmpty()) return target.isEmpty();\n \n boolean firstMatch = !target.isEmpty()&&(target.charAt(0)==pattern.charAt(0)||pattern.charAt(0)=='.');\n \n if(pattern.length()>=2 && pattern.charAt(1)=='*'){\n return isMatch(target,pattern.substring(2))||(firstMatch&&isMatch(target.substring(1),pattern));\n }else{\n return firstMatch&&isMatch(target.substring(1),pattern.substring(1));\n }\n \n \n }", "protected boolean matchRegExpr(String input, GlobFilenameFilter pattern) {\n File file = new File(input);\n String path = file.toString();\n \n // On systems with a '\\' as pathseparator convert it to a forward slash '/'\n // That makes patterns platform independent\n if (File.separatorChar == '\\\\') {\n path = path.replace('\\\\', '/');\n }\n \n return pattern.accept(file, path);\n }", "public boolean match(String url) {\n\n\t\treturn url.matches(pattern);\n\t}", "private boolean contains(String key) {\n return contains(dict, key);\n }", "private static boolean containsKey(Collection<Map.Entry<String, String>> entries, String key) {\n\t\treturn (getEntriesContainingKey(entries, key).size() > 0);\n\t}", "private boolean contain(Map<Double, Integer> map, double temp) {\n \tSet<Double> set = map.keySet();\r\n\t\tIterator<Double> it = set.iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tdouble t = it.next();\r\n\t\t\tdouble tt = t-temp;\r\n\t\t\tif(Math.abs(tt)<0.0000001){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean contains(String key)\r\n { return get(key) != null; }", "public boolean matchesPatterns(final String filename) {\n\t\treturn false;\n\t}", "boolean matched(int index, String pattern, T value);", "public boolean isTextPresent(final String textPattern);", "public boolean isKeyInMap(String key) {\r\n\t\treturn wikiList.containsKey(key);\r\n\t}", "public boolean contains(N node)\r\n/* 56: */ {\r\n/* 57:105 */ assert (checkRep());\r\n/* 58:106 */ return this.map.containsKey(node);\r\n/* 59: */ }", "boolean has(String key);", "@java.lang.Override\n public boolean containsMedia(java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetMedia().getMap().containsKey(key);\n }", "private NameValue getIgnoreBackslash(TreeMap map, String pattern) {\n\n if(pattern == null)\n return null;\n\n Object match = map.get(pattern);\n\n if(match != null)\n return new NameValue(pattern, match);\n\n pattern = pattern.replace(\"\\\\\", \"\");\n match = map.get(pattern);\n\n if(match != null)\n return new NameValue(pattern, match);\n\n // No easy match...\n\n Set<Map.Entry> elems = map.entrySet();\n\n for(Map.Entry elem : elems) {\n String key = elem.getKey().toString();\n\n if(key == null)\n continue;\n\n String name = key.replace(\"\\\\\", \"\");\n\n if(pattern.equals(name))\n return new NameValue(key, elem.getValue());\n }\n return null;\n }", "@java.lang.Override\n public boolean containsMedia(java.lang.String key) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n return internalGetMedia().getMap().containsKey(key);\n }", "private boolean checkPincode(String pincode) {\n\t\tString patternStr = \"^[0-9]*$\";\n\t\tPattern pattern = Pattern.compile(patternStr);\n\t\tMatcher matcher = pattern.matcher(pincode);\n\t\tboolean matchFound = matcher.matches();\n\t\treturn matchFound;\n\t}", "@Override\n public final IMethodDef locate(Map<String, ?> yamlValues, int patternData, IPackageDef mainPackage) {\n throw new IllegalStateException(\"Called locate with a map on a single translator\");\n }", "public boolean matchesName(char[] pattern, char[] name) {\n\t\tif (pattern == null) return true; // null is as if it was \"*\"\n\t\tif (name != null) {\n\t\t\tswitch (this.matchMode) {\n\t\t\t\tcase R_EXACT_MATCH :\n\t\t\t\t\treturn CharOperation.equals(pattern, name, this.isCaseSensitive);\n\t\t\t\tcase R_PREFIX_MATCH :\n\t\t\t\t\treturn CharOperation.prefixEquals(pattern, name, this.isCaseSensitive);\n\t\t\t\tcase R_PATTERN_MATCH :\n\t\t\t\t\tif (!this.isCaseSensitive)\n\t\t\t\t\t\tpattern = CharOperation.toLowerCase(pattern);\n\t\t\t\t\treturn CharOperation.match(pattern, name, this.isCaseSensitive);\n\t\t\t\tcase R_REGEXP_MATCH :\n\t\t\t\t\t// TODO (frederic) implement regular expression match\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private boolean matches(Node root, Node pattern) throws RepositoryException {\n if (!RewriteUtils.hasPrimaryType(root, pattern.getPrimaryNodeType().getName())) {\n return false;\n }\n\n // check that all properties of the pattern match\n PropertyIterator propertyIterator = pattern.getProperties();\n while (propertyIterator.hasNext()) {\n Property property = propertyIterator.nextProperty();\n String name = property.getName();\n if (property.getDefinition().isProtected()) {\n // skip protected properties\n continue;\n }\n if (PROPERTY_OPTIONAL.equals(name)) {\n // skip cq:rewriteOptional property\n continue;\n }\n if (!root.hasProperty(name)) {\n // property present on pattern does not exist in tree\n return false;\n }\n if (!root.getProperty(name).getValue().equals(property.getValue())) {\n // property values on pattern and tree differ\n return false;\n }\n }\n\n // check that the tree contains all children defined in the pattern (optimization measure, before\n // checking all children recursively)\n NodeIterator nodeIterator = pattern.getNodes();\n while (nodeIterator.hasNext()) {\n Node child = nodeIterator.nextNode();\n // if the node is marked as optional, we can skip the check\n if (child.hasProperty(PROPERTY_OPTIONAL) && child.getProperty(PROPERTY_OPTIONAL).getBoolean()) {\n continue;\n }\n if (!root.hasNode(child.getName())) {\n // this child is not present in subject tree\n return false;\n }\n }\n\n // check child nodes recursively\n nodeIterator = pattern.getNodes();\n while (nodeIterator.hasNext()) {\n Node child = nodeIterator.nextNode();\n // if the node is marked as optional and is not present, then we skip it\n if (child.hasProperty(PROPERTY_OPTIONAL) && child.getProperty(PROPERTY_OPTIONAL).getBoolean()\n && !root.hasNode(child.getName())) {\n continue;\n }\n return matches(root.getNode(child.getName()), child);\n }\n\n // base case (leaf node)\n return true;\n }", "private boolean matchString(String s, String key)\n {\n if (s.equals(key)) return true;\n int min = s.length()<key.length()?s.length():key.length();\n for (int i=0;i<min; ++i)\n {\n \n if(key.charAt(i) == '*')\n return true;\n if(s.charAt(i) != key.charAt(i) && key.charAt(i) != '?')\n return false;\n }\n for (int i=s.length();i<key.length();i++)\n {\n if (key.charAt(i)!='*') \n return false;\n }\n return true;\n }", "boolean hasKey(String key);", "boolean matchStart(String pattern, String path);", "public static boolean routeExists(int fromRow, int fromColumn, int toRow, int toColumn,\n boolean[][] mapMatrix) {\n if (!isReachable(fromRow, fromColumn, mapMatrix)) return false;\n Set<Integer> history = new HashSet<>();\n history.add(fromRow*mapMatrix[0].length + fromColumn);\n return routeExistsLoop(fromRow, fromColumn, toRow, toColumn, mapMatrix, history);\n }", "public boolean containsKey(String s){\r\n return this.get(s) != 0;\r\n }", "private Boolean HasMatch(String line, Pattern includePattern, Pattern excludePattern)\n {\n Boolean foundMatch = false;\n\n Matcher includeMatcher = includePattern.matcher(line);\n Matcher excludeMatcher = excludePattern.matcher(line);\n\n try\n {\n if (includeMatcher.find() && !excludeMatcher.find())\n {\n foundMatch = true;\n }\n\n\n } catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to find matches in: '%s'.\", line);\n e.printStackTrace();\n }\n\n return (foundMatch);\n }", "private boolean isValidPattern(String pattern) {\n return !pattern.startsWith(\"-\") && !pattern.contains(\",\");\n }", "PatternMapping getPatternMapping();", "public boolean contains(String key){\r\n\t\treturn get(key) != null;\r\n\t}", "public boolean hasRoute(String route) {\n if (route == null) {\n return false;\n } else {\n String name = route.contains(\"@\") ? route.substring(0, route.indexOf('@')) : route;\n return registry.containsKey(name);\n }\n }", "int contains(int pgNum, int clock, char act)\r\n {\r\n for(int i = 0; i <size; i++)\r\n if(pm[i][0]==pgNum)\r\n {\r\n pm[i][1] = clock;\r\n pm[i][2] = act=='W' ? 1 : 0;\r\n return i;\r\n }\r\n\r\n return -1;\r\n }", "boolean containsKey(CoreLabel key);", "static boolean AnyMapTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AnyMapTest\")) return false;\n if (!nextTokenIs(b, K_MAP)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeTokens(b, 3, K_MAP, L_PAR, STAR_SIGN, R_PAR);\n p = r; // pin = 3\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "boolean contains(String name);" ]
[ "0.62626714", "0.600169", "0.5977116", "0.5904085", "0.5867728", "0.57886636", "0.5719876", "0.57095104", "0.5696635", "0.56861854", "0.5669463", "0.56480396", "0.55687356", "0.55129063", "0.5455652", "0.53972405", "0.53929454", "0.5392933", "0.53778225", "0.53617686", "0.5341395", "0.53401643", "0.53203845", "0.53033066", "0.5260049", "0.52565265", "0.5239496", "0.5239407", "0.5231719", "0.520708", "0.5187926", "0.5176718", "0.5158401", "0.51545775", "0.51541", "0.51525515", "0.5125109", "0.5112547", "0.51076", "0.51013356", "0.5093389", "0.5093389", "0.5085573", "0.5074856", "0.5071747", "0.50679165", "0.50550824", "0.5052055", "0.5034344", "0.5028318", "0.4992296", "0.49858418", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.49777305", "0.4961182", "0.49595878", "0.4956421", "0.4954097", "0.49487346", "0.49344924", "0.49303538", "0.4924472", "0.49030682", "0.4897546", "0.48937938", "0.48925638", "0.48865166", "0.48831466", "0.4878621", "0.48591325", "0.4856562", "0.48539805", "0.48534426", "0.48532352", "0.48475224", "0.4821547", "0.48149216", "0.48133546", "0.48131114", "0.48081437", "0.47928634", "0.47919384", "0.47877255", "0.47868645", "0.4782043", "0.47743002", "0.47734973", "0.4758977", "0.47519338" ]
0.6832052
0
Checks if the specified pattern exists twice in the specified map
private static boolean doesPatternExistTwice(Map<Byte, byte[]> haystack, byte[] needle) { int twice = 0; for (Byte key : haystack.keySet()) { if (Arrays.equals(haystack.get(key), needle)) { twice++; if (twice == 2) return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean doesPatternExist(Map<Byte, byte[]> haystack,\n byte[] needle) {\n if (needle == null)\n return false;\n for (Byte key : haystack.keySet()) {\n if (Arrays.equals(haystack.get(key), needle)) {\n return true;\n }\n }\n return false;\n }", "public static boolean patternExists(String pattern, String text, int times) {\r\n\t\t// YOUR CODE HERE\r\n\t\treturn false; // Dummy return\r\n\t}", "public boolean wordPattern2(String pattern, String str) {\n\t\tString[] stra = str.split(\" \");\n if (pattern.length() != stra.length){\n return false;\n }\n HashMap<Character, String> map = new HashMap<Character, String>();\n \n for (int i = 0; i < stra.length; i++){\n Character c = pattern.charAt(i);\n String temp = stra[i];\n if (map.containsKey(c)){\n if (!temp.equals(map.get(c))){\n return false;\n }\n }\n else{\n if (map.containsValue(temp)){\n return false;\n }\n map.put(c, temp);\n }\n }\n return true;\n\t\t\n\t}", "int containsMatchingPattern(Set<String> values, String pattern, boolean matchPrefix) {\n return memoizer.matches(values, pattern, matchPrefix, () -> {\n int match = -1;\n for(String val : values) {\n String replaced = val.replaceAll(\"\\\\.\", \"\\\\\\\\.\").replaceAll(\"\\\\*\", \".*\");\n if(Pattern.compile(replaced).matcher(pattern).matches() || (matchPrefix && val.startsWith(pattern + \".\"))) {\n match = replaced.contains(\"*\") ? 0 : 1;\n break;\n }\n }\n return match;\n });\n }", "public static boolean isUnique(Map<String,String> map){\n for(String key1: map.keySet()){\r\n //Cycle through the keys a second time\r\n for(String key2: map.keySet()){\r\n if(!key1.equals(key2)&&map.get(key1).equals(map.get(key2))){\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }", "public boolean wordPattern(String pattern, String str) {\n Map<Character, String> c2s = new HashMap<Character, String>();\n Map<String, Character> s2c = new HashMap<String, Character>();\n String [] sArr = str.split(\" \");\n if(pattern.length() != sArr.length) return false;\n int len = pattern.length();\n for(int i = 0; i <= len - 1; i ++){\n char c = pattern.charAt(i);\n String s = sArr[i];\n // For a given (c, s) pair, we need result to contain two mappings (c->s and s->c), check if \n // mapping from c, s exist and map to different targets (which violates one-one mapping)\n if((c2s.containsKey(c) && !c2s.get(c).equals(s)) || (s2c.containsKey(s) && s2c.get(s) != c))\n return false;\n if(!c2s.containsKey(c)){\n c2s.put(c, s);\n s2c.put(s, c);\n }\n }\n \n return true;\n }", "public boolean findPattern(String s1, String s2) {\n\tchar[] chars1 = new char[26];\n\tchar[] chars2 = new char[26];\n\tint[] map = new int[26];\n\tfor (int i = 0; i < s1.length(); i++) {\n\t\tchars1[s1.charAt(i) - 'A']++;\n\t}\n\tfor (int i = 0; i < s2.length(); i++) {\n\t\tchars2[s2.charAt(i) - 'A']++;\n\t\tif (map[] == 0) map[s2.charAt(i) - 'A'] = i;\n\t}\n\tfor (int i = 0; i < 26; i++) {\n\t\tif (chars1[i] > 0 && chars2[i] == 0) return false;\n\t}\n\treturn true;\n}", "private boolean checkPattern(byte[] sif, byte[] pattern) {\n if (sif.length - SIF_PATTERN_OFFSET != pattern.length) {\n return false;\n }\n for (int i = 0; i < pattern.length; i++) {\n if (sif[i + SIF_PATTERN_OFFSET] != pattern[i]) {\n return false;\n }\n }\n return true;\n }", "public static boolean mapPatternEntry(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"mapPatternEntry\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, MAP_PATTERN_ENTRY, \"<map pattern entry>\");\n r = consumeToken(b, DOT_DOT_DOT);\n if (!r) r = mapPatternEntry_1(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "public boolean output_contains(String pattern)\n {\n return output.contains(pattern) || error.contains(pattern);\n }", "static boolean mapPatternEntries(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"mapPatternEntries\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = mapPatternEntry(b, l + 1);\n r = r && mapPatternEntries_1(b, l + 1);\n r = r && mapPatternEntries_2(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "private static boolean addToExistGroup(Map<String, List<String>> map, String str) {\n for (String key : map.keySet()) {\n if (isIsomorphic(str, key)) {\n map.get(key).add(str);\n\n return true;\n }\n }\n\n return false;\n }", "public static boolean checkPermutaionMap(String s1, String s2) {\n if (s1.length() != s2.length()) return false;\n\n int[] charMap = new int[128];\n for (int i = 0; i < s1.length(); ++i) {\n charMap[s1.charAt(i)]++;\n }\n\n for (int i = 0; i < s2.length(); ++i) {\n if (--charMap[s2.charAt(i)] < 0) return false;\n }\n\n return true;\n }", "boolean matches(String key) {\n int keyLength = key.length();\n int patternLength = pattern.length();\n boolean[][] state = new boolean[keyLength + 1][patternLength + 1];\n state[0][0] = true; // empty key matches empty pattern\n for (int i = 0; i < patternLength; i++) {\n if (pattern.charAt(i) == '*') state[0][i + 1] = state[0][i]; // whether first empty matches pattern\n }\n for (int i = 0; i < keyLength; i++) {\n for (int j = 0; j < patternLength; j++) {\n char ch = pattern.charAt(j);\n if (ch == '?' || key.charAt(i) == ch) {\n state[i + 1][j + 1] = state[i][j];\n } else if (ch == '*') {\n state[i + 1][j + 1] = state[i][j + 1] || state[i + 1][j];\n }\n }\n }\n return state[keyLength][patternLength];\n }", "private boolean checkRep()\r\n/* 126: */ {\r\n/* 127: */ Iterator localIterator2;\r\n/* 128:217 */ for (Iterator localIterator1 = this.map.keySet().iterator(); localIterator1.hasNext(); localIterator2.hasNext())\r\n/* 129: */ {\r\n/* 130:217 */ N n = (Object)localIterator1.next();\r\n/* 131:218 */ localIterator2 = ((Map)this.map.get(n)).keySet().iterator(); continue;N suc = (Object)localIterator2.next();\r\n/* 132:219 */ if (!((Map)this.map.get(suc)).containsKey(n)) {\r\n/* 133:220 */ return false;\r\n/* 134: */ }\r\n/* 135:223 */ if (!((Map)this.map.get(n)).get(suc).equals(((Map)this.map.get(suc)).get(n))) {\r\n/* 136:224 */ return false;\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139:230 */ return true;\r\n/* 140: */ }", "private static boolean matches(char[] achName, int ofName, char[] achPattern, int ofPattern)\n {\n int cchName = achName.length;\n int cchPattern = achPattern.length;\n while (ofName < cchName && ofPattern < cchPattern)\n {\n char chName = achName[ofName];\n char chPattern = achPattern[ofPattern];\n\n // latin conversion\n if (chName >= 'A' && chName <= 'Z')\n {\n chName = (char) ('a' + (chName - 'A'));\n }\n if (chPattern >= 'A' && chPattern <= 'Z')\n {\n chPattern = (char) ('a' + (chPattern - 'A'));\n }\n\n switch (chPattern)\n {\n case '?':\n // any char is OK\n break;\n\n case '*':\n {\n if (ofPattern == cchPattern-1)\n {\n // asterisk is at end of pattern ... any name\n // goes at this point\n return true;\n }\n\n char chTag = achPattern[ofPattern+1];\n for (int ofTag = ofName; ofTag < cchName; ++ofTag)\n {\n if ((chTag == '?' || achName[ofTag] == chTag) &&\n matches(achName, ofTag, achPattern, ofPattern+1))\n {\n return true;\n }\n }\n }\n return false;\n\n default:\n if (chName != chPattern)\n {\n return false;\n }\n break;\n }\n\n ++ofName;\n ++ofPattern;\n }\n\n // equal iff both name and pattern were exhausted\n return (ofName == cchName && ofPattern == cchPattern);\n }", "public boolean repeatedSubstringPattern(String s) {\n char[] ch = s.toCharArray();\n int[] pi = new int[ch.length];\n pi[0] = 0;\n int matched = 0;\n for (int i = 1; i < pi.length; i++) {\n while (matched > 0 && ch[matched] != ch[i])\n matched = pi[matched-1];\n if (ch[matched] == ch[i])\n matched++;\n pi[i] = matched;\n }\n return pi[pi.length-1] != 0 && pi.length % (pi.length - pi[pi.length-1]) == 0;\n }", "void checkRepeated() {\r\n Move check = listOfMoves.peek();\r\n if (map.containsKey(check)) {\r\n _repeated = true;\r\n _winner = map.get(check.from()).opponent();\r\n }\r\n _repeated = false;\r\n }", "public boolean repeatedSubstringPattern(String s) {\n int len = s.length();\n for (int i = len / 2; i >= 1; i--) {\n if (len % i == 0) {\n int num = len / i;\n String substr = s.substring(0, i);\n StringBuilder sb = new StringBuilder();\n for (int j = 0; j < num; j++) {\n sb.append(substr);\n }\n if (sb.toString().equals(s)) {\n return true;\n }\n }\n }\n\n return false;\n }", "private boolean mapContainsList(HashMap<String,String[]> map, List<String> list){\n\t\tboolean flag = true;\n\t\tSet<String> mapKeys = map.keySet();\n\t\tfor(String temp : list){\n\t\t\tif(!mapKeys.contains(temp)){\n\t\t\t\tflag = false;\n\t\t\t\treturn flag;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "private static boolean containsAndNotNull(final Map<String, Integer> map, final String node) {\n return map.containsKey(node) && map.get(node) != null;\n }", "public boolean checkIfDublicate(String testPart){\n\t\t\n\t\tchar[] characters = testPart.toCharArray();\n // build HashMap with character and number of times they appear in String\n Map<Character, Integer> charMap = new HashMap<Character, Integer>();\n for (Character ch : characters) {\n if (charMap.containsKey(ch)) {\n charMap.put(ch, charMap.get(ch) + 1);\n } else {\n charMap.put(ch, 1);\n }\n }\n\n\n // Iterate through HashMap and return true if duplicates\n Set<Map.Entry<Character, Integer>> entrySet = charMap.entrySet();\n \n for (Map.Entry<Character, Integer> entry : entrySet) {\n if (entry.getValue() > 1) {\n return false;\n }\n }\n return true;\n\n//Read more: http://www.java67.com/2014/03/how-to-find-duplicate-characters-in-String-Java-program.html#ixzz4KEbZ7fhC\t\n\t}", "private boolean antiDuplicate(HashMap<String, Integer> check, String description, int days) {\n Iterator it = check.entrySet().iterator();\n while (it.hasNext()) {\n HashMap.Entry pair = (HashMap.Entry) it.next();\n if (pair.getKey().equals(description) && (int) pair.getValue() == days) {\n return false;\n }\n }\n return true;\n }", "public boolean equals(PatternChainNode node){\n\t\t// equal if they are the same pattern in the same pattern set\n\t\tif ( this.indexPattern == node.getPatternIndex() && \n\t\t\t\tthis.indexPatternSet == node.getPatternSetIndex() )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean doesMapExist(String sourceItem, String targetItem,\n\t\t\tint sourceCol, int targetCol);", "public int repeatedStringMatch(String a, String b) {\n \n int count = 0;\n StringBuilder sb = new StringBuilder();\n \n while(sb.length() < b.length()){\n sb.append(a); //O(roundUp(M/N) * N) < O(M*N)\n count++;\n }\n \n if(sb.indexOf(b) != -1) return count; //check at max O(M*N) characters\n \n //handles rotated array case\n if(sb.append(a).indexOf(b) != -1) return count + 1; //append takes O(N), indexOf takes in the worst case (missing match) ~O(M*N)\n \n return -1;\n }", "public static boolean contains(String pattern, String text) {\n\n String combined = pattern + \"$\" + text;\n\n int[] prefixes = prefixTable(combined);\n\n for (int singlePrefix : prefixes) {\n if (singlePrefix == pattern.length()) {\n return true;\n }\n }\n\n return false;\n\n }", "private boolean matchString(String s, String key)\n {\n if (s.equals(key)) return true;\n int min = s.length()<key.length()?s.length():key.length();\n for (int i=0;i<min; ++i)\n {\n \n if(key.charAt(i) == '*')\n return true;\n if(s.charAt(i) != key.charAt(i) && key.charAt(i) != '?')\n return false;\n }\n for (int i=s.length();i<key.length();i++)\n {\n if (key.charAt(i)!='*') \n return false;\n }\n return true;\n }", "boolean comparison(String str, String pattern) {\n int s = 0, p = 0, match = 0, starIdx = -1;\n while (s < str.length()){\n /**\n * advancing both pointers\n */\n if (p < pattern.length() && (pattern.charAt(p) == '?' || str.charAt(s) == pattern.charAt(p))){\n s++;\n p++;\n }\n\n /**\n * '*' found, only advancing pattern pointer\n *\n * check the situation when '*' matches no char\n *\n * starIdx : remember location of '*' in pattern\n * match : remember index in s when the last '*\" appears\n */\n else if (p < pattern.length() && pattern.charAt(p) == '*'){\n starIdx = p;\n match = s;\n p++;\n }\n\n /**\n * the last pattern pointer was *, advancing string pointer\n *\n * !!!\n * If pattern character != string character\n * OR\n * pattern is used up\n * AND\n * there was '*' character in pattern before :\n *\n * Backtrack check the situation when '*' matches one more character\n */\n else if (starIdx != -1){\n p = starIdx + 1;\n match++;\n s = match;\n }\n\n /**\n * current pattern pointer is not star, last pattern pointer was not *\n * characters do not match\n */\n else return false;\n }\n\n /**\n * check for remaining characters in pattern\n */\n while (p < pattern.length() && pattern.charAt(p) == '*') {\n p++;\n }\n\n return p == pattern.length();\n }", "public boolean isEqual(Tuple t){\n Object[] temp=t.getPattern();\n if(t.getSize()!=size)return false;\n else {\n for(int i=0;i<size;i++){\n if(pattern[i].equals(temp[i])==false && temp[i]!=\"*\"){\n return false;\n }\n }\n }\n return true;\n }", "static boolean possibility(HashMap<Integer,\n Integer> m,\n int length, String s)\n{\n // counts the occurrence of number\n // which is odd\n int countodd = 0;\n \n for (int i = 0; i < length; i++)\n {\n // if occurrence is odd\n if (m.get(s.charAt(i) - '0') % 2 == 1)\n countodd++;\n \n // if number exceeds 1\n if (countodd > 1)\n return false;\n }\n \n return true;\n}", "@Override\n\tpublic int birthIsRepeat(Map<String, String> map) {\n\t\treturn welfareAppDao.birthIsRepeat(map);\n\t}", "public boolean existsInMap(String testString) {\n\t\tif(this.lengthMap.containsKey(testString.length())) {\r\n\t\t\tfor (String x : lengthMap.get(testString.length())) {\r\n\t\t\t\tif(x.equals(testString)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isAnagram(String firstWord, String secondWord) {\n HashMap<Character, Integer> charactersNoOccurrences = new HashMap<Character, Integer>();\n\n //Put that stuff in the hash map.\n for (char character: firstWord.toCharArray()) {\n int currentNoOccurrences = charactersNoOccurrences.containsKey(character) ?\n charactersNoOccurrences.get(character) : 0;\n\n charactersNoOccurrences.put(character, currentNoOccurrences + 1);\n }\n\n //Go through the hash map now to and retrieve occurrences, we want to finish with an empty map.\n for (char character: secondWord.toCharArray()) {\n if (!charactersNoOccurrences.containsKey(character)) {\n return false;\n }\n\n int remainingNoOccurrences = charactersNoOccurrences.get(character) - 1;\n\n if (remainingNoOccurrences < 1) {\n charactersNoOccurrences.remove(character);\n } else {\n charactersNoOccurrences.put(character, remainingNoOccurrences);\n }\n }\n\n return charactersNoOccurrences.isEmpty();\n }", "private boolean contain(Map<Double, Integer> map, double temp) {\n \tSet<Double> set = map.keySet();\r\n\t\tIterator<Double> it = set.iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tdouble t = it.next();\r\n\t\t\tdouble tt = t-temp;\r\n\t\t\tif(Math.abs(tt)<0.0000001){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean match(String input, String pattern) {\n\t\t// assumption: not null\n\t\t// corner case\n\t\tif (input.length() == 0 || pattern.length() == 0) {\n\t\t\treturn input.length() == 0 && pattern.length() == 0 ? true : false;\n\t\t}\n\n\t\t// pointers for each string\n\t\tint p0 = 0;\n\t\tint p1 = 0;\n\t\treturn match(input, pattern, p0, p1);\n\t}", "private boolean isMatch(char[] s, char[] p, int ps, int pp) {\n\t\t// int ps = s.length;\n\t\t// int pp = p.length;\n\t\tif (dp[ps][pp] == 1) {\n\t\t\treturn true;\n\t\t}\n\t\tif (dp[ps][pp] == 2) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (s.length - ps == 0) {\n\t\t\tif (p == null || p.length - pp == 0) {\n\t\t\t\tdp[ps][pp] = 1;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (p[0 + pp] == '*') {\n\t\t\t\tboolean result = isMatch(s, p, ps, pp + 1);\n\t\t\t\tdp[ps][pp] = get(result);\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tdp[ps][pp] = 2;\n\t\t\treturn false;\n\t\t}\n\t\tif (p == null || p.length - pp == 0) {\n\t\t\tdp[ps][pp] = 2;\n\t\t\treturn false;\n\t\t}\n\t\tif (s[ps] == p[pp] || p[pp] == '?') {\n\t\t\tboolean result = isMatch(s, p, ps + 1, pp + 1);\n\t\t\tdp[ps][pp] = get(result);\n\t\t\treturn result;\n\t\t}\n\t\tif (p[pp] == '*') {\n\t\t\t// *=0,1,1+\n\t\t\tboolean result = isMatch(s, p, ps, pp + 1)\n\t\t\t\t\t|| isMatch(s, p, ps + 1, pp + 1)\n\t\t\t\t\t|| isMatch(s, p, ps + 1, pp);\n\t\t\tdp[ps][pp] = get(result);\n\t\t\treturn result;\n\t\t}\n\n\t\tdp[ps][pp] = 2;\n\t\treturn false;\n\t}", "public static boolean isPatternMatch(String name, String pattern) {\n \n // check special match cases first\n if (pattern.length() == 0) {\n return name.length() == 0;\n } else if (pattern.charAt(0) == '*') {\n \n // check if the wildcard is all that's left of pattern\n if (pattern.length() == 1) {\n return true;\n } else {\n \n // check if another wildcard follows next segment of text\n pattern = pattern.substring(1);\n int split = pattern.indexOf('*');\n if (split > 0) {\n \n // recurse on each match to text segment\n String piece = pattern.substring(0, split);\n pattern = pattern.substring(split);\n int offset = -1;\n while ((offset = name.indexOf(piece, ++offset)) > 0) {\n int end = offset + piece.length();\n if (isPatternMatch(name.substring(end), pattern)) {\n return true;\n }\n }\n \n } else {\n \n // no more wildcards, need exact match to end of name\n return name.endsWith(pattern);\n \n }\n }\n } else {\n \n // check for leading text before first wildcard\n int split = pattern.indexOf('*');\n if (split > 0) {\n \n // match leading text to start of name\n String piece = pattern.substring(0, split);\n if (name.startsWith(piece)) {\n return isPatternMatch(name.substring(split), pattern.substring(split));\n } else {\n return false;\n }\n \n } else {\n \n // no wildcards, need exact match\n return name.equals(pattern);\n \n }\n }\n return false;\n }", "@Test\n public void testGetMonitorRegexPatternMap() {\n String system0 = \"system0\", system1 = \"system1\";\n String system0Rewriter0 = \"system-0-rewriter-0\", system0Rewriter1 = \"system-0-rewriter-1\", system1Rewriter =\n \"system-1-rewriter\", systemOnlyRewriter = \"system-only-rewriter\";\n String system0Rewriter0Streams = \"system-0-rewriter-0-.*\", system0Rewriter1Streams = \"system-0-rewriter-1-.*\",\n system1RewriterStreams = \"system-1-rewriter-.*\";\n JobConfig jobConfig = new JobConfig(new MapConfig(\n new ImmutableMap.Builder<String, String>().put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter0),\n system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter0), system0Rewriter0Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system0Rewriter1), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system0Rewriter1), system0Rewriter1Streams)\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, system1Rewriter), system1)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, system1Rewriter), system1RewriterStreams)\n // not passed in as a rewriter when calling getMonitorRegexPatternMap\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, \"unused-rewriter\"), system0)\n .put(String.format(JobConfig.REGEX_RESOLVED_STREAMS, \"unused-rewriter\"), \"unused-rewriter-.*\")\n // should not be included since there is no regex\n .put(String.format(JobConfig.REGEX_RESOLVED_SYSTEM, systemOnlyRewriter), system0)\n .build()));\n // Pattern.equals only checks that the references are the same, so can't compare maps directly\n Map<String, Pattern> actual = jobConfig.getMonitorRegexPatternMap(String.join(\",\",\n ImmutableList.of(system0Rewriter0, system0Rewriter1, system1Rewriter, systemOnlyRewriter,\n \"not-a-regex-rewriter\")));\n // only should have rewriters for system0 and system1\n assertEquals(2, actual.size());\n assertEquals(system0Rewriter0Streams + \"|\" + system0Rewriter1Streams, actual.get(system0).pattern());\n assertEquals(system1RewriterStreams, actual.get(system1).pattern());\n\n // empty configs should produce an empty map\n jobConfig = new JobConfig(new MapConfig());\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(system0Rewriter0));\n assertEquals(Collections.<String, Pattern>emptyMap(), jobConfig.getMonitorRegexPatternMap(\"\"));\n }", "public static void main(String[] args) {\n//\n// String pattern = \"abba\";\n// String s = \"dog cat cat fish\";\n\n\n// String pattern = \"aaaa\";\n// String s = \"dog cat cat dog\";\n\n String pattern = \"abba\";\n String s = \"dog dog dog dog\";\n\n// String pattern = \"e\";\n// String s = \"eukera\";\n\n boolean flag = wordPattern(pattern, s);\n\n System.out.println(flag);\n }", "boolean hasSimpleMap();", "private boolean detectRepeat(String substring) {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tchar actual=substring.charAt(i);\n\t\t\t\n\t\t\tint j=i+1;\n\t\t\t//Los anteriores ya se han comprobado\n\t\t\tfor (; j < substring.length() && actual!=substring.charAt(j) ; j++);\n\t\t\t\n\t\t\tif (j<substring.length()) return true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public boolean isMatch2(){\r\n if(str==null ||pattern==null) return false; \r\n boolean[][] match=new boolean[lens+1][lenp+1];\r\n match[0][0]=true; \r\n for (int i = 0; i <lenp; i++) {\r\n if (pattern.charAt(i) == '*' && match[0][i-1]) \r\n match[0][i+1] = true; \r\n }\r\n for (int i = 0 ; i < lens; i++) {\r\n for (int j = 0; j < lenp; j++) {\r\n if (pattern.charAt(j) == '.') {\r\n match[i+1][j+1] = match[i][j];\r\n }\r\n if (pattern.charAt(j) == str.charAt(i)) {\r\n match[i+1][j+1] = match[i][j];\r\n }\r\n if (pattern.charAt(j) == '*') {\r\n if (pattern.charAt(j-1) != str.charAt(i) && pattern.charAt(j-1) != '.') {\r\n match[i+1][j+1] = match[i+1][j-1];\r\n } else {\r\n match[i+1][j+1] = (match[i+1][j] || match[i][j+1] || match[i+1][j-1]);\r\n }\r\n }\r\n }\r\n }\r\n return match[lens][lenp];\r\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public boolean matchFilter(Map<String,String> filter);", "public static boolean isMatch(final String pattern, final String phrase) {\n if (pattern.length() != phrase.length() ||\n (pattern.charAt(0) != '?' && pattern.charAt(0) != phrase.charAt(0)))\n return false;\n return pattern.length() == 1 ||\n isMatch(pattern.substring(1), phrase.substring(1));\n }", "@Override\n\tpublic int weddingIsRepeat(Map<String, String>map) {\n\t\treturn welfareAppDao.weddingIsRepeat(map);\n\t}", "boolean contains(String pattern) {\n String str = buffer.toString();\n return str.contains(pattern);\n }", "private boolean checkDuplicate(String macAddress) {\n\t\tfor (int i=0; i<bluetoothDevices.size(); i++) {\n\t\t\tif (macAddress.equals(bluetoothDevices.get(i).macAddress)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isMatch(String target, String pattern) {\n if(pattern.isEmpty()) return target.isEmpty();\n \n boolean firstMatch = !target.isEmpty()&&(target.charAt(0)==pattern.charAt(0)||pattern.charAt(0)=='.');\n \n if(pattern.length()>=2 && pattern.charAt(1)=='*'){\n return isMatch(target,pattern.substring(2))||(firstMatch&&isMatch(target.substring(1),pattern));\n }else{\n return firstMatch&&isMatch(target.substring(1),pattern.substring(1));\n }\n \n \n }", "private static boolean checkPatternAppropriateness(String pattern,String input){\n Pattern p1=Pattern.compile(pattern);\n Matcher m1=p1.matcher(input);\n return m1.matches();\n }", "private static boolean union(Map<String, Integer> map, String c1, String c2){\n if(!map.containsKey(c1) && !map.containsKey(c2)){\n map.put(c1, counter);\n map.put(c2, counter);\n counter++;\n return true;\n }\n\n if(!map.containsKey(c1) && map.containsKey(c2)) {\n int newValue = map.get(c2);\n map.put(c1 , newValue);\n return true;\n }\n\n\n if(map.containsKey(c1) && !map.containsKey(c2)) {\n int newValue = map.get(c1);\n map.put(c2 , newValue);\n return true;\n }\n\n\n //If different unions, Make the second oen to be the first one\n if(map.containsKey(c1) && map.containsKey(c2)){\n int newValue = map.get(c1);\n int oldValue = map.get(c2);\n\n if(newValue == oldValue){\n return false;\n }\n\n for(String city : map.keySet()){\n if(map.get(city) == oldValue){\n map.put(city , newValue);\n }\n return true;\n }\n }\n\n return true;\n }", "public static boolean match(String pattern, String str) {\n int i = 0, j = 0, ii = 0, jj = 0, plen = pattern.length(), slen = str.length();\n int wordStart, wordEnd, lastPossible;\n while (i < plen) {\n // find the next word in pattern\n wordStart = i;\n while (wordStart < plen && pattern.charAt(wordStart) == '*')\n wordStart++;\n if (wordStart == plen) // all left in pattern is '*'\n return true;\n // find the word end\n wordEnd = wordStart + 1;\n while (wordEnd < plen && pattern.charAt(wordEnd) != '*')\n wordEnd++;\n\n // locate the word in string\n lastPossible = slen - (wordEnd - wordStart) + 1;\n for (; j < lastPossible; j++) {\n // check if word matches at j\n for (ii = wordStart, jj = j; ii < wordEnd; ii++, jj++)\n if (pattern.charAt(ii) != '?' && pattern.charAt(ii) != str.charAt(jj))\n break;\n if (ii == wordEnd) // matched at j\n break;\n\n // if there's no '*' before word, then the string must\n // match at j, but it didn't\n if (wordStart == i)\n return false;\n }\n\n // failed to locate the word\n if (!(j < lastPossible))\n return false;\n\n // proceed to the next word\n i = ii;\n j = jj;\n }\n\n // pattern ended, if string also ended, then it's a match;\n // otherwise it's a mismatch\n return j == slen;\n }", "public boolean readPattern(String fname, String pattern) {\n\t\tString line;\n\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(fname);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tfis));\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tif (line.indexOf(pattern) != -1)// Si no esta el patron en la\n\t\t\t\t\t\t\t\t\t\t\t\t// linea la guarda de lo\n\t\t\t\t\t\t\t\t\t\t\t\t// contrario la salta\n\t\t\t\t{\n\t\t\t\t\treader.close();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treader.close();\n\t\t\tif(logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Encontrado el patron \" + pattern + \" en el fichero \"\n\t\t\t\t\t+ fname);\n\t\t\treturn false;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "private static boolean isContained(String text, String pattern)\n {\n if (pattern.length() == 0)\n return true;\n else if (pattern.length() > text.length())\n return false;\n else if (isPrefix(text, pattern))\n return true;\n else\n return isContained(text.substring(1), pattern);\n }", "private static boolean checkPermutationCountingHashMap(String s1, String s2) {\n // Strings are of unequal length. Cannot be permutations.\n if (s1.length() != s2.length()) return false;\n\n // Keep a track of the characters using a HashMap.\n Map<Character, Integer> map = new HashMap<Character, Integer>();\n for (int i = 0; i < s1.length(); i++) {\n // Increment count for characters in s1\n if (map.containsKey(s1.charAt(i))) {\n map.put(s1.charAt(i), map.get(s1.charAt(i)) + 1);\n } else {\n map.put(s1.charAt(i), 1);\n }\n\n // Decrement count for characters in s2\n if (map.containsKey(s2.charAt(i))) {\n map.put(s2.charAt(i), map.get(s2.charAt(i)) - 1);\n } else {\n map.put(s2.charAt(i), -1);\n }\n }\n\n // If there are any characters not present in both, some value would be -1 or 1.\n // This case would imply that the strings are not permutations.\n for (char c : map.keySet()) {\n if (map.get(c) != 0) return false;\n }\n return true;\n }", "private boolean isMatch0(String s, int si, String p, int pi) {\n\t\tif (si >= s.length()) return pi <= p.length();\n\t\tif (pi >= p.length()) return false;\n\t\t// if (cache[si][pi] != -1) return cache[si][pi] == 1;\n\n\t\tchar pattern = p.charAt(pi);\n\t\tboolean result;\n\n\t\tif (pattern == '.') {\n\t\t\tresult = isMatch0(s, si + 1, p, pi + 1);\n\t\t} else if (pattern == '*') {\n\t\t\tboolean skip = isMatch0(s, si + 1, p, pi + 1);\n\t\t\tboolean skipZero = isMatch0(s, si + 1, p, pi);\n\t\t\tresult = skip || skipZero;\n\t\t} else {\n\t\t\tresult = pattern == s.charAt(si)\n\t\t\t\t\t? isMatch0(s, si + 1, p, pi + 1)\n\t\t\t\t\t: isMatch0(s, si, p, pi + 1);\n\t\t}\n\n\t\t// cache[si][pi] = result ? 1 : 0;\n\t\treturn result;\n\t}", "Boolean same(MapComp<K, V> m);", "@Override\n public boolean exists(Map<Integer, ArrayList<Crop>> cache, Crop record) {\n for (Integer i : cache.keySet()) {\n for (Crop c : cache.get(i)) {\n if (record.equals(c)) {\n return true;\n }\n }\n }\n return false;\n }", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "boolean hasMapID();", "private static boolean search(String substring1, String substring2) {\n\t\tHashMap<Character, Integer> hm = new HashMap<Character, Integer>();\n\t\tfor (int i = 0; i < substring1.length(); i++) {\n\t\t\thm.put(substring1.charAt(i), hm.getOrDefault(substring1.charAt(i), 0)+1);\n\t\t}\n\n\t\tfor (int i = 0; i < substring2.length(); i++) {\n\t\t\tchar c = substring2.charAt(i);\n\t\t\tif (hm.containsKey(c)) {\n\t\t\t\thm.put(c, hm.get(c)-1);\n\t\t\t\tif (hm.get(c) == 0) {\n\t\t\t\t\thm.remove(c);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hm.isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "boolean isPattern(String path);", "boolean match(String pattern, String path);", "private boolean isUsed(String key2) {\n\t\tfor(int i = 0; i < size; i++){\n\t\t\tif(keys[i].equals(key2)) return true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean\tcontains(String e) {\n\t\treturn map.containsKey(e);\n\t}", "@Test\n public void mapContains() {\n check(MAPCONT);\n query(MAPCONT.args(MAPNEW.args(), 1), false);\n query(MAPCONT.args(MAPENTRY.args(1, 2), 1), true);\n }", "public boolean isMatch(String s, String p) {\n mem= new int[s.length()+1][p.length()+1];\n return match(s,p);\n }", "private boolean checkPAnagrams(int[] mapElements, int[] pElements) {\n for (int i = 0; i < 26; i++) {\n if(mapElements[i]!=pElements[i])\n return false;\n }\n// System.out.println(\"check p anagrams :\" + (System.nanoTime() - startTime));\n return true;\n }", "@Test\n\tvoid testIsUnique() {\n\t\tMap<String, String> testMap = new HashMap<String, String>();\n\t\ttestMap.put(\"Marty\", \"Stepp\");\n\t\ttestMap.put(\"Stuart\", \"Reges\");\n\t\tassertTrue(isUnique(testMap));\n\t\ttestMap.clear();\n\t\t\n\t\t// Test of non-unique map using two meanings of the word \"Paris\"\n\t\ttestMap.put(\"City of Light\", \"Paris\");\n\t\ttestMap.put(\"Homeric adjudicator\", \"Paris\");\n\t\tassertFalse(isUnique(testMap));\n\t}", "public abstract boolean isMoreSpecificThanOrEqualTo(Pattern pattern);", "public static boolean isContainskeyInMap(String key, Map<String, String> keyValuePair) {\n if (keyValuePair.values().contains(key)) {\n return true;\n } else {\n notFoundList.add(key);\n return false;\n }\n }", "private static boolean checkMatch(Pattern p, String s) {\n Matcher mat = p.matcher(s);\n return mat.matches();\n }", "public static void main(String[] args) {\n\t\tString a= \"ghij\";\n\t\tString b = \"abcd\";\n\t\tboolean flag =false;\n\t\tHashMap h = new HashMap();\n\t\tfor(int i=0;i<a.length();i++){\n\t\t\tif(!h.containsKey(b.charAt(i))){\n\t\t\t\th.put(b.charAt(i),a.charAt(i));\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif(flag==true)\n\t\t\tSystem.out.println(\"Cannot map\");\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Can map\");\n\n\t}", "boolean checkPermutation(String a, String b) {\r\n\r\n if (a == null || b == null) {\r\n throw new NullPointerException();\r\n }\r\n\r\n if (a.length() != b.length()) {\r\n return false;\r\n }\r\n\r\n Map<Character, Integer> frequencies = getFrequency(a);\r\n\r\n for (int i = 0; i < b.length(); i++) {\r\n char c = b.charAt(i);\r\n\r\n if (frequencies.containsKey(c)) {\r\n int count = frequencies.get(c);\r\n if (count == 0) {\r\n return false;\r\n }\r\n\r\n frequencies.replace(c, count - 1);\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n }", "private boolean isDoubleMatch(AnnotatedPluginDocument destination, AnnotatedPluginDocument insert) throws DocumentOperationException {\n List<SequenceAnnotation> destinationAnnotations = getFlankingOverhangs(destination);\n List<SequenceAnnotation> insertAnnotations = getFlankingOverhangs(insert);\n //Both lists will have a size of 2\n LinkedList<SequenceAnnotation> matchingOverhangs = new LinkedList<SequenceAnnotation>();\n for (SequenceAnnotation dAnno : destinationAnnotations) {\n for (SequenceAnnotation iAnno : insertAnnotations) {\n if (iAnno.getQualifierValue(\"sequence\").equalsIgnoreCase(dAnno.getQualifierValue(\"sequence\"))\n && iAnno.getInterval().getDirection() != dAnno.getInterval().getDirection()) {\n matchingOverhangs.add(iAnno);\n matchingOverhangs.add(dAnno);\n }\n }\n }\n //If there is a double match, all four flanking annotations should have been added to the list.\n if (matchingOverhangs.containsAll(destinationAnnotations) && matchingOverhangs.containsAll(insertAnnotations)) {\n return true;\n }\n return false;\n }", "private static void testMap(final OurMap<Integer, String> map) {\n System.out.printf(\"%n%s%n\", map.getClass());\n assert map.size() == 0;\n assert !map.containsKey(117);\n assert !map.containsKey(-2);\n assert map.get(117) == null;\n assert map.put(117, \"A\") == null;\n assert map.containsKey(117);\n assert map.get(117).equals(\"A\");\n assert map.put(17, \"B\") == null;\n assert map.size() == 2;\n assert map.containsKey(17);\n assert map.get(117).equals(\"A\");\n assert map.get(17).equals(\"B\");\n assert map.put(117, \"C\").equals(\"A\");\n assert map.containsKey(117);\n assert map.get(117).equals(\"C\");\n assert map.size() == 2;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n assert map.remove(117).equals(\"C\");\n assert !map.containsKey(117);\n assert map.get(117) == null;\n assert map.size() == 1;\n assert map.putIfAbsent(17, \"D\").equals(\"B\");\n assert map.get(17).equals(\"B\");\n assert map.size() == 1;\n assert map.containsKey(17);\n assert map.putIfAbsent(217, \"E\") == null;\n assert map.get(217).equals(\"E\");\n assert map.size() == 2;\n assert map.containsKey(217);\n assert map.putIfAbsent(34, \"F\") == null;\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v));\n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n map.reallocateBuckets();\n assert map.size() == 3;\n assert map.get(17).equals(\"B\") && map.containsKey(17);\n assert map.get(217).equals(\"E\") && map.containsKey(217);\n assert map.get(34).equals(\"F\") && map.containsKey(34);\n map.forEach((k, v) -> System.out.printf(\"%10d maps to %s%n\", k, v)); \n }", "public boolean match(String s, String p) {\n if(s==null||p==null) return false;\n if(p.length()==0&&s.length()!=0) return false;\n if(mem[s.length()][p.length()]!=0) return mem[s.length()][p.length()]==1;\n boolean ans=false;\n if(s.length()==0) ans=canBeEmpty(p);\n else if(p.charAt(0)=='?'||p.charAt(0)==s.charAt(0)) ans=match(s.substring(1),p.substring(1));\n else if(p.charAt(0)=='*') ans= match(s.substring(1),p)||match(s.substring(1),p.substring(1));\n mem[s.length()][p.length()]=ans?1:2;\n return ans;\n }", "@Override\r\n\tpublic boolean matches(String first, String last) {\n\t\treturn false;\r\n\t}", "static boolean AnyMapTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AnyMapTest\")) return false;\n if (!nextTokenIs(b, K_MAP)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_);\n r = consumeTokens(b, 3, K_MAP, L_PAR, STAR_SIGN, R_PAR);\n p = r; // pin = 3\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "public boolean isMatch(String s, String p) {\n if(s == null || p == null){\n return false;\n }\n int pPoint = 0;\n int sPoint = 0;\n int starPoint =-1;\n int sMatch = 0;\n while(sPoint < s.length()){\n // there is no star, then we should match char by char\n if(pPoint < p.length() && (p.charAt(pPoint) == '?' || s.charAt(sPoint) == p.charAt(pPoint))){\n pPoint ++;\n sPoint ++;\n }else if( pPoint < p.length() && p.charAt(pPoint) == '*'){\n //if there is start, we mark the start position and pos in s\n // compare pPoint +1 and sPoint;\n starPoint = pPoint;\n sMatch = sPoint;\n pPoint++;\n }else if(starPoint != -1){\n // if there is a start already and there is mismatch between pPoint and sPoint\n // we use the * to match the sPoint\n // bring back the point to startPoint+1 for pPoint \n // sMatch ++\n pPoint = starPoint+1;\n sPoint = sMatch+1;\n sMatch ++;\n }else{\n return false;\n }\n }\n while(pPoint < p.length()){\n if(p.charAt(pPoint) != '*'){\n return false;\n }\n pPoint++;\n }\n return true;\n }", "public static boolean canBeAPalindromeUsingMap(String s) {\n Map<Character, Integer> charCounts = new HashMap<>();\n char[] chars = s.toCharArray();\n int lengthWithoutSpaces = 0;\n for (char c : chars) {\n if (c != ' ') {\n lengthWithoutSpaces++;\n charCounts.compute(c, (k, v) -> v == null ? 1 : v + 1);\n }\n }\n boolean isLengthEven = lengthWithoutSpaces % 2 == 0;\n boolean hasUnevenCountOfChar = false;\n for (Integer charCount : charCounts.values()) {\n if (charCount % 2 == 0) {\n continue;\n } else {\n if (isLengthEven) {\n return false;\n } else {\n if (!hasUnevenCountOfChar) {\n hasUnevenCountOfChar = true;\n } else {\n return false;\n }\n }\n }\n }\n return true;\n }", "public boolean containsEntry(Map.Entry<String, String> pair) {\n\t\tfinal Iterator<Map.Entry<String, String>> iter = entries.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tif (iter.next().equals(pair)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean match(String pattern, String fileName) {\n\t\tpattern = pattern.trim();\n\t\tpattern = toMinimalPattern(pattern);\n\t\tpattern = pattern.toUpperCase();\n\t\tchar[] ca1 = pattern.toCharArray();\n\t\tfileName = fileName.trim();\n\t\tfileName = fileName.toUpperCase();\n\t\tchar[] ca2 = fileName.toCharArray();\n\t\treturn match(ca1, 0, ca2, 0);\n\t}", "public MapAssertion<K, V> containsExactly(final Map<K, V> expected) {\n checkActualIsNotNull();\n checkArgumentIsNotNull(expected, \"expected\");\n List<K> actualKeysCopy = new ArrayList<>(getActual().keySet());\n int elementCount = 0;\n for (K key : expected.keySet()) {\n int idx = actualKeysCopy.indexOf(key);\n if (idx >= 0 && isValuesEqual(expected, key)) {\n actualKeysCopy.remove(idx);\n elementCount++;\n }\n }\n if (!actualKeysCopy.isEmpty() || elementCount != expected.size()) {\n throw getAssertionErrorBuilder().addMessage(Messages.Fail.Actual.CONTAINS_EXACTLY).addActual().addExpected(expected).build();\n }\n return this;\n }", "private void checkLocation(String mapName, Set<Point> seenLocations, List<Point> wildLocations) {\n Assert.assertFalse(mapName, wildLocations.isEmpty());\n for (Point location : wildLocations) {\n Assert.assertFalse(seenLocations.contains(location));\n seenLocations.add(location);\n }\n }", "public boolean isMatch(String s, String p) {\n\t\tint slen = s.length();\n\t\tint plen = p.length();\n\t\tif (plen >= 2) {\n\t\t\tString t = \"\";\n\t\t\tfor (int k = 0; k < plen - 1; k++) {\n\t\t\t\tif (p.charAt(k) == '*' && p.charAt(k + 1) == '*') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tt += p.substring(k, k + 1);\n\t\t\t}\n\t\t\tif (p.charAt(plen - 1) == '*' && p.charAt(plen - 2) != '*') {\n\t\t\t\tt += \"*\";\n\t\t\t} else {\n\t\t\t\tt += p.substring(plen - 1, plen);\n\t\t\t}\n\t\t\tp = t;\n\t\t\tplen = t.length();\n\t\t}\n\t\tchar[] sarr = new char[slen + 1];\n\t\tchar[] parr = new char[plen + 1];\n\t\tfor (int i = 0; i < slen; i++) {\n\t\t\tsarr[i] = s.charAt(i);\n\t\t}\n\t\tfor (int j = 0; j < plen; j++) {\n\t\t\tparr[j] = p.charAt(j);\n\t\t}\n\t\tsarr[slen] = '\\0';\n\t\tparr[plen] = '\\0';\n\t\treturn isMatchRecur(sarr, 0, parr, 0);\n\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(isMatch(\"daa\", \"d*ada*\"));\n\t\tSystem.out.println(isMatch(\"daa\", \"d*aa\"));\n\t}", "protected boolean checkText(Map<String, List<Object>> map, String text) {\n\t\tif (map == null)\n\t\t\treturn false;\n\t\tfor (Map.Entry<String, List<Object>> entry : map.entrySet())\n\t\t\tfor (Object object : entry.getValue())\n\t\t\t\tif (object.toString().contains(text))\n\t\t\t\t\treturn true;\n\t\treturn false;\n\t}" ]
[ "0.6756062", "0.61588675", "0.6063222", "0.5773838", "0.5731595", "0.57125217", "0.5626181", "0.56152815", "0.5592174", "0.55077785", "0.53918123", "0.53658366", "0.5310836", "0.52936983", "0.524978", "0.5226287", "0.521356", "0.5204793", "0.51906097", "0.51513433", "0.51415765", "0.51379", "0.513226", "0.51176584", "0.509178", "0.50752103", "0.5065656", "0.50487113", "0.5038978", "0.50348866", "0.5023013", "0.50192314", "0.501768", "0.49927104", "0.49919057", "0.49857295", "0.4975503", "0.4961621", "0.49530414", "0.49428397", "0.4940387", "0.49393612", "0.49320152", "0.49249175", "0.49158016", "0.48825973", "0.48663172", "0.4858691", "0.48479745", "0.48464963", "0.48431298", "0.48368603", "0.48196915", "0.48052448", "0.47965857", "0.4784892", "0.477334", "0.47721303", "0.47714517", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4763206", "0.4760537", "0.4760451", "0.47512832", "0.4746427", "0.47348195", "0.47325927", "0.47314826", "0.47249264", "0.47208825", "0.4717354", "0.47158694", "0.47021165", "0.46993405", "0.46969292", "0.46832842", "0.46830752", "0.468273", "0.46802378", "0.46795228", "0.46734712", "0.46682093", "0.46669972", "0.46668226", "0.4665005", "0.4661125", "0.46526814", "0.464746", "0.46368572" ]
0.7586849
0
Return the key of the specified pattern in the specified map.
private static int getKeyOfSubstring(Map<Byte, byte[]> haystack, byte[] needle) { int key = 0; byte[] array = Arrays.copyOfRange(needle, 0, needle.length-1); for (Byte b : haystack.keySet()) { if (Arrays.equals(haystack.get(b), array)) { key = b; break; } } return key; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Hashtable<K, V> getPattern(String pattern);", "Set<String> getKeysMatchingPattern(String pattern);", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "java.lang.String getKey();", "private static Object findKey(Map<?, ?> in, Object value) {\n\t\tfor (Object key : in.keySet()) {\n\t\t\tif (in.get(key).equals(value)) {\n\t\t\t\treturn key;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private NameValue getIgnoreBackslash(TreeMap map, String pattern) {\n\n if(pattern == null)\n return null;\n\n Object match = map.get(pattern);\n\n if(match != null)\n return new NameValue(pattern, match);\n\n pattern = pattern.replace(\"\\\\\", \"\");\n match = map.get(pattern);\n\n if(match != null)\n return new NameValue(pattern, match);\n\n // No easy match...\n\n Set<Map.Entry> elems = map.entrySet();\n\n for(Map.Entry elem : elems) {\n String key = elem.getKey().toString();\n\n if(key == null)\n continue;\n\n String name = key.replace(\"\\\\\", \"\");\n\n if(pattern.equals(name))\n return new NameValue(key, elem.getValue());\n }\n return null;\n }", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "private int indexOf(String s, Map<String, Integer> map) {\n\n if (map.containsKey(s)) {\n return map.get(s);\n }\n return EDGE_NOT_EXIST;\n }", "private static <K, V> K getKey(final Map<K, V> map, final V value) {\n if (value == null) {\n return null; // None of the maps have a null value anyway.\n }\n\n for (final Entry<K, V> entry : map.entrySet()) {\n if (value.equals(entry.getValue())) {\n return entry.getKey();\n }\n }\n\n return null;\n }", "public static <K, V> K getKey(Map<K, V> map, V value) {\n\t\tfor (K key : map.keySet()) {\n\t\t\tif (value.equals(map.get(key))) {\n\t\t\t\treturn key;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "UrlMap findByKey(String key);", "public List<String> getKeysByPattern(String patternKey){\n RKeys keys = redissonClient.getKeys();\n Iterable<String> foundedKeys = keys.getKeysByPattern(patternKey);\n List<String> list = new ArrayList<>();\n foundedKeys.forEach(key -> list.add(key));\n return list;\n }", "PatternMapping getPatternMapping();", "String getKey(int index);", "public Iterable<String> keysThatMatch(String pattern)\r\n {\r\n Queue<String> q = new Queue<String>();\r\n if ((pattern.equals(\"\") || pattern.equals(\".\")) && null_str_val != null)\r\n q.enqueue(\"\");\r\n collect(root, \"\", pattern, q);\r\n return q;\r\n }", "private <T, E> T getKeyByValue(Map<T, E> map, E value) {\n for (Map.Entry<T, E> entry : map.entrySet()) {\n if (value.equals(entry.getValue())) {\n return entry.getKey();\n }\n }\n return null;\n }", "public abstract String mapItemToKey(String str);", "Object getKey();", "public interface IPatternMap<K, V> {\r\n\r\n\t/**\r\n\t * return a Hashtable of the entries that matche the pattern\r\n\t * @param pattern\r\n\t * @return\r\n\t */\r\n\tpublic Hashtable<K, V> getPattern(String pattern);\r\n\t\r\n\r\n\t/**\r\n\t * return a Hashtable of the entries that match the wildcard (*)\r\n\t * @param pattern\r\n\t * @return\r\n\t */\r\n\tpublic Hashtable<K, V> getWildcard(String wildcard);\r\n\r\n\r\n\r\n}", "public Pattern getPatternByName(String name) throws PatternNotFound {\n if(mapName.containsKey(name)) {\r\n return mapName.get(name);\r\n }\r\n else {\r\n throw new PatternNotFound(\"No pattern called \" + name);\r\n }\r\n }", "String search(int key);", "public Iterable<String> keysThatMatch(String pat) {\n LinkedList<String> q = new LinkedList<String>();\n collect(root, pat, \"\", q);\n return q;\n }", "@Override\r\n public Map<K, ICacheElement<K, V>> processGetMatching(final String pattern)\r\n {\r\n final Map<K, ICacheElement<K, V>> elements = new HashMap<>();\r\n Set<K> keyArray = null;\r\n storageLock.readLock().lock();\r\n try\r\n {\r\n keyArray = new HashSet<>(keyHash.keySet());\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n final Set<K> matchingKeys = getKeyMatcher().getMatchingKeysFromArray(pattern, keyArray);\r\n\r\n for (final K key : matchingKeys)\r\n {\r\n final ICacheElement<K, V> element = processGet(key);\r\n if (element != null)\r\n {\r\n elements.put(key, element);\r\n }\r\n }\r\n return elements;\r\n }", "public int getIdFromPattern (String pattern){\n if (pattern.equals(\"1000\")) {\n return rightU;\n } else if (pattern.equals(\"0100\")) {\n return leftU;\n } else if (pattern.equals(\"0010\")) {\n return lowerU;\n } else if (pattern.equals(\"0001\")) {\n return upperU;\n } else if (pattern.equals(\"1100\")) {\n return rightleftTunnel;\n } else if (pattern.equals(\"1010\")) {\n return rightLowerCorner;\n } else if (pattern.equals(\"1001\")){\n return rightUpperCorner;\n } else if (pattern.equals(\"0011\")) {\n return updownTunnel;\n } else if (pattern.equals(\"0101\")) {\n return leftUpperCorner;\n } else if (pattern.equals(\"0110\")) {\n return leftLowerCorner;\n } else if (pattern.equals(\"1110\")) {\n return lowerWall;\n } else if (pattern.equals( \"1101\")) {\n return upperWall;\n } else if (pattern.equals( \"1011\")) {\n return rightWall;\n } else if (pattern.equals( \"0111\")) {\n return leftWall;\n } else if (pattern.equals( \"1111\")) {\n return allWall;\n }else if (pattern.equals( \"0000\")) {\n return allWall;\n }\n return 0;\n }", "public static <K, V extends Comparable<? super V>> K minValueKey(Map<K, V> map)\n\t{\n\t\tif (map.size() > 0)\n\t\t{\n\t\t\tList<Map.Entry<K, V>> list = new LinkedList<Map.Entry<K, V>>(map.entrySet());\n\t\t\tCollections.sort(list, new Comparator<Map.Entry<K, V>>()\n\t\t\t{\n\t\t\t\tpublic int compare(Map.Entry<K, V> o1, Map.Entry<K, V> o2)\n\t\t\t\t{\n\t\t\t\t\treturn (o1.getValue()).compareTo(o2.getValue());\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\treturn list.get(0).getKey();\n\t\t\t}\n\t\t\tcatch (IndexOutOfBoundsException e)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public static <T extends Enum<T>> T findMatch(Map<T, CharSequence> map, CharSequence input) {\n return literalMatcher(map).apply(input);\n }", "TemplateModel getKey();", "String getLookupKey();", "public String getMinKey() {\n if (map.size() == 0)\n return \"\";\n return minKey;\n }", "public String getKey();", "public String getKey();", "public String getKey();", "public String getKey();", "@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapItemToKey(String item) {\n return item;\n }", "public int getIndexOf(K key);", "private String getKey(int houseNo, int colorNo) {\n return houseNo + \"_\" + colorNo;\n }", "K getKey();", "K getKey();", "K getKey();", "K getKey();", "public static String findName(Map<Integer, String> map, Integer roll) {\r\n\t\t\r\n\t\tSet<Integer> set1= map.keySet();\r\n\t\tIterator<Integer> it =set1.iterator();\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tInteger key= it.next();\r\n\t\t\tif(roll==key) {\r\n\t\t\tString value=map.get(key);\r\n\t\t\treturn value;\r\n\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn \"nill\";\r\n\t\t\t}\r\n\t\t\t\r\n\t}\r\n\t\treturn \"nill\";\r\n}", "UnderlayTopologyKey getKey();", "abstract public String getKey();", "public static <T, E> T getKeyByValue(Map<T, E> map, E value) {\n for (Map.Entry<T, E> entry : map.entrySet()) {\n if (Objects.equals(value, entry.getValue())) {\n return entry.getKey();\n }\n }\n return null;\n }", "@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapItemToKey(String item) {\n return this.mPrefix + item;\n }", "Resolvable<String> getKey(int index);", "public String getMinKey() {\n\t\tif(map.isEmpty()){\n\t\t\treturn \"\";\n\t\t}\n\t\treturn tail.prev.key;\n\t}", "boolean matches(String key) {\n int keyLength = key.length();\n int patternLength = pattern.length();\n boolean[][] state = new boolean[keyLength + 1][patternLength + 1];\n state[0][0] = true; // empty key matches empty pattern\n for (int i = 0; i < patternLength; i++) {\n if (pattern.charAt(i) == '*') state[0][i + 1] = state[0][i]; // whether first empty matches pattern\n }\n for (int i = 0; i < keyLength; i++) {\n for (int j = 0; j < patternLength; j++) {\n char ch = pattern.charAt(j);\n if (ch == '?' || key.charAt(i) == ch) {\n state[i + 1][j + 1] = state[i][j];\n } else if (ch == '*') {\n state[i + 1][j + 1] = state[i][j + 1] || state[i + 1][j];\n }\n }\n }\n return state[keyLength][patternLength];\n }", "public KeyCode getKey(Input input) {\n return inputsMap.get(input);\n }", "public static <T, E> T getKeyByValue(Map<T, E> map, E value) {\n\t\tfor (Entry<T, E> entry : map.entrySet()) {\n\t\t\tif (Objects.equals(value, entry.getValue())) {\n\t\t\t\treturn entry.getKey();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "String get(Integer key);", "String key();", "public final String getKey(final Integer id) {\r\n\t\tString key = idKeyMap.get(id);\r\n\t\tif (key == null){\r\n\t\t\tkey = \"<no key for id: \"+id+\">\";\r\n\t\t\tidKeyMap.put(id, key);\r\n\t\t\tkeyIdMap.put(key, id);\r\n\t\t}\r\n\t\treturn key;\r\n\t\t\r\n\t}", "String getKeyFormat();", "public static String parse(String template, Map<String, String> map){\n Matcher matcher = PROCESS_REGEX_PATTERN.matcher(template);\n int count = 0;\n StringBuffer sb = null;\n while(matcher.find()) {\n count++;\n if(sb == null) sb = new StringBuffer();\n String key = (String)matcher.group(1);\n if(map.containsKey(key)){\n matcher.appendReplacement(sb, map.get(key));\n }\n }\n if(count == 0){\n return template;\n } else {\n matcher.appendTail(sb);\n return sb.toString();\n }\n }", "public static String replaceKeys(String in, Pattern pattern, boolean preserveKeys, int passes, Map<?,?>... maps) {\n String out = in;\n for (int pass = 1; pass <= passes; pass++) {\n Matcher m = pattern.matcher(in);\n String match, key;\n while (m.find()) {\n match = m.group();\n key = m.group(1);\n Boolean resolved = false;\n if (maps != null) {\n for (Map<?, ?> map : maps) {\n if ((resolved = map.containsKey(key))) {\n out = out.replace(match, Objects.toString(map.get(key)));\n break;\n }\n }\n }\n if (!resolved && !preserveKeys) {\n out = out.replace(match, key);\n }\n }\n in=out;\n }\n return out;\n }", "int getKey(int i);", "XClass getMapKey();", "public int getKeyMap() {\r\n return Input.Keys.valueOf(keyMapName);\r\n }", "public final AstValidator.map_key_return map_key() throws RecognitionException {\n AstValidator.map_key_return retval = new AstValidator.map_key_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree QUOTEDSTRING433=null;\n\n CommonTree QUOTEDSTRING433_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:667:9: ( QUOTEDSTRING )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:667:11: QUOTEDSTRING\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n QUOTEDSTRING433=(CommonTree)match(input,QUOTEDSTRING,FOLLOW_QUOTEDSTRING_in_map_key3547); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n QUOTEDSTRING433_tree = (CommonTree)adaptor.dupNode(QUOTEDSTRING433);\n\n\n adaptor.addChild(root_0, QUOTEDSTRING433_tree);\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "private String getHashKey(Restriction restriction)\n\t\t{\n\t\t\treturn LabelUtils.getRestrictionString(restriction);\n\t\t}", "public int indexOf(String key) {\r\n Integer i = keys.get(key);\r\n return (i == null ? -1 : i);\r\n }", "public void handlePatternKey(KnightSubject source);", "public K getKey();", "public K getKey();", "private String getKey(String moduleId, String copyId, String ownerId){\n\t\treturn copyId+DELIMITER+moduleId+DELIMITER+ownerId;\n\t}", "int getKey();", "int getKey();", "private final static String getKey( Integer id ) {\n\t\treturn \"\" + id ;\n\t}", "@MapName(\"lnfkey\")\n \tString getLnfKey();", "@Test\n public void mapKeys() {\n check(MAPKEYS);\n query(\"for $i in \" + MAPKEYS.args(\n MAPNEW.args(\" for $i in 1 to 3 return \" +\n MAPENTRY.args(\"$i\", \"$i+1\"))) + \" order by $i return $i\", \"1 2 3\");\n query(\"let $map := \" + MAPNEW.args(\" for $i in 1 to 3 return \" +\n MAPENTRY.args(\"$i\", \"$i + 1\")) +\n \"for $k in \" + MAPKEYS.args(\"$map\") + \" order by $k return \" +\n MAPGET.args(\"$map\", \"$k\"), \"2 3 4\");\n }", "public String findKey(String key) {\n\n // Find the keys original hash key\n int arrayIndexHash = getHashIndex(key);\n\n while (theArray[arrayIndexHash] != \"-1\") {\n\n if (theArray[arrayIndexHash] == key) {\n\n // Found the key so return it\n System.out.println(key + \" was found in index \"\n + arrayIndexHash);\n\n return theArray[arrayIndexHash];\n\n }\n\n // Look in the next index\n ++arrayIndexHash;\n\n // If we get to the end of the array go back to index 0\n arrayIndexHash %= arraySize;\n\n }\n\n // Couldn't locate the key\n return null;\n\n }", "private Integer getKey(WeatherData value)\n\t{\n\t for(Integer key : trainDataXMap.keySet())\n\t {\n\t if(trainDataXMap.get(key).equals(value))\n\t {\n\t return key; //return the first found\n\t }\n\t }\n\t return null;\n\t}", "public static int getIndex(String key) {\r\n return KEYS.indexOf(key);\r\n }", "K findKeyForValue(V val);", "private String getKey(Module module){\n\t\treturn getKey(module.getId(), module.getCopyId(), module.getOwnerId());\n\t}", "@Override\n public Map<K, ICacheElement<K, V>> getMatchingCacheElements( final String pattern )\n {\n return this.getCacheControl().getMatching( pattern );\n }", "public K getKey(V value);", "String getLocaleKey(String subject);", "String getKey(Object entity);", "public static boolean mapPatternEntry(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"mapPatternEntry\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, MAP_PATTERN_ENTRY, \"<map pattern entry>\");\n r = consumeToken(b, DOT_DOT_DOT);\n if (!r) r = mapPatternEntry_1(b, l + 1);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "static int getKey(String raw) {\n\t\tint key = 0;\n\t\tfor (int i = 0; i < raw.length(); i++) {\n\t\t\tkey = key * HASH_VALUE + raw.charAt(i);\n\t\t}\n\t\tif (key < 0) {\n\t\t\tkey = -key;\n\t\t}\n\t\treturn key % HASH_SIZE;\n\t}", "private static boolean doesPatternExist(Map<Byte, byte[]> haystack,\n byte[] needle) {\n if (needle == null)\n return false;\n for (Byte key : haystack.keySet()) {\n if (Arrays.equals(haystack.get(key), needle)) {\n return true;\n }\n }\n return false;\n }", "public abstract Function<E, K> keyExtractor();" ]
[ "0.6088297", "0.58559704", "0.5817884", "0.5817884", "0.5817884", "0.5817884", "0.5817884", "0.5817884", "0.58054185", "0.55300266", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.5486019", "0.54351234", "0.5430908", "0.5413695", "0.54021126", "0.5400781", "0.53934866", "0.538189", "0.52684766", "0.5248088", "0.517654", "0.51617056", "0.51418686", "0.5139463", "0.51200926", "0.5099494", "0.5073991", "0.505505", "0.504002", "0.5031857", "0.5031023", "0.5029555", "0.50187075", "0.49967152", "0.49967152", "0.49967152", "0.49967152", "0.49813196", "0.49718314", "0.49623698", "0.49604484", "0.49604484", "0.49604484", "0.49604484", "0.4959043", "0.4956609", "0.49547222", "0.4952933", "0.4909721", "0.4892364", "0.4887908", "0.4877646", "0.48702624", "0.48701257", "0.48623127", "0.4860192", "0.48553634", "0.48312417", "0.48227456", "0.4815354", "0.48066202", "0.48062134", "0.47850633", "0.47771636", "0.47770557", "0.4764924", "0.47526085", "0.47479257", "0.47479257", "0.47430164", "0.47368845", "0.47368845", "0.47229075", "0.4713872", "0.46978414", "0.46938467", "0.4691227", "0.46871638", "0.46865156", "0.46826088", "0.46816465", "0.46777925", "0.46766695", "0.46764687", "0.46751276", "0.46718508", "0.46689636", "0.46578828" ]
0.56272626
9
CFG productions are: nonterminal > terminal E > +int | int | int | T T > stringT | e Where e = epsilon (empty), int = a digit, string = a character.
static boolean E() { int save = next; if (E1()) return true; next = save; if (E2()) return true; next = save; if (E3()) return true; next = save; if (E4()) return true; next = save; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\n\t\tmakeCFG(\"E -> T + T\\n \"\n\t\t\t\t+ \"E -> T - T\\n \"\n\t\t\t\t+ \"T -> F * F\\n \"\n\t\t\t\t+ \"T -> F / F\\n\", \"E\");\n\t\t\n\t\t\n//\t\tNontermianlSymbol procedure = new NontermianlSymbol(\"procedure\");\n//\t\tNontermianlSymbol subprocedure = new NontermianlSymbol(\"subprocedure\");\n//\t\tNontermianlSymbol constDefinition = new NontermianlSymbol(\"constDefinition\");\n//\t\tNontermianlSymbol varDefinition = new NontermianlSymbol(\"varDefinition\");\n//\t\tNontermianlSymbol statement = new NontermianlSymbol(\"statement\");\n//\t\tNontermianlSymbol condition = new NontermianlSymbol(\"condition\");\n//\t\tNontermianlSymbol expression = new NontermianlSymbol(\"expression\");\n//\t\tNontermianlSymbol term = new NontermianlSymbol(\"term\");\n//\t\tNontermianlSymbol factor = new NontermianlSymbol(\"factor\");\n\t\t\n\t\t\n//\t\tNontermianlSymbol S = new NontermianlSymbol(\"S\");\n//\t\tNontermianlSymbol T = new NontermianlSymbol(\"T\");\n//\t\t\n//\t\tTerminalSymbol a = new TerminalSymbol(\"a\");\n//\t\tTerminalSymbol and = new TerminalSymbol(\"^\");\n//\t\tTerminalSymbol lp = new TerminalSymbol(\"(\");\n//\t\tTerminalSymbol rp = new TerminalSymbol(\")\");\n//\t\tTerminalSymbol comma = new TerminalSymbol(\",\");\n//\t\t\n//\t\tRule r1 = new Rule(S, Arrays.asList(a));\n//\t\tRule r2 = new Rule(S, Arrays.asList(and));\n//\t\tRule r3 = new Rule(S, Arrays.asList(lp,T,rp));\n//\t\tRule r4 = new Rule(T, Arrays.asList(S));\n//\t\tRule r5 = new Rule(T, Arrays.asList(T,comma,S));\n//\t\t\n//\t\tSet<Rule> rules = new HashSet<>(Arrays.asList(r1,r2,r3,r4,r5));\n//\t\tSet<NontermianlSymbol> nonterminals = new HashSet<>(Arrays.asList(T,S));\n//\t\tSet<TerminalSymbol> terminals = new HashSet<>(Arrays.asList(a,and,lp,rp,comma));\n//\t\tNontermianlSymbol startSymbol = S;\n//\t\t\n//\t\tCFG cfg = new CFG(rules, nonterminals,terminals,startSymbol);\n//\t\t\n//\t\tSystem.out.println(cfg.isLL1());\n//\t\tcfg.removeLeftRecursion();\n//\t\tSystem.out.println(cfg.isLL1());\n// \n//\t\tfor(Rule rule : cfg.rules) {\n//\t\t\tSystem.out.println(rule.toString() + \"\\t\\t\" + cfg.SELECT(rule));\n//\t\t}\n\t}", "public interface Expression {\n \n enum ExpressivoGrammar {ROOT, SUM, PRODUCT, TOKEN, PRIMITIVE_1, PRIMITIVE_2, \n NUMBER, INT, DECIMAL, WHITESPACE, VARIABLE};\n \n public static Expression buildAST(ParseTree<ExpressivoGrammar> concreteSymbolTree) {\n \n if (concreteSymbolTree.getName() == ExpressivoGrammar.DECIMAL) {\n /* reached a double terminal */\n return new Num(Double.parseDouble(concreteSymbolTree.getContents())); \n }\n\n else if (concreteSymbolTree.getName() == ExpressivoGrammar.INT) {\n /* reached an int terminal */\n return new Num(Integer.parseInt(concreteSymbolTree.getContents()));\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.VARIABLE) {\n /* reached a terminal */\n return new Var(concreteSymbolTree.getContents());\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.ROOT || \n concreteSymbolTree.getName() == ExpressivoGrammar.TOKEN || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_1 || \n concreteSymbolTree.getName() == ExpressivoGrammar.PRIMITIVE_2 || \n concreteSymbolTree.getName() == ExpressivoGrammar.NUMBER) {\n \n /* non-terminals with only one child */\n for (ParseTree<ExpressivoGrammar> child: concreteSymbolTree.children()) {\n if (child.getName() != ExpressivoGrammar.WHITESPACE) \n return buildAST(child);\n }\n \n // should never reach here\n throw new IllegalArgumentException(\"error in parsing\");\n }\n \n else if (concreteSymbolTree.getName() == ExpressivoGrammar.SUM || concreteSymbolTree.getName() == ExpressivoGrammar.PRODUCT) {\n /* a sum or product node can have one or more children that need to be accumulated together */\n return accumulator(concreteSymbolTree, concreteSymbolTree.getName()); \n }\n \n else {\n throw new IllegalArgumentException(\"error in input: should never reach here\");\n }\n \n }\n \n /**\n * (1) Create parser using lib6005.parser from grammar file\n * (2) Parse string input into CST\n * (3) Build AST from this CST using buildAST()\n * @param input\n * @return Expression (AST)\n */\n public static Expression parse(String input) {\n \n try {\n Parser<ExpressivoGrammar> parser = GrammarCompiler.compile(\n new File(\"src/expressivo/Expression.g\"), ExpressivoGrammar.ROOT);\n ParseTree<ExpressivoGrammar> concreteSymbolTree = parser.parse(input);\n \n// tree.display();\n \n return buildAST(concreteSymbolTree);\n \n }\n \n catch (UnableToParseException e) {\n throw new IllegalArgumentException(\"Can't parse the expression...\");\n }\n catch (IOException e) {\n System.out.println(\"Cannot open file Expression.g\");\n throw new RuntimeException(\"Can't open the file with grammar...\");\n }\n }\n \n // helper methods\n public static Expression accumulator(ParseTree<ExpressivoGrammar> tree, ExpressivoGrammar grammarObj) {\n Expression expr = null;\n boolean first = true;\n List<ParseTree<ExpressivoGrammar>> children = tree.children();\n int len = children.size();\n for (int i = len-1; i >= 0; i--) {\n /* the first child */\n ParseTree<ExpressivoGrammar> child = children.get(i);\n if (first) {\n expr = buildAST(child);\n first = false;\n }\n \n /* accumulate this by creating a new binaryOp object with\n * expr as the leftOp and the result as rightOp\n **/\n \n else if (child.getName() == ExpressivoGrammar.WHITESPACE) continue;\n else {\n if (grammarObj == ExpressivoGrammar.SUM)\n expr = new Sum(buildAST(child), expr);\n else\n expr = new Product(buildAST(child), expr);\n }\n }\n \n return expr;\n \n }\n \n // ----------------- problems 3-4 -----------------\n \n public static Expression create(Expression leftExpr, Expression rightExpr, char op) {\n if (op == '+')\n return Sum.createSum(leftExpr, rightExpr);\n else\n return Product.createProduct(leftExpr, rightExpr);\n }\n\n public Expression differentiate(Var x);\n \n public Expression simplify(Map<String, Double> env);\n\n}", "@Test\n void testGrammarBasics() {\n Production<NT, T> prod1 = new Production<>(NT.A, List.of(\n left(NT.B), right(T.E)\n ));\n\n Production<NT, T> prod2 = new Production<>(NT.B, List.of(\n right(T.F)\n ));\n\n Production<NT, T> prod3 = prod1.withSource(NT.C).withRule(List.of(\n left(NT.B), right(T.F), left(NT.C), left(NT.A)\n ));\n\n assertThrows(IllegalArgumentException.class, () -> new CFGrammar<>(NT.C, List.of(prod1, prod2)));\n assertThrows(IllegalArgumentException.class, () -> new CFGrammar<>(NT.C, List.of(prod3, prod2)));\n\n Production<NT, T> prod4 = new Production<>(NT.A, List.of(\n left(NT.B), right(T.E)\n ));\n\n Production<NT, T> prod5 = new Production<>(NT.B, List.of(\n left(NT.A), right(T.E)\n ));\n\n assertThrows(IllegalArgumentException.class, () -> new CFGrammar<>(NT.A, List.of(prod4)));\n\n CFGrammar<NT, T, Production<NT, T>> g = new CFGrammar<>(NT.A, List.of(prod4, prod5));\n assertEquals(HashSet.of(NT.B, NT.A), g.getNonTerminalsUsed());\n assertEquals(HashSet.of(T.E), g.getTerminalsUsed());\n }", "public interface GrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int FORMAL_COMMENT = 8;\n /** RegularExpression Id. */\n int MULTI_LINE_COMMENT = 9;\n /** RegularExpression Id. */\n int PLUS = 11;\n /** RegularExpression Id. */\n int MINUS = 12;\n /** RegularExpression Id. */\n int MULTIPLY = 13;\n /** RegularExpression Id. */\n int DIVIDE = 14;\n /** RegularExpression Id. */\n int MOD = 15;\n /** RegularExpression Id. */\n int UBANG = 16;\n /** RegularExpression Id. */\n int LESS_OP = 17;\n /** RegularExpression Id. */\n int MORE_OP = 18;\n /** RegularExpression Id. */\n int WHILE = 19;\n /** RegularExpression Id. */\n int IF = 20;\n /** RegularExpression Id. */\n int ELSE = 21;\n /** RegularExpression Id. */\n int BREAK = 22;\n /** RegularExpression Id. */\n int RETURN = 23;\n /** RegularExpression Id. */\n int CONTINUE = 24;\n /** RegularExpression Id. */\n int ID = 25;\n /** RegularExpression Id. */\n int LETTER = 26;\n /** RegularExpression Id. */\n int INT = 27;\n /** RegularExpression Id. */\n int SEMICOLON = 28;\n /** RegularExpression Id. */\n int LPAREN = 29;\n /** RegularExpression Id. */\n int RPAREN = 30;\n /** RegularExpression Id. */\n int LBRACKET = 31;\n /** RegularExpression Id. */\n int RBRACKET = 32;\n /** RegularExpression Id. */\n int EQUAL = 33;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_FORMAL_COMMENT = 1;\n /** Lexical state. */\n int IN_MULTI_LINE_COMMENT = 2;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"\\\"/*\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"\\\"*/\\\"\",\n \"\\\"*/\\\"\",\n \"<token of kind 10>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\"while\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"break\\\"\",\n \"\\\"return\\\"\",\n \"\\\"continue\\\"\",\n \"<ID>\",\n \"<LETTER>\",\n \"<INT>\",\n \"\\\";\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"=\\\"\",\n \"\\\"?\\\"\",\n \"\\\":\\\"\",\n \"\\\"|\\\"\",\n \"\\\"&\\\"\",\n \"\\\"==\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n };\n\n}", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\t// Scanner scanner = new Scanner(System.in);\r\n\t\t\t//Grammar grammar = new Grammar(\"(i * i) * (i + i) - i\");\r\n\t\t\tGrammar grammar = new Grammar(\"i + i * i\");\r\n\t\t\tgrammar.addTerminal(\"SYMBOL\", TokenType.ID, \"i\");\r\n\t\t\tgrammar.addTerminal(\"PLUS\", TokenType.OPERATOR, OperatorType.PLUS);\r\n\t\t\tgrammar.addTerminal(\"MINUS\", TokenType.OPERATOR, OperatorType.MINUS);\r\n\t\t\tgrammar.addTerminal(\"TIMES\", TokenType.OPERATOR, OperatorType.TIMES);\r\n\t\t\tgrammar.addTerminal(\"DIVIDE\", TokenType.OPERATOR,\r\n\t\t\t\t\tOperatorType.DIVIDE);\r\n\t\t\tgrammar.addTerminal(\"LPA\", TokenType.OPERATOR, OperatorType.LPARAN);\r\n\t\t\tgrammar.addTerminal(\"RPA\", TokenType.OPERATOR, OperatorType.RPARAN);\r\n\t\t\tgrammar.setEpsilonName(\"epsilon\");\r\n\t\t\tString[] nons = new String[] {\r\n\t\t\t\t\t\"E\", \"E1\", \"T\", \"T1\", \"F\", \"A\", \"M\"\r\n\t\t\t};\r\n\t\t\tfor (String non : nons){\r\n\t\t\t\tgrammar.addNonTerminal(non);\r\n\t\t\t}\r\n\t\t\tgrammar.infer(\"E -> T E1\");\r\n\t\t\tgrammar.infer(\"E1 -> A T E1 | @epsilon\");\r\n\t\t\tgrammar.infer(\"T -> F T1\");\r\n\t\t\tgrammar.infer(\"T1 -> M F T1 | @epsilon\");\r\n\t\t\tgrammar.infer(\"F -> @LPA E @RPA | @SYMBOL\");\r\n\t\t\tgrammar.infer(\"A -> @PLUS | @MINUS\");\r\n\t\t\tgrammar.infer(\"M -> @TIMES | @DIVIDE\");\r\n\t\t\tgrammar.initialize(\"E\");\r\n\t\t\tSystem.out.println(grammar.toString());\r\n\t\t\tSystem.out.println(grammar.getPredictionString());\r\n\t\t\tgrammar.run();\r\n\t\t\tSystem.out.println(grammar.getTokenString());\r\n\t\t\t// scanner.close();\r\n\t\t} catch (RegexException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SyntaxException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage() + \" \"\r\n\t\t\t\t\t+ e.getInfo());\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (GrammarException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage() + \" \"\r\n\t\t\t\t\t+ e.getInfo());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\t//Scanner scanner = new Scanner(System.in);\r\n\t\t\tSyntax syntax = new Syntax();\r\n\t\t\tsyntax.addTerminal(\"PLUS\", TokenType.OPERATOR, OperatorType.PLUS);\r\n\t\t\tsyntax.addTerminal(\"MINUS\", TokenType.OPERATOR, OperatorType.MINUS);\r\n\t\t\tsyntax.addTerminal(\"TIMES\", TokenType.OPERATOR, OperatorType.TIMES);\r\n\t\t\tsyntax.addTerminal(\"DIVIDE\", TokenType.OPERATOR, OperatorType.DIVIDE);\r\n\t\t\tsyntax.addTerminal(\"LPA\", TokenType.OPERATOR, OperatorType.LPARAN);\r\n\t\t\tsyntax.addTerminal(\"RPA\", TokenType.OPERATOR, OperatorType.RPARAN);\r\n\t\t\tsyntax.addTerminal(\"SYMBOL\", TokenType.ID, \"i\");\r\n\t\t\tsyntax.addNonTerminal(\"E\");\r\n\t\t\tsyntax.addNonTerminal(\"T\");\r\n\t\t\tsyntax.addNonTerminal(\"F\");\r\n\t\t\tsyntax.addErrorHandler(\"sample\", null);\r\n\t\t\t//syntax.infer(\"E -> T `PLUS`<+> E | T `MINUS`<-> E | T\");\r\n\t\t\t//syntax.infer(\"T -> F `TIMES`<*> T | F `DIVIDE`</> T | F\");\r\n\t\t\t//syntax.infer(\"F -> `LPA`<(> E `RPA`<)> | `SYMBOL`<i>\");\r\n\t\t\tsyntax.infer(\"E -> E @PLUS<+> T\");\r\n\t\t\tsyntax.infer(\"E -> E @MINUS<-> T\");\r\n\t\t\tsyntax.infer(\"E -> T\");\r\n\t\t\tsyntax.infer(\"T -> T @TIMES<*> F\");\r\n\t\t\tsyntax.infer(\"T -> T @DIVIDE</> F\");\r\n\t\t\tsyntax.infer(\"T -> F\");\r\n\t\t\tsyntax.infer(\"F -> @LPA<(> E @RPA<)>\");\r\n\t\t\tsyntax.infer(\"F -> @SYMBOL<i>\");\r\n\t\t\tsyntax.initialize(\"E\");\r\n\t\t\tSystem.out.println(syntax.toString());\r\n\t\t\tSystem.out.println(syntax.getNGAString());\r\n\t\t\tSystem.out.println(syntax.getNPAString());\r\n\t\t\t//scanner.close();\r\n\t\t} catch (RegexException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (SyntaxException e) {\r\n\t\t\tSystem.err.println(e.getPosition() + \",\" + e.getMessage() + \" \" + e.getInfo());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Test\n public void testComplexGraph() {\n CFGCreator<Character> cfgCreator = new CFGCreator<>();\n CharGrammarParser parser = new CharGrammarParser(cfgCreator);\n SLPOp<Character> slpOp = new SLPOp();\n CFGOp<Character> cfgOp = new CFGOp<>();\n\n // L(G) = {(ab)^1 : i >= 1}\n String text =\n \"S -> bAs \\n\" +\n \"A -> iBa \\n\" +\n \"B -> aCi \\n\" +\n \"C -> sd \\n\" +\n \"D -> SSESS \\n\" +\n \"E -> zSSESSr \\n\" +\n \"E -> uu \\n\";\n\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> f = new HashMap<>();\n Map<IJezSymbol<Character>, List<IJezSymbol<Character>>> g = new HashMap<>();\n\n IJezSymbol<Character> a = cfgCreator.lookupSymbol('a', true);\n IJezSymbol<Character> b = cfgCreator.lookupSymbol('b', true);\n IJezSymbol<Character> d = cfgCreator.lookupSymbol('d', true);\n IJezSymbol<Character> i = cfgCreator.lookupSymbol('i', true);\n IJezSymbol<Character> s = cfgCreator.lookupSymbol('s', true);\n IJezSymbol<Character> r = cfgCreator.lookupSymbol('r', true);\n IJezSymbol<Character> u = cfgCreator.lookupSymbol('u', true);\n IJezSymbol<Character> z = cfgCreator.lookupSymbol('z', true);\n\n IJezSymbol<Character> one = cfgCreator.lookupSymbol('1', true);\n IJezSymbol<Character> two = cfgCreator.lookupSymbol('2', true);\n IJezSymbol<Character> three = cfgCreator.lookupSymbol('3', true);\n\n f.put(a, Arrays.asList(one, two));\n f.put(b, Arrays.asList(three, two));\n f.put(d, Arrays.asList(one, one, one, two));\n f.put(i, Arrays.asList(two));\n f.put(s, Arrays.asList(one, one, two));\n f.put(r, Arrays.asList(r));\n f.put(u, Arrays.asList(u));\n f.put(z, Arrays.asList(z));\n\n\n g.put(a, Arrays.asList(one, two, one));\n g.put(b, Arrays.asList(three));\n g.put(d, Arrays.asList(one, one, one));\n g.put(i, Arrays.asList(two, two));\n g.put(s, Arrays.asList(one, two));\n g.put(r, Arrays.asList(r));\n g.put(u, Arrays.asList(u));\n g.put(z, Arrays.asList(z));\n\n\n Set<Production<Character>> productions = parser.createProductions(text);\n Set<IJezSymbol<Character>> axiom = new HashSet<>();\n axiom.add(cfgCreator.lookupSymbol('D', false));\n\n\n Set<Production<Character>> wCNFProductions = cfgOp.toWeakCNF(productions, axiom, cfgCreator);\n MorphismEQSolver<Character, Character> morphismEQSolver = new MorphismEQSolver<>(cfgCreator.createCFG(wCNFProductions, axiom), cfgCreator, new CFGCreatorFactory<>(), new CFGCreatorFactory<>());\n\n GenDefaultMorphism<Character> morphism1 = new GenDefaultMorphism<>(f::get);\n GenDefaultMorphism<Character> morphism2 = new GenDefaultMorphism<>(g::get);\n long ms = System.currentTimeMillis();\n assertTrue(morphismEQSolver.equivalentOnMorphisms(morphism1, morphism2));\n logger.info(\"Running time: \" + (System.currentTimeMillis() - ms) + \"[ms]\");\n }", "public static void main(String[] args) {\n\t\t\n//\t\t//PA4 a\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"b\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 b\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");rhs11.add(\"b\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"c\");rhs12.add(\"d\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 c\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"U\");rhs11.add(\"S\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"S\");rhs12.add(\"S\");\t\t\n//\t\tArrayList<String> rhs13 = new ArrayList<>();\n//\t\trhs13.add(\"S\");rhs13.add(\"*\");\n//\t\tArrayList<String> rhs14 = new ArrayList<>();\n//\t\trhs14.add(\"(\");rhs14.add(\"S\");rhs14.add(\")\");\n//\t\tArrayList<String> rhs15 = new ArrayList<>();\n//\t\trhs15.add(\"a\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\trhs1.add(rhs13);\n//\t\trhs1.add(rhs14);\n//\t\trhs1.add(rhs15);\n//\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n\t\t\n//\t\t//PA-3 d\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"rexpr\");rhs11.add(\"U\");rhs11.add(\"rterm\");\t\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"rterm\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\tRule r1 = new Rule(\"rexpr\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"rterm\");rhs21.add(\"r factor\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"r factor\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"rterm\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"r factor\");rhs31.add(\"*\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"rprimary\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"r factor\", rhs3);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs4 = new ArrayList<>();\n//\t\tArrayList<String> rhs41 = new ArrayList<>();\n//\t\trhs41.add(\"a\");\n//\t\tArrayList<String> rhs42 = new ArrayList<>();\n//\t\trhs42.add(\"b\");\n//\t\trhs4.add(rhs41);\n//\t\trhs4.add(rhs42);\n//\t\tRule r4 = new Rule(\"rprimary\", rhs4);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\trules.add(r4);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\t\n\t\t\t\n//\t\t//PA-3 e\t\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"0\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"T\");rhs12.add(\"1\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"1\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"A\");rhs22.add(\"0\");\t\t\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\t\tRule r2 = new Rule(\"T\", rhs2);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\n\t\t\n//\t\t//PA-3 f\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"B\");rhs11.add(\"C\");\t\n//\t\trhs1.add(rhs11);\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"B\");rhs21.add(\"b\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"e\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"B\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"A\");rhs31.add(\"C\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"a\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"C\", rhs3);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tSystem.out.println(g);\n//\t\tg.eliminateEpsilonRule();\n//\t\tSystem.out.println(g);\n//\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\t}", "public interface JavaGrammarConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int PLUS = 5;\n /** RegularExpression Id. */\n int MINUS = 6;\n /** RegularExpression Id. */\n int MULTIPLY = 7;\n /** RegularExpression Id. */\n int DIVIDE = 8;\n /** RegularExpression Id. */\n int OPEN_PARENTHESIS = 9;\n /** RegularExpression Id. */\n int CLOSED_PARENTHESIS = 10;\n /** RegularExpression Id. */\n int OPEN_BRACKET = 11;\n /** RegularExpression Id. */\n int CLOSED_BRACKET = 12;\n /** RegularExpression Id. */\n int OPEN_BRACE = 13;\n /** RegularExpression Id. */\n int CLOSED_BRACE = 14;\n /** RegularExpression Id. */\n int SEMICOLON = 15;\n /** RegularExpression Id. */\n int EQUALS = 16;\n /** RegularExpression Id. */\n int COMPARISON = 17;\n /** RegularExpression Id. */\n int LESS = 18;\n /** RegularExpression Id. */\n int GREATER = 19;\n /** RegularExpression Id. */\n int NUMBER = 20;\n /** RegularExpression Id. */\n int DIGIT = 21;\n /** RegularExpression Id. */\n int LETTER = 22;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"<COMPARISON>\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"<NUMBER>\",\n \"<DIGIT>\",\n \"<LETTER>\",\n \"\\\"new\\\"\",\n \"\\\",\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"\\\\\\\"\\\"\",\n \"\\\"for\\\"\",\n \"\\\"int\\\"\",\n \"\\\"++\\\"\",\n \"\\\"--\\\"\",\n };\n\n}", "public BNFrule()\n {\n lhs = \"\";\n rhsSymbols = new ArrayList<String>();\n }", "@Test\n public void syntactic_fail(){\n SetupMocks.setup();\n\n List<Token> tokens= new ArrayList<>();\n\n// tokens.add(new Token(Token.TSTRG,1,1,null));\n\n tokens.add(new Token(Token.TCOMA,1,1,null));\n\n Parser parser = new Parser(tokens);\n\n NPrintItemNode nPrintItemNode = new NPrintItemNode();\n nPrintItemNode.setnExprNode(NExprNode.INSTANCE());\n\n TreeNode printitem = nPrintItemNode.make(parser);\n\n assertEquals(TreeNode.NUNDEF, printitem.getValue());\n\n }", "public void toGrammar() {\n System.out.println(\"<binary_expression> -> <arithmeitc_expression> <arithmetic_op> <arithmetic_expression>\");\n left.toGrammar();\n operator.toGrammar();\n right.toGrammar();\n prefix();\n }", "public interface SimpleGrParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int NumberLit = 6;\n /** RegularExpression Id. */\n int BooleanLit = 7;\n /** RegularExpression Id. */\n int StringLit = 8;\n /** RegularExpression Id. */\n int Null = 9;\n /** RegularExpression Id. */\n int And = 10;\n /** RegularExpression Id. */\n int Or = 11;\n /** RegularExpression Id. */\n int Not = 12;\n /** RegularExpression Id. */\n int Identifier = 13;\n /** RegularExpression Id. */\n int Equal = 14;\n /** RegularExpression Id. */\n int NotEqual = 15;\n /** RegularExpression Id. */\n int LessThan = 16;\n /** RegularExpression Id. */\n int LessEqualThan = 17;\n /** RegularExpression Id. */\n int GreaterThan = 18;\n /** RegularExpression Id. */\n int GreaterEqualThan = 19;\n /** RegularExpression Id. */\n int Plus = 20;\n /** RegularExpression Id. */\n int Minus = 21;\n /** RegularExpression Id. */\n int Div = 22;\n /** RegularExpression Id. */\n int Mult = 23;\n /** RegularExpression Id. */\n int Open = 24;\n /** RegularExpression Id. */\n int Close = 25;\n /** RegularExpression Id. */\n int Comma = 26;\n /** RegularExpression Id. */\n int Letter = 27;\n /** RegularExpression Id. */\n int Digit = 28;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"<NumberLit>\",\n \"<BooleanLit>\",\n \"<StringLit>\",\n \"\\\"NULL\\\"\",\n \"\\\"AND\\\"\",\n \"\\\"OR\\\"\",\n \"\\\"NOT\\\"\",\n \"<Identifier>\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"/\\\"\",\n \"\\\"*\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\",\\\"\",\n \"<Letter>\",\n \"<Digit>\",\n };\n\n}", "@Override public void enterCompop(MicroParser.CompopContext ctx) {\n//\t\tSystem.out.println(\"Enter compop: \" + infixS);\n//\t\tSystem.out.println(ctx.getText());\n\n\t\tString lhs = infixS.get(0); //WILL NOT WORK WITH EXPRESSIONS\n\n\t\t//Determine the type of var on LHS\n\t\ttry{\n\t\t\tif(Integer.valueOf(lhs) instanceof Integer){\n\t\t\t\tIRNode.tempCnt++;\n\t\t\t\tthis.meIRL.add(new IRNode(\"STOREI\", lhs, \"\", \"$T\" + IRNode.tempCnt));\n\t\t\t\tlhsType = \"INT\";\n\t\t\t}\n\t\t}\n\t\tcatch (Exception err1){\n\t\t\ttry{\n\t\t\t\tif(Float.valueOf(lhs) instanceof Float){\n\t\t\t\t\tIRNode.tempCnt++;\n\t\t\t\t\tthis.meIRL.add(new IRNode(\"STOREF\", lhs, \"\", \"$T\" + IRNode.tempCnt));\n\t\t\t\t\tlhsType = \"FLOAT\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception err2){\n\t\t\t\t\tString type = \"\";\n\t\t\t\t\tArrayList<List<String>> varList = st.varMap.get(\"GLOBAL\");\n\t\t\t\t if(varList != null){\n\t\t\t\t for(List<String> varData : varList){\n\t\t\t\t \tif(varData.get(0).equals(lhs)){\n\t\t\t\t \t\ttype = varData.get(1);\n\t\t\t\t \t}\n\t\t\t\t }\n\t\t\t\t }\n\n\t\t\t\t\tShuntingYard sy = new ShuntingYard();\n\t\t\t\t\tString postfixS = sy.infixToPostfix(infixS);\n\n\t\t\t\t\t//Tests Postfix Tree\n\t\t\t\t\tPostfixTree pfTree = new PostfixTree();\n\t\t\t\t\tPostfixTreeNode root = pfTree.createTree(postfixS);\n\n\t\t\t\t\t//adds tree to IRList\n\t\t\t\t\troot.toIRList(root, this.meIRL, type);\n\t\t\t\t\tif(type.compareTo(\"FLOAT\") == 0){\n\t\t\t\t \t\tthis.meIRL.add(new IRNode(\"STOREF\", lhs, \"\", \"$T\"+ IRNode.tempCnt));\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.meIRL.add(new IRNode(\"STOREI\", lhs, \"\", \"$T\"+ IRNode.tempCnt));\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t \tlhsType = type;\n\t\t\t\t \tlhsTemp = IRNode.tempCnt;\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) throws InvalidRuleNumException {\n\t\tCell[] cells = new Cell[5];\n\t\tcells[0] = new Cell(CellState.OFF);\n\t\tcells[1] = new Cell(CellState.OFF);\n\t\tcells[2] = new Cell(CellState.ON);\n\t\tcells[3] = new Cell(CellState.OFF);\n\t\tcells[4] = new Cell(CellState.OFF);\n\n\n\t\t\n\t\tGeneration gen1 = new Generation(cells);\n\t\tSystem.out.println(\"Gen1 CELL: \" + gen1.toString());\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tString stateString = \"..O..\";\n\t\tGeneration gen2 = new Generation(stateString);\n\t\tSystem.out.println(\"Gen2 STRING : \" + gen2.toString());\n\t\t\n\t\t\n\t\t\n//\t\tCellState[] states = new CellState{};\n//\t\tGeneration gen3 = new Generation(states);\n//\t\tSystem.out.println(\"Gen3 CELLSTATES : \" + gen3.toString());\n\n\t\t\n\t\t\n\t\tRule rule1 = new ElementaryRule(30);\n\t\tBoundaryConditions bf = new FixedBoundaryConditions(CellState.OFF, CellState.OFF);\n\t\tAutomaton au1 = new Automaton(rule1 ,gen1, bf);\n\t\tSystem.out.println(\"Gen 1:\" + gen1);\n\t\tSystem.out.println(\"init auto: \" + au1);\n\t\tau1.evolve(7);\n\t\tSystem.out.println(\"test: au1 history: \" + au1.getHistory());\n\t\t\n\t\t\n\t\tSystem.out.println(\"rule1 getNeighborhood: \" + Arrays.deepToString(rule1.getNeighborhood(2, gen1, bf)));\n\t\tSystem.out.println(\"rule 1 to string\");\n\t\trule1.toString();\n\t\t\n\t\tRule rule2 = new ElementaryRule(22);\n\t\tSystem.out.println(\"rule 2 to string\");\n\t\trule2.toString();\n\t\t\n\t\t\n\t\t\n\t\t\n//\t\trule2.toString();\n//\t\tCellState[] state2 = {CellState.OFF, CellState.OFF, CellState.OFF, CellState.ON, CellState.OFF, CellState.OFF, CellState.OFF};\n//\t\tGeneration gen2 = new Generation(state2);\n//\t\tSystem.out.println(gen2);\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Test\n public void testExploratoryString() throws IOException {\n String simplestProgram = \"x := 1;\" +\n \"y :={0,1,2,33};\" +\n \"if (x>y) then \" +\n \"{x:=1;} \" +\n \"else \" +\n \"{y:=1;}\";\n\n CharStream inputCharStream = new ANTLRInputStream(new StringReader(simplestProgram));\n TokenSource tokenSource = new GrammarLexer(inputCharStream);\n TokenStream inputTokenStream = new CommonTokenStream(tokenSource);\n GrammarParser parser = new GrammarParser(inputTokenStream);\n\n //parser.addErrorListener(new TestErrorListener());\n parser.setErrorHandler(new BailErrorStrategy());\n\n GrammarParser.ProgramContext context = parser.program();\n\n System.out.println(context.getText());\n\n logger.info(context.toString());\n }", "public static boolean isNonterminal(Character c){\n for(int i = 0; i < INVALID_IDENTIFIERS.length; i++){\n if(c == INVALID_IDENTIFIERS[i])\n return false;\n }\n return true;\n }", "private Object parseExpr() throws IOException, FSException{\n\n ETreeNode curNode=null;\n boolean end=false;\n Object val;\n boolean negate=false; //flag for unary minus\n boolean not=false;//flag for unary not.\n boolean prevOp=true;//flag - true if previous value was an operator\n\n while (!end){\n\n switch (tok.ttype) {\n\n\n //the various possible 'values'\n case LexAnn.TT_INTEGER:\n case LexAnn.TT_DOUBLE:\n case LexAnn.TT_STRING:\n case LexAnn.TT_WORD:\n case LexAnn.TT_FUNC:\n case LexAnn.TT_NULL:\n case LexAnn.TT_ARRAY:{\n\n if (!prevOp){\n parseError(\"Expected Operator\");\n } else {\n\n val=null;\n ETreeNode node=new ETreeNode();\n node.type=ETreeNode.E_VAL;\n\n switch (tok.ttype){\n //numbers - just get them\n case LexAnn.TT_INTEGER:{\n val=tok.value;\n break;\n }\n case LexAnn.TT_DOUBLE:{\n val=tok.value;\n break;\n }\n //functions - evaluate them\n case LexAnn.TT_FUNC:{\n String name=(String)tok.value;\n getNextToken();\n val=parseCallFunc(name);\n break;\n }\n //arrays - evaluate them\n case LexAnn.TT_ARRAY:{\n String name=(String)tok.value;\n getNextToken(); //should be a '['\n getNextToken(); //should be the index\n Object index=parseExpr();\n try {\n val=host.getVarEntry(name,index);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n break;\n }\n //variables - resolve them\n case LexAnn.TT_WORD:{\n if (hasVar((String)tok.value)) {\n val=getVar((String)tok.value);\n } else {\n try {\n val=host.getVarEntry((String)tok.value,null);\n } catch (Exception e) {\n parseError(e.getMessage());\n }\n }\n break;\n }\n //strings - just get again\n case LexAnn.TT_STRING:{\n val=tok.value;\n break;\n }\n //null\n case LexAnn.TT_NULL:{\n val=new FSObject(null);\n break;\n }\n }\n\n //unary not\n if (not){\n if (val instanceof Integer){\n if (((Integer)val).intValue()==0){\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n not=false;\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Boolean) {\n if (((FSObject)val).getObject().equals(Boolean.FALSE)) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else if (val instanceof FSObject && ((FSObject)val).getObject() instanceof Integer) {\n if (((Integer)((FSObject)val).getObject()).intValue()==0) {\n val=FS_TRUE;\n } else {\n val=FS_FALSE;\n }\n } else {\n String msg=val.getClass().getName();\n if (val instanceof FSObject) msg=\"FSObject with \"+((FSObject)val).getNullClass().getName();\n parseError(\"Type mismatch for ! \"+msg);\n }\n }\n\n //unary minus\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n node.value=val;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n\n prevOp=false;\n }\n break;\n }\n /*operators - have to be more carefull with these.\n We build an expression tree - inserting the nodes at the right\n points to get a reasonable approximation to correct operator\n precidence*/\n case LexAnn.TT_LEQ:\n case LexAnn.TT_LNEQ:\n case LexAnn.TT_MULT:\n case LexAnn.TT_DIV:\n case LexAnn.TT_MOD:\n case LexAnn.TT_PLUS:\n case LexAnn.TT_MINUS:\n case LexAnn.TT_LGR:\n case LexAnn.TT_LGRE:\n case LexAnn.TT_LLSE:\n case LexAnn.TT_LLS:\n case LexAnn.TT_NOT:\n case LexAnn.TT_LAND:\n case LexAnn.TT_LOR: {\n if (prevOp){\n if (tok.ttype==LexAnn.TT_MINUS){\n negate=true;\n } else if (tok.ttype==LexAnn.TT_NOT){\n not=true;\n } else {\n parseError(\"Expected Expression\");\n }\n } else {\n\n ETreeNode node=new ETreeNode();\n\n node.type=ETreeNode.E_OP;\n node.value=new Integer(tok.ttype);\n\n if (curNode.parent!=null){\n\n int curPrio=getPrio(tok.ttype);\n int parPrio=\n getPrio(((Integer)curNode.parent.value).intValue());\n\n if (curPrio<=parPrio){\n //this nodes parent is the current nodes grandparent\n node.parent=curNode.parent.parent;\n //our nodes left leg is now linked into the current nodes\n //parent\n node.left=curNode.parent;\n //hook into grandparent\n if (curNode.parent.parent!=null){\n curNode.parent.parent.right=node;\n }\n\n //the current nodes parent is now us (because of above)\n curNode.parent=node;\n //set the current node.\n curNode=node;\n } else {\n //current node's parent's right is now us.\n curNode.parent.right=node;\n //our nodes left is the current node.\n node.left=curNode;\n //our nodes parent is the current node's parent.\n node.parent=curNode.parent;\n //curent nodes parent is now us.\n curNode.parent=node;\n //set the current node.\n curNode=node;\n }\n } else {\n //our node's left is the current node\n node.left=curNode;\n //current node's parent is us now\n //we don't have to set our parent, as it is null.\n curNode.parent=node;\n //set current node\n curNode=node;\n }\n prevOp=true;\n }\n break;\n }\n case '(':\n //start of an bracketed expression, recursively call ourself\n //to get a value\n {\n getNextToken();\n val=parseExpr();\n\n if (negate) {\n if (val instanceof Integer){\n val=new Integer(-((Integer)val).intValue());\n } else if (val instanceof Double){\n val=new Double(-((Double)val).doubleValue());\n } else {\n parseError(\"Type mistmatch for unary -\");\n }\n }\n\n ETreeNode node=new ETreeNode();\n node.value=val;\n node.type=ETreeNode.E_VAL;\n\n if (curNode!=null){\n if (curNode.left==null){\n curNode.left=node;\n node.parent=curNode;\n curNode=node;\n\n } else if (curNode.right==null){\n curNode.right=node;\n node.parent=curNode;\n curNode=node;\n\n }\n } else {\n curNode=node;\n }\n prevOp=false;\n break;\n }\n\n default: {\n end=true;\n }\n\n }\n if (!end){\n tok.nextToken();\n }\n }\n\n //find the top of the tree we just built.\n if (curNode==null) parseError(\"Missing Expression\");\n while(curNode.parent!=null){\n curNode=curNode.parent;\n }\n\n\n return evalETree(curNode);\n\n }", "public Node typeCheck(ContextVisitor tc) throws SemanticException {\n Type l = left.type();\n\tType r = right.type();\n\n\tTypeSystem ts = tc.typeSystem();\n\tContext context = tc.context();\n\n\tif (op == GT || op == LT || op == GE || op == LE) {\n\t if (! l.isNumeric()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have numeric operands, not type \" +\n l + \".\", left.position());\n\t }\n\n if (! r.isNumeric()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have numeric operands, not type \" +\n r + \".\", right.position());\n\t }\n\n\t return type(ts.Boolean());\n\t}\n\n\tif (op == EQ || op == NE) {\n if (! ts.isCastValid(l, r, context) && ! ts.isCastValid(r, l, context)) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have operands of similar type.\",\n\t\t position());\n\t }\n\n\t return type(ts.Boolean());\n\t}\n\n\tif (op == COND_OR || op == COND_AND) {\n\t if (! l.isBoolean()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have boolean operands, not type \" +\n l + \".\", left.position());\n\t }\n\n\t if (! r.isBoolean()) {\n\t\tthrow new SemanticException(\"The \" + op +\n\t\t \" operator must have boolean operands, not type \" +\n r + \".\", right.position());\n\t }\n\n\t return type(ts.Boolean());\n\t}\n\n\tif (op == ADD) {\n\t if (ts.isSubtype(l, ts.String(), context) || ts.isSubtype(r, ts.String(), context)) {\n if (!ts.canCoerceToString(r, tc.context())) {\n throw new SemanticException(\"Cannot coerce an expression \" + \n \"of type \" + r + \" to a String.\", \n right.position());\n }\n if (!ts.canCoerceToString(l, tc.context())) {\n throw new SemanticException(\"Cannot coerce an expression \" + \n \"of type \" + l + \" to a String.\", \n left.position());\n }\n\n return precedence(Precedence.STRING_ADD).type(ts.String());\n }\n\t}\n\n\tif (op == BIT_AND || op == BIT_OR || op == BIT_XOR) {\n\t if (l.isBoolean() && r.isBoolean()) {\n\t\treturn type(ts.Boolean());\n\t }\n\t}\n\n if (op == ADD) {\n if (! l.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or String operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! r.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or String operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n if (op == BIT_AND || op == BIT_OR || op == BIT_XOR) {\n if (! ts.isImplicitCastValid(l, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or boolean operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! ts.isImplicitCastValid(r, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric or boolean operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n if (op == SUB || op == MUL || op == DIV || op == MOD) {\n if (! l.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! r.isNumeric()) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n if (op == SHL || op == SHR || op == USHR) {\n if (! ts.isImplicitCastValid(l, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n l + \".\", left.position());\n }\n\n if (! ts.isImplicitCastValid(r, ts.Long(), context)) {\n throw new SemanticException(\"The \" + op +\n \" operator must have numeric operands, not type \" +\n r + \".\", right.position());\n }\n }\n\n\tif (op == SHL || op == SHR || op == USHR) {\n\t // For shift, only promote the left operand.\n\t return type(ts.promote(l));\n\t}\n\n\treturn type(ts.promote(l, r));\n }", "public interface sym {\n /* terminals */\n public static final int SHORT = 47;\n public static final int ANDEQ = 94;\n public static final int IMPLEMENTS = 4;\n public static final int CONST = 27;\n public static final int BITNOT = 68;\n public static final int STRICTFP = 35;\n public static final int NOTEQ = 74;\n public static final int PLUSEQ = 90;\n public static final int RBRACK = 60;\n public static final int CATCH = 20;\n public static final int COMMA = 62;\n public static final int RBRACE = 58;\n public static final int THROW = 22;\n public static final int RPAREN = 56;\n public static final int LBRACK = 59;\n public static final int ANDAND = 75;\n public static final int NUMERO = 101;\n public static final int OROR = 76;\n public static final int DOUBLE = 51;\n public static final int LBRACE = 57;\n public static final int TRANSIENT = 32;\n public static final int LPAREN = 55;\n public static final int XOREQ = 96;\n public static final int PROTECTED = 37;\n public static final int FALSE = 54;\n public static final int NOT = 67;\n public static final int COMENTARIO = 102;\n public static final int FINAL = 29;\n public static final int FLOAT = 49;\n public static final int URSHIFTEQ = 45;\n public static final int PACKAGE = 25;\n public static final int MOD = 86;\n public static final int CLASS = 2;\n public static final int SUPER = 34;\n public static final int ABSTRACT = 28;\n public static final int TRUE = 53;\n public static final int NATIVE = 30;\n public static final int PLUS = 79;\n public static final int LONG = 50;\n public static final int QUESTION = 69;\n public static final int WHILE = 17;\n public static final int EQUAL = 64;\n public static final int EXTENDS = 3;\n public static final int INTERFACE = 5;\n public static final int CHAR = 46;\n public static final int BOOLEAN = 44;\n public static final int SWITCH = 16;\n public static final int DO = 11;\n public static final int FOR = 14;\n public static final int RSHIFTEQ = 99;\n public static final int GREATER = 65;\n public static final int DIV = 82;\n public static final int VOID = 40;\n public static final int MULT = 81;\n public static final int PUBLIC = 36;\n public static final int RETURN = 15;\n public static final int ELSE = 13;\n public static final int TRY = 19;\n public static final int GTEQ = 73;\n public static final int BREAK = 7;\n public static final int DOT = 63;\n public static final int INT = 48;\n public static final int THROWS = 23;\n public static final int EQEQ = 71;\n public static final int NULL = 41;\n public static final int EOF = 0;\n public static final int SEMICOLON = 61;\n public static final int THIS = 42;\n public static final int DEFAULT = 10;\n public static final int MULTEQ = 92;\n public static final int IMPORT = 24;\n public static final int MINUS = 80;\n public static final int LTEQ = 72;\n public static final int OR = 84;\n public static final int URSHIFT = 89;\n public static final int error = 1;\n public static final int SYNCHRONIZED = 31;\n public static final int DIVEQ = 93;\n public static final int LSHIFTEQ = 98;\n public static final int FINALLY = 21;\n public static final int CONTINUE = 9;\n public static final int IF = 12;\n public static final int INSTANCEOF = 43;\n public static final int ID = 100;\n public static final int MODEQ = 97;\n public static final int MINUSMINUS = 78;\n public static final int COLON = 70;\n public static final int ASSERT = 18;\n public static final int OREQ = 95;\n public static final int VOLATILE = 33;\n public static final int PLUSPLUS = 77;\n public static final int CASE = 8;\n public static final int NEW = 6;\n public static final int RSHIFT = 88;\n public static final int STRING = 52;\n public static final int LESS = 66;\n public static final int BYTE = 26;\n public static final int AND = 83;\n public static final int PRIVATE = 38;\n public static final int STATIC = 39;\n public static final int LSHIFT = 87;\n public static final int XOR = 85;\n public static final int MINUSEQ = 91;\n}", "@Test\n public void testNaya() throws Exception {\n ICFG mCFG = null;\n\n // Why A,W ?\n // A -> start node\n // W -> end node\n ICFGBasicBlockNode A = new CFGBasicBlockNode(\"A\",null);\n ICFGBasicBlockNode W = new CFGBasicBlockNode(\"W\",null);\n // This constructor initializes mCFG with start & end node\n mCFG = new CFG(A, W);\n\n ConcreteConstant CONSTANT_TWO = new ConcreteConstant(2,mCFG);\n ConcreteConstant CONSTANT_FIVE = new ConcreteConstant(5,mCFG);\n ConcreteConstant CONSTANT_TWENTY = new ConcreteConstant(20,mCFG);\n ConcreteConstant CONSTANT_THIRTY = new ConcreteConstant(30,mCFG);\n\n\n // variables x & y\n Variable x = new Variable(\"x\", mCFG);\n Variable y = new Variable(\"y\", mCFG);\n Variable p = new Variable(\"p\", mCFG);\n Variable q = new Variable(\"q\", mCFG);\n\n True trueExpr = new True(mCFG);\n ICFGDecisionNode B = new CFGDecisionNode(mCFG,trueExpr);\n mCFG.addDecisionNode(B);\n\n ICFGBasicBlockNode C = new CFGBasicBlockNode(\"C\", mCFG);\n Input i1 = new Input(mCFG);\n Statement stmt1 = new Statement(mCFG, x, i1);\n C.setStatement(stmt1);\n mCFG.addBasicBlockNode(C);\n\n ICFGBasicBlockNode D = new CFGBasicBlockNode(\"D\", mCFG);\n Input i2 = new Input(mCFG);\n Statement stmt2 = new Statement(mCFG, y, i2);\n D.setStatement(stmt2);\n mCFG.addBasicBlockNode(D);\n\n LesserThanExpression expr3 = new LesserThanExpression(mCFG, x, y);\n ICFGDecisionNode E = new CFGDecisionNode(mCFG,expr3);\n mCFG.addDecisionNode(E);\n\n ICFGBasicBlockNode F = new CFGBasicBlockNode(\"F\", mCFG);\n AddExpression addExpr1 = new AddExpression(mCFG,x,y);\n Statement stmt3 = new Statement(mCFG, p, addExpr1);\n F.setStatement(stmt3);\n mCFG.addBasicBlockNode(F);\n\n ICFGBasicBlockNode G = new CFGBasicBlockNode(\"G\", mCFG);\n SubExpression subExpr1 = new SubExpression(mCFG,x,y);\n Statement stmt4 = new Statement(mCFG, p, subExpr1);\n G.setStatement(stmt4);\n mCFG.addBasicBlockNode(G);\n//\n//\n// //edges\n ICFEdge AB = new CFEdge(\"AB\", mCFG, A, B);\n ICFEdge BC = new CFEdge(\"BC\", mCFG, B, C);\n ICFEdge CD = new CFEdge(\"CD\", mCFG, C, D);\n ICFEdge DE = new CFEdge(\"DE\", mCFG, D, E);\n ICFEdge EF = new CFEdge(\"EF\", mCFG, E, F);\n ICFEdge EG = new CFEdge(\"EG\", mCFG, E, G);\n ICFEdge FB = new CFEdge(\"FB\", mCFG, F, B);\n ICFEdge GB = new CFEdge(\"GB\", mCFG, G, B);\n ICFEdge BW = new CFEdge(\"BW\", mCFG, B, W);\n\n B.setThenEdge(BC);\n B.setElseEdge(BW);\n\n E.setThenEdge(EF);\n E.setElseEdge(EG);\n\n System.out.println(mCFG.getEdgeSet());\n\n// System.out.println(mCFG.getNodeSet());\n// System.out.println(mCFG.getEdgeSet());\n\n SEENew2 seeNew2 = new SEENew2(mCFG);\n\n SETNode setNode6 = seeNew2.allPathSE(mCFG,10);\n//\n// System.out.println(seeNew2.getSET().getStartNode().getIncomingEdge());\n// System.out.println(seeNew2.getSET().getStartNode().getCFGNode());\n//\n// Set<SETEdge> edgeSet = seeNew2.getSET().getEdgeSet();\n// for (SETEdge setEdge:edgeSet){\n// System.out.println(\"Edge:\"+setEdge);\n// System.out.println(\"Head:\"+setEdge.getHead());\n// System.out.println(\"Tail:\"+setEdge.getTail().getIncomingEdge());\n// System.out.println(\"Tail:\"+setEdge.getTail().getCFGNode());\n// }\n\n// Set<SETNode> nodeSet = seeNew2.getSET().getNodeSet();\n// for (SETNode setNode:nodeSet){\n// System.out.println(\"Node:\"+setNode);\n// System.out.println(\"CFGNode:\"+setNode.getCFGNode());\n//// System.out.println(\"Head:\"+setEdge.getHead());\n//// System.out.println(\"Tail:\"+setEdge.getTail());\n// }\n\n// // passing empty environment & startNode\n// SETBasicBlockNode startNode = new SETBasicBlockNode(seeNew2.getSET(),A);\n//\n// SETNode setNode = seeNew2.singleStep(B,startNode);\n// System.out.println(setNode.getLatestValue(x));\n//\n// SETNode setNode2 = seeNew2.singleStep(C,setNode);\n// System.out.println(setNode2.getLatestValue(y));\n//\n// SETNode setNode3 = seeNew2.singleStep(D,setNode2);\n// System.out.println(\"PathPredicate:\"+((SETDecisionNode)setNode3).getCondition());\n//\n// SETNode setNode4 = seeNew2.singleStep(E,setNode3);\n// System.out.println(setNode4.getLatestValue(x));\n//\n// SETNode setNode5 = seeNew2.singleStep(F,setNode4);\n// System.out.println(setNode5.getLatestValue(x));\n\n// SETNode setNode6 = seeNew2.allPathSE(mCFG,5);\n// System.out.println(setNode6.getSET());\n\n// System.out.println(seeNew2.getSET().getNodeSet());\n\n// System.out.println(seeNew2.getSET().getNumberOfDecisionNodes());\n\n// SETNode setNode6 = seeNew2.allPathSE(mCFG,5);\n// System.out.println(setNode6);\n\n\n\n\n\n }", "public interface Symbols {\n /* terminals */\n public static final int BAG = 68;\n public static final int RETRIEVE = 93;\n public static final int AS = 34;\n public static final int TIMES = 13;\n public static final int LCURLY = 54;\n public static final int TYPE = 58;\n public static final int LEAVESBY = 91;\n public static final int LOWEREQUALS = 33;\n public static final int LAZY_FAILURE = 97;\n public static final int CLOSEUNIQUEBY = 90;\n public static final int NAME = 7;\n public static final int ENUM = 70;\n public static final int FORSOME = 41;\n public static final int CATCH = 114;\n public static final int DATEPREC = 109;\n public static final int COMMA = 29;\n public static final int VIRTUAL = 99;\n public static final int RANDOM = 110;\n public static final int DOUBLE_LITERAL = 4;\n public static final int SUM = 48;\n public static final int THROW = 116;\n public static final int JOIN = 28;\n public static final int RPAREN = 19;\n public static final int ON_NAVIGATE = 106;\n public static final int STRUCT = 69;\n public static final int NOT_MATCH_STRING = 23;\n public static final int LPAREN = 18;\n public static final int NOW = 108;\n public static final int INTEGER_LITERAL = 2;\n public static final int NOT = 24;\n public static final int VIEW = 98;\n public static final int INSTANCE = 73;\n public static final int DIFFERENT = 21;\n public static final int DATE_LITERAL = 6;\n public static final int MIN = 43;\n public static final int THEN = 65;\n public static final int EXTERNAL = 67;\n public static final int RECORD = 57;\n public static final int SEROID = 120;\n public static final int REVERSE = 107;\n public static final int ON_UPDATE = 103;\n public static final int LOWER = 31;\n public static final int INSERTCOPY = 83;\n public static final int BOOLEAN_LITERAL = 5;\n public static final int TEMPORAL = 80;\n public static final int CLASS = 71;\n public static final int SEED = 101;\n public static final int IMPLEMENT = 95;\n public static final int MODULO = 17;\n public static final int UNIQUEREF = 47;\n public static final int PLUS = 10;\n public static final int FORALL = 42;\n public static final int DIVIDE = 14;\n public static final int EXISTS = 49;\n public static final int GREATEREQUALS = 32;\n public static final int WHILE = 84;\n public static final int UNION = 16;\n public static final int DELETE = 77;\n public static final int EXTENDS = 72;\n public static final int MODULE = 53;\n public static final int INTERFACE = 117;\n public static final int ASSIGN = 61;\n public static final int RSQUARE = 52;\n public static final int FOR = 86;\n public static final int DO = 85;\n public static final int SCHEMADEF = 96;\n public static final int MATCH_STRING = 22;\n public static final int GREATER = 30;\n public static final int RANGEAS = 119;\n public static final int MAX = 44;\n public static final int RETURN = 60;\n public static final int TRY = 113;\n public static final int ELSE = 66;\n public static final int DOTDOT = 50;\n public static final int BREAK = 87;\n public static final int DOT = 26;\n public static final int PERMANENT = 79;\n public static final int AVG = 45;\n public static final int TRANSACTION_ABORT = 112;\n public static final int STRING_LITERAL = 3;\n public static final int EOF = 0;\n public static final int SEMICOLON = 8;\n public static final int INTERSECT = 15;\n public static final int LSQUARE = 51;\n public static final int WHERE = 27;\n public static final int COUNT = 25;\n public static final int LOCAL = 81;\n public static final int IMPORT = 56;\n public static final int IS = 59;\n public static final int UNIQUE = 46;\n public static final int IN = 36;\n public static final int OR = 39;\n public static final int error = 1;\n public static final int HYPHEN = 11;\n public static final int LEAVESUNIQUEBY = 92;\n public static final int FINALLY = 115;\n public static final int CONTINUE = 88;\n public static final int INSTANCEOF = 74;\n public static final int IF = 64;\n public static final int CONTAINS = 37;\n public static final int COLON = 9;\n public static final int SUBTRACT = 12;\n public static final int CREATE = 78;\n public static final int DEREF = 62;\n public static final int FOREACH = 63;\n public static final int REF = 75;\n public static final int ON_DELETE = 104;\n public static final int DESEROID = 121;\n public static final int CLOSEBY = 89;\n public static final int RENAME = 122;\n public static final int UPDATE = 94;\n public static final int INSERT = 82;\n public static final int OBJECTS = 100;\n public static final int AND = 40;\n public static final int SESSION = 76;\n public static final int ON_RETRIEVE = 102;\n public static final int GROUPAS = 35;\n public static final int ON_NEW = 105;\n public static final int ORDERBY = 38;\n public static final int DISTINCT = 118;\n public static final int RCURLY = 55;\n public static final int EQUALS = 20;\n public static final int TRANSACTION_CAPABLE = 111;\n}", "public static void main(String[] args) throws FileNotFoundException {\n\n opsMap.put('+', 'A');\n opsMap.put('-', 'S');\n opsMap.put('*', 'M');\n opsMap.put( '/', 'D');\n opsMap.put('@', 'N');\n\n Scanner sc = new Scanner(System.in); boolean pula = true;\n\n while (sc.hasNext()) {\n if (pula) {\n pula = false;\n } else {\n System.out.println();\n }\n\n String line = sc.nextLine();\n\n boolean registerEmpty = true;\n int firstUnusedMemPos = 0;\n\n for (int k = 0; k < line.length(); k++) {\n char curr = line.charAt(k);\n if (!binaryOps.contains(curr + \"\") && !unaryOps.contains(curr + \"\")) {\n // expression\n if (registerEmpty) {\n registerEmpty = false;\n System.out.println(\"L \" + curr);\n } else {\n if ((k < line.length() - 1) && binaryOps.contains(\"\" + line.charAt(k+1))) {\n // TODO fix unary op\n // doing op\n System.out.println(opsMap.get(line.charAt(k+1)) + \" \" + curr);\n k++; // We store on next loop, if needed at all\n } else {\n // adding new primitives\n System.out.println(\"ST $\" + firstUnusedMemPos); firstUnusedMemPos++;\n System.out.println(\"L \" + curr);\n }\n }\n } else if (unaryOps.contains(\"\" + curr)) {\n System.out.println(\"N\");\n } else {\n // if we get here we need to execute op with register\n firstUnusedMemPos--;\n if (curr != '+' && curr != '*') {\n // then we need to flip the order.\n if (curr != '-') {\n System.out.println(\"ST $\"+ (firstUnusedMemPos + 1));\n System.out.println(\"L $\" + firstUnusedMemPos);\n System.out.println(opsMap.get(curr) + \" $\"+ (firstUnusedMemPos + 1));\n } else {\n System.out.println(\"N\");\n System.out.println(\"A $\"+ (firstUnusedMemPos));\n }\n } else System.out.println(opsMap.get(curr) + \" $\"+ firstUnusedMemPos);\n }\n\n }\n }\n }", "@Override\n\tpublic String visitCompexpr(CompexprContext ctx) {\n\t\t\n\t\tif(ctx.getChildCount()==3)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tif(ctx.getChild(1).getText().equals(\"==\"))\n\t\t\t{\n\t\t\t\treturn \"EQL \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\">=\"))\n\t\t\t{\n\t\t\t\treturn \"GTE \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\"<=\"))\n\t\t\t{\n\t\t\t\treturn \"LTE \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\"<\"))\n\t\t\t{\n\t\t\t\treturn \"LT \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\">\"))\n\t\t\t{\n\t\t\t\treturn \"GT \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\"~=\"))\n\t\t\t{\n\t\t\t\treturn \"NE \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t}\n\t\telse if(ctx.getChildCount()==1)\n\t\t{\n\t\t\n\t\t\treturn ctx.getChild(0).getText();\n\t\t}\n\t\treturn \"\";\n\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\twhile(sc.hasNext()){\r\n\t\t\tString str = sc.nextLine();\r\n\t\t\tStack<String> digit = new Stack<>();\r\n\t\t\tStringBuffer buffer = new StringBuffer();\r\n\t\t\tchar ch;\r\n\t\t\tboolean isHasOperator = false;\r\n\t\t\tboolean isLegal = true;\r\n\t\t\tint len = str.length();\r\n\t\t\tint i = 0;\r\n\t\t\twhile(i<len){\r\n\t\t\t\tch = str.charAt(i);\r\n\t\t\t\tswitch (ch) {\r\n\t\t\t\tcase '[':\r\n\t\t\t\tcase '{':\r\n\t\t\t\tcase '(':\r\n\t\t\t\tcase '+':\r\n\t\t\t\tcase '-':\r\n\t\t\t\tcase '*':\r\n\t\t\t\tcase '/':\r\n\t\t\t\t\tdigit.push(ch+\"\");\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase ']':\r\n\t\t\t\tcase '}':\r\n\t\t\t\tcase ')':\r\n\t\t\t\t\tString second = null;\r\n\t\t\t\t\twhile(digit.size()>1){\r\n\t\t\t\t\t\t//!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")\r\n\t\t\t\t\t\tif(!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")&&!digit.peek().equals(\")\")\r\n\t\t\t\t\t\t\t\t&&!digit.peek().equals(\"]\")&&!digit.peek().equals(\"}\")&&!digit.peek().equals(\"+\")&&!digit.peek().equals(\"-\")&&!digit.peek().equals(\"*\")&&!digit.peek().equals(\"/\")){\r\n\t\t\t\t\t\t\tsecond = digit.pop();\r\n\t\t\t\t\t\t\tif (digit.size()>0&&(digit.peek().equals(\"+\")||digit.peek().equals(\"-\")||digit.peek().equals(\"*\")||digit.peek().equals(\"/\"))) {\r\n\t\t\t\t\t\t\t\tisHasOperator = true;\r\n\t\t\t\t\t\t\t\tdigit.pop();\r\n\t\t\t\t\t\t\t\tif (digit.size()>0) {\r\n\t\t\t\t\t\t\t\t\tsecond = digit.pop();\r\n\t\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\t\tisLegal = false;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\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}\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tisLegal = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString first = digit.pop();\r\n\t\t\t\t\t\tif (digit.size()>0&&!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")) {\r\n\t\t\t\t\t\t\tif (digit.peek().equals(\"+\")||digit.peek().equals(\"-\")||digit.peek().equals(\"*\")||digit.peek().equals(\"/\")) {\r\n\t\t\t\t\t\t\t\tisHasOperator = true;\r\n\t\t\t\t\t\t\t\tdigit.pop();\r\n\t\t\t\t\t\t\t\tif (isHasOperator&&!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")&&!digit.peek().equals(\")\")\r\n\t\t\t\t\t\t\t\t\t\t&&!digit.peek().equals(\"]\")&&!digit.peek().equals(\"}\")&&!digit.peek().equals(\"+\")&&!digit.peek().equals(\"-\")&&!digit.peek().equals(\"*\")&&!digit.peek().equals(\"/\")) {\r\n\t\t\t\t\t\t\t\t\tsecond = digit.pop();\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}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (second==null) {\r\n\t\t\t\t\t\tisLegal = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tdigit.pop();\r\n\t\t\t\t\t\tdigit.push(second);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbuffer.append(ch);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\twhile(i<len&&ch!='+'&&ch!='-'&&ch!='*'&&ch!='/'&&ch!='['&&ch!='{'&&ch!='('&&ch!=')'&&ch!=']'&&ch!='}'){\r\n\t\t\t\t\t\tch = str.charAt(i);\r\n\t\t\t\t\t\tbuffer.append(ch);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdigit.push(buffer.toString());\r\n\t\t\t\t\tbuffer.setLength(0);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (!isLegal) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (digit.size()==1&&!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")) {\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\tisLegal = false;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(isLegal);\r\n\t\t}\r\n\t}", "Boolean parse() {\n // if errors during initial scanning\n // of program, immediately exit.\n if(scanner.hasErrors()) {\n System.out.println(ERRORMESSAGE);\n return false;\n }\n\n Stack<Integer> rStack = new Stack<Integer>(); // keeps track of production rules\n Stack<String> pStack = new Stack<String>(); // parsing stack\n STstack = new Stack<TNode>(); // syntax tree stack\n\n // pushing first production rule onto stack\n pStack.push(\"0\");\n Token token = scanner.next();\n String token_type = tokenToGrammar(token);\n boolean newToken = false;\n\n int row = 0;\n int col = 0;\n\n // push all tokens of program onto\n // parsing stack before parsing\n while(scanner.ongoing() >= 0) {\n // examine top of stack\n String top = pStack.peek();\n// System.out.println(\"top of stack \" + top);\n // retrieve next valid token of program\n if(newToken && scanner.ongoing() > 0) {\n token = scanner.next();\n token_type = tokenToGrammar(token);\n col = parseTableHeader.get(token_type);\n }\n// System.out.print(\"lookahead \" + token +\", \");\n\n try {\n // is the top of the stack a row number?\n row = Integer.parseInt(top);\n // get value of cell in parse table\n String cell = parseTable.get(row).get(col);\n// System.out.println(\"cell value \" + cell);\n String[] cellParts = cell.split(\"\");\n\n // if cell value is 'b', this is\n // an error and program is not\n // syntactically correct\n if(cellParts[0].equals(\"b\")) {\n System.out.println(ERRORMESSAGE);\n return false;\n }\n\n // if the cell entry is a shift\n else if(cellParts[0].equals(\"s\")) {\n\n // push the lookahead on stack\n pStack.push(token_type);\n // push the lookahead's token on STstack\n if(!token.getChVals().equals(\";\") || !token.getChVals().equals(\"$\")) {\n STstack.push(new TNode(\"general\", token));\n }\n\n // set the shift value as current row\n row = Integer.parseInt(\n String.join(\"\", Arrays.copyOfRange(cellParts, 1, cellParts.length))\n );\n// System.out.println(\"new row \" + row);\n\n // push row value to pStack\n pStack.push(Integer.toString(row));\n\n // set newToken param\n newToken = true;\n }\n\n // if cell entry is a reduce\n else if(cellParts[0].equals(\"r\")) {\n // first pop off the current row number\n pStack.pop();\n\n // get the production rule's index from the cell\n int prodIdx = Integer.parseInt(\n String.join(\"\", Arrays.copyOfRange(cellParts, 1, cellParts.length))\n );\n// System.out.println(\"production number \" + prodIdx);\n\n // get the production rule we are reducing by\n ArrayList<String> production = grammar.get(prodIdx);\n // which syntax tree node do we need?\n SNType nodeType;\n if(prodIdx == 2) {\n nodeType = STstack.peek().getType();\n } else {\n nodeType = idNodeType(prodIdx);\n }\n // also need a temporary stack to hold\n // popped tokens from STstack to make\n // a new node\n Stack<TNode> tempNodeHolder = new Stack<TNode>();\n\n // put all elements of the right side of\n // production rule onto a new stack so\n // we can keep track of them while\n // popping off the actual parsing stack\n Stack<String> rules = new Stack<String>();\n for(int i = 1; i < production.size(); i++) {\n rules.push(production.get(i));\n }\n\n // now pop off right side of\n // production from parsing stack\n while(!rules.empty()){\n String t = pStack.pop();\n if(t.equals(rules.peek())) {\n rules.pop();\n // also pop from STstack for syntax tree\n // and add to temporary stack\n if(!t.equals(\";\") || !token.getChVals().equals(\"$\")) {\n TNode tempNode = STstack.pop();\n tempNodeHolder.push(tempNode);\n }\n }\n }\n\n // synthesize new syntax tree node\n // and add back to STstack\n TNode newNode = makeNode(nodeType, tempNodeHolder);\n STstack.push(newNode);\n\n // push production number to rStack\n rStack.push(prodIdx);\n\n// if(prodIdx == 1) {\n// break;\n// }\n\n // check what current top of pStack is\n // to check for next row\n row = Integer.parseInt(pStack.peek());\n\n // push left side of production\n // onto stack\n pStack.push(production.get(0));\n\n // identify column of the left side of production\n col = parseTableHeader.get(pStack.peek());\n\n // set new row number\n row = Integer.parseInt(parseTable.get(row).get(col));\n// System.out.print(\"new row \" + row + \", \");\n\n // set new col number\n col = parseTableHeader.get(token_type);\n// System.out.println(\"new col \" + col);\n\n // push row value to pStack\n pStack.push(Integer.toString(row));\n\n // set newToken param\n newToken = false;\n\n }\n\n // we are done, so accept!\n else if(cellParts[0].equals(\"a\")) {\n break;\n }\n\n } catch (NumberFormatException e) {\n\n }\n\n }\n\n System.out.println(PASSMESSAGE);\n\n // Prints out the production rules used to derive program.\n// while(!rStack.isEmpty()) {\n// int idx = rStack.pop();\n// ArrayList<String> production = grammar.get(idx);\n// System.out.print(production.get(0) + \" -> \");\n// for(int i = 1; i < production.size(); i++) {\n// System.out.print(production.get(i) + \" \");\n// }\n// System.out.println();\n// }\n\n return true;\n\n\n }", "public interface BiomedicalParseSym {\n /* terminals */\n public static final int OR_OP = 6;\n public static final int String = 4;\n public static final int RPAREN = 3;\n public static final int error = 1;\n public static final int AND_OP = 5;\n public static final int NOT_OP = 7;\n public static final int LPAREN = 2;\n public static final int EOF = 0;\n}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t\tString BETTEST = \"/+8*62-9*43\";\r\n\r\n\r\n\t\tBinaryExpressionTree<String>listBET = new BinaryExpressionTree<String>();\r\n\r\n\t\tfor (int i = 0; i < BETTEST.length(); i++) {\r\n\t\t\t\r\n\t\t\tlistBET.add(\"\" + BETTEST.charAt(i));\t\t\t\r\n\t\t}\r\n\r\n\r\n\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\tlistBET.PreorderTraversal();\r\n\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\tlistBET.PostorderTraversal();\r\n\r\n\r\n\t\t String BETTEST2 =\"/+84*32\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET2 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST2.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET2.add(\"\" + BETTEST2.charAt(i));\t\r\n\t\t\r\n\t\r\n\t}\r\n\t\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET2.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\tlistBET2.PostorderTraversal();\r\n\t\t\t\r\n String BETTEST3 =\"*-92/31\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET3 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST3.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET3.add(\"\" + BETTEST3.charAt(i));\t\r\n\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t}\r\n\t\t System.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET3.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\t\r\n\t\t\tlistBET3.PostorderTraversal();\r\n \r\n\t\t\tString BETTEST4 =\"-/*8043\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET4 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST4.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET4.add(\"\" + BETTEST4.charAt(i));\t\r\n\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t}\r\n\t\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET4.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\tlistBET4.PostorderTraversal();\r\n}", "private void readGrammar(Hashtable<String, ? extends Number> lexRulesTable, \n\t\t\tHashtable<String, ? extends Number> intRulesTable) {\n\t\tFileUtil.appendReturn(\"Starting fedePar ... reading grammar\", Parameters.logFile);\n\t\tTreeSet<String> lexicon = new TreeSet<String>();\n\t\tTreeSet<String> categories = new TreeSet<String>();\n\t\tHashtable<String, Double> intCatFreqTable = new Hashtable<String, Double>();\n\t\tHashtable<String, Double> posCatFreqTable = new Hashtable<String, Double>();\n\t\tlexRulesSize = lexRulesTable.size();\n\t\tfor(Enumeration<String> e = lexRulesTable.keys(); e.hasMoreElements(); ) {\n\t\t\tString rule = (String)e.nextElement();\n\t\t\tdouble count = lexRulesTable.get(rule).doubleValue();\t\n\t\t\tString[] ruleSplit = rule.split(\" \");\n\t\t\tUtility.increaseStringDouble(posCatFreqTable, ruleSplit[0], count);\n\t\t\tcategories.add(ruleSplit[0]);\n\t\t\tlexicon.add(ruleSplit[1]);\n\t\t}\n\t\tfor(Enumeration<String> e = intRulesTable.keys(); e.hasMoreElements(); ) {\n\t\t\tString rule = (String)e.nextElement();\n\t\t\tdouble count = intRulesTable.get(rule).doubleValue();\t\n\t\t\tString[] ruleSplit = rule.split(\" \");\n\t\t\tUtility.increaseStringDouble(intCatFreqTable, ruleSplit[0], count);\n\t\t\tcategories.add(ruleSplit[0]);\n\t\t\tcategories.add(ruleSplit[1]);\n\t\t\tif (ruleSplit.length>2) {\n\t\t\t\tcategories.add(ruleSplit[2]);\n\t\t\t\tintBinaryRulesSize++;\n\t\t\t}\n\t\t\telse intUnaryRulesSize++;\n\t\t}\n\t\t//check overlapping between posTags and intTags\n\t\tHashSet<String> overlapping = new HashSet<String>(posCatFreqTable.keySet());\n\t\toverlapping.retainAll(intCatFreqTable.keySet());\n\t\tif (!overlapping.isEmpty()) {\n\t\t\tSystem.out.println(\"Overlapping between internal nodes and pos tags: \" + overlapping.toString());\n\t\t}\n\t\tlexCount = lexicon.size();\n\t\tcatCount = categories.size();\n\t\tlexArray = lexicon.toArray(new String[] {});\n\t\tcatArray = categories.toArray(new String[] {});\n\t\tlexIndex = new Hashtable<String, Integer>();\n\t\tcatIndex = new Hashtable<String, Integer>();\t\t\n\t\tfor(int i=0; i<lexArray.length; i++) lexIndex.put(lexArray[i], i);\n\t\tfor(int i=0; i<catArray.length; i++) catIndex.put(catArray[i], i);\n\t\treadRules(lexRulesTable, intRulesTable, posCatFreqTable, intCatFreqTable);\n\t}", "public interface InputParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int TRUE = 5;\n /** RegularExpression Id. */\n int FALSE = 6;\n /** RegularExpression Id. */\n int NOT = 7;\n /** RegularExpression Id. */\n int INTEGER = 8;\n /** RegularExpression Id. */\n int STRING = 9;\n /** RegularExpression Id. */\n int CHARACTER = 10;\n /** RegularExpression Id. */\n int BOOLEAN = 11;\n /** RegularExpression Id. */\n int ASTERIX = 12;\n /** RegularExpression Id. */\n int COLON = 13;\n /** RegularExpression Id. */\n int ADT = 14;\n /** RegularExpression Id. */\n int SIGNATURES = 15;\n /** RegularExpression Id. */\n int EQUATIONS = 16;\n /** RegularExpression Id. */\n int PLUS = 17;\n /** RegularExpression Id. */\n int MINUS = 18;\n /** RegularExpression Id. */\n int ARROW = 19;\n /** RegularExpression Id. */\n int LESS_THAN = 20;\n /** RegularExpression Id. */\n int EQUALS = 21;\n /** RegularExpression Id. */\n int GREATER_THAN = 22;\n /** RegularExpression Id. */\n int HEX_ESCAPE = 23;\n /** RegularExpression Id. */\n int LEFT_PAREN = 24;\n /** RegularExpression Id. */\n int RIGHT_PAREN = 25;\n /** RegularExpression Id. */\n int UINT10 = 26;\n /** RegularExpression Id. */\n int ND = 27;\n /** RegularExpression Id. */\n int MC = 28;\n /** RegularExpression Id. */\n int ME = 29;\n /** RegularExpression Id. */\n int LU = 30;\n /** RegularExpression Id. */\n int LL = 31;\n /** RegularExpression Id. */\n int LT = 32;\n /** RegularExpression Id. */\n int LM = 33;\n /** RegularExpression Id. */\n int LO = 34;\n /** RegularExpression Id. */\n int MN = 35;\n /** RegularExpression Id. */\n int NL = 36;\n /** RegularExpression Id. */\n int NO = 37;\n /** RegularExpression Id. */\n int PD = 38;\n /** RegularExpression Id. */\n int PC = 39;\n /** RegularExpression Id. */\n int PO = 40;\n /** RegularExpression Id. */\n int SC = 41;\n /** RegularExpression Id. */\n int SM = 42;\n /** RegularExpression Id. */\n int SK = 43;\n /** RegularExpression Id. */\n int SO = 44;\n /** RegularExpression Id. */\n int CO = 45;\n /** RegularExpression Id. */\n int ID = 46;\n /** RegularExpression Id. */\n int PECULIAR_ID = 47;\n /** RegularExpression Id. */\n int INITIAL = 48;\n /** RegularExpression Id. */\n int SPECIAL_INITIAL = 49;\n /** RegularExpression Id. */\n int CONSTITUENT = 50;\n /** RegularExpression Id. */\n int SUBSEQUENT = 51;\n /** RegularExpression Id. */\n int SPECIAL_SUBSEQUENT = 52;\n /** RegularExpression Id. */\n int INLINE_HEX_ESCAPE = 53;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"#t\\\"\",\n \"\\\"#f\\\"\",\n \"\\\"not\\\"\",\n \"\\\"int\\\"\",\n \"\\\"string\\\"\",\n \"\\\"character\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"*\\\"\",\n \"\\\":\\\"\",\n \"\\\"ADT:\\\"\",\n \"\\\"Signatures:\\\"\",\n \"\\\"Equations:\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"->\\\"\",\n \"\\\"<\\\"\",\n \"\\\"=\\\"\",\n \"\\\">\\\"\",\n \"\\\"\\\\\\\\x\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"<UINT10>\",\n \"<ND>\",\n \"<MC>\",\n \"<ME>\",\n \"<LU>\",\n \"<LL>\",\n \"<LT>\",\n \"<LM>\",\n \"<LO>\",\n \"<MN>\",\n \"<NL>\",\n \"<NO>\",\n \"<PD>\",\n \"<PC>\",\n \"<PO>\",\n \"<SC>\",\n \"<SM>\",\n \"<SK>\",\n \"<SO>\",\n \"<CO>\",\n \"<ID>\",\n \"<PECULIAR_ID>\",\n \"<INITIAL>\",\n \"<SPECIAL_INITIAL>\",\n \"<CONSTITUENT>\",\n \"<SUBSEQUENT>\",\n \"<SPECIAL_SUBSEQUENT>\",\n \"<INLINE_HEX_ESCAPE>\",\n };\n\n}", "@Test\n public void test_accepts_parens() {\n List<FARule> rules = Arrays.asList(\n new FARule(STATE0, '(', STATE1), new FARule(STATE1, ')', STATE0),\n new FARule(STATE1, '(', STATE2), new FARule(STATE2, ')', STATE1),\n new FARule(STATE2, '(', STATE3), new FARule(STATE3, ')', STATE2));\n NFARulebook rulebook = new NFARulebook(rules);\n\n NFADesign nfaDesign = new NFADesign(STATE0, Arrays.asList(STATE0), rulebook);\n assertFalse(nfaDesign.accepts(\"(()\"));\n assertFalse(nfaDesign.accepts(\"())\"));\n assertTrue(nfaDesign.accepts(\"(())\"));\n assertTrue(nfaDesign.accepts(\"(()(()()))\"));\n\n // Here is a flaw though - we can't make rules out to infinity - these brackets are balanced, but our rulebook\n // does not go out enough levels to recognize it:\n assertFalse(nfaDesign.accepts(\"(((())))\")); // Should be TRUE!\n // We can always add more levels, but there is no real solution to this problem with an NFA (no matter how many\n // rules we provide, nesting could always go 1 level deeper).\n }", "static void parse() {\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n varList.add(\"0\");\r\n\r\n // Find the first lexeme\r\n lex();\r\n\r\n // Check if the tokens form a statement\r\n if(checkStatement()) {\r\n System.out.println(\"\\nGRAMMAR IS CORRECT!\");\r\n //System.out.println(grammar);\r\n }\r\n else\r\n System.out.println(\"\\nERROR - UNEXPECTED LEXEME: \\\"\" + lexeme + \"\\\"\");\r\n\r\n i = 0;\r\n j = 0;\r\n k = 0;\r\n index = 0;\r\n lex();\r\n translate();\r\n }", "public interface LTLParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int SINGLE_LINE_COMMENT = 7;\n /** RegularExpression Id. */\n int KAS = 9;\n /** RegularExpression Id. */\n int KATE = 10;\n /** RegularExpression Id. */\n int KDATE = 11;\n /** RegularExpression Id. */\n int KEXISTS = 12;\n /** RegularExpression Id. */\n int KFORALL = 13;\n /** RegularExpression Id. */\n int KFORMULA = 14;\n /** RegularExpression Id. */\n int KIN = 15;\n /** RegularExpression Id. */\n int KNUMBER = 16;\n /** RegularExpression Id. */\n int KPI = 17;\n /** RegularExpression Id. */\n int KRENAME = 18;\n /** RegularExpression Id. */\n int KSET = 19;\n /** RegularExpression Id. */\n int KSTRING = 20;\n /** RegularExpression Id. */\n int KSUBFORMULA = 21;\n /** RegularExpression Id. */\n int INTEGER_LITERAL = 22;\n /** RegularExpression Id. */\n int REAL_LITERAL = 23;\n /** RegularExpression Id. */\n int EXPONENT = 24;\n /** RegularExpression Id. */\n int STRING_LITERAL = 25;\n /** RegularExpression Id. */\n int DESC_LITERAL = 26;\n /** RegularExpression Id. */\n int PIID = 27;\n /** RegularExpression Id. */\n int ATEID = 28;\n /** RegularExpression Id. */\n int ID = 29;\n /** RegularExpression Id. */\n int IDENTIFIER = 30;\n /** RegularExpression Id. */\n int STARTLETTER = 31;\n /** RegularExpression Id. */\n int LETTER = 32;\n /** RegularExpression Id. */\n int DIGIT = 33;\n /** RegularExpression Id. */\n int LPAREN = 34;\n /** RegularExpression Id. */\n int RPAREN = 35;\n /** RegularExpression Id. */\n int LBRACE = 36;\n /** RegularExpression Id. */\n int RBRACE = 37;\n /** RegularExpression Id. */\n int LBRACKET = 38;\n /** RegularExpression Id. */\n int RBRACKET = 39;\n /** RegularExpression Id. */\n int BAR = 40;\n /** RegularExpression Id. */\n int SEMICOLON = 41;\n /** RegularExpression Id. */\n int COMMA = 42;\n /** RegularExpression Id. */\n int DOT = 43;\n /** RegularExpression Id. */\n int COLON = 44;\n /** RegularExpression Id. */\n int ASSIGN = 45;\n /** RegularExpression Id. */\n int GT = 46;\n /** RegularExpression Id. */\n int LT = 47;\n /** RegularExpression Id. */\n int PNOT = 48;\n /** RegularExpression Id. */\n int SLASH = 49;\n /** RegularExpression Id. */\n int PLUS = 50;\n /** RegularExpression Id. */\n int MINUS = 51;\n /** RegularExpression Id. */\n int STAR = 52;\n /** RegularExpression Id. */\n int EQ = 53;\n /** RegularExpression Id. */\n int LE = 54;\n /** RegularExpression Id. */\n int GE = 55;\n /** RegularExpression Id. */\n int NE = 56;\n /** RegularExpression Id. */\n int REQ = 57;\n /** RegularExpression Id. */\n int POR = 58;\n /** RegularExpression Id. */\n int PAND = 59;\n /** RegularExpression Id. */\n int PIMPLIES = 60;\n /** RegularExpression Id. */\n int PBIIMPLIES = 61;\n /** RegularExpression Id. */\n int LALWAYS = 62;\n /** RegularExpression Id. */\n int LEVENTUALLY = 63;\n /** RegularExpression Id. */\n int LNEXTTIME = 64;\n /** RegularExpression Id. */\n int LUNTIL = 65;\n /** RegularExpression Id. */\n int URI = 66;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int IN_SINGLE_LINE_COMMENT = 1;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"#\\\"\",\n \"<SINGLE_LINE_COMMENT>\",\n \"<token of kind 8>\",\n \"\\\"as\\\"\",\n \"\\\"ate\\\"\",\n \"\\\"date\\\"\",\n \"\\\"exists\\\"\",\n \"\\\"forall\\\"\",\n \"\\\"formula\\\"\",\n \"\\\"in\\\"\",\n \"\\\"number\\\"\",\n \"\\\"pi\\\"\",\n \"\\\"rename\\\"\",\n \"\\\"set\\\"\",\n \"\\\"string\\\"\",\n \"\\\"subformula\\\"\",\n \"<INTEGER_LITERAL>\",\n \"<REAL_LITERAL>\",\n \"<EXPONENT>\",\n \"<STRING_LITERAL>\",\n \"<DESC_LITERAL>\",\n \"<PIID>\",\n \"<ATEID>\",\n \"<ID>\",\n \"<IDENTIFIER>\",\n \"<STARTLETTER>\",\n \"<LETTER>\",\n \"<DIGIT>\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\"|\\\"\",\n \"\\\";\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\":\\\"\",\n \"\\\":=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\"!\\\"\",\n \"\\\"/\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"==\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"!=\\\"\",\n \"\\\"~=\\\"\",\n \"\\\"\\\\\\\\/\\\"\",\n \"\\\"/\\\\\\\\\\\"\",\n \"\\\"->\\\"\",\n \"\\\"<->\\\"\",\n \"\\\"[]\\\"\",\n \"\\\"<>\\\"\",\n \"\\\"_O\\\"\",\n \"\\\"_U\\\"\",\n \"<URI>\",\n };\n\n}", "private String syntax(ArrayList<String> tokens){\r\n String tkn=\"Done\";\r\n boolean VarDeclFlag = true;\r\n boolean exitFlag = false;\r\n ArrayList<String> temp = new ArrayList<>();\r\n //TODO return error\r\n //TODO return error method\r\n for(int i=0; i<tokens.size(); i++){\r\n if(VarDeclFlag){ \r\n if(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isLeftParen(tokens.get(i))){\r\n VarDeclFlag=false;\r\n tokensDef.add(\"LeftParen\");\r\n i++;\r\n while(!isRightParen(tokens.get(i)) && exitFlag){\r\n if(exitFlag && !isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n if(tokens.get(i).endsWith(\",\")){\r\n\t\t\t\t\t\t\t\t\t\r\n if(isId(removeLast(tokens.get(i)))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n }\r\n }\r\n else{\r\n if(isId(tokens.get(i))){\r\n exitFlag = true;\r\n tokensDef.add(\"Var\");\r\n i++; \r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n\t\tif(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isLeftParen(tokens.get(i))){\r\n VarDeclFlag=false;\r\n\t\t\ttokensDef.add(\"LeftParen\");\r\n i++;\r\n if(!isRightParen(tokens.get(i))){\r\n while(!isRightParen(tokens.get(i))){\r\n if(exitFlag && !isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n if(tokens.get(i).endsWith(\",\")){\r\n if(isId(removeLast(tokens.get(i)))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isRightParen(tokens.get(i))){\r\n return \"error\";\r\n }\r\n }\r\n else \r\n return \"error\";\r\n }\r\n else{\r\n if(isId(tokens.get(i))){\r\n tokensDef.add(\"Var\");\r\n i++;\r\n if(isRightParen(tokens.get(i))){\r\n tokensDef.add(\"RightParen\");\r\n i++;\r\n }\r\n else\r\n return \"error\";\r\n }\r\n }\r\n \r\n }\r\n }\r\n else{\r\n tokensDef.add(\"RightParen\");\r\n i++;\r\n } \r\n }\r\n }\r\n }\r\n }\r\n\t\t\r\n return tkn;\r\n \r\n }", "int parseExpression() {\r\n\t\t\t\tint x = parseTerm();\r\n\t\t\t\tfor (;;) {\r\n\t\t\t\t\tif (eat('+'))\r\n\t\t\t\t\t\tx += parseTerm(); // addition\r\n\t\t\t\t\telse if (eat('-'))\r\n\t\t\t\t\t\tx -= parseTerm(); // subtraction\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\treturn x;\r\n\t\t\t\t}\r\n\t\t\t}", "public interface ForteLangConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int COMPARATOR_OP = 1;\n /** RegularExpression Id. */\n int BOOLEAN_OP = 2;\n /** RegularExpression Id. */\n int SET_OP = 3;\n /** RegularExpression Id. */\n int OP = 4;\n /** RegularExpression Id. */\n int CONCAT = 5;\n /** RegularExpression Id. */\n int SELECT = 6;\n /** RegularExpression Id. */\n int CONTAINS = 7;\n /** RegularExpression Id. */\n int NUMBER = 8;\n /** RegularExpression Id. */\n int FLOATING_POINT_NUMBER = 9;\n /** RegularExpression Id. */\n int BOOLEAN = 10;\n /** RegularExpression Id. */\n int STRING = 11;\n /** RegularExpression Id. */\n int REGEX_STRING = 12;\n /** RegularExpression Id. */\n int INCLUDE = 13;\n /** RegularExpression Id. */\n int IN = 14;\n /** RegularExpression Id. */\n int MATCH = 15;\n /** RegularExpression Id. */\n int OPENBRACKET = 16;\n /** RegularExpression Id. */\n int CLOSEBRACKET = 17;\n /** RegularExpression Id. */\n int OPENSBRACKET = 18;\n /** RegularExpression Id. */\n int CLOSESBRACKET = 19;\n /** RegularExpression Id. */\n int COMMA = 20;\n /** RegularExpression Id. */\n int EQUALS = 21;\n /** RegularExpression Id. */\n int SEMICOLON = 22;\n /** RegularExpression Id. */\n int OPENCBRACKET = 23;\n /** RegularExpression Id. */\n int CLOSECBRACKET = 24;\n /** RegularExpression Id. */\n int NUM = 25;\n /** RegularExpression Id. */\n int LST = 26;\n /** RegularExpression Id. */\n int SET = 27;\n /** RegularExpression Id. */\n int FUN = 28;\n /** RegularExpression Id. */\n int BOO = 29;\n /** RegularExpression Id. */\n int STR = 30;\n /** RegularExpression Id. */\n int COLON = 31;\n /** RegularExpression Id. */\n int VAR_NAME = 32;\n /** RegularExpression Id. */\n int FUNCTION_ARROW = 33;\n /** RegularExpression Id. */\n int GUARD_START = 34;\n /** RegularExpression Id. */\n int GUARD = 35;\n /** RegularExpression Id. */\n int GUARD_ARROW = 36;\n\n /** Lexical state. */\n int DEFAULT = 0;\n /** Lexical state. */\n int BlockComment = 1;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<COMPARATOR_OP>\",\n \"<BOOLEAN_OP>\",\n \"<SET_OP>\",\n \"<OP>\",\n \"\\\"++\\\"\",\n \"\\\".\\\"\",\n \"\\\"?\\\"\",\n \"<NUMBER>\",\n \"<FLOATING_POINT_NUMBER>\",\n \"<BOOLEAN>\",\n \"<STRING>\",\n \"<REGEX_STRING>\",\n \"\\\"include\\\"\",\n \"\\\"in\\\"\",\n \"\\\"match\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\",\\\"\",\n \"\\\"=\\\"\",\n \"\\\";\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"num\\\"\",\n \"\\\"list\\\"\",\n \"\\\"set\\\"\",\n \"\\\"func\\\"\",\n \"\\\"bool\\\"\",\n \"\\\"str\\\"\",\n \"\\\":\\\"\",\n \"<VAR_NAME>\",\n \"\\\"->\\\"\",\n \"\\\"|>\\\"\",\n \"\\\"|\\\"\",\n \"\\\"->>\\\"\",\n \"<token of kind 37>\",\n \"<token of kind 38>\",\n \"\\\"#[\\\"\",\n \"\\\"#[\\\"\",\n \"<token of kind 41>\",\n \"\\\"]#\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n };\n\n}", "public static void parse()\r\n {\r\n int initial;\r\n initial=expression();\r\n stateList.get(0).setNext1(initial);\r\n stateList.get(0).setNext2(initial);\r\n if(index<=expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n state st=new state(state,\"END\",-1,-1);\r\n stateList.add(st);\r\n }\r\n }", "public interface TypeScriptParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int DIGIT = 6;\n /** RegularExpression Id. */\n int ONE_TO_NINE = 7;\n /** RegularExpression Id. */\n int LETTER = 8;\n /** RegularExpression Id. */\n int SPACE = 9;\n /** RegularExpression Id. */\n int VAR = 10;\n /** RegularExpression Id. */\n int IF = 11;\n /** RegularExpression Id. */\n int ELSE_IF = 12;\n /** RegularExpression Id. */\n int ELSE = 13;\n /** RegularExpression Id. */\n int FUNCTION = 14;\n /** RegularExpression Id. */\n int BOOLEAN = 15;\n /** RegularExpression Id. */\n int NUMBER = 16;\n /** RegularExpression Id. */\n int STRING = 17;\n /** RegularExpression Id. */\n int ENUM = 18;\n /** RegularExpression Id. */\n int INTERFACE = 19;\n /** RegularExpression Id. */\n int RETURN = 20;\n /** RegularExpression Id. */\n int VOID = 21;\n /** RegularExpression Id. */\n int WHILE = 22;\n /** RegularExpression Id. */\n int PRINTLN = 23;\n /** RegularExpression Id. */\n int TRUE = 24;\n /** RegularExpression Id. */\n int FALSE = 25;\n /** RegularExpression Id. */\n int NOT = 26;\n /** RegularExpression Id. */\n int AMPRSAND = 27;\n /** RegularExpression Id. */\n int MUL = 28;\n /** RegularExpression Id. */\n int MINUS = 29;\n /** RegularExpression Id. */\n int PLUS = 30;\n /** RegularExpression Id. */\n int EQ = 31;\n /** RegularExpression Id. */\n int BAR = 32;\n /** RegularExpression Id. */\n int DIV = 33;\n /** RegularExpression Id. */\n int COLON = 34;\n /** RegularExpression Id. */\n int SEMICOLON = 35;\n /** RegularExpression Id. */\n int QM = 36;\n /** RegularExpression Id. */\n int COMMA = 37;\n /** RegularExpression Id. */\n int DOT = 38;\n /** RegularExpression Id. */\n int SINGLE_QUOTE = 39;\n /** RegularExpression Id. */\n int QUOTE = 40;\n /** RegularExpression Id. */\n int LEFT_PARAN = 41;\n /** RegularExpression Id. */\n int RIGHT_PARAN = 42;\n /** RegularExpression Id. */\n int LEFT_BRAKET = 43;\n /** RegularExpression Id. */\n int RIGHT_BRAKET = 44;\n /** RegularExpression Id. */\n int LEFT_BRACE = 45;\n /** RegularExpression Id. */\n int RIGHT_BRACE = 46;\n /** RegularExpression Id. */\n int UNDER_SCORE = 47;\n /** RegularExpression Id. */\n int LT = 48;\n /** RegularExpression Id. */\n int GT = 49;\n /** RegularExpression Id. */\n int LE = 50;\n /** RegularExpression Id. */\n int GE = 51;\n /** RegularExpression Id. */\n int DOUBLE_EQ = 52;\n /** RegularExpression Id. */\n int OR = 53;\n /** RegularExpression Id. */\n int AND = 54;\n /** RegularExpression Id. */\n int NOT_EQ = 55;\n /** RegularExpression Id. */\n int MATH_OP = 56;\n /** RegularExpression Id. */\n int STRING_LITERAL = 57;\n /** RegularExpression Id. */\n int IDENTIFIER = 58;\n /** RegularExpression Id. */\n int NUM = 59;\n /** RegularExpression Id. */\n int INTEGER = 60;\n /** RegularExpression Id. */\n int REAL = 61;\n /** RegularExpression Id. */\n int SIGN = 62;\n /** RegularExpression Id. */\n int ERROR = 63;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 5>\",\n \"<DIGIT>\",\n \"<ONE_TO_NINE>\",\n \"<LETTER>\",\n \"<SPACE>\",\n \"\\\"var\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"function\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"number\\\"\",\n \"\\\"char\\\"\",\n \"\\\"enum\\\"\",\n \"\\\"interface\\\"\",\n \"\\\"return\\\"\",\n \"\\\"void\\\"\",\n \"\\\"while\\\"\",\n \"\\\"println\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"!\\\"\",\n \"\\\"&\\\"\",\n \"\\\"*\\\"\",\n \"\\\"-\\\"\",\n \"\\\"+\\\"\",\n \"\\\"=\\\"\",\n \"\\\"|\\\"\",\n \"\\\"/\\\"\",\n \"\\\":\\\"\",\n \"\\\";\\\"\",\n \"\\\"?\\\"\",\n \"\\\",\\\"\",\n \"\\\".\\\"\",\n \"\\\"\\\\\\'\\\"\",\n \"\\\"\\\\\\\"\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"_\\\"\",\n \"\\\"<\\\"\",\n \"\\\">\\\"\",\n \"\\\"<=\\\"\",\n \"\\\">=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"||\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"!=\\\"\",\n \"<MATH_OP>\",\n \"<STRING_LITERAL>\",\n \"<IDENTIFIER>\",\n \"<NUM>\",\n \"<INTEGER>\",\n \"<REAL>\",\n \"\\\"\\\"\",\n \"<ERROR>\",\n };\n\n}", "@Test\r\n\tpublic void typeParserTest() {\n\t\tvalidateTypeParse(\r\n\t\t\t\t\"(function that takes a number and outputs a number)\");\r\n\t\t// validateTypeParse(\r\n\t\t// \"(function that takes a number and a (function that takes a number)\r\n\t\t// and outputs a number)\");\r\n\t\t// validateTypeParse(\r\n\t\t// \"(function that takes a number, a string, and an element_of_type_3\r\n\t\t// and outputs a number)\");\r\n\t\t// validateTypeParse(\"(function that takes a number)\");\r\n\t\t// assertEquals(\"procedure\", cdLoopType(\"function\"));\r\n\t\t// validateTypeParse(\"(function that outputs a number)\");\r\n\t\t// validateTypeParse(\"procedure\");\r\n\t}", "@Override public void exitCond(MicroParser.CondContext ctx) {\n\t\t//System.out.println(\"Exit cond: \" + infixS);\n\n\t\tif ((tf_flag == 1) && (infixS.get(0).equals(\"1\"))) {\n\t\t\tIRNode.tempCnt++;\n\t\t\tthis.meIRL.add(new IRNode(\"STOREI\", \"1\", \"\", \"$T\"+ IRNode.tempCnt));\n\t\t\tIRNode.tempCnt++;\n\t\t \tthis.meIRL.add(new IRNode(\"STOREI\", \"1\", \"\", \"$T\"+ IRNode.tempCnt));\n\t\t \tthis.meIRL.add(new IRNode(\"NE\", \"$T\"+IRNode.tempCnt, \"$T\"+(IRNode.tempCnt - 1), enterStack.peek(), lhsType));\n\t\t\t\ttf_flag = 0;\n\t\t} else if ((tf_flag == 1) && (infixS.get(0).equals(\"0\"))) {\n\t\t\tIRNode.tempCnt++;\n\t\t\tthis.meIRL.add(new IRNode(\"STOREI\", \"0\", \"\", \"$T\"+ IRNode.tempCnt));\n\t\t\tIRNode.tempCnt++;\n\t\t \tthis.meIRL.add(new IRNode(\"STOREI\", \"1\", \"\", \"$T\"+ IRNode.tempCnt));\n\t\t \tthis.meIRL.add(new IRNode(\"NE\", \"$T\"+IRNode.tempCnt, \"$T\"+(IRNode.tempCnt - 1), enterStack.peek(), lhsType));\n\t\t\t\ttf_flag = 0;\n\t\t} else {\n\t\t\t//Evaluate RHS\n\t\t\tString rhs = infixS.get(0); //WILL NOT WORK WITH EXPRESSIONS\n\n\t\t\t//Determine the type of var on RHS\n\t\t\ttry{\n\t\t\t\tif(Integer.valueOf(rhs) instanceof Integer){\n\t\t\t\t\tIRNode.tempCnt++;\n\t\t\t\t\tthis.meIRL.add(new IRNode(\"STOREI\", rhs, \"\", \"$T\" + IRNode.tempCnt));\n\t\t\t\t\trhsType = \"INT\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception err1){\n\t\t\t\ttry{\n\t\t\t\t\tif(Float.valueOf(rhs) instanceof Float){\n\t\t\t\t\t\tIRNode.tempCnt++;\n\t\t\t\t\t\tthis.meIRL.add(new IRNode(\"STOREF\", rhs, \"\", \"$T\" + IRNode.tempCnt));\n\t\t\t\t\t\trhsType = \"FLOAT\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(Exception err2){\n\t\t\t\t\t\tString type = \"FLOAT\";\n\t\t\t\t\t\tIRNode.tempCnt++;\n\t\t\t\t\t\tArrayList<List<String>> varList = st.varMap.get(\"GLOBAL\");\n\t\t\t\t\t if(varList != null){\n\t\t\t\t\t for(List<String> varData : varList){\n\t\t\t\t\t \tif(varData.get(0).equals(rhs)){\n\t\t\t\t\t \t\ttype = varData.get(1);\n\t\t\t\t\t\t\t\tif(type.compareTo(\"FLOAT\") == 0){\n\t\t\t\t\t\t\t \t\tthis.meIRL.add(new IRNode(\"STOREF\", rhs, \"\", \"$T\"+ IRNode.tempCnt));\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tthis.meIRL.add(new IRNode(\"STOREI\", rhs, \"\", \"$T\"+ IRNode.tempCnt));\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\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\n\t\t\t\t\t\tShuntingYard sy = new ShuntingYard();\n\t\t\t\t\t\tString postfixS = sy.infixToPostfix(infixS);\n\n\t\t\t\t\t\t//Tests Postfix Tree\n\t\t\t\t\t\t//System.out.println(\"postfixS: \" + postfixS);\n\t\t\t\t\t\tPostfixTree pfTree = new PostfixTree();\n\t\t\t\t\t\tPostfixTreeNode root = pfTree.createTree(postfixS);\n\n\t\t\t\t\t\t//adds tree to IRList\n\t\t\t\t\t\t//System.out.println(\"Type: \" + type);\n\t\t\t\t\t\troot.toIRList(root, this.meIRL, type);\n\n\t\t\t\t\t\t//RHS is an expression (no store manual necessary)\n\t\t\t\t\t \trhsType = type;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Add Intermediate Nodes\n\t\t\tswitch(cmp){\n\t\t\t\tcase \">\":\n\t\t\t\t\tthis.meIRL.add(new IRNode(\"LE\", \"$T\"+lhsTemp, \"$T\" + IRNode.tempCnt, enterStack.peek(), lhsType));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \">=\":\n\t\t\t\t\tthis.meIRL.add(new IRNode(\"LT\", \"$T\"+lhsTemp, \"$T\" + IRNode.tempCnt, enterStack.peek(), lhsType));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"<\":\n\t\t\t\t\tthis.meIRL.add(new IRNode(\"GE\", \"$T\"+lhsTemp, \"$T\" + IRNode.tempCnt, enterStack.peek(), lhsType));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"<=\":\n\t\t\t\t\tthis.meIRL.add(new IRNode(\"GT\", \"$T\"+lhsTemp, \"$T\" + IRNode.tempCnt, enterStack.peek(), lhsType));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"!=\":\n\t\t\t\t\tthis.meIRL.add(new IRNode(\"EQ\", \"$T\"+lhsTemp, \"$T\" + IRNode.tempCnt, enterStack.peek(), lhsType));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"=\":\n\t\t\t\t\tthis.meIRL.add(new IRNode(\"NE\", \"$T\"+lhsTemp, \"$T\" + IRNode.tempCnt, enterStack.peek(), lhsType));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tcmp = \"\";\n\t\tlhsType = \"\";\n\t\trhsType = \"\";\n\t\tlhsTemp = -1;\n\t}", "public GrammarRule(String pcfgString){\n\t\tMatcher m = PCFG.matcher(pcfgString);\n\t\t\n\t\tif( m.matches() ){\n\t\t\tlhs = m.group(1);\n\t\t\t\n\t\t\tString rhsString = m.group(2);\n\t\t\t\n\t\t\tif( rhsString.startsWith(LEXICAL_PREFIX) ){\n\t\t\t\t// strip off the LEXICAL_PREFIX\n\t\t\t\tString lex = rhsString.substring(LEXICAL_PREFIX.length());\n\t\t\t\t\n\t\t\t\trhs = new ArrayList<String>();\n\t\t\t\trhs.add(lex);\n\t\t\t\tlexical = true;\n\t\t\t}else{\n\t\t\t\trhs = new ArrayList<String>(Arrays.asList(rhsString.split(\" \")));\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tweight = Double.parseDouble(m.group(3));\n\t\t}else{\n\t\t\tthrow new RuntimeException(\"Bad PCFG: \" + pcfgString);\n\t\t}\n\t}", "private FiniteAutomaton parseT() {\n\t\t\n\t\tFiniteAutomaton f = parseF();\n\t\t\n\t\tint c = peek();\n\t\tif (c >= 0 && (c == '*' || c == '+')) {\n\t\t\t// repetition\n\t\t\texpect((char) c); // consume the * or +\n\n\t\t\t// Create result NFA with new start and accepting states\n\t\t\tFiniteAutomaton result = new FiniteAutomaton();\n\t\t\tState start = result.createState();\n\t\t\tstart.setStart(true);\n\t\t\tState accepting = result.createState();\n\t\t\taccepting.setAccepting(true);\n\n\t\t\t// add ε-transitions from\n\t\t\t// - start to accepting (only for '*', not for '+') and,\n\t\t\t// - accepting to start state (both '*' and '+')\n\t\t\t// This allows 0 or more repetitions for '*', and 1 or more\n\t\t\t// repetitions for '+'.\n\t\t\t\n\t\t\tif (c == '*') {\n\t\t\t\tresult.createTransition(start, accepting, FiniteAutomaton.EPSILON);\n\t\t\t}\n\t\t\tresult.createTransition(accepting, start, FiniteAutomaton.EPSILON);\n\n\t\t\t// add states from orig NFA\n\t\t\tresult.addAll(f);\n\n\t\t\t// add ε-transition from the new start state to the old start state\n\t\t\tresult.createTransition(start, f.getStartState(), FiniteAutomaton.EPSILON);\n\t\t\tf.getStartState().setStart(false);\n\n\t\t\t// add ε-transition from the old accepting state to the new accepting state\n\t\t\tresult.createTransition(f.getUniqueAcceptingState(), accepting, FiniteAutomaton.EPSILON);\n\t\t\tf.getUniqueAcceptingState().setAccepting(false);\n\n\t\t\t// done\n\t\t\treturn check(result);\n\t\t} else if (c >= 0 && c == '?') {\n\t\t\texpect('?');\n\t\t\t\n\t\t\t// Create new start and accepting states, connected to/from\n\t\t\t// the original start and accepting states, and create an\n\t\t\t// epsilon transition from the new start state to the new\n\t\t\t// accepting state (allowing 0 occurrences of strings accepted\n\t\t\t// by the original FA.)\n\t\t\tState start = f.getStartState();\n\t\t\tState accept = f.getUniqueAcceptingState();\n\t\t\tState newStart = f.createState();\n\t\t\tState newAccept = f.createState();\n\t\t\tf.createTransition(newStart, start, FiniteAutomaton.EPSILON); // allow 1 occurrence\n\t\t\tf.createTransition(accept, newAccept, FiniteAutomaton.EPSILON); // as above\n\t\t\tstart.setStart(false);\n\t\t\tnewStart.setStart(true);\n\t\t\taccept.setAccepting(false);\n\t\t\tnewAccept.setAccepting(true);\n\t\t\tf.createTransition(newStart, newAccept, FiniteAutomaton.EPSILON); // allow 0 occurrences\n\t\t\t\n\t\t\treturn f;\n\t\t}\n\t\t\n\t\t// No operator (*+?) was applied, so just return whatever parseF() returned\n\t\treturn f;\n\t}", "Butternut(String grammar)\n\t{\n\t\tmain = selectGrammar(grammar);\n\t\ttext = \"123CAN Weldoer\".toCharArray();//new char[0];\n\t\ttree = main.parse(0);\n\t\t//experimentalParser(\"123CAN Weldoer\".toCharArray());\n\t}", "public static Expr parse(String str) {\r\n\t\tExprBinary at = new ExprBinary(null, null); // the root of the tree\r\n\t\tStringBuilder opstore = new StringBuilder(); // stores operator characters\r\n\t\tStringBuilder adder = new StringBuilder(); // stores value characters\r\n\t\tboolean text = false; // whether inside of a string\r\n\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tboolean add = (c != '\\\\'); // whether to add the char to adder. ignore escape char\r\n\t\t\tboolean leftSide = (opstore.length() == 0); // whether on the left side of the binary expression (before the operator)\r\n\t\t\tString adderStr = adder.toString();\r\n\t\t\tString opStr = opstore.toString();\r\n\r\n\t\t\tif (c == '\"') { // string\r\n\t\t\t\tif (i == 0 || str.charAt(i - 1) != '\\\\') {\r\n\t\t\t\t\ttext = !text; // ignore string contents\r\n\t\t\t\t}\r\n\t\t\t} else if (!text) {\r\n\t\t\t\tif (c == ' ') {\r\n\t\t\t\t\tadd = false; // ignore spaces\r\n\t\t\t\t} else if (c == '(') { // grouping or function\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tString contents = str.substring(i + 1, closeIndex);\r\n\t\t\t\t\tExpr group; // the expression denoted by the parentheses group\r\n\r\n\t\t\t\t\tif (i > 0 && (!isReserved(str.charAt(i - 1)) || str.charAt(i - 1) == ')')) { // function\r\n\t\t\t\t\t\tif (adderStr.isEmpty()) { // function reference call ... func()()\r\n\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(null, contents); // a reference call is only a parameter group, null name\r\n\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t} else { // function call\r\n\t\t\t\t\t\t\tif (adderStr.startsWith(\".\")) { // function sub call ... func().subfunc()\r\n\t\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t\t} else { // standalone function ... func()\r\n\t\t\t\t\t\t\t\tif (Character.toString(adderStr.charAt(0)).equals(Operator.REF.op)) { // @func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprFuncRef(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\t} else { // func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprCall(adderStr, contents);\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} else { // parenthetical grouping\r\n\t\t\t\t\t\tchar cc = (adderStr.length() == 1 ? adderStr.charAt(0) : 0); // operator before parenthesis ... !()\r\n\t\t\t\t\t\tif (isReserved(cc)) { // operation on the group\r\n\t\t\t\t\t\t\tgroup = new ExprUnary(Operator.get(Character.toString(cc)), parse(contents));\r\n\t\t\t\t\t\t} else { // ignore character, not an operator\r\n\t\t\t\t\t\t\tgroup = parse(contents);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add to tree\r\n\t\t\t\t\tif (leftSide) at.setLeft(group);\r\n\t\t\t\t\telse at.setRight(group);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (c == '{') { // array initializer ... {}\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tExpr arr = new ExprArray(str.substring(i + 1, closeIndex), adderStr);\r\n\r\n\t\t\t\t\tif (adderStr.length() == 1 && isReserved(adderStr.charAt(0))) {\r\n\t\t\t\t\t\t// unary op done on array initializer ... !{}\r\n\t\t\t\t\t\tarr = new ExprUnary(Operator.get(Character.toString(adderStr.charAt(0))), arr);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (leftSide) at.setLeft(arr);\r\n\t\t\t\t\telse at.setRight(arr);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (isOp(c)) { // operator\r\n\t\t\t\t\t// add value used in operation to tree\r\n\t\t\t\t\tif (!adderStr.isEmpty()) {\r\n\t\t\t\t\t\tif (leftSide) { // ex: adderStr + ___\r\n\t\t\t\t\t\t\tat.setLeft(parseValue(adderStr));\r\n\t\t\t\t\t\t} else { // ex: (___ + adderStr) + ___\r\n\t\t\t\t\t\t\tat.setRight(parseValue(adderStr));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opStr.equals(\"\") || (i > 0 && isOp(str.charAt(i - 1)))) { // accumulate operator from adjacent operator characters (ex: != consists of ! and =)\r\n\t\t\t\t\t\tif (!(adderStr.isEmpty() && (opStr + c).equals(\"-\")) && (Operator.get(opStr + c) != null || (opStr.isEmpty() && isOp(c)))) {// if the operator exists, then it is an operator character\r\n\t\t\t\t\t\t\tif (opStr.equals(\"-\") && c == '-') { // this and the above line handle negatives and double negatives\r\n\t\t\t\t\t\t\t\topStr = \"+\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\topStr += c;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // existing operator operation must be added to tree ... in \"(a + b) * c\", \"(a+b)\" must be abstracted-out so we get \"x * c\"\r\n\t\t\t\t\t\tint endIndex = i + 1; // end index of operator\r\n\r\n\t\t\t\t\t\t// get entire operator if operator is more than 1 character long\r\n\t\t\t\t\t\tfor (int i2 = endIndex; i2 < str.length(); i2++) {\r\n\t\t\t\t\t\t\tif (isOp(str.charAt(i2))) endIndex++;\r\n\t\t\t\t\t\t\telse break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOperator nextOp = Operator.get(str.substring(i, endIndex)); // second (right-most) operator\r\n\t\t\t\t\t\tat.op = Operator.get(opStr); // first (left-most) operator\r\n\r\n\t\t\t\t\t\t// group values in operation by operator precedence\r\n\t\t\t\t\t\tint p1 = precedence(nextOp); // right-most op\r\n\t\t\t\t\t\tint p2 = precedence(at.op); // left-most op\r\n\r\n\t\t\t\t\t\tif (p1 > p2) { // group around the right-most op\r\n\t\t\t\t\t\t\tExprBinary right = new ExprBinary(at, nextOp);\r\n\t\t\t\t\t\t\tright.setLeft(at.right());\r\n\r\n\t\t\t\t\t\t\tat.setRight(right);\r\n\t\t\t\t\t\t\tat = right;\r\n\r\n\t\t\t\t\t\t} else if (p1 < p2) { // group around the left-most op\r\n\t\t\t\t\t\t\tExprBinary last = at;\r\n\t\t\t\t\t\t\tExprBinary match = at.parent();\r\n\r\n\t\t\t\t\t\t\t// correctly add to the binary tree based on precedence of operators\r\n\t\t\t\t\t\t\twhile (match instanceof ExprBinary && p1 < (p2 = precedence(((ExprBinary) match).op))) {\r\n\t\t\t\t\t\t\t\tlast = match;\r\n\t\t\t\t\t\t\t\tmatch = match.parent();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tExprBinary tr = new ExprBinary(match, nextOp);\r\n\t\t\t\t\t\t\ttr.setLeft(last);\r\n\r\n\t\t\t\t\t\t\tif (match != null) {\r\n\t\t\t\t\t\t\t\tif (last == match.right()) match.setRight(tr);\r\n\t\t\t\t\t\t\t\telse match.setLeft(tr);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tat = tr;\r\n\r\n\t\t\t\t\t\t} else { // group from left to right (equal operator precedence)\r\n\t\t\t\t\t\t\tExprBinary left = new ExprBinary(at, at.op); // group existing values into left node, add right to open right node spot\r\n\t\t\t\t\t\t\tleft.setLeft(at.left());\r\n\t\t\t\t\t\t\tleft.setRight(at.right());\r\n\r\n\t\t\t\t\t\t\tat.op = nextOp;\r\n\t\t\t\t\t\t\tat.setLeft(left);\r\n\t\t\t\t\t\t\tat.setRight(null);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\topStr = nextOp.op;\r\n\t\t\t\t\t\ti = endIndex - 1;\r\n\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// store valid value characters\r\n\t\t\tif (add) {\r\n\t\t\t\tadder.append(c);\r\n\r\n\t\t\t\t// if this is the last character, then add the stored value to the tree.\r\n\t\t\t\t// otherwise, would be incorrectly ignored because there is no next operator\r\n\t\t\t\tif (i + 1 == str.length()) {\r\n\t\t\t\t\tif (opstore.length() == 0) {\r\n\t\t\t\t\t\tat.setLeft(parseValue(adder.toString()));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tat.setRight(parseValue(adder.toString()));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// initialize binary tree operator if not done so already\r\n\t\tif (at.op == null) {\r\n\t\t\tat.op = Operator.get(opstore.toString());\r\n\t\t}\r\n\r\n\t\t// after traversing the tree to some point, we need to get back to root so we can return the entire tree\r\n\t\twhile (at.parent() != null) {\r\n\t\t\tat = (ExprBinary) at.parent();\r\n\t\t}\r\n\r\n\t\t// the expression may not actually be a binary operation\r\n\t\tif (at.op == null && at.right() == NULL) {\r\n\t\t\tif (at.left() == NULL) return NULL; // the expression is empty\r\n\t\t\treturn at.left(); // the expression is a single value/unary-operation\r\n\t\t}\r\n\r\n\t\treturn at;\r\n\t}", "@Override\n\tpublic String visitExpr(MicroParser.ExprContext ctx) {\n\t\tString prefix = visit(ctx.expr_prefix());\n\t\tString expr = prefix + visit(ctx.term());\n\t\t\n\t\t//System.out.println(\"in visit expr: \"+expr);\n\t\t//System.out.println(\"in visit expr: prefix is: \"+prefix);\n\t\tif((prefix.contentEquals(\"\"))) return expr;\n\t\tString op1, op2, result;\n\t\tString type = currentType;\n\t\tString[] ids = expr.split(\"\\\\-|\\\\+\");\n\t List<String> operands = new ArrayList<String>();\n\t List<Character> addops = new ArrayList<Character>();\n\t \n\t for(int i=0;i<expr.length();i++) {\n\t \tif(expr.charAt(i)=='+' || expr.charAt(i)=='-')\n\t \t\taddops.add(expr.charAt(i));\n\t }\n\t //create a list of addops\n\t \n\t //create a list of operands \n\t for(String i:ids) \n\t \t operands.add(i);\n\t \n\t op1 = operands.get(0);\n\t op2 = operands.get(1);\n\t temp = new Temporary(type);\n\t result = temp.fullName;\n\t tempList.addT(temp);\n\t //System.out.println(\"in visit expr, ops are: \"+op1+\" \"+ op2);\n\t //System.out.println(\"in visit expr, result is: \"+ result);\n\t if(addops.get(0)=='+') {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \t\n\t else {\n\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t \toperands.remove(0); operands.remove(0); addops.remove(0);\n\t }\n\t \n\t \t\n\t if(operands.size()==0) return result;\n\t \n\t for(int i=0; i<operands.size();i++) {\n\t \top1 = result;\n\t \top2 = operands.get(i);\n\t \ttemp = new Temporary(type);\n\t \tresult = temp.fullName;\n\t \ttempList.addT(temp);\n\t \tif(addops.get(0)=='+') {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"ADD\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t \t}\n\t\t \t\n\t\t else {\n\t\t \tglobalIR.addStmt(IRStatement.generateArithmetic(type, \"SUB\", op1, op2, result));\n\t\t \taddops.remove(0);\n\t\t }\n\t\t \t\n\t }\n\t return result; \n\t\t\n\t}", "public interface Node {\n Oper oper();\n CNFOrdinal toCNF();\n}", "@Test\r\n\tpublic void testDec0() throws LexicalException, SyntaxException {\r\n\t\tString input = \"b{int c;}\";\r\n\t\tParser parser = makeParser(input);\r\n\t\tparser.parse();\r\n\t}", "public static void parseLine(String input){\r\n\t\tfor(int i = 0;i<input.length();i++){\r\n\t\t\t\r\n\t\t\tString currentChar = parseChar(input,i);\r\n\t\t\ti+=currentChar.length()-1; //skip past all integer characters if there are any\r\n\t\t\t\r\n\t\t\tif(checkOperand(currentChar)){\r\n\t\t\t\texpressionTree.treeStack.push(new Node(currentChar));\r\n\t\t\t}else if(checkOperator(currentChar)){\r\n\t\t\t\tNode node = new Node(currentChar);\r\n\t\t\t\t\r\n\t\t\t\tif(!expressionTree.treeStack.empty()){\r\n\t\t\t\t\tnode.rightNode = (Node) expressionTree.treeStack.peek();\r\n\t\t\t\t\tnode.rightNode.parentNode = node;\r\n\t\t\t\t\texpressionTree.treeStack.pop();\r\n\t\t\t\t}\r\n\t\t\t\tif(!expressionTree.treeStack.empty()){\r\n\t\t\t\t\tnode.leftNode = (Node) expressionTree.treeStack.peek();\r\n\t\t\t\t\tnode.leftNode.parentNode = node;\r\n\t\t\t\t\texpressionTree.treeStack.pop();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\texpressionTree.treeStack.push(node);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void generateAutomaton() {\n /**\n * Chars in the positions:\n * 0 -> \"-\"\n * 1 -> \"+\"\n * 2 -> \"/\"\n * 3 -> \"*\"\n * 4 -> \")\"\n * 5 -> \"(\"\n * 6 -> \"=\"\n * 7 -> \";\"\n * 8 -> [0-9]\n * 9 -> [A-Za-z]\n * 10 -> skip (\"\\n\", \"\\r\", \" \", \"\\t\")\n * 11 -> other symbols\n */\n\n automaton = new State[][]{\n /* DEAD */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* START */ {State.SUB, State.PLUS, State.DIV, State.MUL, State.RPAR, State.LPAR, State.EQ, State.SMICOLON, State.INT, State.VAR, State.DEAD, State.DEAD},\n /* SUB */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* PLUS */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* DIV */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* MUL */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* RPAR */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* LPAR */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* EQ */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* SMICOLON */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD},\n /* INT */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.INT, State.DEAD, State.DEAD, State.DEAD},\n /* VAR */ {State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.DEAD, State.VAR, State.VAR, State.DEAD, State.DEAD}\n };\n }", "private boolean grammar() {\r\n return skip() && rules() && MARK(END_OF_TEXT) && EOT();\r\n }", "@Override\n\tpublic String visitArExpr(ArExprContext ctx) {\n\t\tint chNo=ctx.children.size();\n\t\tif(chNo == 3){\n\t\t\tParseTree cur = ctx.getChild(1);\n\t\t\tif(cur==ctx.MULT() || cur==ctx.DIV()|| cur==ctx.PLUS() || cur==ctx.MINUS()){\n\t\t\t\tString left = visit(ctx.getChild(0));\n\t\t\t\tString right = visit(ctx.getChild(2));\n\t\t\t\tif(!(right.equals(left) && right.equals(\"int\")) ){throw new RuntimeException(\"Arithmetic operations only with integers\");}\n\t\t\t\treturn(\"int\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn(visit(cur));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tParseTree cur=ctx.getChild(0);\n\t\t\tif (cur instanceof TerminalNode) {\t\t\t\t\n\t\t\t\tif (cur==ctx.INTEG()) return \"int\";\n\t\t\t\telse if (cur==ctx.CH()) return \"char\";\n\t\t\t\telse if(cur==ctx.ID()){\n\t\t\t\t\tString key=visitTerminal((TerminalNode)cur);\n\t\t\t\t\tRecord id= table.lookup(key);\n\t\t\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\t\t\treturn id.getReturnType();\t\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t}else {\n\t\t\t\tString type=visit(ctx.getChild(0));\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn null;\n\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 }", "@Test\n\t/**\n\t * Testing the basic expressions.\n\t * Testing:\n\t * - A correct sample program.\n\t * - A sample program containing spelling and context free errors.\n\t * - A sample program containing context errors.\n\t * - A sample program containing runtime errors.\n\t * \n\t * @throws ParseException\n\t * @throws IOException\n\t */\n\tpublic void basicExprTest() throws ParseException, IOException{\n\t\tint[] input = {0, 1, 0, 99, 2, 1, 2, 0, 0, 99};\n\t\tint[] output = {1, 0, -1, 0, 1, -1, 0, 99, 97, -1, 2, 1, 2, 0, -1, 0, 1, 0, -1, 97, -1, 2, -1, 98};\n\t\tcheckRuntime(\"basicExprCorrect\", input, output);\n\t\t\n\t\t/** Check whether a program contains syntax errors. */\n\t\tcheckFail(\"basicExprSpellingContextFreeSyntaxError\");\n\t\t\n\t\t/** Check whether a program contains the given errors. */\n\t\tSet<String> errors = new HashSet<String>();\n\t\terrors.add(\"Line 10:1 - Variable 'z' is immutable.\");\n\t\terrors.add(\"Line 13:3 - Expected type 'Integer' but found 'Boolean'\");\n\t\terrors.add(\"Line 15:5 - Expected type 'Boolean' but found 'Char'\");\n\t\terrors.add(\"Line 17:10 - Expected type 'Integer' but found 'Char'\");\n\t\terrors.add(\"Line 17:1 - Expected type 'Integer' but found 'Boolean'\");\n\t\terrors.add(\"Line 18:1 - Expected type 'Integer' but found 'Char'\");\n\t\terrors.add(\"Line 18:16 - Expected type 'Integer' but found 'Char'\");\n\t\terrors.add(\"Line 19:7 - Expected type 'Boolean' but found 'Integer'\");\n\t\terrors.add(\"Line 19:13 - Expected type 'Boolean' but found 'Char'\");\n\t\terrors.add(\"Line 22:1 - Expected type 'Integer' but found 'Boolean'\");\t\t\n\t\terrors.add(\"Line 23:1 - Expected type 'Char' but found 'Integer'\");\n\t\terrors.add(\"Line 26:5 - Expected type 'Char' but found 'Integer'\");\n\t\terrors.add(\"Line 27:5 - Expected type 'Boolean' but found 'Integer'\");\n\t\terrors.add(\"Line 30:1 - 'p' not defined in scope\");\n\t\terrors.add(\"Line 30:1 - Variable 'p' not declared\");\n\t\terrors.add(\"Line 30:4 - 'q' not defined in scope\");\n\t\terrors.add(\"Line 30:4 - Variable 'q' not declared\");\n\t\terrors.add(\"Line 37:1 - Expected type 'null' but found 'Char'\");\n\t\terrors.add(\"Line 38:58 - Expected type not null but found 'null'\");\n\t\tcheckContextFail(\"basicExprContextError\", errors);\n\t\t\n\t\t/** Check whether a program gives a runtime error. */\n\t\tcheckRuntimeFail(\"basicExprRuntimeError\");\n\t}", "private final TypeSAT GetTypeSAT(String expression, String leftExpression, String rightExpression) {\r\n // remove extra brackets\r\n expression = this.RemoveExtraBrackets(expression);\r\n // look for binary implies\r\n if (expression.contains(\">\")) {\r\n if (this.IsBinaryOp(expression, \">\", leftExpression, rightExpression)) {\r\n return TypeSAT.Implies;\r\n }\r\n \r\n }\r\n \r\n // look for binary and\r\n if (expression.contains(\"&\")) {\r\n if (this.IsBinaryOp(expression, \"&\", leftExpression, rightExpression)) {\r\n return TypeSAT.And;\r\n }\r\n \r\n }\r\n \r\n // look for binary or\r\n if (expression.contains(\"|\")) {\r\n if (this.IsBinaryOp(expression, \"|\", leftExpression, rightExpression)) {\r\n return TypeSAT.Or;\r\n }\r\n \r\n }\r\n \r\n // look for binary AU\r\n if (expression.startsWith(\"A(\")) {\r\n String strippedExpression = expression.substring(2, (expression.length() - 3));\r\n if (this.IsBinaryOp(strippedExpression, \"U\", leftExpression, rightExpression)) {\r\n return TypeSAT.AU;\r\n }\r\n \r\n }\r\n \r\n // look for binary EU\r\n if (expression.startsWith(\"E(\")) {\r\n String strippedExpression = expression.substring(2, (expression.length() - 3));\r\n if (this.IsBinaryOp(strippedExpression, \"U\", leftExpression, rightExpression)) {\r\n return TypeSAT.EU;\r\n }\r\n \r\n }\r\n \r\n // look for unary T, F, !, AX, EX, AG, EG, AF, EF, atomic\r\n if (expression.equals(\"T\")) {\r\n this.leftExpression = expression;\r\n return TypeSAT.AllTrue;\r\n }\r\n \r\n if (expression.equals(\"F\")) {\r\n this.leftExpression = expression;\r\n return TypeSAT.AllFalse;\r\n }\r\n \r\n if (this.IsAtomic(expression)) {\r\n this.leftExpression = expression;\r\n return TypeSAT.Atomic;\r\n }\r\n \r\n if (expression.startsWith(\"!\")) {\r\n this.leftExpression = expression.substring(1,expression.length());\r\n return TypeSAT.Not;\r\n }\r\n \r\n if (expression.startsWith(\"AX\")) {\r\n this.leftExpression = expression.substring(2,expression.length());\r\n return TypeSAT.AX;\r\n }\r\n \r\n if (expression.startsWith(\"EX\")) {\r\n this.leftExpression = expression.substring(2,expression.length());\r\n System.out.println(\"exp\"+leftExpression);\r\n return TypeSAT.EX;\r\n }\r\n \r\n if (expression.startsWith(\"EF\")) {\r\n this.leftExpression = expression.substring(2,expression.length());\r\n return TypeSAT.EF;\r\n }\r\n \r\n if (expression.startsWith(\"EG\")) {\r\n this.leftExpression = expression.substring(2,expression.length());\r\n return TypeSAT.EG;\r\n }\r\n \r\n if (expression.startsWith(\"AF\")) {\r\n this.leftExpression = expression.substring(2,expression.length());\r\n return TypeSAT.AF;\r\n }\r\n \r\n if (expression.startsWith(\"AG\")) {\r\n this.leftExpression = expression.substring(2,expression.length());\r\n return TypeSAT.AG;\r\n }\r\n \r\n return TypeSAT.Unknown;\r\n }", "public interface GoConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int integer_literal = 8;\n /** RegularExpression Id. */\n int floating_literal = 9;\n /** RegularExpression Id. */\n int boolean_literal = 10;\n /** RegularExpression Id. */\n int string_literal = 11;\n /** RegularExpression Id. */\n int numbers = 12;\n /** RegularExpression Id. */\n int valid_characters = 13;\n /** RegularExpression Id. */\n int double_quotes_in_string = 14;\n /** RegularExpression Id. */\n int back_slash = 15;\n /** RegularExpression Id. */\n int tabulations = 16;\n /** RegularExpression Id. */\n int addition = 17;\n /** RegularExpression Id. */\n int subtraction = 18;\n /** RegularExpression Id. */\n int multiplication = 19;\n /** RegularExpression Id. */\n int division = 20;\n /** RegularExpression Id. */\n int remainder = 21;\n /** RegularExpression Id. */\n int increment = 22;\n /** RegularExpression Id. */\n int decrement = 23;\n /** RegularExpression Id. */\n int equal = 24;\n /** RegularExpression Id. */\n int not_equal = 25;\n /** RegularExpression Id. */\n int greater_than = 26;\n /** RegularExpression Id. */\n int less_than = 27;\n /** RegularExpression Id. */\n int greater_than_or_equal = 28;\n /** RegularExpression Id. */\n int less_than_or_equal = 29;\n /** RegularExpression Id. */\n int bitwise_and = 30;\n /** RegularExpression Id. */\n int bitwise_inclusive_or = 31;\n /** RegularExpression Id. */\n int bitwise_exclusive_or = 32;\n /** RegularExpression Id. */\n int left_shift = 33;\n /** RegularExpression Id. */\n int right_shift = 34;\n /** RegularExpression Id. */\n int and = 35;\n /** RegularExpression Id. */\n int or = 36;\n /** RegularExpression Id. */\n int not = 37;\n /** RegularExpression Id. */\n int assignment = 38;\n /** RegularExpression Id. */\n int dynamic_assignment = 39;\n /** RegularExpression Id. */\n int addition_assignment = 40;\n /** RegularExpression Id. */\n int subtraction_assignment = 41;\n /** RegularExpression Id. */\n int multiplication_assignment = 42;\n /** RegularExpression Id. */\n int division_assignment = 43;\n /** RegularExpression Id. */\n int remainder_assignment = 44;\n /** RegularExpression Id. */\n int bitwise_and_assignment = 45;\n /** RegularExpression Id. */\n int bitwise_inclusive_or_assignment = 46;\n /** RegularExpression Id. */\n int bitwise_exclusive_or_assignment = 47;\n /** RegularExpression Id. */\n int left_shift_assignment = 48;\n /** RegularExpression Id. */\n int right_shift_assignment = 49;\n /** RegularExpression Id. */\n int opening_round_brackets = 50;\n /** RegularExpression Id. */\n int closing_round_brackets = 51;\n /** RegularExpression Id. */\n int opening_curly_brackets = 52;\n /** RegularExpression Id. */\n int closing_curly_brackets = 53;\n /** RegularExpression Id. */\n int opening_square_brackets = 54;\n /** RegularExpression Id. */\n int closing_square_brackets = 55;\n /** RegularExpression Id. */\n int semicolon = 56;\n /** RegularExpression Id. */\n int colon = 57;\n /** RegularExpression Id. */\n int dot = 58;\n /** RegularExpression Id. */\n int comma = 59;\n /** RegularExpression Id. */\n int double_quotes = 60;\n /** RegularExpression Id. */\n int quotes = 61;\n /** RegularExpression Id. */\n int rw_break = 62;\n /** RegularExpression Id. */\n int rw_default = 63;\n /** RegularExpression Id. */\n int rw_func = 64;\n /** RegularExpression Id. */\n int rw_interface = 65;\n /** RegularExpression Id. */\n int rw_select = 66;\n /** RegularExpression Id. */\n int rw_case = 67;\n /** RegularExpression Id. */\n int rw_defer = 68;\n /** RegularExpression Id. */\n int rw_go = 69;\n /** RegularExpression Id. */\n int rw_map = 70;\n /** RegularExpression Id. */\n int rw_struct = 71;\n /** RegularExpression Id. */\n int rw_chan = 72;\n /** RegularExpression Id. */\n int rw_else = 73;\n /** RegularExpression Id. */\n int rw_goto = 74;\n /** RegularExpression Id. */\n int rw_package = 75;\n /** RegularExpression Id. */\n int rw_switch = 76;\n /** RegularExpression Id. */\n int rw_const = 77;\n /** RegularExpression Id. */\n int rw_fallthrough = 78;\n /** RegularExpression Id. */\n int rw_if = 79;\n /** RegularExpression Id. */\n int rw_range = 80;\n /** RegularExpression Id. */\n int rw_type = 81;\n /** RegularExpression Id. */\n int rw_continue = 82;\n /** RegularExpression Id. */\n int rw_for = 83;\n /** RegularExpression Id. */\n int rw_import = 84;\n /** RegularExpression Id. */\n int rw_return = 85;\n /** RegularExpression Id. */\n int rw_var = 86;\n /** RegularExpression Id. */\n int dt_uint8 = 87;\n /** RegularExpression Id. */\n int dt_uint16 = 88;\n /** RegularExpression Id. */\n int dt_uint32 = 89;\n /** RegularExpression Id. */\n int dt_uint64 = 90;\n /** RegularExpression Id. */\n int dt_int8 = 91;\n /** RegularExpression Id. */\n int dt_int16 = 92;\n /** RegularExpression Id. */\n int dt_int32 = 93;\n /** RegularExpression Id. */\n int dt_int64 = 94;\n /** RegularExpression Id. */\n int dt_float32 = 95;\n /** RegularExpression Id. */\n int dt_float64 = 96;\n /** RegularExpression Id. */\n int dt_complex64 = 97;\n /** RegularExpression Id. */\n int dt_complex128 = 98;\n /** RegularExpression Id. */\n int dt_byte = 99;\n /** RegularExpression Id. */\n int dt_rune = 100;\n /** RegularExpression Id. */\n int dt_uint = 101;\n /** RegularExpression Id. */\n int dt_int = 102;\n /** RegularExpression Id. */\n int dt_uintptr = 103;\n /** RegularExpression Id. */\n int dt_string = 104;\n /** RegularExpression Id. */\n int dt_bool = 105;\n /** RegularExpression Id. */\n int main = 106;\n /** RegularExpression Id. */\n int library_fmt = 107;\n /** RegularExpression Id. */\n int rw_printf = 108;\n /** RegularExpression Id. */\n int rw_scanf = 109;\n /** RegularExpression Id. */\n int id = 110;\n /** RegularExpression Id. */\n int invalid_string = 111;\n /** RegularExpression Id. */\n int invalid_string_import = 112;\n /** RegularExpression Id. */\n int invalid_string_import_1 = 113;\n /** RegularExpression Id. */\n int invalid_string_import_2 = 114;\n /** RegularExpression Id. */\n int is_not_id = 115;\n /** RegularExpression Id. */\n int invalid_character = 116;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\r\\\"\",\n \"\\\"\\\\r\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"<integer_literal>\",\n \"<floating_literal>\",\n \"<boolean_literal>\",\n \"<string_literal>\",\n \"<numbers>\",\n \"<valid_characters>\",\n \"\\\"\\\\\\\\\\\\\\\"\\\"\",\n \"\\\"\\\\\\\\\\\"\",\n \"<tabulations>\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"++\\\"\",\n \"\\\"--\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\"<\\\"\",\n \"\\\">=\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"&\\\"\",\n \"\\\"|\\\"\",\n \"\\\"^\\\"\",\n \"\\\"<<\\\"\",\n \"\\\">>\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"!\\\"\",\n \"\\\"=\\\"\",\n \"\\\":=\\\"\",\n \"\\\"+=\\\"\",\n \"\\\"-=\\\"\",\n \"\\\"*=\\\"\",\n \"\\\"/=\\\"\",\n \"\\\"%=\\\"\",\n \"\\\"&=\\\"\",\n \"\\\"|=\\\"\",\n \"\\\"^=\\\"\",\n \"\\\"<<=\\\"\",\n \"\\\">>=\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\":\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"\\\"\\\\\\\"\\\"\",\n \"\\\"\\\\\\'\\\"\",\n \"\\\"break\\\"\",\n \"\\\"default\\\"\",\n \"\\\"func\\\"\",\n \"\\\"interface\\\"\",\n \"\\\"select\\\"\",\n \"\\\"case\\\"\",\n \"\\\"defer\\\"\",\n \"\\\"go\\\"\",\n \"\\\"map\\\"\",\n \"\\\"struct\\\"\",\n \"\\\"chan\\\"\",\n \"\\\"else\\\"\",\n \"\\\"goto\\\"\",\n \"\\\"package\\\"\",\n \"\\\"switch\\\"\",\n \"\\\"const\\\"\",\n \"\\\"fallthrough\\\"\",\n \"\\\"if\\\"\",\n \"\\\"range\\\"\",\n \"\\\"type\\\"\",\n \"\\\"continue\\\"\",\n \"\\\"for\\\"\",\n \"\\\"import\\\"\",\n \"\\\"return\\\"\",\n \"\\\"var\\\"\",\n \"\\\"uint8\\\"\",\n \"\\\"uint16\\\"\",\n \"\\\"uint32\\\"\",\n \"\\\"uint64\\\"\",\n \"\\\"int8\\\"\",\n \"\\\"int16\\\"\",\n \"\\\"int32\\\"\",\n \"\\\"int64\\\"\",\n \"\\\"float32\\\"\",\n \"\\\"float64\\\"\",\n \"\\\"complex64\\\"\",\n \"\\\"complex128\\\"\",\n \"\\\"byte\\\"\",\n \"\\\"rune\\\"\",\n \"\\\"uint\\\"\",\n \"\\\"int\\\"\",\n \"\\\"uintptr\\\"\",\n \"\\\"string\\\"\",\n \"\\\"bool\\\"\",\n \"\\\"main\\\"\",\n \"\\\"fmt\\\"\",\n \"\\\"Printf\\\"\",\n \"\\\"Scanf\\\"\",\n \"<id>\",\n \"<invalid_string>\",\n \"<invalid_string_import>\",\n \"<invalid_string_import_1>\",\n \"<invalid_string_import_2>\",\n \"<is_not_id>\",\n \"<invalid_character>\",\n };\n\n}", "@Override\n public String getParsedGrammar() {\n return \"<arithmetic_expression> -> id\\n\";\n }", "@Test\n public void ensureCompileTreeWorksAsIntended() throws Exception {\n String formula = \"#euro{2$+25$}\";\n CommonTree ast = new MonetaryExpressionCompiler().compileTree(formula);\n boolean verdict = ast.toStringTree().equals(\"(euro (+ ($ 2) ($ 25)))\");\n assertEquals(true, verdict);\n }", "@Test\n\tpublic void typeCheckTest(){\n\t\tSystem.out.println(\"kenta\");\n\t\tSemanticActions actions = new SemanticActions();\n\t\tVariableEntry idInt = new VariableEntry(\"v1\", TokenType.INTEGER);\n\t\tVariableEntry idReal = new VariableEntry(\"v2\", TokenType.REAL);\n\t\tVariableEntry idInt2 = new VariableEntry(\"v3\", TokenType.INTEGER);\n\t\tVariableEntry idReal2 = new VariableEntry(\"v4\", TokenType.REAL);\n\t\tVariableEntry error = new VariableEntry(\"v5\", TokenType.ADDOP);\n\t\tassertTrue(actions.typeCheck(idInt, idInt2) == 0);\n\t\tassertTrue(actions.typeCheck(idReal, idReal2) == 1);\n\t\tassertTrue(actions.typeCheck(idReal, idInt2) == 2);\n\t\tassertTrue(actions.typeCheck(idInt, idReal) == 3);\n\t\tassertTrue(actions.typeCheck(idReal, error) == 4);\n\t\tassertTrue(actions.typeCheck(error, idInt) == 4);\n\t}", "@Override\n\tpublic int evalTree() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\t\t\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\n\t\t\treturn num;\n\t\t}\n\n\t\tcatch (NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\tif(TIMES_SIGN.equals(this.getValue()))\n\t\t\t\treturn left.evalTree() * right.evalTree();\n\t\t\telse\n\t\t\t\treturn left.evalTree() + right.evalTree();\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test001() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.dollar();\n xPathLexer0.not();\n xPathLexer0.nextToken();\n xPathLexer0.leftParen();\n xPathLexer0.whitespace();\n xPathLexer0.plus();\n Token token0 = xPathLexer0.or();\n assertNull(token0);\n }", "public ParseTreeNode generateParseTree(ContextFreeGrammar cfg, Word w) {\n int n = w.length();\r\n int exactDervOfWord = (2*n) - 1;\r\n List<Rule> rules = new ArrayList<Rule>();\r\n rules = cfg.getRules();\r\n Variable startVariable = cfg.getStartVariable();\r\n int numDerivations = 0;\r\n List<List<Word>> generalList = new ArrayList<List<Word>>();\r\n List<List<Word>> varList = new ArrayList<List<Word>>();\r\n\r\n\r\n // 2. Lists for storing derivation\r\n // make exact number of list for words to be stored at each derivation \r\n makeLists(exactDervOfWord, generalList);\r\n\r\n // 3. Derivation from Start Variable\r\n for (Rule rule : rules) {\r\n if (rule.getVariable().equals(startVariable)) {\r\n generalList.get(numDerivations).add(rule.getExpansion());\r\n }\r\n }\r\n numDerivations += 1;\r\n\r\n // 4. \r\n while (numDerivations < exactDervOfWord-n) {\r\n if (numDerivations == 1){\r\n // Stores the var only from the start expansion into varList\r\n List<Word> listOfVars = new ArrayList<Word>();\r\n for (Word word : generalList.get(numDerivations-1)){\r\n boolean varOnly= true;\r\n for (int i =0; i < word.length(); i++){\r\n if(word.get(i).isTerminal()){\r\n varOnly = false;\r\n }\r\n }\r\n if (varOnly){\r\n listOfVars.add(word);\r\n }\r\n }\r\n varList.add(listOfVars);\r\n numDerivations += 1; \r\n }\r\n if (numDerivations > 1 && numDerivations - 1 < exactDervOfWord-n ) {\r\n List<List<List<Word>>> listOfExpPerDerviation = new ArrayList<List<List<Word>>>();\r\n for (Word word : varList.get(numDerivations-2)){\r\n List<List<Word>> listOfExPerWord = new ArrayList<List<Word>>();\r\n for(int i= 0; i <word.length(); i++){\r\n for(Rule rule :rules){\r\n List<Word> tempListofExpan = new ArrayList<Word>();\r\n if(rule.getVariable().equals(word.get(i))){\r\n if (!rule.getExpansion().isTerminal()){\r\n tempListofExpan.add(word);\r\n tempListofExpan.add(word.replace(i, rule.getExpansion()));\r\n listOfExPerWord.add(tempListofExpan);\r\n }\r\n }\r\n }\r\n }\r\n listOfExpPerDerviation.add(listOfExPerWord);\r\n }\r\n numDerivations += 1;\r\n }\r\n }\r\n\r\n return null;\r\n return null;\r\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\") (\");\n Token token0 = xPathLexer0.equals();\n xPathLexer0.setPreviousToken(token0);\n assertEquals(21, token0.getTokenType());\n assertEquals(\")\", token0.getTokenText());\n \n Token token1 = xPathLexer0.identifierOrOperatorName();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"\", token1.getTokenText());\n }", "@Test(timeout = 4000)\n public void test074() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\") (\");\n Token token0 = xPathLexer0.notEquals();\n xPathLexer0.setPreviousToken(token0);\n assertEquals(\") \", token0.getTokenText());\n assertEquals(22, token0.getTokenType());\n \n Token token1 = xPathLexer0.identifierOrOperatorName();\n assertEquals(15, token1.getTokenType());\n assertEquals(\"\", token1.getTokenText());\n }", "@Test\n public void sunnyday_string(){\n SetupMocks.setup();\n\n List<Token> tokens= new ArrayList<>();\n\n tokens.add(new Token(Token.TSTRG,1,1,null));\n\n\n tokens.add(new Token(Token.TILIT,1,1,null));\n\n Parser parser = new Parser(tokens);\n\n NPrintItemNode nPrintItemNode = new NPrintItemNode();\n nPrintItemNode.setnExprNode(NExprNode.INSTANCE());\n\n TreeNode printitem = nPrintItemNode.make(parser);\n\n assertEquals(TreeNode.NSTRG, printitem.getValue());\n\n }", "public interface ParserASTConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int KW_CLASS = 8;\n /** RegularExpression Id. */\n int KW_PUBLIC = 9;\n /** RegularExpression Id. */\n int KW_STATIC = 10;\n /** RegularExpression Id. */\n int KW_VOID = 11;\n /** RegularExpression Id. */\n int KW_MAIN = 12;\n /** RegularExpression Id. */\n int KW_STRING = 13;\n /** RegularExpression Id. */\n int KW_EXTENDS = 14;\n /** RegularExpression Id. */\n int KW_RETURN = 15;\n /** RegularExpression Id. */\n int KW_INT = 16;\n /** RegularExpression Id. */\n int KW_BOOLEAN = 17;\n /** RegularExpression Id. */\n int KW_IF = 18;\n /** RegularExpression Id. */\n int KW_ELSE = 19;\n /** RegularExpression Id. */\n int KW_WHILE = 20;\n /** RegularExpression Id. */\n int KW_TRUE = 21;\n /** RegularExpression Id. */\n int KW_FALSE = 22;\n /** RegularExpression Id. */\n int KW_THIS = 23;\n /** RegularExpression Id. */\n int KW_NEW = 24;\n /** RegularExpression Id. */\n int KW_PRINT = 25;\n /** RegularExpression Id. */\n int SYM_LBRACE = 26;\n /** RegularExpression Id. */\n int SYM_RBRACE = 27;\n /** RegularExpression Id. */\n int SYM_LPAREN = 28;\n /** RegularExpression Id. */\n int SYM_RPAREN = 29;\n /** RegularExpression Id. */\n int SYM_LSQPAREN = 30;\n /** RegularExpression Id. */\n int SYM_RSQPAREN = 31;\n /** RegularExpression Id. */\n int SYM_SEMICOLON = 32;\n /** RegularExpression Id. */\n int SYM_EQUAL = 33;\n /** RegularExpression Id. */\n int SYM_AMPAMP = 34;\n /** RegularExpression Id. */\n int SYM_BARBAR = 35;\n /** RegularExpression Id. */\n int SYM_LESS = 36;\n /** RegularExpression Id. */\n int SYM_LESSEQUAL = 37;\n /** RegularExpression Id. */\n int SYM_EQUALEQUAL = 38;\n /** RegularExpression Id. */\n int SYM_EXCLEQUAL = 39;\n /** RegularExpression Id. */\n int SYM_MORE = 40;\n /** RegularExpression Id. */\n int SYM_MOREEQUAL = 41;\n /** RegularExpression Id. */\n int SYM_PLUS = 42;\n /** RegularExpression Id. */\n int SYM_MINUS = 43;\n /** RegularExpression Id. */\n int SYM_STAR = 44;\n /** RegularExpression Id. */\n int SYM_SLASH = 45;\n /** RegularExpression Id. */\n int SYM_PERCENT = 46;\n /** RegularExpression Id. */\n int SYM_EXCL = 47;\n /** RegularExpression Id. */\n int SYM_DOT = 48;\n /** RegularExpression Id. */\n int SYM_COMMA = 49;\n /** RegularExpression Id. */\n int IDENTIFIER = 50;\n /** RegularExpression Id. */\n int INT_LITERAL = 51;\n\n /** Lexical state. */\n int DEFAULT = 0;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"\\\" \\\"\",\n \"\\\"\\\\t\\\"\",\n \"\\\"\\\\n\\\"\",\n \"\\\"\\\\f\\\"\",\n \"\\\"\\\\r\\\"\",\n \"<token of kind 6>\",\n \"<token of kind 7>\",\n \"\\\"class\\\"\",\n \"\\\"public\\\"\",\n \"\\\"static\\\"\",\n \"\\\"void\\\"\",\n \"\\\"main\\\"\",\n \"\\\"String\\\"\",\n \"\\\"extends\\\"\",\n \"\\\"return\\\"\",\n \"\\\"int\\\"\",\n \"\\\"boolean\\\"\",\n \"\\\"if\\\"\",\n \"\\\"else\\\"\",\n \"\\\"while\\\"\",\n \"\\\"true\\\"\",\n \"\\\"false\\\"\",\n \"\\\"this\\\"\",\n \"\\\"new\\\"\",\n \"\\\"System.out.println\\\"\",\n \"\\\"{\\\"\",\n \"\\\"}\\\"\",\n \"\\\"(\\\"\",\n \"\\\")\\\"\",\n \"\\\"[\\\"\",\n \"\\\"]\\\"\",\n \"\\\";\\\"\",\n \"\\\"=\\\"\",\n \"\\\"&&\\\"\",\n \"\\\"||\\\"\",\n \"\\\"<\\\"\",\n \"\\\"<=\\\"\",\n \"\\\"==\\\"\",\n \"\\\"!=\\\"\",\n \"\\\">\\\"\",\n \"\\\">=\\\"\",\n \"\\\"+\\\"\",\n \"\\\"-\\\"\",\n \"\\\"*\\\"\",\n \"\\\"/\\\"\",\n \"\\\"%\\\"\",\n \"\\\"!\\\"\",\n \"\\\".\\\"\",\n \"\\\",\\\"\",\n \"<IDENTIFIER>\",\n \"<INT_LITERAL>\",\n };\n\n}", "public void testMETAL1() throws Exception {\n\t\tObject retval = execLexer(\"METAL\", 128, \"or\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"METAL\", expecting, actual);\n\t}", "public Object visitAdditiveExpression(GNode n) {\n Object a, b, result;\n String op;\n \n nonboolean = true;\n \n dostring = true;\n \n a = dispatch(n.getGeneric(0));\n b = dispatch(n.getGeneric(2));\n op = n.getString(1);\n \n dostring = false;\n \n if (a instanceof Long && b instanceof Long) {\n if (op.equals(\"+\")) {\n result = (Long) a + (Long) b;\n }\n else if (op.equals(\"-\")) {\n result = (Long) a - (Long) b;\n }\n else {\n result = \"\";\n }\n }\n else {\n result = parens(a) + \" \" + op + \" \" + parens(b);\n }\n \n return result;\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(73);\n simpleNode0.setIdentifier(\"`n\\tw8u)p!WbK\");\n StringWriter stringWriter0 = new StringWriter(51);\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"<=\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, (String) null);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \">=\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, false);\n simpleNode0.setIdentifier(\"]\\\"\");\n simpleNode0.setIdentifier(\"<=\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n StringWriter stringWriter1 = new StringWriter();\n simpleNode0.setIdentifier(\"UUC^1taN`<+z\");\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.toString();\n JavaParser javaParser0 = new JavaParser(\"]\\\"\");\n simpleNode0.dump(\"ConditionalExpression\", stringWriter0);\n assertEquals(\"<Block>\\n <identifier>`n\\tw8u)p!WbK</identifier>\\n <identifier>]\\\"</identifier>\\n <identifier>*le</identifier>\\n <identifier>UUC^1taN`<+z</identifier>\\n</Block>\\n\", stringWriter0.toString());\n }", "public static int expression()\r\n {\r\n //get the start state of this term\r\n int r,t1,f1;\r\n t1=r=term();\r\n\r\n //if there is no more input, we are done\r\n if(index>expression.length()-1)\r\n {\r\n return r;\r\n }\r\n\r\n //if this is concatenation\r\n if(expression.charAt(index)=='.'||isVocab(expression.charAt(index))||expression.charAt(index)=='\\\\'\r\n ||expression.charAt(index)=='['||expression.charAt(index)=='(')\r\n {\r\n //get the start state of this expression and\r\n //update next1 and next2\r\n int t2,cur;\r\n cur=state-1;\r\n t2=expression();\r\n if(stateList.get(cur).getNext1()==stateList.get(cur).getNext2())\r\n {\r\n stateList.get(cur).setNext1(t2);\r\n }\r\n stateList.get(cur).setNext2(t2);\r\n\r\n }\r\n\r\n //if there is no more input, we are done\r\n if(index>=expression.length())\r\n {\r\n return r;\r\n }\r\n\r\n //if this is alternation\r\n if(expression.charAt(index)=='|')\r\n {\r\n //if there is nothing after '|', it is a invalid expression\r\n index++;\r\n if(index>expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n //create a branch state,set the nex1 of the branch state to the term\r\n //so a|b and a|b|c both work\r\n int t2;\r\n f1=state-1;\r\n\r\n state st=new state(state,\"BR\",t1,-1);\r\n stateList.add(st);\r\n r=state;\r\n state++;\r\n\r\n //get the start state of this expression\r\n t2=expression();\r\n\r\n //update the branch state's next2 to the start state of the expression\r\n stateList.get(f1+1).setNext2(t2);\r\n\r\n //update term's next1 and next2\r\n if(stateList.get(f1).getNext1()==stateList.get(f1).getNext2())\r\n {\r\n stateList.get(f1).setNext1(state);\r\n }\r\n stateList.get(f1).setNext2(state);\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n return r;\r\n }", "private Digraph buildEpsilonTransitionsDigraph() {\n Digraph G = new Digraph(M + 1);\n Stack<Integer> ops = new Stack<Integer>();\n for (int i = 0; i < M; i++) {\n int lp = i; // lp - left parenthesis\n \n // left ( or |\n if (re[i] == '(' || re[i] == '|')\n ops.add(i);\n \n // right )\n else if (re[i] == ')') {\n int or = ops.pop();\n if (re[or] == '|') {\n lp = ops.pop();\n G.addEdge(lp, or + 1);\n G.addEdge(or, i);\n } else // re[or] == (\n lp = or; \n }\n \n // closure in ahead char\n if (i < M - 1 && re[i + 1] == '*') {\n G.addEdge(lp, i + 1);\n G.addEdge(i + 1, lp);\n }\n \n // add all the epsilon transition to the next states\n if (re[i] == '(' || re[i] == '*' || re[i] == ')')\n G.addEdge(i, i + 1);\n }\n return G;\n }", "public static void parseNatAsgn() {\n if (currToken.tokenType != Token.ID) {\n handleError(\"ID\");\n }\n else if( symbols.get(currToken.tokenString) != \"NAT\"){\n throw new Error(\"NAT type expected\");\n }\n else{\n sb.append(currToken.tokenString);\n getNextToken();\n if (currToken.tokenType != Token.ASSIGN) {\n handleError(\"ASSIGN\");\n }\n else{\n sb.append(\" = \");\n getNextToken();\n parseNatExp();\n }\n }\n }", "private void getToken(){\n\t\tboolean primaryFirst=false;\t\t\t// determines whether the current token is a primary (true) or an operator (false)\n\t\tboolean primaryIsReal=false;\t\t// determines whether the current primary is a numerical number (true) or a name (false)\n\t\tboolean checkedPrimaryType=false;\t// determine whether the primary type has already been checked (true) or not (false)\n\t\t\n\t\twhile(true){\n\t\t\tcurr_pos++;\n\t\t\tif(curr_pos>input.length()-1){\n\t\t\t\tcurr_tok=token_value.END;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(\n\t\t\t\tinput.charAt(curr_pos)=='+' ||\n\t\t\t\tinput.charAt(curr_pos)=='-' ||\n\t\t\t\tinput.charAt(curr_pos)=='*'\t||\t\n\t\t\t\tinput.charAt(curr_pos)=='/'\t||\n\t\t\t\tinput.charAt(curr_pos)=='('\t||\n\t\t\t\tinput.charAt(curr_pos)==')'\t||\n\t\t\t\tinput.charAt(curr_pos)=='^'\t||\n\t\t\t\tinput.charAt(curr_pos)=='_'\t||\n\t\t\t\tinput.charAt(curr_pos)=='='\n\t\t\t){\n\t\t\t\tif(!primaryFirst){\n\t\t\t\t\tfor(int i=0; i<charToEnum.length; i++){\n\t\t\t\t\t\tif(input.charAt(curr_pos) == charToEnum[i]){\n\t\t\t\t\t\t\tcurr_tok=token_value.values()[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcurr_pos--;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(!checkedPrimaryType){\n\t\t\t\t\tcheckedPrimaryType=true;\n\t\t\t\t\tint num = (int)input.charAt(curr_pos);\n\t\t\t\t\tif(num > 47 && num < 58){ // number case\n\t\t\t\t\t\tprimaryIsReal=true;\n\t\t\t\t\t}\n\t\t\t\t\tstring_value=\"\";\n\t\t\t\t}\n\t\t\t\tprimaryFirst=true;\n\t\t\t\tstring_value+=input.charAt(curr_pos);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(primaryFirst){\n\t\t\tif(primaryIsReal){\n\t\t\t\tnumber_value = Double.parseDouble(string_value);\n\t\t\t\tcurr_tok=token_value.NUMBER;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcurr_tok=token_value.NAME;\n\t\t\t}\n\t\t}\n\t}", "public GrammarRule(String left, ArrayList<String> rhs, boolean isLexical){\n\t\tthis.lhs = left;\n\t\tthis.rhs = rhs;\n\t\t\n\t\tif( isLexical ){\n\t\t\tif( rhs.size() != 1 ){\n\t\t\t\tthrow new RuntimeException(\"Tried to make a lexical PCFG with multiple children\");\n\t\t\t}\n\t\t\t\n\t\t\tlexical = true;\n\t\t}\n\t}", "public String getKind(State finalState, String lexeme) {\r\n switch (finalState) {\r\n case ST_ZERO:\r\n kind=\"IntegerLiteral\";\r\n break;\r\n case ST_NUM:\r\n kind=\"IntegerLiteral\";\r\n //check range for the special case\r\n if(_isLastTokenMinus){\r\n try {\r\n long val=Long.parseLong(lexeme);\r\n if(val <= 2147483648l){\r\n kind=\"IntegerLiteral\";\r\n } else {\r\n kind=\"ERROR\";\r\n System.err.println(\"Number out of range.\");\r\n } // else\r\n } catch (NumberFormatException e){\r\n kind=\"ERROR\";\r\n } // catch\r\n } else {\r\n try {\r\n Integer.parseInt(lexeme);\r\n } catch (NumberFormatException e){ \r\n // out of range\r\n kind=\"ERROR\";\r\n System.err.println(\"Number out of range.\");\r\n } // catch\r\n } // else\r\n break;\r\n case ST_BOF:\r\n kind=\"BOF\";\r\n break;\r\n case ST_EOF:\r\n kind=\"EOF\";\r\n break;\r\n case ST_COMMA:\r\n kind=\"COMMA\";\r\n break;\r\n case ST_SEMICOLON:\r\n kind=\"SEMICOLON\";\r\n break;\r\n case ST_COLON:\r\n kind=\"COLON\";\r\n break;\r\n case ST_LPAREN:\r\n kind=\"LPAREN\";\r\n break;\r\n case ST_RPAREN:\r\n kind=\"RPAREN\";\r\n break;\r\n case ST_LBRACK:\r\n kind=\"LBRACK\";\r\n break;\r\n case ST_RBRACK:\r\n kind=\"RBRACK\";\r\n break;\r\n case ST_LBRACE:\r\n kind=\"LBRACE\";\r\n break;\r\n case ST_RBRACE:\r\n kind=\"RBRACE\";\r\n break;\r\n case ST_DOT:\r\n kind=\"DOT\";\r\n break;\r\n case ST_MINUS:\r\n kind=\"MINUS\";\r\n break;\r\n case ST_PLUS:\r\n kind=\"PLUS\";\r\n break;\r\n case ST_STAR:\r\n kind=\"STAR\";\r\n break;\r\n case ST_PCT:\r\n kind=\"PCT\";\r\n break;\r\n case ST_SLASH:\r\n kind=\"SLASH\";\r\n break;\r\n case ST_EXCLAM:\r\n kind=\"EXCLAM\";\r\n break;\r\n case ST_NE:\r\n kind=\"NE\";\r\n break;\r\n case ST_BECOMES:\r\n kind=\"BECOMES\";\r\n break;\r\n case ST_EQUALS:\r\n kind=\"EQUALS\";\r\n break;\r\n case ST_LT:\r\n kind=\"LT\";\r\n break;\r\n case ST_LE:\r\n kind=\"LE\";\r\n break;\r\n case ST_GT:\r\n kind=\"GT\";\r\n break;\r\n case ST_GE:\r\n kind=\"GE\";\r\n break;\r\n case ST_AMP:\r\n kind=\"AMP\";\r\n break;\r\n case ST_AMPAMP:\r\n kind=\"AMPAMP\";\r\n break;\r\n case ST_OR:\r\n kind=\"OR\";\r\n break;\r\n case ST_OROR:\r\n kind=\"OROR\";\r\n break;\r\n case ST_CHARLIT:\r\n kind=\"CharacterLiteral\";\r\n break;\r\n case ST_STRINGLIT:\r\n kind=\"StringLiteral\";\r\n break;\r\n default:\r\n break;\r\n } // switch\r\n if(finalState == State.ST_ID) {\r\n if (lexeme.equals(\"extends\")){\r\n kind=\"EXTENDS\";\r\n } else if (lexeme.equals(\"implements\")){\r\n kind=\"IMPLEMENTS\";\r\n } else if (lexeme.equals(\"static\")){\r\n kind=\"STATIC\";\r\n } else if(lexeme.equals(\"import\")){\r\n kind=\"IMPORT\";\r\n } else if(lexeme.equals(\"package\")){\r\n kind=\"PACKAGE\";\r\n } else if(lexeme.equals(\"public\")){\r\n kind=\"PUBLIC\";\r\n } else if(lexeme.equals(\"interface\")){\r\n kind=\"INTERFACE\";\r\n } else if(lexeme.equals(\"protected\")){\r\n kind=\"PROTECTED\";\r\n } else if(lexeme.equals(\"abstract\")){\r\n kind=\"ABSTRACT\";\r\n } else if(lexeme.equals(\"native\")){\r\n kind=\"NATIVE\";\r\n } else if(lexeme.equals(\"while\")){\r\n kind=\"WHILE\";\r\n } else if(lexeme.equals(\"for\")){\r\n kind=\"FOR\";\r\n } else if(lexeme.equals(\"boolean\")){\r\n kind=\"BOOLEAN\";\r\n } else if(lexeme.equals(\"int\")){\r\n kind=\"INT\";\r\n } else if(lexeme.equals(\"char\")){\r\n kind=\"CHAR\";\r\n } else if(lexeme.equals(\"byte\")){\r\n kind=\"BYTE\";\r\n } else if(lexeme.equals(\"short\")){\r\n kind=\"SHORT\";\r\n } else if(lexeme.equals(\"null\")){\r\n kind=\"NULL\";\r\n } else if(lexeme.equals(\"this\")){\r\n kind=\"THIS\";\r\n } else if(lexeme.equals(\"true\") || lexeme.equals(\"false\")){\r\n kind=\"BooleanLiteral\";\r\n } else if(lexeme.equals(\"instanceof\")){\r\n kind=\"INSTANCEOF\";\r\n } else if(lexeme.equals(\"class\")){\r\n kind=\"CLASS\";\r\n } else if(lexeme.equals(\"if\")){\r\n kind=\"IF\";\r\n } else if(lexeme.equals(\"else\")){\r\n kind=\"ELSE\";\r\n } else if(lexeme.equals(\"final\")){\r\n kind=\"FINAL\";\r\n } else if(lexeme.equals(\"new\")){\r\n kind=\"NEW\";\r\n } else if(lexeme.equals(\"return\")){\r\n kind=\"RETURN\";\r\n } else if(lexeme.equals(\"void\")){\r\n kind=\"VOID\";\r\n } else if(!Arrays.asList(_RESERVED_KEYWORDS).contains(lexeme)){\r\n kind=\"ID\";\r\n } // else\r\n } // if\r\n if(kind.equals(\"ERROR\")){\r\n printErrToken();\r\n } // if\r\n\r\n setLastTokenMinus(kind.equals(\"MINUS\"));\r\n return kind;\r\n }", "public Grammar(List<String> rules) {\r\n if (rules == null || rules.isEmpty()) {\r\n throw new IllegalArgumentException();\r\n }\r\n // initialize map for BNF rules.\r\n this.bnfRuleMap = new TreeMap<String, List<String>>();\r\n this.num = new Random();\r\n // process each BNF rule into the map.\r\n for (int i = 0; i < rules.size(); i++) {\r\n String rule = rules.get(i);\r\n // Separate the non-terminal from terminal.\r\n String[] pieces = rule.split(\"::=\");\r\n String nonTerminal = pieces[0].trim();\r\n // Separate different terminals.\r\n String[] terminals = pieces[1].split(\"\\\\|\");\r\n List<String> valueTerminals = new ArrayList<String>();\r\n valueTerminals = Arrays.asList(terminals);\r\n if (!this.bnfRuleMap.containsKey(nonTerminal)) {\r\n this.bnfRuleMap.put(nonTerminal, new ArrayList<String>());\r\n }\r\n this.bnfRuleMap.get(nonTerminal).addAll(valueTerminals);\r\n }\r\n }", "private String S() throws SyntaxException, ParserException {\n\t\tswitch (current) {\n\t\t\tcase 'a':\n\t\t\tcase 'b':\n\t\t\tcase 'c':\n\t\t\tcase '(':\n\t\t\t\t// S -> ERS\n\t\t\t\tString er = E();\n\t\t\t\tint r = R();\n\t\t\t\tString e=\"\";\n\t\t\t\tfor (int i=0; i<r; i++){\n\t\t\t\t\te += er;\n\t\t\t\t}\n\t\t\t\te+= S();\n\t\t\t\treturn (e);\n\t\t\tcase ')':\n\t\t\tcase END_MARKER:\n\t\t\t\t// S -> epsilon\n\t\t\t\treturn \"\";\n\t\t\tdefault:\n\t\t\t\tthrow new SyntaxException(ErrorType.NO_RULE,current);\n\t\t}\n\t}", "@Test\n public void defaultOperatorsEvaluteTrueTest() throws Exception {\n\n assertThat(getNode(\"1 == 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 != 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <> 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 < 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 > 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"2 >= 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 2\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1 <= 1\", \"expr\").render(null), is((Object)true));\n\n // negative numbers\n assertThat(getNode(\"1 > -1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1 < 1\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"1.0 > -1.0\", \"expr\").render(null), is((Object)true));\n assertThat(getNode(\"-1.0 < 1.0\", \"expr\").render(null), is((Object)true));\n }", "@Test\n\t\tpublic void testEmpty() throws LexicalException, SyntaxException {\n\t\t\tString input = \"\"; //The input is the empty string. \n\t\t\tthrown.expect(SyntaxException.class);\n\t\t\tPLPParser parser = makeParser(input);\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tProgram p = parser.parse();\n\t\t}", "private Term parseAdd(final boolean required) throws ParseException {\n Term t1 = parseMul(required);\n while (t1 != null) {\n int tt = _tokenizer.next();\n if (tt == '+') {\n Term t2 = parseMul(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Add(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Add(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Add(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'+'\");\n }\n } else if (tt == '-') {\n Term t2 = parseMul(true);\n if (t1.isD() && t2.isN() || t1.isN() && t2.isD()) {\n t1 = new Term.Sub(Term.TYPE_D, t1, t2);\n } else if (t1.isI() && t2.isI()) {\n t1 = new Term.Sub(Term.TYPE_I, t1, t2);\n } else if (!isTypeChecking()) {\n t1 = new Term.Sub(t1.isD() || t2.isD() ? Term.TYPE_D : Term.TYPE_I, t1, t2);\n } else {\n reportTypeErrorN2(\"'-'\");\n }\n } else {\n _tokenizer.pushBack();\n break;\n }\n }\n return t1;\n }", "public Grammar(CFSG<? extends Number> grammar) {\n\t\tthis(grammar.lexRules, grammar.internalRules);\n\t\tlogFile = Parameters.logFile;\n\t}", "public AdvancedCFG(String constructor){\n super(constructor);\n }", "public Grammar()\n {\n this.rules = new ArrayList<Rule>();\n }", "public String CheckInputValidation(String e ) {\r\n\t\t//Check division by zero\r\n\t\tfor(int i=0;i<e.length();i++) {\r\n\t\t\tif(e.charAt(i)== '/') {\r\n\t\t\t\tif(e.charAt(i+1)=='0' && i+1 != e.length()-1) {\r\n\t\t\t\t\tthrow new RuntimeException(\"You can't Divide by zero!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Check incomplete parentheses\r\n\t Stack st=new Stack(); //stack is used to make sure that the parentheses are complete\r\n\t for(int i =0;i<e.length();i++) {\r\n\t \tif(e.charAt(i)=='(') {\r\n\t \t\tst.push('(');\r\n\t \t}\r\n\t \tif(e.charAt(i)==')') {\r\n\t \t\tif(st.isEmpty()) {\r\n\t \t\t\tthrow new RuntimeException(\"Invalid Input \");\r\n\t \t\t}\r\n\t \t\telse if((char)st.pop()=='('){\r\n\t \t\t}else {\r\n\t \t\t\tthrow new RuntimeException(\"Invalid Input\");\r\n\t \t\t}\r\n\t \t}\r\n\t }\r\n\t if(!(st.isEmpty())) {\r\n\t\t\tthrow new RuntimeException(\"Invalid Input\");\r\n\t }\r\n\t \r\n\t //Check Special Characters existance .\r\n\t for(int i =0 ;i<e.length();i++) {\r\n\t \tchar n= e.charAt(i);\r\n\t \tif(Character.isDigit(n)||Character.isLetter(n)||e.charAt(i)=='+'||e.charAt(i)=='-'||e.charAt(i)=='*'||e.charAt(i)=='/'||e.charAt(i)==')'||e.charAt(i)=='(') {\r\n\t \t}else {\r\n\t \t\tthrow new RuntimeException(\"Invalid Input\");\r\n\t \t}\r\n\t }\r\n\t //Check repeated operators\r\n\t int i =0;\r\n\t int n = e.length();\r\n\t for(int j =0 ;j<n;j++) {\r\n\t\t if(e.charAt(j)=='+'||e.charAt(j)=='*'||e.charAt(j)=='-'||e.charAt(j)=='/') {\r\n\t\t \twhile(++j != n && (e.charAt(j)=='+'||e.charAt(j)=='/'||e.charAt(j)=='*'))\r\n\t\t \t\ti++;\r\n\t\t \t}}\r\n\t if(i>0) {\r\n \t\tthrow new RuntimeException(\"Invalid Input\");\r\n\t }\r\n\t if(e.length()==0 ) {\r\n\t \tthrow new RuntimeException(\"Invalid Input\");\r\n\t }\r\n\t //Check Empty parentheses \r\n\t for(int j=0;j<e.length();j++) {\r\n\t \tif(j+1 != e.length() && e.charAt(j)=='('&&e.charAt(j+1)==')') {\r\n\t \t\tthrow new RuntimeException(\"Invalid Input\");\r\n\t \t}\r\n\t }\r\n\t\treturn e ;\r\n\t}", "@Override\n public void outPlusExp(PlusExp node)\n {\n Type lexpType = this.mCurrentST.getExpType(node.getLExp());\n Type rexpType = this.mCurrentST.getExpType(node.getRExp());\n mPrintWriter.println(\"#Addddddddddddding\");\n Label l1 = new Label();\n Label l0 = new Label();\n Label l2 = new Label();\n Label l3 = new Label();\n //# Load constant int 1\n if(lexpType == Type.BYTE && rexpType == Type.INT){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Load constant int 0\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //mPrintWriter.println(# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //mPrintWriter.println(# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n\n // mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.BYTE && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //# Casting int to byte by popping\n //# 2 bytes off stack and only pushing low order bits\n //# back on. Low order bits are on top of stack.\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r18\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r24\");\n mPrintWriter.println(\"brlt \" + l0);\n mPrintWriter.println(\"ldi r25, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r25, hi8(-1)\");\n mPrintWriter.println( l1 + \":\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt \" + l2);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l3);\n mPrintWriter.println(l2 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l3 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else if(lexpType == Type.INT && rexpType == Type.BYTE){\n /*mPrintWriter.println(\"ldi r24,lo8(\"+node.getLExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getLExp().value+\")\");\n //mPrintWriter.println(# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Casting int to byte by popping);\n //mPrintWriter.println(# 2 bytes off stack and only pushing low order bits);\n //mPrintWriter.println(# back on. Low order bits are on top of stack.);\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n mPrintWriter.println(\"push r24\");\n //mPrintWriter.println(# Load constant int 0);\n mPrintWriter.println(\"ldi r24,lo8(\"+node.getRExp().value+\")\");\n mPrintWriter.println(\"ldi r25,hi8(\"+node.getRExp().value+\")\");\n //# push two byte expression onto stack);\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");*/\n //# load a two byte expression off stack);\n mPrintWriter.println(\"pop r18\");\n //mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n //# promoting a byte to an int\n mPrintWriter.println(\"tst r18\");\n mPrintWriter.println(\"brlt\" + l0);\n mPrintWriter.println(\"ldi r19, 0\");\n mPrintWriter.println(\"jmp \" + l1);\n mPrintWriter.println(l0 + \":\");\n mPrintWriter.println(\"ldi r19, hi8(-1)\");\n mPrintWriter.println(l1 + \":\");\n\n //mPrintWriter.println(# Do add operation\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n else{\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r19\");\n //# load a one byte expression off stack\n mPrintWriter.println(\"pop r24\");\n mPrintWriter.println(\"pop r25\");\n\n mPrintWriter.println(\"add r24, r18\");\n mPrintWriter.println(\"adc r25, r19\");\n //mPrintWriter.println(# push two byte expression onto stack\n mPrintWriter.println(\"push r25\");\n mPrintWriter.println(\"push r24\");\n }\n }", "@Override\r\n\tpublic String infixToPostfix(String expression) {\r\n\t\tStringBuilder pf = new StringBuilder(); // the postfix expression \r\n\t\texpression = removespaces(expression); \r\n\t\texpression = CheckInputValidation(expression);\r\n\t\texpression = DummyZero(expression);\r\n\t\tString e = expression;\r\n\t\tfor(i1 = 0 ; i1 < e.length() ;i1++) { \r\n\t\t\t//take operand and append it to the string\r\n\t\t\tif(Character.isDigit(e.charAt(i1)) || Character.isLetter(e.charAt(i1))) { //check if the character is letter or number\r\n\t\t\t\tint j =0; //counter to know how many digits in the following operand \r\n\t\t\t\twhile (i1 != e.length() &&e.charAt(i1) != '+' &&e.charAt(i1) != '-' && e.charAt(i1) != '/' && e.charAt(i1) != '*'&&e.charAt(i1) != ')'&&e.charAt(i1) != '(' ) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t\ti1++;\r\n\t\t\t\t}\r\n\t\t\t\tif(j>0) {\r\n\t\t\t\t\tString s = e.substring(i1-j, i1);\r\n\t\t\t\t\tpf.append( s ).append(' ');\r\n\t\t\t\t}\r\n\t\t\t\ti1--;\r\n\t\t\t\tif(i1 == e.length()-1 ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (e.charAt(i1)=='(') {\r\n\t\t\t\topt.push(e.charAt(i1));\r\n\t\t\t}\r\n\t\t\telse if(e.charAt(i1)=='-'||e.charAt(i1)=='/'||e.charAt(i1)=='+'||e.charAt(i1)=='*') {\r\n\t\t\t\twhile(!(opt.isEmpty()) && higherpres(e.charAt(i1)) && (char)opt.peek() !='(') {\r\n\t\t\t\t\tpf.append( opt.pop() ).append(' ');\r\n\t\t\t\t}\r\n\t\t\t\topt.push(e.charAt(i1));\r\n\t\t\t}\r\n\t\t\telse if (e.charAt(i1)==')') {\r\n\t\t\t\twhile((char)opt.peek() != '(') {\r\n\t\t\t\t\tpf.append( opt.pop() ).append(' ');\r\n\t\t\t\t}\r\n\t\t\t\topt.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(!(opt.isEmpty()) ) {\r\n\t\t\tif((char)opt.peek() != '(') {\r\n\t\t\t\tpf.append(opt.pop()).append(' ');}\r\n\t\t\telse if((char)opt.peek()=='(') {\r\n\t\t\t\topt.pop();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pf.toString();\r\n\t\t\r\n\t}", "private static Expr parseValue(String string) {\r\n\t\tif (string.isEmpty()) return null;\r\n\r\n\t\tchar first = string.charAt(0);\r\n\t\tif (first != '\"' && first != '-' && isReserved(first)) {\r\n\t\t\treturn new ExprUnary(Operator.get(Character.toString(first)), new ExprVal(string.substring(1)));\r\n\t\t} else {\r\n\t\t\treturn new ExprVal(string);\r\n\t\t}\r\n\t}", "@Override\n public Object visit(PhraseExpr node) {\n node.setExprType(SemanticTools.PHRASE);\n this.currentPhraseExpr = node;\n if (node.getInstrument() != null) {\n node.getInstrument().accept(this);\n if (!node.getInstrument().getExprType().equals(SemanticTools.STRING)) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Instrument must be a String\"\n );\n } else {\n if (!SemanticTools.isValidInstrument(\n ((ConstStringExpr) node.getInstrument()).getConstant())\n ) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Instrument must be of types: \" + SemanticTools.instruments\n );\n }\n }\n } else {\n // default value\n node.setInstrument(new ConstStringExpr(node.getLineNum(), \"piano\"));\n }\n if (node.getOctaveModifier() != null) {\n node.getOctaveModifier().accept(this);\n if (!node.getOctaveModifier().getExprType().equals(SemanticTools.INT)) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Octave modifiers must be of type \" + SemanticTools.INT\n );\n } else {\n int octave = Integer.parseInt(\n ((ConstIntExpr) node.getOctaveModifier()).getConstant()\n );\n\n if (octave > SemanticTools.MAX_OCT || octave < SemanticTools.MIN_OCT) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Octave modifiers must be within the range \"\n + SemanticTools.MIN_OCT + \" to \"\n + SemanticTools.MAX_OCT\n );\n }\n }\n } else {\n // default value\n node.setOctaveModifier(new ConstIntExpr(node.getLineNum(), \"0\"));\n }\n if (node.getVolume() != null) {\n node.getVolume().accept(this);\n if (!node.getVolume().getExprType().equals(SemanticTools.INT)) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Volume must be of type \" + SemanticTools.INT\n );\n } else {\n int vol = Integer.parseInt(\n ((ConstIntExpr) node.getVolume()).getConstant()\n );\n\n if (vol > 127 || vol < 0) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Volume must be in range 0-127\"\n );\n }\n }\n } else {\n //default value\n node.setVolume(new ConstIntExpr(node.getLineNum(), \"127\"));\n }\n node.getMeasureList().accept(this);\n return null;\n }", "@Override\n\tpublic void visit(Expression n) {\n\t\t// Putting some more appropriate checks here.\n\t\tif (Misc.isACFGExpression(n)) {\n\t\t\tcfgNode = n;\n\t\t}\n\t}", "@Test\r\n\t\tpublic void testCompileAllOperators() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 6\\nb = 6\\nc = a + (b * 4)\\nd = c / 3\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"opt_div\") && elementText.contains(\"opt_mult\") &! elementText.contains(\"opt_minus\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic String toInfixNotation() {\n\t\tint num;\n\t\tExpressionTree left, right;\n\n\t\ttry {\n\t\t\tnum = Integer.parseInt(EMPTY + this.getValue());\n\t\t\treturn EMPTY + num;\n\t\t}\n\t\tcatch(NumberFormatException n) {\n\t\t\tleft = new ExpressionTree(getLeft());\n\t\t\tright = new ExpressionTree(getRight());\n\t\t\t\n\t\t\treturn OPEN_PAREN + left.toInfixNotation() + SPACE + getValue() \n\t\t\t\t\t+ SPACE + right.toInfixNotation() + CLOSED_PAREN;\n\t\t}\n\t}", "public static void main(String[] args) {\n String input = \"( ( 1 + sqrt ( 5 ) ) / 2 )\";\n Stack<String> ops = new Stack<String>();\n Stack<Double> vals = new Stack<Double>();\n String[] temps = input.split(\" \");\n for (String temp : temps) {\n\n if (temp.equals(\"(\")) ;\n else if (temp.equals(\"+\")) ops.push(temp);\n else if (temp.equals(\"-\")) ops.push(temp);\n else if (temp.equals(\"*\")) ops.push(temp);\n else if (temp.equals(\"/\")) ops.push(temp);\n else if (temp.equals(\"sqrt\")) ops.push(temp);\n else if (temp.equals(\")\")){\n String op = ops.pop();\n double v = vals.pop();\n if (op.equals(\"+\")) v = vals.pop() + v;\n else if (op.equals(\"-\")) v = vals.pop() - v;\n else if (op.equals(\"*\")) v = vals.pop() * v;\n else if (op.equals(\"/\")) v = vals.pop() / v;\n else if (op.equals(\"sqrt\")) v = Math.sqrt(v);\n vals.push(v);\n }else {\n vals.push(Double.parseDouble(temp));\n }\n }\n System.out.println(vals.pop());\n }", "public Tree<String> parse(Tree<State> tree) {\n\t\tTree<String> parsed = null;\n\t\ttry { // do NOT expect it to crash\n\t\t\tviterbiParse(tree);\n\t\t\tparsed = StateTreeList.stateTreeToStringTree(tree, Inferencer.grammar.numberer);\n\t\t\tparsed = Inferencer.extractBestMaxRuleParse(chart, parsed.getYield());\n\t\t} catch (Exception e) {\n\t\t\tparsed = new Tree<String>(Inferencer.DUMMY_TAG);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn parsed;\n\t}", "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}", "public interface ParserConstants {\n\n /** End of File. */\n int EOF = 0;\n /** RegularExpression Id. */\n int IMPLIES = 1;\n /** RegularExpression Id. */\n int EQUIVALENT = 2;\n /** RegularExpression Id. */\n int AND = 3;\n /** RegularExpression Id. */\n int OR = 4;\n /** RegularExpression Id. */\n int LBRACKET = 5;\n /** RegularExpression Id. */\n int RBRACKET = 6;\n /** RegularExpression Id. */\n int NOT = 7;\n /** RegularExpression Id. */\n int EQUALS = 8;\n /** RegularExpression Id. */\n int FORALL = 9;\n /** RegularExpression Id. */\n int THEREEXISTS = 10;\n /** RegularExpression Id. */\n int VARIABLE = 11;\n /** RegularExpression Id. */\n int PREDICATE = 12;\n\n /** Literal token values. */\n String[] tokenImage = {\n \"<EOF>\",\n \"<IMPLIES>\",\n \"<EQUIVALENT>\",\n \"<AND>\",\n \"<OR>\",\n \"<LBRACKET>\",\n \"<RBRACKET>\",\n \"<NOT>\",\n \"<EQUALS>\",\n \"<FORALL>\",\n \"<THEREEXISTS>\",\n \"<VARIABLE>\",\n \"<PREDICATE>\",\n };\n\n}", "public Object visitLogicalNegationExpression(GNode n) {\n if (dostring) {\n Object a = dispatch(n.getGeneric(0));\n \n if (a instanceof Long) {\n return \"\" + ((((Long) a).equals(new Long(0))) ? 1 : 0);\n }\n else {\n return \"! \" + parens(a);\n }\n }\n else {\n BDD a = ensureBDD(dispatch(n.getGeneric(0)));\n BDD bdd;\n \n bdd = a.not();\n \n a.free();\n \n return bdd;\n }\n }", "public Node factor(Node n_parent) {\r\n String identifier=\"\";\r\n String type=\"\";\r\n if(token.get(lookAheadPossition).contains(\"ident(\")){\r\n System.out.println(\":: factor:if:\");\r\n identifier = token.get(lookAheadPossition).substring(6, token.get(lookAheadPossition).length() - 1);\r\n type = (String) symbolTable.get(identifier);\r\n type=type.toLowerCase();\r\n\r\n this.CheckError(token.get(lookAheadPossition));\r\n Node n_factor =new Node(identifier+\":\"+type);\r\n\r\n return n_factor;\r\n }\r\n else if(token.get(lookAheadPossition).contains(\"num(\")){\r\n System.out.println(\":: factor:if\");\r\n identifier = token.get(lookAheadPossition).substring(4, token.get(lookAheadPossition).length() - 1);\r\n type = \"int\";\r\n\r\n this.CheckError(token.get(lookAheadPossition));\r\n Node n_factor =new Node(identifier+\":\"+type);\r\n return n_factor;\r\n }\r\n else if(token.get(lookAheadPossition).contains(\"boollit(\")){\r\n System.out.println(\":: factor:if\");\r\n identifier = token.get(lookAheadPossition).substring(8, token.get(lookAheadPossition).length() - 1);\r\n\r\n System.out.println(\":: factor:if:boollit \"+identifier);\r\n if (identifier.contentEquals(\"true\") || identifier.contentEquals(\"false\") ){ type=\"bool\";}else { type = (String) symbolTable.get(identifier); type = type.toLowerCase();}\r\n System.out.println(\":: factor:if:boolint\"+type);\r\n this.CheckError(token.get(lookAheadPossition));\r\n Node n_factor =new Node(identifier+\":\"+type);\r\n return n_factor;\r\n }\r\n else if(token.get(lookAheadPossition).equals(\"LP\")){\r\n System.out.println(\":: factor:if:: LP\");\r\n//\r\n this.CheckError(\"LP\");\r\n// Node n_LP_RP = n_parent.setChildren(\"LP:RP\");\r\n //this.simpleExpression(n_parent );\r\n Node n_factor = this.simpleExpression(n_parent);\r\n this.CheckError(\"RP\");\r\n return n_factor;\r\n }\r\n return(null);\r\n }", "public boolean isInLanguage(ContextFreeGrammar cfg, Word w) {\n\t\tint n = w.length();\n\n\t\tif (n != 0) {\n\t\t\t//instentiating the max derivative steps to comply with CNF steps\n\t\t\tint numberOfSteps = ((2 * n) - 1);\n\t\t\t//creatin a list to store the rules and variables\n\t\t\tList<Word> listToCheck = new ArrayList<>();\n\t\t\tlistToCheck.add(new Word(cfg.getRules().get(0).getVariable()));\n\t\t\t//iterating throught until the loop is less than the numberOfSteps\n\t\t\tfor (int i = 0; i < numberOfSteps; i++) {\n\t\t\t\tList<Word> tempList = new ArrayList<>();\n\t\t\t\tfor (Word tempWord : listToCheck) {\n\t\t\t\t\tint tempWordLength = tempWord.length();\n\t\t\t\t\t//if there are no variables boolien to establish break or continue\n\t\t\t\t\tboolean wordAllTerminal = wordAllTerminals(tempWord);\n\t\t\t\t\t//while we have variables\n\t\t\t\t\tif (!wordAllTerminal) {\n\t\t\t\t\t\tfor (int j = 0; j < tempWordLength; j++) {\n\t\t\t\t\t\t\t//once we replaced all variables with terminasl\n\t\t\t\t\t\t\tif (tempWord.get(j).isTerminal()) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//interating through all the rules within cfg\n\t\t\t\t\t\t\t\tfor (Rule rule : cfg.getRules()) {\n\t\t\t\t\t\t\t\t\tif (tempWord.get(j).equals(rule.getVariable())) {\n\t\t\t\t\t\t\t\t\t\tif ((i < numberOfSteps / 2 && (!rule.getExpansion().isTerminal()))\n\t\t\t\t\t\t\t\t\t\t\t\t|| i >= numberOfSteps / 2 && (rule.getExpansion().isTerminal())) {\n\t\t\t\t\t\t\t\t\t\t\tint expansionLength = rule.getExpansion().length();\n\t\t\t\t\t\t\t\t\t\t\tList<Symbol> tempWordSymbolList = new ArrayList<>();\n\t\t\t\t\t\t\t\t\t\t\tfor (int k = 0; k < j; k++) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempWordSymbolList.add(tempWord.get(k));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tfor (int k = 0; k < expansionLength; k++) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempWordSymbolList.add(rule.getExpansion().get(k));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tfor (int k = j + 1; k < tempWordLength; k++) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempWordSymbolList.add(tempWord.get(k));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tSymbol[] symbolArray = new Symbol[tempWordSymbolList.size()];\n\t\t\t\t\t\t\t\t\t\t\tfor (int l = 0; l < tempWordSymbolList.size(); l++) {\n\t\t\t\t\t\t\t\t\t\t\t\tsymbolArray[l] = tempWordSymbolList.get(l);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tWord newWord = new Word(symbolArray);\n\t\t\t\t\t\t\t\t\t\t\tif (expansionLength != 0) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempList.add(newWord);\n\t\t\t\t\t\t\t\t\t\t\t}\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}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlistToCheck = tempList;\n\t\t\t\tSystem.out.println(\"Derivation step \" + (i+1) + \":\" + tempList);\n\t\t\t}\n\t\t\tSystem.out.println(\"Possible combinations: \" + listToCheck);\n\t\t\tList<Word> tempListToCheck = new ArrayList<>();\n\t\t\tfor (Word wordToCheck : listToCheck) {\n\t\t\t\tif (wordAllTerminals(wordToCheck)) {\n\t\t\t\t\ttempListToCheck.add(wordToCheck);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlistToCheck = tempListToCheck;\n\t\t\tfor (Word wordToCheck : listToCheck) {\n\t\t\t\tif (w.equals(wordToCheck)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tVariable start = cfg.getRules().get(0).getVariable();\n\t\t\tfor (Rule rule : cfg.getRules()) {\n\t\t\t\tif (rule.getVariable().equals(start)) {\n\t\t\t\t\tif (rule.getExpansion().equals(new Word(\"\")))\n\t\t\t\t\t\tSystem.out.println(\"Empty Match!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Test\r\n public void deriveFromOrAssignmentExpressionWithSIUnits() throws IOException {\n check(\"varI_M|=9\", \"(int,m)\");\r\n //example with long m &= int\r\n check(\"varL_KMe2perH|=9\", \"(long,km^2/h)\");\r\n }", "@Override\n\tpublic String visitBoolExpr(BoolExprContext ctx) {\n\t\tint childrenNo=ctx.children.size();\n\t\tif (childrenNo == 3 )\n\t\t{\n\t\t\tParseTree n=ctx.getChild(1);\t\t\t\n\t\t\tif (!(n instanceof TerminalNode)) return visit(n); //( boolExpr ) \n\t\t\telse if(n.equals(ctx.COMP())) {\n\t\t\t\tString firstOpType=visit(ctx.getChild(0)); //|arExpr COMP arExpr\n\t\t\t\tString secondOpType=visit(ctx.getChild(2)); \n\t\t\t\tif(!((firstOpType.equals(\"int\"))&&(secondOpType.equals(\"int\")))) throw new RuntimeException(\"you can only compare integer types\");\n\t\t\t\treturn \"boolean\";\n\t\t\t}else if(n==ctx.EQ()){\t\t\t\t\t\t\t\t\t\t\t//|arExpr EQ arExpr\n\t\t\t\tString firstOpType=visit(ctx.getChild(0)); \n\t\t\t\tString secondOpType=visit(ctx.getChild(2)); \t\t\t\t\n\t\t\t\tif(!(((firstOpType.equals(\"int\"))&&(secondOpType.equals(\"int\")))||((firstOpType.equals(\"char\"))&&(secondOpType.equals(\"char\"))))) throw new RuntimeException(\"you can only use\"\n\t\t\t\t\t\t+ \"\\\"==\\\" operator on integer or character types\");\n\t\t\t\treturn \"boolean\";\n\t\t\t}else if(n==ctx.AND()||n==ctx.OR()){ //|boolExpr (AND|OR)boolExpr\n\t\t\t\tString firstOpType=visit(ctx.getChild(0));\n\t\t\t\tString secondOpType=visit(ctx.getChild(2));\n\t\t\t\tif(!(firstOpType.equals(\"boolean\"))&&(secondOpType.equals(\"boolean\"))) throw new RuntimeException(\"you can only use boolean operators on boolean expressions\");\n\t\t\t\treturn \"boolean\";\n\t\t\t}\n\t\t} else if (childrenNo == 2 ) { //|NOT boolExpr\n\t\t\tString exprType=visit(ctx.getChild(1));\n\t\t\tif (!exprType.equals(\"boolean\")) throw new RuntimeException(\"NOT operator works only with boolean expresssions\");\n\t\t\t\treturn \"boolean\";\n\t\t}else {\t\t\t\t\t\t\t\t//|(ID|property|BOOLEANLIT|arrIdExpr|methodCall)\n\t\t\tParseTree n=ctx.getChild(0);\n\t\t\tif (n instanceof TerminalNode) {\t\t\t\t\n\t\t\t\tif (n==ctx.BOOLEANLIT()) return \"boolean\";\n\t\t\t\telse if(n==ctx.ID()){\n\t\t\t\t\tString key=visitTerminal((TerminalNode)n);\n\t\t\t\t\tRecord id= table.lookup(key);\n\t\t\t\t\tif (id==null) throw new RuntimeException(\"Identifier \"+key+\" is not declared\");\t\t\t\t\t\n\t\t\t\t\treturn id.getReturnType();\n\t\t\t\t\t\n\t\t\t\t}\t\t\t \n\t\t\t}else {\n\t\t\t\tString type=visit(ctx.getChild(0));\n\t\t\t\treturn type;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn null; //for debug\n\t}", "private static void extractProduction(Grammar grammar, String line) throws GrammarSyntaxException{\r\n\r\n\t\tint lineSeparatorIndex = line.indexOf(\":\");\r\n\r\n\t\tif (lineSeparatorIndex < 1) {\r\n\t\t\tthrow new GrammarSyntaxException(\"The line do not start with line number.\", line);\r\n\t\t}\r\n\r\n\t\tString lineNumber = line.substring(0, lineSeparatorIndex);\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(lineNumber);\r\n\t\t} catch(NumberFormatException e) {\r\n\t\t\tthrow new GrammarSyntaxException(\"The line do not start with line number.\", line);\r\n\t\t}\r\n\r\n\t\tString lineToParse = line.substring(lineSeparatorIndex + 1);\r\n\r\n\t\tString[] productionString = lineToParse.split(Production.ASSIGNMENT_STRING);\r\n\r\n\t\tif(productionString.length != 2)\r\n\t\t\tthrow new GrammarSyntaxException(\"A production must be in format like <T> ::= <T>|a\", line);\r\n\r\n\t\tString leftSide = productionString[0].replaceAll(\" \", \"\");\r\n\r\n\r\n\t\tString ntLabel = leftSide.substring(1, leftSide.length() - 1);\r\n\t\tif(!NonTerminal.NON_TERMINAL_PATTERN.matcher(ntLabel).matches())\r\n\t\t\tthrow new GrammarSyntaxException(\"Unespected non teminal \" + ntLabel, line);\r\n\t\tNonTerminal leftNt = grammar.findNonTerminal(ntLabel);\r\n\t\tif(leftNt == null){\r\n\t\t\t\tleftNt = new NonTerminal(ntLabel);\r\n\t\t\t\tgrammar.addNonTerminal(leftNt);\r\n\t\t}\r\n\r\n\t\tProduction p = new Production();\r\n\t\tgrammar.addProduction(p);\r\n\t\tp.setLeft(leftNt);\r\n\t\tp.setRight(getRightSide(grammar, leftNt, productionString[1]));\r\n\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"ji{:[5xw96\");\n Token token0 = xPathLexer0.rightParen();\n assertEquals(2, token0.getTokenType());\n assertEquals(\"j\", token0.getTokenText());\n \n Token token1 = xPathLexer0.dollar();\n assertEquals(26, token1.getTokenType());\n assertEquals(\"i\", token1.getTokenText());\n \n Token token2 = xPathLexer0.notEquals();\n assertEquals(\"{:\", token2.getTokenText());\n assertEquals(22, token2.getTokenType());\n \n Token token3 = xPathLexer0.nextToken();\n assertEquals(3, token3.getTokenType());\n assertEquals(\"[\", token3.getTokenText());\n \n Token token4 = xPathLexer0.identifierOrOperatorName();\n assertEquals(15, token4.getTokenType());\n assertEquals(\"5xw96\", token4.getTokenText());\n }" ]
[ "0.63953924", "0.62925506", "0.6283732", "0.60000116", "0.58460975", "0.5777156", "0.5754054", "0.5628791", "0.553867", "0.54181534", "0.5400931", "0.5258614", "0.52132595", "0.52066666", "0.5172261", "0.51666605", "0.5159205", "0.5153125", "0.51226026", "0.5122595", "0.51218355", "0.50986403", "0.50844514", "0.5064585", "0.505665", "0.50419825", "0.50398874", "0.5020102", "0.4983599", "0.49813944", "0.49762383", "0.4951437", "0.4904966", "0.48756823", "0.486476", "0.4844885", "0.4809527", "0.48059675", "0.47976884", "0.47836757", "0.47740933", "0.4770341", "0.47584122", "0.47564343", "0.4743455", "0.47393227", "0.47389054", "0.47236004", "0.47181728", "0.47150397", "0.4708975", "0.47038615", "0.47031784", "0.46973145", "0.46878844", "0.46815518", "0.46809003", "0.46803933", "0.46770734", "0.46655402", "0.46638313", "0.46594155", "0.46587133", "0.4652842", "0.46519932", "0.46488985", "0.4644855", "0.46440873", "0.46431735", "0.46336097", "0.46302438", "0.46214992", "0.4620952", "0.46168265", "0.4615088", "0.4610144", "0.46001086", "0.45997667", "0.45993823", "0.45986253", "0.45983896", "0.45953566", "0.45948815", "0.45906276", "0.45886546", "0.45856357", "0.45757994", "0.45727417", "0.45609856", "0.4557873", "0.45551002", "0.4545389", "0.45443794", "0.45429066", "0.4539764", "0.4532376", "0.45309997", "0.45284182", "0.4525195", "0.45250985", "0.45228451" ]
0.0
-1
Adds the individual to the archive.
public void add(SearchItemIndividual si) { if (!archive.containsKey(si.toString())) { archive.put(si.toString(), (SearchItemIndividual)si.clone()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "IbeisIndividual addIndividual(String name) throws IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException, IndividualNameAlreadyExistsException;", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\", author);\n\t\tdata.put(\"publisher\", publisher);\n\t\tdata.put(\"isbn\", isbn);\n\t\tdata.put(\"bookID\", bookID);\n\t\tHashMap<String, Object> result = null;\n\t\tString endpoint = \"bookinfo/post.php\";\n\t\ttry {\n\t\t\tresult = APIClient.post(BookInfo.host + endpoint, data);\n\t\t\tvalid = result.get(\"status_code\").equals(\"Success\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "@Override\n\tpublic void add(Savable savable) {\n\t\tif (savable instanceof Contact) {\n\t\t\tContact contact = (Contact)savable;\n\t\t\tthis.contacts.put(contact.getId(), contact);\n\t\t}\n\t}", "public void add(String nome, Object obj);", "@Override\n <T> void add(T object);", "@Override\r\n\tpublic void add(Object object) {\n\t\t\r\n\t}", "public void addMainEntry (ArchiveEntry mainEntry)\n\t{\n\t\tthis.mainEntries.add (mainEntry);\n\t}", "void add(Actor actor);", "public void addItem(Object obj) {\n items.add(obj);\n }", "protected void objAdded(UserId principal, ObjLoc objLoc, ObjectMeta objectMeta) {\r\n\r\n }", "public static void addIndividual(OWLIndividual owlIndi, OWLIndividual indiToAdd, String property, OWLOntology onto, OWLDataFactory factory, OWLOntologyManager manager){\n\t\tOWLObjectProperty p = factory.getOWLObjectProperty(IRI.create(Settings.uri+property));\n\t manager.applyChange(new AddAxiom(onto, factory.getOWLObjectPropertyAssertionAxiom(p, owlIndi, indiToAdd)));\n\t}", "public void add(T toAdd) {\n\t\tif (load.size() == maxLoad)\n\t\t\tSystem.out.println(\"\tERROR: Not enough room for the given item.\");\n\t\t\n\t\t//checks if this has already been loaded\n\t\telse {\n\n\t\t\tboolean loaded = false;\n\t\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < load.size(); i++) {\n\t\t\t\t\n\t\t\t\t/*System.out.println(\"***********\");\n\t\t\t\tSystem.out.println(load.get(i).getID());\n\t\t\t\tSystem.out.println(toAdd.getID());\n\t\t\t\tSystem.out.println(\"***********\");*/\n\t\t\t\t\n\t\t\t\tif (load.get(i).getID().equals(toAdd.getID()))\n\t\t\t\t\tloaded = true;\n\t\t\t}\n\t\t\t\n\t\t\tif (loaded == false)\n\t\t\t\tload.add(toAdd);\n\t\t\telse\n\t\t\t\tSystem.out.println(\"\tERROR: Invalid item, item with id \" + toAdd.getID() + \" already exists.\");\n\t\t}\n\t}", "void addMember(final PartyMember member);", "void add(Item item);", "public void add(Object o);", "public void add(FileSystemEntry entry);", "boolean add(Object object) ;", "public void addEntry() {\n\t\tSystem.out.print(\"Name: \");\n\t\tString entryName = getInputForName();\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\t\n\t\tp = new PhoneEntry(entryName, entryNumber);\n\t\t\n\t\ttry {\n\t\t\tphoneList.add(p);\n\t\t\twriteFile();\n\t\t\t\n\t\t\tSystem.out.println(\"Entry \" + p.getName() + \" has been added.\");\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.err.println(\"Could not write item into array.\");\n\t\t}\n\t}", "private void add() {\n\n\t}", "void addHadithNo(Object newHadithNo);", "@Override\n\tpublic boolean add(Object obj) {\n\t\treturn util.add(obj);\n\t}", "public void addChild(IndividualReference individualReference) {\n if (this.children == null) this.children = new ArrayList<>();\n this.children.add(individualReference);\n setNumChildren(Integer.toString(Integer.parseInt(this.numChildren.toString()) + 1));\n }", "long addOwner(Owner owner);", "public void addPerson(Person thePerson) {\r\n staff.add(thePerson);\r\n }", "public void add() {\n\t\ttry (RandomAccessFile raf = new RandomAccessFile(\"Address.dat\", \"rw\")) // Create RandomAccessFile object\n\t\t{\n\t\t\traf.seek(raf.length()); // find index in raf file\n\t\t\t // # 0 -> start from 0\n\t\t\t // # 1 -> start from 93 (32 + 32 + 20 + 2 + 5 + '\\n')\n\t\t\t // # 2 -> start from 186 (32 + 32 + 20 + 2 + 5 + '\\n') * 2\n\t\t\t // # 3 -> start from 279 (32 + 32 + 20 + 2 + 5 + '\\n') * 3\n\t\t \twrite(raf); // store the contact information at the above position\n\t\t}\n\t\tcatch (FileNotFoundException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IndexOutOfBoundsException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void add(String name) {\n File f = new File(name);\n if (!f.exists()) {\n Utils.message(\"File does not exist.\");\n throw new GitletException();\n }\n Blob blob = new Blob(f);\n untracked.remove(name);\n HashMap<String, Blob> files = head.getContents();\n if (files.containsKey(name)\n && files.get(name).getContent().equals(blob.getContent())) {\n return;\n } else if (!(files.containsKey(name) && files.get(name).equals(blob))) {\n stagingarea.put(blob.getName(), blob);\n File stagefile = Utils.join(staging, blob.getHash());\n Utils.writeObject(stagefile, blob);\n }\n\n }", "public void add(Object obj) { \n\t\tcollection.addElement(obj);\n\t}", "void add(GeometricalObject object);", "void add(Object element);", "boolean add(Object obj);", "boolean add(Object obj);", "protected UUID add(E entry) {\n\t\treturn add(entry, true);\n\t}", "public void add();", "void addAuthorToStream(Author author) {\n\t\tthis.entryCount.inc();\r\n\t\tboolean found = false;\r\n\r\n\t\tif (!authors.isEmpty()) {\r\n\t\t\tfor (Author a : authors) {\r\n\t\t\t\tif (a.name.equals(author.name)) {\r\n\t\t\t\t\tfound = true;\r\n\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 (!found) {\r\n\t\t\tthis.authors.add(author);\r\n\r\n\t\t}\r\n\t}", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "public boolean add(Object o) {\r\n addBefore(o, header);\r\n return true;\r\n }", "void Add(Object obj );", "void addHadithBookNo(Object newHadithBookNo);", "public void add() {\n\t\t\n\t}", "public ArchiveEntry addEntry (File toInsert, String targetName, URI format)\n\t\tthrows IOException\n\t{\n\t\treturn addEntry (toInsert, targetName, format, false);\n\t}", "@Override\n\tpublic void add(Object o) {\n\t}", "public void add (T obj);", "public void addActor(CastMember actor)\n\t{\n\t\tpeopleAct.add(actor);\n\t}", "public ArchiveEntry addEntry (File toInsert, String targetName, URI format,\n\t\tboolean mainEntry) throws IOException\n\t{\n\t\ttargetName = prepareLocation (targetName);\n\t\t\n\t\tif (targetName.equals (MANIFEST_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + MANIFEST_LOCATION);\n\t\t\n\t\tif (targetName.equals (METADATA_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + METADATA_LOCATION);\n\t\t\n\t\t// we also do not allow files with names like metadata-[0-9]*.rdf\n\t\tif (targetName.matches (\"^/metadata-[0-9]*\\\\.rdf$\"))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file like metadata-[0-9]*.rdf\");\n\t\t\n\t\t// insert to zip\n\t\tPath insertPath = zipfs.getPath (targetName).normalize ();\n\t\tFiles.createDirectories (insertPath.getParent ());\n\t\tFiles.copy (toInsert.toPath (), insertPath, Utils.COPY_OPTION);\n\t\t\n\t\tArchiveEntry entry = new ArchiveEntry (this, insertPath, format);\n\t\tentries.put (entry.getFilePath (), entry);\n\t\t\n\t\tif (mainEntry)\n\t\t{\n\t\t\tLOGGER.debug (\"setting main entry:\");\n\t\t\taddMainEntry (entry);\n\t\t}\n\t\t\n\t\treturn entry;\n\t}", "public void addAuthor(Author author){\n authors.add(author);\n }", "public void add() {\n }", "public void add(GeometricalObject object);", "void addItem(DataRecord record);", "private void addToZipStream(Path file, ZipOutputStream zipStream, String dirName)\r\n throws Exception {\r\n String inputFileName = file.toFile().getPath();\r\n try (FileInputStream inputStream = new FileInputStream(inputFileName)) {\r\n\r\n // create a new ZipEntry, which is basically another file\r\n // within the archive. We omit the path from the filename\r\n Path directory = Paths.get(dirName);\r\n ZipEntry entry = new ZipEntry(directory.relativize(file).toString());\r\n\r\n zipStream.putNextEntry(entry);\r\n\r\n // Now we copy the existing file into the zip archive. To do\r\n // this we write into the zip stream, the call to putNextEntry\r\n // above prepared the stream, we now write the bytes for this\r\n // entry. For another source such as an in memory array, you'd\r\n // just change where you read the information from.\r\n byte[] readBuffer = new byte[2048];\r\n int amountRead;\r\n int written = 0;\r\n\r\n while ((amountRead = inputStream.read(readBuffer)) > 0) {\r\n zipStream.write(readBuffer, 0, amountRead);\r\n written += amountRead;\r\n }\r\n } catch (IOException e) {\r\n throw new Exception(\"Unable to process \" + inputFileName, e);\r\n }\r\n }", "void add(T item);", "@Override\r\n\tpublic void addEmployee(Employee employee) {\n\t\temployees.add(employee);\r\n\t\t\r\n\t}", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "public void addTile(Tile tile) {\n ownedTiles.add(tile);\n }", "void addInBookNo(Object newInBookNo);", "void addMyTeam(Team team) throws HasTeamAlreadyException;", "public boolean add(Object element);", "public void addMember(IMember member);", "public void add(Person person){\n\t\tpersonRepository.add(person);\n\t}", "public void addElement(Object obj);", "public void addFile(String fileName) throws FileNotFoundException,\r\n\t\t\tIOException {\r\n\t\tFileInputStream fis = new FileInputStream(fileName);\r\n\t\tint size = 0;\r\n\t\tbyte[] buffer = new byte[2048];\r\n\r\n\t\t// Ajouter une entree à l'archive zip\r\n\t\tFile file = new File(fileName);\r\n\t\tZipEntry zipEntry = new ZipEntry(file.getName());\r\n\t\tthis.zos.putNextEntry(zipEntry);\r\n\r\n\t\t// copier et compresser les données\r\n\t\twhile ((size = fis.read(buffer, 0, buffer.length)) > 0) {\r\n\t\t\tthis.zos.write(buffer, 0, size);\r\n\t\t}\r\n\r\n\t\tthis.zos.closeEntry();\r\n\t\tfis.close();\r\n\t}", "@Override\n public void addObject() throws Exception {\n Object obj = _factory.makeObject();\n synchronized(this) {\n _numActive++; // A little slimy - must do this because returnObject decrements it.\n this.returnObject(obj);\n }\n }", "private void add(String name) {\n try {\n PokemonToEdit pkm = Reader.readPokemon(name);\n team.add(pkm);\n System.out.println(name + \" has been add to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException e) {\n System.out.println(\"Pokemon not found natively\");\n System.out.println(\"Try looking for the pokemon online\");\n try {\n PokemonToEdit pkm = Crawler.loadPokemon(name);\n Saver.savePokemon(pkm);\n team.add(pkm);\n System.out.println(name + \" has been added to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException ex) {\n System.out.println(\"Pokemon not found\");\n } catch (TeamFullException ex) {\n System.out.println(\"Team is full\");\n }\n } catch (TeamFullException e) {\n System.out.println(\"Team is full\");\n\n }\n }", "public org.python.Object __add__(org.python.Object other);", "int add(T objectToCreate);", "private void add(GroceryItem itemObj, String itemName) {\n\t\tbag.add(itemObj);\n\t\tSystem.out.println(itemName + \" added to the bag.\");\n\t}", "public void addActor(){\n actorProfileList.add(new ActorProfile());\n }", "public void add(StreamObject SO){\n\t\tindices.add(contenido.length());\n\t\tcontenido = contenido + StreamObject.convert(SO);\n\t}", "public void addPerson(Person per) {\r\n\t\tthis.persons.put(per.getPersonID(), per);\r\n\t}", "@Override\n\tpublic void add() {\n\t\t\n\t}", "@Override\n public void addSingleFile(FileInfo file) {\n }", "public void addActor(Actor actor) { ActorSet.addElement(actor); }", "@Put\n public void addMember(){\n try {\n controller.addMember(getQueryValue(\"id\"), getQueryValue(\"name\"));\n }catch(MenuException e){\n System.out.println(e.getMessage());\n }\n }", "void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;", "public void add() {\n\n }", "public void addElement(Replicated obj)\r\n\t{\n\t\tinsert(obj, seq.size());\r\n\t}", "@Traced\r\n\tpublic boolean addSimpleObject(SimpleObject obj){\n\t\tobjects.add(obj);\r\n\t\treturn true; // in future to handle some errors\r\n\t}", "public void addPersonality(Personality pObjectName)\n {\n pList.add(pObjectName);\n }", "public void addEmployee(Employee employee)\n {\n try\n {\n InputStream is = employee.getPicture().getInputStream();\n \n while (is.read() != -1);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n \n \n \n System.out.println(\"Added \" + employee.getName() + \" in division \" + employee.getDivision()\n + \" with a picture \" + employee.getPicture());\n employees.add(employee);\n invocationCount++;\n }", "void addParticipant(Participant participant);", "public void add(int id, String name, String author, int issueDate, int returnDate) {\n\tBook book = new Book();\n\tbook.id = id;\n\tbook.name = name;\n\tbook.author = author;\n\tbook.issueDate = issueDate;\n\tbook.returnDate = returnDate;\n\tlist.add(book);\n\tSystem.out.println(\"Successfully added: \"+book.id);\n}", "InvoiceItem addInvoiceItem(InvoiceItem invoiceItem);", "public void addMember(Person person) {\n\t\tmembers.add(person);\n\t}", "public void add(Person person) {\n\t\tlistOfPeople.add(person);\n\t\t\n\t}", "public void add (Object t)\r\n {\r\n }", "void addHasPart(WrappedIndividual newHasPart);", "@Override\n synchronized public void addEntry(Entry e) throws RemoteException {\n if (this.map.containsKey(e.getHash())) {\n return;\n }\n //System.out.println(\"Mapper.addEntry() :: entry=\"+e.getHash()+\",\"+e.getLocation());\n this.map.put(e.getHash(), e.getLocation());\n printAct(\">added entry:\" + e.hash);\n }", "void addStartingHadithNo(Object newStartingHadithNo);", "void add(E item);", "void add(E item);", "void add(E item);", "public abstract void add(String element) throws RemoteException;", "public void add(Object o){\n list.add(o);\n }", "public void add(T toy) {\n // Complete add method with proper argument and method body\n v.add(toy);\n }", "public void addToInventory() {\r\n\t\tdo {\r\n\t\t\tint quantity = 0;\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tWasher washer = store.searchWashers(brand + model);\r\n\t\t\tif (washer == null) {\r\n\t\t\t\tSystem.out.println(\"No such washer exists.\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tquantity = getInteger(\"Enter quantity to add: \");\r\n\t\t\tboolean result = store.addWasherToInventory(brand, model, quantity);\r\n\t\t\tif(result) {\r\n\t\t\t\tSystem.out.println(\"Added \" + quantity + \" of \" + washer);\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Washer could not be added to inventory.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (yesOrNo(\"Add more washers to the inventory?\"));\r\n\t}", "@Override\n public void addParticipant(Participant participant) throws AlfredException {\n this.participantList.add(participant);\n }", "RecipeObject addRecipe(RecipeObject recipe);", "public void add(E item);", "void addNewAccountToFile(Account newAccount);" ]
[ "0.6140651", "0.5816305", "0.5778771", "0.56244075", "0.5619937", "0.56142503", "0.5581189", "0.55698574", "0.55576694", "0.55311215", "0.5506317", "0.5503125", "0.5492404", "0.54737496", "0.5465625", "0.5453313", "0.5453105", "0.5448014", "0.5441592", "0.54195386", "0.5416566", "0.54086375", "0.5406329", "0.53832334", "0.53734684", "0.53597295", "0.53503054", "0.5325631", "0.532437", "0.5319045", "0.5316077", "0.5316077", "0.53121877", "0.531024", "0.5308142", "0.5299123", "0.52954865", "0.5295338", "0.52892", "0.52886134", "0.5277128", "0.5261514", "0.52612066", "0.52558064", "0.5255266", "0.52542007", "0.5245342", "0.52423894", "0.5230493", "0.52220273", "0.5218804", "0.52187824", "0.5208622", "0.5187713", "0.5184588", "0.517436", "0.516449", "0.51618314", "0.51463985", "0.5142455", "0.5133755", "0.51296353", "0.5122874", "0.51205766", "0.51193535", "0.5113988", "0.51098883", "0.5109102", "0.51077914", "0.5106795", "0.5104337", "0.51037616", "0.5101256", "0.50819373", "0.50804883", "0.50768226", "0.5075182", "0.50727427", "0.50723803", "0.5068782", "0.5061809", "0.506106", "0.50584584", "0.5055001", "0.50546575", "0.5053245", "0.5051683", "0.50394124", "0.5037796", "0.5028736", "0.5028736", "0.5028736", "0.5025313", "0.5022217", "0.50198627", "0.50197715", "0.5017632", "0.5016592", "0.5016571", "0.5016251" ]
0.6790777
0
Returns the size of the archive
public int size() { return archive.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getArchiveSize() {\n return archiveSize;\n }", "public int getArchiveSize() {\r\n\t\treturn archiveSize;\r\n\t}", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public long size() {\n return this.filePage.getSizeInfile();\n }", "public long size() {\n return file.length();\n }", "long getSize() throws IOException;", "public long getFileSize();", "public long getFileSize();", "public long getSize() {\r\n return mFile.getSize();\r\n }", "public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}", "public int getContentLength() {\r\n if (!connected)\r\n return -1;\r\n\r\n return (int) zipEntry.getSize();\r\n }", "public long getSize();", "long getSize();", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "long sizeInBytes() throws IOException;", "public final long getSize() { return size; }", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "public long getSize() {\n\t\treturn size;\n\t}", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "long getFileSize();", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "public long getSize() {\n return size;\n }", "@Override\n\tpublic long getSize()\n\t{\n\t\tif (size >= 0)\n\t\t{\n\t\t\treturn size;\n\t\t}\n\t\telse if (cachedContent != null)\n\t\t{\n\t\t\treturn cachedContent.length;\n\t\t}\n\t\telse if (dfos.isInMemory())\n\t\t{\n\t\t\treturn dfos.getData().length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn dfos.getFile().length();\n\t\t}\n\t}", "public long getSize() {\r\n return size;\r\n }", "public abstract long size() throws IOException;", "public long getSize()\n {\n return getLong(\"Size\");\n }", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public long size(String path);", "public long size() {\n\t\treturn size;\n\t}", "public long getSize() {\n return mSize;\n }", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public static long getUnzipingFileSize() {\n\t\treturn unzipingFileSize;\n\t}", "public long getFileSize()\n throws IOException\n {\n return file.length();\n }", "public long getSize() {\n return size.get();\n }", "public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}", "public Long sizeInBytes() {\n return this.sizeInBytes;\n }", "public int size() {\n return bytes.length;\n }", "@Override\n\tpublic long compressedSize() {\n\t\treturn this.compressedLength.get();\n\t}", "public String getSize() {\r\n return size;\r\n }", "public long getFileSize() {\r\n\t\treturn dFileSize;\r\n\t}", "public synchronized long size() {\n\t\treturn size;\n\t}", "public long getFileSize()\r\n {\r\n return lFileSize;\r\n }", "public int getSize() {\n\t\treturn _size;\n\t}", "public long getFileSize() {\n return this.originalFileSize;\n }", "public int getFileSize(){\n\t\treturn fileSize;\n\t}", "public long getFileSize() {\r\n return fileSize;\r\n }", "@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "long getSize() throws FileSystemException;", "public long getFileSize() {\n\t\treturn mFileSize;\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "int getSize ();", "public final int getSize() {\n return size;\n }", "public long size() {\n try {\n return Files.size(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to get the size of staged document!\", e);\n }\n }", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "int getSize();", "public int size() {\n\t\tif (baos == null || baos.toByteArray() == null) return 0;\n\t\telse return baos.toByteArray().length;\n\t}", "public long picoSize() throws IOException {\n return _backing.length();\n }", "public Long sizeInKB() {\n return this.sizeInKB;\n }", "public int getSize() {\r\n return _size;\r\n }", "public int getTotalProcessTransEntryInArchiveZip()\n {\n ConfigurationStore configStore = ConfigurationStore.getInstance();\n String totalProcessTransInZip = configStore.getProperty(IISATProperty.CATEGORY, IISATProperty.TOTAL_PROCESS_TRANS_IN_ARCHIVE_FILE, null);\n if(totalProcessTransInZip != null)\n {\n return Integer.parseInt(totalProcessTransInZip);\n }\n else\n {\n return 1000;\n }\n }", "public abstract long getSize();", "public long getFileSize() {\n return fileSize_;\n }", "public long getEntrySize() {\n return size;\n }", "public int getTotalSize();", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize( )\n {\n return size;\n }", "public TSizeInBytes getSize() {\n\n\t\treturn size;\n\t}", "public static long getDownloadingFileSize() {\n\t\treturn downloadingFileSize;\n\t}", "public long length() {\n return _file.length();\n }", "public int getSize()\n\t{\n\t\treturn size;\n\t}", "public int getSize()\n\t{\n\t\treturn size;\n\t}", "long getSize() throws IOException {\n return fileRWAccessSize.get();\n }", "public int getSize();" ]
[ "0.83577687", "0.82420665", "0.73721206", "0.7249796", "0.72303724", "0.7181563", "0.71794", "0.71794", "0.71158195", "0.7112781", "0.70966274", "0.7089495", "0.70738775", "0.7061761", "0.7024309", "0.70182306", "0.6997339", "0.69888324", "0.69779193", "0.69779193", "0.69779193", "0.69779193", "0.6961611", "0.69406456", "0.6929509", "0.6925038", "0.6916443", "0.6879837", "0.687492", "0.68542045", "0.68187505", "0.67917216", "0.6758438", "0.6754407", "0.6754407", "0.67470574", "0.67297304", "0.6728712", "0.67286974", "0.67279875", "0.6716417", "0.6695555", "0.66898334", "0.66783774", "0.6673882", "0.6668968", "0.66681993", "0.66666484", "0.6657278", "0.6654512", "0.66545004", "0.6652311", "0.66359186", "0.66355145", "0.6625592", "0.66254795", "0.6623964", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.66128784", "0.6611323", "0.6607686", "0.6605642", "0.6602551", "0.65984225", "0.65880376", "0.6586266", "0.65778726", "0.65755105", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563815", "0.6563531", "0.6563053", "0.6561197", "0.6550733", "0.65498465", "0.65498465", "0.6544999", "0.6543143" ]
0.83496433
1
Enforce test preparation implementation.
public void before(Scenario scenario) { logger.trace("Initializing Test-Framework for : " + scenario.getName()); if (scenario.getSourceTagNames().contains("@disabled-" + ParameterMap.getParamBrowserType())) { throw new AssumptionViolatedException(String.format("The feature %s is disabled on browser " + "type : %s", scenario.getName(), ParameterMap.getParamBrowserType())); } if (scenario.getSourceTagNames().contains("@disabled")) { throw new AssumptionViolatedException( String.format("The feature %s is disabled %s", scenario.getName(), ParameterMap.getParamBrowserType())); } TestDataCore.addToConfigStore("scenario", scenario); TestDataCore.addToConfigStore("profile", new QAUserProfile(scenario.getName())); if (ParameterMap.getParamAPIClearHeadersBeforeScenario()) { TestDataCore.removeFromDataStore("headers"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void prepare(TestCase testCase) {\n }", "@BeforeAll\n public void prepare() {\n }", "protected void runBeforeTest() {}", "@Before\r\n\tpublic void setup() {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}", "@Before\n\tpublic void setup() \n\t{\n\t\tsuper.setup();\n\t\t\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Before\n public void setup() {\n }", "abstract void setUp() throws Exception;", "public void test_prepare() throws Throwable {\r\n\t\tSET_LONG_NAME(\"system.cli.simple\");\r\n\t DECLARE(TEST_PING);\r\n\t DECLARE(TEST_PROCESSLIST);\r\n\t DECLARE(TEST_PROCESSLIST_LOG);\r\n\t}", "@Before public void setUp() { }", "@Before\n\t public void setUp() {\n\t }", "protected void setUp() {\n\t}", "public void setup() throws DatabaseTestException;", "@Before\n public void prepare() {\n MetaStore metadb = prepareTestDB();\n testObj = new SdbSchemeRewriter(metadb.getAllDBs().get(0));\n }", "@Before\n public final void setUp() throws Exception\n {\n // Empty\n }", "public void prepare() {\n long millis, nanos;\n TestCaseImpl tc = _testCase;\n \n nanos = Util.currentTimeNanos();\n prepare(tc);\n nanos = Util.currentTimeNanos() - nanos;\n tc.setDoubleParam(Constants.ACTUAL_PREPARE_TIME, \n Util.nanosToMillis(nanos));\n }", "@Before\n public void postSetUpPerTest(){\n\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\r\n\t\tpd = new PreparedData();\r\n\r\n\t}", "void PrepareRun() {\n }", "@BeforeClass\n\tpublic static void setup() {\n\n\t}", "public void setUp()\r\n {\r\n //empty on purpose\r\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before public void setUp() {\n }", "@Before\r\n\tpublic void setUp() {\n\t}", "public void prepare() {\n\t}", "@Before\r\n\t public void setUp(){\n\t }", "@Before\n\tpublic void setUp() {\n\t}", "@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }", "public void testPreConditions() {\r\n\t //fail(\"Precondition check not implemented!\");\r\n\t assertEquals(true,true);\r\n\t }", "@Before\n public void setUp() {\n System.out.println(\"\\n@Before - Setting Up Stuffs: Pass \"\n + ++setUpCount);\n // write setup code that must be executed before each test method run\n }", "protected void setUp() throws Exception {\r\n comparator = new ComponentCompetitionFulfillmentPredictionPrizeComparator(0.8, 1.2, 10000);\r\n super.setUp();\r\n }", "protected void setUp()\n {\n }", "protected void setUp()\n {\n }", "abstract void prepare();", "@BeforeClass\n public static void beforeClass() {\n Assume.assumeTrue(LibvirtUtils.isAvailable() || CI.isCI() && !CI.isPublic());\n }", "@BeforeMethod\r\n\tpublic void beforeMethod() {\r\n\t\t//initializeTestBaseSetup();\r\n\t}", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\n public void setUp () {\n }", "@BeforeClass\n\tpublic void beforeClass() {\n\t}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@BeforeClass (alwaysRun = true)\n public void dataPreparation()\n {\n serverHealth.isServerReachable();\n serverHealth.assertServerIsOnline();\n\n // Before we start testing the live indexing we need to use the reindexing component to index the system nodes.\n Step.STEP(\"Index system nodes.\");\n AlfrescoStackInitializer.reindexEverything();\n\n Step.STEP(\"Create a test user and private site.\");\n testUser = dataUser.createRandomTestUser();\n testSite = helper.createPrivateSite(testUser);\n }", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "@Override\r\n\t@Before\r\n\tpublic void callSetup() throws Exception\r\n\t{\r\n\t\tsuper.callSetup();\r\n\t}", "@Before\r\n\tpublic void set_up(){\n\t}", "@Before\n\tpublic void prepare() {\n\t\tbomb = new Special(SpecialType.NUKE);\n\t\tcom = new Commander(0, 0, 0, 1);\n\t\tbaseHP = com.getHealth();\n\t}", "@Test(enabled= true,description = \"Create Assets/Deals and add pre-requites data which is given in Manual Test Case\")\r\n\tpublic void preRequisites() throws Exception {\r\n\r\n\t\t\r\n\t}", "@Before\n public void setUp() {\n }", "public void setUp() {\n\n\t}", "@SuppressWarnings(\"serial\")\n @Before\n public void setUp() throws Exception {\n testInstance = new ClientsPrepopulatingBaseAction() {\n };\n }", "protected void setup() {\r\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@BeforeClass\n\tpublic void TestSetup() {\n\t}", "@BeforeClass\n\tpublic static void preparation(){\n\t\tphotoFile = new PhotoFile(new File(\"..\\\\Album\\\\res\\\\malta.jpg\"));\n\t\temptyPhotoFile = new PhotoFile(new File(\"..\\\\Album\\\\res\\\\malta1.jpg\"));\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setup() {\n Helpers.fillData();\n }", "@BeforeClass\n public static void setUpAll() throws SQLException, IOException {\n new P6TestFramework(\"blank\") {\n };\n }", "@Before\n public void setUp() {\n }", "protected void setUp() {\n\n }", "@Before\n public void setUp()\n {\n summary = \"\";\n allPassed = true;\n firstFailExpected = null;\n firstFailRun = null;\n captureSummary = \"\";\n captureRun = null;\n }", "public abstract void prepare();", "@BeforeClass\n public static void beforeClass() {\n }", "protected void preTest() {\n\t\tprintTestParmas();\n\t\tif (attenuatorSetUnderTest != null) {\n\t\t\tperipheralsConfig.setAttenuatorSetValue(attenuatorSetUnderTest,\n\t\t\t\t\tattenuatorSetUnderTest.getDefaultValueAttenuation());\n\t\t} else {\n\t\t\treport.report(\"There is no attenuator set \");\n\t\t}\n\t\tchangeOtherENBsToOOS();\n\n\t\t/*if (runWithDynamicCFI)\n\t\t\tenbConfig.enableDynamicCFI(this.dut);\n\t\telse\n\t\t\tenbConfig.disableDynamicCFI(this.dut);*/\n\t\t\n\t\tgetRadioProfile();\n\n\t\tprintResultsForTest = true;\n\t\tresetTestBol = false;\n\t\texceptionThrown = false;\n\t}", "@BeforeMethod\n public void preCondtions() {\n }", "@BeforeAll\n static void setup() {\n log.info(\"@BeforeAll - executes once before all test methods in this class\");\n }", "protected abstract void setup();", "@Before\n public void setUp() throws Exception {\n\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}" ]
[ "0.71348476", "0.7059436", "0.67294395", "0.6672606", "0.66230637", "0.66115075", "0.66064125", "0.66064125", "0.66064125", "0.65813583", "0.6580224", "0.6564334", "0.6538987", "0.65187854", "0.6469486", "0.6426423", "0.6418944", "0.64081156", "0.63853806", "0.63648564", "0.63572407", "0.6347916", "0.633098", "0.63233685", "0.63146424", "0.63078016", "0.63078016", "0.63078016", "0.63078016", "0.63078016", "0.6298147", "0.6290195", "0.62867165", "0.6279151", "0.62569976", "0.6247666", "0.62468994", "0.62393975", "0.62362295", "0.62362295", "0.6232403", "0.6231688", "0.6229533", "0.62291956", "0.62291956", "0.62291956", "0.62291956", "0.62241745", "0.62203133", "0.6219537", "0.6219537", "0.6219537", "0.6219537", "0.6219537", "0.62145543", "0.620358", "0.6198788", "0.6195964", "0.61958116", "0.61888695", "0.6188858", "0.61816055", "0.61794615", "0.61753446", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6163727", "0.6156621", "0.61551213", "0.61485845", "0.61485845", "0.613231", "0.613231", "0.6125732", "0.6124462", "0.6124119", "0.6119983", "0.6119164", "0.611895", "0.6113387", "0.6112631", "0.61009854", "0.61001384", "0.60967445", "0.60940623", "0.60906965" ]
0.0
-1
Toast.makeText(getApplicationContext(), "Barcode scanner started", Toast.LENGTH_SHORT).show();
private void initialiseDetectorsAndSources() { barcodeDetector = new BarcodeDetector.Builder(this) .setBarcodeFormats(Barcode.QR_CODE) .build(); cameraSource = new CameraSource.Builder(this, barcodeDetector) .setRequestedPreviewSize(1920, 1080) .setAutoFocusEnabled(true) //you should add this feature .build(); surfaceView.getHolder().addCallback(new SurfaceHolder.Callback() { @Override public void surfaceCreated(SurfaceHolder holder) { try { if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED) { cameraSource.start(surfaceView.getHolder()); Toast.makeText(getApplicationContext(), "Camera started", Toast.LENGTH_LONG).show(); } else { ActivityCompat.requestPermissions(RideCycle.this, new String[]{Manifest.permission.CAMERA}, REQUEST_CAMERA_PERMISSION); } } catch (IOException e) { e.printStackTrace(); } } @Override public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } @Override public void surfaceDestroyed(SurfaceHolder holder) { cameraSource.stop(); } }); barcodeDetector.setProcessor(new Detector.Processor<Barcode>() { @Override public void release() { Toast.makeText(getApplicationContext(), "To prevent memory leaks barcode scanner has been stopped", Toast.LENGTH_SHORT).show(); } @Override public void receiveDetections(Detector.Detections<Barcode> detections) { final SparseArray<Barcode> barcodes = detections.getDetectedItems(); if (barcodes.size() != 0) { txtBarcodeValue.post(new Runnable() { @Override public void run() { if (barcodes.valueAt(0).email != null) { txtBarcodeValue.removeCallbacks(null); intentData = barcodes.valueAt(0).email.address; txtBarcodeValue.setText(intentData); isEmail = true; // btnAction.setText("ADD CONTENT TO THE MAIL"); } else { isEmail = false; // btnAction.setText("LAUNCH URL"); intentData = barcodes.valueAt(0).displayValue; txtBarcodeValue.setText("Cycle id: " + intentData); } } }); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n String scanNumText = result.getText();\n Toast.makeText(ItemScan.this, scanNumText, Toast.LENGTH_SHORT).show();\n Intent intent = getIntent();\n intent.putExtra(\"Barcode\", scanNumText);\n setResult(Activity.RESULT_OK, getIntent());\n finish();\n }", "@Override\n public void onBarcodeDetected(Barcode barcode) {\n Log.d(TAG,\"Barcode detected\");\n }", "public void openScanner(){\n Intent intent = new Intent(ReturningTaskActivity.this, BarcodeScannerActivity.class);\n startActivityForResult(intent, 0);\n }", "public void scanBarcode(View v) {\n Intent intent=new Intent(this, ScanBarcodeActivity.class);\n startActivityForResult(intent,0);\n }", "private void onBarcodeDetected(Barcode barcode) {\n Log.d(TAG, \"Detected barcode with value: \" + barcode.displayValue);\n\n Intent returnIntent = new Intent();\n returnIntent.putExtra(INTENT_EXTRA_BARCODE_VALUE, barcode.displayValue);\n setResult(RESULT_OK, returnIntent);\n finish();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity__scanner);\n\n this.setTitle(\"QR Scanner\");\n\n scan = findViewById(R.id.sc_btn);\n result = findViewById(R.id.result);\n done_btn = findViewById(R.id.done_btn);\n all = findViewById(R.id.all);\n\n //clicks on scan qr code button\n //go to Activity_scanCode\n scan.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getApplicationContext(), Activity_scanCode.class));\n Handler handler = new Handler();\n //the result will display in 3s\n handler.postDelayed(new Runnable() {\n public void run() {\n all.setVisibility(View.VISIBLE);\n }\n }, 3000);\n\n }\n });\n\n //go back to previous page\n done_btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Toast.makeText(Activity_Scanner.this, \"Completed! Go back to main menu.\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(Activity_Scanner.this, Activity_MainMenuD.class));\n }\n });\n }", "public void scanQrCode() {\r\n cameraView.getHolder().addCallback(new SurfaceHolder.Callback() {\r\n @Override\r\n public void surfaceCreated(SurfaceHolder holder) {\r\n try {\r\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\r\n // TODO: Consider calling\r\n // ActivityCompat#requestPermissions\r\n // here to request the missing permissions, and then overriding\r\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\r\n // int[] grantResults)\r\n // to handle the case where the user grants the permission. See the documentation\r\n // for ActivityCompat#requestPermissions for more details.\r\n return;\r\n }\r\n cameraSource.start(cameraView.getHolder());\r\n } catch (IOException ie) {\r\n Log.e(\"CAMERA SOURCE\", ie.getMessage());\r\n }\r\n }\r\n\r\n @Override\r\n public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {\r\n //cameraSource.release();\r\n }\r\n\r\n @Override\r\n public void surfaceDestroyed(SurfaceHolder holder) {\r\n cameraSource.stop();\r\n }\r\n });\r\n\r\n cameraView.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n cameraFocus(cameraSource, Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\r\n }\r\n });\r\n\r\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\r\n @Override\r\n public void release() {\r\n\r\n }\r\n\r\n @Override\r\n public void receiveDetections(Detector.Detections<Barcode> detections) {\r\n final SparseArray<Barcode> barcodes = detections.getDetectedItems();\r\n\r\n if (barcodes.size() != 0) {\r\n barcodeInfo.post(new Runnable() {\r\n public void run() {\r\n try {\r\n if (Config.getInstance().isInternetAvailable(BarcodeScanner.this)) {\r\n\r\n Config.getInstance().logger(BarcodeScanner.this,Config.getInstance().logger_ATTENDANCE_FILL_ATTENDANCE);\r\n String contents = barcodes.valueAt(0).displayValue;\r\n Toast.makeText(BarcodeScanner.this, contents, Toast.LENGTH_SHORT).show();\r\n tv_detectedValue.setText(contents);\r\n\r\n } else {\r\n Config.getInstance().GlobalInternetDialog(BarcodeScanner.this);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }", "@Override\n public void onClick(View v) {\n IntentIntegrator integ = IntentIntegrator.forSupportFragment(search_Fragement.this);\n integ.setCaptureActivity(CaptureAct.class);\n integ.setOrientationLocked(false);\n integ.setDesiredBarcodeFormats(IntentIntegrator.ALL_CODE_TYPES);\n integ.setPrompt(\"scanning code..\");\n integ.initiateScan();\n\n\n }", "@Override\n public void onScanStarted() {\n Log.d(TAG, \"Scan Started\");\n }", "private void initiateBarcodeScan(Activity activity) {\n IntentIntegrator zxingIntegrator = new IntentIntegrator(activity);\n zxingIntegrator.initiateScan();\n }", "private void registerBarcode(View view) {\n if (getResult() != null) {\n Intent codeScannerIntent = new Intent(this, CodeScannerActivity.class);\n startActivityForResult(codeScannerIntent, CodeScannerActivity.SCAN_CODE_REQUEST);\n } else {\n Toast.makeText(this, \"Trial result is invalid, cannot register bar code\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my XYZ Reader app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "void barcodeCaptured(String barcodeString);", "public void onClick(View v) {\n onScanBarcodeClick();\n }", "@Override\n public void handleResult(Result rawResult) {\n\n Toast.makeText(this,rawResult.getText(),Toast.LENGTH_LONG).show();\n// Toast.makeText(this,rawResult.getBarcodeFormat().toString(),Toast.LENGTH_LONG).show();\n\n\n if (rawResult.getText().equals(\"admin\")) {\n\n Intent intent = new Intent(ScannerActivity.this, ExamPage.class);\n startActivity(intent);\n finish();\n\n\n } else {\n\n Toast.makeText(this,\"Wrong QR Code\",Toast.LENGTH_LONG).show();\n Intent intent = new Intent(ScannerActivity.this, ScannerActivity.class);\n startActivity(intent);\n finish();\n\n\n }\n\n\n\n SharedPreferences sp = getSharedPreferences(\"PREF_NAME\", Context.MODE_PRIVATE);\n String qrText = sp.getString(\"QR_Code\", String.valueOf(-1));\n Toast.makeText(this,qrText,Toast.LENGTH_LONG).show();\n\n\n Log.v(\"Scan\", rawResult.getText()); // Prints scan results\n Log.v(\"Scan\", rawResult.getBarcodeFormat().toString()); // Prints the scan format (qrcode, pdf417 etc.)\n }", "@Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"I'm a toast!\", Toast.LENGTH_SHORT).show();\n }", "public void GoToScanbarcode(View view) {\n\n Intent intent = new Intent(HomeActivity.this, OpenScanner.class);\n intent.putExtra(\"Purpose\", mPurpose);\n Local.Set(getApplicationContext(), \"Purpose\", mPurpose);\n finish();\n\n startActivity(intent);\n }", "public void on_code_read(String result){\n Intent intent = new Intent(ScanActivity.this, TargetActivity.class);\n intent.putExtra(\"result\", result);\n startActivity(intent);\n }", "private void scanCard() {\n\n Intent intent = new ScanCardIntent.Builder(getActivity()).build();\n startActivityForResult(intent, Constant.REQUEST_CODE_SCAN_CARD);\n }", "public void run() {\n barcodeInfo.setText( // Update the TextView\n barcodes.valueAt(0).displayValue\n );\n }", "private void sendToCatVA()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Visual Art'\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n\tpublic void onScanViewButtonClick() {\n\r\n\t}", "public void run() {\n Toast.makeText(context, toast, Toast.LENGTH_SHORT).show(); // toast for whatever reason\n }", "public ScanBarcode() {\n initComponents();\n \n \n }", "@Override\n public void onScanFailed() {\n Log.d(TAG, \"Scan Failed\");\n BluetoothManipulator.startScan();\n }", "@Override\n\tpublic void onScanViewButtonClick() {\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n qrScan.initiateScan();\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n switch (requestCode) {\n case 0:\n try {\n if (resultCode == Activity.RESULT_OK) {\n String scanResult = data.getStringExtra(Constants.SCAN_RESULT);\n // set scanner result to text view on main screen\n TextView textView = (TextView) findViewById(R.id.scanResult);\n textView.setText(scanResult);\n\n Log.v(TAG, \"Bar Code ==: \" + scanResult);\n\n //new KiiPushBroadcastReceiver().sendGroupNotification(Constants.GROUPID, Constants.TOPICNAME, scanResult);\n //send scan result to server\n AsyncTaskSendData asyncTaskToSendData = new AsyncTaskSendData(getApplicationContext());\n asyncTaskToSendData.execute(scanResult);\n\n try{\n Thread.sleep(1000);\n }catch(InterruptedException e) {\n Log.e(TAG, \"thread sleep: \" + e.getMessage());\n }\n\n exitScanner2();\n\n break;\n } else if (resultCode == Activity.RESULT_CANCELED && data != null) {\n String error = data.getStringExtra(Constants.ERROR_INFO);\n if (!TextUtils.isEmpty(error)) {\n // Toast.makeText(this, error, Toast.LENGTH_SHORT).show();\n Log.e(TAG, \"Bar Code\" +\n \" error ==: \" + error);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n break;\n }\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n IntentResult intentResult = IntentIntegrator.parseActivityResult(requestCode,resultCode,data);\n if (intentResult.getContents() != null) {\n String scannedText = intentResult.getContents();\n\n // Get product data associated with the UPC barcode\n Uri uri = api.getURL(scannedText);\n api.getData(uri, this::productBarcodeHandler);\n }\n else {\n Toast.makeText(getApplicationContext(),\"Nothing was scanned\", Toast.LENGTH_SHORT).show();\n }\n }", "void showResultActivity() {\n\n Intent intent = new Intent();\n intent.setClass(this, ScanResultActivity.class);\n startActivity(intent);\n finish();\n\n playEffect();\n }", "public void loadToast(){\n Toast.makeText(getApplicationContext(), \"Could not find city\", Toast.LENGTH_SHORT).show();\n }", "private void showToast(final int resid) {\n\t\tm_toastHandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tToast.makeText(InstrumentService.this, resid, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}", "private View.OnClickListener onScanBarcodeButtonClick() {\n return new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n try {\n final Intent intent = new Intent(OnYard.ZXING_SCAN_ACTION);\n intent.putExtra(\"SCAN_MODE\", \"ONE_D_MODE\");\n getParentFragment().startActivityForResult(intent, SCAN_BARCODE_REQUEST_CODE);\n }\n catch (final Exception e) {\n showScanErrorDialog();\n logError(e);\n }\n }\n };\n }", "private void displayToast(String message) {\n Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n }", "@Override\nprotected void onResume() {\n\tsuper.onResume();\n\t//Toast.makeText(getApplicationContext(), \"onResume\", 1).show();\n}", "@Override\n public void onScanned(Barcode barcode) {\n super.onScanned(barcode);\n\n //on Scan completed close the scanner\n if (isScanning.get()) {\n getChildFragmentManager()\n .beginTransaction()\n .remove(getChildFragmentManager().findFragmentById(R.id.scannerFragment))\n .commit();\n }\n\n isScanning.set(false);\n\n /*\n * this works when if user scan the exist\n * code without scanning the enter code\n */\n boolean waitingForEnterCode = !getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(EXIT) && waitingForEnterCode) {\n String message = \"Its look like that you haven't scan the Enter Code \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n /*\n * this works when user scan the enter code again\n * without scanning the exit code\n */\n boolean waitingForExitCode = getUpdatedPendingEntryEvent();\n if (barcode.rawValue.equals(ENTER) && waitingForExitCode) {\n String message = \"you have already scan the Enter code First scan a Exist \" + new String(Character.toChars(0x1F622));\n showAlertDialog(message);\n return;\n }\n\n if (barcode.rawValue.equals(Constants.IQRCode.ENTER)) {\n viewmodel.updateScannedValueWhenEnter();\n updatePendingEntryEvent(true);\n } else if (barcode.rawValue.equals(EXIT)) {\n viewmodel.updateScannedValueWhenExist();\n updatePendingEntryEvent(false);\n } else {\n Toast.makeText(getActivity(), \"no action specified\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n receiver = new PDAReceiver() {\n\n @Override\n public void dispathCode(String code) {\n handleCode(code);\n\n }\n };\n\n scanDataIntentFilter = new IntentFilter();\n //scanDataIntentFilter.addAction(\"com.android.scancontext\"); //前台输出\n scanDataIntentFilter.addAction(\"com.android.scanservice.scancontext\"); //后台输出\n registerReceiver(receiver, scanDataIntentFilter);\n }", "@Override\n public void onEnterAmbient(Bundle ambientDetails) {\n Toast.makeText(getApplicationContext(), \"Enter\", Toast.LENGTH_LONG).show();\n }", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Library app!\", Toast.LENGTH_SHORT);\n toast.show();\n }", "public void scan() {\n Intent intentScan = new Intent(SCAN_INTENT);\n intentScan.addCategory(Intent.CATEGORY_DEFAULT);\n // avoid calling other phonegap apps\n intentScan.setPackage(this.cordova.getActivity().getApplicationContext().getPackageName());\n\n this.cordova.startActivityForResult((CordovaPlugin) this, intentScan, REQUEST_CODE);\n }", "private void goodScan() {\n resultIcon.setImageDrawable(getDrawable(R.drawable.ic_check_solid));\n resultIcon.setVisibility(View.VISIBLE);\n\n this.quantity--;\n this.instructions.setText(String.format(\n getString(R.string.activity_scan_item__instructions),\n this.quantity, this.name\n ));\n\n if (this.quantity == 0) {\n // All done!\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n doneScanning();\n }\n }, 500);\n\n } else {\n // Add listener back after two (2) seconds\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n ScannerFragment scannerFragment = (ScannerFragment) getFragmentManager().findFragmentById(R.id.fragment_container);\n scannerFragment.setListener2(scannerListener);\n\n resultIcon.setVisibility(View.GONE);\n }\n }, 2000);\n }\n }", "private void badScan() {\n resultIcon.setImageDrawable(getDrawable(R.drawable.ic_times_solid));\n resultIcon.setVisibility(View.VISIBLE);\n\n Beep.beep(this);\n\n // Add listener back after one (1) second\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n ScannerFragment scannerFragment = (ScannerFragment) getFragmentManager().findFragmentById(R.id.fragment_container);\n scannerFragment.setListener2(scannerListener);\n\n resultIcon.setVisibility(View.GONE);\n }\n }, 1000);\n }", "@Override\n public void handleResult(Result result) {\n Log.w(\"handleResult\", result.getText());\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Scan result\");\n builder.setMessage(result.getText());\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n\n\n //Resume scanning\n //mScannerView.resumeCameraPreview(this);\n }", "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 }", "@Override\n public void onNewDetection(int id, final Barcode barcode) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (!mBarcodeDetected) {\n mBarcodeDetected = true;\n mCameraSourcePreview.stop();\n AudioManager audioService = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n if (audioService.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) {\n ToneGenerator toneGenerator\n = new ToneGenerator(AudioManager.STREAM_MUSIC, TONE_VOLUME);\n toneGenerator.startTone(ToneGenerator.TONE_CDMA_PIP, TONE_DURATION);\n }\n onBarcodeDetected(barcode);\n }\n }\n });\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_print_barcode);\r\n\t\t\r\n\t\tiv = (ImageView) findViewById(R.id.iv_test);\r\n\t\tet_input=(EditText)findViewById(R.id.et_input);\r\n\t\tbt_bar = (Button) findViewById(R.id.bt_bar);\r\n\t\tbt_bar.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\t// TODO Auto-generated method stub\r\n\t\t\t\tif (PrintActivity.pl.getState() != PrinterClass.STATE_CONNECTED) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_unconnected), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tString message = et_input.getText().toString();\r\n\r\n\t\t\t\tif (message.getBytes().length > message.length()) {\r\n\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tPrintBarCodeActivity.this.getResources().getString(\r\n\t\t\t\t\t\t\t\t\tR.string.str_cannotcreatebar), 2000).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (message.length() > 0) {\r\n\r\n\t\t\t\t\tbtMap = BarcodeCreater.creatBarcode(PrintBarCodeActivity.this,\r\n\t\t\t\t\t\t\tmessage, PrintService.imageWidth*8, 100, true, 1);\r\n\t\t\t\t\tiv.setImageBitmap(btMap);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\r\n\t\tbt_image = (Button) findViewById(R.id.bt_image);\r\n\t\tbt_image.setOnClickListener(new OnClickListener() {\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tif (btMap != null) {\r\n\t\t\t\t\tPrintActivity.pl.printImage(btMap);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbtMap = BarcodeCreater.creatBarcode(PrintBarCodeActivity.this,\r\n\t\t\t\t\"9787111291954\", PrintService.imageWidth*8, 100, true, 1);\r\n\t\tiv.setImageBitmap(btMap);\r\n\t}", "@Override\n public void onCreate(Bundle state) {\n super.onCreate(state);\n setContentView(R.layout.activity_scanres);\n Bundle extras = getIntent().getExtras();\n tv_barcode = (TextView) findViewById(R.id.tv_barcode);\n tv_barcode.setText(extras.getString(\"result\"));\n\n JSONObject scanJO = new JSONObject();\n try {\n scanJO.put(\"result\", \"result\");\n // scanJO.put(\"two\", \"LLAAASDJSAJDSADSA\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n HttpPost httpPost = new HttpPost(\"https://www.excerp.tech/api/demoPost\", scanJO);\n Thread httpPostThread = new Thread();\n httpPostThread.start();\n try {\n httpPostThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n Log.v(\"RETURN FROM HTTP POT\", httpPost.getResponse());\n }", "public void onClick(View view) {\n Intent intentScan = new Intent(\"com.google.zxing.client.android.SCAN\");\n intentScan.addCategory(Intent.CATEGORY_DEFAULT);\n intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n intentScan.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);\n try {\n startActivityForResult(intentScan, SCAN_QR_REQUEST_CODE);\n } catch (ActivityNotFoundException e) {\n Toast.makeText(getActivity(), R.string.no_qr_scanner_installed,\n Toast.LENGTH_LONG).show();\n }\n }", "private void showResults() {\n verifyFCMToken(this);\n progressDialog.cancel();\n Toast.makeText(RegisterActivity.this, \"Welcome!\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n }", "private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }", "@Override\nprotected void onStart() {\n\tsuper.onStart();\n\t//Toast.makeText(getApplicationContext(), \"Start\", 1).show();\n}", "void toast(int resId);", "public void startScan()\n {\n Toolbox.toast(getContext(), \"Starting scan...\");\n //------------------------------------------------------------\n // Clear the list of devices and make sure user has Bluetooth\n // turned on\n clearDeviceLists();\n if ( !Toolbox.checkBLEAdapter(bleAdapter) )\n {\n Toolbox.requestUserBluetooth(mainActivity);\n }\n else\n {\n scanLeDevice(true);\n }\n }", "void showToast(String message);", "void showToast(String message);", "public void handleDecode(Result rawResult, Bitmap barcode, float scaleFactor) {\n\t inactivityTimer.onActivity();\n\t lastResult = rawResult;\n//\t ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult);\n//\n//\t boolean fromLiveScan = barcode != null;\n//\t if (fromLiveScan) {\n//\t historyManager.addHistoryItem(rawResult, resultHandler);\n//\t // Then not from history, so beep/vibrate and we have an image to draw on\n//\t beepManager.playBeepSoundAndVibrate();\n//\t drawResultPoints(barcode, scaleFactor, rawResult);\n//\t }\n//\n//\t displayBarcodeAnimation(currentEan);\n//\t displayBarcodeAnimation2(rawResult.getText(),barcode);\n//\t \tString message = \"Barcode result: \"\n//\t + \" (\" + rawResult.getText() + ')';\n//\t Toast.makeText(getApplicationContext(), message, Toast.LENGTH_SHORT).show();\n//\t // Wait a moment or else it will scan the same barcode continuously about 3 times\n\t restartPreviewAfterDelay(BULK_MODE_SCAN_DELAY_MS);\n//\t \n\t \n\t \n\t try {\n\t\t\t\tif (barcode != null) {\n\t\t\t\t\tCaptureActivity.BARCODE = \"\";\n\t\t\t\t\tnow.setToNow();\n\t\t\t\t\tcurrentEan = rawResult.getText().trim();\n\t\t\t\t\t\n\t\t\t\t\tif (!lastEan.equals(currentEan)\n\t\t\t\t\t\t\t|| Math.abs(now.second - lastScanTime) >= SAME_PRODUCT_RESCAN_INTERVAL) {\n\t\t\t\t\t\tbeepManager.playBeepSoundAndVibrate();\n\n\t\t\t\t\t\tlastEan = currentEan;\n\t\t\t\t\t\tlastScanTime = now.second;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (currentEan!=null && !currentEan.isEmpty()) {\n\t\t\t\t\t\t\tdrawResultPoints(barcode, scaleFactor, rawResult);\n\t\t\t\t\t\t\tdisplayBarcodeAnimation2(rawResult.getText(),barcode);\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//\n\t\t\t\t\t\t\n//\t\t\t\t\t\trestartPreviewAfterDelay(BULK_MODE_SCAN_DELAY_MS);\n\t\t\t\t\t\tscanEanAddingStarted = true;\n\t\t\t\t\t\twhile (!scanEanRemovingStarted) {\n\t\t\t\t\t\t\tsacannedItemListForArticle.add(currentEan);\n\t\t\t\t\t\t\tscanEanAddingStarted = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tscanImageAddingStarted = true;\n\t\t\t\t\t\twhile (!scanImageRemovingStarted) {\n\t\t\t\t\t\t\tsacannedItemListForImage.add(currentEan);\n\t\t\t\t\t\t\tscanImageAddingStarted = false;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n//\t\t\t\t\t\ttvScanningProgressCounter.setText(\"\"+sacannedItemListForArticle.size()+\" remaining\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tCommonTask.ShowMessage(this, e.getMessage());\n\t\t\t}\n\t }", "@Override\n protected void onResume() {\n // TODO Auto-generated method stub\n super.onResume();\n startScan();\n }", "@Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(getApplicationContext(), \"Success!\",\n Toast.LENGTH_LONG).show();\n }", "public void scanQR(View v) {\n try {\n //start the scanning activity from the com.google.zxing.client.android.SCAN intent\n Intent intent = new Intent(ACTION_SCAN);\n intent.putExtra(\"SCAN_MODE\", \"QR_CODE_MODE\");\n startActivityForResult(intent, 0);\n } catch (ActivityNotFoundException anfe) {\n //on catch, show the download dialog\n showDialog(this, \"No Scanner Found\", \"Download a scanner code activity?\", \"Yes\", \"No\").show();\n }\n }", "private void doneScanning() {\n CustomToast.showTopToast(this, \"Success!\");\n\n instructions.setVisibility(View.GONE);\n resultIcon.setVisibility(View.GONE);\n\n ScanItemSuccessFragment scanItemSuccessFragment = new ScanItemSuccessFragment();\n getFragmentManager().beginTransaction().replace(R.id.fragment_container, scanItemSuccessFragment).commit();\n }", "private void showErrorToast() {\n }", "private void mostrarToast () {\n Toast.makeText(this, \"Imagen guardada en la galería.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tToast.makeText(SampleGoogleOAuthActivity.this, \"������ ���� ����\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}", "@Override\n public void onScanFinished() {\n Log.d(TAG, \"Scan Finished\");\n if(dicePlus == null){\n BluetoothManipulator.startScan();\n }\n }", "public void scanBarcode(View view) {\n IntentIntegrator integrator = new IntentIntegrator(this);\n integrator.setOrientationLocked(true);\n integrator.setCaptureActivity(CaptureActivityPortrait.class);\n integrator.initiateScan();\n }", "@Override\n public void toastText(String s){\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_SHORT).show();\n }", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "public void showToast(String text){\n Toast.makeText(this,text,Toast.LENGTH_SHORT).show();\n }", "private void displayBarcodeAnimation(String barcode) {\n\n\t\t// barcode image\n\t\tBitmap bitmap = null;\n\t\t// show original barcode animation\n\t\ttry {\n\t\t\tint barcodeWidth = (screenWidth * 3) / 4;\n\t\t\tint barcodeHeight = barcodeWidth / 2;\n\t\t\tbitmap = encodeAsBitmap(barcode, BarcodeFormat.CODE_128,\n\t\t\t\t\tbarcodeWidth, barcodeHeight);\n\t\t} catch (WriterException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcaptureImageView.setImageBitmap(bitmap);\n\t\tcapturedBarcodeTextView.setText(barcode);\n\n\t\tbitmap = null;\n\t\tanimationGroup.clearAnimation();\n\t\tanimationGroup.setVisibility(View.VISIBLE);\n\t\tanimationGroup.startAnimation(captureMoveAnimation);\n\n\t}", "@RequiresPermission(allOf = {Manifest.permission.CAMERA, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void scanQRCode(final Activity activityContext, final CameraSourcePreview cameraSourcePreview, final QRCodeScanListener qrCodeScanListener) {\n\n isScanned = false;\n BarcodeDetector barcodeDetector = new BarcodeDetector.Builder(activityContext)\n .setBarcodeFormats(Barcode.QR_CODE)\n .build();\n\n CameraSource cameraSource = new CameraSource.Builder(activityContext, barcodeDetector)\n .setFacing(CameraSource.CAMERA_FACING_BACK)\n .setRequestedPreviewSize(1600, 1024)\n .setAutoFocusEnabled(true)\n .build();\n\n if (cameraSource != null) {\n try {\n cameraSourcePreview.start(cameraSource);\n } catch (IOException e) {\n Log.e(TAG, \"Unable to start camera source.\", e);\n cameraSource.release();\n cameraSource = null;\n }\n }\n\n barcodeDetector.setProcessor(new Detector.Processor<Barcode>() {\n\n @Override\n public void release() {\n }\n\n @Override\n @RequiresPermission(allOf = {Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void receiveDetections(Detector.Detections<Barcode> detections) {\n\n final SparseArray<Barcode> barcodes = detections.getDetectedItems();\n\n if (barcodes.size() != 0 && !isScanned) {\n\n Log.d(TAG, \"Barcodes size : \" + barcodes.size());\n Barcode barcode = barcodes.valueAt(0);\n Log.d(TAG, \"QR Code Data : \" + barcode.rawValue);\n String scannedData = barcode.rawValue;\n\n try {\n JSONObject jsonObject = new JSONObject(scannedData);\n\n String deviceName = jsonObject.optString(\"name\");\n String pop = jsonObject.optString(\"pop\");\n String transport = jsonObject.optString(\"transport\");\n int security = jsonObject.optInt(\"security\", ESPConstants.SecurityType.SECURITY_2.ordinal());\n String userName = jsonObject.optString(\"username\");\n String password = jsonObject.optString(\"password\");\n isScanned = true;\n\n if (qrCodeScanListener != null) {\n qrCodeScanListener.qrCodeScanned();\n }\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n\n @Override\n public void run() {\n cameraSourcePreview.release();\n }\n });\n\n ESPConstants.TransportType transportType = null;\n ESPConstants.SecurityType securityType = null;\n\n if (!TextUtils.isEmpty(transport)) {\n\n if (transport.equalsIgnoreCase(\"softap\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_SOFTAP;\n\n } else if (transport.equalsIgnoreCase(\"ble\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_BLE;\n\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport type not supported\"));\n }\n\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport is not available\"));\n }\n\n securityType = setSecurityType(security);\n\n espDevice = new ESPDevice(context, transportType, securityType);\n espDevice.setDeviceName(deviceName);\n espDevice.setProofOfPossession(pop);\n espDevice.setUserName(userName);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && transportType.equals(ESPConstants.TransportType.TRANSPORT_SOFTAP)) {\n\n WiFiAccessPoint wiFiDevice = new WiFiAccessPoint();\n wiFiDevice.setWifiName(deviceName);\n wiFiDevice.setPassword(password);\n espDevice.setWifiDevice(wiFiDevice);\n qrCodeScanListener.deviceDetected(espDevice);\n } else {\n isDeviceAvailable(espDevice, password, qrCodeScanListener);\n }\n\n } catch (JSONException e) {\n\n e.printStackTrace();\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code not valid\"));\n }\n }\n }\n });\n }", "public void onClickBtSkanuj(View v) {\n activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n IntentIntegrator integrator = new IntentIntegrator(activity);\n integrator.setDesiredBarcodeFormats(IntentIntegrator.QR_CODE);\n integrator.setPrompt(\"Scan\");\n integrator.setCameraId(0);\n integrator.setBeepEnabled(true);\n integrator.setBarcodeImageEnabled(false);\n\n integrator.setOrientationLocked(false);\n integrator.initiateScan();\n }", "public void onClick(View v) {\n Toast toast = Toast.makeText(getApplicationContext(), \"This button will launch my Scores app!\", Toast.LENGTH_SHORT);\n toast.show();\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 }", "private void sendToCatEd()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Education'\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void onClick(View v) {\r\n IntentIntegrator Integrator=new IntentIntegrator(MainStore.this);\r\n Integrator.initiateScan();\r\n }", "private void toast(String aToast) {\n Toast.makeText(getApplicationContext(), aToast, Toast.LENGTH_LONG).show();\n }", "private String getBarcode()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast stregkode: \");\n return scanner.nextLine();\n }", "public void continueOne(View view){\n EditText firstName= (EditText) findViewById(R.id.firstName);\n String firstNameString = firstName.getText().toString();\n EditText lastName= (EditText) findViewById(R.id.lastName);\n String lastNameString= lastName.getText().toString();\n EditText studentID= (EditText) findViewById(R.id.studentId);\n String studentIDString= studentID.getText().toString();\n\n /**Toasts are the things that are like mini notifications that you'll see at the bottom of the screen.*/\n Context context = getApplicationContext();\n CharSequence text = \"Let's do this, \" + firstNameString + \"!\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n /**The following is an intent to start the next activity (mainCodeOne), and carry the key user data with it. MainActivityOne*/\n Intent intentOne = new Intent(this, AndroidBarcodeActivityOne.class);\n intentOne.putExtra(\"firstNameString\", firstNameString);\n intentOne.putExtra(\"lastNameString\", lastNameString);\n intentOne.putExtra(\"studentIDString\", studentIDString);\n startActivity(intentOne);\n\n\n }", "public static void openQrCodeReader(AppCompatActivity activity) {\n IntentIntegrator integrator = new IntentIntegrator(activity);\n integrator.initiateScan();\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tToast.makeText(context, \"下载成功\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t}", "@Override protected void onPreExecute() {\r\n // A toast provides simple feedback about an operation as popup. \r\n // It takes the application Context, the text message, and the duration for the toast as arguments\r\n //android.widget.Toast.makeText(mContext, \"Going for the network call..\", android.widget.Toast.LENGTH_LONG).show();\r\n }", "@Override\r\n\tpublic void onStartedCheckPincode() {\n\r\n\t\tpDialog = new ProgressDialog(getActivity());\r\n\t\tpDialog.setMessage(\"Checking Service Availability...\");\r\n\t\tpDialog.setCancelable(false);\r\n\t\tpDialog.setCanceledOnTouchOutside(false);\r\n\t\tpDialog.show();\r\n\r\n\t}", "@Override\n public void onThinking() {\n toast(\"Processing\");\n showDialog();\n }", "@Override\n protected void onReceiveResult(int resultCode, Bundle resultData)\n {\n if (resultCode == Constants.SUCCESS_RESULT) {\n //showToast(getString(R.string.address_found));\n }\n\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tLog.d(\"info\",content);\n\t\t\t\t\tToast.makeText(getApplicationContext(), content, Toast.LENGTH_LONG).show();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tLog.d(\"info\",content);\n\t\t\t\t\tToast.makeText(getApplicationContext(), content, Toast.LENGTH_LONG).show();\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n\n controlVisBAR();\n barcodeView.decodeContinuous(callback);\n// barcodeView.resume();\n\n barcodeView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n controlVisCAM();\n }\n });\n }", "@RequiresPermission(allOf = {Manifest.permission.CAMERA, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH, Manifest.permission.ACCESS_FINE_LOCATION})\n public void scanQRCode(final CodeScanner codeScanner, final QRCodeScanListener qrCodeScanListener) {\n\n isScanned = false;\n List<BarcodeFormat> formats = new ArrayList<>();\n formats.add(BarcodeFormat.QR_CODE);\n\n codeScanner.setDecodeCallback(new DecodeCallback() {\n @Override\n public void onDecoded(@NonNull final Result result) {\n\n String scannedData = result.getText();\n\n if (!TextUtils.isEmpty(scannedData) && !isScanned) {\n\n Log.d(TAG, \"QR Code Data : \" + scannedData);\n\n try {\n JSONObject jsonObject = new JSONObject(scannedData);\n\n String deviceName = jsonObject.optString(\"name\");\n String pop = jsonObject.optString(\"pop\");\n String transport = jsonObject.optString(\"transport\");\n int security = jsonObject.optInt(\"security\", ESPConstants.SecurityType.SECURITY_2.ordinal());\n String userName = jsonObject.optString(\"username\");\n String password = jsonObject.optString(\"password\");\n isScanned = true;\n\n if (qrCodeScanListener != null) {\n qrCodeScanListener.qrCodeScanned();\n }\n\n Handler handler = new Handler(Looper.getMainLooper());\n handler.post(new Runnable() {\n\n @Override\n public void run() {\n codeScanner.releaseResources();\n }\n });\n\n ESPConstants.TransportType transportType = null;\n ESPConstants.SecurityType securityType = null;\n\n if (!TextUtils.isEmpty(transport)) {\n\n if (transport.equalsIgnoreCase(\"softap\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_SOFTAP;\n\n } else if (transport.equalsIgnoreCase(\"ble\")) {\n\n transportType = ESPConstants.TransportType.TRANSPORT_BLE;\n\n } else {\n Log.e(TAG, \"\" + transport + \" Transport type is not supported\");\n qrCodeScanListener.onFailure(new RuntimeException(\"Transport type is not supported\"));\n return;\n }\n } else {\n Log.e(TAG, \"Transport is not available in QR code data\");\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n return;\n }\n\n securityType = setSecurityType(security);\n\n espDevice = new ESPDevice(context, transportType, securityType);\n espDevice.setDeviceName(deviceName);\n espDevice.setProofOfPossession(pop);\n espDevice.setUserName(userName);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && transportType.equals(ESPConstants.TransportType.TRANSPORT_SOFTAP)) {\n\n WiFiAccessPoint wiFiDevice = new WiFiAccessPoint();\n wiFiDevice.setWifiName(deviceName);\n wiFiDevice.setPassword(password);\n espDevice.setWifiDevice(wiFiDevice);\n qrCodeScanListener.deviceDetected(espDevice);\n } else {\n isDeviceAvailable(espDevice, password, qrCodeScanListener);\n }\n\n } catch (JSONException e) {\n\n e.printStackTrace();\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n }\n } else {\n qrCodeScanListener.onFailure(new RuntimeException(\"QR code is not valid\"), scannedData);\n }\n }\n });\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "public interface BarcodeListener {\n void onBarCodeScanned( Barcode scannedBarCode );\n}", "void showToast(String value);", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n ScannerView = new ZXingScannerView(this);\n setContentView(ScannerView);\n\n int currApi = Build.VERSION.SDK_INT;\n\n if(currApi >= Build.VERSION_CODES.M){\n /*\n if(checkPermission()){\n Toast.makeText(getApplicationContext(),\"Permission Granted\", Toast.LENGTH_LONG).show();\n }\n else{\n requestPermission();\n }*/\n if(!checkPermission()){\n requestPermission();\n }\n }\n }", "private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }", "private void doToast() {\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\t\r\n\t\t// Create and send toast\r\n\t\tContext context = getApplicationContext();\r\n\t\tint duration = Toast.LENGTH_SHORT;\r\n\t\tToast toast = Toast.makeText(context, message, duration);\r\n\t\ttoast.show();\r\n\t}", "@Override\n public void permissionsGranted() {\n showScanner();\n }", "@Override\n\t\t\tpublic void onFailed(String str) {\n\t\t\t\tToast.makeText(MainActivity.this, str, Toast.LENGTH_LONG).show();\n\t\t\t}", "public void successfulReservation()\n {\n showToastMessage(getResources().getString(R.string.successfulReservation));\n }", "@JavascriptInterface\r\n public String startScanning() throws JSONException {\r\n try {\r\n if (ContextCompat.checkSelfPermission(mContext, android.Manifest.permission.CAMERA)\r\n != PackageManager.PERMISSION_GRANTED) {\r\n mClss = FullScannerFragmentActivity.class;\r\n\r\n ActivityCompat.requestPermissions(((Activity)mContext),\r\n new String[]{android.Manifest.permission.CAMERA}, 1);\r\n } else {\r\n Intent intent = new Intent(mContext, FullScannerFragmentActivity.class);\r\n //mContext.startActivity(intent);\r\n ((Activity)mContext).startActivityForResult(intent, 0);\r\n }\r\n\r\n } catch (Exception e) {\r\n Log.d(\"Scanning\", e.getMessage());\r\n\r\n }\r\n\r\n return;\r\n\r\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n IntentResult result = IntentIntegrator.parseActivityResult(requestCode, resultCode, data);\n if (result != null) {\n if (result.getContents() == null) {\n Toast.makeText(this, \"Result Not Found\", Toast.LENGTH_LONG).show();\n } else {\n partNumber = result.getContents();\n new BackgroundTaskScanQrCode().execute();\n }\n } else {\n super.onActivityResult(requestCode, resultCode, data);\n }\n }" ]
[ "0.7346528", "0.7239791", "0.7131363", "0.6809939", "0.67773855", "0.67739815", "0.676739", "0.6644014", "0.6593225", "0.659102", "0.65490246", "0.64963", "0.6420349", "0.635273", "0.6342018", "0.630615", "0.63038", "0.6275574", "0.6267865", "0.6247499", "0.62030315", "0.6180594", "0.61510074", "0.61412656", "0.61381817", "0.61198974", "0.6068806", "0.60485816", "0.60418445", "0.6022101", "0.6017242", "0.6015437", "0.5993458", "0.5991508", "0.59703696", "0.595694", "0.5946816", "0.59412277", "0.5932238", "0.592083", "0.5915708", "0.5914994", "0.5914529", "0.59085333", "0.59082836", "0.5906686", "0.5902108", "0.58910954", "0.5887841", "0.5878932", "0.58709055", "0.5863656", "0.58483917", "0.5826442", "0.5826442", "0.581811", "0.5811666", "0.5795986", "0.57957256", "0.57935524", "0.57864624", "0.57806915", "0.57783043", "0.5776894", "0.5762933", "0.5756137", "0.5749973", "0.574693", "0.5743414", "0.57380664", "0.57324624", "0.5725371", "0.57224005", "0.5715967", "0.5712239", "0.57100683", "0.57028544", "0.56964254", "0.5694651", "0.5694238", "0.5689952", "0.56855494", "0.5684666", "0.568341", "0.5681158", "0.5681158", "0.5679387", "0.5678831", "0.5664489", "0.56623775", "0.565086", "0.56474507", "0.5647027", "0.5644544", "0.5644311", "0.56413025", "0.5640988", "0.5622493", "0.56157726", "0.56084204" ]
0.5730135
71