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
ArrayList trailList = new ArrayList();
public HashMap<String,Trail> getJSONData() { HashMap<String,Trail> trailList1 = new HashMap<String,Trail>(); String jsonStr; int counter=0; try { InputStream is = getResources().openRawResource( getResources().getIdentifier("trail_detail", "raw", getPackageName())); int size = is.available(); byte[] buffer = new byte[size]; is.read(buffer); is.close(); jsonStr = new String(buffer, "UTF-8"); Log.d("Response: ", "> " + jsonStr); JSONArray jsonArray = new JSONArray(jsonStr); for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObj = jsonArray.getJSONObject(i); counter++; String name =jsonObj.getString(TAG_NAME); Double length = Double.parseDouble(jsonObj.getString(TAG_LENGTH)); String type = jsonObj.getString(TAG_TYPE); String surface = jsonObj.getString(TAG_SURFACE); String amenities = jsonObj.getString(TAG_AMENITIES); String parking = jsonObj.getString(TAG_PARKING); String season = jsonObj.getString(TAG_SEASON); String lighting = jsonObj.getString(TAG_LIGHTING); String maintenance = jsonObj.getString(TAG_MAINTENANCE); String pets = jsonObj.getString(TAG_PETS); String notes = jsonObj.getString(TAG_NOTES); String city = jsonObj.getString(TAG_CITY); trailList1.put(name, new Trail(name, length, type, surface, amenities, parking, season, lighting, maintenance, pets, notes, city)); // trailList.add(new Trail(name, length, type, surface, // amenities, parking, season, lighting, maintenance, // pets, notes, city)); } } catch (JSONException e) { e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return trailList1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TraceList(){\n\t\tthis.traces=new ArrayList<>();\n\t}", "Sharks() {\n sharks = new ArrayList<Shark>(); // Initialize the ArrayList\n }", "public Molt(){\n molt=new ArrayList<>();\n }", "private void initReferences() {\n trails = new ArrayList<>();\n keys = new ArrayList<>();\n trailAdapter = new TrailAdapter(this, R.layout.trail_row_layout, trails);\n floatingActionButton = (FloatingActionButton) findViewById(R.id.fab);\n trailListView = (ListView) findViewById(R.id.trail_list);\n trailEmptyText = (TextView) findViewById(R.id.empty_value);\n trailListView.setEmptyView(trailEmptyText);\n trailListView.setAdapter(trailAdapter);\n }", "public BuildHistory(){\n buildHistory = new ArrayList<Build>();\n }", "public Pile(){\n pile = new ArrayList<Card>();\n }", "public VitalSignsHistory(){\n \n vitalSignsHistory = new ArrayList<VitalSigns>(); //Initiaizing ArrayList\n \n }", "private void CreateStudentList() {\r\n\t\tStudentList=new ArrayList<Student>();\t\r\n}", "public TrazoLibre() {\n this.linea = new ArrayList();\n }", "myArrayList() {\n\t\thead = null;\n\t\ttail = null;\n\t}", "ArrayListOfStrings () {\n list = new ArrayList<String>();\n }", "public MusicScore ()\n {\n score = new ArrayList<Note>();\n }", "public ArrayList() {\n\t\tthis.elements = new Object[5];\n\t\tthis.last = -1;\n\t}", "public TraceList(List<Trace> traces){\n\t\tthis.traces=traces;\n\t}", "public ListPolygone() {\n this.list = new ArrayList();\n }", "public ArrayListStack() {\n\t\telements = new ArrayList<>();\n\t}", "public SafetyPile(){\r\n this.cards = new ArrayList<Card>();\r\n }", "public ArrayList<Node> getTrack(){\n ArrayList<Node> track = new ArrayList<>();\n Node attuale = end_node;\n while(attuale != null){\n track.add(attuale);\n attuale = precedenti.get(attuale);\n }\n Collections.reverse(track);\n return track;\n }", "public LlistaPistes() {\n _llistaPistes = new ArrayList();\n }", "public Player()\n {\n playerItem = new ArrayList();\n }", "public TradeList() {\n this.trades = new ArrayList<>();\n }", "public TiraList() {\n this.list = new Object[8];\n this.nextindex = 0;\n this.startIndex = 0;\n }", "public TempList() {\n list = new ArrayList<T>();\n }", "testarray() {\r\n \tarrayList = new Arraylist();\t\r\n\t}", "public ArrayListStack(){\r\n theData = new ArrayList<E>();\r\n }", "public ArrayListNotes()\n {\n // initialise instance variables\n //x = 0;\n }", "public ArrayListBag() {\n\t\tlist = new ArrayList<T>();\n\t}", "public Highscore() {\n scores = new ArrayList<Score>();\n }", "public static <T> ArrayList<T> createArrayList() {\n \t\treturn new ArrayList<T>();\n \t}", "static void q2(){\n\t\tArrayList<Integer>myList=new ArrayList<>();\n\t\t\n\t}", "private List<Performance> quizHistory(){\n\t\treturn history;\n\t}", "public Player()\r\n {\r\n playerItem = new ArrayList();\r\n }", "Flock() {\n boids = new ArrayList<Boid>(); // Initialize the ArrayList\n }", "Flock() {\n boids = new ArrayList<Boid>(); // Initialize the ArrayList\n }", "public RVO_2_1() {\n super();\n orcaLines = new ArrayList<Line>();\n }", "ListOfBooks(){\n \tlist = new LinkedList<Book>();\n }", "protected LinkedList getBasicTraces() {\n\t\treturn traces;\n\t}", "public ArrayList<History> getPriceHistory() { return priceHistory; }", "public CommandHistoryLinkedList() {\r\n\t\thistoryDate = new LinkedList<String>();\r\n\t\thistoryAL = new LinkedList<ArrayList<String>>();\r\n\t}", "public Teacher() {\n// coursesTaught = new ArrayList<Course>();\n }", "public ArrayList<Flight> legs()\n {\n \t return this.mLegs;\n }", "private MyAlbumList() {\n albums = new ArrayList<Album>();\n }", "ArrayList<Move> getMoveHistory() {\n return _moveHistory;\n }", "private List<? extends Object> getTail(List<? extends Object> trace) {\r\n\t\tList<Object> tail = new ArrayList<Object>(trace.size() - 1);\r\n\t\tfor (int i = 1; i < trace.size(); i++) {\r\n\t\t\ttail.add(trace.get(i));\r\n\t\t}\r\n\t\treturn tail;\r\n\t}", "public OrderedArrayList()\n {\n _data = new ArrayList<Comparable>();\n }", "public OrderedArrayList()\n {\n\t_data = new ArrayList<Comparable>();\n }", "public Todoist()\n {\n tareas = new ArrayList<String>();\n }", "public Todoist()\n {\n tareas = new ArrayList<String>();\n }", "public void setTray(ArrayList<Tile> newTray){ this.tray = newTray; }", "public TreeList()\n {\n\t this.lst = new AVLTree();\n\t this.length = 0;\n }", "protected ArrayList<Bullet> getBullets()\r\n\t{\r\n\t\treturn bullets;\r\n\t}", "ArrayList<IPlayer> buildPlayerList();", "public void legs(ArrayList<Flight> legs)\n {\n \tthis.mLegs=legs;\n }", "public ListStack() {\n\t\tlist = new ArrayList<>();\n\t}", "public House() {\n this.pointsHistory = new ArrayList<>();\n }", "public void NewTrail(float[] positions, float trailLength)\n {\n float distanceBetweenEffects = trailLength / instantiateNumber;\n Log.d(\"--WTF--\",\"tl \" + trailLength + \"dbe \" + distanceBetweenEffects);\n //trail.clear();\n trail.get(0).Set(getWorldCoords(new Vec2(positions[0], positions[1]))); // początek\n\n float currUnusedLength = 0f;\n int effects = 1;\n for (int i = 2; i < positions.length; i=i+2)\n {\n // reszta odl. z poprzednich punktow + dystans miedzy tym pkt a poprzednim\n Vec2 A = new Vec2(positions[i-2],positions[i-1]);\n Vec2 B = new Vec2(positions[i],positions[i+1]);\n float distanceBetweenPoints = GetPointsDistance(A,B);\n currUnusedLength = currUnusedLength + distanceBetweenPoints;\n if(currUnusedLength > distanceBetweenEffects)\n {\n // jest wiekszy od odleglosci miedzy kolejnymi efektami, oznacza to ze\n // juz nie czas na umieszczenie kolejnego efektu\n float d = distanceBetweenPoints - (currUnusedLength-distanceBetweenEffects);\n float Xac = d * (B.X()-A.X())/distanceBetweenPoints;\n float Yac = d * (B.Y()-A.Y())/distanceBetweenPoints;\n\n if(effects < instantiateNumber)trail.get(effects).Set(getWorldCoords(new Vec2(A.X()+Xac, A.Y()+Yac)));\n else break;\n\n effects++;\n currUnusedLength = (currUnusedLength-distanceBetweenEffects);\n }\n }\n if(effects <= instantiateNumber)sqNumber = effects;\n else sqNumber = instantiateNumber;\n showThem = true;\n showBigStar = false;\n }", "public void create() {\n String[] arrays = new String[100];\n ArrayList<String> list1 = new ArrayList(); //Object[10]\n list1.size(); //0\n list1.add(\"Vivek\"); //object[0] = \"Vivek\"\n list1.size(); //1\n list1.get(0);//\"Vivek\"\n\n list1.remove(1);\n\n list1.add(0, \"Vivek\");\n\n\n ArrayList<String> list3 = new ArrayList<String>(list1);\n\n ArrayList<Student> list = new ArrayList<Student>();\n\n\n\n }", "public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }", "public ArrayList<Event> getEvents(){return new ArrayList<Event>(events);}", "public void createMatchList()\r\n {\r\n theMatchList = new MatchList();\r\n }", "private JList getLogList() {\n\t\tif (logList == null) {\n\t\t\tlogList = new JList();\n\t\t\tlogList.setBounds(new Rectangle(124, 313, 300, 100));\n\t\t}\n\t\treturn logList;\n\t}", "public AcademicHistory() {\n listOfTerms = new ArrayList<Term>();\n }", "public TravelMap() {\n\t\tfor (int i = 0; i < 100; i++) {\n\t\t\tadjacencyList.add(new ArrayList<>());\n\t\t}\n\t}", "public static void addList() {\n\t}", "public ArrayList<String> getArrayList(int nbr) {\n ArrayList<String> historyList = new ArrayList<String>();\n for (int i=0; i<n && i<nbr; i++) {\n historyList.add(history[i]);\n }\n return historyList;\n }", "public StockExchange()\n {\n stocks = new ArrayList<Stock>();\n }", "public MyArrayList ()\r\n {\r\n \tlist = new Object[100];\r\n \tnumElements = 0;\r\n }", "public ListDA() {\n elements = new Object[CAPACITY];\n }", "public ArrayList<AirTimeHistory> getAllHistory() {\n\t Cursor histories = db.query(TABLE_AIRTIME_HISTORY, null, null, null, null, null, KEY_ID + \" DESC\");\n\t \n\t ArrayList<AirTimeHistory> result = new ArrayList<AirTimeHistory>();\n\t if (histories.moveToFirst()){\n\t\t do {\n\t\t\t AirTimeHistory newItem = new AirTimeHistory();\n\t\t\t newItem.setID(histories.getString(0));\n\t\t\t newItem.setEmail(histories.getString(USER_EMAIL_COLUMN));\n\t\t\t newItem.setPhoneNumber(histories.getString(USER_NUMBER_COLUMN));\n\t\t\t newItem.setNetwork(histories.getString(NETWORK_COLUMN));\n\t\t\t newItem.setAmount(histories.getString(AMOUNT_COLUMN));\n\t\t\t newItem.setDateTime(histories.getString(DATE_TIME_COLUMN));\n\t\t\t newItem.setNetworkIndex(histories.getString(NETWORK_INDEX_COLUMN));\n\t\t\t newItem.setTransactionID(histories.getString(TRANSACTION_ID_COLUMN));\n\t\t\t newItem.setTransactionStatus(histories.getString(TRANSACTION_STATUS_COLUMN));\n\t\t\t newItem.setCountry(histories.getString(COUNTRY_COLUMN));\n\t\t\t newItem.setCountryIndex(histories.getString(COUNTRY_INDEX_COLUMN));\n\t\t\t newItem.setChosenAmountIndex(histories.getString(CHOSEN_AMOUNT_INDEX_COLUMN));\n\t\t\t newItem.setCurrency(histories.getString(CURRENCY_COLUMN));\n\t\t\t newItem.setTopupStatus(histories.getString(TOPUP_STATUS_COLUMN));\n\t\t\t newItem.setGatewayID(histories.getString(GATEWAY_ID3_COLUMN));\n\t\t\t newItem.setServerTime(histories.getString(SERVER_TIME_COLUMN));\n\t\t\t newItem.setAmountCharged(histories.getString(AMOUNT_CHARGED_COLUMN));\n\t\t\t newItem.setPayUrl(histories.getString(PAY_URL_COLUMN));\n\t\t\t \n\t\t\t result.add(newItem);\n\t\t } while(histories.moveToNext());\n\t }\n\t \n\t histories.close();\n\t \n\t return result;\n\t}", "public static ArrayList<Player> getWinners(){return winners;}", "public static <T> void genericMethod() {\n ArrayList<T> tList = new ArrayList<>();\r\n }", "Object getTolist();", "public ArrayList<PurchaseHistory> CreateShoppingTrip() {\n //TODO: implement this method\n return null;\n }", "public ArrayList<TradeRequest> getTradeRequests(){return tradeRequests;}", "public ArrayList makeStudentList() {\r\n ArrayList<String> studenter = new ArrayList();\r\n Student student = new Student();\r\n \r\n \r\n \r\n return studenter;\r\n}", "@SuppressWarnings(\"unchecked\") // <.>\n static void wordList(){\n ArrayList wordList = new ArrayList<>(); // <.>\n wordList.add(\"cat\");\n wordList.add(\"dog\");\n\n System.out.println(\"Word list => \" + wordList);\n }", "public MyStack() {\n \tlist = new ArrayList<Integer>();\n }", "ArrayList<String> getLines();", "public List<New> list();", "public Stack() {\n \tstack = new ArrayList<T>();\n }", "public List<LineaDeLog> getLog(){\n\t\treturn new ArrayList<LineaDeLog>(logDao.list());\r\n\t}", "public Hand(){\n cards = new ArrayList<Card>();\n }", "public ContactList()\n {\n myList = new ArrayList<>();\n }", "public void listar() {\n\t\t\n\t}", "public ArrayList<Tile> getTiles(){\r\n return tiles;\r\n }", "public MyArrayList() {\n data = new Object[10];\n }", "public static void b()\n/* */ {\n/* 92 */ c = new ArrayList();\n/* 93 */ for (aur localaur : b) {\n/* 94 */ localaur.c = 0;\n/* 95 */ c.add(localaur);\n/* */ }\n/* 97 */ d = null;\n/* */ }", "private ParticleMesh createAstroidTrail(final Spatial asteroidmodel) {\r\n ParticleMesh pMesh = ParticleFactory.buildParticles(\"tail\", 180,\r\n ParticleType.Quad);\r\n pMesh.setEmissionDirection(new Vector3f(1, 1, 1));\r\n pMesh.setOriginOffset(new Vector3f(0, 0, 0));\r\n pMesh.setInitialVelocity(0.005f);\r\n pMesh.setStartSize(50);\r\n pMesh.setEndSize(1);\r\n pMesh.setMinimumLifeTime(5000f);\r\n pMesh.setMaximumLifeTime(7000f);\r\n pMesh.setStartColor(new ColorRGBA(0.5f, 0.5f, 1, 0.5f));\r\n pMesh.setParticleSpinSpeed(180 * FastMath.DEG_TO_RAD);\r\n pMesh.setGeometry((Geometry)asteroidmodel);\r\n pMesh.getParticleController().setControlFlow(false);\r\n \r\n pMesh.forceRespawn();\r\n \r\n pMesh.setModelBound(new BoundingBox());\r\n pMesh.updateModelBound();\r\n pMesh.setCullHint(Spatial.CullHint.Never);\r\n\r\n // removes the asteroid from the scene after the particle trail has died\r\n pMesh.getParticleController().addListener(new OnDeadListener());\r\n \r\n pMesh.setRenderState(ts);\r\n pMesh.setRenderState(bs);\r\n pMesh.setRenderState(zs);\r\n \r\n asteroidTrails.add(pMesh);\r\n \r\n return pMesh;\r\n }", "public ParticleMesh getAsteroidTrail(final Spatial asteroidmodel) {\r\n for (int x = 0, tSize = asteroidTrails.size(); x < tSize; x++) {\r\n ParticleMesh e = asteroidTrails.get(x);\r\n if (!e.isActive()) {\r\n Logger.getLogger(this.getClass().getName()).warning(\"re-using asteroid trail, parent:\" +e.getParent());\r\n e.removeFromParent();\r\n e.getParticleController().setRepeatType(Controller.RT_WRAP);\r\n e.forceRespawn();\r\n return e;\r\n }\r\n }\r\n return createAstroidTrail(asteroidmodel);\r\n }", "ArrayList<Sprite> getSpriteArray();", "public ArrayList<Player> getPlayers() {\n return players;\n}", "public abstract NSMutableArray<I_WorkFlowItem> tachesObligatoires();", "public ArrayList<Movable> getProjectiles(){\n\t\tArrayList<Movable> moving = new ArrayList<Movable>(temp);\n\t\ttemp = new ArrayList<Movable>();\n\t\treturn moving;\n\t}", "public JsfVenda() {\r\n litem = new ArrayList();\r\n }", "public static ArrayList getLines() {\n return lines;\n }", "public void limpaPontos() {\n\t\tthis.pontos = new ArrayList<Point>();\n\t}", "public MyArrayList() {\r\n\t\tthis.list=new Object[this.capacity];\r\n\t}", "public ArrayList getList() {\n \t\treturn list;\n \t}", "public abstract ArrayList<AprilTagDetection> getDetections();", "public String toString() {\n\t\treturn trail.toString();\n\t}" ]
[ "0.6717898", "0.65319526", "0.6427571", "0.61661446", "0.6110898", "0.6101803", "0.6040379", "0.5876733", "0.58641875", "0.58449006", "0.5799561", "0.5748172", "0.5733466", "0.57288", "0.5713207", "0.5712678", "0.5697257", "0.56849384", "0.56502044", "0.564967", "0.56420124", "0.5639016", "0.5618054", "0.5605826", "0.55917984", "0.55817574", "0.5581666", "0.5580746", "0.55794615", "0.55671334", "0.5543698", "0.55388707", "0.55373293", "0.55373293", "0.55339855", "0.55193204", "0.55187607", "0.5516938", "0.5508143", "0.55038273", "0.5501077", "0.54971826", "0.548995", "0.5486926", "0.5472988", "0.54653925", "0.5460062", "0.5460062", "0.54568857", "0.5439518", "0.5438467", "0.5438236", "0.54318243", "0.5431682", "0.54257804", "0.5425681", "0.5416596", "0.5414678", "0.54136574", "0.54130095", "0.54108167", "0.5399842", "0.5399394", "0.5387981", "0.53839165", "0.5383294", "0.53811216", "0.53744566", "0.5368804", "0.53456914", "0.533792", "0.5331348", "0.5320782", "0.53194904", "0.53190476", "0.5312012", "0.5307666", "0.5305939", "0.52959573", "0.5291044", "0.52904904", "0.52895856", "0.5277042", "0.52739567", "0.5273181", "0.5269624", "0.526729", "0.5266155", "0.5265227", "0.52603745", "0.5260159", "0.52597326", "0.52586067", "0.524668", "0.52458274", "0.5244871", "0.5244555", "0.52424955", "0.52410233", "0.52369994" ]
0.5310954
76
TODO Autogenerated method stub
@Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { finish(); } return super.onOptionsItemSelected(item); }
{ "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
Called when the activity is first created.
@Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.settings); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "protected void onCreate() {\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n initData();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n public void onCreate() {\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}", "public void onCreate() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "@Override\n public void onCreate()\n {\n\n\n }", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}", "public void onCreate();", "public void onCreate();", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }", "@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }", "@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}", "@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }" ]
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879", "0.74805456", "0.7475343", "0.7469598", "0.7469598", "0.7455178", "0.743656", "0.74256307", "0.7422192", "0.73934627", "0.7370002", "0.73569906", "0.73569906", "0.7353011", "0.7347353", "0.7347353", "0.7333878", "0.7311508", "0.72663945", "0.72612154", "0.7252271", "0.72419256", "0.72131634", "0.71865886", "0.718271", "0.71728176", "0.7168954", "0.7166841", "0.71481615", "0.7141478", "0.7132933", "0.71174103", "0.7097966", "0.70979583", "0.7093163", "0.7093163", "0.7085773", "0.7075851", "0.7073558", "0.70698684", "0.7049258", "0.704046", "0.70370424", "0.7013127", "0.7005552", "0.7004414", "0.7004136", "0.69996923", "0.6995201", "0.69904065", "0.6988358", "0.69834954", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69783133", "0.6977392", "0.69668365", "0.69660246", "0.69651115", "0.6962911", "0.696241", "0.6961096", "0.69608897", "0.6947069", "0.6940148", "0.69358927", "0.6933102", "0.6927288", "0.69265485", "0.69247025" ]
0.0
-1
Called when a pokemob tries to mega evolve.
@Override public boolean canChange(IPokemob mob, PokedexEntry changeTo) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public boolean shouldRevolve() {\n return true;\r\n }", "protected void evolve()\n\t\t{\tif(this_gen < NUMBER_GENERATIONS) {\n\t\t\t\t// Create a new generation.\n\t\t\t\tfloat avg_fit=Float.MIN_VALUE, max_fit=Float.MIN_VALUE, sum_fit=0;\n\t\t\t\tfloat tot_wait=0, avg_wait=0, tot_move=0, avg_move=0;\n\n\t\t\t\tfor(int i=0;i<NUMBER_INDIVIDUALS;i++) {\n\t\t\t\t\tfloat fit = calcFitness(inds[i]);\n\t\t\t\t\tinds[i].setFitness(fit);\n\t\t\t\t\tsum_fit\t += fit;\n\t\t\t\t\tmax_fit = fit>max_fit ? fit : max_fit;\n\t\t\t\t\ttot_wait += inds[i].getWait();\n\t\t\t\t\ttot_move += inds[i].getMove();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tavg_wait = tot_wait/NUMBER_INDIVIDUALS;\n\t\t\t\tavg_move = tot_move/NUMBER_INDIVIDUALS;\n\t\t\t\tavg_fit = sum_fit/NUMBER_INDIVIDUALS;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Stats of prev. gen: (a-wait,a-move)=(\"+avg_wait+\",\"+avg_move+\")\"+\" (a-fit,mx-fit)=(\"+avg_fit+\",\"+max_fit+\")\");\n\t\t\t\tSystem.out.println(\"Evolving...\");\n\t\t\t\t\n\t\t\t\t// Sorts the current Individual-array on fitness, descending\n\t\t\t\tinds = sortIndsArr(inds);\n\t\t\t\t\n\t\t\t\tint num_mating = (int) Math.floor(NUMBER_INDIVIDUALS*(1-ELITISM_FACTOR));\n\t\t\t\tint num_elitism = (int) Math.ceil(NUMBER_INDIVIDUALS*ELITISM_FACTOR);\n\t\t\t\tif(num_mating%2!=0) {\n\t\t\t\t\tnum_mating--;\n\t\t\t\t\tnum_elitism++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tIndividual[] newInds = new Individual[NUMBER_INDIVIDUALS];\n\t\t\t\t\n\t\t\t\t// Tournament selection\n\t\t\t\tfor(int i=0;i<num_mating;i+=2) {\n\t\t\t\t\tIndividual mamma=null, pappa=null;\n\t\t\t\t\tfloat chn_mum = random.nextFloat();\n\t\t\t\t\tfloat chn_pap = random.nextFloat();\n\t\t\t\t\tfloat fit_mum, sum_fit2=0, sum_fit3=0;\n\t\t\t\t\tint index_mum = -1;\n\t\t\t\t\t\n\t\t\t\t\tfor(int j=0;j<NUMBER_INDIVIDUALS;j++) {\n\t\t\t\t\t\tsum_fit2 += (inds[j].getFitness()/sum_fit);\n\t\t\t\t\t\tif(chn_mum <= sum_fit2) {\n\t\t\t\t\t\t\tmamma = inds[j];\n\t\t\t\t\t\t\tindex_mum = j;\n\t\t\t\t\t\t\tfit_mum = mamma.getFitness();\n\t\t\t\t\t\t\tsum_fit2 = sum_fit-fit_mum;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfor(int j=0;j<NUMBER_INDIVIDUALS;j++) {\n\t\t\t\t\t\tif(j!=index_mum) {\n\t\t\t\t\t\t\tsum_fit3 += (inds[j].getFitness()/sum_fit2);\n\t\t\t\t\t\t\tif(chn_pap <= sum_fit3) {\n\t\t\t\t\t\t\t\tpappa = inds[j];\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//System.out.println(\"Mating...: \"+mamma.getFitness()+\",\"+pappa.getFitness());\n\t\t\t\t\tIndividual[] kids = mate(mamma, pappa);\n\t\t\t\t\tnewInds[i]\t= kids[0];\n\t\t\t\t\tnewInds[i+1]= kids[1];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Elitism\n\t\t\t\tfor(int i=0;i<num_elitism;i++) {\n\t\t\t\t\tnewInds[i+num_mating] = inds[i];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tinds = newInds;\t\t\t\t\t\t\t\t\n\t\t\t\tthis_gen++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Done with evolving\");\n\t\t\t\t// set the best individual as the ruling champ?\n\t\t\t\t// do nothing\n\t\t\t\treturn;\n\t\t\t}\n\t\t}", "@Override\n public void evolve(Island myIsland) {\n }", "@Override\r\n public void changedUpdate(DocumentEvent e) {\n HayCambio();\r\n }", "public void evolve() {\n\t\tfurniturePriority++;\r\n\t}", "@Override\n\tpublic void eggHatches() {\n\t\t\n\t}", "protected int[] evolve(BaseEvolution evolution) {\n Game.getPlayer().getMedalCase().increase(MedalTheme.POKEMON_EVOLVED);\n\n boolean sameName = nickname.equals(pokemon.getName());\n int numAbilities = this.getPokemonInfo().numAbilities();\n\n // Actually change Pokemon\n pokemon = evolution.getEvolution();\n\n // Set name if it was not given a nickname\n if (sameName) {\n nickname = pokemon.getName();\n }\n\n // Update ability\n this.assignAbility(numAbilities);\n\n // Update stats and return gain\n return this.setStats();\n }", "public void evolve_enviroment() {\r\n\r\n // this.main_population.update_population();\r\n // get the indices of the best individual in the main population\r\n int main_pop_best = this.main_population.getBest_indices();\r\n\r\n // create a new individua with the genes of the best individual\r\n this.pop_best = new individual(this.main_population.getPopulation()[main_pop_best].getGenes(), solutions, output); // best individual in population\r\n\r\n // perform selection, crossover and mutation\r\n this.roulette_selection();\r\n this.crossover();\r\n this.mutate(this.prob);\r\n this.tournament_selection(); // survivor selection\r\n\r\n // find the indices of the worst individual and replace it with the best from the last generation\r\n this.main_population.setIndividual(pop_best, this.main_population.find_Worst_indicies());\r\n this.main_population.update_population();\r\n\r\n }", "private void optimiseEVProfile()\n\t{\n\t}", "protected void callAlgorithm() {\r\n String name = makeImageName(image.getImageName(), \"_particle\");\r\n\r\n if (image.getNDims() == 2) { // source image is 2D\r\n\r\n int[] destExtents = new int[2];\r\n\r\n destExtents[0] = image.getExtents()[0]; // X dim\r\n destExtents[1] = image.getExtents()[1]; // Y dim\r\n\r\n if (outputPanel.isOutputNewImageSet()) {\r\n\r\n try {\r\n resultImage = (ModelImage) image.clone();\r\n resultImage.setImageName(name);\r\n\r\n // Make algorithm\r\n particleAlgo2D = new AlgorithmMorphology2D(resultImage, kernelOpen, kernelSizeOpen, kernelClose,\r\n kernelSizeClose,\r\n AlgorithmMorphology2D.PARTICLE_ANALYSIS_NEW, itersOpen,\r\n itersErode, 0, 0, outputPanel.isProcessWholeImageSet(), showFrame);\r\n\r\n if (outputPanel.isProcessWholeImageSet() == false) {\r\n particleAlgo2D.setMask(image.generateVOIMask());\r\n }\r\n\r\n // particleAlgo2D = new AlgorithmMorphology2D(resultImage, kernel, 5,\r\n // AlgorithmMorphology2D.PARTICLE_ANALYSIS_NEW, iters, regionFlag);\r\n // This is very important. Adding this object as a listener allows the algorithm to\r\n // notify this object when it has completed or failed. See algorithm performed event.\r\n // This is made possible by implementing AlgorithmedPerformed interface\r\n particleAlgo2D.addListener(this);\r\n\r\n createProgressBar(image.getImageName(), particleAlgo2D);\r\n \r\n // Hide dialog\r\n setVisible(false);\r\n\r\n if (isRunInSeparateThread()) {\r\n\r\n // Start the thread as a low priority because we wish to still have user interface work fast.\r\n if (particleAlgo2D.startMethod(Thread.MIN_PRIORITY) == false) {\r\n MipavUtil.displayError(\"A thread is already running on this object\");\r\n }\r\n } else {\r\n particleAlgo2D.run();\r\n\r\n }\r\n } catch (OutOfMemoryError x) {\r\n MipavUtil.displayError(\"Dialog particle analysis new: unable to allocate enough memory\");\r\n\r\n if (resultImage != null) {\r\n resultImage.disposeLocal(); // Clean up memory of result image\r\n resultImage = null;\r\n }\r\n\r\n return;\r\n }\r\n\r\n } else {\r\n\r\n try {\r\n\r\n // No need to make new image space because the user has choosen to replace the source image Make the\r\n // algorithm class particleAlgo2D = new AlgorithmMorphology2D( image, kernel, kernelSize,\r\n // AlgorithmMorphology2D.PARTICLE_ANALYSIS_NEW, itersD, 0, 0, 0, regionFlag );\r\n particleAlgo2D = new AlgorithmMorphology2D(image, kernelOpen, kernelSizeOpen, kernelClose, kernelSizeClose,\r\n AlgorithmMorphology2D.PARTICLE_ANALYSIS_NEW, itersOpen,\r\n itersErode, 0, 0, outputPanel.isProcessWholeImageSet(), showFrame);\r\n\r\n if (outputPanel.isProcessWholeImageSet() == false) {\r\n particleAlgo2D.setMask(image.generateVOIMask());\r\n }\r\n\r\n // This is very important. Adding this object as a listener allows the algorithm to\r\n // notify this object when it has completed or failed. See algorithm performed event.\r\n // This is made possible by implementing AlgorithmedPerformed interface\r\n particleAlgo2D.addListener(this);\r\n\r\n createProgressBar(image.getImageName(), particleAlgo2D);\r\n \r\n // Hide the dialog since the algorithm is about to run.\r\n setVisible(false);\r\n\r\n // These next lines set the titles in all frames where the source image is displayed to\r\n // \"locked - \" image name so as to indicate that the image is now read/write locked!\r\n // The image frames are disabled and then unregisted from the userinterface until the\r\n // algorithm has completed.\r\n Vector<ViewImageUpdateInterface> imageFrames = image.getImageFrameVector();\r\n\r\n titles = new String[imageFrames.size()];\r\n\r\n for (int i = 0; i < imageFrames.size(); i++) {\r\n titles[i] = ((Frame) (imageFrames.elementAt(i))).getTitle();\r\n ((Frame) (imageFrames.elementAt(i))).setTitle(\"Locked: \" + titles[i]);\r\n ((Frame) (imageFrames.elementAt(i))).setEnabled(false);\r\n userInterface.unregisterFrame((Frame) (imageFrames.elementAt(i)));\r\n }\r\n\r\n if (isRunInSeparateThread()) {\r\n\r\n // Start the thread as a low priority because we wish to still have user interface.\r\n if (particleAlgo2D.startMethod(Thread.MIN_PRIORITY) == false) {\r\n MipavUtil.displayError(\"A thread is already running on this object\");\r\n }\r\n } else {\r\n particleAlgo2D.run();\r\n }\r\n } catch (OutOfMemoryError x) {\r\n MipavUtil.displayError(\"Dialog particle analysis new: unable to allocate enough memory\");\r\n\r\n return;\r\n }\r\n }\r\n } else if ((image.getNDims() == 3) && !do25D) {\r\n int[] destExtents = new int[3];\r\n\r\n destExtents[0] = image.getExtents()[0];\r\n destExtents[1] = image.getExtents()[1];\r\n destExtents[2] = image.getExtents()[2];\r\n\r\n if (outputPanel.isOutputNewImageSet()) {\r\n\r\n try {\r\n resultImage = (ModelImage) image.clone();\r\n resultImage.setImageName(name);\r\n\r\n // Make algorithm\r\n particleAlgo3D = new AlgorithmMorphology3D(resultImage, kernelOpen, kernelSizeOpen,\r\n AlgorithmMorphology3D.PARTICLE_ANALYSIS, itersClose,\r\n itersOpen, 0, 0, outputPanel.isProcessWholeImageSet());\r\n\r\n if (outputPanel.isProcessWholeImageSet() == false) {\r\n particleAlgo3D.setMask(image.generateVOIMask());\r\n }\r\n\r\n // This is very important. Adding this object as a listener allows the algorithm to\r\n // notify this object when it has completed or failed. See algorithm performed event.\r\n // This is made possible by implementing AlgorithmedPerformed interface\r\n particleAlgo3D.addListener(this);\r\n\r\n createProgressBar(image.getImageName(), particleAlgo3D);\r\n \r\n // Hide dialog\r\n setVisible(false);\r\n\r\n if (isRunInSeparateThread()) {\r\n\r\n // Start the thread as a low priority because we wish to still have user interface work fast\r\n if (particleAlgo3D.startMethod(Thread.MIN_PRIORITY) == false) {\r\n MipavUtil.displayError(\"A thread is already running on this object\");\r\n }\r\n } else {\r\n particleAlgo3D.run();\r\n }\r\n } catch (OutOfMemoryError x) {\r\n MipavUtil.displayError(\"Dialog particle analysis new: unable to allocate enough memory\");\r\n\r\n if (resultImage != null) {\r\n resultImage.disposeLocal(); // Clean up image memory\r\n resultImage = null;\r\n }\r\n\r\n return;\r\n }\r\n } else {\r\n\r\n try {\r\n\r\n // Make algorithm\r\n particleAlgo3D = new AlgorithmMorphology3D(image, kernelOpen, kernelSizeOpen,\r\n AlgorithmMorphology3D.PARTICLE_ANALYSIS, itersClose,\r\n itersOpen, 0, 0, outputPanel.isProcessWholeImageSet());\r\n\r\n if (outputPanel.isProcessWholeImageSet() == false) {\r\n particleAlgo3D.setMask(image.generateVOIMask());\r\n }\r\n\r\n // This is very important. Adding this object as a listener allows the algorithm to\r\n // notify this object when it has completed or failed. See algorithm performed event.\r\n // This is made possible by implementing AlgorithmedPerformed interface\r\n particleAlgo3D.addListener(this);\r\n\r\n createProgressBar(image.getImageName(), particleAlgo3D);\r\n \r\n // Hide dialog\r\n setVisible(false);\r\n\r\n // These next lines set the titles in all frames where the source image is displayed to\r\n // \"locked - \" image name so as to indicate that the image is now read/write locked!\r\n // The image frames are disabled and then unregisted from the userinterface until the\r\n // algorithm has completed.\r\n Vector<ViewImageUpdateInterface> imageFrames = image.getImageFrameVector();\r\n\r\n titles = new String[imageFrames.size()];\r\n\r\n for (int i = 0; i < imageFrames.size(); i++) {\r\n titles[i] = ((ViewJFrameBase) (imageFrames.elementAt(i))).getTitle();\r\n ((ViewJFrameBase) (imageFrames.elementAt(i))).setTitle(\"Locked: \" + titles[i]);\r\n ((ViewJFrameBase) (imageFrames.elementAt(i))).setEnabled(false);\r\n userInterface.unregisterFrame((Frame) (imageFrames.elementAt(i)));\r\n }\r\n\r\n if (isRunInSeparateThread()) {\r\n\r\n // Start the thread as a low priority because we wish to still have user interface work fast\r\n if (particleAlgo3D.startMethod(Thread.MIN_PRIORITY) == false) {\r\n MipavUtil.displayError(\"A thread is already running on this object\");\r\n }\r\n } else {\r\n particleAlgo3D.run();\r\n }\r\n } catch (OutOfMemoryError x) {\r\n MipavUtil.displayError(\"Dialog particle analysis new: unable to allocate enough memory\");\r\n\r\n return;\r\n }\r\n }\r\n } else if (do25D) {\r\n int[] destExtents = new int[3];\r\n\r\n destExtents[0] = image.getExtents()[0]; // X dim\r\n destExtents[1] = image.getExtents()[1]; // Y dim\r\n destExtents[2] = image.getExtents()[2]; // Z dim\r\n\r\n // convert to 2.5d kernel type\r\n if (kernelOpen == AlgorithmMorphology3D.CONNECTED6) {\r\n kernelOpen = AlgorithmMorphology25D.CONNECTED4;\r\n } else if (kernelOpen == AlgorithmMorphology3D.CONNECTED24) {\r\n kernelOpen = AlgorithmMorphology25D.CONNECTED12;\r\n } else if (kernelOpen == AlgorithmMorphology3D.SIZED_SPHERE) {\r\n kernelOpen = AlgorithmMorphology25D.SIZED_CIRCLE;\r\n }\r\n\r\n if (outputPanel.isOutputNewImageSet()) {\r\n\r\n try {\r\n resultImage = (ModelImage) image.clone();\r\n resultImage.setImageName(name);\r\n\r\n // Make algorithm\r\n particleAlgo25D = new AlgorithmMorphology25D(resultImage, kernelOpen, kernelSizeOpen,\r\n AlgorithmMorphology25D.PARTICLE_ANALYSIS, itersClose,\r\n 0, 0, 0, outputPanel.isProcessWholeImageSet());\r\n\r\n if (outputPanel.isProcessWholeImageSet() == false) {\r\n particleAlgo25D.setMask(image.generateVOIMask());\r\n }\r\n\r\n // particleAlgo25D = new AlgorithmMorphology25D(resultImage, kernel, 5,\r\n // AlgorithmMorphology25D.PARTICLE_ANALYSIS, iters, regionFlag);\r\n // This is very important. Adding this object as a listener allows the algorithm to\r\n // notify this object when it has completed or failed. See algorithm performed event.\r\n // This is made possible by implementing AlgorithmedPerformed interface\r\n particleAlgo25D.addListener(this);\r\n\r\n createProgressBar(image.getImageName(), particleAlgo25D);\r\n \r\n // Hide dialog\r\n setVisible(false);\r\n\r\n if (isRunInSeparateThread()) {\r\n\r\n // Start the thread as a low priority because we wish to still have user interface work fast.\r\n if (particleAlgo25D.startMethod(Thread.MIN_PRIORITY) == false) {\r\n MipavUtil.displayError(\"A thread is already running on this object\");\r\n }\r\n } else {\r\n particleAlgo25D.run();\r\n }\r\n } catch (OutOfMemoryError x) {\r\n MipavUtil.displayError(\"Dialog particle analysis new: unable to allocate enough memory\");\r\n\r\n if (resultImage != null) {\r\n resultImage.disposeLocal(); // Clean up memory of result image\r\n resultImage = null;\r\n }\r\n\r\n return;\r\n }\r\n } else {\r\n\r\n try {\r\n\r\n // No need to make new image space because the user has choosen to replace the source image\r\n // Make the algorithm class\r\n particleAlgo25D = new AlgorithmMorphology25D(image, kernelOpen, kernelSizeOpen,\r\n AlgorithmMorphology25D.PARTICLE_ANALYSIS, itersClose,\r\n 0, 0, 0, outputPanel.isProcessWholeImageSet());\r\n\r\n if (outputPanel.isProcessWholeImageSet() == false) {\r\n particleAlgo25D.setMask(image.generateVOIMask());\r\n }\r\n\r\n // This is very important. Adding this object as a listener allows the algorithm to\r\n // notify this object when it has completed or failed. See algorithm performed event.\r\n // This is made possible by implementing AlgorithmedPerformed interface\r\n particleAlgo25D.addListener(this);\r\n\r\n createProgressBar(image.getImageName(), particleAlgo25D);\r\n \r\n // Hide the dialog since the algorithm is about to run.\r\n setVisible(false);\r\n\r\n // These next lines set the titles in all frames where the source image is displayed to\r\n // \"locked - \" image name so as to indicate that the image is now read/write locked!\r\n // The image frames are disabled and then unregisted from the userinterface until the\r\n // algorithm has completed.\r\n Vector<ViewImageUpdateInterface> imageFrames = image.getImageFrameVector();\r\n\r\n titles = new String[imageFrames.size()];\r\n\r\n for (int i = 0; i < imageFrames.size(); i++) {\r\n titles[i] = ((Frame) (imageFrames.elementAt(i))).getTitle();\r\n ((Frame) (imageFrames.elementAt(i))).setTitle(\"Locked: \" + titles[i]);\r\n ((Frame) (imageFrames.elementAt(i))).setEnabled(false);\r\n userInterface.unregisterFrame((Frame) (imageFrames.elementAt(i)));\r\n }\r\n\r\n if (isRunInSeparateThread()) {\r\n\r\n // Start the thread as a low priority because we wish to still have user interface.\r\n if (particleAlgo25D.startMethod(Thread.MIN_PRIORITY) == false) {\r\n MipavUtil.displayError(\"A thread is already running on this object\");\r\n }\r\n } else {\r\n particleAlgo25D.run();\r\n }\r\n } catch (OutOfMemoryError x) {\r\n MipavUtil.displayError(\"Dialog particle analysis new: unable to allocate enough memory\");\r\n\r\n return;\r\n }\r\n }\r\n }\r\n }", "@Override\n\tpublic void mpdUpdated(int arg0) {\n\t\t\n\t}", "@Override\r\n public void insertUpdate(DocumentEvent e) {\n HayCambio();\r\n }", "@Override\n protected void handleECEMarkedPacket() {\n congestionWindow = Math.max(LOSS_WINDOW_SIZE, (1 - alphaFraction / 2.0) * congestionWindow);\n slowStartThreshold = congestionWindow;\n }", "public void update(MazeEventPickup e) {\r\n }", "@Override\n public void delta() {\n \n }", "@Override\r\n public void removeUpdate(DocumentEvent e) {\n HayCambio();\r\n }", "@Override\r\n\tpublic void update(float delta) {\n\t\t\r\n\t}", "public void update(MazeEventWalkedKilled e) {\r\n }", "public void managerOutputModified(ManagerEvent e);", "private void doAfterUpdateModel(final PhaseEvent arg0) {\n\t}", "@Override\n\tpublic void update(float delta) {\n\t\t\n\t}", "@Override\n\tpublic void update(float deltaTime) {\n\t}", "public void evolve(int i) {\n\t\tfurniturePriority=100;\r\n\t}", "public Population evolve()\r\n {\r\n\tArrayList<Chromosome> tempPop = \r\n\t new ArrayList<Chromosome>(chromos.size());\r\n\tChromosome u;\r\n\tChromosome v;\r\n\r\n\tfor(int i = 0; i < chromos.size()/2; i++)\r\n\t {\r\n\t\tu = selectParent();\r\n\t\tv = selectParent();\r\n\t\t\r\n\t\t//System.out.println(\"*****Parent 1 : \\n\" + v);\r\n\t\t\r\n Chromosome c1 = u.child(v);\r\n Chromosome c2 = v.child(u);\r\n\t\ttempPop.add(c1);\r\n\t\ttempPop.add(c2);\r\n\t\t\r\n //System.out.println(\"****Generated new child: \\n\" + c1);\r\n\t }\t \r\n\t\r\n\t// if needed, add in the code for keeping the best chromosome\r\n\tPopulation pop = new Population(tempPop, selMethod, selPara, \r\n\t\t\t\t\tcrossMethod, crossPara, mutMethod, mutPara, \r\n\t\t\t\t\treplaceMethod, replacePara, powerStep, tourStep, ff);\r\n\r\n\tif(replaceMethod == ELITISM)\r\n\t {\r\n\t\tpop.remove(worstChromoIndex);\r\n\t\tpop.add(bestChromo.clone());\r\n\t\tpop.initialize();\r\n\t }\r\n\r\n\tgeneration++;\r\n\treturn pop;\r\n }", "@Override\n public void update(float delta) {\n\n }", "public void onLivingUpdate()\n {\n super.onLivingUpdate();\n }", "@Override\n\tpublic void update(float deltaTime) {\n\t\t\n\t}", "@Override\n public void run() {\n mExplosionField.explode(layout);\n mExplosionField.explode(mpb);\n }", "@Override\r\n public void changedUpdate(DocumentEvent e) {\n ActivoTimer();\r\n }", "private final void resetIsosurfaceBoundary() {\n \tif (debug) System.out.print(\"fast marching evolution: iso-surface reinit\\n\");\n\n \tfloat[] nbdist = new float[6];\n \tboolean[] nbflag = new boolean[6];\n \tboolean boundary;\n \tfloat[] tmp = new float[nx*ny*nz];\n \tboolean[] processed = new boolean[nx*ny*nz];\n \t\n\t\tfor (int xyz = 0; xyz<nx*ny*nz; xyz++) if (mask[xyz]) {\n\t\t\t\n\t\t\tboundary = false;\n\t\t\tfor (int l=0; l<6; l++) {\n\t\t\t\tnbdist[l] = UNKNOWN;\n\t\t\t\tnbflag[l] = false;\n\t\t\t\t\n\t\t\t\tint xyznb = xyz + xoff[l] + yoff[l] + zoff[l];\n\t\t\t\tif (segmentation[xyznb]!=segmentation[xyz] && mask[xyznb]) {\n\t\t\t\t\t// compute new distance based on processed neighbors for the same object\n\t\t\t\t\tnbdist[l] = Numerics.abs(mgdmfunctions[0][xyznb]);\n\t\t\t\t\tnbflag[l] = true;\n\t\t\t\t\tboundary = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (boundary) {\n\t\t\t\ttmp[xyz] = isoSurfaceDistance(mgdmfunctions[0][xyz], nbdist, nbflag);\n\t\t\t\tprocessed[xyz] = true;\n\t\t\t}\n\t\t}\n\t\t// once all the new values are computed, copy into original GDM function (sign is not important here)\n\t\tfor (int xyz = 0; xyz<nx*ny*nz; xyz++) {\n\t\t\tif (processed[xyz]) mgdmfunctions[0][xyz] = tmp[xyz];\n\t\t\telse mgdmfunctions[0][xyz] = UNKNOWN;\n\t\t}\n\t\t\t\n return;\n }", "public void update(){\n\t\tif (!VisualizerMain.selectedRun.equals(\"\")){\n\t\t\tupdateEpochNum();\n\t\t\tupdateParticles();\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void update(EventBean[] arg0, EventBean[] arg1) {\n\t\tEODQuote q = (EODQuote)arg0[0].getUnderlying();\r\n\t\t/*if ( q.getTimestamp() < Utility.getInstance().getCurrentTime() )\r\n\t\t{\r\n\t\t\tUtility.getInstance().info(\"Old event ignoring \"+q.toString());\r\n\t\t\treturn;\r\n\t\t}*/\r\n\t\t\tpfm.generateExits(q);\r\n\t\t\t\t\t\r\n\t\t}", "@Override\n\tpublic void update(GameContainer gc) {\n\t\t\n\t}", "public void evolve() {\n\t\tboolean[][] nextState = new boolean[width][height];\n\t\t\n\t\t// Look at each position\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tboolean value = calculateNextState(x, y);\n\t\t\t\tnextState[x][y] = value;\n\t\t\t}\n\t\t}\n\t\t\n\t\tstate = nextState;\n\t}", "public void run() {\n\t\t\t\t\t\t\t\t heavyResize();\n\t\t\t\t\t\t\t\t invokeRedraw();\n\t\t\t\t\t\t\t\t }", "public void calc()\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif(oldInfo.calcInfo!=null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldInfo.calcInfo.calc();\n\t\t\t\t\t\t\toldInfo.calcInfo=null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Filter particles\n\t\t\t\t\t\tfor(int id:oldInfo.keySet())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tParticleInfo pInfo=oldInfo.get(id);\n\t\t\t\t\t\t\tif(filter.acceptParticle(id, pInfo))\n\t\t\t\t\t\t\t\tnewInfo.put(id,pInfo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@Override\n\tpublic void update(GameContainer gc, StateBasedGame sb, int delta) {\n\t\t\n\t}", "@Override\n public void feedingMeat() {\n\n }", "private void enhanceImage(){\n }", "public void onUpdate()\n\t{\n\t\tchunk.setModelBound(new BoundingBox());\n\t\tchunk.updateModelBound();\n\n\t}", "private void postProcessing() {\n // create the element for erode\n Mat erodeElement = Imgproc.getStructuringElement(Imgproc.CV_SHAPE_RECT,\n new Size(2 * KERNELSIZE_ERODE + 1,2 * KERNELSIZE_ERODE + 1 ),\n new Point(KERNELSIZE_ERODE, KERNELSIZE_ERODE));\n // create the element for dialte\n Mat dialElement = Imgproc.getStructuringElement(Imgproc.CV_SHAPE_RECT,\n new Size(2 * KERNELSIZE_DILATE + 1,2 * KERNELSIZE_DILATE + 1 ),\n new Point(KERNELSIZE_DILATE, KERNELSIZE_DILATE));\n\n // erode image to remove small noise\n Imgproc.erode(binary, binary, erodeElement);\n\n // dilate the image DILATETIMES to increase what we see\n for (int i = 0; i < DILATETIMES; i++)\n Imgproc.dilate(binary, binary, dialElement);\n }", "@Override\r\n public void onThinking() {\n }", "public void update() {\n\t\tif (c.getResamplingFactor() != 1) return;\n\t\trenderer.getVolume().updateData();\n\t}", "public void update(MazeEventWon e) {\r\n }", "public void update(MazeEventPushedWater e) {\r\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh)\n {\n super.onSizeChanged(w, h, oldw, oldh);\n dotsSet = false;\n\n\n startNewGame();\n keeper.start();\n }", "@Override\r\n public void doUpdateConfig(GameConfig game)\r\n {\n \r\n }", "@Override\r\n public void doModifyWagerPool(double factor, String msg)\r\n {\n }", "@Override\n\t\t\tpublic void internalWorked(double work) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void preUpdate() {\n\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "protected void doMoveProbe() {\n super.doMoveProbe();\n // getChart().updateThumb();\n }", "@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t}", "@Override\n\tpublic void onUpdate(float dt) {\n\t}", "@Override\n\tpublic void update(Event e) {\n\t}", "@Override\n public void onCurShapeIndexUpdate(BNRGCurShapeIndexUpdate arg0) {\n Log.d(BNRemoteConstants.MODULE_TAG, \"onCurShapeIndexUpdate...... \");\n }", "@Override\n public void tuningPeriodic() {\n\n }", "abstract public void updatePositionsAfterBetaReduction();", "@Override\n\tpublic void setOptimizeMergeBuffer(boolean arg0) {\n\n\t}", "public void beforeUpdate(MBFImage frame) {\n\n\n \t MBFImage input = frame;\n\n\n\n\n \t//MBFImage input = null;;\n\t\t/*try {\n\t\t\tinput = ImageUtilities.readMBF(new File(\"./resources/yolo3.jpg\"));\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}*/\n \tinput = ResizeProcessor.halfSize(input);\n \tinput = ResizeProcessor.halfSize(input);\n \tinput = ResizeProcessor.halfSize(input);\n \tinput = ResizeProcessor.halfSize(input);\n \tinput = ResizeProcessor.halfSize(input);\n \n \t\n \t/*HistogramModel model = new HistogramModel(1,1);\n \tmodel.estimateModel(image);\n \tMultidimensionalHistogram histogram = model.histogram;\n \t//System.out.println(model.colourAverage(0));\n \tSystem.out.println(histogram);\n \t\n \tfor (int i = 0; i < 100; i++) {\n\t\t\tSystem.out.println(model.colourAverage(i));\n\t\t}*/\n \t \n \t//*******************************************\n \t//To start our implementation, we’ll first apply a colour-space transform to the image:\n \tinput = ColourSpace.convert(input, ColourSpace.CIE_Lab);\n \t//We can then construct the K-Means algorithm:\n \tFloatKMeans cluster = FloatKMeans.createExact(2);\n \t//The parameter (2) is the number of clusters or classes we wish the algorithm to generate. \n \t//We can optionally provide a second integer argument that controls the maximum number of iterations of the \n \t//algorithm (the default is 30 iterations if we don't specify otherwise).\n \t\n \t\n \t//The FloatKMeans algorithm takes its input as an array of floating point vectors (float[][]). \n \t//We can flatten the pixels of an image into the required form using the getPixelVectorNative() method:\n \tfloat[][] imageData = input.getPixelVectorNative(new float[input.getWidth() * input.getHeight()][3]);\n \t\n \t//The K-Means algorithm can then be run to group all the pixels into the requested number of classes:\n \tFloatCentroidsResult result = cluster.cluster(imageData);\n \t\n \t//Each class or cluster produced by the K-Means algorithm has an index, starting from 0. \n \t//Each class is represented by its centroid (the average location of all the points belonging to the class). \n \t//We can print the coordinates of each centroid:\n\t\tfloat[][] centroids = result.centroids;\n\t\tfor (float[] fs : centroids) {\n\t\t //System.out.println(Arrays.toString(fs));\n\t\t}//Now is a good time to test the code. Running it should print the (L, a, b) coordinates of each of the classes.\n\t\t\n\t\t\n\t\t\n\t\t//takes a vector (the L, a, b value of a single pixel) and returns the index of the class that it belongs to. \n\t\t//We’ll start by creating an image that visualises the pixels and their respective classes \n\t\t//by replacing each pixel in the input image with the centroid of its respective class:\n\t\tHardAssigner<float[],?,?> assigner = result.defaultHardAssigner();\n\t\tfor (int y=0; y<input.getHeight(); y++) {\n\t\t for (int x=0; x<input.getWidth(); x++) {\n\t\t float[] pixel = input.getPixelNative(x, y);\n\t\t int centroid = assigner.assign(pixel);\n\t\t input.setPixelNative(x, y, centroids[centroid]);\n\t\t }\n\t\t}\n\t\t\n\t\t//We can then display the resultant image. Note that we need to convert the image back to RGB colour space for it to display properly:\n\t\tinput = ColourSpace.convert(input, ColourSpace.RGB);\n\t\t//DisplayUtilities.display(input);\n\t\t\n\t\t\n\t\t\n\t\t//The GreyscaleConnectedComponentLabeler class can be used to find the connected components:\n\t\t//Note that the GreyscaleConnectedComponentLabeler only processes greyscale images \n\t\tGreyscaleConnectedComponentLabeler labeler = new GreyscaleConnectedComponentLabeler();\n\t\tList<ConnectedComponent> components = labeler.findComponents(input.flatten());\n\t\t\n\t\t\n\t\t\n\t\t//The ConnectedComponent class has many useful methods for extracting information about the shape of the region. \n\t\t//Lets draw an image with the components numbered on it. We’ll use the centre of mass of each region to \n\t\t//position the number and only render numbers for regions that are over a certain size (50 pixels in this case):\n\t\tColor[] colors = new Color[3];\n\t\tint i = 0;\n\t\tConnectedComponent biggestComp = components.get(0);\n\t\tfor (ConnectedComponent comp : components) {\n\t\t\tif (comp.calculateArea() > biggestComp.calculateArea()){\n\t\t\t\tbiggestComp = comp;\n\t\t\t}\n\t\t}\n\t\tfor (int k=0; k<1;k++){\n\t\t\t\n\t\t //if (comp.calculateArea() <input.getWidth()/2) \n\t\t // continue;\n\t\t\tConnectedComponent comp = biggestComp;\n\t\t \n\t\t /* List<Pixel> boundries = comp.getInnerBoundary(ConnectMode.CONNECT_4);\n\t\t \n\t\t for (int j = 0; j < boundries.size(); j++) {\n\t\t\t\tfloat x = boundries.get(j).getX()*32;\n\t\t\t\tfloat y = boundries.get(j).getY()*32;\n\t\t\t\tboundries.get(j).setX(x);\n\t\t\t\tboundries.get(j).setY(y);\n\t\t\t}\n\t\t \n\t\t\tframe.drawConnectedPoints(boundries, RGBColour.WHITE);*/\n\t\t \n\t\t //comp.pixels.iterator().next().binaryHeader();\n\t\t\t\n\t\t int color1 = (int) (Double.parseDouble(comp.extractPixels1d(input).getBand(0).toString().split(\" \")[0].substring(1).replace(\",\",\".\"))*250);\n\t\t int color2 = (int) (Double.parseDouble(comp.extractPixels1d(input).getBand(1).toString().split(\" \")[0].substring(1).replace(\",\",\".\"))*250);\n\t\t int color3 = (int) (Double.parseDouble(comp.extractPixels1d(input).getBand(2).toString().split(\" \")[0].substring(1).replace(\",\",\".\"))*250);\n\t\t \n\t\t int R = color1;\n\t\t int G = color2;\n\t\t int B = color3;\n\t\t \n\t\t //System.out.println(color1 + \",\" + color2 +\",\" + color3);\n\t\t Color tempColor = new Color(color1, color2, color3);\n\t\t //System.out.println(tempColor);\n\t\t float[] hsbColor = new float[3];\n\t\t \n\t\t //System.out.println(getNameReflection(tempColor));\n\t\t //System.out.print(colorUtils.getColorNameFromColor(tempColor));\n\t\t \n\t\t \n\t\t float Y = (R+R+B+G+G+G)/6;\n\t\t //System.out.println(\"y: \" + Y);\n\t\t\t\n\t\t //System.out.println(tempColor.RGBtoHSB(color1, color2, color3, hsbColor));\n\t\t \n\t\t\tfor (float f : hsbColor) {\n\t\t\t\t//System.out.println(\"hihi: \" + f);\n\t\t\t}\n\t\t\t//input.drawText(\"Point:\" + comp.calculateCentroidPixel().binaryHeader(), comp.calculateCentroidPixel(), HersheyFont.TIMES_MEDIUM, 20);\n\t\t\t//frame.drawText(\"Y:\" + Y, comp.calculateCentroidPixel().x*32,comp.calculateCentroidPixel().y*32, HersheyFont.TIMES_MEDIUM, 20);\n\t\t\t//frame.drawText(colorUtils.getMoodFromColor(tempColor), comp.calculateCentroidPixel().x*32,comp.calculateCentroidPixel().y*32, HersheyFont.TIMES_MEDIUM, 50);\n\t\t\t//frame.drawText(colorUtils.getColorNameFromColor(tempColor), comp.calculateCentroidPixel().x*32,comp.calculateCentroidPixel().y*32, HersheyFont.TIMES_MEDIUM, 20);\n\t\t\t\n\t\t\t\n\t\t colors[i]=tempColor;\n\t\t if (i==2){\n\t\t \tbreak;\n\t\t }\n\t\t System.out.println();\n\t\t i++;\n\t\t //System.out.println(\"colourspace: \"+comp.extractPixels1d(input).getBand(0).split(\"+\") + \",\" + comp.extractPixels1d(input).getBand(1) + \",\" + comp.extractPixels1d(input).getBand(2));\n\t\t //System.out.println(\"yolo : \" + comp.extractPixels1d(input).\n\t\t \t\n\t\t //System.out.println(comp.pixels.iterator().next().binaryHeader());\n\t\t input.drawText(\"color: \" + comp.pixels.iterator().next().binaryHeader(),comp.calculateCentroidPixel(), HersheyFont.TIMES_MEDIUM, 20);\n\t\t \n\t\t}\n\t\t//Finally, we can display the image with the labels:\n\n\t\t//DisplayUtilities.display(input);\n\t\t\n\t\t\n\t\t\n\t\t\n \t\n }", "protected void updateParticles() {\n\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tif (p.neighbors == null) {\n\t\t\t\tp.neighbors = particles;\n\t\t\t}\n\t\t\tfor (BehaviorInterface b : behaviors) {\n\t\t\t\tb.apply(p);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tp.scaleVelocity(friction);\n\t\t\tp.update();\n\t\t}\n\t}", "@Override\r\n\tprotected void onReduceHp()\r\n\t{\n\t}", "@Override\n\tpublic void update(float timeDelta)\n\t{\n\t\t\n\t}", "@Override\n\tpublic void update(float timeDelta)\n\t{\n\t\t\n\t}", "@Override\n\tprotected void updateAlgGUI(I frame, BufferedImage imageGUI, final double fps) {\n\t\tif( infoPanel.resetRequested() || closeToImageBounds(frame.width,frame.height,30)) {\n\t\t\tT oldToNew = fitModel.createInstance();\n\t\t\tdistortAlg.changeWorld(oldToNew);\n\t\t\tPixelTransform_F32 pixelTran = UtilImageMotion.createPixelTransform(oldToNew);\n\t\t\tmotionRender.distortMosaic(pixelTran);\n\t\t}\n\n\t\tMotionMosaicPointKey alg = (MotionMosaicPointKey)distortAlg;\n\n\t\tif( alg.isKeyFrame() ) {\n\t\t\ttotalKeyFrames++;\n\t\t}\n\n\t\tsuper.updateAlgGUI(frame,imageGUI,fps);\n\t}", "@Override\r\n\tpublic void onCustomUpdate() {\n\t\t\r\n\t}", "public void decayAll() {\n Debug.debug(\"\\n=====\\nDecaying all emotions\\n=====\\n\");\n\n // Record current time\n long now = System.currentTimeMillis();\n\n // Decay all emotions.\n this.gamygdala.decayAll(this.lastMillis, now);\n\n // Store time of last decay.\n this.lastMillis = now;\n }", "@Override\n public void update(Workout e) {\n\n }", "@Override\n\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void changedUpdate(DocumentEvent e)\n\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 }", "private void updatePainting(AnnotationModelEvent event) {\n \t\tdisablePainting(true);\n \n \t\tcatchupWithModel(event);\n \n \t\tif (!fInputDocumentAboutToBeChanged)\n \t\t\tinvalidateTextPresentation();\n \n \t\tenablePainting();\n \t}", "@Override\n public boolean updateGraphicsData(GraphicsConfiguration gc) {\n // TODO: not implemented\n// throw new RuntimeException(\"Has not been implemented yet.\");\n return false;\n }", "@Override\r\n\tpublic void update() {\n\t\tsuper.update();\r\n\t}", "@Override\n public void update() {\n }", "public void update(MazeEventPushed e) {\r\n }", "@Override\r\n\tpublic void update() {\r\n\t}", "@Override\r\n public void changedUpdate(DocumentEvent e)\r\n {\n }", "@Override\n public void update() {\n }", "protected abstract void kickStart() throws OptimizerException;", "public void onRepeat() {\n\t\t// TODO Auto-generated method stub\n\t\tLastWholeDelta = 0;\n\t}", "public void run() {\n\t\t\t heavyResize();\n\t\t\t invokeRedraw();\n\t\t }", "@Override\n protected void onManagedUpdate(float pSecondsElapsed) {\n super.onManagedUpdate(pSecondsElapsed);\n\n }", "public void commitExploration() {\n watermarkCommittedTick = watermarkGoalTick;\n }", "@Override\n\tprotected void on_object_picked_up(GfxObject object) {\n\n\t}", "@Override\n public synchronized void update(int deltaTime) {\n }", "@Override\n\t\t\t\tpublic void changedUpdate(final DocumentEvent e) {\n\t\t\t\t}", "@Override\n public void update() {\n \n }", "public void megarepaintImmediately() {\n paintDirtyRectanglesImmediately();\n }", "@Override\n public void update() {\n \tif(++this.timeoutCounter < 5) { return; }\n \t\n \tList<EntityDog> dogList = this.world.getEntitiesWithinAABB(EntityDog.class, new AxisAlignedBB(this.pos.getX(), this.pos.getY() + 0.5D, this.pos.getZ(), this.pos.getX() + 1.0D, this.pos.getY() + 0.5D + 0.05000000074505806D, this.pos.getZ() + 1.0D).grow(5));\n\n \tfor(EntityDog dog : dogList) {\n \t\tdog.coords.setBowlPos(this.pos);\n \t\n \t\tint slotIndex = DogUtil.getFirstSlotWithFood(dog, this.inventory);\n \tif(dog.getDogHunger() < 60 && slotIndex >= 0)\n \t\tDogUtil.feedDog(dog, this.inventory, slotIndex);\n }\n \t\n \tthis.timeoutCounter = 0;\n }", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\t\n\t}", "@Override\r\n public void onUpdate() {\n super.onUpdate();\r\n }" ]
[ "0.6055745", "0.5829325", "0.5788394", "0.5676262", "0.5617946", "0.5490622", "0.53268445", "0.52816474", "0.5258576", "0.521275", "0.5202715", "0.51764315", "0.5171891", "0.51336277", "0.50476825", "0.5036626", "0.50292176", "0.5027344", "0.50219786", "0.5009914", "0.50054663", "0.5003557", "0.49950847", "0.49543712", "0.49505675", "0.49492684", "0.49296638", "0.4927112", "0.49257636", "0.4924251", "0.49140695", "0.49058115", "0.48967803", "0.48694092", "0.48665094", "0.48538822", "0.48499924", "0.48404002", "0.48398295", "0.4833471", "0.48325866", "0.48315483", "0.48301154", "0.48185107", "0.48121902", "0.4806097", "0.47885573", "0.47881585", "0.47864634", "0.47816703", "0.4774173", "0.47729343", "0.4767529", "0.4763168", "0.4760822", "0.47606093", "0.47555575", "0.47529757", "0.47525653", "0.4750403", "0.47503483", "0.47458535", "0.47321406", "0.47321406", "0.47284323", "0.47249946", "0.4724764", "0.4720403", "0.47168362", "0.47153342", "0.47148368", "0.4713407", "0.4713262", "0.47102162", "0.4702737", "0.47020406", "0.46962884", "0.46907339", "0.4690083", "0.4689263", "0.46850678", "0.46820307", "0.46743515", "0.467431", "0.46673837", "0.46648222", "0.46639016", "0.46637774", "0.46613106", "0.4661308", "0.465548", "0.465548", "0.465548", "0.465548", "0.465548", "0.465548", "0.465548", "0.465548", "0.465548", "0.465548", "0.46553978" ]
0.0
-1
metodo para calcular a frequencia minima
public double calcularAlvoMinima() { return calcularFrequenciaMaxima()*0.5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "float getFrequency();", "@Override\n\tpublic Double calculerFonds(Integer idBanque) {\n\t\treturn 1000.0;\n\t}", "public float findFrequency(ArrayList<Float> wave){\n\r\n ArrayList<Float> newWave = new ArrayList<>();\r\n\r\n for(int i=0;i<wave.size()-4;i++){\r\n newWave.add((wave.get(i)+wave.get(i+1)+wave.get(i+2)+wave.get(i+4))/4f);\r\n }\r\n\r\n\r\n boolean isBelow = wave1.get(0)<triggerVoltage;\r\n\r\n ArrayList<Integer> triggerSamples = new ArrayList<>();\r\n\r\n\r\n System.out.println(\"starting f calc\");\r\n\r\n for(int i=1;i<newWave.size();i++){\r\n if(isBelow){\r\n if(newWave.get(i)>triggerVoltage){\r\n triggerSamples.add(i);\r\n isBelow=false;\r\n }\r\n }else{\r\n if(newWave.get(i)<triggerVoltage){\r\n triggerSamples.add(i);\r\n isBelow=true;\r\n }\r\n }\r\n }\r\n System.out.println(\"F len in \"+triggerSamples.size());\r\n\r\n ArrayList<Float> freqValues = new ArrayList<>();\r\n\r\n\r\n for(int i=0;i<triggerSamples.size()-2;i++){\r\n freqValues.add(1/(Math.abs(SecondsPerSample*(triggerSamples.get(i)-triggerSamples.get(i+2)))));\r\n }\r\n\r\n float finalAVG =0;\r\n for (Float f : freqValues) {\r\n finalAVG+=f;\r\n }\r\n finalAVG/=freqValues.size();\r\n\r\n\r\n return finalAVG;\r\n //System.out.println(finalAVG);\r\n }", "public int getMinFrequency() {\n\t\t\tif (mMinFrequency == 0) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + MIN_FREQUENCY);\n\t\t\t\tif (list == null || list.isEmpty()) return 0;\n\t\t\t\tint value = 0;\n\t\t\t\ttry { value = Integer.valueOf(list.get(0)); }\n\t\t\t\tcatch (NumberFormatException ignored) {}\n\t\t\t\tmMinFrequency = value / 1000;\n\t\t\t}\n\t\t\treturn mMinFrequency;\n\t\t}", "int getFreq();", "private int findScaledDiff(double frequency) {\n double minDifference = 100;\n int index = 0;\n\n if (frequency != -1) {\n for (int i = 0; i < noteFrequencies.length; i++) {\n if (Math.abs(frequency - noteFrequencies[i]) < minDifference) {\n minDifference = Math.abs(frequency - noteFrequencies[i]);\n index = i;\n }\n }\n if (index > 0) {\n double nextFrequency = noteFrequencies[index-1];\n double thisFrequency = noteFrequencies[index];\n double lastFrequency = noteFrequencies[index+1];\n if (frequency >= lastFrequency && frequency <= thisFrequency) {\n double diff = thisFrequency - lastFrequency;\n double scaleSection = diff / 5;\n int n = 0;\n while (Math.abs(thisFrequency - n*scaleSection - frequency) > scaleSection) {\n thisFrequency -= n*scaleSection;\n n++;\n }\n return n;\n } else if (frequency >= thisFrequency && frequency <= nextFrequency) {\n double diff = nextFrequency - thisFrequency;\n double scaleSection = diff / 5;\n int n = 0;\n while (Math.abs(thisFrequency + n*scaleSection - frequency) > scaleSection) {\n thisFrequency += n*scaleSection;\n n++;\n }\n return -n;\n }\n }\n }\n return -10;\n\n }", "float xMin();", "private int quantizeKurtosis(double spectralKurtosis) {\n\t\treturn (int) (spectralKurtosis / 100) + 1;\n\t}", "public void sumFrequenza(int frequenza) {\n\t\t\tthis.frequenza += frequenza;\n\t\t}", "double getMin();", "double getMin();", "double getMinTimerTrig();", "private float calculateSensorFrequency() {\n if (startTime == 0) {\n startTime = System.nanoTime();\n }\n\n long timestamp = System.nanoTime();\n\n // Find the sample period (between updates) and convert from\n // nanoseconds to seconds. Note that the sensor delivery rates can\n // individually vary by a relatively large time frame, so we use an\n // averaging technique with the number of sensor updates to\n // determine the delivery rate.\n float hz = (count++ / ((timestamp - startTime) / 1000000000.0f));\n\n return hz;\n }", "public float calculateAverageLow() {\n\t\t\n\t\tfloat sum = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tsum += temps[i][1];\n\t\treturn sum /= temps.length;\n\t\t\n\t}", "public double getEstimate()\n {\n assert list.length > 0: \"The list cannot be empty\";\n int R = list[0];\n \n //count how many are smaller or equal to R\n double counter = 0;\n for (int i = 1; i < k; i++) {\n if (list[i]<R)\n counter++;\n }\n return -Math.pow(2, R - 1) * Math.log(counter / (k-1)); }", "private void calculatefundamentalFreq() {\n\t\tint count;\n\t\tfloat f0 = 0;\n\t\tSystem.out.println(\"pitches\");\n\t\tSystem.out.println(pitches);\n\t\tfor(count = 0; count < pitches.size(); count++)\n\t\t{\n\t\t\tf0 += pitches.get(count);\n\t\t}\n\t\tif(count != 0)\n\t\t\tfundamentalFreq = f0 / count;\n\t\telse\n\t\t\tfundamentalFreq = 0;\n\t}", "protected final double getMinDifference() {\r\n \r\n double difference = 0;\r\n \r\n for(int i = 0; i < this.D; i++) {\r\n difference += Math.pow(this.f.max(i)-this.f.min(i), 2)*0.001;\r\n }\r\n \r\n return difference;\r\n \r\n }", "BigInteger getMax_freq();", "private int findScaledDiff(double frequency) {\n double minDifference = 10;\n int index = 0;\n\n if (frequency != -1) {\n for (int i = 0; i < noteFrequencies.length; i++) {\n if (Math.abs(frequency - noteFrequencies[i]) < minDifference) {\n minDifference = Math.abs(frequency - noteFrequencies[i]);\n index = i;\n }\n }\n if (index > 0) {\n double nextFrequency = noteFrequencies[index-1];\n double thisFrequency = noteFrequencies[index];\n double lastFrequency = noteFrequencies[index+1];\n if (frequency >= lastFrequency && frequency <= thisFrequency) {\n double diff = thisFrequency - lastFrequency;\n double scaleSection = diff / 5;\n int n = 1;\n while (thisFrequency - n*scaleSection > frequency) {\n thisFrequency -= n*scaleSection;\n n++;\n }\n return +n;\n } else if (frequency >= thisFrequency && frequency <= nextFrequency) {\n double diff = nextFrequency - thisFrequency;\n double scaleSection = diff / 5;\n int n = 1;\n while (thisFrequency + n*scaleSection < frequency) {\n thisFrequency += n*scaleSection;\n n++;\n }\n return -n;\n }\n }\n }\n return -10;\n\n }", "private long finTime(){\n \n long result = 0, time = 0;\n Integer[] temp;\n \n while(!this.prior.isEmpty()){\n \n // getting the head of the queue and removing it\n temp = this.prior.poll();\n \n // printing some temp. results\n //System.out.println(\"weight \" + temp[0] + \" length/time \" + temp[1]);\n \n // callculate the finishing time\n time += temp[1];\n \n // calculate the weighted time, we want to minimise\n result += (temp[0]*time);\n }\n return result;\n }", "public void calcularQuinA(){\n sueldoQuinAd = sueldoMensual /2;\n\n }", "double CalculateFitness(double fun) \n\t {\n\t\t double result=0;\n\t\t if(fun>=0)\n\t\t {\n\t\t\t result=1/(fun+1);\n\t\t }\n\t\t else\n\t\t {\n\t\t\t \n\t\t\t result=0;\n\t\t }\n\t\t return result;\n\t }", "float getPreGain();", "int getMPPerSecond();", "private double weight(){\n return ((double) (m_PositiveCount + m_NegativeCount)) / ((double) m_PositiveCount);\n }", "public void cal_FireLoadRating(){\r\n\tFLOAD=1.75*Math.log10(TIMBER)+0.32*Math.log10(BUO)-1.640;\r\n\t//ensure that FLOAD is greater than 0, otherwise set it to 0;\r\n\tif (FLOAD<0){FLOAD=0;\r\n\t\t}else{FLOAD=Math.pow(10, FLOAD);\r\n\t}\r\n}", "public double minDifference()\n {\n double minD = 1000.0; // setting unreasonably high\n double testD = 0.0;\n \n for (int i=0; i < data.length -1; i++) // stopping 1 early because reading ahead\n {\n testD = Math.abs(data[i]-data[i+1]);\n if (testD < minD)\n {\n minD = testD;\n }\n }\n \n \n return minD;\n }", "long getQuantite();", "protected final int calculateInterst1(int pr){\n\t\t return pr*10*1/100;\n\t }", "private static double mediana(List<Double> valores){\n\t\tdouble mediana;\n\t\tif(valores.size()%2==0){\n\t\t\tmediana = (valores.get(valores.size()/2) + valores.get(valores.size()/2-1))/2;\n\t\t}else{\n\t\t\tmediana = valores.get(valores.size()/2);\n\t\t}\n\t\treturn mediana;\n\t}", "public float getMinRatio();", "public int minQ(inValues input) {\n float qValue = (2 * input.orderCost * input.demandsArray[0][0] * (input.invCost + input.saleLossCost) * 360 / (input.invCost * input.saleLossCost));\n qValue = Math.round(Math.sqrt(qValue));\n return (int) qValue;\n }", "public float getFrecencyBoost(long now) {\r\n float result = adjustFrecencyBoost(storedFrecencyBoost, lastVisitTime, now);\r\n result = (float)Math.min(result, MAX_FRECENCY_BOOST);\r\n return result;\r\n }", "org.apache.xmlbeans.XmlDecimal xgetSingleBetMinimum();", "public double min() {\n/* 305 */ Preconditions.checkState((this.count != 0L));\n/* 306 */ return this.min;\n/* */ }", "public double calculateFirstOccurrence(Token token, FileData file) {\n\t\t\n\t\treturn 1 - ((double) token.getBeginIndex() / file.getQttyTerms());\n\t}", "int getSmpRate();", "float getFrequency() throws InterruptedException, ConnectionLostException;", "public float computeGap()\r\n {\n float bestOffer = -1f;\r\n float secondBest = -1f;\r\n if (_offres != null)\r\n {\r\n for (Offre current : _offres)\r\n {\r\n if (!current.isRejetee())\r\n {\r\n if (current.getMontant() > bestOffer)\r\n {\r\n secondBest = bestOffer;\r\n bestOffer = current.getMontant();\r\n }\r\n else if (current.getMontant() > secondBest)\r\n {\r\n secondBest = current.getMontant();\r\n }\r\n }\r\n }\r\n }\r\n if (bestOffer > 0)\r\n {\r\n if (secondBest > 0)\r\n {\r\n return bestOffer - secondBest;\r\n }\r\n else\r\n {\r\n return bestOffer - _montantVente;\r\n }\r\n }\r\n else\r\n {\r\n return -1;\r\n }\r\n }", "private int count(int val , int m , int n){\n int res = 0;\n for(int i = 1 ; i <= m ; i++){\n res += Math.min( val / i , n);\n }\n return res;\n }", "public double calcularAlvoMaximo() {\r\n\t\treturn calcularFrequenciaMaxima()*0.85;\r\n\t}", "public static void sort(int[] v) {\n\t\tint biggest_value=v[0];\n\t\tint lowest_value =v[0];\n\t\t\n\t\tfor(int i=0;i<v.length;i++) {\n\t\t\tif(v[i]>biggest_value) {\n\t\t\t\tbiggest_value = v[i];\n\t\t\t}\n\t\t\tif(v[i]<lowest_value) {\n\t\t\t\tlowest_value = v[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Define a amplitude dos valores existentes no vetor\n\t\tint range = biggest_value - lowest_value;\n\t\t\n\t\t//Cria o vetor de frequência com o tamanho da amplitude+1, para que contenha todos os\n\t\t//valores existentes no vetor\n\t\tint[] frequency = new int[range+1];\n\t\t\n\t\t//Cria um normalizador, que será responsável por normalizar o posicionamento dos valores\n\t\t//no vetor de frequência\n\t\tint normalizer = lowest_value*(-1);\n\t\t\n\t\t//Faz a contagem de elementos existentes no vetor de entrada, salvando suas ocorrências\n\t\t//no vetor de frequência\n\t\tfor(int i=0;i<v.length;i++) {\n\t\t\tfrequency[normalizer+v[i]] += 1;\n\t\t}\n\t\t\n\t\t//Torna o vetor de frequência em cumulativo\n\t\tfor(int i=1;i<frequency.length;i++) {\n\t\t\tfrequency[i]+=frequency[i-1];\n\t\t}\n\t\t\n\t\t//Cria o vetor que será o ordenado\n\t\tint[] ordered_array = new int[v.length];\n\t\t\n\t\t//Distribui valores de frequência no array ordenado\n\t\tfor(int i=v.length-1;i>-1;i--) {\n\t\t\tordered_array[frequency[v[i]+normalizer]-1] = v[i];\n\t\t\tfrequency[v[i]+normalizer]-=1;\n\t\t}\n\t\t\n\t\t//Redefine v pelo vetor ordenado\n\t\tfor(int i=0;i<v.length;i++) {\n\t\t\tv[i]=ordered_array[i];\n\t\t}\n\t}", "private float calculGainNumerical(KnowledgeBase kb, int attIndex) {\r\n\t\tArrayList<AttributeValue<Float>> possibleValue =findPossibleValueNumerical(kb,attIndex);\r\n\t\tArrayList<ArrayList<ArrayList<Integer>>> multiple_counters2D = new ArrayList<ArrayList<ArrayList<Integer>>>();\r\n\t\tfor(int i=0;i<possibleValue.size()-1;i++){\r\n\t\t\tmultiple_counters2D.add(kb.count2DNumeric(possibleValue.get(i),attIndex));\t\t\r\n\t\t}\r\n\t\tArrayList<Integer> counter1D = kb.count(kb.getIndexClass());\r\n\t\tfloat gini1D = calculImpurity(kb.getSamples().size(),counter1D);\r\n\t\tint indexBestSplit = find_bestSplit(kb,attIndex,multiple_counters2D);\r\n\t\t///\r\n\t\tArrayList<ArrayList<Integer>> counter2D = kb.count2DNumeric(attIndex, kb.getIndexClass(),possibleValue.get(indexBestSplit));\r\n\t\tfloat gini2D = calculImpurity2DForNumerical(kb,attIndex,counter2D,possibleValue.get(indexBestSplit));\r\n\t\treturn gini1D - gini2D;\r\n\t}", "int getQuantite();", "int getQuantite();", "Measurement getAccumulation();", "public float getFrequency() {\n Integer sR = (Integer)sampleRate.getSelectedItem();\n int intST = sR.intValue();\n int intFPW = framesPerWavelength.getValue();\n\n return (float)intST/(float)intFPW;\n }", "float getFixedHotwordGain();", "int askForTempMin();", "int minNoteValue();", "@Test\n public void testDFTOneFreq() {\n for (int freq = 0; freq < 1000; freq += 200) {\n SoundWave wave = new SoundWave(freq, 5, 0.5, 0.1);\n double maxFreq = wave.highAmplitudeFreqComponent();\n assertEquals(freq, maxFreq, 0.00001);\n }\n }", "public double media(){\n double soma=0;\n for (int i = 0; i < lista.size(); i++) {\n soma+=lista.get(i).getMedia();\n }\n return soma/lista.size();\n }", "private void computeAverageFrequencyDelayValue() {\n\tthis.averageFrequencyDelayValue = value * this.averageDelay;\n }", "Double getMinimumValue();", "public static int findChannelWeight()\n {\n for (int i = 0; i < DCService.wifiScanList.size(); i++) {\n\n allFrequency.add(convertFrequencyToChannel(DCService.wifiScanList.get(i).frequency));\n Log.v(\"Channel + AP: \", String.valueOf(convertFrequencyToChannel(DCService.wifiScanList.get(i).frequency)) + \"->\" + String.valueOf(DCService.wifiScanList.get(i).SSID));\n }\n Log.v(\"All frequency:\",allFrequency.toString());\n\n double channelArray[] = new double[13];\n\n // Fill all the elements with 0\n Arrays.fill(channelArray,0);\n\n double factor = 0.20;\n\n for (int band:allFrequency)\n {\n for (int i=band-5 ;i<= band+6 ;i++)\n {\n if (i<1 || i>13)\n continue;\n channelArray[i-1] = (channelArray[i-1] + (6-Math.abs(i-band))*factor);\n }\n }\n Log.v(\"Channel Array:\",Arrays.toString(channelArray));\n\n // Minimum value of channel array\n int bestFoundChannel;\n\n // Find minimum value from the channel array\n double small = channelArray[0];\n int index = 0;\n for (int i = 0; i < channelArray.length; i++) {\n if (channelArray[i] < small) {\n small = channelArray[i];\n index = i;\n }\n }\n\n // Find in channel array the elements with minimum channel value\n ArrayList<Integer> bestFoundAvailableChannels = new ArrayList();\n for(int items = 0;items < channelArray.length;items++)\n {\n if(channelArray[items] == small)\n {\n bestFoundAvailableChannels.add(items);\n }\n }\n if(channelArray[6] < channelArray[0] && channelArray[6] <channelArray[11] )\n return 6;\n if(channelArray[11] < channelArray[0] && channelArray[11] < channelArray[6])\n return 11;\n //Log.v(\"Minimum Channel Value,Best Found Channel:\", String.valueOf(small) + \",\" + String.valueOf(bestFoundChannel));\n // Find a random available channel from best found available channels\n /* Random rand = new Random();\n Integer randGeneratedBestFoundChannel = (Integer) bestFoundAvailableChannels.get(rand.nextInt(bestFoundAvailableChannels.size())) + 1;\n Log.v(\"Generated Random Available Channel:\" ,randGeneratedBestFoundChannel.toString());\n *///return (randGeneratedBestFoundChannel + 1);\n\n return 1;\n\n }", "int getPulsePercentage();", "public static float waveDataGetLowestValue(ArrayList<Float> wave){\r\n float lowestWaveValue = Collections.min(wave);\r\n return lowestWaveValue;\r\n\r\n }", "public int computeFine(int today);", "public float getMinAlturaCM();", "private static float calculateStepRate(int stepCount) {\n\n return (float) stepCount / (float) secsPerMinute;\n\n }", "java.math.BigDecimal getFractionalMinimum();", "static int minimumTime(int[] x) {\n Arrays.sort(x);\n int l = x.length;\n int s = 0;\n int n = l - 1;\n for (int i = 0; i < n; ++i) {\n s += x[i + 1] - x[i];\n }\n return s;\n }", "int getPercentageHeated();", "public static List<Float> findFrequency(ComplexNum[] wave)\n\t{\n\t\t\n\t\tComplexNum temp = new ComplexNum();\n\t\tComplexNum sum = new ComplexNum(0,0);\n\t\t\n\t\tdouble mag[] = new double [wave.length];\n\t\tlong timeStart = System.currentTimeMillis();\n\t\tfor(int k = 0; k < wave.length; k++)\n\t\t{\t\n\t\t\tsum.setReal(0.0);\n\t\t\tsum.setImaginary(0.0);\n\t\t\t\n\t\t\tfor(int t = 0; t < wave.length; t++)\n\t\t\t{\n\t\t\t\tdouble realTemp = Math.cos(-2 * Math.PI * k * t /wave.length);\n\t\t\t\tdouble imagTemp = Math.sin(- 2 * Math.PI * k * t /wave.length);\n\t\t\t\t\n\t\t\t\ttemp.setReal((realTemp*wave[t].getReal()));\n\t\t\t\ttemp.setImaginary((imagTemp*wave[t].getReal()));\n\t\t\t\t\n\t\t\t\tsum = sum.add(temp);\t\n\t\t\t}\n\t\t\t\n\t\t\tmag[k] = sum.magnitude();\n\t\t\t\n\t\t}\n\t\t\n\t\tList<Float> found = process(mag, testSampleRate, wave.length, 0.5);\n\t\tList<Float> foundFrequencies = new ArrayList<Float>();\n\t\tlong timeEnd = System.currentTimeMillis();\n\t\tfor (float freq : found) \n\t\t{\n\t\t\tif(freq > 20 && freq < 20000)\n\t\t\t\tfoundFrequencies.add(freq);\n\t\t}\n\n\t return (foundFrequencies);\n\t}", "public float getExecFreq(){return 0.0f;}", "public int minimumWaitingTime(int[] queries) {\n\t\tArrays.sort(queries);\n\t\t\n\t\tint answer = 0;\n\t\tfor(int i=0; i<queries.length-1; i++){\n\t\t\tint sum = queries[i]*(queries.length-1-i);\n\t\t\tanswer += sum;\n\t\t}\n return answer;\n }", "private int quantizeSpread(double spectralSpread) {\n\t\treturn (int) (spectralSpread / 1000) + 1;\n\t}", "BigInteger getPower_consumption();", "public int freq()\n\t{\n\t\treturn _lsPeriod.get (0).freq();\n\t}", "java.math.BigDecimal getSingleBetMinimum();", "public Map<Integer, Float> getPercentInFrequency() {\n\t\t\tMap<Integer, Float> percents = new LinkedHashMap<Integer, Float>();\n\t\t\t\n\t\t\tint[][] times = getTimeInFrequency();\n\t\t\tif (times == null || times.length == 0) return null;\n\t\t\t\n\t\t\tlong total = 0;\n\t\t\t\n\t\t\tfor (int i = 0; i < times.length; ++i) {\n\t\t\t\ttotal += times[i][1];\n\t\t\t}\n\t\t\t\n\t\t\tif (total == 0) return null;\n\t\t\t\n\t\t\tfor (int i = 0; i < times.length; ++i) {\n\t\t\t\tpercents.put(times[i][0], (float) times[i][1] / total * 100);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn percents;\n\t\t}", "public double getPeakQValue()\n\t{\n\t\tdouble max = 0;\n\t\tfor(int i=0; i< qDist.length;i++)\n\t\t{\n\t\t\tmax = Math.max(qDist[i],max);\n\t\t}\n\t\treturn max;\n\t}", "public int[] coldM(ArrayList<LottoDay> list)\n\t{\n\t\tint counter=0; //counts occurrences\n\t\tint low=200; //sets low to 200\n\t\tint [] megaF = new int [28]; //creates an array to store occurrences of mega numbers\n\t\tint[] check = new int [5]; //creates an array to store lowest mega numbers\n\t\tfor(int i=0; i<list.size();i++)\n\t\t{\n\t\t\tone = list.get(i);//get object\n\t\t\tmega= one.getMega();//get the mega number of the object\n\t\t\tfor(int j=0; j<megaF.length;j++)\n\t\t\t{\n\t\t\t\t//if mega number equals index\n\t\t\t\tif(mega==j)\n\t\t\t\t{\n\t\t\t\t\tcounter++; //add one to count\n\t\t\t\t\tmegaF[j]=counter+megaF[j]; //add one to occurrence\n\t\t\t\t\tcounter=0; //reset counter\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\n\t\tlow=200;//resets low\n\t\t//looks for the lowest number in the mega number array\n\t\tfor(int j=0; j<check.length;j++)\n\t\t{\n\t\t\tfor(int i=0; i<megaF.length;i++)\n\t\t\t{\n\t\t\t\t//if mega number is not zero and the occurrence is lower than low\n\t\t\t\tif(megaF[i]<low &&megaF[i]!=0)\n\t\t\t\t{\n\t\t\t\t\tlow = megaF[i]; //occurrence becomes new low\n\t\t\t\t\tindex=i;//store index\n\t\t\t\t\tcheck[j]=i;//store the mega number\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tlow=200;//reset low\n\t\t\tmegaF[index]=0;//set occurrence of the number to zero\n\t\t}\n\t\t//return 5 lowest mega numbers\n\t\treturn check;\n\t}", "public abstract double costPerMin (CallZone zone);", "public double calculaMedia(int[] vals) {\n if (vals == null) {\n System.out.println(\"vals == null: Como indicar que aconteceu um\" +\n \" erro e interromper a execucao normal do metodo \" +\n \"calculaMedia?\");\n }\n\n int soma = 0;\n for(int val : vals) {\n soma += val;\n }\n\n return soma / vals.length;\n }", "public float[] accumulateSimpleSilentPeriodFiles(ArrayList<File> files){\r\n\t\t\tfloat[] values = new float[10];\r\n\t\t\tfloat[] returnValue = new float[10];\r\n\t\t\t\r\n\t\t for(File file:files){\t\t\t\t\t\r\n\t\t BufferedReader reader;\r\n\t\t try{\r\n\t\t reader = new BufferedReader(new FileReader(file));\r\n\t\t String line = reader.readLine(); \r\n\t\t while(line != null){\t\r\n\t\t \tif(!line.substring(0,1).equals(\"#\")){\r\n\t\t \t\tString[] values2 = line.split(\" \");\r\n\t\t \t\tSystem.out.println(file.getAbsolutePath());\r\n\t\t \t\tfor(int i = 1; i < values2.length; i++) {\r\n\t\t \t\t\tSystem.out.println(\"+ \" + values2[i]);\r\n\t\t \t\t\tvalues[i-1] += Float.valueOf(values2[i]);\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\t \tline = reader.readLine();\r\n\t\t }\r\n\t\t \r\n\t\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t System.err.println(\"FileNotFoundException: \" + e.getMessage());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t System.err.println(\"Caught IOException: \" + e.getMessage());\r\n\t\t\t\t}\r\n\t\t }\r\n\r\n\t\t for(int j = 0; j < values.length; j++) if(values[j] != 0) returnValue[j] = (float)values[j]/files.size();\r\n\t\t \r\n\t\t return returnValue;\r\n\t\t}", "public static double centiMetresPerSecondToMetrePerSecond(double num) { return (num/100); }", "org.apache.xmlbeans.XmlDecimal xgetMultipleBetMinimum();", "float getPostGain();", "Double getTotalFloat();", "float getMonatl_kosten();", "public int GetMinVal();", "private synchronized double getVlrBonusMinutoFF(int idCodigoNacional)\n\t{\n\t\tHashMap bonusPulaPula = null;\n\t\t\n\t\tfor(int i = 0; i < listaBonusPulaPula.size(); i++)\n\t\t{\n\t\t\tbonusPulaPula = (HashMap)listaBonusPulaPula.get(i);\n\t\t\tif(((Integer)bonusPulaPula.get(\"ID_CODIGO_NACIONAL\")).intValue() == idCodigoNacional)\n\t\t\t{\n\t\t\t\treturn ((Double)bonusPulaPula.get(\"VLR_BONUS_MINUTO_FF\")).doubleValue();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public double getTotalExcludingLowest()\n {\n if (currentSize == 0)\n {\n return 0;\n }\n else if (currentSize == 1)\n {\n return scores[0];\n }\n else\n {\n double sum = 0;\n for (int i = 0; i < currentSize; i++)\n {\n sum = sum + scores[i];\n }\n return sum - getLowest();\n }\n }", "private static int getBonus(int sales) {\n if (sales > 5000) {\n\n return sales / 10;\n\n }\n return 0;\n }", "java.math.BigDecimal getWagerMinimum();", "java.lang.String getFrequency();", "public double getfundamentalFreq() {\n\t\tif ( fundamentalFreq == 0f )\n\t\t\tcalculatefundamentalFreq();\n\n\t\treturn fundamentalFreq;\n\t}", "Double getTotalSpent();", "public double getPER() {\n\t\tint nq = q0.length;\n double sum = 0.0;\n for (int i=0; i<nq; i++) sum += q0[i];\n\t\treturn Math.min(1.0, 0.5*(1.0-(sum/(double)nq))/initPER); // 0.5 * proba erreur\t\t\n\t}", "public float montos(){\n\tDefaultTableModel modelo = vc.returnModelo();\r\n\tint numeroFilas=modelo.getRowCount();\r\n\tfloat monto=0;\r\n\t\tif(modelo.getRowCount()!=0){\r\n\t\t\r\n\t\t\tfor (int i = 0; i < numeroFilas; i++) {\r\n\t\t\t\t\r\n\t\t\t\tmonto = monto + Float.valueOf(modelo.getValueAt(i, 5).toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tmonto=0;\r\n\t\t}\r\n\t\treturn monto;\r\n\t}", "double getCurrentTfConsumed();", "public void adjust_FineFuelMoisture(){\r\n\t// If FFM is one or less we set it to one\t\t\r\n\tif ((FFM-1)<=0){\r\n\t\tFFM=1;\r\n\t}else{\r\n\t\t//add 5 percent FFM for each Herb stage greater than one\r\n\t\tFFM=FFM+(iherb-1)*5;\r\n\t}\r\n}", "org.apache.xmlbeans.XmlDecimal xgetFractionalMinimum();", "private int findZero(){\r\n\t\t// configure stuff\r\n\t\tint channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_MONO;\r\n\t\tint audioEncoding = AudioFormat.ENCODING_PCM_16BIT;\r\n\t\tint bufferSize = AudioRecord.getMinBufferSize(FREQUENCY, channelConfiguration, audioEncoding);\r\n\t\tAudioRecord audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, FREQUENCY, channelConfiguration,audioEncoding, bufferSize);\r\n\r\n\t\tshort[] buffer = new short[bufferSize];\r\n\t\taudioRecord.startRecording();\r\n\t\tint bufferReadResult = audioRecord.read(buffer, 0, bufferSize);\r\n\t\taudioRecord.stop();\r\n\t\tint sum = 0;\r\n\t\tfor (int b = bufferReadResult * (2/3); b < bufferReadResult; b++) {\r\n\t\t\tsum += buffer[b];\r\n\t\t}\r\n\t\tif (bufferReadResult == 0){\r\n\t\t\treturn this.offset;\r\n\t\t}\r\n\t\t\r\n\t\treturn -1*(sum/bufferReadResult);\r\n\t}", "public double min(){\r\n\t\t//variable for min val\r\n\t\tdouble min = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the minimum is more than the current index, change min to that value\r\n\t\t\tif (min > this.data[i]){\r\n\t\t\t\tmin = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the minimum val\r\n\t\treturn min;\r\n\t}", "private double calcuCMetric() {\n\t\treturn (p-1)/fcost;\n\t}", "public double min() {\n\t\tif (count() > 0) {\n\t\t\treturn _min.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public static float waveDataGetPeakToPeakValue(ArrayList<Float> wave){\r\n return Collections.max(wave)-Collections.min(wave);\r\n }", "public float getMinimumFloat() {\n/* 212 */ return (float)this.min;\n/* */ }" ]
[ "0.633085", "0.6319382", "0.6268617", "0.6153513", "0.6082655", "0.5889875", "0.5862621", "0.58558154", "0.5855671", "0.58364135", "0.58364135", "0.58239317", "0.57974815", "0.5760805", "0.57373655", "0.5717173", "0.5711489", "0.57113063", "0.57109344", "0.57038987", "0.5697337", "0.569035", "0.56296813", "0.5624387", "0.5612066", "0.5602844", "0.55775034", "0.5571743", "0.55505145", "0.5547924", "0.5547131", "0.5544726", "0.5543202", "0.55340546", "0.55249155", "0.5521606", "0.5519959", "0.55166936", "0.55071926", "0.5491523", "0.54844874", "0.5483805", "0.5481772", "0.5478716", "0.5478716", "0.54782563", "0.54730463", "0.5455394", "0.5452508", "0.54511493", "0.5444015", "0.5442545", "0.5431795", "0.5403517", "0.5395239", "0.53870994", "0.5386508", "0.5377535", "0.5376269", "0.5374697", "0.53745794", "0.5372763", "0.5364196", "0.53546035", "0.53545874", "0.53536916", "0.53456855", "0.5343084", "0.534154", "0.53386384", "0.533768", "0.5328379", "0.5314752", "0.5314696", "0.5313121", "0.53094614", "0.53086", "0.5308326", "0.5304618", "0.53019166", "0.53014994", "0.5298573", "0.5298103", "0.5293973", "0.5292984", "0.5288503", "0.5287657", "0.5284044", "0.52831", "0.5275335", "0.5274228", "0.5272218", "0.5271745", "0.5270966", "0.52705055", "0.52695924", "0.5265904", "0.52657545", "0.52622193", "0.5256823" ]
0.6602429
0
metodo para calcular a frequencia alvo maximo
public double calcularAlvoMaximo() { return calcularFrequenciaMaxima()*0.85; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Factura getMaxNumeroFactura();", "BigInteger getMax_freq();", "public double calcularAlvoMinima() {\r\n\t\treturn calcularFrequenciaMaxima()*0.5;\r\n\t}", "Double getMaximumValue();", "double getMax();", "double getMax();", "public float getMaxAlturaCM();", "public static long stockmax(List<Integer> prices) {\n\t\t// Write your code here\n\t\tlong profit=0L;\n\t\tlong maxSoFar=0L;\n\t\t for (int i = prices.size() - 1; i > -1 ; i--) {\n\t if (prices.get(i) >= maxSoFar) {\n\t maxSoFar = prices.get(i);\n\t }\n\t profit += maxSoFar - prices.get(i);\n\t }\n\t return profit;\n\t}", "public float getMaxValue();", "public int getMaxFrequency() {\n\t\t\tif (mMaxFrequency == 0) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + MAX_FREQUENCY);\n\t\t\t\tif (list == null || list.isEmpty()) return 0;\n\t\t\t\tint value = 0;\n\t\t\t\ttry { value = Integer.valueOf(list.get(0)); }\n\t\t\t\tcatch (NumberFormatException ignored) {}\n\t\t\t\tmMaxFrequency = value / 1000;\n\t\t\t}\n\t\t\treturn mMaxFrequency;\n\t\t}", "private float calculateMaxValue(int[] probes) {\r\n float max = 0f;\r\n float value;\r\n final int samples = experiment.getNumberOfSamples();\r\n for (int sample=0; sample<samples; sample++) {\r\n for (int probe=0; probe<probes.length; probe++) {\r\n value = experiment.get(probes[probe], sample);\r\n if (!Float.isNaN(value)) {\r\n max = Math.max(max, Math.abs(value));\r\n }\r\n }\r\n }\r\n return max;\r\n }", "private static void afisareSubsecventaMaxima() {\n afisareSir(citireSir().SecvMax());\n }", "public float maxSpeed();", "float xMax();", "java.math.BigDecimal getWBMaximum();", "public int findMax(){\n return nilaiMaks(this.root);\n }", "Integer getMaximumResults();", "public double max(){\r\n\t\t//variable for max val\r\n\t\tdouble max = this.data[0];\r\n\t\t\r\n\t\tfor (int i = 1; i < this.data.length; i++){\r\n\t\t\t//if the maximum is less than the current index, change max to that value\r\n\t\t\tif (max < this.data[i]){\r\n\t\t\t\tmax = this.data[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//return the maximum val\r\n\t\treturn max;\r\n\t}", "int getMaximum();", "public double calculateMaximumAmount() {\n\t\t\n\t\tdouble maxAmount = 0;\n\t\t\n /**\n * The max(Collection<? extends T>, Comparator<? super T>) method is used \n * to return the maximum element of the given collection, according to the \n * order induced by the specified comparator\t\t\t\n */\t\n\t\tmaxAmount = (double)getMaximumSize()/Collections.max(tokenSizes.values());\n\t\t\n\t\treturn maxAmount;\t\n\t}", "private int max(int profondeur)\n\t{\n\t\tif(profondeur == 0 || grille.fin())\n\t\t{\n\t\t\treturn eval();\n\t\t}\n\t\tint max_val = -1000;\n\t\tfor(int y = 0; y < grille.getTaille(); y++)\n\t\t{\n\t\t\tfor(int x = 0; x < grille.getTaille(); x++)\n\t\t\t{\n\t\t\t\tCoordonnee test = new Coordonnee(x, y);\n\t\t\t\tif(grille.getCase(test).getContenu() == grille.getCaseVide())\n\t\t\t\t{\n\t\t\t\t\tgrille.jouer(test, getPion());\n\t\t\t\t\tint val = min(profondeur-1);\n\t\t\t\t\t//System.out.println(x + \" \" + y + \" : \" + val);\n\t\t\t\t\t//grille.afficher();\n\t\t\t\t\tif(val > max_val)\n\t\t\t\t\t{\n\t\t\t\t\t\tmax_val = val;\n\t\t\t\t\t}\n\t\t\t\t\tannuler(test);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max_val;\n\t}", "public abstract float getMaxValue();", "public int GetMaxVal();", "public double max() {\n\t\tif (count() > 0) {\n\t\t\treturn _max.get();\n\t\t}\n\t\treturn 0.0;\n\t}", "public float getMaxRatio();", "public abstract int getMaximumValue();", "int maxNoteValue();", "public float getMaximumFloat() {\n/* 266 */ return (float)this.max;\n/* */ }", "private static int maxValue(int[] a) {\n\t\tint max_value =0;\r\n\t\tint current_max=0;\r\n\t\t\r\n\t\tfor(int i=0;i<a.length;i++)\r\n\t\t{\r\n\t\t\tcurrent_max += a[i];\r\n\t\t\tmax_value= Math.max(max_value, current_max);\r\n\t\t\tif(a[i]<0)\r\n\t\t\t\tcurrent_max=0;\r\n\t\t}\r\n\t\t\r\n\t\treturn max_value;\r\n\t}", "public static int maxProfit(int arr[]) {\n\t\t\n\t\tint mpif[]=new int[arr.length];\n\t\tint maxProfit=0;\n\t\tint minCurrent=Integer.MAX_VALUE;\n\t\t\n\t\t\n\t\tfor(int i=0;i<mpif.length;i++) {\n\t\t\t\n\t\t\tif(arr[i]<minCurrent) {\n\t\t\t\tminCurrent=arr[i];\n\t\t\t}\n\t\t\tif(arr[i]-minCurrent>maxProfit) {\n\t\t\t\tint tempProfit=arr[i]-minCurrent;\n\t\t\t\tmaxProfit=Math.max(maxProfit, tempProfit);\n\t\t\t\tmpif[i]=maxProfit;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmpif[i]=Math.max(maxProfit, arr[i]-minCurrent);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tint mpat=0;\n\t\tint currentMAx=arr[arr.length-1];\n\t\tint mpbf[]=new int[arr.length];\n\t\tfor(int i=arr.length-2;i>=0;i--) {\n\t\t\tif(arr[i]>currentMAx) {\n\t\t\t\tcurrentMAx=arr[i];\n\t\t\t}\n\t\t\tif(currentMAx-arr[i]>mpat) {\n\t\t\t\tint temp=currentMAx-arr[i];\n\t\t\t\tmpat=Math.max(mpat, temp);\n\t\t\t\tmpbf[i]=mpat;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmpbf[i]=Math.max(mpat, currentMAx-arr[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tint ans[]=new int[arr.length];\n\t\tint max_=0;\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tint sum=mpbf[i]+mpif[i];\n\t\t\tans[i]=sum;\n\t\t\tif(sum>max_) {\n\t\t\t\tmax_=sum;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tSystem.out.print(mpif[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tSystem.out.print(mpbf[i]+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t\n\t\tfor(int i=0;i<ans.length;i++) {\n\t\t\tSystem.out.print(ans[i]+\" \");\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\treturn max_;\n\t\t\n\t\t\n\t\t\n\t}", "public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }", "public int maxFrequency(int[] nums, int k) {\n Arrays.sort(nums);\n int n = nums.length;\n int res = 1;\n for (int i = 0, j = 1, cost = 0; j < n; ) {\n int nextCost = cost + (nums[j] - nums[j - 1]) * (j - i);\n if (nextCost <= k) {\n res = Math.max(res, ++j - i);\n cost = nextCost;\n } else {\n cost -= nums[j - 1] - nums[i++];\n }\n }\n return res;\n }", "private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }", "java.math.BigDecimal getMaximum();", "public int maxFrequency2(int[] nums, int k) {\n Arrays.sort(nums);\n int i = 0;\n int j = 0;\n long sum = k;\n for (int n = nums.length; j < n; j++) {\n sum += nums[j];\n if (sum < (long)nums[j] * (j - i + 1)) {\n sum -= nums[i++];\n }\n }\n return j - i;\n }", "double getMax() {\n\t\t\treturn value_max;\n\t\t}", "public float _getMax()\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n return (getMaximum() / max);\r\n } else\r\n {\r\n return getMaximum();\r\n }\r\n }", "@Override\n\tpublic Double calculerFonds(Integer idBanque) {\n\t\treturn 1000.0;\n\t}", "public int getMaxFrequency() {\n\t\t\n\t\tif(firstNode!=null){\n\t\t\tNode currentNode = firstNode;\n\t\t\tNode maxNode = firstNode;\n\t\t\twhile(currentNode!=null){\n\t\t\t\tif(currentNode.getFrequencyOfNode()>=maxNode.getFrequencyOfNode()){\n\t\t\t\t\tmaxNode = currentNode;\n\t\t\t\t}\n\t\t\t\tcurrentNode = currentNode.next;\n\t\t\t}\n\t\t\treturn maxNode.getFrequencyOfNode();\n\t\t}\n\t\t\t\n\t\treturn 0;\n\t}", "public double getMaximumValue() { return this.maximumValue; }", "org.apache.xmlbeans.XmlDecimal xgetWBMaximum();", "int getMaxCount();", "int getMaxCount();", "private static double getTimeForMaxSubSumOf(int[] list) {\n long start = System.currentTimeMillis();\n maxSubSumN(list);\n long stop = System.currentTimeMillis();\n return (stop - start) / 1000.0;\n }", "public int getMaximun(){\n int highGrade = grades[0]; //assumi que grades[0] é a maior nota\n //faz o loop pelo array de notas\n for(int grade: grades){\n //se a nota for maior que highGrade. atribui essa nota a highGrade\n if(grade > highGrade){\n highGrade = grade; //nota mais alta\n }\n }\n \n return highGrade;\n }", "public double getMaximum() {\n return (max);\n }", "public long getPropertyBalanceMax();", "int askForTempMax();", "public Contenedor getContenedorMaximo()\n {\n Contenedor maxCont = null;\n int maxPeso ;\n\n maxPeso = 0;\n\n for (Contenedor c : this.losContenedores){\n if (c.peso > maxPeso)\n {\n maxPeso = c.peso;\n maxCont = c;\n }\n }\n\n return maxCont;\n }", "public int maxProfitBF(int prices[]) {\n int maxprofit = 0;\n for (int i = 0; i < prices.length - 1; i++) {\n for (int j = i + 1; j < prices.length; j++) {\n int profit = prices[j] - prices[i];\n if (profit > maxprofit)\n maxprofit = profit;\n }\n }\n return maxprofit;\n }", "org.apache.xmlbeans.XmlDecimal xgetMaximum();", "public int getMaxTotalCost();", "public double maxDifference()\n {\n double maxD = 0.0;\n double testD = 0.0;\n \n for (int i=0; i < data.length -1; i++) // stopping 1 early because reading ahead\n {\n testD = Math.abs(data[i]-data[i+1]);\n if (testD > maxD)\n {\n maxD = testD;\n }\n }\n \n return maxD;\n }", "public Node maxFrequency(Node root) {\r\n\t\t\r\n\t\tif(root == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t//System.out.println(\"The count for \" + root.getData() + \" is \" + root.getCount());\r\n/////////////////////////////////////////////////////////////////////////\r\n/// checks if the max is greater than count of root \t\t\t\t ///\r\n///\t\tif yes, update the value of the Max with count of root\t\t ///\r\n/////////////////////////////////////////////////////////////////////////\r\n\t\t\r\n\t\tif(max<root.getCount()) {\r\n\t\t\tmax = root.getCount();\r\n\t\t\ttemp = root;\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tmaxFrequency(root.getlChild());\r\n\t\tmaxFrequency(root.getrChild());\r\n\t\t\r\n\t\treturn temp;\r\n\t}", "public double getMaxVal() {\n return maxVal;\n }", "static int maxProfit(int[] prices)\n\t{\n\t\tint len = prices.length;\n\t\tint min = Integer.MAX_VALUE;\n\t\tint profit = 0;\n\t\tfor (int i = 0; i < len; i++)\n\t\t{\n\t\t\tmin = min > prices[i] ? prices[i] : min;\n\t\t\tprofit = prices[i] - min > profit ? prices[i] - min : profit; \n\t\t}\n\t\treturn profit;\n\t}", "public double getMaximumDouble() {\n/* 255 */ return this.max;\n/* */ }", "public int maxProfit(int[] prices) {\n if(prices.length==0){\n return 0;\n }\n int max = 0;\n int valley = prices[0];\n int peak = prices[0];\n int i=0;\n while(i < prices.length-1){\n while(i<prices.length-1 && prices[i]>=prices[i+1])\n i++;\n valley = prices[i];\n while(i<prices.length-1 && prices[i]<=prices[i+1])\n i++;\n peak = prices[i];\n max += peak- valley;\n }\n return max;\n }", "public double getMaximumScore() {\n return 0.9; // TODO: parameter\n }", "E maxVal();", "public double max() {\n double resultat = 0;\n double tmp = 0;\n System.out.println(\"type:\" + type);\n for (int i = 0; i < tab.size(); i++) {\n tmp = CalculatorArray.max(tab.get(i));\n if (tmp > resultat) {\n resultat = tmp;\n }\n }\n System.out.println(\"Max colonne:\" + resultat);\n return resultat;\n }", "public int maxProfit(int[] prices) {\n if(prices.length==0) return 0;\n int T0=0;\n int T1=-(int)1e8;\n for(int val:prices){\n T0=Math.max(T0,T1 + val);\n T1=Math.max(T1,0 - val);\n }\n return T0;\n }", "double getMaxVolume();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();", "public int getSumaMax() {\r\n\t\treturn sumaMax;\r\n\t}", "int getLastVibrationFrequency();", "private static float calcMaxHumChange(float timeForEvent) {\r\n float humChange = timeForEvent * max_rateOfChange;\r\n if (humChange > 15) {\r\n max_rateOfChange = 15 / timeForEvent;\r\n humChange = 15;\r\n }\r\n return humChange;\r\n }", "private static final double maxDecel(double speed) {\n return limit(1, speed * 0.5 + 1, 2);\n }", "public int getResult() {\n return this.max;\n }", "public int max(int[] prices){\n int sum = 0;\n for(int i=1;i<prices.length;i++){\n if((prices[i]-prices[i-1])>0){\n sum += (prices[i]-prices[i-1]);\n }\n }\n return sum;\n }", "@Override\n\tpublic int select_arm() {\n\t\tint countsSum = 0;\n\t\t\n\t\tfor(int arm : m_counts){\n\t\t\tif(arm == 0) return arm;\n\t\t\tcountsSum += arm;\n\t\t}\n\t\t\n\t\tdouble max = 0;\n\t\tint max_indx = 0;\n\t\tfor(int i = 0; i<m_counts.length; i++){\n\t\t\tdouble bonus = Math.sqrt((2 * Math.log(countsSum)) / m_counts[i]);\n\t\t\tdouble ucb_value = m_values[i] + bonus;\n\t\t\tif(ucb_value > max){ \n\t\t\t\tmax = ucb_value;\n\t\t\t\tmax_indx = i;\n\t\t\t}\n\t\t}\n\t\treturn max_indx;\n\t}", "public int getPuntajeMaximo() {\n\t\ttry {\r\n\t\t\treturn juego.getPuntajeMaximo();\r\n\t\t} catch (RemoteException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public double max(ArrayList<Double> x) {\n double round;\n round = Collections.max(x) * 100;\n round = Math.round(round);\n round /= 100;\n return round;\n\n }", "public int maxProfit(int[] prices){\n int maxprofit = 0;\n for (int i=1;i<prices.length;i++){\n if(prices[i]>prices[i-1]){\n maxprofit += prices[i]-prices[i-1];\n }\n }\n return maxprofit;\n }", "public double maxValue() {\n return 1;\r\n }", "private double getMax() {\n return Collections.max(values.values());\n }", "int getFreq();", "public static int findMaxProfit(int [] prices){\n int max_profit = 0;\r\n for (int i = 0;i<prices.length-1;i++){\r\n if(prices [i] < prices [i+1]){\r\n max_profit = max_profit + (prices[i+1]-prices[i]);\r\n }\r\n }\r\n return max_profit;\r\n }", "private int getMaxValuedKey(final Map<Integer, Integer> map) {\n\t\tint maxfreq = Integer.MIN_VALUE;\n\t\tint result = 0;\n\t\tfor (Entry<Integer, Integer> currentPair : map.entrySet()) {\n\t\t\tint currentScore = 0;\n\t\t\tfor (int i = currentPair.getKey() - IGNORE_MARGIN; i <= currentPair\n\t\t\t\t\t.getKey() + IGNORE_MARGIN; i++) {\n\t\t\t\tif (map.containsKey(i)) {\n\t\t\t\t\tcurrentScore += map.get(currentPair.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (currentScore > maxfreq) {\n\t\t\t\tmaxfreq = currentScore;\n\t\t\t\tresult = currentPair.getKey();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private int findIndexOfMax(){\n\t\tint value=0;\n\t\tint indexlocation=0;\n\t\tfor(int i=0; i<myFreqs.size();i++){\n\t\t\tif(myFreqs.get(i)>value){\n\t\t\t\tvalue = myFreqs.get(i);\n\t\t\t\tindexlocation =i;\n\t\t\t}\n\t\t}\n\t\treturn indexlocation;\n\t}", "public long maxValue() {\n return 0;\n }", "public int getMaxPayRaise ()\r\n {\r\n return maxPayRaise;\r\n }", "public static int getMax(float[][] storage) {\n float []arr=new float[WINDOW];\n for (int i = 0;i<WINDOW;i++){\n arr[i]=storage[i][1];\n }\n\n if(arr==null||arr.length==0){\n return 0;//如果数组为空 或者是长度为0 就返回null\n }\n int maxIndex=0;//假设第一个元素为最小值 那么下标设为0\n int[] arrnew=new int[2];//设置一个 长度为2的数组 用作记录 规定第一个元素存储最小值 第二个元素存储下标\n for(int i =0;i<arr.length-1;i++){\n if(arr[maxIndex]<arr[i+1]){\n maxIndex=i+1;\n }\n }\n arrnew[0]=(int)arr[maxIndex];\n arrnew[1]=maxIndex;\n\n return arrnew[0];\n }", "public int maxProfit(int[] prices){\n\t\tif(prices.length == 0){\n\t\t\treturn 0;\n\t\t}\n\n\t\tint maxPro = 0;\n\n\t\tfor(int i = 1; i < prices.length; i++){\n\t\t\tmaxPro += Math.max(0, prices[i] - prices[i-1]);\n\t\t}\n\t\treturn maxPro;\n\t}", "public void setMaxAlturaCM(float max);", "public int getXMax(){\n\t\tDouble max = timeIncrements.get(timeIncrements.size()-1);\n\t\txMax = max.intValue();\n\t\treturn xMax;\n\t}", "public void calculateAverageFmax(){\n ArrayList<Double> fmaxList = new ArrayList<Double>();//Used to determine the SD\n double fmaxSum = 0;\n int profileCount = 0;\n if (averageProfileList == null){\n return;\n }\n for (AverageProfile avProfile: averageProfileList){\n for(Profile profile: avProfile.getReplicateProfileList()){\n if(profile.hasAnLreWindowBeenFound() && !profile.isExcluded()){\n fmaxSum += profile.getFmax();\n profileCount++;\n fmaxList.add(profile.getFmax());\n }\n }\n }\n if (profileCount >= 1 && fmaxSum > 0){\n averageFmax = fmaxSum/profileCount;\n if(fmaxList.size()>1){\n avFmaxCV = MathFunctions.calcStDev(fmaxList)/averageFmax;\n }else{\n avFmaxCV = 0;\n }\n } else {\n averageFmax = 0;\n }\n }", "int getMax();", "public int getMaximumPoints();", "public int getMaxAmount() {\n return _max;\n }", "public int maxProfitOP(int prices[]) {\n int minprice = Integer.MAX_VALUE;\n int maxprofit = 0;\n for (int i = 0; i < prices.length; i++) {\n if (prices[i] < minprice)\n minprice = prices[i];\n else if (prices[i] - minprice > maxprofit)\n maxprofit = prices[i] - minprice;\n }\n return maxprofit;\n }", "public double getPeakQValue()\n\t{\n\t\tdouble max = 0;\n\t\tfor(int i=0; i< qDist.length;i++)\n\t\t{\n\t\t\tmax = Math.max(qDist[i],max);\n\t\t}\n\t\treturn max;\n\t}", "private static double mediana(List<Double> valores){\n\t\tdouble mediana;\n\t\tif(valores.size()%2==0){\n\t\t\tmediana = (valores.get(valores.size()/2) + valores.get(valores.size()/2-1))/2;\n\t\t}else{\n\t\t\tmediana = valores.get(valores.size()/2);\n\t\t}\n\t\treturn mediana;\n\t}", "public BigDecimal getTradeMax() {\n return tradeMax;\n }", "public int getMax() {\n\t\treturn getMax(0.0f);\n\t}" ]
[ "0.7220445", "0.712678", "0.6566917", "0.6517732", "0.6506311", "0.6506311", "0.63906235", "0.63636464", "0.63603836", "0.6352731", "0.6337224", "0.63278735", "0.63191503", "0.63131595", "0.6276348", "0.62686795", "0.6259788", "0.62369215", "0.620943", "0.6178862", "0.617843", "0.616047", "0.61573315", "0.6149555", "0.6146575", "0.61380273", "0.61299527", "0.6121848", "0.61060286", "0.6091831", "0.60852146", "0.6068163", "0.60655737", "0.6054446", "0.6047199", "0.60436535", "0.6038189", "0.6035959", "0.6012697", "0.60111755", "0.6001435", "0.5989017", "0.5989017", "0.5987934", "0.59822387", "0.5959936", "0.5957551", "0.5954989", "0.5952878", "0.59504414", "0.5945951", "0.5941328", "0.5940011", "0.59385294", "0.59384096", "0.5930521", "0.59269804", "0.5909167", "0.59046614", "0.59037346", "0.5894802", "0.5889122", "0.5879274", "0.5876085", "0.5876085", "0.5876085", "0.5876085", "0.5876085", "0.5876085", "0.5870729", "0.5861476", "0.5856886", "0.58506435", "0.58468693", "0.5844772", "0.5835911", "0.58332807", "0.58321005", "0.58313066", "0.58264697", "0.58264244", "0.58237606", "0.58235335", "0.5817502", "0.5800467", "0.5790318", "0.5788561", "0.5782151", "0.57749826", "0.57724816", "0.57723457", "0.57675314", "0.57583517", "0.5750463", "0.57474416", "0.57474244", "0.5746326", "0.57415646", "0.57394516", "0.57356477" ]
0.77763015
0
/ JADX INFO: super call moved to the top of the method (can break code semantics)
public g(RatingPublishPresenterImpl.g gVar, Throwable th) { super(0); this.a = gVar; this.b = th; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void method_6349() {\r\n super.method_6349();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void method_6191() {\r\n super.method_6191();\r\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}", "@Override\n protected void prot() {\n }", "@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 einkaufen() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "@Override\n\tpublic void inorder() {\n\n\t}", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void dosomething2() {\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}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public void c(int paramInt)\r\n/* 101: */ {\r\n/* 102:122 */ this.b = false;\r\n/* 103:123 */ super.c(paramInt);\r\n/* 104: */ }", "public int b()\r\n/* 45: */ {\r\n/* 46: 58 */ g();\r\n/* 47: */ \r\n/* 48: 60 */ return super.b();\r\n/* 49: */ }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public void avvia() {\n /** invoca il metodo sovrascritto della superclasse */\n super.avvia();\n }", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void aaa() {\n\t\t\n\t}", "@Override\n public void b() {\n }", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "@Override\r\n public void salir() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void preorder() {\n\n\t}", "private stendhal() {\n\t}", "public void doSomething() {\n Outer.this.doSomething();\r\n // this stops the pretty printer and gives an\r\n //parser exception (stumbling over the .super)\r\n Outer.super.doSomething();\r\n }", "@Override\n\tpublic void deneme() {\n\t\tsuper.deneme();\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 public void preRun() {\n super.preRun();\n }", "public abstract void mo70713b();", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void laught() {\n\r\n\t}", "@Override\n\tpublic void imprimir() {\n\t\t\n\t}", "public final /* bridge */ /* synthetic */ void mo43571c() {\n super.mo43571c();\n }", "protected void h() {}", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "public void method_4270() {}", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "@Override\n\tpublic void call() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }", "@Override\n protected void initialize() \n {\n \n }", "public void callP(){\n super.walks(\"called parent method\");\n }", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "void berechneFlaeche() {\n\t}", "@Override\n protected void initialize() {\n\n \n }" ]
[ "0.7415376", "0.7120564", "0.7120564", "0.7120564", "0.71153504", "0.70223135", "0.7006699", "0.6959695", "0.69354844", "0.68295795", "0.6789057", "0.6759874", "0.6727165", "0.6727165", "0.6680012", "0.6670413", "0.6636899", "0.66286534", "0.6619911", "0.6605483", "0.6603786", "0.65827864", "0.6582374", "0.6549963", "0.65440935", "0.6521893", "0.65033007", "0.64430153", "0.6418491", "0.6415374", "0.6402436", "0.6399175", "0.63874805", "0.6380345", "0.63703823", "0.636628", "0.6361068", "0.63538253", "0.6352187", "0.63364285", "0.6320418", "0.63070816", "0.63070816", "0.6295037", "0.629354", "0.629354", "0.6286359", "0.6273603", "0.6262495", "0.62398976", "0.622353", "0.6220281", "0.62041765", "0.61982226", "0.61772496", "0.6173603", "0.61712366", "0.6169294", "0.6160802", "0.6130551", "0.61259943", "0.61221814", "0.6102809", "0.60933787", "0.6091748", "0.6089609", "0.6085169", "0.60627353", "0.6061544", "0.6055915", "0.60450166", "0.60438436", "0.60397464", "0.60341513", "0.60323876", "0.60323876", "0.60323876", "0.60323876", "0.60323876", "0.60323876", "0.60318136", "0.60297084", "0.6026534", "0.6025891", "0.6024079", "0.6018422", "0.6014384", "0.6010973", "0.60091984", "0.6001627", "0.5998774", "0.599578", "0.5995695", "0.5991061", "0.59895426", "0.59802836", "0.5971288", "0.5970281", "0.5967115", "0.59662133", "0.59614575" ]
0.0
-1
/ Return type fixed from 'java.lang.Object' to match base method
@Override // kotlin.jvm.functions.Function0 public Unit invoke() { this.a.a.q.trackSendRatingLoadingFail(); this.a.a.q.startSendRatingDraw(); RatingPublishPresenterImpl ratingPublishPresenterImpl = this.a.a; Throwable th = this.b; Intrinsics.checkNotNullExpressionValue(th, "error"); ratingPublishPresenterImpl.b(th); this.a.a.q.trackSendRatingDrawFail(); return Unit.INSTANCE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Object getUnderlyingObject();", "@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}", "Object getBase();", "public abstract String mo83558a(Object obj);", "@Override\n public Object getReturnValue(){\n return object;\n }", "public Object objectValue();", "@Override\n public T getObjRaiz() {\n return (super.getObjRaiz());\n }", "public abstract T zzs(Object obj);", "public abstract S castToReturnType(T o);", "protected abstract Object transform(Object o);", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "@Override\n public T getValue(T object) {\n return object;\n }", "public Object getObject() ;", "public abstract B zzt(Object obj);", "abstract Function get(Object arg);", "public T caseBase(Base object) {\n\t\treturn null;\n\t}", "public abstract O value();", "public abstract void mo1184a(Object obj);", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public Object getObject();", "public abstract org.omg.CORBA.Object read_Object();", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "private Object getTypeObjectPair() throws MathLinkException, NumberRangeException {\n Object result = null;\n int type = this.getInteger();\n if (type % -17 == -15) {\n type = -7 + -17 * (type / -17);\n } else if (type % -17 == -16) {\n type = -8 + -17 * (type / -17);\n }\n switch (type) {\n case -5: {\n result = new Integer(this.getInteger());\n break;\n }\n case -6: {\n result = new Long(this.getLongInteger());\n break;\n }\n case -4: {\n int i = this.getInteger();\n if (i < -32768 || i > 32767) {\n throw new NumberRangeException(i, \"short\");\n }\n result = new Short((short)i);\n break;\n }\n case -2: {\n int i = this.getInteger();\n if (i < -128 || i > 127) {\n throw new NumberRangeException(i, \"byte\");\n }\n result = new Byte((byte)i);\n break;\n }\n case -3: {\n int i = this.getInteger();\n if (i < 0 || i > 65535) {\n throw new NumberRangeException(i, \"char\");\n }\n result = new Character((char)i);\n break;\n }\n case -15: \n case -7: {\n double d = this.getDouble();\n if (d < -3.4028234663852886E38 || d > 3.4028234663852886E38) {\n throw new NumberRangeException(d, \"float\");\n }\n result = new Float((float)d);\n break;\n }\n case -16: \n case -8: {\n result = new Double(this.getDouble());\n break;\n }\n case -9: {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n result = this.getString();\n if (tok != 35 || !result.equals(\"Null\")) break;\n result = null;\n break;\n }\n case -1: {\n String s = this.getSymbol();\n if (s.equals(\"True\")) {\n result = Boolean.TRUE;\n break;\n }\n result = Boolean.FALSE;\n break;\n }\n case -13: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n break;\n }\n this.seekMark(mark);\n result = this.getComplex();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -10: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = new BigInteger((String)result);\n break;\n }\n result = new BigInteger(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -11: {\n long mark = this.createMark();\n try {\n int tok = this.getType();\n if (tok == 100000) {\n result = this.getObject();\n break;\n }\n if (tok == 35) {\n result = this.getSymbol();\n if (result.equals(\"Null\")) {\n result = null;\n break;\n }\n result = Utils.bigDecimalFromString((String)result);\n break;\n }\n result = Utils.bigDecimalFromString(this.getString());\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -12: {\n long mark = this.createMark();\n try {\n int tok = this.getNext();\n if (tok == 100000 && (result = this.getObject()) != null) break;\n this.seekMark(mark);\n result = this.getExpr();\n }\n finally {\n this.destroyMark(mark);\n }\n }\n case -14: {\n result = this.getObject();\n break;\n }\n case -10000: {\n break;\n }\n default: {\n int tok = this.getNext();\n result = tok == 100000 || tok == 35 ? this.getObject() : (type > -34 ? this.getArray(type - -17, 1) : (type > -51 ? this.getArray(type - -34, 2) : (type > -68 ? this.getArray(type - -51, 3) : (type > -85 ? this.getArray(type - -68, 4) : this.getArray(type - -85, 5)))));\n }\n }\n return result;\n }", "public abstract Object mo1771a();", "public abstract String getObjectType();", "void m21807c(Object obj);", "void m21806b(Object obj);", "void m21809e(Object obj);", "void m21805a(Object obj);", "void mo67921a(Object obj);", "protected abstract Object convertNonNull(Object o);", "public abstract Object mo1185b();", "<T> T mo19025a(Object obj, Class<T> cls);", "@Override // m.h\n public String a(Object obj) {\n return obj.toString();\n }", "void m21808d(Object obj);", "public abstract <T> T readObject();", "public abstract Object mo26777y();", "protected abstract O getResult();", "@Override\n public void returnObject(\n Object key,\n Object obj )\n {\n String error;\n\n if ( key == null || obj == null )\n {\n error = \"key or obj was null.\";\n logger.error( error );\n }\n\n if ( !(key instanceof String) )\n {\n error = \"Invalid key class \" + key.getClass().getName();\n logger.error( error );\n throw new InvalidArgumentException( error );\n }\n\n if ( !(obj instanceof IClientTask) )\n {\n error = \"Invalid object class \" + obj.getClass().getName();\n logger.error( error );\n throw new InvalidArgumentException( error );\n }\n\n try\n {\n super.returnObject( key, obj );\n }\n catch ( Exception e )\n {\n logger.error( e );\n }\n }", "Object value();", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "public Object convert(Object from, Class to) {\n \t\tif (from instanceof Function) {\n \t\t\tif (to == Callable.class)\n \t\t\t\treturn new RhinoCallable(engine, (Function) from);\n \t\t} else if (from instanceof Scriptable || from instanceof String) { // Let through string as well, for ArgumentReader\n \t\t\tif (Map.class.isAssignableFrom(to)) {\n \t\t\t\treturn toMap((Scriptable) from);\n \t\t\t} else {\n \t\t\t\t/* try constructing from this prototype first\n \t\t\t\ttry {\n \t\t\t\t\tScriptable scope = engine.getScope();\n \t\t\t\t\tExtendedJavaClass cls = ExtendedJavaClass.getClassWrapper(scope, to);\n \t\t\t\t\treturn cls.construct(Context.getCurrentContext(), scope, new Object[] { from });\n \t\t\t\t} catch(Throwable e) {\n \t\t\t\t\tint i = 0;\n \t\t\t\t}\n \t\t\t\t*/\n \t\t\t\tArgumentReader reader = null;\n \t\t\t\tif (ArgumentReader.canConvert(to) && (reader = getArgumentReader(from)) != null) {\n \t\t\t\t return ArgumentReader.convert(reader, unwrap(from), to);\n \t\t\t\t} else if (from instanceof NativeObject && getZeroArgumentConstructor(to) != null) {\n \t\t\t\t\t// Try constructing an object of class type, through\n \t\t\t\t\t// the JS ExtendedJavaClass constructor that takes \n \t\t\t\t\t// a last optional argument: A NativeObject of which\n \t\t\t\t\t// the fields define the fields to be set in the native type.\n \t\t\t\t\tScriptable scope = ((RhinoEngine) this.engine).getScope();\n \t\t\t\t\tExtendedJavaClass cls =\n \t\t\t\t\t\t\tExtendedJavaClass.getClassWrapper(scope, to);\n \t\t\t\t\tif (cls != null) {\n \t\t\t\t\t\tObject obj = cls.construct(Context.getCurrentContext(),\n \t\t\t\t\t\t\t\tscope, new Object[] { from });\n \t\t\t\t\t\tif (obj instanceof Wrapper)\n \t\t\t\t\t\t\tobj = ((Wrapper) obj).unwrap();\n \t\t\t\t\t\treturn obj;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t} else if (from == Undefined.instance) {\n \t\t\t// Convert undefined ot false if destination is boolean\n \t\t\tif (to == Boolean.TYPE)\n \t\t\t\treturn Boolean.FALSE;\n \t\t} else if (from instanceof Boolean) {\n \t\t\t// Convert false to null / undefined for non primitive destination classes.\n\t\t\tif (!((Boolean) from).booleanValue() && !to.isPrimitive())\n \t\t\t\treturn Undefined.instance;\n \t\t}\n \t\treturn null;\n \t}", "protected abstract Object read ();", "void mo3207a(Object obj);", "Object getNative();", "@Override\n\tpublic Object convert(Class<?> desiredType, Object in) throws Exception {\n\t\treturn null;\n\t}", "public T get() {\n return object;\n }", "Objet getObjetAlloue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public Object obj()\n\t{\n\t\treturn object;\n\t}", "void mo6504by(Object obj);", "public T caseRealCast(RealCast object) {\n\t\treturn null;\n\t}", "public T caseRequestBaseType(RequestBaseType object) {\n\t\treturn null;\n\t}", "public interface Value {\n Word asWord();\n\n int toSInt();\n\n BigInteger toBInt();\n\n short toHInt();\n\n byte toByte();\n\n double toDFlo();\n\n float toSFlo();\n\n Object toArray();\n\n Record toRecord();\n\n Clos toClos();\n\n MultiRecord toMulti();\n\n boolean toBool();\n\n char toChar();\n\n Object toPtr();\n\n Env toEnv();\n\n <T> T toJavaObj();\n\n public class U {\n static public Record toRecord(Value value) {\n if (value == null)\n return null;\n else\n return value.toRecord();\n }\n\n public static Value fromBool(boolean b) {\n return new Bool(b);\n }\n\n public static Value fromSInt(int x) {\n return new SInt(x);\n }\n\n public static Value fromArray(Object x) {\n return new Array(x);\n }\n\n public static Value fromBInt(BigInteger x) {\n return new BInt(x);\n }\n\n public static Value fromPtr(Object o) {\n return new Ptr(o);\n }\n\n public static Value fromSFlo(float o) {\n return new SFlo(o);\n }\n\n public static Value fromDFlo(double o) {\n return new DFlo(o);\n }\n\n public static Value fromChar(char o) {\n return new Char(o);\n }\n\n public static Value fromByte(byte o) {\n return new Byte(o);\n }\n\n public static Value fromHInt(short o) {\n return new HInt(o);\n }\n\n\tpublic static <T> Value fromJavaObj(T obj) {\n\t return new JavaObj<T>(obj);\n\t}\n }\n}", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "public T casePrimType(PrimType object) {\n\t\treturn null;\n\t}", "public Object caseRMethod(RMethod object) {\n\t\treturn null;\n\t}", "public abstract JType unboxify();", "private Object getValueObject(Object object) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException{\n\t\tObject value = this.methodGet.invoke(object, null);\n\t\treturn value;\n\t}", "public T caseInterpolationMethodBaseType(InterpolationMethodBaseType object) {\n\t\treturn null;\n\t}", "@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}", "ObjectValue createObjectValue();", "public T caseDatatype(Datatype object)\n {\n return null;\n }", "public T getObject()\n\t{\n\t\treturn object;\n\t}", "public abstract Any value();", "protected IValue narrow(Object result){\n\t\tif(result instanceof Integer) {\n\t\t\treturn vf.integer((Integer)result);\n\t\t}\n\t\tif(result instanceof IValue) {\n\t\t\treturn (IValue) result;\n\t\t}\n\t\tif(result instanceof Thrown) {\n\t\t\t((Thrown) result).printStackTrace(stdout);\n\t\t\treturn vf.string(((Thrown) result).toString());\n\t\t}\n\t\tif(result instanceof Object[]) {\n\t\t\tIListWriter w = vf.listWriter();\n\t\t\tObject[] lst = (Object[]) result;\n\t\t\tfor(int i = 0; i < lst.length; i++){\n\t\t\t\tw.append(narrow(lst[i]));\n\t\t\t}\n\t\t\treturn w.done();\n\t\t}\n\t\tif(result == null){\n\t\t\treturn null;\n\t\t}\n\t\tthrow new InternalCompilerError(\"Cannot convert object back to IValue: \" + result);\n\t}", "public T caseAbstractTypeReference(AbstractTypeReference object) {\n\t\treturn null;\n\t}", "Object transform(Object o);", "@Override\r\n\tpublic void cast() {\n\r\n\t}", "@Override\n\tprotected Object doGetValue(Object source) {\n\t\treturn null;\n\t}", "public Object caseRClass(RClass object) {\n\t\treturn null;\n\t}", "public T caseBaseExpression(BaseExpression object)\n {\n return null;\n }", "public T caseBasica(Basica object)\n {\n return null;\n }", "public V cast(Object object) {\n return valueClass.cast(object);\n }", "private void doSomething(Object object) {\n\n }", "Integer getSubObj();", "public void testObjectSuperclassOfInterface() throws NoSuchMethodException {\n assertEquals(Object.class, GenericTypeReflector.getExactSuperType(ArrayList.class, Object.class));\n assertEquals(Object.class, GenericTypeReflector.getExactSuperType(List.class, Object.class));\n assertEquals(Object.class, GenericTypeReflector.getExactSuperType(String[].class, Object.class));\n }", "static Object m6085a(Class<?> cls, Object obj) {\n if (obj != null && obj.getClass() == cls) {\n return obj;\n }\n switch (m6083a(obj)) {\n case 0:\n if (cls == ScriptRuntime.f6505l || cls == ScriptRuntime.f6503j) {\n return \"undefined\";\n }\n m6091c(\"undefined\", cls);\n return obj;\n case 1:\n if (cls.isPrimitive()) {\n m6091c(obj, cls);\n }\n return null;\n case 2:\n if (cls == Boolean.TYPE || cls == ScriptRuntime.f6494a || cls == ScriptRuntime.f6503j) {\n return obj;\n }\n if (cls == ScriptRuntime.f6505l) {\n return obj.toString();\n }\n m6091c(obj, cls);\n return obj;\n case 3:\n if (cls == ScriptRuntime.f6505l) {\n return ScriptRuntime.m6436d(obj);\n }\n if (cls == ScriptRuntime.f6503j) {\n return m6090b(Double.TYPE, obj);\n }\n if ((cls.isPrimitive() && cls != Boolean.TYPE) || ScriptRuntime.f6502i.isAssignableFrom(cls)) {\n return m6090b(cls, obj);\n }\n m6091c(obj, cls);\n return obj;\n case 4:\n if (cls == ScriptRuntime.f6505l || cls.isInstance(obj)) {\n return obj.toString();\n }\n if (cls == Character.TYPE || cls == ScriptRuntime.f6496c) {\n if (((CharSequence) obj).length() == 1) {\n return Character.valueOf(((CharSequence) obj).charAt(0));\n }\n return m6090b(cls, obj);\n } else if ((cls.isPrimitive() && cls != Boolean.TYPE) || ScriptRuntime.f6502i.isAssignableFrom(cls)) {\n return m6090b(cls, obj);\n } else {\n m6091c(obj, cls);\n return obj;\n }\n case 5:\n if (obj instanceof Wrapper) {\n obj = ((Wrapper) obj).mo18879a();\n }\n if (cls == ScriptRuntime.f6497d || cls == ScriptRuntime.f6503j) {\n return obj;\n }\n if (cls == ScriptRuntime.f6505l) {\n return obj.toString();\n }\n m6091c(obj, cls);\n return obj;\n case 6:\n case 7:\n if (obj instanceof Wrapper) {\n obj = ((Wrapper) obj).mo18879a();\n }\n if (cls.isPrimitive()) {\n if (cls == Boolean.TYPE) {\n m6091c(obj, cls);\n }\n return m6090b(cls, obj);\n } else if (cls == ScriptRuntime.f6505l) {\n return obj.toString();\n } else {\n if (cls.isInstance(obj)) {\n return obj;\n }\n m6091c(obj, cls);\n return obj;\n }\n case 8:\n if (cls == ScriptRuntime.f6505l) {\n return ScriptRuntime.m6436d(obj);\n }\n if (cls.isPrimitive()) {\n if (cls == Boolean.TYPE) {\n m6091c(obj, cls);\n }\n return m6090b(cls, obj);\n } else if (cls.isInstance(obj)) {\n return obj;\n } else {\n if (cls == ScriptRuntime.f6506m && (obj instanceof NativeDate)) {\n return new Date((long) ((NativeDate) obj).f6314a);\n }\n if (cls.isArray() && (obj instanceof NativeArray)) {\n NativeArray bcVar = (NativeArray) obj;\n long j = bcVar.f6285a;\n Class componentType = cls.getComponentType();\n Object newInstance = Array.newInstance(componentType, (int) j);\n for (int i = 0; ((long) i) < j; i++) {\n try {\n Array.set(newInstance, i, m6085a(componentType, bcVar.get(i, bcVar)));\n } catch (EvaluatorException e) {\n m6091c(obj, cls);\n }\n }\n return newInstance;\n } else if (obj instanceof Wrapper) {\n Object a = ((Wrapper) obj).mo18879a();\n if (cls.isInstance(a)) {\n return a;\n }\n m6091c(a, cls);\n return a;\n } else if (cls.isInterface() && ((obj instanceof NativeObject) || (obj instanceof NativeFunction))) {\n return m6086a(cls, (ScriptableObject) obj);\n } else {\n m6091c(obj, cls);\n return obj;\n }\n }\n default:\n return obj;\n }\n }", "public T caseResultManagement(ResultManagement object)\r\n {\r\n return null;\r\n }", "public T caseCapabilitiesBaseType(CapabilitiesBaseType object) {\n\t\treturn null;\n\t}", "protected abstract Object toObject(ByteBuffer content, Type targetType) throws BeanConversionException;", "public abstract Object getTypedParams(Object params);", "public Object getObject() {\n return getWildcard();\n }", "public abstract Object getObservedObject();", "public void mo1774a(Object obj) {\n }", "private static Object toJavaObject(Value value) throws RepositoryException {\n switch (value.getType()) {\n case PropertyType.DECIMAL:\n return value.getDecimal();\n case PropertyType.BINARY:\n return new LazyInputStream(value);\n case PropertyType.BOOLEAN:\n return value.getBoolean();\n case PropertyType.DATE:\n return value.getDate();\n case PropertyType.DOUBLE:\n return value.getDouble();\n case PropertyType.LONG:\n return value.getLong();\n case PropertyType.NAME: // fall through\n case PropertyType.PATH: // fall through\n case PropertyType.REFERENCE: // fall through\n case PropertyType.STRING: // fall through\n case PropertyType.UNDEFINED: // not actually expected\n default: // not actually expected\n return value.getString();\n }\n }", "public T caseContentsType(ContentsType object) {\n\t\treturn null;\n\t}", "public T returnValue();", "@Override\n public Object convert(Object dest, Object source, Class<?> aClass, Class<?> aClass1) {\n return null;\n\n }", "public T caseTypeParameter(TypeParameter object) {\n\t\treturn null;\n\t}", "public T caseType(Type object) {\r\n\t\treturn null;\r\n\t}", "<T> T convert(Object o, Class<T> type);", "public T caseValue(Value object) {\n\t\treturn null;\n\t}" ]
[ "0.73300743", "0.70384824", "0.6754094", "0.67179495", "0.6610807", "0.6596785", "0.65678746", "0.64676386", "0.6437923", "0.6406638", "0.63936657", "0.6331011", "0.63098955", "0.62965596", "0.6259889", "0.6248995", "0.62170064", "0.62139267", "0.61995703", "0.61995703", "0.61995703", "0.61995703", "0.6191638", "0.61809444", "0.6180563", "0.61519456", "0.61459607", "0.6138212", "0.61319226", "0.61239296", "0.6123201", "0.6116212", "0.60873765", "0.60795873", "0.6072117", "0.6069449", "0.60556036", "0.60539836", "0.6048853", "0.60417503", "0.6019431", "0.598231", "0.5974645", "0.5971884", "0.5968911", "0.5968911", "0.5968911", "0.5937566", "0.5923219", "0.5905314", "0.59033054", "0.58907574", "0.58818805", "0.5864885", "0.5856489", "0.5856489", "0.5856489", "0.584084", "0.5840092", "0.5835585", "0.5824479", "0.5820831", "0.5817491", "0.5814249", "0.5805972", "0.5790742", "0.5788903", "0.57826704", "0.57699996", "0.57351273", "0.5733717", "0.5719771", "0.5717999", "0.5715716", "0.5714732", "0.571202", "0.5711381", "0.5708306", "0.57076406", "0.57050216", "0.56847435", "0.5662788", "0.5653753", "0.5648048", "0.56434274", "0.56356", "0.56296957", "0.56289417", "0.5628167", "0.56255496", "0.5617072", "0.5616903", "0.5607355", "0.56034493", "0.5597333", "0.5595283", "0.5590022", "0.55820745", "0.55783165", "0.5574089", "0.557315" ]
0.0
-1
ListToArray ls=new ListToArray(); ls.convertToList();
public static void main(String[] args) { AddElemant add = new AddElemant(); // List<Integer> list = new LinkedList<Integer>(); // add.addElemant(list, 5); // add.addElemant(list, 10); // add.addElemant(list, 15); // add.addElemant(list, 20); // add.addElemant(list, 25); // Iterator<Integer> iterator = list.iterator(); // while (iterator.hasNext()) { // System.out.println(iterator.next()); // // MyAbstractChild myabstractchild = new MyAbstractChild(); // // myabstractchild.print1(); // } FileCount filecount = new FileCount(); Map<String, List<Integer>> map =filecount.findString(); //Iterator<String> mapiterator=map.keySet().iterator(); for(String m: map.keySet()){ //System.out.println(map.get(m)); System.out.println(m); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);", "Listof<X> toList();", "Object getTolist();", "@SuppressWarnings(\"unchecked\")\n public void testListToArray() throws Exception\n {\n List<PSKeyword> sourceList = new ArrayList<PSKeyword>();\n sourceList.add(createKeyword(\"1\"));\n sourceList.add(createKeyword(\"2\"));\n \n List<PSKeyword> targetList = roundTripListConversion(\n com.percussion.webservices.content.PSKeyword[].class, \n sourceList);\n\n assertTrue(sourceList.equals(targetList));\n }", "public static List toList(Object arr[])\r\n {\r\n return (arr == null) ? null : Arrays.asList(arr);\r\n }", "public interface ListConverterList<From,To> extends Converter<List<From>,List<To>> {\r\n}", "public COSArray toList() \n {\n return array;\n }", "private PyObject[] listtoarray(ArrayList<PyObject> a)\n {\n PyObject[] results = new PyObject[a.size()];\n int iter = 0;\n for (PyObject pt : a) {\n results[iter] = pt;\n iter++;\n }\n return results;\n }", "public abstract List<T> convertToEntities(List<D> dtos);", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default List<IData> asList() {\n \n return notSupportedCast(\"IData[]\");\n }", "public ListConverting getListConverting() {\n return listConverting;\n }", "List<T> readList();", "public static void main(String[] args) {\n //Generic Version of Collection\n ArrayList<String> arrayList = new ArrayList<>();\n arrayList.add(\"Deepak\");\n arrayList.add(\"Kumar\");\n arrayList.add(\"Hello\");\n arrayList.add(\"Sandeep\");\n System.out.println(\"Collection Before Array Conversion=\" + arrayList);\n String[] names = new String[arrayList.size()];\n arrayList.toArray(names);\n System.out.println(\"Array After Conversion From Collection\");\n for (int i = 0; i < names.length; i++) {\n System.out.println(names[i]);\n }\n //Collection Normal Version\n ArrayList arrayList1 = new ArrayList<>();\n arrayList1.add(\"Deepak\");\n arrayList1.add('a');\n arrayList1.add(1);\n arrayList1.add(10.9f);\n arrayList1.add(10.90);\n arrayList1.add(true);\n\n\n System.out.println(\"Normal Colection without Conversion\"+arrayList1);\n Object[] object = arrayList1.toArray();\n\n System.out.println(\"Array After Conversion From Normal Collection\");\n for (int i = 0; i < object.length; i++) {\n System.out.println(object[i]);\n }\n\n ///Array to Collection Conversion\n String[] names1 = new String[]{\"Deepak\",\"Kuldeep\",\"Sandeep\",\"Pardeep\"};\n ArrayList<String> namesCollection = new ArrayList(Arrays.asList(names1));\n System.out.println(namesCollection);\n\n\n }", "private static List<Node> arrayToList(Node[] n) {\n List<Node> listItems = new ArrayList<>();\n for (Node n1 : n) {\n listItems.add(n1);\n }\n return listItems;\n }", "public List getList() {\n return Arrays.asList(toJavaArray()); \n }", "private String[] convertToList(List<String> lstAddresses) {\r\n\t\tString[] arrayAddresses = new String[lstAddresses.size()];\r\n\t\tint index=0;\r\n\t\tfor(String strAddress: lstAddresses) {\r\n\t\t\tarrayAddresses[index++] = strAddress;\r\n\t\t}\r\n\t\treturn arrayAddresses;\r\n\t}", "void mo100444b(List<C40429b> list);", "public static <T> T[] listToArray (Object list) {\n\tif (! (list instanceof Collection)) {\n\t\treturn (T[]) new Object[0];\n\t}\n\treturn (T[]) ((Collection) list).toArray();\n }", "@SuppressWarnings( { \"rawtypes\", \"unchecked\" } )\n\tprotected static Vector toVector( List list )\n\t{\n\t\tVector v = new Vector( );\n\t\tfor ( Object o : list )\n\t\t{\n\t\t\tv.add( o );\n\t\t}\n\t\treturn v;\n\t}", "@SuppressWarnings(\"unchecked\")\n public ArrayList(ArrayList<E> lst) {\n list = (E[])new Object[lst.size()];\n capacity = lst.capacity;\n size = lst.size;\n for(int i = 0; i < size; i++) {\n list[i] = lst.list[i];\n }\n }", "private void intListToArrayList(int[] list, ArrayList<Integer> arrayList){\n for(int integer: list){\n arrayList.add(integer);\n }\n }", "private static FighterModel[] convertToArray(ArrayList<FighterModel> convertFighters) {\n if (convertFighters == null) {\n return null;\n } else {\n Collections.sort(convertFighters);\n int size = convertFighters.size();\n FighterModel[] fighters = new FighterModel[size];\n for (int i = 0; i < size; i++) {\n fighters[i] = convertFighters.get(i);\n }\n return fighters;\n }\n }", "@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}", "public static void main(String[] args)\r\n\t{\nArrayList al = new ArrayList<>();\r\nal.add(10);\r\nal.add(\"manu\");\r\nal.add('m');\r\nObject [] ob=al.toArray();\r\nfor (int i = 0; i < ob.length; i++)\r\n{\r\n\tSystem.out.println(ob[i]);\r\n\t\r\n}\r\n\t}", "public Object[] toArray()\n\t{\n\t\treturn list.toArray();\n\t}", "public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }", "public static void clientFunc(){\n List list = new ArrayList(); //rawtype list\n list.add(10);\n list.add(\"jenkins\");\n list.add(new Object());\n\n //unsafe classcast exception at runtime\n //rawtypes are unsafe\n List<String> stringList = list;\n\n ListIterator listIterator = list.listIterator();\n while(listIterator.hasNext()){\n System.out.println(listIterator.next());\n }\n }", "public ArrayList<T> getAsList(){\r\n return arrayList;\r\n }", "private static String[] listToArray(List<String> list){\n\t\tString[] arr = new String[list.size()];\n\t\tfor (int i = 0; i < list.size(); i++){\n\t\t\t\n\t\t\tarr[i] = list.get(i);\n\t\t}\n\t\t\n\t\treturn arr;\n\t}", "public List toList() throws TemplateModelException {\n if (unwrappedList == null) {\n Class listClass = list.getClass();\n List result = null;\n try {\n result = (List) listClass.newInstance();\n } catch (Exception e) {\n throw new TemplateModelException(\"Error instantiating an object of type \" + listClass.getName() + \"\\n\" + e.getMessage());\n }\n BeansWrapper bw = BeansWrapper.getDefaultInstance();\n for (int i=0; i<list.size(); i++) {\n Object elem = list.get(i);\n if (elem instanceof TemplateModel) {\n elem = bw.unwrap((TemplateModel) elem);\n }\n result.add(elem);\n }\n unwrappedList = result;\n }\n return unwrappedList;\n }", "private <T extends IDElement> ArrayList<Object[]> transformElementListToList(ArrayList<T> pElementList, int pElementType) throws Exception{\r\n\t\tArrayList<Object[]> vRet = new ArrayList<Object[]>();\r\n\t\t\r\n\t\tif (pElementList!= null) {\r\n\t\t\tfor (T vCur : pElementList) {\r\n\t\t\t\tswitch(pElementType) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tvRet.add(transformProbElementToList((ProbElement)vCur));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tvRet.add(transformPrioElementToList((PrioElement)vCur));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Exception(\"02; tELtL,Edi\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else throw new Exception(\"04; tELtL,Edi\");\r\n\t\t\r\n\t\treturn vRet;\r\n\t}", "@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}", "List<byte[]> asByteArrayList();", "E[] toArray();", "@Test\r\n\tpublic void testToArray() {\r\n\t\tObject[] sample = list.toArray();\r\n\t\tAssert.assertEquals(15, sample.length);\r\n\t\tfor (int i = 0; i < sample.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample[i]);\r\n\t\t}\r\n\t}", "public List<E> toList() {\r\n ArrayList<E> result = new ArrayList<E>(this.size());\r\n for (E e : this) {\r\n result.add(e);\r\n }\r\n return result;\r\n }", "List<Object> toList() {\n List<Object> results = new ArrayList<>(this.myArrayList.size());\n for (Object element : this.myArrayList) {\n if (element == null || PropertyObject.NULL.equals(element)) {\n results.add(null);\n } else if (element instanceof PropertyArray) {\n results.add(((PropertyArray) element).toList());\n } else if (element instanceof PropertyObject) {\n results.add(((PropertyObject) element).toMap());\n } else {\n results.add(element);\n }\n }\n return results;\n }", "public List<Object> toList() {\n int i = this.capacityHint;\n int i2 = this.size;\n ArrayList arrayList = new ArrayList(i2 + 1);\n Object[] head2 = head();\n int i3 = 0;\n while (true) {\n int i4 = 0;\n while (i3 < i2) {\n arrayList.add(head2[i4]);\n i3++;\n i4++;\n if (i4 == i) {\n head2 = head2[i];\n }\n }\n return arrayList;\n }\n }", "private static <T> List<T> list(T... elements) {\n return ImmutableList.copyOf(elements);\n }", "Object[] toArray();", "Object[] toArray();", "Object[] toArray();", "List<T> read();", "private String[] convertList(String[][] l){\n String[] list = new String[l.length];\n for(int i =0; i<list.length;i++){\n String input = l[i][1];\n System.out.println(input);\n list[i] = input;\n }\n \n return list;\n }", "public Object[] toArray(){\n\n \tObject[] o = new Object[list.size()];\n\n o = list.toArray();\n\n \treturn o;\n\n }", "public List<T> toList() {\n return Query.toList(iterable);\n }", "protected ArrayList<Object[]> transformProbElementListToList(ArrayList<ProbElement> pProbElementList) throws Exception{\r\n\t\treturn transformElementListToList(pProbElementList, 0);\r\n\t}", "public static Edge[] listToArray(ArrayList<Edge> list){\n\t\t\tEdge[] EdgeAry = new Edge[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tEdgeAry[i] = list.get(i);\n\t\t\t}\n\t\t\treturn EdgeAry;\n\t\t}", "private ArrayList<Document> convertToDocumentsList(ArrayList<WordDocument> list){\n ArrayList<Document> convertedList = new ArrayList<Document>();\n\n for(WordDocument x : list)\n convertedList.add(x.getDocument());\n\n return convertedList;\n }", "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "public static <T> List<T> toList(Iterable<T> elements) {\n return toList(elements.iterator());\n }", "private List<Point> toList(){\n List<Point> pointsList = new ArrayList<Point>();\n int n = pointsStack.size();\n for (int i = 0; i < n; i++){\n pointsList.add(pointsStack.pop());\n }\n return pointsList;\n }", "void arrayListToArray() {\n List<String> coolStringList = Arrays.asList( \"Java\", \"Scala\", \"Groovy\" ); //Declare &initialize o\n //coolStringList.add( \"Syed\" ); // Exception in thread \"main\" java.lang.UnsupportedOperationException\n coolStringList.set( 0, \"Syed\" );// works well\n System.out.println( coolStringList );\n/*\n /) Its not as fast as Arrays.asList() but more flexible.\n\n 2) This method actually copies the content of the underlying array into ArrayList provided.\n\n\n 3) Since you are creating copy of original array, you can add, modify and remove any element without affecting original one.*/\n\n List<String> assetList = new ArrayList();\n String[] asset = {\"equity\", \"stocks\", \"gold\", \"foriegn exchange\", \"fixed income\", \"futures\", \"options\"};\n Collections.addAll( assetList, asset );\n System.out.println( assetList );\n assetList.add( \"Mohammed\" );\n System.out.println( assetList );\n\n List newAssetList = new ArrayList();\n newAssetList.addAll( Arrays.asList( asset ) );\n System.out.println( newAssetList );\n newAssetList.add( \"YNS\" );\n System.out.println( newAssetList );\n /*String [] currency = {\"SGD\", \"USD\", \"INR\", \"GBP\", \"AUD\", \"SGD\"};\n System.out.println(\"Size of array: \" + currency.length);\n List<String> currencyList = CollectionUtils.arrayToList(currency);\n*/\n }", "public abstract List toNameValueList();", "public static void main(String[] args) {\n\n Integer[] integers = new Integer[] {1,2,3,4,5};\n List<Integer>list = new ArrayList<>(Arrays.asList(integers)); // correct one\n System.out.println(\"Converted from Array to List = \" + list);\n\n // this will be a fixed-size list- you can not use add method.\n List<Integer>fixedSizeList = Arrays.asList(integers); // bunu da yapabiliriz ama element ekleme yapamayiz.\n //fixedSizeList.add(6); bunda hata verecek. cunku fixedsize olarak convert ettik. \"unsupported operation exception\" uyarisi verir\n\n\n //Converting list to Array\n Integer[] convertedFromList =list.toArray(new Integer[0]); // sifir yerine herhangi bi sey yazilabilir. ama 0 yazmada fayda var.\n System.out.println(\"Converted from List to Array = \"+ Arrays.toString(convertedFromList));\n\n //Converting an Array to set\n Set<Integer>set = new HashSet<>(Arrays.asList(integers));\n System.out.println(\"Converted from Array to Set = \" + set);\n\n // Converting Set to Array\n Integer[] convertedFromSet = set.toArray(new Integer[0]);\n System.out.println(\"Converted from Set to Array = \" + Arrays.toString(convertedFromSet));\n\n // converting List to Set\n Set<Integer>setFromList = new HashSet<>(list); // bu en cok , ayni value varsa isimize yarar. cunku set'de duplicate yok\n System.out.println(\"Converted list to Set = \" + setFromList);\n\n // Converting Set to List\n List<Integer>listFromSet = new ArrayList<>(setFromList);\n listFromSet.add(9); // en sona ekler\n System.out.println(\"Converted Set to List = \" + listFromSet);\n\n }", "ListType createListType();", "public static List toList(Iterator iter)\r\n {\r\n if (iter == null)\r\n {\r\n return null;\r\n }\r\n List list = new ArrayList();\r\n while (iter.hasNext())\r\n {\r\n list.add(iter.next());\r\n }\r\n return list;\r\n }", "private <T> void populateArrayFromList(T[] arr, ArrayList<T> arrayList) {\n\t\tSystem.out.println(\"Array size \" + arr.length);\n\t\tSystem.out.println(\"ArrayList size \" + arrayList.size());\n\t\tfor (int i = 0; i < arrayList.size(); i++) {\n\t\t\tsavedListModel.addElement(arrayList.get(i).toString());\n\t\t\tarr[i] = arrayList.get(i);\n\t\t}\n\t}", "protected ArrayList<Object[]> transformPrioElementListToList(ArrayList<PrioElement> pPrioElementList) throws Exception{\r\n\t\treturn transformElementListToList(pPrioElementList, 1);\r\n\t}", "public List<V> transformList(List<E> list) {\n \tList<V> result = new ArrayList<>(list.size());\n if (list != null) {\n for (E entity : list) {\n result.add(getCachedVO(entity));\n }\n }\n \treturn result;\n }", "public static <T> List<T> AsList(@NonNull T... ts) {\n return Arrays.asList(ts);\n }", "public void setValue(List<T> convertData) {\n this.data = convertData;\n }", "@SuppressWarnings( \"rawtypes\" )\n private XmlElement toXmlArray(List list)\n {\n XmlElement array = new XmlElement(\"array\");\n for (Object o : list)\n {\n array.add(objectToXml(o));\n }\n return array;\n }", "@Override\n\tpublic ArrayList<T> toArrayList() {\n\t\tArrayList<T> out = new ArrayList<T>();\n\t\ttoArrayListRecursive(out,root);\n\t\treturn out;\n\t}", "private List<Integer> toList(int[] array) {\n List<Integer> list = new LinkedList<Integer>();\n for (int item : array) {\n list.add(item);\n }\n return list;\n }", "public static ListNode arrayToList(int[] array) {\n if (array == null || array.length == 0) {\n return null;\n }\n ListNode head = new ListNode(array[0]);\n ListNode current = head;\n for (int index = 1; index < array.length; index++) {\n current.next = new ListNode(array[index]);\n current = current.next;\n }\n return head;\n}", "@Test\n\tpublic void createListWithArraysUtil() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\tList<String> copy = Arrays.asList(\"AAPL\", \"MSFT\");\n\n\t\tassertTrue(list.equals(copy));\n\t}", "private ArrayList<Float> convertToLog(ArrayList<Float> list){\n ArrayList<Float> convertedList = new ArrayList<>();\n for (Float current:list){\n double temp = Math.log(current);\n float newValue = (float) temp;\n convertedList.add(newValue);\n }\n return convertedList;\n\n }", "public static <D> List<D> convert(List<?> source, Class<D> type) {\n return modelMapper.map(source, new ListOfType<D>(type));\n }", "@Override\r\n public <R> ListADT<R> map(Function<T, R> converter) {\r\n return new ListADTImpl(head.map(converter));\r\n }", "public static void convertIntArrayToList() {\n\t\tint[] inputArray = { 0, 3, 7, 1, 7, 9, 11, 6, 3, 5, 2, 13, 14 };\n\n\t\t// ********** 1 *************\n\t\tList<Integer> list = Arrays.stream(inputArray) // IntStream\n\t\t\t\t.boxed() // Stream<Integer>\n\t\t\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(list);\n\n\t\t// ********** 2 *************\n\t\tList<Integer> list_2 = IntStream.of(inputArray) // returns IntStream\n\t\t\t\t.boxed().collect(Collectors.toList());\n\t\tSystem.out.println(list_2);\n\t}", "@SuppressWarnings(\"unchecked\")\n protected static <V> V[] toVarArgs(List<V> list, Class<V> cls) {\n return list != null ? list.toArray((V[]) Array.newInstance(cls, list.size())) : (V[]) null;\n }", "@SuppressWarnings(\"WeakerAccess\")\n @NonNull\n protected List<T> convert(@NonNull final Object data) {\n final List<Object> objects = CoreReflection.getObjects(data, false);\n if (objects == null) return Collections.singletonList(convertSingle(data));\n\n final ArrayList<T> list = new ArrayList<>();\n for (final Object object: objects)\n if (!CoreReflection.isNotSingle(object))\n list.add(convertSingle(object));\n\n return list;\n }", "public abstract ArrayList<Key> toArrayList();", "private List<Agent> ConvertAgentT(List<AgentT> listT) {\r\n\t\tList<Agent> listerep = new ArrayList<Agent>();\r\n\t\tfor (AgentT at : listT) {\r\n\t\t\tAgent agent = new Agent();\r\n\t\t\tagent.setAgentT(at);\r\n\t\t\tlisterep.add(agent);\r\n\t\t}\r\n\t\treturn listerep;\r\n\t}", "List<E> read();", "public List<New> list();", "@org.junit.jupiter.api.Test\r\n void toArray() {\n mll.add(\"A\");\r\n Object [] backDoor = mll.toArray();\r\n backDoor[0] = \"HAHHA\";\r\n\r\n assertEquals(\"A\", mll.get(0));\r\n }", "public abstract void mo56920a(List<C4122e> list);", "private String[] toStringArray(ArrayList<String> list) {\n String[] tempStrings = new String[list.size()];\n tempStrings = list.toArray(tempStrings);\n\n return tempStrings;\n }", "@Test\n public void testToArray_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(4);\n instance.add(5);\n instance.add(6);\n\n Integer[] expResult = { 1, 2, 3, 4, 5, 6 };\n Integer[] result = instance.toArray(new Integer[] {});\n assertArrayEquals(expResult, result);\n }", "public abstract List<D> convertToDtos(List<T> entities);", "private List<Double> double2List(final double[] array) {\n\t\tList<Double> result = new ArrayList<Double>();\n\t\tfor (double n : array) {\n\t\t\tresult.add(new Double(n));\n\t\t}\n\t\treturn result;\n\t}", "List<TicketEntity> toEntityList(List<TicketDto> ticketDtoList);", "public abstract void mo56923b(List<C4122e> list);", "private List<Session> ConvertSessionT(List<SessionT> listT) {\r\n\t\tList<Session> listerep = new ArrayList<Session>();\r\n\t\tfor (SessionT st : listT) {\r\n\t\t\tSession session = new Session();\r\n\t\t\tsession.setSessionT(st);\r\n\t\t\tlisterep.add(session);\r\n\t\t}\r\n\t\treturn listerep;\r\n\t}", "public List getList(List oldList) {\n List newList = new ArrayList();\n Collections.copy(newList, oldList);\n return newList;\n }", "private int[] arrayListToIntList(ArrayList<Integer> arrayList){\n int[] list=new int[arrayList.size()];\n for(Integer integer:arrayList){\n list[arrayList.indexOf(integer)]=integer;\n }\n return list;\n }", "static List<Integer> arrayToList(int[] array) {\r\n List<Integer> list = new ArrayList<Integer>();\r\n for(int i : array)\r\n list.add(i);\r\n return list;\r\n }", "abstract void makeList();", "public static <T> List<T> convertCollectionToList(Collection<T> collection) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(collection == null) return null;\r\n\t\t\r\n\t\t// On retourne la Liste\r\n\t\treturn new ArrayList<T>(collection);\r\n\t}", "private List<SillyBot> convert(Collection<SillyBot> botsToAdd) {\n\t\tList<SillyBot> bots = new ArrayList<>();\n\t\tbots.addAll(botsToAdd);\n\t\treturn bots;\n\t}", "private ArrayList<String> dataConvertForFromArray(ArrayList<Response.Messages> message_array_list){\n\t\tArrayList<String> all_returned_data = new ArrayList<String>();\n\n\t\tString str1 = \"\";\n\n\t\ttry{\n\t\t\tfrom_data = mf.fFrom(message_array_list);\n\t\t} catch (NullPointerException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t//For loop to combine all data into readable format for message preview list\n\t\tfor (int i = 0; i<message_array_list.size(); i++){\n\t\t\tstr1 = from_data.get(i);\n\t\t\tall_returned_data.add(str1);\n\t\t}\n\t\treturn all_returned_data;\n\t}", "public abstract ArrayList<Object> calculateTransform(ArrayList<Integer> arr);", "public static List ruleToList(String [] rule)\t{\n\t\treturn appendToRule(rule, new ArrayList(rule.length));\n\t}", "public ArrayList convertDataStructure(Iterator iterator) {\r\n ArrayList list = new ArrayList();\r\n int i = 0;\r\n while (iterator.hasNext()) {\r\n AgrupamentoBean bean = (AgrupamentoBean) iterator.next();\r\n bean.setRegistro(new Long(i));\r\n list.add(bean);\r\n i++;\r\n }\r\n return list;\r\n }", "private static List<Dog> dogArrayToList(Dog[] dogs) {\n return Arrays.asList(dogs);\n }", "@Override\n\tpublic List<Exam> toEntity(List<ExamDTO> dtoList) {\n\t\treturn null;\n\t}", "public static <T> List<T> createList (T... args) {\n\tif (args == null) { return new ArrayList<T>(); };\n\treturn new ArrayList<T>(Arrays.asList(args));\n }", "List<?> getList();", "public static void processArrayList(){\n ArrayList<String> newArray = new ArrayList<String>();\n newArray.addAll(groceryList.getGroceryList()); //Method 1: adds all items from the groceryList into the newArray\n\n ArrayList<String> newArray2 = new ArrayList<String>(groceryList.getGroceryList()); //Method 2: same as method 1 but the copying happens at the time of initialising the newArray2\n\n //if for some reason you want to save all the contents of an arrayList into an array\n String[] myArray = new String[groceryList.getGroceryList().size()]; //create the array to be equal to the size of the arraylist\n myArray = groceryList.getGroceryList().toArray(myArray); //convert an arraylist of strings (the outcome of getGroceryList()), and save it into our array\n }" ]
[ "0.6886531", "0.68482786", "0.67947316", "0.6702043", "0.6429699", "0.63002056", "0.62765706", "0.62756866", "0.61958945", "0.61854666", "0.61652637", "0.61573654", "0.61235994", "0.61064035", "0.6066479", "0.6058795", "0.603511", "0.60123515", "0.5985573", "0.5972805", "0.5926843", "0.5926129", "0.5923741", "0.591931", "0.59126794", "0.59051615", "0.5904705", "0.5895016", "0.58763194", "0.5844099", "0.58401763", "0.58359027", "0.5834933", "0.58305436", "0.5825911", "0.58258986", "0.5815065", "0.57843536", "0.577936", "0.5777078", "0.5777078", "0.5777078", "0.57700026", "0.5767921", "0.57603693", "0.5738759", "0.57363147", "0.5725178", "0.57179976", "0.57080424", "0.5697732", "0.569462", "0.568842", "0.56819946", "0.5679917", "0.56787115", "0.5663973", "0.56471324", "0.5646884", "0.56307983", "0.5621146", "0.5618929", "0.559346", "0.5584797", "0.5582888", "0.5574401", "0.5559816", "0.55574006", "0.55546105", "0.555343", "0.55335784", "0.5530821", "0.5529516", "0.5528289", "0.55221343", "0.5514403", "0.5508393", "0.5503962", "0.5501339", "0.5490884", "0.5486144", "0.54679966", "0.5465792", "0.54651946", "0.54646367", "0.54512894", "0.5450127", "0.5447121", "0.54451543", "0.54412925", "0.54403144", "0.54399616", "0.5438076", "0.54284525", "0.5424071", "0.5422943", "0.5421901", "0.54150283", "0.5409723", "0.54092115", "0.54002994" ]
0.0
-1
Returns the socket.io instance in this NetworkManager.
public SocketIOServer getServer() { return server; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Socket getSocket()\n {\n return socket;\n }", "public Socket getSocket() {\n return SOCKET;\n }", "Socket getSocket()\n {\n return socket;\n }", "public Socket getSocket() {\n\t\treturn socket;\n\t}", "protected Socket getSocket()\n {\n return m_Socket;\n }", "public String getSocket() {\n return socket;\n }", "public Socket getSocket() {\n return mSocket;\n }", "protected final Socket getSocket() {\n return socket;\n }", "public SocketFactory socketFactory() {\n return socketFactory;\n }", "public DatagramSocket getSocket() {\n\t\treturn socket;\n\t}", "public ServerSocket getSocket() {\n\t\treturn socket;\n\t}", "private static Socket getSocket() \n{\n return socket; \n }", "protected Socket getSocket() {\n\t\treturn input;\n\t}", "public final NetBIOSSocket getSocket() {\n return m_sessSock;\n }", "public SSLSocket getSocket() throws IOException {\n SSLSocket sslSocket = (SSLSocket) socketFactory.createSocket(pkiServerAddress, pkiServerPort);\n\n sslSocket.setEnabledProtocols(enabledProtocols);\n sslSocket.setEnabledCipherSuites(enabledCipherSuites);\n sslSocket.setSoTimeout(pkiTimeout);\n\n return sslSocket;\n }", "default String socket() {\n return WebServer.DEFAULT_SOCKET_NAME;\n }", "protected SocketChannel getSocket() {\n\t\treturn channel;\n\t}", "public Socket getConnectionSocket()\n {\n return connectionSocket;\n }", "public ISOServerSocketFactory getSocketFactory() {\n return socketFactory;\n }", "public Socket getSocket(){\n return null;\n }", "public XnioIoThread getIoThread() {\n return readable.getIoThread();\n }", "public StateSocket getStateSocket() {\n return stateSocket;\n }", "public Socket getClientSock() {\n return clientSock;\n }", "public proto.MessagesProtos.ClientRequest.Socket getSock() {\n\t\t\treturn sock_ == null ? proto.MessagesProtos.ClientRequest.Socket.getDefaultInstance() : sock_;\n\t\t}", "public DatagramSocket getInSocket()\n\t{\n\t\treturn inSocket;\n\t}", "public ServerSocket getServerSocket() {\n return this.ss;\n }", "public ServerSocketFactory getServerSocketFactory(){\n return factory;\n }", "public proto.MessagesProtos.ClientRequest.SocketOrBuilder getSockOrBuilder() {\n\t\t\treturn getSock();\n\t\t}", "protected SSLSocketProvider getSocketProvider()\n {\n return f_providerSocket;\n }", "proto.MessagesProtos.ClientRequest.Socket getSock();", "public proto.MessagesProtos.ClientRequest.Socket getSock() {\n\t\t\t\tif (sockBuilder_ == null) {\n\t\t\t\t\treturn sock_ == null ? proto.MessagesProtos.ClientRequest.Socket.getDefaultInstance() : sock_;\n\t\t\t\t} else {\n\t\t\t\t\treturn sockBuilder_.getMessage();\n\t\t\t\t}\n\t\t\t}", "public proto.MessagesProtos.ClientRequest.SocketOrBuilder getSockOrBuilder() {\n\t\t\t\tif (sockBuilder_ != null) {\n\t\t\t\t\treturn sockBuilder_.getMessageOrBuilder();\n\t\t\t\t} else {\n\t\t\t\t\treturn sock_ == null ?\n\t\t\t\t\t\t\tproto.MessagesProtos.ClientRequest.Socket.getDefaultInstance() : sock_;\n\t\t\t\t}\n\t\t\t}", "public BluetoothSocket getIncomingSocketFromObject(Object o){\n\t\t\n\t\treturn (BluetoothSocket) o;\n\t}", "public ServerSocket getServerSocket()\n\t{\n\t\treturn serverSocket;\n\t}", "public ServerSocket getServerSocket() {\n\t\treturn serverSocket;\n\t}", "public SocketType socketType() {\n return SocketType.fromSwig(alert.getSocket_type().swigValue());\n }", "public RMIServerSocketFactory getServerSocketFactory() {\n/* 140 */ return ((TCPEndpoint)this.ep).getServerSocketFactory();\n/* */ }", "AsynchronousSocketChannel getOutgoingSocket() {\n return outgoingSocket;\n }", "public org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketProtocol getSocketProtocol() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketProtocol result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketProtocol.valueOf(socketProtocol_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketProtocol.UDP : result;\n }", "public org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketProtocol getSocketProtocol() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketProtocol result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketProtocol.valueOf(socketProtocol_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketProtocol.UDP : result;\n }", "public Socket getConnection() {\n return connection;\n }", "public String getSocketFactoryClass() {\n\t\treturn socketFactoryClass;\n\t}", "public static ClientSocket getClientSocket() {\n return connectionToServer;\n }", "public proto.MessagesProtos.ClientRequest.Socket.Builder getSockBuilder() {\n\n\t\t\t\tonChanged();\n\t\t\t\treturn getSockFieldBuilder().getBuilder();\n\t\t\t}", "public Socket createSocket() {\n try {\n // Create socket\n server = new Socket(\"127.0.0.1\", 8520);\n } catch (IOException ioe) {\n System.out.println(\"IOException: \" + ioe.getMessage());\n }\n return server;\n }", "public static Servidor getInstance() throws IOException {\n if (instancia == null) {\n instancia = new Servidor(\"Servidor liga 19/20\");\n }\n\n return instancia;\n }", "public final SSLSocketFactory getSocketFactory() {\n return spiImpl.engineGetSocketFactory();\n }", "public static NetworkHandling getTCPHandler() {\r\n\t\treturn networkHandling;\r\n\t}", "public interface Connection\n{\n public java.net.Socket getSocket();\n}", "public RMIClientSocketFactory getClientSocketFactory() {\n/* 133 */ return ((TCPEndpoint)this.ep).getClientSocketFactory();\n/* */ }", "public static OI getInstance() {\n\t\treturn INSTANCE;\n\t}", "private ISocket acceptISocket() throws IOException {\n // Manage client depending the connection\n if (serverSocket instanceof AdHocServerSocketBluetooth) {\n return new AdHocSocketBluetooth((BluetoothSocket) serverSocket.accept());\n } else {\n return new AdHocSocketWifi((Socket) serverSocket.accept());\n }\n }", "public LocalSocketAddress getSockAddress() throws IOException {\n // This method has never been implemented.\n return null;\n }", "public static MulticastSocket createSender() throws IOException {\n return new MulticastSocket();\n }", "public NetInterface.NetHandler getNetProxy() {\n return (NetInterface.NetHandler) self;\n }", "public EnvironmentSocket wrapperSocket(Socket socket) {\n return new EnvironmentSocketImpl(socket);\n }", "public NetworkManager getNetwork()\n {\n return network;\n }", "protected static AuoServer getServer() {\n return server;\n }", "public UserIO getUserIO() {\n\t\treturn this.userIO;\n\t}", "@SuppressWarnings(\"unchecked\")\n\n public Socket getSocket(){\n return this.clientSocket;\n }", "public SocketAddress getSocketAddress() {\n\t\treturn socketAddress;\r\n\t}", "public static ServerSocket getServerSocket(){\n if (listener == null) {\n listener = createServerSocket();\n }\n return listener;\n }", "public ServidorSocket() throws IOException {\n\t\tservidor = new ServerSocket(PUERTO);\n\t\tcliente = new Socket();\n\t}", "public org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily getSocketFamily() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily.valueOf(socketFamily_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily.INET : result;\n }", "public MonitoringSocket() throws IOException {\r\n\r\n\t\tincrementNumberOfOpenSockets();\r\n\t\tprintMonitoringSocketStatus();\r\n\t}", "public org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily getSocketFamily() {\n org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily result = org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily.valueOf(socketFamily_);\n return result == null ? org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketFamily.INET : result;\n }", "public Object server() {\n return this.server;\n }", "private Socket newSocket() throws IOException {\n try {\n InetAddress hostAddress = InetAddress.getByName(publicAddress);\n return new Socket(hostAddress, AgentRemoteService.PORT);\n } catch (IOException e) {\n throw new IOException(\"Couldn't connect to publicAddress: \" + publicAddress + \":\" + AgentRemoteService.PORT, e);\n }\n }", "public static ChatRoomsManager getInstance() throws IOException {\n if (managerInstance == null) {\n managerInstance = new ChatRoomsManager();\n }\n return managerInstance;\n }", "protected OutputStream getOutputStream() throws IOException\n { \n if (fd == null) {\n throw new IOException(\"socket not created\");\n }\n\n synchronized (this) {\n if (fos == null) {\n fos = new SocketOutputStream();\n }\n\n return fos;\n }\n }", "AsynchronousSocketChannel getClientSocket() {\n return clientSocket;\n }", "proto.MessagesProtos.ClientRequest.SocketOrBuilder getSockOrBuilder();", "public DNSConnector getConnector() {\r\n\t\treturn (new DNSUDPConnector());\r\n\t}", "public ContentIOSession getIOSession() {\n if (IOSession == null) {\n Log.e(TAG, \"IOSession is null, should never happen\");\n }\n @SuppressWarnings(\"unused\")\n boolean lockSuccessful = false;\n try {\n lockSuccessful = lock.tryLock(1, TimeUnit.SECONDS); // Timeout to\n // discover\n // deadlocks\n } catch (InterruptedException e) {\n lockSuccessful = false;\n e.printStackTrace();\n Log.e(TAG,\n \"ERROR: Failed to lock for getting IOSession. Check for content reads that forget to call io.Close()\");\n return null;\n }\n\n return IOSession;\n }", "public static OOCSISender getInstance() {return OOCSIholder;}", "protected InputStream getInputStream() throws IOException\n {\n if (fd == null) {\n throw new IOException(\"socket not created\");\n }\n\n synchronized (this) {\n if (fis == null) {\n fis = new SocketInputStream();\n }\n\n return fis;\n }\n }", "public ConcurrentHashMap<String, SocketManager> getActiveConnexion() {\n return listSocketDevice.getActiveConnection();\n }", "protected synchronized Socket getSocket(ImmutableEndpoint endpoint) throws TlcException {\r\n\t\tSocket socket = null;\r\n\t\ttry {\r\n\t\t\tTcpSocketKey socketKey = new TcpSocketKey(endpoint);\r\n\t\t\tif (logger.isDebugEnabled()) {\r\n\t\t\t\tlogger.debug(\"borrowing socket for \" + socketKey + \"/\"\r\n\t\t\t\t\t\t+ socketKey.hashCode());\r\n\t\t\t\tif (null != lastSocketKey) {\r\n\t\t\t\t\tlogger.debug(\"same as \" + lastSocketKey.hashCode() + \"? \"\r\n\t\t\t\t\t\t\t+ lastSocketKey.equals(socketKey));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tsocket = (Socket) socketsPool.borrowObject(socketKey);\r\n\r\n\t\t\tif (logger.isDebugEnabled()) {\r\n\t\t\t\tlogger.debug(\"borrowed socket, \"\r\n\t\t\t\t\t\t+ (socket.isClosed() ? \"closed\" : \"open\") + \"; debt \"\r\n\t\t\t\t\t\t+ socketsPool.getNumActive());\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tlogger.error(\"Connection Refused\");\r\n\r\n\t\t}\r\n\t\treturn socket;\r\n\t}", "public final Socket mo2022i() {\n return this.f2343d;\n }", "public Timeout getSocketTimeout() {\n return socketTimeout;\n }", "private NetworkInterface getNetworkInterface() throws SocketException {\n NetworkInterface networkInterface = null;\n Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();\n while(networkInterfaces.hasMoreElements()) {\n NetworkInterface nextNetworkInterface = networkInterfaces.nextElement();\n log.info(nextNetworkInterface+\": [supportsMulticast=\"+nextNetworkInterface.supportsMulticast()+\"][virtual=\"+nextNetworkInterface.isVirtual()+\"]\");\n if(nextNetworkInterface.supportsMulticast()) {\n networkInterface = nextNetworkInterface;\n// break;\n }\n }\n return networkInterface;\n }", "org.graylog.plugins.dnstap.protos.DnstapOuterClass.SocketProtocol getSocketProtocol();", "public synchronized CuratorFramework getLocalConnection() throws IOException\n {\n if ( localConnection == null )\n {\n CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()\n .connectString(\"localhost:\" + configManager.getConfig().getInt(IntConfigs.CLIENT_PORT))\n .sessionTimeoutMs(arguments.connectionTimeOutMs * 10)\n .connectionTimeoutMs(arguments.connectionTimeOutMs)\n .retryPolicy(new ExponentialBackoffRetry(1000, 3));\n\n if ( arguments.aclProvider != null )\n {\n builder = builder.aclProvider(arguments.aclProvider);\n }\n\n localConnection = builder.build();\n localConnection.start();\n }\n return localConnection;\n }", "public static OperatingSystemEventSender getInstance() {\r\n return OperatingSystemEventSender.INSTANCE;\r\n }", "public interface SocketControl {\n\n /**\n * 获取服务的IP和端口\n * @return 格式:ip:port,如127.0.0.1:8080\n */\n String getIpPort();\n\n /**\n * 获取服务的ServiceId\n * @return 服务的ServiceId\n */\n String getServiceId();\n\n /**\n * 获取服务的InstanceId\n * @return 服务的InstanceId\n */\n String getInstanceId();\n\n\n /**\n * 获取模块名称,也可以直接调用getIpPort()\n * @return 模块名称\n */\n String getModelName();\n\n\n /**\n * 模块下连接的标示\n * @param channel 管道对象\n * @return uk\n */\n String getUniqueKey(Channel channel);\n\n\n /**\n * 模块下连接的标示\n * @param ctx 管道对象\n * @return uk\n */\n String getUniqueKey(ChannelHandlerContext ctx);\n\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(ChannelHandlerContext ctx,String key);\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(Channel ctx,String key);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(Channel ctx);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(ChannelHandlerContext ctx);\n\n\n /**\n * 重置心跳时间\n * @param ctx 当前连接对象\n * @param heartTime 心跳时间(秒)\n */\n void resetHeartTime(Channel ctx,int heartTime);\n\n\n\n}", "public synchronized static RMIClient getInstance() {\n if (instance == null) {\n instance = new RMIClient();\n }\n\n return instance;\n }", "public PrintWriter getSocketOut() {\n\t\treturn socketOut;\n\t}", "public OrganizerSingleService(Socket socket) throws IOException {\n this.socket = socket;\n output = new PrintWriter(\n new BufferedWriter(\n new OutputStreamWriter(\n socket.getOutputStream())), true);\n input = new BufferedReader(\n new InputStreamReader(\n socket.getInputStream()));\n }", "public static SocketHandler getInstance(Socket socket) {\n\t\treturn new SocketHandler(socket);\n\t}", "NetworkFactory getNetworkFactory();", "public static int openSocket() throws IOException {\n serverSocket = new ServerSocket(0, 10, InetAddress.getLocalHost());\n return serverSocket.getLocalPort();\n }", "public BufferedReader getSocketIn() {\n\t\treturn socketIn;\n\t}", "public IoHandler getHandler()\n {\n return new MRPClientProtocolHandler();\n }", "public OS os () {\n return _os;\n }", "public static DotIO getInstance() {\n if(instance == null) {\n instance = new DotIO();\n }\n return instance;\n }", "public interface ServerSocketFactory {\n\n\t\tpublic ServerSocket create() throws IOException;\n\n\t}", "public DatagramSocket getSenderSocket() {\r\n\t\treturn this.socket;\r\n\t}", "public boolean isNetworkSingleton() {\n return isNetworkSingleton;\n }", "WebSocketConnection getWebSocketConnection();", "SocketChannel getChannel();" ]
[ "0.6877461", "0.6837877", "0.681829", "0.68043506", "0.67903775", "0.67773104", "0.67636365", "0.67198", "0.6602275", "0.65728503", "0.65667105", "0.64038473", "0.64023125", "0.6389881", "0.6343979", "0.633706", "0.63337344", "0.63237804", "0.6302447", "0.620388", "0.61994094", "0.61391926", "0.60929483", "0.60412836", "0.5970044", "0.5954399", "0.5923848", "0.59201086", "0.5915981", "0.5905728", "0.5900298", "0.588633", "0.5874867", "0.58747816", "0.5858248", "0.58577365", "0.58193856", "0.57527035", "0.57399046", "0.57365215", "0.5726111", "0.5723425", "0.57098", "0.5674528", "0.56445426", "0.5640632", "0.5639145", "0.5630643", "0.5630429", "0.56281924", "0.5621686", "0.5616574", "0.5614506", "0.5600892", "0.55940497", "0.5592658", "0.5578135", "0.5571474", "0.5547805", "0.5546322", "0.55405086", "0.5526784", "0.55187196", "0.5517099", "0.55144215", "0.55095583", "0.5503822", "0.5497267", "0.5493428", "0.54770446", "0.54671997", "0.54505795", "0.5449376", "0.54403174", "0.54259646", "0.5425879", "0.542571", "0.5417336", "0.53911054", "0.5386721", "0.5386559", "0.53821033", "0.5381405", "0.5381401", "0.5377311", "0.537696", "0.53697956", "0.5368436", "0.5364315", "0.53541076", "0.53350246", "0.5291813", "0.5286577", "0.52863556", "0.5269833", "0.52693504", "0.5260013", "0.5251962", "0.524168", "0.52388155" ]
0.6734291
7
Returns the hostname this manager is listening on.
public String getHostname() { return this.config.getHostname(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getHostName() {\n return this.hostContext.getHostName();\n }", "public String hostname() {\n return this.hostname;\n }", "public String getHostName() {\n return FxSharedUtils.getHostName();\n }", "public String getHostName()\n\t{\n\t\treturn hostName;\n\t}", "public String getHostName() {\n\t\treturn hostName;\n\t}", "public String getHostName() {\n\t\treturn hostName;\n\t}", "public String getHostName() {\n return hostName;\n }", "public String getHostName() {\n return hostName;\n }", "public String getHost() {\n\t\ttry {\n\t\t\treturn InetAddress.getLocalHost().getHostName();\n\t\t} catch (UnknownHostException e) {\n\t\t\treturn \"unknown\";\n\t\t}\n\t}", "public String getHostName();", "public String getHost() {\r\n \t\treturn properties.getProperty(KEY_HOST);\r\n \t}", "public static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return LOCALHOST;\n }\n }", "public String getHost() {\n return messageProcessor.getIpAddress().getHostAddress();\n }", "public String getHostname() {\r\n return hostname;\r\n }", "public String getHost() {\n\t\treturn this.sipStack.getHostAddress();\n\t}", "public static String getHostname()\n\t{\n\t\treturn hostname; // send the hostname\n\t}", "public String getHost( ) {\n return props.getProperty(HOST, \"localhost\");\n }", "@NonNull\n public String getServerAddr() {\n if (mIkeTunConnParams == null) return mServerAddr;\n\n final IkeSessionParams ikeSessionParams = mIkeTunConnParams.getIkeSessionParams();\n return ikeSessionParams.getServerHostname();\n }", "String getHostName();", "String getHostName();", "public String getHostname();", "static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return \"unknown\";\n }\n }", "public String getHostname () {\n return hostname;\n }", "public String getHost( ) {\n\t\treturn host;\n\t}", "public String getHostName (){\n return hostName;\n }", "java.lang.String getHost();", "java.lang.String getHost();", "public String getHostname() {\n return this.hostname;\n }", "private String getHostName()\n\t{\n\t\treturn hostName;\n\t}", "String host();", "public String getHostName() {\n return null;\n }", "public String getHost()\n\t{\n\t\treturn m_strHostname;\n\t}", "String getHostname();", "String getHostname();", "public String getHost() {\n\t\treturn host;\n\t}", "public String getHost() {\n\t\treturn host;\n\t}", "public String getHost() {\n return host.getText();\n }", "public String host() {\n return host;\n }", "String getRemoteHostName();", "@NonNull\n public String getServerHostname() {\n return mServerHostname;\n }", "public String getHostAddress() {\n\t\treturn javaNetAddress.getHostAddress();\n\t}", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\r\n return host;\r\n }", "public String get_hostname() throws Exception {\n\t\treturn this.hostname;\n\t}", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "String getHost();", "public String hostname() {\n return this.innerProperties() == null ? null : this.innerProperties().hostname();\n }", "private String getHostName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);\n\n return preferences.getString(activity.getString(R.string.pref_host_id), activity.getString(R.string.pref_default_host_name));\n }", "public String getHost();", "public String getHost();", "public String getHost() {\n \t\treturn host;\n \t}", "public String getServerName();", "default String getHost()\n {\n return getString( \"host\", \"localhost:80\");\n }", "public String getHostName() throws UnknownHostException\n\t{\n\t\t\n\t\treturn InetAddress.getLocalHost().getHostAddress();\n\t\t\n\t}", "public String getHost() {\n\t\treturn url.getHost();\n }", "public static String getEventHost() {\r\n return eventHost.getValue();\r\n }", "public String getHost() {\n return host;\n }", "public String getHost() {\n return host;\n }", "public String getHostAddress() {\n String address = null;\n\n if (this.clientSocket != null) {\n address = this.clientSocket.getInetAddress().getHostAddress();\n }\n\n return address;\n }", "java.lang.String getServerAddress();", "public String getHost(){\n\t\treturn this.host;\n\t}", "public static String getClientHost() throws ServerNotActiveException {\n return sun.rmi.transport.tcp.TCPTransport.getClientHost();\n }", "public String getHostAddress()\n {\n return (addr != null ? addr.getHostAddress() : \"\");\n }", "public static String getHostname()\n {\n String host = \"unknown\";\n try\n {\n return InetAddress.getLocalHost().getHostName();\n }\n catch ( UnknownHostException e )\n {\n // ignore\n }\n return host;\n }", "public String getServerName() {\n return serverName;\n }", "public String getServerName() {\n return serverName;\n }", "public InetAddress getHost();", "public String connectedHost()\n {\n return connectedHost;\n }", "private static String getHostNameImpl() {\n String bindAddr = System.getProperty(\"jboss.bind.address\");\n if (bindAddr != null && !bindAddr.trim().equals(\"0.0.0.0\")) {\n return bindAddr;\n }\n\n // Fallback to qualified name\n String qualifiedHostName = System.getProperty(\"jboss.qualified.host.name\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // If not on jboss env, let's try other possible fallbacks\n // POSIX-like OSes including Mac should have this set\n qualifiedHostName = System.getenv(\"HOSTNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n // Certain versions of Windows\n qualifiedHostName = System.getenv(\"COMPUTERNAME\");\n if (qualifiedHostName != null) {\n return qualifiedHostName;\n }\n\n try {\n return NetworkUtils.canonize(getLocalHost().getHostName());\n } catch (UnknownHostException uhe) {\n uhe.printStackTrace();\n return \"unknown-host.unknown-domain\";\n }\n }", "public static String getBaseHost() {\r\n if (baseHost == null) {\r\n baseHost = PropertiesProvider.getInstance().getProperty(\"server.name\", \"localhost\");\r\n }\r\n return baseHost;\r\n }", "private String GetHostName() throws UnknownHostException{\n return Inet4Address.getLocalHost().getHostName();\n }", "public String getServerAddress() {\r\n\t\treturn this.serverAddress;\r\n\t}", "public String getHost() {\n\tLogWriter.logMessage(LogWriter.TRACE_DEBUG,\"getHost()\");\n Via via=(Via)sipHeader;\n return via.getHost();\n }", "java.lang.String getRemoteHost();", "String getQueueManagerHost();", "public java.lang.String getHost() {\n java.lang.Object ref = host_;\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 host_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getServername() {\r\n return servername;\r\n }", "public String getFullHost() {\n return \"http://\" + get(HOSTNAME_KEY) + \":\" + get(PORT_KEY) + \"/\" + get(CONTEXT_ROOT_KEY) + \"/\";\n }", "public int getLocalPort() {\n return _listenSocket.getLocalPort();\n }", "public String getServerName() {\n\t\treturn m_serverName;\n\t}", "private static String getHostname()\n throws UnknownHostException {\n return InetAddress.getLocalHost().getHostName();\n }", "public String getHost() {\n return stack.stackAddress;\n }", "public String getHost() { return host; }", "public String getProxyHost() {\n return cfg.getProxyHost();\n }", "String getIntegHost();", "public static String getHostname() throws IOException {\n\n String line;\n StringBuilder result = new StringBuilder();\n Process p = Runtime.getRuntime().exec(\"hostname\");\n\n BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\n while ((line = br.readLine()) != null) result.append(line);\n\n br.close();\n\n return result.toString();\n }", "public String getSimulatorHostname() {\n return simSpec.getHostAddr();\n }", "public String getServerAddress() {\n\t\treturn mServerAddress;\n\t}", "public String getRnidsHostAddress() {\n\t\tString address = getProperties().getProperty(\"rnids.host.address\").trim();\n\t\treturn address;\n\t}", "Host getHost();", "public static server getNameServer(){\n return nameServer;\n }", "@java.lang.Override\n public java.lang.String getHost() {\n java.lang.Object ref = host_;\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 host_ = s;\n return s;\n }\n }", "public int getHostAddress() {\n return hostAddress;\n }", "public String getHostURL() {\n return getHostURL(PAActiveObject.getActiveObjectNodeUrl(PAActiveObject.getStubOnThis()));\n }" ]
[ "0.7495079", "0.7491531", "0.7390253", "0.73712724", "0.73216057", "0.73216057", "0.7274749", "0.7274749", "0.72461295", "0.7222972", "0.71661156", "0.7103", "0.70708865", "0.70629907", "0.7026493", "0.7024635", "0.69936985", "0.6975701", "0.6973259", "0.6973259", "0.6941374", "0.69410825", "0.6933432", "0.69324976", "0.6927205", "0.6925514", "0.6925514", "0.6898703", "0.6877156", "0.68717694", "0.6860801", "0.685443", "0.6839755", "0.6839755", "0.6834187", "0.6834187", "0.682723", "0.6806491", "0.68054664", "0.6792021", "0.67773443", "0.676369", "0.676369", "0.6762744", "0.6742", "0.6738221", "0.6738221", "0.6738221", "0.6738221", "0.6738221", "0.6738221", "0.6737829", "0.6734475", "0.672901", "0.6725712", "0.6725712", "0.67218906", "0.6709152", "0.6700494", "0.6700457", "0.66089064", "0.66085124", "0.6603968", "0.6603968", "0.65981853", "0.65964377", "0.658532", "0.65838546", "0.6582805", "0.6568287", "0.6565577", "0.6565577", "0.6525331", "0.65040433", "0.64948016", "0.64911246", "0.64279455", "0.6426032", "0.63940614", "0.6382411", "0.63757676", "0.6366362", "0.6359405", "0.63592654", "0.63592607", "0.6355763", "0.63549507", "0.633076", "0.6329007", "0.6275413", "0.62589777", "0.6258242", "0.6255121", "0.62298423", "0.622912", "0.62090236", "0.62081563", "0.61867213", "0.6182702", "0.6176656" ]
0.72843164
6
Returns the port this manager is listening on.
public int getPort() { return this.config.getPort(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLocalPort() {\n return _listenSocket.getLocalPort();\n }", "public int getPort() {\n return serverSocket.getLocalPort();\n }", "public int getTCPListeningPortNumber() {\n return (incoming_socketchannel_manager.getTCPListeningPortNumber());\n }", "public int getPort() {\n return instance.getPort();\n }", "public int getPort() {\n return instance.getPort();\n }", "public final int getPortListened() {\n return portListened;\n }", "default Object port() {\n return metadata().get(\"server-port\");\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getPort() {\n return port_;\n }", "public int getLocalPort()\n {\n return this.mPort;\n }", "Integer listeningPort();", "public int getPort()\n\t{\n\t\treturn port;\n\t}", "public int getPort()\n\t{\n\t\treturn port;\n\t}", "public int getLocalPort () {\n return schan.socket().getLocalPort ();\n }", "public int getPort() {\n\t\treturn messageProcessor.getPort();\n\t}", "public int getPort() {\r\n\t\treturn port;\r\n\t}", "public int getPort() {\r\n\t\treturn port;\r\n\t}", "public static int getPort() {\n return port;\n }", "public static String getPort() {\n\t\treturn port;\r\n\t}", "public int getPort() {\n\t\treturn port;\n\t}", "public int getPort() {\n\t\treturn port;\n\t}", "public int getPort() {\n\t\treturn port;\n\t}", "public int getPort() {\n\t\treturn port;\n\t}", "public int getPort() {\n\t\treturn port;\n\t}", "@Override\n\tpublic int getPort() {\n\t\treturn socket.getPort();\n\t}", "public Integer port() {\n return this.port;\n }", "public Integer port() {\n return this.port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\r\n return port;\r\n }", "public int getPort() {\r\n return port;\r\n }", "public int getPort() {\r\n return port;\r\n }", "public static int getServerPort(){\n return thisServer.getPort();\n }", "public int getPort() {\n if (state >= CONNECTED)\n return remotePort;\n else\n return 0;\n }", "public int getPort( ) {\n\t\treturn port;\n\t}", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return this.port;\n }", "public int getPort() {\n \t\treturn port;\n \t}", "public int getPort() {\n \t\treturn port;\n \t}", "public int getPort();", "public int getPort();", "public int getPort();", "public Integer getPort() {\n return port;\n }", "public Integer getPort() {\n return port;\n }", "public int getPort()\n {\n return port;\n }", "@java.lang.Override\n public int getPort() {\n return port_;\n }", "@java.lang.Override\n public int getPort() {\n return port_;\n }", "default int getPort() {\n return getServer().getPort();\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int getPort() {\n return port;\n }", "public int port() {\n return alert.getPort();\n }", "@java.lang.Override\n public int getPort() {\n return port_;\n }", "@java.lang.Override\n public int getPort() {\n return port_;\n }", "public int actualPort() {\n return this.port;\n }", "public int getPort()\n {\n return this.connectedPort;\n }", "public Integer getPort() {\n return this.port;\n }", "public Integer getPort() {\n return port;\n }", "public int getPort()\n {\n\t\treturn url.getPort();\n }", "@Override\n\tpublic Integer getPort() {\n\t\treturn port;\n\t}", "public int getPort() {\n return this.port;\n }", "public int getServerPort() {\n\t\treturn serverPort;\n\t}", "public Integer getServerport() {\n return serverport;\n }", "public String getServerPort() {\n\t\treturn mServerPort;\n\t}", "public int getPort() {\n\t\treturn Integer.parseInt(String.valueOf(port.getValue()));\n\t}", "public String getServerPort() {\r\n\t\treturn this.serverPort;\r\n\t}", "public int getPort () {\n return port;\n }", "public int getPort(){\n\t\treturn this.port;\n\t}", "public int getPortNumber() {\n return portNumber;\n }", "public int getPortNumber() {\n return portNumber;\n }", "public static int choosePort() {\n try (ServerSocket s = new ServerSocket(0)) {\n return s.getLocalPort();\n } catch (IOException ex) {\n throw new DeltaException(\"Failed to find a port\");\n }\n }", "public int getServerPort() {\n return Integer.parseInt(this.serverProperties.getProperty(PORT));\n }", "public int getServerPort(){\n\t\treturn serverPort; \n\t}", "public int getLocalPort() {\r\n return (datagramSocket!=null) ? datagramSocket.getLocalPort() : 0;\r\n }", "public int getPort() { return port; }", "java.lang.String getPort();", "java.lang.String getPort();", "public int getServerPort() {\n return serverPort;\n }", "public int getPort(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getInt(WorkerController.PORT);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public int getClientPort() {\n int clientPort = CLIENTSOCKET.getPort();\n return clientPort;\n }", "public int getTcpServerPort()\n \t{\n \t\treturn tcpServerPort;\n \t}", "String getPort();", "public static int getServerPort() {\n return serverPort;\n }" ]
[ "0.81744295", "0.8046822", "0.7965061", "0.78941655", "0.78941655", "0.785289", "0.7826918", "0.7819483", "0.7819483", "0.7819483", "0.7819483", "0.7819483", "0.7819483", "0.7804514", "0.7804514", "0.7804514", "0.7804514", "0.7747334", "0.7733773", "0.7714035", "0.7714035", "0.7709444", "0.7700446", "0.7679565", "0.7679565", "0.76703036", "0.76693463", "0.7664269", "0.7664269", "0.7664269", "0.7664269", "0.7664269", "0.76417565", "0.7640901", "0.7640901", "0.7636848", "0.7636848", "0.7634725", "0.7634725", "0.7634725", "0.76161516", "0.76114666", "0.761004", "0.7597025", "0.7597025", "0.7597025", "0.7597025", "0.7597025", "0.7597025", "0.7597025", "0.7597025", "0.75969696", "0.7562481", "0.7562481", "0.7560771", "0.7560771", "0.7560771", "0.75537217", "0.75537217", "0.75358087", "0.75299954", "0.75299954", "0.75193757", "0.75135857", "0.75135857", "0.75135857", "0.75135857", "0.75135857", "0.7508536", "0.75083023", "0.7508124", "0.7488295", "0.7467723", "0.74648404", "0.7463645", "0.74626416", "0.7459432", "0.7448985", "0.74402547", "0.74390274", "0.74339706", "0.7428351", "0.7421143", "0.7418225", "0.7413429", "0.740882", "0.740882", "0.73858917", "0.7382907", "0.738098", "0.7377249", "0.73711306", "0.7339654", "0.7339654", "0.7317963", "0.7308446", "0.7306025", "0.7277442", "0.72730184", "0.72705454" ]
0.8025717
2
Closes the socket.io server
public void kill() { this.server.stop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void close() {\n\t\ttry {\n\t\t\tserverSocketServer.close();\n\t\t} catch (IOException e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\t\t\t\n\t}", "public void close() {\n try {\n closeConnection(socket);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }", "public void close() {\n\t\tmainSocket.close();\n\t}", "private void closeServer() {\r\n\t\tMisc.log(\"Server will now close.\");\r\n\t\t//close the socket and server when done\r\n\t\ttry {\r\n\t\t\tserver.close();\r\n\t\t\tsocket.close();\r\n\t\t\tin.close();\r\n\t\t\tout.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void closeSocket() { //gracefully close the socket connection\r\n try {\r\n this.os.close();\r\n this.is.close();\r\n this.clientSocket.close();\r\n } \r\n catch (Exception e) {\r\n System.out.println(\"XX. \" + e.getStackTrace());\r\n }\r\n }", "public void close()\n {\n \tSystem.out.println(\"close\");\n \tsend(\"<message> <disconnect/></message>\");\n \ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void closeSocket () \n {\n try {\n // close the open server socket\n server.close();\n // send it a message to make it stop waiting immediately\n // (not really necessary)\n /*Socket s = new Socket(\"localhost\", thisPort);\n OutputStream os = s.getOutputStream();\n os.write((byte)0);\n os.close();\n s.close();*/\n } catch(Exception ex) { \n LOG.warn(\"Exception while shutting down \"+ this.getClass(), ex);\n }\n \n server = null;\n }", "public void close() throws IOException {\n if (!serverSocket.isClosed()) {\n log.info(\"Closing listener on {}\", serverSocket.getLocalSocketAddress());\n runningThread.interrupt();\n serverSocket.close();\n }\n }", "public void closeSocket() { //gracefully close the socket connection\n\t\ttry {\n\t\t\tthis.os.close();\n\t\t\tthis.is.close();\n\t\t\tthis.clientSocket.close();\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"XX. \" + e.getStackTrace());\n\t\t}\n\t}", "public void close() {\n try {\n socket.close();\n } catch (IOException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n }\n }", "public static void closeServer() throws IOException {\n\t\tserver.close();\n\t}", "@Override\r\n\tpublic void close() {\r\n\t\tthis.socket.close();\r\n\t}", "@Override\n public void close() throws IOException\n {\n if(socket != null)\n {\n socket.close();\n }\n }", "public void close() {\r\n\t\tif (socket != null)\r\n\t\t\tsocket.close();\r\n\t}", "@Override\n public void close() throws IOException {\n if (clientSocket != null) {\n clientSocket.close();\n }\n }", "public synchronized void close(){\n if(connected){\n try{\n socket.close();\n streamIn.close();\n streamOut.close();\n System.out.println(clientID+\": close: socket\"); \n }catch(IOException ioe){\n System.out.println(clientID+\": close: IOException:\"+ioe);\n }\n }else if(isHost){\n try{\n hostSocket.close();\n System.out.println(clientID+\": close: hostSocket\"); \n }catch(IOException ioe){\n System.out.println(clientID+\": close: IOException:\"+ioe);\n }\n }\n }", "@Override\n public void close() throws IOException {\n if (socket != null) {\n socket.close();\n }\n\n }", "public void closeSocket() {\n\t\t\ttry {\n\t\t\t\tsocket.close();\n\t\t\t} catch (java.io.IOException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}", "public void closeServer()\n\t{\n\t\t//System.out.println(\"*********Beginning Close Operations*********\");\n\n\t\ttry {\n\t\t\t//System.out.println(\"***********Closing client socket*************\");\n\t\t\tthis.closeClientConnection();\n\t\t\tstringFile.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\tisRunning = false;\n\t\t//System.out.println(\"Ending server....\");\n\t}", "public void close(){\r\n\t\ttry {\r\n\t\t\tif(mServerSocket != null) mServerSocket.close();\r\n\t\t\tif(clientSocket != null) clientSocket.close();\r\n\t\t} catch (IOException e) { e.printStackTrace(); }\r\n\t}", "private void close() {\n\t\ttry {\n\t\t\tsendCommand(\"end\\n\");\n\t\t\tout.close();\n\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (MossException e) {\n\t\t} catch (IOException e2) {\n\t\t} finally {\n\t\t\tcurrentStage = Stage.DISCONNECTED;\n\t\t}\n\n\t}", "public void shutdown() {\n try {\n \t\n \tserverSocket.close();\n \t\n } catch (Exception e) {\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }", "public void close(){\n\t\tlog.debug(\"[SC] Close called\", 5);\n\t\tif(socket!=null){\n\t\t\tlog.debug(\"[SC] Closing socket\", 4);\n\t\t\ttry {\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t//Silly impatient thread\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tout.close();\n\t\t\t\tin.close();\n\t\t\t\tsocket.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\t//we're going to close it anyway\n\t\t\t}\n\t\t\tsocket = null;\n\t\t\trun = false;\n\t\t}\n\t}", "public static void closeServerSocket(){\r\n\r\n try{\r\n serverObjectInputStream.close();\r\n //serverInputStream.close();\r\n serverObjectOutputStream.close();\r\n //serverOutputStream.close();\r\n socket.close();\r\n }catch (IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - log error with good error code and stuff\r\n }\r\n }", "public void stop() {\n\t\ttry {\n\t\t\tif (serverSocket != null)\n\t\t\t\tserverSocket.close();\n\t\t} catch (IOException ioe) {\n\t\t\t// shouldn't happen\n\t\t}\n\t}", "public void close() {\n synchronized(this) {\n for(Enumeration e = connections.elements();e.hasMoreElements();) {\n try {\n ((Socket)e.nextElement()).close();\n } catch(InterruptedIOException ex) {\n Thread.currentThread().interrupt();\n } catch(IOException ex) {\n } catch(RuntimeException ex) {\n }\n }\n }\n\n try {\n serverSocket.close();\n } catch(InterruptedIOException ex) {\n Thread.currentThread().interrupt();\n } catch(IOException ex) {\n } catch(RuntimeException ex) {\n }\n }", "public int closeSocket() \n\t{\n\t\t\n\t}", "@Override\r\n public void close() {\r\n sock.close();\r\n }", "public void close() {\n this.consoleListenerAndSender.shutdownNow();\n this.serverListenerAndConsoleWriter.shutdownNow();\n try {\n this.getter.close();\n this.sender.close();\n this.socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void close()\n {\n try\n {\n System.out.println(\"CLIENT chiude connessione\");\n receiverThread.interrupt();\n socket.close();\n System.exit(0);\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }", "public void close() {\n try {\n socket.close();\n sInput.close();\n sOutput.close();\n sInput = null;\n socket = null;\n } catch (IOException e) {\n System.out.println(\"Logged Out.\");\n }\n }", "@Override\n public void close() throws IOException {\n opened = false;\n if (socket != null) {\n Utils.closeSilent(dis);\n Utils.closeSilent(dos);\n socket.close();\n }\n }", "public void Stop() throws IOException {\n DisposeServer();\n }", "private void closeConnection() throws IOException {\n\t\tclientSocket.close();\n\t}", "public void close() {\n try {\n socket.close();\n outputStream.close();\n inputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void close() throws IOException {\n\t\tistream.close();\n\t\tostream.close();\n\t\tsocket.close();\n\t}", "public static void closeServer() throws IOException {\n if (instancia != null) {\n instancia.close();\n }\n\n instancia = null;\n }", "public synchronized void close() {\n\n String userInput ;\n String fromServer ;\n try {\n userInput = \"QUIT\";\n out.println(\"Client: \" + userInput);\n output.println(userInput); // send QUIT command\n fromServer = input.readLine();\n //out.println(\"Server: \" + fromServer);\n\n if (fromServer.substring(0, 3).equals(\"221\")){ // 221: connection is closed successfully\n socket.close();\n System.exit(0);\n }\n } catch (IOException e) {\n // ignore any exception\n }\n }", "public void stopConnection() throws IOException {\n in.close();\n out.close();\n clientSocket.close();\n }", "public void close() {\n socket.close();\n game.close();\n this.running = false;\n }", "public void dispose() {\n\t\tsocket.close();\n\t}", "public synchronized void close() {\n\t\t/**\n\t\t * DISCONNECT FROM SERVER\n\t\t */\n\t\tsrvDisconnect();\n\t}", "void closeSocket() {\n try {\n if (outputStream != null && clientSocket != null) {\n outputStream.close();\n clientSocket.close();\n }\n } catch (IOException e) {\n getLog().error(\"Error while closing TCP client socket connection\", e);\n }\n }", "public void stopServer() throws IOException {\r\n b = false;\r\n serverSocket.close();\r\n }", "public void closeFromServer(){\n try {\n this.fromServer.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "private void closeConnection() {\r\n try {\r\n socket.close();\r\n } catch (IOException ex) {\r\n // Ex on close\r\n }\r\n }", "@Override\n public void close() throws IOException {\n inputMessageStream.close();\n outputMessageStream.close();\n socket.close();\n }", "public static void closeSocketClient(){\r\n\r\n try{\r\n clientObjectInputStream.close();\r\n clientObjectOutputStream.close();\r\n socket.close();\r\n\r\n System.out.println(\"Client: Socket and all streams were closed successfully!\");\r\n\r\n }catch (java.io.IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - send error message to server, we won't handle it here\r\n }\r\n }", "public void close() {\n try {\n inputStream.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the socket's input stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n try {\n outputStream.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the socket's output stream!\");\n e.printStackTrace();\n System.exit(1);\n }\n\n try {\n commSocket.close();\n } catch(IOException e) {\n GenericIO.writelnString(Thread.currentThread().getName()\n + \" - could not close the communication socket!\");\n e.printStackTrace();\n System.exit(1);\n }\n }", "public void closeUDPServer()\n\t{\n\t\t//System.out.println(\"******Closing UDP socket*******\");\n\t\tdataSocket.close();\n\t\tUDPRunning = false;\n\t}", "public final void exit() {\n if (this.serverSocket instanceof ServerSocket) {\n try {\n this.serverSocket.close();\n } catch (IOException ex) {\n Logger.getLogger(ServerThread.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "void close() {\n try {\n socketInput.close();\n socketOutput.close();\n this.connected = false;\n } catch (IOException e) {\n throw new UnexpectedBehaviourException();\n }\n }", "private void closeServer() {\n\t\tif (listener != null && !listener.isClosed()) {\n\t\t\ttry {\n\t\t\t\tfor (String name : ConnectedClients.keySet()) {\n\t\t\t\t\tSystem.out.println(\"key: \" + name);\n\t\t\t\t\tArrayList<Object> ClientData = new ArrayList<Object>();\n\t\t\t\t\tClientData = ConnectedClients.get(name);\n\t\t\t\t\tDataOutputStream send = (DataOutputStream) ClientData.get(1);\n\t\t\t\t\tsend.writeUTF(\"SERVER DOWN\");\n\n\t\t\t\t}\n\t\t\t\t//close the socket \n\t\t\t\tlistener.close();\n\n\t\t\t} catch (IOException e) {\n\t\t\t\t// e.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void closeConnections() throws IOException {\n\t\twhile(Server.clients != null && !Server.clients.isEmpty()){\n\t\t\tServerThread client = (Server.clients.removeFirst());\n\t\t\tclient.sendMessage(new Message(Message.CLOSE_CONNECTION));\n\t\t\t//client.close();\n\t\t}\n\t}", "public void disconnect() throws IOException {\n sendMessageToServer(\"#Close connection#\");\n outputStream.close();\n inputStream.close();\n clientSocket.close();\n }", "void closeSocket() {\n\t\tint size = threads.size();\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (threads.get(i) == this) {\n\t\t\t\tthreads.remove(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n\t\tprintActiveClients();\n\n\t\ttry {\n\t\t\tmessageBuffer.add(name + \" has just left the chatroom...\");\n\t\t\tinputStream.close();\n\t\t\toutputStream.close();\n\t\t\tclientSocket.close();\n\t\t\treturn;\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} catch (InterruptedException ine) {\n\t\t\treturn;\n\t\t}\n\t}", "@Override\n public void close() throws IOException\n {\n debug(\"Dispose remote console server.\");\n // this method tries its best and as a least resort uses thread interruption\n synchronized(this) {\n try {\n // try to break server.accept in order to force queue reading on thread\n Socket socket = new Socket();\n socket.connect(new InetSocketAddress(port), 500);\n socket.close();\n }\n catch(IOException e) {\n error(e);\n }\n\n queue.clear();\n queue.offer(SHUTDOWN);\n\n try {\n wait(SHUTDOWN_TIMEOUT);\n }\n catch(InterruptedException unused) {\n thread.interrupt();\n }\n }\n }", "public void stop() throws IOException {\n kv_out.println_debug(\"Try to stop the handler\");\n isRunning = false;\n serverSocket.close();\n }", "private void close() {\n\t\tif (socketChannel != null) {\n\t\t\ttry {\n\t\t\t\tif (in != null) {\n\t\t\t\t\tin.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close in stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (out != null) {\n\t\t\t\t\tout.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog.log(Level.SEVERE, \"Close out stream \", e);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsocketChannel.close();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tlog.log(Level.SEVERE, \"Can't close socket channel\", ex);\n\t\t\t}\n\n\t\t}\n\t\t//Defender.stopConnection();\n\t}", "private void closeStreams() {\n try {\n windowForCommunication.append(\"Closing connection now.\" + \"\\n\");\n sendMessageToClient(\"ENDING CHAT: Closing connection now\");\n input.close();\n output.close();\n serverSocket.close();\n }\n catch(IOException e) {\n System.out.println(e);\n windowForCommunication.append(\"Uh oh. Seems like there was a communication error....!\");\n }\n }", "@Override\n public void closeConnection() {\n\n System.out.println(\"[CLIENT] Closing socket connection...\");\n try {\n socket.close();\n in.close();\n out.close();\n System.out.println(\"[CLIENT] Closed socket connection.\");\n } catch (IOException e) {\n System.out.println(\"[CLIENT] Error occurred when closing socket\");\n }\n System.exit(0);\n\n }", "public void stop() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tif (socket != null) {\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Socket closed.\");\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\n\t\t}\n\t}", "public void close()\n {\n getConnectionManager().shutdown();\n }", "public void closeConnection() {\n try {\n stdIn.close();\n socketIn.close();\n socketOut.close();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }", "public void shutDown() throws IOException {\n this.clientSocket.shutdownInput();\n this.clientSocket.shutdownOutput();\n this.clientSocket.close();\n }", "public void close(){\n try{\n this.clientSocket.close();\n }\n catch (IOException e){\n\n }\n this.wamBoard.close();\n }", "public void disconnect() throws IOException {\r\n socket.close();\r\n System.out.println(\"Disconnected\");\r\n }", "public void closeConnection() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {\n\t\t\tlogger.warning(\"problem closing socket connection with JSON-RPC server at \" + serverIP + \":\" + serverPort);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void terminate() {\n\t\tif (socket == null)\n\t\t\tthrow new IllegalStateException();\n\t\ttry {\n\t\t\tsocket.close();\n\t\t} catch (IOException e) {}\n\t}", "public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}", "public void closeConnection(){\n\n try {\n fromClient.close();\n socket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void close() {\n\t\ttry {\n\t\t\t_inputStream.close();\n\t\t\t_outputStream.close();\n\t\t\t_socket.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public synchronized void closeConnection() {\n try {\n connected = false;\n socket.close();\n System.out.println(\"[SERVER] Connection closed with client\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void close() {\n\t\tshutdownClient(clientRef.get());\n\t}", "public static void logout() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.logoutUser());\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void shutdown() {\n clientTUI.showMessage(\"Closing the connection...\");\n try {\n in.close();\n out.close();\n serverSock.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void close()\r\n {\r\n try \r\n {\r\n if(out != null) out.close();\r\n }\r\n catch(Exception e) {\r\n \r\n }\r\n try \r\n {\r\n if(in != null) in.close();\r\n }\r\n\r\n catch(Exception e) {\r\n \r\n };\r\n try \r\n {\r\n if(socket != null) socket.close();\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n }", "public synchronized void closeAllSocket()\n {\n \ttry {\n \t\toutput.close();\n \t}\n \tcatch(Exception e)\n \t{\n \t\terror(e);\n \t}\t\n }", "public void closeConnection() {\n try {\n socket.close();\n oStream.close();\n } catch (Exception e) { }\n }", "public static void closeConn(Socket s, String directive, String[] serverMessageList) throws IOException {\n socketInput.close();\n socketOutput.close();\n s.close();\n switch(directive.toLowerCase()){\n case \"r\":\n break;\n case \"stop\":\n for (String sm : serverMessageList){\n System.out.println(sm);\n }\n System.exit(0);\n break;\n }\n }", "public void stop() throws IOException, InterruptedException\n\t{\n\t\t// Set the terminating signal. 11/25/2014, Bing Li\n\t\tTerminateSignal.SIGNAL().setTerminated();\n\t\t// Close the socket for the server. 08/10/2014, Bing Li\n\t\tthis.socket.close();\n\t\t\n\t\t// Stop all of the threads that listen to clients' connecting to the server. 08/10/2014, Bing Li\n\t\tfor (Runner<MyServerListener, MyServerListenerDisposer> runner : this.listenerRunnerList)\n\t\t{\n\t\t\trunner.stop();\n\t\t}\n\n\t\t// Shutdown the IO registry. 11/07/2014, Bing Li\n\t\tMyServerIORegistry.REGISTRY().dispose();\n\t\t\n\t\t// Shut down the client pool. 09/17/2014, Bing Li\n\t\tClientPool.SERVER().dispose();\n\t}", "private void closeConnection(){\n report(\"Close connection\");\n try{\n if(socket != null && !socket.isClosed()) {\n report(\"Client: Close socket\");\n socket.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n report(\"End\");\n }", "@Override\r\n public synchronized void close()\r\n {\r\n if (!isRunning)\r\n {\r\n throw new IllegalStateException(\"already stopped!\");\r\n }\r\n threadPool.shutdownNow();\r\n socket.close();\r\n isRunning = false;\r\n }", "@Override\n\tpublic void close() {\n\t\tfinal Socket input = getSocket();\n\n\t\tif (input != null) {\n\t\t\tif (!input.isClosed()) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (final IOException e) {\n\t\t\t\t\t// we cannot do anything\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void close() throws IOException\n\t{\n\t\tthis.decoratee.close();\n\t\tregisterSocketIsClosing(this);\n\t}", "public void close() {\n\t\ttry {\n\t\t\texecutorService.shutdownNow();\n\t\t\toutput.close();\n\t\t\tinput.close();\n\t\t\tconnection.close();\n\t\t} catch (IOException ioe) {\n\t\t\tMain.LOGGER.log(Level.SEVERE, \"Error closing GameHandler\", ioe);\n\t\t} \n\t}", "public void closeConnection() {\n try {\n if ( clientSocket != null ) {\n clientSocket.close();\n }\n } catch ( IOException e ) {\n logger.error( \"Error closing sokcet to client \" + getId(), e );\n }\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\tif(socket!=null)\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(IOException e){\n\t\t\tLog.d(\"IOException\", \"Exception closing socket\");\n\t\t}\n\t}", "public static void closeServer() {\n\t\trun = false;\n\t}", "private void disconnectFromServer() {\n\t\ttry {\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot disconnect from server\");\n\t\t}\n\t}", "public void close() throws IOException {\n\t\ttry {\n\t\t\tprinter.close();\n\t\t\treader.close();\n\t\t\tclientSocket.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SocketException(\"Something went wrong when closing the command channel : \" + e.getMessage());\n\t\t}\n\n\t}", "public void closeSocket()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfor (CharData chs : replyList)\n\t\t\t{\n\t\t\t\tchs.conn.replyList.remove(ch);\n\t\t\t\tchs.sendln(\"Your reply list has changed.\");\n\t\t\t}\n\t\t\t\n\t\t\tif (saveable)\n\t\t\t{\n\t\t\t\tif (realCh != null)\n\t\t\t\t\tStaffCommands.doReturn(this, \"\");\n\t\t\t\t\n\t\t\t\tch.save();\n\t\t\t\tDatabase.saveAccount(this);\n\t\t\t}\n\t\t\t\n\t\t\tconnSocket.close();\n\t\t} catch (Exception e) {\n\t\t\tsysLog(\"bugs\", \"Error in closeSocket: \"+e.getMessage());\n\t\t\tlogException(e);\n\t\t}\n\t}", "private void close(){\n try {\n socket.close();\n objOut.close();\n line.close();\n audioInputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void close() {\n if (this.client != null && this.client.isConnected()) {\n this.client.close();\n }\n this.running = false;\n }", "public synchronized void close() throws IOException {\r\n\t\tif (closed) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tclosed = true;\r\n\t\tdatagramSocket.close();\r\n\t\tif (Log.isDebug()) {\r\n\t\t\tLog.debug(\"UDP listener shutdown for interface \" + getIface() + (getLocalAddress().isAnyLocalAddress() ? \"\" : \" on \" + getLocalAddress().toString()) + \" and port \" + getLocalPort() + \".\", Log.DEBUG_LAYER_COMMUNICATION);\r\n\t\t}\r\n\r\n\t\tdatagramSocket = null;\r\n\t}", "public void closeConn() {\n try {\n if (writer != null) {\n writer.close();\n }\n if (sockoutOs != null) {\n sockoutOs.close();\n }\n if (null != socket || !socket.isClosed()) {\n socket.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n }", "public void quit()throws IOException {\n if(s.isConnected()) {\n reader.close();\n writer.close();\n s.close();\n System.out.println(\"Disconnected from the server.\");\n }\n }", "public static void close() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Chiusura connessione\");\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.CLOSE;\n\t\t\tsend(rp);\n\t\t\tClient.LoggedUser.anagrafica = null;\n\t\t\tois.close();\n\t\t\toos.close();\n\t\t\ts.close();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Errore close client connection\");\n\t\t}\n\t}", "public void disconnect() throws IOException {\n socket.close();\n socket = null;\n socketIn = null;\n socketOut = null;\n state = State.READY;\n }", "public void close() throws IOException{\n this.channel.close();\n this.connection.close();\n }", "private void closeConnection(Socket socket) throws IOException {\n reader.close();\n dataWriter.close();\n socket.close();\n }" ]
[ "0.776013", "0.7447744", "0.74354035", "0.7424234", "0.7406958", "0.73751134", "0.7374942", "0.7357328", "0.7347941", "0.73203593", "0.7310902", "0.72618574", "0.725676", "0.72551876", "0.72416615", "0.7240137", "0.7237152", "0.7198233", "0.718966", "0.71778214", "0.71755344", "0.71585107", "0.71409863", "0.7131624", "0.7129437", "0.70932615", "0.7065964", "0.70547634", "0.7049621", "0.7003465", "0.6981972", "0.69755167", "0.69657314", "0.6963763", "0.69321895", "0.69223094", "0.69137514", "0.6905614", "0.68754196", "0.6863944", "0.6818578", "0.6809735", "0.68077403", "0.6800876", "0.6792562", "0.6781481", "0.6773557", "0.67569274", "0.67394143", "0.6732696", "0.67144626", "0.66895896", "0.6672173", "0.66650885", "0.6663963", "0.6660165", "0.66532886", "0.6625987", "0.65982085", "0.6597275", "0.65970457", "0.6581552", "0.6581434", "0.6580975", "0.6579544", "0.6574203", "0.6573267", "0.6570836", "0.6560135", "0.65583265", "0.6557443", "0.65367424", "0.6533294", "0.65313053", "0.6530111", "0.6514325", "0.65045613", "0.64940524", "0.6493056", "0.6490201", "0.6486615", "0.6472734", "0.647027", "0.64683765", "0.6465842", "0.6458047", "0.64286596", "0.64252734", "0.6416325", "0.64125824", "0.64042574", "0.63938934", "0.6382751", "0.63776404", "0.63742465", "0.6365868", "0.636419", "0.6363651", "0.636203", "0.63518435", "0.63431436" ]
0.0
-1
TODO Autogenerated method stub
public static void removeFace(Sprite pTouchArea) { if ((Sprite) pTouchArea == MonkeyGameActivity.wrongObj1) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.wrongObj1Sound); MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); if (MonkeyGameActivity.position[MonkeyGameActivity.aCount] == null) { } else { MonkeyGameActivity.value = 1; } } else if ((Sprite) pTouchArea == MonkeyGameActivity.wrongObj2) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.wrongObj2Sound); MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); if (MonkeyGameActivity.position[MonkeyGameActivity.aCount] == null) { } else { MonkeyGameActivity.value = 1; } } else if ((Sprite) pTouchArea == MonkeyGameActivity.wrongObj3) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.wrongObj3Sound); MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); if (MonkeyGameActivity.position[MonkeyGameActivity.aCount] == null) { } else { MonkeyGameActivity.value = 1; } } else if ((Sprite) pTouchArea == MonkeyGameActivity.wrongObj4) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.wrongObj4Sound); MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); if (MonkeyGameActivity.position[MonkeyGameActivity.aCount] == null) { } else { MonkeyGameActivity.value = 1; } } else if ((Sprite) pTouchArea == MonkeyGameActivity.wrongObj5) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.wrongObj5Sound); MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); if (MonkeyGameActivity.position[MonkeyGameActivity.aCount] == null) { } else { MonkeyGameActivity.value = 1; } } else if ((Sprite) pTouchArea == MonkeyGameActivity.wrongObj6) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.wrongObj6Sound); MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); if (MonkeyGameActivity.position[MonkeyGameActivity.aCount] == null) { } else { MonkeyGameActivity.value = 1; } } else if ((Sprite) pTouchArea == MonkeyGameActivity.obj1) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.obj1Sound); MonkeyGameActivity.bananaValue = 1; MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); } else if ((Sprite) pTouchArea == MonkeyGameActivity.obj2) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.obj2Sound); MonkeyGameActivity.bananaValue = 1; MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); } else if ((Sprite) pTouchArea == MonkeyGameActivity.obj3) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.obj3Sound); MonkeyGameActivity.bananaValue = 1; MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); } else if ((Sprite) pTouchArea == MonkeyGameActivity.obj4) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.obj4Sound); MonkeyGameActivity.bananaValue = 1; MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); } else if ((Sprite) pTouchArea == MonkeyGameActivity.obj5) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.obj5Sound); MonkeyGameActivity.bananaValue = 1; MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj6); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); } else if ((Sprite) pTouchArea == MonkeyGameActivity.obj6) { MonkeyGameActivity.audioPlay = true; playAudio(MonkeyGameActivity.obj6Sound); MonkeyGameActivity.bananaValue = 1; MonkeyGameActivity.mScene.unregisterTouchArea(pTouchArea); MonkeyGameActivity.mScene.detachChild(pTouchArea); GameObjects.fadeOut(MonkeyGameActivity.obj1); GameObjects.fadeOut(MonkeyGameActivity.obj2); GameObjects.fadeOut(MonkeyGameActivity.obj3); GameObjects.fadeOut(MonkeyGameActivity.obj4); GameObjects.fadeOut(MonkeyGameActivity.obj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj1); GameObjects.fadeOut(MonkeyGameActivity.wrongObj2); GameObjects.fadeOut(MonkeyGameActivity.wrongObj3); GameObjects.fadeOut(MonkeyGameActivity.wrongObj4); GameObjects.fadeOut(MonkeyGameActivity.wrongObj5); GameObjects.fadeOut(MonkeyGameActivity.wrongObj6); } }
{ "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
Constructor que se utiliza cuando se crea una familia.
public Familia(String cedulaFam,Persona per,Persona per2) { cedulaFamiliar = cedulaFam; used = true; activa = true; asociado1 = per; asociado2 = per2; //cabeza=per; hijos_Ambos=null; hijos_Adoptados=null; next=null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PersonaFisica() {}", "public MusiqueFiducial(){\n\t\tinitialisation();\n\t}", "public Familia(String cedula, Persona head)\n {\n cedulaFamiliar = cedula;\n cabeza = head;\n used = true;\n activa = true;\n asociado1=null;\n asociado2 = null;\n hijos_Ambos=null;\n hijos_Adoptados=null; \n next=null;\n }", "public Family(){\n super();\n }", "Foco createFoco();", "public Firma() {\n }", "public Persona() {\n\t}", "public abstract Anuncio creaAnuncioGeneral();", "public Facility() {\n }", "Klassenstufe createKlassenstufe();", "public abstract Anuncio creaAnuncioIndividualizado();", "public Persona() {\n \t\n }", "public Persona() {\n }", "public Persona(){\n \n }", "public Persona(){\n \n }", "public FicheConnaissance() {\r\n }", "public Caso_de_uso () {\n }", "protected Asignatura()\r\n\t{}", "public FiltroMicrorregiao() {\r\n }", "public Laboratorio() {}", "public Persona() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Fruitore()\r\n\t{\r\n\t\tthis.nomeUtente = Costanti.STRINGA_VUOTA;\r\n\t}", "public AntrianPasien() {\r\n\r\n }", "public FamilyDetails() {\n super();\n }", "public TutorIndustrial() {}", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "public HorasTrabalhadasFaces() {\n }", "public CrearQuedadaVista() {\n }", "public AfiliadoVista() {\r\n }", "public Institution() {\n this.name = \"Institution\";\n }", "@Override\n\tpublic void createGerant(Gerant g) {\n\t\t\n\t}", "Schulleiter createSchulleiter();", "public abstract void creationGrille();", "public Alojamiento() {\r\n\t}", "public SchoolPerson() {\n }", "public Aritmetica(){ }", "public Fabrica(String identificador, String nombre, String rubro, int clientePorHora, int dispositivoloT, int cajasRegistradoras) {\r\n super(identificador, nombre, rubro);\r\n this.clientePorHora = clientePorHora;\r\n this.dispositivoloT = dispositivoloT;\r\n this.cajasRegistradoras = cajasRegistradoras;\r\n }", "private void inseririFirebase(Familiar f){\n f.setFoto(uriInput.toString());\n\n reference = FirebaseConfig.getFirebase().child(\"Familiares\").child(bDcore.getidbd());\n reference.child(String.valueOf(f.getId())).setValue(f);\n }", "public Facturacion() {\n }", "public Professor()\n\t{\n\t\t//stuff\n\t}", "public Education() {}", "public Candidatura (){\n \n }", "public BrihaspatiProFile() {\n }", "public Cgg_jur_anticipo(){}", "public Clade() {}", "public Unidadmedida() {\r\n\t}", "protected FanisamBato(){\n\t}", "public Propiedad(){\n\t}", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "public Ferrari() {\n this(315);\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "private UsineJoueur() {}", "public IsFicha()\n\t{\n\t\tthis.inicializar();\n\t}", "public Persona(){\n /*super(nombresPosibles\n [r.nextInt(nombresPosibles.length)],(byte)r.nextInt(101));\n */\n super(\"Anónimo\",(byte)5);\n String[] nombresPosibles={\"Patracio\",\"Eusequio\",\"Bartolo\",\"Mortadelo\",\"Piorroncho\",\"Tiburcio\"};\n String[] apellidosPosibles={\"Sánchez\",\"López\",\"Martínez\",\"González\",\"Páramos\",\"Jiménez\",\"Parra\"};\n String[] nacionalidadesPosibles={\"Española\",\"Francesa\",\"Alemana\",\"Irlandesa\",\"Japonesa\",\"Congoleña\",\"Bielorrusa\",\"Mauritana\"};\n Random r=new Random();\n this.apellido=apellidosPosibles\n [r.nextInt(apellidosPosibles.length)];\n this.nacionalidad=nacionalidadesPosibles\n [r.nextInt(nacionalidadesPosibles.length)];\n mascota=new Mascota[5];\n this.saldo=r.nextInt(101);\n }", "public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "Compleja createCompleja();", "public abstract Anuncio creaAnuncioTematico();", "public Sistema(){\r\n\t\t\r\n\t}", "public Classe() {\r\n }", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "public Fish() {\r\n\t}", "public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n Saisie.Terminer();\n }", "public GestioneApplicazione() {\n }", "public AgenteEstAleatorio() {\r\n }", "public Mannschaft() {\n }", "public NuevaTablaResource() {\r\n }", "public Funcionario() {\r\n\t\t\r\n\t}", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public Pasien() {\r\n }", "public Veiculo() {\r\n\r\n }", "public Chauffeur() {\r\n\t}", "public Manusia() {}", "public Relationship() {\r\n\t}", "public Factura() {\r\n }", "public Factura() {\r\n }", "public TebakNusantara()\n {\n }", "public Corso() {\n\n }", "public FareModel() {\n }", "void crearNuevaPersona(Persona persona);", "public prueba()\r\n {\r\n }", "public JSFOla() {\n }", "public Championship() {\n }", "public Mafia() {\n super(Side.MAFIA);\n }", "public Person(String associatedUserName, String firstName, String lastName, Gender gender) {\n Id = UUID.randomUUID().toString();\n AssociatedUserName = associatedUserName;\n FirstName = firstName;\n LastName = lastName;\n Gender = gender;\n }", "Compuesta createCompuesta();", "public Employe () {\n this ( NOM_BIDON, null );\n }", "public SlanjePoruke() {\n }", "public Carrera(){\n }", "public Casa() { \n \n /* Cuando se crea la casa, tambien se debe crear la puerta */\n \n laPuerta = new Puerta();\n \n /* se pone la letra F por que son de tipo float */\n laPuerta.setAncho(2.3F);\n laPuerta.setAlto(1.5F);\n \n }", "public Gasto() {\r\n\t}", "public Transportista() {\n }", "public CorrespondenceFactoryImpl() {\n super();\n }", "public FruitStand() {}", "public Perfil create(Perfil perfil);", "public EnsembleLettre() {\n\t\t\n\t}", "public Fruitore(String nomeUtente)\r\n\t{\r\n\t\tthis.nomeUtente = nomeUtente;\r\n\t}", "public Achterbahn() {\n }", "public EntityBundleCreate() {}", "public DABeneficios() {\n }", "Schueler createSchueler();" ]
[ "0.6977345", "0.6692777", "0.6571654", "0.64669746", "0.64155316", "0.6391385", "0.6359128", "0.6330068", "0.62916636", "0.6281637", "0.6272026", "0.62622553", "0.6238506", "0.6229289", "0.6229289", "0.6182291", "0.617979", "0.61595535", "0.61471725", "0.6141411", "0.6139414", "0.6091168", "0.60838914", "0.6079491", "0.60548884", "0.6042065", "0.60348326", "0.59819645", "0.597659", "0.59730786", "0.596502", "0.5964123", "0.5947848", "0.5936705", "0.5915461", "0.5912327", "0.5909598", "0.59072316", "0.5901775", "0.5899576", "0.58920753", "0.58900476", "0.5875938", "0.58744586", "0.5869799", "0.5865096", "0.5862657", "0.5858255", "0.58569443", "0.58560026", "0.5849024", "0.5845883", "0.5843439", "0.5838576", "0.5836329", "0.5831498", "0.58242124", "0.5823555", "0.5822401", "0.58222735", "0.58217627", "0.5813107", "0.58079195", "0.5804505", "0.57921684", "0.5786682", "0.5785884", "0.5784079", "0.57796603", "0.5772785", "0.57724583", "0.5772039", "0.57697", "0.57648736", "0.57648736", "0.57532007", "0.5750315", "0.57477176", "0.573941", "0.5738808", "0.57375413", "0.5735586", "0.57266796", "0.5725487", "0.57179576", "0.57116526", "0.57077336", "0.57032686", "0.5701761", "0.56992644", "0.5696492", "0.5691369", "0.56898844", "0.5687605", "0.568394", "0.5682676", "0.568212", "0.5674711", "0.567155", "0.5670899" ]
0.68847644
1
Constructor que se utiliza cuando se crea una familia asociada.
public Familia(String cedula, Persona head) { cedulaFamiliar = cedula; cabeza = head; used = true; activa = true; asociado1=null; asociado2 = null; hijos_Ambos=null; hijos_Adoptados=null; next=null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PersonaFisica() {}", "public Familia(String cedulaFam,Persona per,Persona per2)\n {\n cedulaFamiliar = cedulaFam;\n used = true;\n activa = true;\n asociado1 = per;\n asociado2 = per2;\n //cabeza=per;\n hijos_Ambos=null;\n hijos_Adoptados=null; \n next=null;\n }", "public Family(){\n super();\n }", "public MusiqueFiducial(){\n\t\tinitialisation();\n\t}", "Foco createFoco();", "public Firma() {\n }", "public abstract Anuncio creaAnuncioGeneral();", "public FicheConnaissance() {\r\n }", "public Persona() {\n\t}", "public abstract Anuncio creaAnuncioIndividualizado();", "public Facility() {\n }", "public FamilyDetails() {\n super();\n }", "public Persona() {\n \t\n }", "public Caso_de_uso () {\n }", "public FiltroMicrorregiao() {\r\n }", "public Laboratorio() {}", "public HorasTrabalhadasFaces() {\n }", "Klassenstufe createKlassenstufe();", "protected Asignatura()\r\n\t{}", "public Persona() {\n }", "public Persona(){\n \n }", "public Persona(){\n \n }", "public Persona() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Relationship() {\r\n\t}", "public BrihaspatiProFile() {\n }", "public AntrianPasien() {\r\n\r\n }", "public Alojamiento() {\r\n\t}", "public Ferrari() {\n this(315);\n }", "@Override\n\tpublic void createGerant(Gerant g) {\n\t\t\n\t}", "protected FanisamBato(){\n\t}", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "private void inseririFirebase(Familiar f){\n f.setFoto(uriInput.toString());\n\n reference = FirebaseConfig.getFirebase().child(\"Familiares\").child(bDcore.getidbd());\n reference.child(String.valueOf(f.getId())).setValue(f);\n }", "public AfiliadoVista() {\r\n }", "Schulleiter createSchulleiter();", "public TutorIndustrial() {}", "public SchoolPerson() {\n }", "public Fabrica(String identificador, String nombre, String rubro, int clientePorHora, int dispositivoloT, int cajasRegistradoras) {\r\n super(identificador, nombre, rubro);\r\n this.clientePorHora = clientePorHora;\r\n this.dispositivoloT = dispositivoloT;\r\n this.cajasRegistradoras = cajasRegistradoras;\r\n }", "public Facturacion() {\n }", "public CorrespondenceFactoryImpl() {\n super();\n }", "public ProyectoFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "public MnjMfgFabinsProdLEOImpl() {\n }", "public Aritmetica(){ }", "public abstract Anuncio creaAnuncioTematico();", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "public Unidadmedida() {\r\n\t}", "public Clade() {}", "public AgenteEstAleatorio() {\r\n }", "public Fruitore()\r\n\t{\r\n\t\tthis.nomeUtente = Costanti.STRINGA_VUOTA;\r\n\t}", "public Sistema(){\r\n\t\t\r\n\t}", "Oracion createOracion();", "public Cgg_jur_anticipo(){}", "public abstract void creationGrille();", "public Corso() {\n\n }", "Compleja createCompleja();", "public Gasto() {\r\n\t}", "public GestioneApplicazione() {\n }", "public Candidatura (){\n \n }", "public Corrida(){\n\n }", "public Institution() {\n this.name = \"Institution\";\n }", "public CrearQuedadaVista() {\n }", "public IsFicha()\n\t{\n\t\tthis.inicializar();\n\t}", "OperacionColeccion createOperacionColeccion();", "public Mafia() {\n super(Side.MAFIA);\n }", "public FareModel() {\n }", "public Factory() {\n\t\tsuper();\n\t}", "public borFactoryImpl() {\n\t\tsuper();\n\t}", "public Fish() {\r\n\t}", "public JogadorTradutor() {\n this.nome= \"Sem Registro\";\n this.pontuacao = pontuacao;\n id = id;\n \n geradorDesafioItaliano = new GerarPalavra(); // primeira palavra ja é gerada para o cliente\n }", "public Factura() {\r\n }", "public Factura() {\r\n }", "public Odontologo() {\n }", "public LocalResidenciaColaborador() {\n //ORM\n }", "public NuevaTablaResource() {\r\n }", "public Funcionario() {\r\n\t\t\r\n\t}", "public static Grafo criarGrafo() {/* Este método tem função de criar um grafo. */\r\n\t\tGrafo grafo = new Grafo();/* Aqui um grafo é criado */\r\n\t\t/*\r\n\t\t * Aqui são criados nós e em seguida adcionados a lista de nós do grafo\r\n\t\t * criado\r\n\t\t */\r\n\t\tgrafo.addNo(new No(\"n1\"));\r\n\t\tgrafo.addNo(new No(\"n2\"));\r\n\t\tgrafo.addNo(new No(\"n3\"));\r\n\t\tgrafo.addNo(new No(\"n4\"));\r\n\t\tgrafo.addNo(new No(\"n5\"));\r\n\r\n\t\t/*\r\n\t\t * Aqui as arestas são criadas e seus parâmetros para o método\r\n\t\t * construtor são passados. Os vértices que compõe cada aresta são\r\n\t\t * retiradas diretamente da lista de aresta do grafo.\r\n\t\t */\r\n\t\tAresta a1 = new Aresta(\"a1\", grafo.getNos().get(0), grafo.getNos().get(4), 1);\r\n\t\tAresta a2 = new Aresta(\"a2\",grafo.getNos().get(0), grafo.getNos().get(2), 2);\r\n\t\tAresta a3 = new Aresta(\"a3\",grafo.getNos().get(1), grafo.getNos().get(3), 4);\r\n\t\tAresta a4 = new Aresta(\"a4\",grafo.getNos().get(1), grafo.getNos().get(4), 4);\r\n\t\tAresta a5 = new Aresta(\"a5\",grafo.getNos().get(2), grafo.getNos().get(3), 3);\r\n\t\tAresta a6 = new Aresta(\"a6\",grafo.getNos().get(3), grafo.getNos().get(4), 1);\r\n\r\n\t\t/* As arestas são adcionadas a lista de arestas do grafo. */\r\n\t\tgrafo.addAresta(a1);\r\n\t\tgrafo.addAresta(a2);\r\n\t\tgrafo.addAresta(a3);\r\n\t\tgrafo.addAresta(a4);\r\n\t\tgrafo.addAresta(a5);\r\n\t\tgrafo.addAresta(a6);\r\n\r\n\t\treturn grafo;/* O grafo criado é retornado */\r\n\r\n\t}", "public Transportista() {\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public Persona(){\n /*super(nombresPosibles\n [r.nextInt(nombresPosibles.length)],(byte)r.nextInt(101));\n */\n super(\"Anónimo\",(byte)5);\n String[] nombresPosibles={\"Patracio\",\"Eusequio\",\"Bartolo\",\"Mortadelo\",\"Piorroncho\",\"Tiburcio\"};\n String[] apellidosPosibles={\"Sánchez\",\"López\",\"Martínez\",\"González\",\"Páramos\",\"Jiménez\",\"Parra\"};\n String[] nacionalidadesPosibles={\"Española\",\"Francesa\",\"Alemana\",\"Irlandesa\",\"Japonesa\",\"Congoleña\",\"Bielorrusa\",\"Mauritana\"};\n Random r=new Random();\n this.apellido=apellidosPosibles\n [r.nextInt(apellidosPosibles.length)];\n this.nacionalidad=nacionalidadesPosibles\n [r.nextInt(nacionalidadesPosibles.length)];\n mascota=new Mascota[5];\n this.saldo=r.nextInt(101);\n }", "Compuesta createCompuesta();", "public DABeneficios() {\n }", "public Propiedad(){\n\t}", "public Employe () {\n this ( NOM_BIDON, null );\n }", "public GpflFactoryImpl()\n {\n super();\n }", "ProjetoRN createProjetoRN();", "public CorreoElectronico() {\n }", "private BaseDatos() {\n }", "public JSFOla() {\n }", "public Manusia() {}", "public Chauffeur() {\r\n\t}", "public Pasien() {\r\n }", "public Education() {}", "public CompositePersonne() {\n\t\tthis.nomGroupe = \" \";\n\t\tthis.personnel = new ArrayList<InterfacePersonne>();\n\n\t}", "public Principal() {\n initComponents();\n empresaControlador = new EmpresaControlador();\n clienteControlador = new ClienteControlador();\n vehiculoControlador = new VehiculoControlador();\n servicioControlador = new ServicioControlador();\n archivoObjeto = new ArchivoObjeto(\"/home/diego/UPS/56/ProgramacionAplicada/Parqueadero/src/archivo/ClienteArchivo.obj\");// Ruta Absolojuta\n archivosBinarios = new ArchivosBinarios();\n archivosBinariosAleatorio = new ArchivosBinariosAleatorio(\"ServicioArchivo.dat\");//Ruta relativa\n }", "public Carrera(){\n }", "public EntityBundleCreate() {}", "public Achterbahn() {\n }", "public EnsembleLettre() {\n\t\t\n\t}", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public Mannschaft() {\n }", "public Libro() {\r\n }" ]
[ "0.68159753", "0.6751241", "0.6585268", "0.65595853", "0.65439296", "0.62845564", "0.6260616", "0.6238774", "0.62270975", "0.6217319", "0.6174496", "0.61712664", "0.6148336", "0.6107758", "0.60992783", "0.60875624", "0.6073806", "0.6070234", "0.60701245", "0.60624576", "0.6056026", "0.6056026", "0.5999995", "0.5953954", "0.5943143", "0.5919345", "0.5902838", "0.5883284", "0.58714813", "0.5866879", "0.58440626", "0.5838915", "0.5838748", "0.58386105", "0.58362323", "0.582526", "0.5817689", "0.5816276", "0.58154505", "0.5808533", "0.5807626", "0.5804872", "0.5799857", "0.5798989", "0.5798526", "0.5790215", "0.57899344", "0.57893854", "0.57814807", "0.5779783", "0.5779576", "0.577504", "0.5766799", "0.5762759", "0.5759552", "0.5751876", "0.5748318", "0.57455367", "0.5743837", "0.5740571", "0.5729347", "0.5726139", "0.5723938", "0.5723827", "0.5712768", "0.5712139", "0.5709444", "0.5703903", "0.570372", "0.570372", "0.5695983", "0.5690109", "0.56892854", "0.568218", "0.5676294", "0.5670802", "0.56671953", "0.56670934", "0.56656194", "0.5665501", "0.5664633", "0.5662284", "0.5652971", "0.56412494", "0.5630362", "0.5629854", "0.5623941", "0.5623276", "0.56218904", "0.56195706", "0.5615556", "0.56136036", "0.56124514", "0.5612297", "0.56066734", "0.5605163", "0.5603658", "0.5602431", "0.5601212", "0.5599292" ]
0.64366215
5
Metodo que recibe un objeto de tipo persona y lo agrega al final de la lista de familiares.
public void agregarFamiliar(Persona familiar){ Persona ite; if(cabeza.next==null && used==true){ cabeza.next = familiar; }else{ ite=cabeza.next; while(ite.next!=null){ ite=ite.next; } ite.next=familiar; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void crearNuevaPersona(Persona persona);", "static public void addPersona(Persona c) { //metodo para añadir a lista y actualizar la lista en tiempo real\r\n listaPersona.add(c);\r\n listaG.setListaGrafica();\r\n \r\n \r\n \r\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 boolean agregarFamilia(String apellido, Persona[] miembros){\n if (numero_familias < 14){\n Arrays.sort(miembros);\n //Instancia la familia y la agrega al arreglo de Familias en la posición que le corresponde \n familia = new Familia(apellido, miembros);\n numero_familias++;\n familias[numero_familias] = familia;\n return true;\n }\n else return false;\n }", "public List<Familia> obterFamilia(String xml, String tipoConsulta) {\n\n\t\t\n\t\t\n\t\tList<Familia> familias = new ArrayList<Familia>();\n\n\t\ttry {\n\n\t\t\tDocument xmlDoc = loadXMLFrom(xml);\n\t\t\tElement root = xmlDoc.getDocumentElement();\n\n\t\t\tNodeList patentFamilyPai = root.getElementsByTagName(\"ops:family-member\");\n\n\t\t\tNodeList nodePublicationReference = root.getElementsByTagName(\"ops:publication-reference\");\n\t\t\tElement publicationReference = (Element) nodePublicationReference.item(0);\n\n\t\t\tif (\"ops:publication-reference\".equals(publicationReference.getNodeName())) {\n\n\t\t\t\tthis.obterPublicationReferencePai(publicationReference);\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < patentFamilyPai.getLength(); i++) {\n\n\t\t\t\tElement element = (Element) patentFamilyPai.item(i);\n\t\t\t\tString nomeElemento = element.getNodeName();\n\t\t\t\tif (\"ops:family-member\".equals(nomeElemento)) {\n\t\t\t\t\tFamilia familia = this.obterFamilia(element, tipoConsulta);\n\t\t\t\t\tfamilias.add(familia);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tFacesMessage facesMessage = createMessage(FacesMessage.SEVERITY_WARN, \"Erro na solicitação do serviço!\", \"Erro !\");\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, facesMessage);\n\t\t}\n\t\treturn familias;\n\t}", "public Familia(String cedula, Persona head)\n {\n cedulaFamiliar = cedula;\n cabeza = head;\n used = true;\n activa = true;\n asociado1=null;\n asociado2 = null;\n hijos_Ambos=null;\n hijos_Adoptados=null; \n next=null;\n }", "public Familia(String cedulaFam,Persona per,Persona per2)\n {\n cedulaFamiliar = cedulaFam;\n used = true;\n activa = true;\n asociado1 = per;\n asociado2 = per2;\n //cabeza=per;\n hijos_Ambos=null;\n hijos_Adoptados=null; \n next=null;\n }", "@Override public void realizarCobro(Persona persona){\n\tpersona.cuenta.retiro(120);\n }", "private void muestraPersona(JSONArray genero) {\n\tJSONArray a = (JSONArray) genero.get(0);\n\t// txtId.setText(Long.toString( (Long) a.get(0)) );\n\t//txtBuscar.setText((String) a.get(1));\n\t// textFecha.setText((String) a.get(2));\n\t// textUsu.setText((String) a.get(4));\n\tcodTemporal = a.get(0).toString();\n\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "private void validarObligaciones(TituloPropiedad pTitulo, Persona pPersonaAnterior, Persona pPersonaNueva) {\n\t\tList<ObligacionRfr> locListaObligacionesParcela = Criterio.getInstance(entityManager, DocHabEspecializadoRfr.class)\n\t\t\t\t.add(Restriccion.IGUAL(\"parcela\", ((TituloPropiedadParcelario) pTitulo).getParcela())).setProyeccion(Proyeccion.PROP(\"obligacion\")).list();\n\t\tif(!locListaObligacionesParcela.isEmpty()) {\n\t\t\t// ID = 0 significa que es una persona temporal, usada en la\n\t\t\t// migración, y no debería generar actualización de deudas,\n\t\t\t// solo cambiar el titular.\n\t\t\t// if (pPersonaAnterior.getIdPersona() == 0) {\n\t\t\tfor(ObligacionRfr cadaObligacion : locListaObligacionesParcela) {\n\t\t\t\tcadaObligacion.setPersona(pPersonaNueva);\n\t\t\t}\n\t\t\t// }\n\t\t}\n\t}", "@Override\n\tpublic void visit(final GrandMa person) {\n\t\t\n\t}", "public Afiliado(String nombrePersona, String apellidoPersona, String duiPersona) {\n //Inicializar Miembros de clase.\n Afiliados = new ArrayList<>();\n NumeroDui = new ArrayList<>();\n FechaAfiliacion = new ArrayList<>();\n //Agregar valores a los arraylist.\n Afiliados.add(nombrePersona + \" \" + apellidoPersona);\n NumeroDui.add(duiPersona);\n FechaAfiliacion.add(ObtenerFechaActual());\n }", "public static void main(String[] args) {\n\t\t\r\n\tString nombre = leerTexto(\"Ingrese un nombre:\");\r\n\tint edad = leerNumero(\"Ingrese su edad:\");\r\n\tString rut = leerTexto(\"Ingresa el RUT:\");\r\n\tchar genero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tfloat peso = leerNumero(\"Ingrese peso:\");\r\n\tfloat altura = leerNumero(\"Ingrese la altura:\");\r\n\tPersona claudia = new Persona(nombre, rut, edad, genero, peso, altura);\r\n\t\r\n\tnombre = leerTexto(\"Ingrese un nombre:\");\r\n\tedad = leerNumero(\"Ingrese su edad:\");\r\n\trut = leerTexto(\"Ingresa el RUT:\");\r\n\tgenero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tPersona juliano = new Persona(nombre, rut, edad, genero);\r\n\t\r\n\tPersona noelia = new Persona();\r\n\tnoelia.setNombre(leerTexto(\"Ingresa un nombre\"));\r\n\tnoelia.setEdad(leerNumero(\"Ingresa la edad\"));\r\n\tnoelia.setRut(leerTexto(\"Ingresa el RUT\"));\r\n\tnoelia.setGenero(leerTexto(\"Ingresa el genero\").charAt(0));\r\n\tnoelia.setAltura(leerNumero(\"Ingresa la altura\"));\r\n\tnoelia.setPeso(leerNumero(\"Ingresa el peso\"));\r\n\t\r\n\tPersona[] perso = new Persona[3];\r\n\tperso[0] = claudia;\r\n\tperso[1] = juliano;\r\n\tperso[2] = noelia;\r\n\t\r\n\tfor (Persona persona : perso) {\r\n\t\tif (persona.calcularIMC()==Persona.PESO_BAJO) {\r\n\t\t\tescribir(\"Pongale sus buenas cazuelas\");\r\n\t\t}else {\r\n\t\t\tif (persona.calcularIMC()==Persona.PESO_IDEAL) {\r\n\t\t\t\tescribir(\"Estamos tiki taka\");\r\n\t\t\t}else {\r\n\t\t\t\tescribir(\"Menos coffe break!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Mayor de edad\r\n\t\tescribir(\"La persona \" + persona.getNombre() + \" es mayor de edad? \" + persona.esMayorDeEdad());\r\n\t\t//Mostrar el toString()\r\n\t\tescribir(persona.toString());\r\n\t }\r\n\t}", "@Override\n\tpublic Types getType() {\n\t\treturn GameObject.Types.PERSON;\n\t}", "public void agregarProfesor(ProfesorAsignatura profesor){\n profesores.add(profesor);\n }", "public static void main(String[] args) {\n\t\tProfesor profesor = new Alumno();\r\n\t\tSystem.out.println(\"Profesor: \"+profesor.devolverNombre());\r\n\t\tSystem.out.println(\"Edad: \"+profesor.devolverEdad());\r\n\t\tSystem.out.println();\r\n\t\tPersona persona = new Alumno();\r\n\t\tSystem.out.println(\"Edad: \"+persona.devolverEdad());\r\n\t\tSystem.out.println(\"Nombre: \"+persona.devolverNombre());\r\n\t\t\r\n\t\tPersona persona2 = new Profesor();\r\n\t\tSystem.out.println(\"Edad: \"+persona2.devolverEdad());\r\n\t\tSystem.out.println(\"Nombre: \"+persona2.devolverNombre());\r\n\t\t\r\n\t\tArrayList<Persona> personas = new ArrayList<Persona>();\r\n\t\tpersonas.add(persona);\r\n\t\tpersonas.add(persona2);\r\n\t\t\r\n\t\tfor (Persona persona3 : personas) {\r\n\t\t\tSystem.out.println(\"ENTRO AL FOR\");\r\n\t\t\tSystem.out.println(\"Edad: \"+persona3.devolverEdad());\r\n\t\t\tSystem.out.println(\"Nombre: \"+persona3.devolverNombre());\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void seleccionarPersona() {\n\t\t\r\n\t}", "public Persona() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public void mostrarPersona(){\r\n System.out.println(\"Nombre: \" + persona.getNombre());\r\n System.out.println(\"Cedula: \" + persona.getCedula());\r\n }", "public void addPerson(Person thePerson) {\r\n staff.add(thePerson);\r\n }", "public Persona(){\n \n }", "public Persona(){\n \n }", "public void agregarPersona(PersonaDTO persona, Set<TelefonoDTO> telefonos, Set<DireccionDTO> direcciones,\n\t\t\tSet<CorreoElectronicoDTO> correos) throws CustomErrorException, CustomValidationException {\n\t\ttry {\n\t\t\t// Vemos si tiene lo necesario, sino salimos\n\t\t\tif (telefonos.size() == 0) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.TELEFONO_NECESARIO);\n\t\t\t}\n\t\t\tif (direcciones.size() == 0) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.DIRECCION_NECESARIA);\n\t\t\t}\n\t\t\tif (correos.size() == 0) {\n\t\t\t\tthrow new CustomValidationException(CustomValidationException.CORREO_NECESARIO);\n\t\t\t}\n\t\t\t//Evaluamos si se trata de un modificacion\n\t\t\tif (persona.getIdPersona() == null) {\n\t\t\t\t//Es un alta\n\t\t\t\t//Persistir las entidades agregadas\n\t\t\t\tfor (TelefonoDTO t: telefonos) {\n\t\t\t\t\tt.setIdTelefono(persistirTelefono(Converter.toEntity(t))); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (DireccionDTO d: direcciones) {\n\t\t\t\t\td.setIdDireccion(persistirDireccion(Converter.toEntity(d)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (CorreoElectronicoDTO c: correos) {\n\t\t\t\t\tc.setIdCorreoElectronico(persistirCorreoElectronico(Converter.toEntity(c)));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Las entidades están peristentes, asignarlas a la persona\n\t\t\t\tpersona.setTelefonos(telefonos);\n\t\t\t\tpersona.setCorreos(correos);\n\t\t\t\tpersona.setDirecciones(direcciones);\n\t\t\t\t\n\t\t\t\t//persistir la persona\n\t\t\t\tgPersona.add(Converter.toEntity(persona));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tmodificarPersona(persona, telefonos, direcciones, correos);\n\t\t\t}\n\t\t\t\n\t\t} catch(CustomErrorException cer) {\n\t\t\tthrow cer;\n\t\t} catch (Exception e) {\n\t\t\tif(persona.getIdPersona() == null) {\n\t\t\t\ttry {\n\t\t\t\t\tfor (TelefonoDTO t : telefonos) {\n\t\t\t\t\t\tgTelefono.delete(Converter.toEntity(t));\n\t\t\t\t\t}\n\t\t\t\t\tfor (DireccionDTO d : direcciones) {\n\t\t\t\t\t\tgDireccion.delete(Converter.toEntity(d));\n\t\t\t\t\t}\n\t\t\t\t\tfor (CorreoElectronicoDTO c : correos) {\n\t\t\t\t\t\tgCorreoElectronico.delete(Converter.toEntity(c));\n\t\t\t\t\t} \n\t\t\t\t}catch (CustomErrorException cer) {\n\t\t\t\t\tthrow cer;\n\t\t\t\t}catch (Exception e2) {\n\t\t\t\t\tthrow new CustomErrorException(CustomErrorException.ERROR_SERVICIO,this.getClass().getSimpleName(),e.getStackTrace());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic String getTipoPersona() {\n\t\treturn \"alumno del curso \" + curso + \" de \" + grupo + \" de \" + tipoEstudios ;\r\n\t\t\r\n\t}", "public void add(Person person) {\n\t\tteilnehmerListe.add(person);\n\t}", "public PersonaFisica() {}", "private void reposicionarPersonajes() {\n // TODO implement here\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public static void main(String args[]){\n int x = 10;\r\n List<Perro> perros = new ArrayList();\r\n \r\n Perro perro=new Perro();\r\n \r\n Persona persona = new Persona();\r\n persona.setAltura(5.5);\r\n persona.setColorPiel(\"Blanca\");\r\n persona.setEdad(16);\r\n persona.setGenero('f');\r\n persona.setNacionalidad(\"Japonesa\");\r\n persona.setPeso(130);\r\n persona.setTipoDePelo(\"Lacio\"); \r\n persona.setOcupacion(\"Dinero\");\r\n \r\n //Se dan todas las características\r\n perro.setNombre(\"Manuel\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);//Se añade a la instancia\r\n \r\n perro = new Perro();//Se limpia y se vuelve a llamar la instancia\r\n perro.setNombre(\"Igor\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Lacio\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n \r\n perro = new Perro();\r\n perro.setNombre(\"Luli\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Siberiano\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n //****************CUANDO EJECUTES ESTO VE COMENTADO LOS BLOQUES QUE NO QUIERES QUE SE USEN*************\r\n //foreach y for hace la misma funcion\r\n //Uso de for\r\n for (Perro perro1:perros){\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo());\r\n }\r\n \r\n //Formas de uso del for each\r\n perros.forEach(perro1->\r\n System.out.println(perro1.getNombre()));\r\n \r\n perros.forEach(perro1 ->{//Se define una variable que es perro1 y esta recorrera toda la lista\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo()); \r\n System.out.println();\r\n \r\n });\r\n \r\n \r\n System.out.println(\"Blanco\".equals(perro.color)? \"Si es blanco\":\"No es blanco\");\r\n \r\n //Uso del if\r\n if (((4/2==0)&&(10/5 !=0))||(100/20==0)){\r\n System.out.println(\"Es bisiesto\");\r\n }else{\r\n System.out.println(\"No es bisiesto\");\r\n }\r\n \r\n //Uso del switcH\r\n switch(x){\r\n case 6:\r\n System.out.println(\"Es verdadero\");\r\n break;\r\n case 2:\r\n System.out.println(\"Es falso\");\r\n break;\r\n default:\r\n System.out.println(\"No es ninguna\");\r\n \r\n //Uso de la lista de un item en especifico \r\n System.out.println(\"Nombre: \" + perros.get(2).getNombre());//El número del get\r\n System.out.println(\"Color: \"+perros.get(2).getColor());//define que item es que tomará\r\n System.out.println(\"Raza: \"+perros.get(2).getRaza());\r\n \r\n \r\n //Demostración del uso de getters\r\n System.out.println(\"Nombre: \");\r\n System.out.println(\"Altura: \" + persona.getAltura());\r\n System.out.println(\"Color: \" + persona.getColorPiel());\r\n System.out.println(\"Edad: \"+persona.getEdad());\r\n System.out.println(\"Genero: \"+persona.getGenero());\r\n System.out.println(\"Nacionalidad: \"+persona.getNacionalidad());\r\n System.out.println(\"Peso: \"+persona.getPeso());\r\n System.out.println(\"Tipo de Pelo: \"+persona.getTipoDePelo());\r\n \r\n }\r\n \r\n}", "public List<Person> createPerson() throws ParseException {\n\t\tList<Person> lespersons = new ArrayList<Person>();\n\t\tint numOfPersons = manager.createQuery(\"Select p From Person p\", Person.class).getResultList().size();\n\n if (numOfPersons == 0) {\n \tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tPerson p1 = new Person(\"dupont\", \"paul\", \"paul.dupont@gg.fr\", \"M\", \"http://\", simpleDateFormat.parse(\"06/12/1965\"));\n \tPerson p2 = new Person(\"durand\", \"gerard\", \"gerard.durand@gg.fr\", \"F\", \"http://\", simpleDateFormat.parse(\"06/04/1965\"));\n \tPerson p3 = new Person(\"Pierre\", \"martin\", \"pierre.martin@gg.fr\", \"M\", \"http://\", simpleDateFormat.parse(\"06/08/1965\"));\n \tp1.getListAmis().add(p2);\n \tp2.getListAmis().add(p1);\n \tp2.getListAmis().add(p3);\n manager.persist(p1);\n manager.persist(p2);\n manager.persist(p3);\n lespersons.add(p1);\n lespersons.add(p2);\n lespersons.add(p3);\n }\n return lespersons;\n\t}", "public Persona(){\n /*super(nombresPosibles\n [r.nextInt(nombresPosibles.length)],(byte)r.nextInt(101));\n */\n super(\"Anónimo\",(byte)5);\n String[] nombresPosibles={\"Patracio\",\"Eusequio\",\"Bartolo\",\"Mortadelo\",\"Piorroncho\",\"Tiburcio\"};\n String[] apellidosPosibles={\"Sánchez\",\"López\",\"Martínez\",\"González\",\"Páramos\",\"Jiménez\",\"Parra\"};\n String[] nacionalidadesPosibles={\"Española\",\"Francesa\",\"Alemana\",\"Irlandesa\",\"Japonesa\",\"Congoleña\",\"Bielorrusa\",\"Mauritana\"};\n Random r=new Random();\n this.apellido=apellidosPosibles\n [r.nextInt(apellidosPosibles.length)];\n this.nacionalidad=nacionalidadesPosibles\n [r.nextInt(nacionalidadesPosibles.length)];\n mascota=new Mascota[5];\n this.saldo=r.nextInt(101);\n }", "public CompositePersonne() {\n\t\tthis.nomGroupe = \" \";\n\t\tthis.personnel = new ArrayList<InterfacePersonne>();\n\n\t}", "public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }", "public Persona(String nombre) {\n this.nombre = nombre;\n }", "@Override\n\tpublic void emprestimo(Livros livro, Aluno usuario) {\n\t\t\n\t}", "public void addPerson(Person p);", "@Override\r\n\tpublic void cargarSubMenuPersona() {\n\t\t\r\n\t}", "public static boolean verificarExistenciaPersona(Personas persona)\n {\n //Este método permite verificar si el usuario a crear es vendedor, comprador o ninguno. Validacion en el main y para el metodo que agrega los tipo de usuario\n ArrayList<Personas> personas = Personas.desserializarPersonas(\"Personas.ser\");\n for(Personas pe: personas)\n {\n if(pe.getCorreoElectronico().equals(persona.getCorreoElectronico()) && pe.getTipo().equals(pe.getTipo()) ) \n \n return true;\n }\n return false;\n }", "public static LinkedList<Person> allFemalePerson() {\n LinkedList<Person> femaleList = new LinkedList<>();\n femaleList.add(ALICE);\n femaleList.add(ELLE);\n femaleList.add(FIONA);\n return femaleList;\n }", "void cargarDatos(Persona beanTabla) {\n this.oPersona = beanTabla;\n oFondoSolidaridad = new FondoSolidaridad();\n\n if (oPersona != null) {\n oBlFondoPrevision = new FondoPrevisionBl();\n listFondos = oBlFondoPrevision.listar(oPersona.getIdpersona());\n oFondoSolidaridad.setPersona(oPersona);\n if (listFondos.isEmpty()) {\n JOptionPane.showMessageDialog(null, \"La persona no tiene fondos\", \"ATENCION\", JOptionPane.ERROR_MESSAGE);\n } else {\n for (FondoSolidaridad obj : listFondos) {\n oModeloFondoPrevision.add(obj);\n }\n\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Verifique sus datos\", \"ATENCION\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n\tpublic void visit(final GrandPa person) {\n\t\t\n\t}", "public interface IPersonagem {\n void PopulaPersonagens(ArrayList<ModelPersonagem> arrayPersonagens);\n\n}", "@Override\n\tpublic void estourada(Participante p) {\n\t\t\n\t}", "@Override\n\tpublic void visit(final Aunt person) {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo(Livros livro, Usuarios usuario) {\n\t\t\n\t}", "private void actualizarNombre(Persona persona){\n \n String nombre=IO_ES.leerCadena(\"Inserte el nombre\");\n persona.setNombre(nombre);\n }", "public static void main(String[] args) {\n Ator a = new Ator(\"Alberto\");\r\n Ator b = new Ator(\"Vagner moura\");\r\n Ator c = new Ator(\"Ator 1\");\r\n\r\n Filme f= new Filme(\"Tropa de elite\", 2011);\r\n\r\n f.addPapel(a,\"papel 1\", false);\r\n f.addPapel(b,\"papel 2\", true);\r\n f.addPapel(c,\"papel 3\", true);\r\n\r\n\r\n System.out.println(a.getFilmes());\r\n /*System.out.println(f.getProtagonista());\r\n System.out.println(f);\r\n System.out.println(a);\r\n System.out.println(b);\r\n System.out.println(c);*/\r\n\r\n\r\n }", "public void setFamiliaElemento(FamiliaElementoJsonDTO familiaElemento) {\r\n\t\tthis.familiaElemento = familiaElemento;\r\n\t}", "public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\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}", "public void addPerson(Person2 p){\n\t\tint index = 0;\r\n\t\tpersons = new Person2[50];\r\n\t\t\r\n\t\tfor(int i = 0; i < persons.length; i++){\r\n\t\t\tif(persons[i] == null){ // location available\r\n\t\t\t\tindex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(index < persons.length){\r\n\t\t\tpersons[index] = p;\r\n\t\t}\r\n\t}", "public void registrarVenta(String fruta, String proteina, String grano, String almidon) {\n if(!this.sePuedePreparar(fruta, proteina, grano, almidon)) {\n throw new RuntimeException(\"Ingredientes insuficientes\");\n }\n \n Almuerzo almuerzo = new Almuerzo(this, fruta, proteina, grano, almidon);\n almuerzo.registrarVenta();\n }", "public static void personTest(){\n ArrayList<Person> people = new ArrayList<>();\n //people[0] = new Person(\"Fer\", \"Mendoza\", true);\n people.add(new Person(\"Fer\", \"Mendoza\", true));\n people.add(new Person(\"Stacy\", \"Malibu\", false));\n people.add(new Person(\"Ana\", \"Morton\", true));\n\n for (Person person : people) {\n System.out.println(\"person.getFullName() = \" + person.getFullName());\n }\n\n }", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "public static void fareDTOadd() {\n\t\tint count = peopleList.size(); // projectList.size()이걸 변수로 저장해서 쓰면 projectList.size()를 쓸 때마다 계속 속도가 느려진다.\n\t\tfor (int i = 0; i < count; i++) { // index 값으로 어느 부분에서 프로젝트 네임 인지확인하고\n\t\t\tpeopleFare.add(\n\t\t\t\t\tnew FareDTO(peopleList.get(i).getYear(), \n\t\t\t\t\t\t\t1.250* peopleList.get(i).getTotalSenior(), \n\t\t\t\t\t\t\t1.000* peopleList.get(i).getTotalSenior() ,\n\t\t\t\t\t\t\t 0.675* peopleList.get(i).getTotalSenior(),\n\t\t\t\t\t\t\t0.375* peopleList.get(i).getTotalSenior()) );\n\n\t\t}\n\n\t}", "@Override\n public void reset() {\n // Crea instancia y define el tipo del personaje.\n this.personaje = new Personaje();\n this.personaje.setTipo(\"Agua\");\n }", "@Override\n\tpublic void addPerson(User pUser) {\n\t\t\n\t}", "private void agregarFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "private void addPersonnageToGame() throws PersonnageOnMultipleJoueurException {\n\t\t\n\t\t// liste de personnage venant d'un joueur\n\t\tList<Personnage> listePersonnageFromJoueur;\n\t\t\n\t\t// liste venant de TurnManager, qui représente la totalité des personnages\n\t\tList<Personnage> listePersonnageFromTurnManager = this.getListePersonnage();\n\t\t\n\t\tIterator<Joueur> iteratorOverListeJoueur = this.getListeJoueur().iterator();\n\t\tIterator<Personnage> iteratorOverListePersonnage;\n\t\n\t\tPersonnage personnage;\n\t\n\t\t// on boucle sur la liste de joueurs\n\t\twhile(iteratorOverListeJoueur.hasNext()){\n\t\t\t\n\t\t\t// on récupère la liste des personnages du joueur suivant\n\t\t\tlistePersonnageFromJoueur = iteratorOverListeJoueur.next().getListePersonnage();\n\t\t\titeratorOverListePersonnage = listePersonnageFromJoueur.iterator();\n\t\t\t\n\t\t\t// on boucle sur la liste de personnages du joueur\n\t\t\twhile(iteratorOverListePersonnage.hasNext()){\n\t\t\t\t\n\t\t\t\t// on récupère le personnage suivant\n\t\t\t\tpersonnage = iteratorOverListePersonnage.next();\n\t\t\t\t\n\t\t\t\t// si le personnage n'existe pas on l'ajoute dans la liste\n\t\t\t\tif(!listePersonnageFromTurnManager.contains(personnage)){\n\t\t\t\t\tlistePersonnageFromTurnManager.add(personnage);\n\t\t\t\t}\n\t\t\t\t// si il existe déjà, il y a une erreur\n\t\t\t\telse {\n\t\t\t\t\tthrow new PersonnageOnMultipleJoueurException();\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Persona() {\n \t\n }", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "public static void main(String[] args) {\n \n PersonaIMC persona1 = new PersonaIMC();\n \n \n /* PersonaIMC persona2 = new PersonaIMC(nombre, edad, sexo);\n PersonaIMC persona3 = new PersonaIMC(nombre, edad, sexo, peso, altura);\n \n persona1.setNombre(\"Luisa\");\n persona1.setEdad(28);\n persona1.setSexo('F');\n persona1.setPeso(60);\n persona1.setAltura(1.8);\n \n persona2.setPeso(80.5);\n persona2.setAltura(1.75);\n \n System.out.println(\"Persona 1\");\n muestraMensajePeso(persona1);\n muestraMayorDeEdad(persona1);\n System.out.println(persona1.toString());\n \n System.out.println(\"Persona 2\");\n muestraMensajePeso(persona2);\n muestraMayorDeEdad(persona2);\n System.out.println(persona2.toString());\n \n System.out.println(\"Persona 3\");\n muestraMensajePeso(persona3);\n muestraMayorDeEdad(persona3);\n System.out.println(persona3.toString());*/\n }", "public Persona(String nombre) {\n\t\tthis.nombre = nombre;\n\t}", "private PersonaEnvio buscaPersonaPorNombre(PersonaEnvio personaRequest) throws NotariaException{\n\t\tPersonaEnvio respuesta = new PersonaEnvio();\n\t\tString nombrePersona = personaRequest.getNombrePersona().replaceAll(\"\\\\s+\", \" \").trim();\n\t\tList<DatoBusquedaPersona> lista = personaBo.findPersonaByName(nombrePersona);\n\t\tif (lista != null) {\n\t\t\trespuesta.setResultados(new ArrayList<DatoBusquedaPersona>(\n\t\t\t\t\tlista));\n\t\t\trespuesta.setNumeroResultados(lista.size());\n\t\t\trespuesta.setEstatus(\"Búsqueda correcta.\");\n\t\t\trespuesta.setExito(true);\n\t\t\treturn respuesta;\n\t\t} else {\n\t\t\trespuesta.setResultados(null);\n\t\t\trespuesta.setNumeroResultados(0);\n\t\t\trespuesta.setEstatus(\"No se encontraron resultados.\");\n\t\t\trespuesta.setExito(false);\n\t\t\treturn respuesta;\n\t\t}\n\t}", "@Override\r\n /**\r\n * *\r\n *Primero revisa si los apellidos con iguales, en el caso de que sean iguales\r\n *entra al if y compara por nombres, de lo contrario nunca entra al if y \r\n * compara normalmente por apellido\r\n * \r\n */ \r\n public void ordenarPersonas (){\r\n Comparator<Persona> comparacionPersona= (Persona persona1,Persona persona2)->{\r\n \r\n if(persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos())==0){\r\n return persona1.getNombres().compareToIgnoreCase(persona2.getNombres());}\r\n return persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos());\r\n }; \r\n\r\n listaPersona.sort(comparacionPersona);\r\n }", "public Integer solo_guardarPaPersona(PaPersona paPersona) throws Exception;", "public Persona()\n\t{\n\t\tnombre = \"--\"; //DEFINES POR DEFAULT LAS VARIABLES;\n\t\tapellido = \"--\"; //DEFINES POR DEFAULT LAS VARIABLES;\n\t\tedad = 0; //DEFINES POR DEFAULT LAS VARIABLES;\n\t\talias = \"--\"; //DEFINES POR DEFAULT LAS VARIABLES;\t\t\n\t}", "@Override\n\tpublic void crearPoblacion() {\n\t\tif(this.terminales == null || this.funciones == null) {\n\t\t\tSystem.out.println(\"Error. Los terminales y las funciones tienen que estar inicializados\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tpoblacion = new ArrayList<>();\n\t\tfor(int i = 0; i < this.numIndividuos; i++) {\n\t\t\tIndividuo ind = new Individuo();\n\t\t\tind.crearIndividuoAleatorio(this.profundidad, this.terminales, this.funciones);\n\t\t\tthis.poblacion.add(ind);\n\t\t}\n\t}", "public Persona() {\n }", "public Persona() { // constructor sin parámetros\r\n\t\t\r\n\t\tthis.nif = \"44882229Y\";\r\n\t\tthis.nombre=\"Anonimo\";\r\n\t\tthis.sexo = 'F';\r\n\t\tthis.fecha = LocalDate.now();\r\n\t\tthis.altura = 180;\r\n\t\tthis.madre = null;\r\n\t\tthis.padre = null;\r\n\t\tcontador++;\r\n\t}", "public void agregarListHijos(Persona hijo){\n Persona ite;\n\n if(hijos_Ambos.nextHijo==null && used==true){\n hijos_Ambos.nextHijo = hijo;\n\n }else{\n ite=hijos_Ambos.nextHijo;\n while(ite.nextHijo!=null){\n ite=ite.nextHijo;\n }\n ite.nextHijo=hijo;\n } \n\n }", "@Override\n\tpublic List<?> infoObraRecursoPersona(ObraRecursoPersonaDTO dto) {\n\t\treturn null;\n\t}", "public boolean NuevoAfiliado(String nombrePersona, String numeroDui) {\n if (!Afiliados.contains(nombrePersona)) { //Verificar que sta persona no este agregada.\n //Agregar nuevo afiliado.\n Afiliados.add(nombrePersona);\n FechaAfiliacion.add(ObtenerFechaActual());\n NumeroDui.add(numeroDui);\n return true;\n }\n return false;\n }", "void lookupAndSaveNewPerson();", "public Persona(int idPersona, String nombre, String apellido, String email, String telefono){\n this.idPersona = idPersona;\n this.nombre = nombre;\n this.apellido = apellido;\n this.email = email;\n this.telefono = telefono;\n \n }", "@RequestMapping(value = \"/AgregarPersona\", method = RequestMethod.GET)\n\tpublic ModelAndView AgregarPersona() {\n\t\t//prepara para generar nuevo registro de persona\n\t\tmav.addObject(new Persona());\n\t\tmav.setViewName(\"agregarPersona\");\n\t\treturn mav;\n\t}", "public void nyPerson() {\r\n System.out.println(\"Skriv inn navnet paa personen\");\r\n String person = scan.nextLine().toLowerCase();\r\n if (!personListe.containsKey(person)) {\r\n personListe.put(person, new Person(person));\r\n }\r\n else {\r\n System.out.println(\"Denne personen finnes alt!\");\r\n }\r\n }", "public void crescitaPecorelle(InterfacciaPartitaUtente interfaccia) {\n\t\tfor (int i = 0; i < pecore.size(); i++) {\n\t\t\tAgnello pecoraConsiderata = pecore.get(i);\n\t\t\tif (pecoraConsiderata != null && pecoraConsiderata.crescita()) {\n\t\t\t\tpecore.remove(pecoraConsiderata);\n\t\t\t\tnumeroAgelli--;\n\t\t\t\tpecoraConsiderata = new PecoraAdulta();\n\t\t\t\tposizionaPecora(pecoraConsiderata);\n\t\t\t\tinterfaccia.crescitaAgnello(this, pecoraConsiderata.getTipo());\n\t\t\t}\n\t\t}\n\t}", "List<Persona> obtenerTodasLasPersona();", "@Override\n public void buildPersonalidad() {\n this.personaje.setPersonalidad(\"Pacientes y estrategas.\");\n }", "public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }", "public void registaAposta (Aposta a){\n this.listaApostas.add(a);\n }", "public Persona buscarPersona(String cedula) {\n\t\treturn null;\r\n\t}", "public void FaltaJugador(Falta Fa,Jugador Player,int Cometida,int Tarjeta, Chronometer Cronometro){\n Faltas.add(new FaltaPartido(Fa,Player.getIdJugador(),Cometida,Tarjeta,Cronometro.getTime()));\n PartidoCanchaActivity.ACCION_PRINCIPAL = null;\n PartidoCanchaActivity.ENVIA_PASE = null;\n }", "public Persona(int idPersona){\n this.idPersona = idPersona;\n }", "public Artefato() {\r\n\t\tthis.membros = new ArrayList<Membro>();\r\n\t\tthis.servicos = new ArrayList<IServico>();\r\n\t}", "public Persona(String nombre, String apellido, String email, String telefono){\n this.nombre = nombre;\n this.apellido = apellido;\n this.email = email;\n this.telefono = telefono;\n }", "public void eliminarPersonaje(Personaje p) {\n this.listaPersonajes.remove(p);\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }", "void setLsPersonne(ArrayList<Personne> l) {\n this.lsPersonne = l;\n }", "public List<Home> createHome(Person p) {\n \tList<Home> lesresidences = new ArrayList<Home>();\n\t\tint numOfHome = manager.createQuery(\"Select p From Home p\", Home.class).getResultList().size();\n\n if (numOfHome == 0) {\n \tHome h1 = new Home(12, 120, \"5 rue des roses, Rennes\", \"10.10.10.10\");\n \tHome h2 = new Home(5, 120, \"3 rue des camélias, Rennes\", \"10.0.0.0\");\n \tp.getResidences().add(h1);\n \th1.setPerson(p);\n \tp.getResidences().add(h2);\n \th2.setPerson(p);\n manager.persist(h1);\n manager.persist(h2);\n lesresidences.add(h1);\n lesresidences.add(h2);\n }\n\t\treturn lesresidences;\n\t}", "public void crearAtracciones(){\n \n //Añado atracciones tipo A\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new A();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo B\n for (int i = 0; i < 6 ; i++){\n Atraccion atraccion = new B();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo C\n for (int i = 0; i < 4 ; i++){\n Atraccion atraccion = new C();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo D\n for (int i = 0; i < 3 ; i++){\n Atraccion atraccion = new D();\n atracciones.add(atraccion);\n }\n //Añado atracciones tipo E\n for (int i = 0; i < 7 ; i++){\n Atraccion atraccion = new E();\n atracciones.add(atraccion);\n }\n \n }", "public List<Persona> todasLasPersonas(){\n\n Iterable<Persona> ite=repo.findAll();\n Iterator<Persona> it=ite.iterator();\n List<Persona> actualList = new ArrayList<Persona>();\n while (it.hasNext()) {\n actualList.add(it.next());\n }\n\n return actualList;\n }", "@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}", "public void agregarAlFinal(T v){\n\t\tNodo<T> nuevo = new Nodo<T>();\r\n\t\tnuevo.setInfo(v);\r\n\t\tnuevo.setRef(null);\r\n\t\t\r\n\t\t//si la lista aun no tiene elementos\r\n\t\tif(p == null){\r\n\t\t\t//el nuevo nodo sera el primero\r\n\t\t\tp=nuevo;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//retorno la lista hasta que aux apunte al ultimo nodo\r\n\t\tNodo<T> aux;\r\n\t\tfor(aux=p; aux.getRef() != null; aux=aux.getRef()){\r\n\t\t\t//enlazo el nuevo nodo como el siguiente del ultimo\r\n\t\t\taux.setRef(nuevo);\r\n\t\t}\r\n\t\t\r\n\t}", "public void addPropuesta( Persona persona, Propuesta propuesta ) throws Exception \n\t{\n\n\t\tDAOPersona dao = new DAOPersona();\n\t\ttry\n\t\t{\n\t\t\tthis.conn = darConexion();\n\t\t\tdao.setConn(conn);\n\n\t\t\tdao.addPropuesta(persona, propuesta);\n\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}", "@Override\n\tpublic void parada(Participante p) {\n\t\t\n\t}", "@Override\r\n public void mostrarAlumnos(){\n for(Persona i: listaPersona){\r\n if(i instanceof Alumno){\r\n i.mostrar();\r\n }\r\n }\r\n }", "public Persona() {\n\t}", "public abstract Anuncio creaAnuncioIndividualizado();" ]
[ "0.6614397", "0.6469358", "0.62825197", "0.6124864", "0.60695696", "0.6048261", "0.6012756", "0.58603793", "0.5818905", "0.58096045", "0.57984394", "0.57978284", "0.57364464", "0.56506985", "0.56453794", "0.564317", "0.559735", "0.55700237", "0.555343", "0.551808", "0.5508982", "0.5495052", "0.5495052", "0.54754245", "0.54736197", "0.5471549", "0.54711705", "0.54705936", "0.54683906", "0.54491585", "0.5448137", "0.5427967", "0.5421924", "0.54091465", "0.54075915", "0.539685", "0.5372841", "0.53681225", "0.53639185", "0.53571045", "0.5356764", "0.53510475", "0.5331409", "0.53239954", "0.53134894", "0.5306498", "0.52994287", "0.52967584", "0.52889687", "0.52877957", "0.52856576", "0.52843654", "0.5280984", "0.52729213", "0.52703714", "0.5269556", "0.5263362", "0.52631193", "0.5260494", "0.5254633", "0.52469087", "0.5230279", "0.52140063", "0.52085143", "0.5205764", "0.51978666", "0.5187656", "0.5186103", "0.51846075", "0.51788944", "0.51749605", "0.51715815", "0.51689154", "0.51612264", "0.516074", "0.51603794", "0.5157641", "0.51536906", "0.51492363", "0.51433825", "0.51405776", "0.51401037", "0.51356775", "0.51336205", "0.51326025", "0.51307094", "0.51216155", "0.5111108", "0.5109161", "0.51064646", "0.51043564", "0.5103002", "0.51001763", "0.509614", "0.50941974", "0.5089377", "0.508675", "0.50835085", "0.5082764", "0.5082194" ]
0.508376
97
Metodo que recibe un objeto de tipo persona y lo agrega al final de la lista de hijos.
public void agregarListHijos(Persona hijo){ Persona ite; if(hijos_Ambos.nextHijo==null && used==true){ hijos_Ambos.nextHijo = hijo; }else{ ite=hijos_Ambos.nextHijo; while(ite.nextHijo!=null){ ite=ite.nextHijo; } ite.nextHijo=hijo; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void crearNuevaPersona(Persona persona);", "static public void addPersona(Persona c) { //metodo para añadir a lista y actualizar la lista en tiempo real\r\n listaPersona.add(c);\r\n listaG.setListaGrafica();\r\n \r\n \r\n \r\n }", "private void muestraPersona(JSONArray genero) {\n\tJSONArray a = (JSONArray) genero.get(0);\n\t// txtId.setText(Long.toString( (Long) a.get(0)) );\n\t//txtBuscar.setText((String) a.get(1));\n\t// textFecha.setText((String) a.get(2));\n\t// textUsu.setText((String) a.get(4));\n\tcodTemporal = a.get(0).toString();\n\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public static void main(String[] args) {\n\t\t\r\n\tString nombre = leerTexto(\"Ingrese un nombre:\");\r\n\tint edad = leerNumero(\"Ingrese su edad:\");\r\n\tString rut = leerTexto(\"Ingresa el RUT:\");\r\n\tchar genero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tfloat peso = leerNumero(\"Ingrese peso:\");\r\n\tfloat altura = leerNumero(\"Ingrese la altura:\");\r\n\tPersona claudia = new Persona(nombre, rut, edad, genero, peso, altura);\r\n\t\r\n\tnombre = leerTexto(\"Ingrese un nombre:\");\r\n\tedad = leerNumero(\"Ingrese su edad:\");\r\n\trut = leerTexto(\"Ingresa el RUT:\");\r\n\tgenero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tPersona juliano = new Persona(nombre, rut, edad, genero);\r\n\t\r\n\tPersona noelia = new Persona();\r\n\tnoelia.setNombre(leerTexto(\"Ingresa un nombre\"));\r\n\tnoelia.setEdad(leerNumero(\"Ingresa la edad\"));\r\n\tnoelia.setRut(leerTexto(\"Ingresa el RUT\"));\r\n\tnoelia.setGenero(leerTexto(\"Ingresa el genero\").charAt(0));\r\n\tnoelia.setAltura(leerNumero(\"Ingresa la altura\"));\r\n\tnoelia.setPeso(leerNumero(\"Ingresa el peso\"));\r\n\t\r\n\tPersona[] perso = new Persona[3];\r\n\tperso[0] = claudia;\r\n\tperso[1] = juliano;\r\n\tperso[2] = noelia;\r\n\t\r\n\tfor (Persona persona : perso) {\r\n\t\tif (persona.calcularIMC()==Persona.PESO_BAJO) {\r\n\t\t\tescribir(\"Pongale sus buenas cazuelas\");\r\n\t\t}else {\r\n\t\t\tif (persona.calcularIMC()==Persona.PESO_IDEAL) {\r\n\t\t\t\tescribir(\"Estamos tiki taka\");\r\n\t\t\t}else {\r\n\t\t\t\tescribir(\"Menos coffe break!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Mayor de edad\r\n\t\tescribir(\"La persona \" + persona.getNombre() + \" es mayor de edad? \" + persona.esMayorDeEdad());\r\n\t\t//Mostrar el toString()\r\n\t\tescribir(persona.toString());\r\n\t }\r\n\t}", "public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main (String[] args){\n Empleado[] listaEmpleados = new Empleado[10];\n \n //Asignamos objetos a cada posición\n listaEmpleados[0] = new Empleado(\"Manuel\", \"30965835V\");\n listaEmpleados[1] = new Empleado(\"Miguel\", \"30965835V\");\n listaEmpleados[2] = new Empleado(\"Pedro\", \"30965835V\");\n listaEmpleados[3] = new Empleado(\"Samuel\", \"30965835V\");\n listaEmpleados[4] = new Empleado(\"Vanesa\", \"30965835V\");\n listaEmpleados[5] = new Empleado(\"Alberto\", \"30965835V\");\n listaEmpleados[6] = new Empleado(\"Roberto\", \"30965835V\");\n listaEmpleados[7] = new Empleado(\"Carlos\", \"30965835V\");\n listaEmpleados[8] = new Empleado(\"Ernesto\", \"30965835V\");\n listaEmpleados[9] = new Empleado(\"Javier\", \"30965835V\");\n\n /*Empleado[] empleados = {\n empleado1, empleado2, empleado3, null,null,null, null,\n null,null,null\n }*/\n \n //Imprimimos el array sin ordenar\n imprimeArrayPersona(listaEmpleados);\n \n //Creamos el objeto de la empresa\n Empresa empresa0 = new Empresa(\"Indra\", listaEmpleados);\n \n //Usamos la clase array para ordenar el array de mayor a menos\n Arrays.sort(listaEmpleados);\n\n //Imprimimos de nuevo el array\n imprimeArrayPersona(listaEmpleados);\n \n //Imprimimos la empresa\n System.out.println(empresa0);\n \n //Guardamos en un string la lista de nombres de un objeto empresa\n String listado = Empresa.listaEmpleado(empresa0.empleado).toString();\n \n System.out.println(listado);//Imprimimos el listado como un string\n \n //Imprimimos el array de los nombres de los empleados de la empresa\n System.out.println(Arrays.toString(Empresa.listaEmpleadoArray(listado)));\n \n //Método que imprime los empleados de una empresa separados por comas\n Empresa.listaEmpleado(listado);\n \n /*Empresa[] listaEmpresa = new Empresa[4];\n \n listaEmpresa[0] = new Empresa(\"Intel\", listaEmpleados);\n listaEmpresa[1] = new Empresa(\"AMD\", listaEmpleados);\n listaEmpresa[2] = new Empresa(\"Asus\", listaEmpleados);\n listaEmpresa[3] = new Empresa(\"Shaphire\", listaEmpleados);\n System.out.println(Arrays.toString(listaEmpresa));\n Arrays.sort(listaEmpresa);\n System.out.println(Arrays.toString(listaEmpresa));*/\n \n \n }", "public void agregarAlFinal(T v){\n\t\tNodo<T> nuevo = new Nodo<T>();\r\n\t\tnuevo.setInfo(v);\r\n\t\tnuevo.setRef(null);\r\n\t\t\r\n\t\t//si la lista aun no tiene elementos\r\n\t\tif(p == null){\r\n\t\t\t//el nuevo nodo sera el primero\r\n\t\t\tp=nuevo;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//retorno la lista hasta que aux apunte al ultimo nodo\r\n\t\tNodo<T> aux;\r\n\t\tfor(aux=p; aux.getRef() != null; aux=aux.getRef()){\r\n\t\t\t//enlazo el nuevo nodo como el siguiente del ultimo\r\n\t\t\taux.setRef(nuevo);\r\n\t\t}\r\n\t\t\r\n\t}", "private void reposicionarPersonajes() {\n // TODO implement here\n }", "@Override public void realizarCobro(Persona persona){\n\tpersona.cuenta.retiro(120);\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 static void main(String args[]){\n int x = 10;\r\n List<Perro> perros = new ArrayList();\r\n \r\n Perro perro=new Perro();\r\n \r\n Persona persona = new Persona();\r\n persona.setAltura(5.5);\r\n persona.setColorPiel(\"Blanca\");\r\n persona.setEdad(16);\r\n persona.setGenero('f');\r\n persona.setNacionalidad(\"Japonesa\");\r\n persona.setPeso(130);\r\n persona.setTipoDePelo(\"Lacio\"); \r\n persona.setOcupacion(\"Dinero\");\r\n \r\n //Se dan todas las características\r\n perro.setNombre(\"Manuel\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);//Se añade a la instancia\r\n \r\n perro = new Perro();//Se limpia y se vuelve a llamar la instancia\r\n perro.setNombre(\"Igor\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Golden\");\r\n perro.setTipoDePelo(\"Lacio\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n \r\n perro = new Perro();\r\n perro.setNombre(\"Luli\");\r\n perro.setColor(\"Negro\");\r\n perro.setTamano(10.2);\r\n perro.setRaza(\"Siberiano\");\r\n perro.setTipoDePelo(\"Crespo\");\r\n perro.setAdoptado(false);\r\n perro.setGenero('H');\r\n \r\n perros.add(perro);\r\n //****************CUANDO EJECUTES ESTO VE COMENTADO LOS BLOQUES QUE NO QUIERES QUE SE USEN*************\r\n //foreach y for hace la misma funcion\r\n //Uso de for\r\n for (Perro perro1:perros){\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo());\r\n }\r\n \r\n //Formas de uso del for each\r\n perros.forEach(perro1->\r\n System.out.println(perro1.getNombre()));\r\n \r\n perros.forEach(perro1 ->{//Se define una variable que es perro1 y esta recorrera toda la lista\r\n System.out.println(perro1.getNombre());\r\n System.out.println(perro1.getColor());\r\n System.out.println(perro1.getTamano());\r\n System.out.println(perro1.getRaza());\r\n System.out.println(perro1.getTipoDePelo()); \r\n System.out.println();\r\n \r\n });\r\n \r\n \r\n System.out.println(\"Blanco\".equals(perro.color)? \"Si es blanco\":\"No es blanco\");\r\n \r\n //Uso del if\r\n if (((4/2==0)&&(10/5 !=0))||(100/20==0)){\r\n System.out.println(\"Es bisiesto\");\r\n }else{\r\n System.out.println(\"No es bisiesto\");\r\n }\r\n \r\n //Uso del switcH\r\n switch(x){\r\n case 6:\r\n System.out.println(\"Es verdadero\");\r\n break;\r\n case 2:\r\n System.out.println(\"Es falso\");\r\n break;\r\n default:\r\n System.out.println(\"No es ninguna\");\r\n \r\n //Uso de la lista de un item en especifico \r\n System.out.println(\"Nombre: \" + perros.get(2).getNombre());//El número del get\r\n System.out.println(\"Color: \"+perros.get(2).getColor());//define que item es que tomará\r\n System.out.println(\"Raza: \"+perros.get(2).getRaza());\r\n \r\n \r\n //Demostración del uso de getters\r\n System.out.println(\"Nombre: \");\r\n System.out.println(\"Altura: \" + persona.getAltura());\r\n System.out.println(\"Color: \" + persona.getColorPiel());\r\n System.out.println(\"Edad: \"+persona.getEdad());\r\n System.out.println(\"Genero: \"+persona.getGenero());\r\n System.out.println(\"Nacionalidad: \"+persona.getNacionalidad());\r\n System.out.println(\"Peso: \"+persona.getPeso());\r\n System.out.println(\"Tipo de Pelo: \"+persona.getTipoDePelo());\r\n \r\n }\r\n \r\n}", "public void add(Person person) {\n\t\tteilnehmerListe.add(person);\n\t}", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public Afiliado(String nombrePersona, String apellidoPersona, String duiPersona) {\n //Inicializar Miembros de clase.\n Afiliados = new ArrayList<>();\n NumeroDui = new ArrayList<>();\n FechaAfiliacion = new ArrayList<>();\n //Agregar valores a los arraylist.\n Afiliados.add(nombrePersona + \" \" + apellidoPersona);\n NumeroDui.add(duiPersona);\n FechaAfiliacion.add(ObtenerFechaActual());\n }", "public void restartPersonajes() {\n this.listaPersonajes = new ArrayList<Personaje>();\n }", "private void validarObligaciones(TituloPropiedad pTitulo, Persona pPersonaAnterior, Persona pPersonaNueva) {\n\t\tList<ObligacionRfr> locListaObligacionesParcela = Criterio.getInstance(entityManager, DocHabEspecializadoRfr.class)\n\t\t\t\t.add(Restriccion.IGUAL(\"parcela\", ((TituloPropiedadParcelario) pTitulo).getParcela())).setProyeccion(Proyeccion.PROP(\"obligacion\")).list();\n\t\tif(!locListaObligacionesParcela.isEmpty()) {\n\t\t\t// ID = 0 significa que es una persona temporal, usada en la\n\t\t\t// migración, y no debería generar actualización de deudas,\n\t\t\t// solo cambiar el titular.\n\t\t\t// if (pPersonaAnterior.getIdPersona() == 0) {\n\t\t\tfor(ObligacionRfr cadaObligacion : locListaObligacionesParcela) {\n\t\t\t\tcadaObligacion.setPersona(pPersonaNueva);\n\t\t\t}\n\t\t\t// }\n\t\t}\n\t}", "public List<Home> createHome(Person p) {\n \tList<Home> lesresidences = new ArrayList<Home>();\n\t\tint numOfHome = manager.createQuery(\"Select p From Home p\", Home.class).getResultList().size();\n\n if (numOfHome == 0) {\n \tHome h1 = new Home(12, 120, \"5 rue des roses, Rennes\", \"10.10.10.10\");\n \tHome h2 = new Home(5, 120, \"3 rue des camélias, Rennes\", \"10.0.0.0\");\n \tp.getResidences().add(h1);\n \th1.setPerson(p);\n \tp.getResidences().add(h2);\n \th2.setPerson(p);\n manager.persist(h1);\n manager.persist(h2);\n lesresidences.add(h1);\n lesresidences.add(h2);\n }\n\t\treturn lesresidences;\n\t}", "List<Persona> obtenerTodasLasPersona();", "public Persona() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "@Override\n public void reset() {\n // Crea instancia y define el tipo del personaje.\n this.personaje = new Personaje();\n this.personaje.setTipo(\"Agua\");\n }", "public Persona() { // constructor sin parámetros\r\n\t\t\r\n\t\tthis.nif = \"44882229Y\";\r\n\t\tthis.nombre=\"Anonimo\";\r\n\t\tthis.sexo = 'F';\r\n\t\tthis.fecha = LocalDate.now();\r\n\t\tthis.altura = 180;\r\n\t\tthis.madre = null;\r\n\t\tthis.padre = null;\r\n\t\tcontador++;\r\n\t}", "public void addPerson(Person2 p){\n\t\tint index = 0;\r\n\t\tpersons = new Person2[50];\r\n\t\t\r\n\t\tfor(int i = 0; i < persons.length; i++){\r\n\t\t\tif(persons[i] == null){ // location available\r\n\t\t\t\tindex = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(index < persons.length){\r\n\t\t\tpersons[index] = p;\r\n\t\t}\r\n\t}", "public void nyPerson() {\r\n System.out.println(\"Skriv inn navnet paa personen\");\r\n String person = scan.nextLine().toLowerCase();\r\n if (!personListe.containsKey(person)) {\r\n personListe.put(person, new Person(person));\r\n }\r\n else {\r\n System.out.println(\"Denne personen finnes alt!\");\r\n }\r\n }", "public List<Person> createPerson() throws ParseException {\n\t\tList<Person> lespersons = new ArrayList<Person>();\n\t\tint numOfPersons = manager.createQuery(\"Select p From Person p\", Person.class).getResultList().size();\n\n if (numOfPersons == 0) {\n \tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tPerson p1 = new Person(\"dupont\", \"paul\", \"paul.dupont@gg.fr\", \"M\", \"http://\", simpleDateFormat.parse(\"06/12/1965\"));\n \tPerson p2 = new Person(\"durand\", \"gerard\", \"gerard.durand@gg.fr\", \"F\", \"http://\", simpleDateFormat.parse(\"06/04/1965\"));\n \tPerson p3 = new Person(\"Pierre\", \"martin\", \"pierre.martin@gg.fr\", \"M\", \"http://\", simpleDateFormat.parse(\"06/08/1965\"));\n \tp1.getListAmis().add(p2);\n \tp2.getListAmis().add(p1);\n \tp2.getListAmis().add(p3);\n manager.persist(p1);\n manager.persist(p2);\n manager.persist(p3);\n lespersons.add(p1);\n lespersons.add(p2);\n lespersons.add(p3);\n }\n return lespersons;\n\t}", "public static boolean verificarExistenciaPersona(Personas persona)\n {\n //Este método permite verificar si el usuario a crear es vendedor, comprador o ninguno. Validacion en el main y para el metodo que agrega los tipo de usuario\n ArrayList<Personas> personas = Personas.desserializarPersonas(\"Personas.ser\");\n for(Personas pe: personas)\n {\n if(pe.getCorreoElectronico().equals(persona.getCorreoElectronico()) && pe.getTipo().equals(pe.getTipo()) ) \n \n return true;\n }\n return false;\n }", "private void actualizarNombre(Persona persona){\n \n String nombre=IO_ES.leerCadena(\"Inserte el nombre\");\n persona.setNombre(nombre);\n }", "public void mostrarPersona(){\r\n System.out.println(\"Nombre: \" + persona.getNombre());\r\n System.out.println(\"Cedula: \" + persona.getCedula());\r\n }", "@Override\r\n /**\r\n * *\r\n *Primero revisa si los apellidos con iguales, en el caso de que sean iguales\r\n *entra al if y compara por nombres, de lo contrario nunca entra al if y \r\n * compara normalmente por apellido\r\n * \r\n */ \r\n public void ordenarPersonas (){\r\n Comparator<Persona> comparacionPersona= (Persona persona1,Persona persona2)->{\r\n \r\n if(persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos())==0){\r\n return persona1.getNombres().compareToIgnoreCase(persona2.getNombres());}\r\n return persona1.getApellidos().compareToIgnoreCase(persona2.getApellidos());\r\n }; \r\n\r\n listaPersona.sort(comparacionPersona);\r\n }", "public Persona(String nombre) {\n this.nombre = nombre;\n }", "public Persona(){\n \n }", "public Persona(){\n \n }", "public void addPrimero(Object obj) {\n if (cabeza == null) { //Si la cabeza es nula, entoces se creará un nuevo nodo donde le pasaremos el valor de obj\n cabeza = new Nodo(obj);\n } else { //Si no es nula, signifa que el valor que se ingrese, pasara a ser la nueva cabeza\n Nodo temp = cabeza; //Metemos la cabeza en un nodo temporal\n Nodo nuevo = new Nodo(obj); //Creamos un nuevo nodo, que no está enlazado\n nuevo.enlazarSiguiente(temp); //Y el nuevo nodo lo enlazamos a el nodo Temp, que contenia el valor anterior de la otra cabeza\n cabeza = nuevo; //Y ahora le decimos que la cabeza sera nuevo\n }\n size++; //Cada vez que agreguemos un nuevo nodo el tamaño de nuestra lista tendra que aumentar\n }", "public Persona(){\n /*super(nombresPosibles\n [r.nextInt(nombresPosibles.length)],(byte)r.nextInt(101));\n */\n super(\"Anónimo\",(byte)5);\n String[] nombresPosibles={\"Patracio\",\"Eusequio\",\"Bartolo\",\"Mortadelo\",\"Piorroncho\",\"Tiburcio\"};\n String[] apellidosPosibles={\"Sánchez\",\"López\",\"Martínez\",\"González\",\"Páramos\",\"Jiménez\",\"Parra\"};\n String[] nacionalidadesPosibles={\"Española\",\"Francesa\",\"Alemana\",\"Irlandesa\",\"Japonesa\",\"Congoleña\",\"Bielorrusa\",\"Mauritana\"};\n Random r=new Random();\n this.apellido=apellidosPosibles\n [r.nextInt(apellidosPosibles.length)];\n this.nacionalidad=nacionalidadesPosibles\n [r.nextInt(nacionalidadesPosibles.length)];\n mascota=new Mascota[5];\n this.saldo=r.nextInt(101);\n }", "public void addPerson(Person thePerson) {\r\n staff.add(thePerson);\r\n }", "public void agregarAlFinal(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario recorre la lista hasta llegar al ultimo nodo\r\n //y agrega el nuevo.\r\n } else{\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al ultimo nodo.\r\n while(aux.getSiguiente() != null){\r\n aux = aux.getSiguiente();\r\n }\r\n // Agrega el nuevo nodo al final de la lista.\r\n aux.setSiguiente(nuevo);\r\n }\r\n // Incrementa el contador de tamaño de la lista\r\n tamanio++;\r\n }", "public void eliminarPersonaje(Personaje p) {\n this.listaPersonajes.remove(p);\n // Fijo el tipo después de eliminar el personaje\n this.setTipo();\n }", "@Override\r\n\tpublic void cargarSubMenuPersona() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n \n PersonaIMC persona1 = new PersonaIMC();\n \n \n /* PersonaIMC persona2 = new PersonaIMC(nombre, edad, sexo);\n PersonaIMC persona3 = new PersonaIMC(nombre, edad, sexo, peso, altura);\n \n persona1.setNombre(\"Luisa\");\n persona1.setEdad(28);\n persona1.setSexo('F');\n persona1.setPeso(60);\n persona1.setAltura(1.8);\n \n persona2.setPeso(80.5);\n persona2.setAltura(1.75);\n \n System.out.println(\"Persona 1\");\n muestraMensajePeso(persona1);\n muestraMayorDeEdad(persona1);\n System.out.println(persona1.toString());\n \n System.out.println(\"Persona 2\");\n muestraMensajePeso(persona2);\n muestraMayorDeEdad(persona2);\n System.out.println(persona2.toString());\n \n System.out.println(\"Persona 3\");\n muestraMensajePeso(persona3);\n muestraMayorDeEdad(persona3);\n System.out.println(persona3.toString());*/\n }", "public static void main(String[] args) {\n\t\tProfesor profesor = new Alumno();\r\n\t\tSystem.out.println(\"Profesor: \"+profesor.devolverNombre());\r\n\t\tSystem.out.println(\"Edad: \"+profesor.devolverEdad());\r\n\t\tSystem.out.println();\r\n\t\tPersona persona = new Alumno();\r\n\t\tSystem.out.println(\"Edad: \"+persona.devolverEdad());\r\n\t\tSystem.out.println(\"Nombre: \"+persona.devolverNombre());\r\n\t\t\r\n\t\tPersona persona2 = new Profesor();\r\n\t\tSystem.out.println(\"Edad: \"+persona2.devolverEdad());\r\n\t\tSystem.out.println(\"Nombre: \"+persona2.devolverNombre());\r\n\t\t\r\n\t\tArrayList<Persona> personas = new ArrayList<Persona>();\r\n\t\tpersonas.add(persona);\r\n\t\tpersonas.add(persona2);\r\n\t\t\r\n\t\tfor (Persona persona3 : personas) {\r\n\t\t\tSystem.out.println(\"ENTRO AL FOR\");\r\n\t\t\tSystem.out.println(\"Edad: \"+persona3.devolverEdad());\r\n\t\t\tSystem.out.println(\"Nombre: \"+persona3.devolverNombre());\r\n\t\t}\r\n\t}", "private void addPersonnageToGame() throws PersonnageOnMultipleJoueurException {\n\t\t\n\t\t// liste de personnage venant d'un joueur\n\t\tList<Personnage> listePersonnageFromJoueur;\n\t\t\n\t\t// liste venant de TurnManager, qui représente la totalité des personnages\n\t\tList<Personnage> listePersonnageFromTurnManager = this.getListePersonnage();\n\t\t\n\t\tIterator<Joueur> iteratorOverListeJoueur = this.getListeJoueur().iterator();\n\t\tIterator<Personnage> iteratorOverListePersonnage;\n\t\n\t\tPersonnage personnage;\n\t\n\t\t// on boucle sur la liste de joueurs\n\t\twhile(iteratorOverListeJoueur.hasNext()){\n\t\t\t\n\t\t\t// on récupère la liste des personnages du joueur suivant\n\t\t\tlistePersonnageFromJoueur = iteratorOverListeJoueur.next().getListePersonnage();\n\t\t\titeratorOverListePersonnage = listePersonnageFromJoueur.iterator();\n\t\t\t\n\t\t\t// on boucle sur la liste de personnages du joueur\n\t\t\twhile(iteratorOverListePersonnage.hasNext()){\n\t\t\t\t\n\t\t\t\t// on récupère le personnage suivant\n\t\t\t\tpersonnage = iteratorOverListePersonnage.next();\n\t\t\t\t\n\t\t\t\t// si le personnage n'existe pas on l'ajoute dans la liste\n\t\t\t\tif(!listePersonnageFromTurnManager.contains(personnage)){\n\t\t\t\t\tlistePersonnageFromTurnManager.add(personnage);\n\t\t\t\t}\n\t\t\t\t// si il existe déjà, il y a une erreur\n\t\t\t\telse {\n\t\t\t\t\tthrow new PersonnageOnMultipleJoueurException();\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\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 }", "public void registaAposta (Aposta a){\n this.listaApostas.add(a);\n }", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "public static void main (String [] args){\r\n Jefatura jefe_RR=new Jefatura(\"Jeanpool\",55000,2006,9,25);\r\n jefe_RR.estableceIncentivo(2570);\r\n Empleado [] misEmpleados=new Empleado[6];\r\n misEmpleados[0]=new Empleado(\"Paco Gomez\",85000,1990,12,17);\r\n misEmpleados[1]=new Empleado(\"Ana Lopez\",95000,1995,06,02);\r\n misEmpleados[2]=new Empleado(\"Maria Martin\",105000,2002,03,15);\r\n misEmpleados[3]=new Empleado(\"Jeanpool Guerrero\");\r\n misEmpleados[4]=jefe_RR;/**--Polimorfismo: Prinicipio de sustitucion*/\r\n misEmpleados[5]=new Jefatura(\"Maria\",95000,1999,5,26);\r\n Jefatura jefa_Finanzas=(Jefatura)misEmpleados[5];/** CASTING CONVERTIR UN OBJETO A otro */\r\n jefa_Finanzas.estableceIncentivo(55000);\r\n \r\n \r\n \r\n /** for(int i=0;i<3; i++){\r\n misEmpleados[i].subeSueldo(5);\r\n \r\n }\r\n \r\n for(int i=0;i<3;i++){\r\n System.out.println(\"Nombre \"+misEmpleados[i].dimeNombre() + \"Sueldo: \"+misEmpleados[i].dimeSueldo()+ \"Fecha Alta: \"+misEmpleados[i].dameFechaContrato());\r\n }\r\n */\r\n\r\n for(Empleado elementos:misEmpleados){\r\n \r\n elementos.subeSueldo(5);\r\n \r\n }\r\n \r\n for(Empleado elementos:misEmpleados){\r\n System.out.println(\"Nombre: \"+elementos.dimeNombre()+ \" Sueldo: \"+elementos.dimeSueldo()+ \" Alta Contrato: \"+elementos.dameFechaContrato());\r\n }\r\n \r\n }", "@Override\n public void buildPersonalidad() {\n this.personaje.setPersonalidad(\"Pacientes y estrategas.\");\n }", "public Persona()\n\t{\n\t\tnombre = \"--\"; //DEFINES POR DEFAULT LAS VARIABLES;\n\t\tapellido = \"--\"; //DEFINES POR DEFAULT LAS VARIABLES;\n\t\tedad = 0; //DEFINES POR DEFAULT LAS VARIABLES;\n\t\talias = \"--\"; //DEFINES POR DEFAULT LAS VARIABLES;\t\t\n\t}", "void lookupAndSaveNewPerson();", "public static void main(String[] args) {\n Empleado arquitecto1 = new Arquitecto(\"Arq 1\", \"1\", 1, 1 ,\"1\" , 1 );\n Empleado arquitecto2 = new Arquitecto(\"Arq 2\", \"2\", 2, 2 ,\"2\" , 2 );\n Empleado arquitecto3 = new Arquitecto(\"Arq 3\", \"3\", 3, 3 ,\"3\" , 3 );\n Empleado maestro1 = new Maestro(\"Mae 1\", \"1\", 1, 1, \"1\", 1);\n Empleado maestro2 = new Maestro(\"Mae 2\", \"2\", 2, 2, \"2\", 2);\n Empleado maestro3 = new Maestro(\"Mae 3\", \"3\", 3, 3, \"3\", 3);\n Empleado obrero1 = new Obrero(\"Obr 1\", \"1\", 1, 1, \"1\", 1);\n Empleado obrero2 = new Obrero(\"Obr 2\", \"2\", 2, 2, \"2\", 2);\n Empleado obrero3 = new Obrero(\"Obr 3\", \"3\", 3, 3, \"3\", 3);\n//Empresa\n //Lista de Empelado en donde van a estar los empleados de toda la empresa\n ArrayList<Empleado> totalEmployeesOnSite = new ArrayList<>();\n totalEmployeesOnSite.add(arquitecto1);\n totalEmployeesOnSite.add(maestro1);\n totalEmployeesOnSite.add(obrero1);\n //Lista de obreros en la obra\n ArrayList<Obra> activeWorks = new ArrayList<>();\n\n //Lista ed Obras realizadas\n ArrayList<Obra> doneWorks = new ArrayList<>();\n Obra obra1 = new Obra();\n doneWorks.add(obra1);\n Empresa empresa1 = new Empresa(\"Empresa 1\", totalEmployeesOnSite, doneWorks);\n\n System.out.println(empresa1.toString());\n\n//Arquitecto\n\t /* Empleado arquitecto1 = new Arquitecto(\"Jazmin\", \"1234456788\", 1552364898, 2800 ,\"Creando mi proximo plano\" , 223 );\n Empleado arquitecto2 = new Arquitecto(\"Jazmin\", \"1234456788\", 1552364898, 2800 ,\"Creando mi proximo plano\" , 223 );\n//Maestro\n\t Empleado maestro1 = new Maestro(\"Nicolas\", \"98745632\", 155236478, 3000, \"Soy maestro y superviso las construcciones\", 29);\n Empleado maestro2 = new Maestro(\"Nicolas\", \"98745632\", 155236478, 3000, \"Soy maestro y superviso las construcciones\", 29);\n//Obrero\n\t Empleado obrero1 = new Obrero(\"Matilda\", \"12549632\", 155235647, 1200, \"Soy obrro y construyo\", 25);\n Empleado obrero2 = new Obrero(\"Matilda2\", \"125496322\", 155235647, 1200, \"Soy obrro y construyo\", 25);\n//Array Empleado que va a ir a\n ArrayList<Empleado> totalEmployeesOnSite = new ArrayList<>();\n totalEmployeesOnSite.add(empleado4);\n\n System.out.println(empleado1.getWork());\n System.out.println(empleado2.getWork());\n System.out.println(empleado3.getWork());\n\n ArrayList<Empleado> totalEmployees = new ArrayList<>();\n ArrayList<Obra> activeWorks = new ArrayList<>();\n\n Obra obra1 = new Obra(\"Lo De Jaz\", 2, 54, 7, totalEmployeesOnSite );\n\n activeWorks.add(obra1);\n\n totalEmployees.add(empleado1);\n totalEmployees.add(empleado2);\n\n Empresa empresa = new Empresa(\"Lo de Jaz\", totalEmployees, activeWorks);\n\n System.out.println(empresa.toString());\n */\n\n }", "public Persona getPersona(String nombre)\n {\n Persona p = new Persona();\n //Considerar almacenar todos los registros en un arrayList o\n //en un JsonArray y JsonObject\n try \n { \n PreparedStatement pstm = null; \n ResultSet rs = null;\n String query = \"SELECT * FROM Persona WHERE ID_User IN (SELECT ID_User FROM Usuario WHERE username = ?)\";\n pstm = con.prepareStatement(query);\n pstm.setString(1, nombre);\n rs = pstm.executeQuery();\n while(rs.next())\n {\n p.setIdPersona(rs.getInt(\"ID_Persona\"));\n p.setIdUser(rs.getInt(\"ID_User\"));\n p.setNombre(rs.getString(\"Nombre\"));\n p.setApellidoP(rs.getString(\"apellidoPaterno\"));\n p.setApellidoM(rs.getString(\"apellidoMaterno\")); \n }\n }catch(SQLException ex){\n ex.printStackTrace(); \n }\n return p;\n }", "public void addPerson(Person p);", "private void arrancarHiloCambiosVentas() {\n HiloCambiosVentas hilo = new HiloCambiosVentas();\n //Creo un hilo del objeto de HiloPrincipal \n Thread th = new Thread(hilo);\n th.start();\n }", "@Override\n\tpublic List<?> infoObraRecursoPersona(ObraRecursoPersonaDTO dto) {\n\t\treturn null;\n\t}", "public PersonList() {\r\n this.personList = new ArrayList<Person>();\r\n }", "public void borrarZonaObjetivoAtaque() {\n\t\t\n\t}", "public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }", "public void addNewborn(Object anObj) { _newBorns.add(anObj); }", "public Artefato() {\r\n\t\tthis.membros = new ArrayList<Membro>();\r\n\t\tthis.servicos = new ArrayList<IServico>();\r\n\t}", "public void borrarZonaObjetivoMovimiento() {\n\t\t\n\t}", "public Persona(String nombre) {\n\t\tthis.nombre = nombre;\n\t}", "@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}", "@Override\n\tpublic void visit(final GrandMa person) {\n\t\t\n\t}", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "public void anadirObjetoRecolectable (ObjetoRecolectable pObjeto){\n\t\tif (pObjeto instanceof ObjetoClave){\n\t\t\tthis.anadirObjetoClave((ObjetoClave)pObjeto);\n\t\t}\n\t\telse if (pObjeto instanceof PiezaArmadura){\n\t\t\tthis.actualizarArmadura((PiezaArmadura)pObjeto);\n\t\t}\n\t}", "@Override\n\tpublic Types getType() {\n\t\treturn GameObject.Types.PERSON;\n\t}", "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}", "public void HordaHardcodeada() {\n\t\t\n\t\tObjetoDelJuego c = mapa.AgregarEnemigo();\n\t\tlistaDeEnemigos.add( (Enemigo) c );\n\t\t\n\t}", "public boolean agregarFamilia(String apellido, Persona[] miembros){\n if (numero_familias < 14){\n Arrays.sort(miembros);\n //Instancia la familia y la agrega al arreglo de Familias en la posición que le corresponde \n familia = new Familia(apellido, miembros);\n numero_familias++;\n familias[numero_familias] = familia;\n return true;\n }\n else return false;\n }", "@Override\n public Persona Last() {\n return array.get(tamano - 1);\n }", "@Override\r\n\tpublic void seleccionarPersona() {\n\t\t\r\n\t}", "public Persona(int idPersona){\n this.idPersona = idPersona;\n }", "public void asignarAutomovilPersona(){\r\n persona.setAutomovil(automovil);\r\n }", "@Override\n\tpublic void emprestimo(Livros livro, Aluno usuario) {\n\t\t\n\t}", "private void carregarPacienteAtivoList() {\n\t\tthis.setPacienteList(new ArrayList<Paciente>());\n\t\tthis.getPacienteList().addAll(this.getPacienteDAO().getPacienteAtivoList());\n\t}", "public Mach buscarEmpleado(Vacante vacante) {\r\n\t\tSystem.out.println(\"buscando empleo\");\r\n\t\tMach ELpapa = null;\r\n\t\tMach nuevo = null;\r\n\t\tArrayList<Mach> maches = new ArrayList<>();\r\n\t\tfor (Persona persona : personas) {\r\n\t\t\tSystem.out.println(\"aqui\");\r\n\t\t\tif (persona instanceof Obrero) {\r\n\t\t\t\tif (vacante instanceof vacanteObrero) {\r\n\t\t\t\t\tSystem.out.println(\"estoy aqui obrero\");\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vacanteObrero) vacante).getHabilidades())) {\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\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\tif (persona instanceof Tecnico) {\r\n\t\t\t\tif (vacante instanceof vacanteTecnico) {\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vacanteTecnico) vacante).getArea_desarrollo())) {\r\n\t\t\t\t\t\tSystem.out.println(\"esoty aqui tecnico\");\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\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\tif (persona instanceof Universitario) {\r\n\t\t\t\tif (vacante instanceof vancanteUniversitario) {\r\n\t\t\t\t\tSystem.out.println(\"estoy aqui univeristario\");\r\n\t\t\t\t\tif (persona.INTERIOR().equalsIgnoreCase(((vancanteUniversitario) vacante).getCarreraUniv())) {\r\n\t\t\t\t\t\tnuevo = persona.buscarCurriculums(vacante);\r\n\t\t\t\t\t\tif (nuevo.getIdice() > 0) {\r\n\t\t\t\t\t\t\tmaches.add(nuevo);\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\t\r\n\t\t}\r\n\t\tELpapa = buscarmayorIndiceDeMACHES(maches);\r\n\t\tif (ELpapa != null) {\r\n\t\t\tSystem.out.println(\"no es null\");\r\n\t\t}\r\n\t\treturn ELpapa;\r\n\t}", "void addFullHadith(Object newFullHadith);", "public Persona() {\n \t\n }", "ParqueaderoEntidad agregar(String nombre);", "public static void main(String[] args) {\n\t\tSupervisor miSupervisor = new Supervisor(\"Raul\");\r\n\t\t\r\n\t\t//Array de Empleados\r\n\t\tEmpleadoStatic[] listaEmpleados = new EmpleadoStatic[7];\r\n\t\tScanner Entrada = new Scanner(System.in);\r\n\t\t\r\n\t\t//Pedido de Empleados\r\n\t\tfor(int i=0;i<5;i++){\t//for(int i=0;i<listaEmpleados.length;i++){\t\r\n\t\t\tSystem.out.print(\"Ingrese nombre: \");\r\n\t\t\tlistaEmpleados[i] = new EmpleadoStatic(Entrada.nextLine());\r\n\t\t}\r\n\t\t\r\n\t\t/*POLIMORFISMO: El programa espera un objeto de la clase padre (Empleado).\r\n\t\t * Pero yo estoy asignando objetos de la clase hija (Supervisor)*/\r\n\t\tlistaEmpleados[5] = miSupervisor;\r\n\t\tlistaEmpleados[6] = new Supervisor(\"Fabio\");\t//última ID\r\n\t\t\t\t\r\n\t\t/*Uso de Arrays.sort() para ordenar los empleados por id, ya que por \r\n\t\t * ejemplo, la primer posición del array tiene al empleado de id 2.\r\n\t\t * Require la interfaz Comparable, agregada en EmpleadoStatic*/\r\n\t\tArrays.sort(listaEmpleados);\r\n\t\t\r\n\t\t/*Recorrida, si en la clase hija se sobreescribe un método, al momento de\r\n\t\t * pasar por ese objeto, se llama al método de la clase hija. Comportamiento \r\n\t\t * según el contexto (Polimorfismo)*/\r\n\t\tfor(EmpleadoStatic e:listaEmpleados)\r\n\t\t\tSystem.out.println(\"id: \" + e.getId() + \"\\t nombre: \" + e.getNombre());\r\n\t\t\r\n\t\tSystem.out.println(\"Proximo ID a asignar: \" + EmpleadoStatic.getIdDisponible());\r\n\t\t\r\n\t\t/*Ejemplo para demostrar el acceso a un método de la interfaz JefesI\r\n\t\t * implementado por la clase Supervisor*/\r\n\t\tSupervisor s = new Supervisor(\"Macri\");\r\n\t\tSystem.out.println(s.tomarDecisiones(\"Un nuevo tarifazo. Vamos juntos!\"));\r\n\t\t\r\n\t\t\tEntrada.close();\r\n\t}", "List<TipoHuella> listarTipoHuellas();", "private void arrancaHiloPrincipal() {\n //Creo objeto hilo principal\n HiloPrincipal hilo = new HiloPrincipal(this);\n //Creo un hilo del objeto de HiloPrincipal \n Thread th = new Thread(hilo);\n th.start();\n }", "@Override\n public void put(Object o, Person person) {\n \n }", "public void addHijo(Nodo hijo){\n this.hijos.add(hijo);\n }", "@Override\n\tpublic void crearPoblacion() {\n\t\tif(this.terminales == null || this.funciones == null) {\n\t\t\tSystem.out.println(\"Error. Los terminales y las funciones tienen que estar inicializados\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tpoblacion = new ArrayList<>();\n\t\tfor(int i = 0; i < this.numIndividuos; i++) {\n\t\t\tIndividuo ind = new Individuo();\n\t\t\tind.crearIndividuoAleatorio(this.profundidad, this.terminales, this.funciones);\n\t\t\tthis.poblacion.add(ind);\n\t\t}\n\t}", "public List<Persona> todasLasPersonas(){\n\n Iterable<Persona> ite=repo.findAll();\n Iterator<Persona> it=ite.iterator();\n List<Persona> actualList = new ArrayList<Persona>();\n while (it.hasNext()) {\n actualList.add(it.next());\n }\n\n return actualList;\n }", "public void agregar_Alinicio(int elemento){\n inicio=new Nodo(elemento, inicio);// creando un nodo para que se inserte otro elemnto en la lista\r\n if (fin==null){ // si fin esta vacia entonces vuelve al inicio \r\n fin=inicio; // esto me sirve al agregar otro elemento al final del nodo se recorre al inicio y asi sucesivamnete\r\n \r\n }\r\n \r\n }", "public Persona() {\n }", "public void FaltaJugador(Falta Fa,Jugador Player,int Cometida,int Tarjeta, Chronometer Cronometro){\n Faltas.add(new FaltaPartido(Fa,Player.getIdJugador(),Cometida,Tarjeta,Cronometro.getTime()));\n PartidoCanchaActivity.ACCION_PRINCIPAL = null;\n PartidoCanchaActivity.ENVIA_PASE = null;\n }", "public void addperson(Person p, int floorNum) {\n\r\n\r\n }", "public NodoArbolSintactico(String nombre, int tipo) {\r\n hijos = new ArrayList<>();\r\n this.nombre = nombre;\r\n accion = null;\r\n this.tipo = tipo;\r\n }", "public interface IPersonagem {\n void PopulaPersonagens(ArrayList<ModelPersonagem> arrayPersonagens);\n\n}", "private PersonaEnvio buscaPersonaPorNombre(PersonaEnvio personaRequest) throws NotariaException{\n\t\tPersonaEnvio respuesta = new PersonaEnvio();\n\t\tString nombrePersona = personaRequest.getNombrePersona().replaceAll(\"\\\\s+\", \" \").trim();\n\t\tList<DatoBusquedaPersona> lista = personaBo.findPersonaByName(nombrePersona);\n\t\tif (lista != null) {\n\t\t\trespuesta.setResultados(new ArrayList<DatoBusquedaPersona>(\n\t\t\t\t\tlista));\n\t\t\trespuesta.setNumeroResultados(lista.size());\n\t\t\trespuesta.setEstatus(\"Búsqueda correcta.\");\n\t\t\trespuesta.setExito(true);\n\t\t\treturn respuesta;\n\t\t} else {\n\t\t\trespuesta.setResultados(null);\n\t\t\trespuesta.setNumeroResultados(0);\n\t\t\trespuesta.setEstatus(\"No se encontraron resultados.\");\n\t\t\trespuesta.setExito(false);\n\t\t\treturn respuesta;\n\t\t}\n\t}", "void cargarDatos(Persona beanTabla) {\n this.oPersona = beanTabla;\n oFondoSolidaridad = new FondoSolidaridad();\n\n if (oPersona != null) {\n oBlFondoPrevision = new FondoPrevisionBl();\n listFondos = oBlFondoPrevision.listar(oPersona.getIdpersona());\n oFondoSolidaridad.setPersona(oPersona);\n if (listFondos.isEmpty()) {\n JOptionPane.showMessageDialog(null, \"La persona no tiene fondos\", \"ATENCION\", JOptionPane.ERROR_MESSAGE);\n } else {\n for (FondoSolidaridad obj : listFondos) {\n oModeloFondoPrevision.add(obj);\n }\n\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Verifique sus datos\", \"ATENCION\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public static void personTest(){\n ArrayList<Person> people = new ArrayList<>();\n //people[0] = new Person(\"Fer\", \"Mendoza\", true);\n people.add(new Person(\"Fer\", \"Mendoza\", true));\n people.add(new Person(\"Stacy\", \"Malibu\", false));\n people.add(new Person(\"Ana\", \"Morton\", true));\n\n for (Person person : people) {\n System.out.println(\"person.getFullName() = \" + person.getFullName());\n }\n\n }", "public Persona(int idPersona, String nombre, String apellido, String email, String telefono){\n this.idPersona = idPersona;\n this.nombre = nombre;\n this.apellido = apellido;\n this.email = email;\n this.telefono = telefono;\n \n }", "public void nascitaAgnello() {\n\t\tpecore.add(new Agnello());\n\t\tnumeroAgelli++;\n\t}", "public void asignarPersona(Jugador j){\r\n this.jugador = j;\r\n }", "@Override\r\n public void mostrarAlumnos(){\n for(Persona i: listaPersona){\r\n if(i instanceof Alumno){\r\n i.mostrar();\r\n }\r\n }\r\n }", "public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }", "@Override\n\tpublic synchronized void entrarAlParque(String puerta){\n\t\tif (contadoresPersonasPuerta.get(puerta) == null){\n\t\t\tcontadoresPersonasPuerta.put(puerta, 0);\n\t\t}\n\t\t\n\t\tcomprobarAntesDeEntrar();\n\t\t\n\t\t// Aumentamos el contador total y el individual\n\t\tcontadorPersonasTotales++;\t\t\n\t\tcontadoresPersonasPuerta.put(puerta, contadoresPersonasPuerta.get(puerta)+1);\n\t\t\n\t\t// Imprimimos el estado del parque\n\t\timprimirInfo(puerta, \"Entrada\");\n\t\t\n\t\tcheckInvariante();\n\t\t\n\t\tthis.notifyAll();\n\t\t\n\t}", "List<E> resoudre (\n ProblemeAbstrait <E, A> probleme, \n HeuristiqueAbstrait<E> heuristique\n );" ]
[ "0.6325367", "0.6146845", "0.60609096", "0.604545", "0.5952003", "0.57951504", "0.57073265", "0.56966966", "0.56416726", "0.5628446", "0.5626357", "0.5594389", "0.55940104", "0.55427665", "0.5539225", "0.5496903", "0.5492689", "0.54609567", "0.5457521", "0.5450067", "0.54478943", "0.54396826", "0.5436045", "0.5432368", "0.54318607", "0.5416398", "0.5413761", "0.54002297", "0.53996766", "0.5394373", "0.5394373", "0.53935385", "0.5390109", "0.5386996", "0.5372003", "0.5368875", "0.5364396", "0.5362183", "0.5335222", "0.532608", "0.5320873", "0.5304504", "0.5302776", "0.5297323", "0.5295213", "0.529271", "0.5278474", "0.5265767", "0.5245636", "0.52404547", "0.5231069", "0.5223188", "0.5222157", "0.5218244", "0.5201892", "0.5201135", "0.5196742", "0.51951194", "0.518918", "0.51884675", "0.51882887", "0.518498", "0.518436", "0.518299", "0.517811", "0.5175426", "0.5174642", "0.5174505", "0.5170883", "0.51702625", "0.5167288", "0.5166935", "0.51593643", "0.51527244", "0.5148046", "0.5145652", "0.5143488", "0.51418775", "0.51222014", "0.51207054", "0.51166254", "0.51150435", "0.51123476", "0.510965", "0.5108648", "0.51083165", "0.5092892", "0.5087824", "0.5087391", "0.50822103", "0.50820905", "0.50778186", "0.5068929", "0.50663275", "0.50646573", "0.50501096", "0.50497645", "0.5049561", "0.50456256", "0.50429374" ]
0.6466289
0
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { JButton button = (JButton)e.getSource(); if(button == saveButton) { saving(); } else if(button == loadButton) { loading(); } else if(button == resetButton) { new Restart(); } }
{ "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
Check to see if the plugin thats being disabled is the one we are using
@Override public void onPluginDisable(PluginDisableEvent event) { if (EconServerListener.Methods != null && EconServerListener.Methods.hasMethod()) { Boolean check = EconServerListener.Methods.checkDisabled(event.getPlugin()); if(check) { this.plugin.Method = null; System.out.println("[" + plugin.name + "] Payment method was disabled. No longer accepting payments."); EconomyHandler.currencyEnabled = false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasPlugin() {\n return plugin != null;\n }", "public boolean contains() {\n return (Bukkit.getServer().getPluginManager().getPlugin(this.name) != null);\n }", "public boolean isPluginDisabledForAllObjects(OwPluginEntry entry_p)\r\n {\r\n boolean result = m_disabledPlugins.contains(entry_p);\r\n if (m_displayEmptyPluginColumn)\r\n {\r\n result = false;\r\n }\r\n return result;\r\n }", "boolean isSetPluginstate();", "private boolean pluginLoading(String pluginName) {\n return pm.getPlugin(pluginName) != null;\n }", "public boolean isSetPlugin() {\n return this.plugin != null;\n }", "@Override\r\n public boolean isPluginEnabled()\r\n {\n return true;\r\n }", "boolean hasEnabled();", "public boolean isPluginInstalled() {\n return Bukkit.getPluginManager().isPluginEnabled(Library.MCRPG.getInternalPluginName());\n }", "@Override\n public boolean isWorking() {\n return working && hasPlugin();\n }", "public static boolean isDisabled() {\r\n return disabled;\r\n }", "public boolean getEnabled () {\r\n\tcheckWidget ();\r\n\tint topHandle = topHandle ();\r\n\treturn (OS.PtWidgetFlags (topHandle) & OS.Pt_BLOCKED) == 0;\r\n}", "@Override\n protected boolean isAppCheckEnabled(FieldUtility fieldUtility) {\n boolean isPluginCheckDisabled = fieldUtility.getBooleanOrFalse(JiraCloudDescriptor.KEY_JIRA_DISABLE_PLUGIN_CHECK);\n return !isPluginCheckDisabled;\n }", "public boolean isEnabled () {\r\n\tcheckWidget();\r\n\treturn getEnabled () && parent.isEnabled ();\r\n}", "final public boolean isEnabled() {\n return enabledType!=ENABLED_NONE;\n }", "private void checkEnabled() {\n }", "private boolean disablePlugin(PluginCommandManager manager, CommandSender player, String pluginName) {\r\n PluginManager pluginManager = Bukkit.getServer().getPluginManager();\r\n Plugin plugin = getPlugin(pluginName);\r\n if (plugin == null) {\r\n manager.sendMessage(player, \"A plugin with the name '\" + pluginName + \"' could not be found.\");\r\n return true;\r\n }\r\n pluginManager.disablePlugin(plugin);\r\n manager.sendMessage(player, \"The plugin '\" + pluginName + \"' was successfully disabled.\");\r\n m_plugin.cachePluginDetails();\r\n return true;\r\n }", "public static boolean isEnabled() {\n return true;\n }", "public abstract boolean isDisable(Project project);", "private boolean checkHook(PluginHook name)\n\t{\n\t\tif (hooks.containsKey(name))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "boolean isEnabled();", "public boolean isDisabled() {\n final FacesContext facesContext = getFacesContext();\n final TobagoConfig tobagoConfig = TobagoConfig.getInstance(facesContext);\n final Boolean disabled = (Boolean) getStateHelper().eval(AbstractUICommand.PropertyKeys.disabled);\n if (disabled == null) {\n SupportsDisabled parent =\n ComponentUtils.findAncestor(getCurrentComponent(facesContext), SupportsDisabled.class);\n if (parent != null && parent.isDisabled()) {\n return true;\n }\n }\n return disabled != null && disabled\n || tobagoConfig.getSecurityAnnotation() == SecurityAnnotation.disable && !isAllowed();\n }", "public boolean isDisabled()\n {\n return disabled;\n }", "public boolean isDisabled() {\n\t\treturn !enabled;\n\t}", "public static boolean isDoublePanelActive () {\n return false;\n }", "public void checkIsEnabled() {\r\n\t\tMcsElement.getElementByPartAttributeValueAndParentElement(driver, \"div\", \"@class\", PURCHASING_PRODUCT_WINDOW_CLASS, \"input\", \"@name\",\r\n\t\t\t\t\"isEnabled\", true, true).click();\r\n\t\tReporter.log(\"Check IsEnabled\", true);\r\n\t}", "public boolean areComponentsEnabled() {\n return itiefe.isEnabled();\n }", "boolean hasGlobalSettingsPanel();", "public boolean isEnabled() {\n\t\treturn false;\r\n\t}", "public boolean isEnabled() {\n\t\treturn false;\r\n\t}", "public boolean isIsDisabled() {\r\n return isDisabled;\r\n }", "public boolean isEnabled();", "public boolean isEnabled();", "public boolean isEnabled();", "public boolean isEnabled();", "public boolean isEnabled();", "public boolean hasWG() {\n Plugin plugin = getServer().getPluginManager().getPlugin(\"WorldGuard\");\n return plugin != null;\n }", "public boolean isEnabled() {\n\t\treturn false;\n\t}", "public boolean isEnabled() {\n\t\treturn false;\n\t}", "boolean hasIngestJobSettingsPanel();", "public boolean isEnabled_click_Digital_coupons_button(){\r\n\t\tif(click_Digital_coupons_button.isEnabled()) { return true; } else { return false;} \r\n\t}", "boolean hasSettings();", "boolean hasSettings();", "public boolean isDisabled() {\n return disabled;\n }", "public boolean isEnabled() { return _enabled; }", "public boolean isEnabled_txt_Fuel_Rewards_Page_Button(){\r\n\t\tif(txt_Fuel_Rewards_Page_Button.isEnabled()) { return true; } else { return false;} \r\n\t}", "public Boolean checkDisabled() {\r\n\t\treturn searchRepository.checkDisabled();\r\n\t}", "public boolean verifyPaymentMethodDisabled() {\n\t\treturn !divPaymentMethod.isEnabled();\n\t}", "public boolean isDisabled() {\n\t\treturn disabled;\n\t}", "public boolean getIsEnabledState() {\r\n\t\tif (McsElement.getElementByPartAttributeValueAndParentElement(driver,\r\n\t\t\t\t\"div\", \"@class\", PURCHASING_PRODUCT_WINDOW_CLASS, \"input\", \"@name\",\r\n\t\t\t\t\"isEnabled\", true, false).getAttribute(\"checked\") == null) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public final boolean isDisabled()\n {\n return myDisabledProperty.get();\n }", "public int getNumberOfDisabledPlugins()\r\n {\r\n return m_disabledPlugins.size();\r\n }", "static boolean isDisabled(Context context) {\n return polling ||\n !ConfigureActivity.getBooleanSetting(context, ConfigureActivity.POLLING_ENABLED);\n }", "public boolean isEnabled () {\n return impl.isEnabled ();\n }", "public boolean isBot(){\n return false;\n }", "public abstract boolean isEnabled();", "public abstract boolean isEnabled();", "public boolean isEnabled() {\n return mBundle.getBoolean(KEY_ENABLED, true);\n }", "@Override\r\n public void onDisable() {\r\n \tBukkit.getLogger().info(\"[VoteHeads] Plugin Disabled.\");\r\n\r\n }", "private boolean isSmartModeEnabled()\n {\n try\n {\n return Integer.parseInt((String) _smartModeComboBox.getSelectedItem()) > 0;\n }\n catch (NumberFormatException neverOccurs)\n {\n return false;\n }\n }", "public boolean verifyPaymentPlanDisabled() {\n\t\treturn !divPaymentPlan.isEnabled();\n\t}", "boolean isDegraded();", "private boolean isEnabled() {\n return isEnabled;\n }", "public boolean isPluginTransitive(String pluginName) {\n DependencyDescriptor dd = pluginNameToDescriptorMap.get(pluginName);\n return dd == null || dd.isTransitive();\n }", "public boolean isEnabled() {\n\t\treturn true;\n\t}", "public boolean AssetIDEnable() {\r\n\t\t// return IsElementEnabledStatus(DefineSetup_AssetID_txtBx);\r\n\t\t// DefineSetup_AssetID_txtBx.isDisplayed();\r\n\t\t// return DefineSetup_AssetID_txtBx.isDisplayed();\r\n\t\treturn IsElementEnabledStatus(DefineSetup_AssetID_txtBx);\r\n\t}", "@Deprecated\n public boolean isEnable() {\n return !skip;\n }", "@Override\r\n public void onDisable() {\r\n log.info(\"[SeattleSummer] plugin disabled.\");\r\n }", "@Override\r\n\tpublic boolean isEnabled() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isEnabled() {\n\t\treturn false;\r\n\t}", "public boolean verifyChangePayorDisabled() {\n\t\treturn !btnChangePayor.isEnabled();\n\t}", "protected abstract void onPluginEnable();", "public boolean isPluginConsistencyActivated()\n {\n boolean activation = getPreferenceStore().getBoolean(CONSISTENCY_ACTIVATION);\n return activation;\n }", "public boolean isBot() {\n//\t\treturn this.getUserIO().checkConnection();\n\t\treturn false;\n\t}", "private boolean setupEconomy() {\n if (getServer().getPluginManager().getPlugin(\"Vault\") == null) {\n return false;\n }\n RegisteredServiceProvider<Economy> rsp = getServer().getServicesManager().getRegistration(Economy.class);\n if (rsp == null) {\n return false;\n }\n econ = rsp.getProvider();\n return econ != null;\n }", "public boolean isMonitoringEnabled(){\n return (selectorThread != null ?\n selectorThread.isMonitoringEnabled() : false);\n }", "public boolean isEnabled(){\n return enabled;\n }", "public static boolean hasModule() {\n\t\ttry {\n\t\t\tPackageManager packageManager = AppMain.getContext().getPackageManager();\n\t\t\tIntent intent = new Intent(\"android.settings.USAGE_ACCESS_SETTINGS\");\n\t\t\tList<ResolveInfo> list = packageManager.queryIntentActivities(intent,\n\t\t\t\tPackageManager.MATCH_DEFAULT_ONLY);\n\t\t\treturn list.size() > 0;\n\t\t} catch (RuntimeException e) {\n\t\t\t// 在某个三星的设备上出现过安全异常\n\t\t\t// 在某个ZTE的设备上出现过RuntimeException\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isAvailable() {\n\t\tObject oo = get_Value(\"IsAvailable\");\n\t\tif (oo != null) {\n\t\t\tif (oo instanceof Boolean)\n\t\t\t\treturn ((Boolean) oo).booleanValue();\n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "static boolean isPokemonsOption() {\n\t\t \n\t\t return current == pokemonsOption;\n\t }", "@Override\n\tpublic boolean isEnabled() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEnabled() {\n\t\treturn false;\n\t}", "@Test\n public void testIsDeselectPluginsOnExecuteEnabled() {\n System.out.println(\"isDeselectPluginsOnExecuteEnabled\");\n final String preferenceKey = \"deselectPluginsOnExecute\";\n\n // Verify preference does not exist and also returns the correct default of false\n assertEquals(preferences.getBoolean(preferenceKey, false), false);\n assertEquals(DataAccessPreferenceUtilities.isDeselectPluginsOnExecuteEnabled(), false);\n assertEquals(preferences.getBoolean(preferenceKey, false), false);\n\n // verify preference is set correctly\n preferences.putBoolean(preferenceKey, true);\n assertEquals(preferences.getBoolean(preferenceKey, false), true);\n\n // Verify method call returns correct value\n assertEquals(DataAccessPreferenceUtilities.isDeselectPluginsOnExecuteEnabled(), true);\n\n // put in a false value to check toggling, recheck\n preferences.putBoolean(preferenceKey, false);\n assertEquals(preferences.getBoolean(preferenceKey, false), false);\n assertEquals(DataAccessPreferenceUtilities.isDeselectPluginsOnExecuteEnabled(), false);\n assertEquals(preferences.getBoolean(preferenceKey, false), false);\n\n // Verify method call returns correct value\n assertEquals(DataAccessPreferenceUtilities.isDeselectPluginsOnExecuteEnabled(), false);\n\n }", "public boolean isScriptingPlugin() {\n\t\treturn scriptingPlugin;\n\t}", "private boolean isSupportedInternal() {\n boolean z = false;\n synchronized (this.mLock) {\n if (this.mServiceManager == null) {\n Log.e(TAG, \"isSupported: called but mServiceManager is null!?\");\n return false;\n }\n try {\n if (this.mServiceManager.getTransport(IWifi.kInterfaceName, HAL_INSTANCE_NAME) != (byte) 0) {\n z = true;\n }\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Exception while operating on IServiceManager: \" + e);\n return false;\n }\n }\n }", "private boolean enabled(BugPattern bp) {\n String setting = settings.get(bp.getType(), null);\n\n if (setting != null) return Boolean.valueOf(setting);\n\n return !defaultsToDisabled && RunFindBugs.isEnabledByDefault(bp);\n }", "protected boolean isCommandExecuting() {\n // long start = System.nanoTime();\n // boolean inCommand = false;\n // for (StackTraceElement e : Thread.currentThread().getStackTrace()) {\n // if (e.getMethodName().equals(\"handleCommand\")) {\n // inCommand = true;\n // break;\n // }\n // }\n // long now = System.nanoTime();\n // double elapsedMillis = (now - start) * 1e-6;\n // getLogger().info(\"handleCommand: \" + inCommand + \" elapsed ms: \" +\n // elapsedMillis);\n\n try {\n Field playerCommandState = Bukkit.getServer().getClass().getField(\"playerCommandState\");\n return playerCommandState.getBoolean(Bukkit.getServer());\n } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException ex) {\n getLogger().severe(\"This plugin needs to be updated for the current server (EasyRider.isCommandExecuting()).\");\n return false;\n }\n }", "public boolean verifyNoInactives() {\n\t\treturn !btnInactives.isEnabled();\n\n\t}", "@Override\n public void onPluginDisable(PluginDisableEvent event) {\n if (this.Methods != null && this.Methods.hasMethod()) {\n Boolean check = this.Methods.checkDisabled(event.getPlugin());\n\n if(check) {\n ConnectFour.Method = null;\n }\n }\n }", "public boolean isEnabled() {\n return enabled;\n }", "private boolean loadPlugin(PluginCommandManager manager, CommandSender player, String pluginName) {\r\n PluginManager pluginManager = Bukkit.getServer().getPluginManager();\r\n // load and enable the given plugin\r\n File pluginFolder = manager.getPlugin().getDataFolder().getParentFile();\r\n File pluginFile = new File(pluginFolder + File.separator + pluginName);\r\n \r\n boolean fileExists = false;\r\n for (File actualPluginFile : pluginFolder.listFiles()) {\r\n if (actualPluginFile.getAbsolutePath().equalsIgnoreCase(pluginFile.getAbsolutePath())) {\r\n fileExists = true;\r\n pluginFile = actualPluginFile;\r\n break;\r\n }\r\n }\r\n \r\n if (!fileExists) {\r\n // plugin does not exist\r\n manager.sendMessage(player, \"A plugin with the name '\" + pluginName + \"' could not be found at location:\");\r\n manager.sendMessage(player, pluginFile.getAbsolutePath());\r\n return true;\r\n }\r\n // Try and load the plugin\r\n Plugin plugin = null;\r\n try {\r\n plugin = pluginManager.loadPlugin(pluginFile);\r\n } catch (InvalidPluginException e) {\r\n // Something went wrong so set the plugin to null\r\n plugin = null;\r\n } catch (InvalidDescriptionException e) {\r\n // Something went wrong so set the plugin to null\r\n plugin = null;\r\n } catch (UnknownDependencyException e) {\r\n // Something went wrong so set the plugin to null\r\n plugin = null;\r\n }\r\n if (plugin == null) {\r\n // The plugin failed to load correctly\r\n manager.sendMessage(player, \"The plugin '\" + pluginName + \"' failed to load correctly.\");\r\n return true;\r\n }\r\n // plugin loaded and enabled successfully\r\n pluginManager.enablePlugin(plugin);\r\n manager.sendMessage(player, \"The plugin '\" + pluginName + \"' has been succesfully loaded and enabled.\");\r\n m_plugin.cachePluginDetails();\r\n return true;\r\n }", "public boolean isEnabled() {\n return myEnabled;\n }", "public boolean isOnline ( ) {\n\t\treturn getBukkitPlayerOptional ( ).isPresent ( );\n\t}" ]
[ "0.7082986", "0.7012713", "0.69872934", "0.68798226", "0.67740184", "0.6755445", "0.6751236", "0.6639986", "0.66302466", "0.6381131", "0.6342197", "0.627138", "0.6258854", "0.6194116", "0.6172233", "0.6163526", "0.61086935", "0.6099654", "0.6085011", "0.60731745", "0.6068673", "0.6068673", "0.6068673", "0.6068673", "0.6068673", "0.6068673", "0.6068673", "0.6068673", "0.6064588", "0.60194373", "0.60149354", "0.6013979", "0.60087955", "0.60014457", "0.60000736", "0.59726036", "0.59726036", "0.5939201", "0.59276056", "0.59276056", "0.59276056", "0.59276056", "0.59276056", "0.59218544", "0.58989966", "0.58989966", "0.5878688", "0.5868714", "0.58478886", "0.58478886", "0.5838152", "0.58274615", "0.58255655", "0.5823428", "0.58073395", "0.58055884", "0.5793107", "0.57781863", "0.5767786", "0.5765757", "0.5745022", "0.5740414", "0.57131237", "0.57131237", "0.5710386", "0.5710287", "0.57054764", "0.57044417", "0.56974167", "0.5691119", "0.56824", "0.5679365", "0.56756574", "0.5669736", "0.56667924", "0.5665397", "0.5665397", "0.5664481", "0.5651687", "0.56398904", "0.5639221", "0.56331766", "0.5625151", "0.5611605", "0.56026566", "0.5602309", "0.5599759", "0.5592863", "0.5592863", "0.5589445", "0.5581321", "0.5574808", "0.55725443", "0.5566271", "0.5565854", "0.55600756", "0.55583996", "0.5554812", "0.55508155", "0.5546857" ]
0.56257194
82
Check to see if we need a payment method
@Override public void onPluginEnable(PluginEnableEvent event) { if (!EconServerListener.Methods.hasMethod()) { if(EconServerListener.Methods.setMethod(event.getPlugin())) { // You might want to make this a public variable inside your MAIN class public Method Method = null; // then reference it through this.plugin.Method so that way you can use it in the rest of your plugin ;) this.plugin.Method = EconServerListener.Methods.getMethod(); System.out.println("[" + plugin.name + "] Payment method found (" + this.plugin.Method.getName() + " version: " + this.plugin.Method.getVersion() + ")"); EconomyHandler.currencyEnabled = true; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasPayment();", "boolean hasPayment();", "@java.lang.Override\n public boolean hasPayment() {\n return instance.hasPayment();\n }", "public boolean hasPayment() {\n return payment_ != null;\n }", "boolean hasPaymentUrl();", "public boolean isPaymentAvailable() {\n return payment != null && !payment.isEmpty();\n }", "public boolean hasPayment() {\n return paymentBuilder_ != null || payment_ != null;\n }", "boolean isCreditCardIsSingleAvailablePayment();", "PaymentMethod getPaymentMethod();", "public boolean verifyPaymentMethodDisabled() {\n\t\treturn !divPaymentMethod.isEnabled();\n\t}", "public boolean isPartialPaymentSupported();", "private void checkPaymentMethod() {\n toolbar.setTitle(R.string.payment_method);\n PaymentMethodFragment paymentMethodFragment = new PaymentMethodFragment();\n displaySelectedFragment(paymentMethodFragment);\n }", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return instance.hasPaymentUrl();\n }", "CarPaymentMethod processPayPal();", "@java.lang.Override\n public boolean hasPayment() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public boolean isTestPayment() {\n\t\treturn isTestPayment;\n\t}", "public boolean checkpay(){\n return pay;\n }", "boolean hasBillingSetup();", "@org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();", "io.opencannabis.schema.commerce.Payments.PaymentMethod getMethod();", "@java.lang.Override\n public boolean hasPaymentUrl() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "@Then(\"^I should be able to see the Payment button$\")\n\tpublic void i_should_be_able_to_see_the_Payment_button() throws Throwable {\n\t\tbc.checkPayment();\n\t}", "public boolean isPaymentMethodCodeByHand() {\n AppCDef.PaymentMethod cdef = getPaymentMethodCodeAsPaymentMethod();\n return cdef != null ? cdef.equals(AppCDef.PaymentMethod.ByHand) : false;\n }", "boolean hasSerializedPaymentDetails();", "boolean hasPaymentDetailsVersion();", "boolean CanBuyDevCard();", "public void calculatePayment() {}", "@Test(priority = 4)\n\tpublic void testPayment() {\n\t\tlogger = extent.startTest(\"passed\");\n\t\tWebDriverWait wait = new WebDriverWait(driver, 100);\n\t\twait.until(ExpectedConditions.presenceOfElementLocated(By.className(\"payment-info\")));\n\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"swit\\\"]/div[1]\")).click();\n\t\tdriver.findElement(By.id(\"btn\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t// For netbanking login\n\t\tdriver.findElement(By.name(\"username\")).sendKeys(\"123456\");\n\t\tdriver.findElement(By.name(\"password\")).sendKeys(\"Pass@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='LOGIN']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Payment Gateway\");\n\n\t\t//\n\t\tdriver.findElement(By.name(\"transpwd\")).sendKeys(\"Trans@456\");\n\t\tdriver.findElement(By.xpath(\"//input[@type='submit' and @value='PayNow']\")).click();\n\t\tAssert.assertEquals(driver.getTitle(), \"Order Details\");\n\t\tlogger.log(LogStatus.PASS, \"testPayment Testcase is passed\");\n\t}", "public boolean isNotNullPaymentGatewayApi() {\n return genClient.cacheValueIsNotNull(CacheKey.paymentGatewayApi);\n }", "@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}", "public String formPaymentNeeded()\r\n {\r\n return formError(\"402 Payment required\",\"Payment is required\");\r\n }", "boolean hasMerchantData();", "boolean hasMerchantData();", "boolean isSetPaymentDelay();", "public boolean verifyPaymentPlanDisabled() {\n\t\treturn !divPaymentPlan.isEnabled();\n\t}", "private boolean checkout() {\n if (OrderMenuUI.incompleteOrders == null || OrderMenuUI.incompleteOrders.size() == 0) {\n System.out.println(\"No orders ready for checkout. Cancelling Operation\");\n return false;\n }\n HashMap<Integer, Order> tOrders = new HashMap<>();\n OrderMenuUI.incompleteOrders.forEach((s) -> {\n Table c = s.getTable();\n if (c == null) return;\n tOrders.put(c.getTableNum(), s);\n });\n tOrders.put(-1, null);\n OrderMenuUI.printOrderList(OrderMenuUI.incompleteOrders, \"Ready for Checkout\", true);\n int tableNo = ScannerHelper.getIntegerInput(\"Select Table to checkout (-1 to cancel): \", new ArrayList<>(tOrders.keySet()), \"Invalid Table Number. Please select a valid table number or enter -1 to cancel\");\n if (tableNo == -1) {\n System.out.println(\"Checkout Operation Cancelled\");\n return false;\n }\n Order o = tOrders.get(tableNo);\n double total = printOrderDetails(o);\n System.out.println();\n System.out.println(\"Payment Mode\");\n System.out.println(\"1) Cash\");\n System.out.println(\"2) NETS\");\n System.out.println(\"3) Debit/Credit Card\");\n System.out.println(\"4) EZ-Link\");\n System.out.println(\"0) Cancel\");\n int choice = ScannerHelper.getIntegerInput(\"Select Payment Mode (0 to cancel): \", -1, 5);\n double paid;\n Invoice.PaymentType paymentType;\n switch (choice) {\n case 1:\n paid = requestCashPayment(total);\n paymentType = Invoice.PaymentType.PAYMENT_CASH;\n break;\n case 2:\n paymentType = Invoice.PaymentType.PAYMENT_NETS;\n paid = total; // All card payments are presumed paid fully\n break;\n case 3:\n paymentType = Invoice.PaymentType.PAYMENT_CARD;\n paid = total; // All card payments are presumed paid fully\n break;\n case 4:\n paymentType = Invoice.PaymentType.PAYMENT_EZLINK;\n paid = total; // All card payments are presumed paid fully\n break;\n case 0:\n System.out.println(\"Operation Cancelled\");\n return false;\n default:\n throw new MenuChoiceInvalidException(\"Checkout Payment\");\n }\n System.out.println(\"Payment Complete! Payment Mode: \" + paymentType.toString());\n if (paymentType == Invoice.PaymentType.PAYMENT_CASH) {\n System.out.println(\"Change: $\" + String.format(\"%.2f\", (paid - total)));\n }\n\n System.out.println(\"Generating Receipt...\");\n o.markPaid();\n OrderMenuUI.incompleteOrders.remove(o);\n ArrayList<String> receipt = generateReceipt(o, total, paid, paymentType);\n System.out.println();\n receipt.forEach(System.out::println);\n String receiptName = \"-\";\n if (writeReceipt(receipt, o.getOrderID())) {\n receiptName = o.getOrderID() + \".txt\";\n }\n Invoice i = new Invoice(o, receiptName, paymentType, total, paid);\n MainApp.invoices.add(i);\n System.out.println(\"\\n\");\n System.out.println(\"Returning to Main Menu...\");\n return true;\n }", "boolean CanBuySettlement();", "public boolean isPaymentMethodCodeCreditCard() {\n AppCDef.PaymentMethod cdef = getPaymentMethodCodeAsPaymentMethod();\n return cdef != null ? cdef.equals(AppCDef.PaymentMethod.CreditCard) : false;\n }", "List<PaymentMethode> getSupportedPaymentMethods(AbstractOrder order);", "public interface CarPaymentMethod {\n\n /**\n * Choose PayPal payment option\n */\n CarPaymentMethod processPayPal();\n\n /**\n * Choose HotDollars payment option\n */\n CarPaymentMethod processHotDollars();\n\n /**\n * Choose CreditCard payment option\n */\n CarPaymentMethod processCreditCard();\n\n /**\n * Choosing saved payment methods\n */\n\n CarPaymentMethod processSavedVisa(String securityCode);\n\n CarPaymentMethod processSavedMasterCard(String securityCode);\n\n /**\n * Getting payment buttons\n */\n\n WebElement getPayPalRadioButton();\n\n WebElement getHotDollarsButton();\n\n WebElement getCreditCardField();\n\n WebElement getSavedCreditCardButton();\n\n WebElement getSavedVisaButton();\n\n WebElement getSavedMasterCardButton();\n\n String getNameOfChosenPaymentMethod();\n\n boolean isHotDollarsModuleAvailable();\n\n String getHotDollarsMessage();\n\n WebElement getPaymentOptionCreditCard();\n\n /**\n * Input card holder's initials for credit card\n */\n CarPaymentMethod cardHolder(String firstName, String lastName);\n\n /**\n * Input credit card attributes\n */\n CarPaymentMethod creditCardNumber(String cardNumber);\n\n CarPaymentMethod expDate(String cardExpMonth, String cardExpYear);\n\n CarPaymentMethod creditCardSecurityCode(String cardSecCode);\n\n CarPaymentMethod savedVisaSecurityCode(String cardSecCode);\n\n /**\n * Fill in card holder's address information\n */\n CarPaymentMethod city(String city);\n\n CarPaymentMethod country(String country);\n\n CarPaymentMethod state(String state);\n\n CarPaymentMethod billingAddress(String address);\n\n CarPaymentMethod zipCode(String zipCode);\n\n CarPaymentMethod continuePanel();\n\n /**\n * Filling PayPal payment fields\n */\n CarPaymentMethod payPalUser(String firstName, String lastName);\n\n CarPaymentMethod payPalAddress(String address);\n\n CarPaymentMethod payPalCity(String city);\n\n CarPaymentMethod payPalState(String state);\n\n CarPaymentMethod payPalZipCode(String zip);\n\n /**\n * Verify that billing section is present on the page\n */\n boolean isBillingSectionPresent();\n\n /**\n * Verify that billing section has only one Credit Card payment method\n */\n boolean isCreditCardIsSingleAvailablePayment();\n\n void saveMyInformation();\n\n void savePaymentInformation();\n\n WebElement getPasswordField();\n\n WebElement getConfirmPasswordField();\n\n boolean isSaveMyInfoExpanded();\n\n void chooseCreditCardPaymentMethod();\n\n boolean isSavedPaymentPresent();\n\n void typeCreditCardNameField(String ccNumber);\n\n\n}", "public boolean isSetPaymentAmountType() {\r\n return paymentAmountType != null;\r\n }", "public boolean hasPaymentGatewayApi() {\n return genClient.cacheHasKey(CacheKey.paymentGatewayApi);\n }", "public boolean isPaymentMethodCodeBankTransfer() {\n AppCDef.PaymentMethod cdef = getPaymentMethodCodeAsPaymentMethod();\n return cdef != null ? cdef.equals(AppCDef.PaymentMethod.BankTransfer) : false;\n }", "public boolean isBuyable();", "public void isReadyToPay(){\n\t\t\n\t\t//Checking whether cancel button should be active.\n\t\t//(only if there is at least one item in the order OR customer name is not empty)\n\t\tif(currentOrder.getOrderItems().size()==0 && custNameField.getText().equals(\"\"))\n\t\t\tcancelButton.setEnabled(false);\n\t\telse cancelButton.setEnabled(true);\n\t\t\n\t\tif(currentOrder.getOrderItems().size()==0){\n\t\t\tpayButton.setText(\"ORDER IS EMPTY\");\n\t\t\tpayButton.setEnabled(false);\n\t\t\tpayButton.setBackground(new Color(184,75,82));\n\t\t\treturn;\n\t\t}\n\n\t\t\n\t\tif(custNameField.getText().equals(\"\")){\n\t\t\tDimension goodSize = payButton.getSize(); // so that size will not change\n\t\t\tpayButton.setText(\"NO CUST. NAME\");\n\t\t\tpayButton.setEnabled(false);\n\t\t\tpayButton.setBackground(new Color(184,75,82));\n\t\t\tpayButton.setPreferredSize(goodSize);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tDimension goodSize = payButton.getSize(); // so that size will not change\n\t\tpayButton.setText(\"PAY\");\n\t\tpayButton.setBackground(Color.GREEN);\n\t\tpayButton.setEnabled(true);\n\t\tpayButton.setPreferredSize(goodSize);\n\t}", "@Test( groups ={\"PaymentMethodValidation\"})\r\n\t\r\n\tpublic static void PayLaterOption(){\r\n\r\n\t\ttry {\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\tPaymentMethod PaymentMethodObj \t= \tnew PaymentMethod() ;\r\n\t\t\t\r\n\t\t\tPaymentMethodObj.setPaymentMethod(\"PayLater\");\r\n\t\t\t\r\n\t\t\tCommonTestLibrary.launchDefaultProduct() ;\r\n\r\n\t\t\tAssert.assertEquals(CommonTestLibrary.purchaseProduct(\tTestApplicationParams.getDefaultUser(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTestApplicationParams.getDefaultShippingAddress(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTestApplicationParams.getDefaultBillingAddress(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPaymentMethodObj,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTestApplicationParams.getDefaultDiscount(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Address\"), true) ;\r\n\t\t\t\r\n\t\t\tWaitUtil.waitFor(Driver,\"THREAD_SLEEP\", (long)200);\t\r\n\t\t\tAssert.assertEquals(new FrontEndCommonPage(Driver).logout(),true) ;\t\t\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch ( TestException Te)\r\n\t\t{\r\n\t\t\tTestLog.logTestStep(\"Error/Exception : \" + Te.getExceptionName());\r\n\t\t\tTe.printException();\r\n\t\t\tassert(false);\r\n\t\t}\t\t\r\n\t\tcatch (InterruptedException e){\r\n\t\t\t//do nothing\t\t\r\n\t\t}\r\n\t\tcatch ( Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tTestLog.logTestStep(\"Error/Exception \" + e.getMessage());\r\n\t\t\tassert(false) ;\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic boolean isCanPaidMethodExp(CusBargainVo vo) {\n\t\treturn false;\n\t}", "public abstract PaymentType getPaymentType();", "public String getPayMethod() {\n return payMethod;\n }", "public boolean isAvailable() throws KKException\r\n {\r\n return isAvailable(MODULE_PAYMENT_CYBERSOURCESA_STATUS);\r\n }", "public boolean IsPayed(){\n\t\treturn payed;\n\t}", "public boolean isOverPaymentAllowed() {\n\t\treturn false;\n\t}", "@Test(description = \"Test Case 07: Verify that user is able to create a payment method using card.\", priority = 1)\n\tpublic void TC07_AddPaymentMethodForCard() throws Exception {\n\t\tVerifyUserAbleToAddPaymentMethod.logger.enterMethod();\n\t\tReporter.log(\"<br> Test Begins\");\n\n\t\tthis.result = Reporter.getCurrentTestResult();\n\t\tthis.result.setAttribute(\"tcid\", \"\");\n\n\t\t// Navigate to Configuration Tab\n\t\tthis.confPage = this.navPage.navigateToConfigurationPage();\n\t\tVerifyUserAbleToAddPaymentMethod.logger.debug(\"Navigate to Configuration Page\");\n\n\t\t// Select Payment Method from Configuration list\n\t\tthis.confPage = this.confPage.selectConfiguration(PageConfigurationItems.PaymentMethod);\n\t\tVerifyUserAbleToAddPaymentMethod.logger.debug(\"navigate to Paymentmethod\");\n\n\t\t// Add Payment Method for Card\n\t\tString paymentMethodName = this.confPage.addPaymentMethodWithoutMetaFields(PaymentMethodField.REECURRING,\n\t\t\t\t\"TC07_AddCardPaymentMethod\", \"apm\");\n\t\tthis.runTimeVariables.put(\"TC_07_PAYMENT_METHOD_NAME\", paymentMethodName);\n\t\tVerifyUserAbleToAddPaymentMethod.logger.debug(\"Add Payment Method for Card\");\n\n\t\t// Verify Payment Method Created Successfully Message Displayed\n\t\tthis.msgsPage = this.msgsPage.verifyDisplayedMessageText(\"Payment Method Type \", \"created successfully\", TextComparators.contains);\n\t\tVerifyUserAbleToAddPaymentMethod.logger.debug(\"Verify Message For Created Account Type\");\n\n\t\t// Validate Saved Payment Method Test Data\n\t\tthis.confPage = this.confPage.validatePeriodsSavedTestData(paymentMethodName);\n\t\tVerifyUserAbleToAddPaymentMethod.logger.debug(\"Validate Saved Account Type Test Data\");\n\n\t\tReporter.log(\"<br> Test Passed\");\n\t\tVerifyUserAbleToAddPaymentMethod.logger.exitMethod();\n\t}", "public String getPaymentMethod() {\n\t\treturn paymentMethod;\n\t}", "UserPayment validate(String cardHolderName,String cardType,String securityCode,String paymentType);", "boolean isBillingAvailable(String packageName);", "boolean hasTxnrequest();", "void setPaymentMethod(PaymentMethod paymentMethod);", "boolean isBillingSectionPresent();", "public boolean hasPaymentProcessorName() {\n return genClient.cacheHasKey(CacheKey.paymentProcessorName);\n }", "private boolean paymentIsPreferred(Payment p)\n\t{\n\t\tswitch(p.payer.defaultPaymentType)\n\t\t{\n\t\t\tcase CREDIT: \treturn (p.payee == restaurant);\n\t\t\tcase IOU_EMAIL:\treturn (p.payee == p.payer.defaultPayee);\n\t\t\tcase VENMO:\t\treturn (p.payee == p.payer.defaultPayee);\n\t\t\tdefault:\t\treturn false;\n\t\t}\n\t}", "private boolean tryPay() {\n return new Random().nextInt(100) + 1 <= 50;\n }", "public Object getPaymentMode() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic boolean isPaid() {\n\t\treturn false;\r\n\t}", "CarPaymentMethod processCreditCard();", "if(true==adhocTicket.isPaid()){\n System.out.println(\"isPaid() is passed\");\n }", "public boolean canTakeCharge();", "com.dogecoin.protocols.payments.Protos.Payment getPayment();", "boolean hasBuyDescribe();", "public void selectPaymentMethod(String payment) {\n\t\tif (payment == \"Cashless\")\n\t\t\tdriver.findElement(By.id(\"payBtn1\")).click();\n\t\tif (payment == \"Cash\")\n\t\t\tdriver.findElement(By.id(\"payBtn2\")).click();\n\t\tif (payment == \"Special\")\n\t\t\tdriver.findElement(By.id(\"payBtn3\")).click();\n\t}", "void pay(Payment payment) {\n\n\t}", "boolean hasBidrequest();", "boolean isXingPay(String url) {\n if (url.startsWith(\"https://gate.lfbpay.com\")) {\r\n return true;\r\n }\r\n return false;\r\n }", "@java.lang.Override\n public boolean hasPaymentDetailsVersion() {\n return instance.hasPaymentDetailsVersion();\n }", "public PaymentType getPaymentType()\n {\n return PAYMENT_TYPE;\n }", "boolean isAutoRedeem();", "boolean hasAmount();", "boolean hasAmount();", "@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}", "@java.lang.Override\n public boolean hasDidcommInvitation() {\n return deliveryMethodCase_ == 3;\n }", "protected void acceptedPaymentVerification() {\n BillingSummaryPage.tableBillingGeneralInformation.getRow(1)\n .getCell(\"Current Due\").waitFor(cell -> !cell.getValue().equals(\"Calculating...\"));\n\n assertThat(BillingSummaryPage.tableBillingGeneralInformation.getRow(1))\n .hasCellWithValue(\"Current Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Paid\", modalPremiumAmount.get().toString());\n\n assertThat(BillingSummaryPage.tableBillsAndStatements.getRow(1).getCell(\"Status\")).valueContains(PAID_IN_FULL);\n\n assertThat(BillingSummaryPage.tablePaymentsOtherTransactions)\n .with(POLICY_NUMBER, masterPolicyNumber.get())\n .with(TYPE, PAYMENT)\n .with(TableConstants.BillingPaymentsAndTransactionsGB.AMOUNT, String.format(\"(%s)\", modalPremiumAmount.get().toString()))\n .containsMatchingRow(1);\n\n }", "public String getPaymentType() {\r\n return paymentType;\r\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderPayment getPayment();", "@NotNull(message = \"empty.paymentType\")\n public PaymentType getPaymentType() {\n\n return paymentType;\n }", "boolean isSetCapitalPayed();", "String getPaymentInformation();", "public void autoPay() {}", "@java.lang.Override\n public boolean hasDidcommInvitation() {\n return deliveryMethodCase_ == 3;\n }", "boolean hasExchangeprice();", "@java.lang.Override\n public boolean hasSerializedPaymentDetails() {\n return instance.hasSerializedPaymentDetails();\n }", "CarPaymentMethod processHotDollars();", "public boolean isNotNullPaymentProcessorName() {\n return genClient.cacheValueIsNotNull(CacheKey.paymentProcessorName);\n }", "@Override\n public byte getType() {\n return TYPE_PAYMENT;\n }", "public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }", "@Test\n public void testQueRequests() {\n PaymentMethodViewModel viewModel = new PaymentMethodViewModel(\n getAvailablePaymentMethods\n );\n\n // And I don't have internet connection\n viewModel.setIsNetworkAvailable(false);\n\n // When I request payment methods\n viewModel.getAvailablePaymentMethods();\n\n // Then I should not request the payment method list\n Mockito.verify(getAvailablePaymentMethods, Mockito.times(0)).execute(\n Mockito.any()\n );\n\n // And failures should be NetworkFailure\n assertThat(viewModel.getFailureLiveData().getValue())\n .isInstanceOf(CheckoutFailure.ConnectivityError.class);\n\n // When I get internet connectivity\n viewModel.setIsNetworkAvailable(true);\n\n // Then I should request payment methods automatically\n Mockito.verify(getAvailablePaymentMethods, Mockito.times(1))\n .execute(Mockito.any());\n }", "@Override\n\tpublic boolean isExistRepayment(String originalWaybillNo) {\n\t\treturn false;\n\t}", "boolean hasDonator();", "public boolean savepayment(Payment payment) {\n\t\treturn false;\n\t}", "public boolean isDepositOptionPaymentBlnVisible() {\r\n\t\treturn this.driverUtil.checkElementPresent(By.xpath(labelDepositOptionPaymentYesXPath));\r\n\t}", "public void setPayMethod(String value) {\n this.payMethod = value;\n }", "public boolean isCheckoutButtonPresent() {\n\t\ttry{\n\t\t\tdriver.findElement(By.xpath(\"//android.view.View[@resource-id='\" + checkout + \"']\"));\n\t\t\treturn true;\n\t\t} catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}" ]
[ "0.785183", "0.785183", "0.7358909", "0.7189975", "0.7145477", "0.7130612", "0.7033643", "0.703235", "0.70143855", "0.6904154", "0.6893591", "0.68563586", "0.68443036", "0.66695803", "0.6616592", "0.65459114", "0.6512581", "0.64787227", "0.64192086", "0.641647", "0.6382009", "0.6332939", "0.63178223", "0.6279858", "0.626189", "0.62273675", "0.6220261", "0.6216293", "0.6187828", "0.6142397", "0.6115125", "0.6111678", "0.6111678", "0.6094321", "0.6086671", "0.6061503", "0.6058266", "0.6048088", "0.6023747", "0.602238", "0.6011536", "0.60081875", "0.5987395", "0.59765816", "0.59638953", "0.5962818", "0.59439963", "0.5929264", "0.5914857", "0.5904541", "0.5886408", "0.5877544", "0.5858173", "0.5856419", "0.58406985", "0.5833864", "0.582567", "0.5812085", "0.5810674", "0.5804991", "0.5790399", "0.57828647", "0.57751054", "0.5769963", "0.57662207", "0.5749997", "0.574744", "0.57155955", "0.56996423", "0.56972575", "0.56955963", "0.5694885", "0.5689927", "0.5686496", "0.5685303", "0.56669843", "0.5658348", "0.5658348", "0.56571215", "0.5648355", "0.5624334", "0.56174374", "0.5593708", "0.55902755", "0.55894744", "0.55886495", "0.558348", "0.5582924", "0.5578802", "0.55773515", "0.5570718", "0.5568484", "0.5552348", "0.55508703", "0.5542617", "0.5541072", "0.55374724", "0.5536518", "0.5535368", "0.551976", "0.551219" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { modificarHora1 = new javax.swing.JButton(); sendHour1 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); clock1 = new javax.swing.JTextArea(); jScrollPane2 = new javax.swing.JScrollPane(); clock2 = new javax.swing.JTextArea(); jScrollPane3 = new javax.swing.JScrollPane(); clock3 = new javax.swing.JTextArea(); host1 = new javax.swing.JLabel(); host2 = new javax.swing.JLabel(); host3 = new javax.swing.JLabel(); modificarHora2 = new javax.swing.JButton(); sendHour2 = new javax.swing.JButton(); sendHour3 = new javax.swing.JButton(); modificarHora3 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); modificarHora1.setText("Modificar Hora"); modificarHora1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { modificarHora1ActionPerformed(evt); } }); sendHour1.setText("Enviar"); sendHour1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sendHour1ActionPerformed(evt); } }); jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); clock1.setColumns(20); clock1.setFont(new java.awt.Font("Avenir", 1, 90)); // NOI18N clock1.setRows(5); jScrollPane1.setViewportView(clock1); jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); clock2.setColumns(20); clock2.setFont(new java.awt.Font("Avenir", 1, 90)); // NOI18N clock2.setRows(5); jScrollPane2.setViewportView(clock2); jScrollPane3.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane3.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); clock3.setColumns(20); clock3.setFont(new java.awt.Font("Avenir", 1, 90)); // NOI18N clock3.setRows(5); jScrollPane3.setViewportView(clock3); modificarHora2.setText("Modificar Hora"); modificarHora2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { modificarHora2ActionPerformed(evt); } }); sendHour2.setText("Enviar"); sendHour2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sendHour2ActionPerformed(evt); } }); sendHour3.setText("Enviar"); sendHour3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sendHour3ActionPerformed(evt); } }); modificarHora3.setText("Modificar Hora"); modificarHora3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { modificarHora3ActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(host3, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(host2, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(host1, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGap(47, 47, 47) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addComponent(modificarHora1) .addGap(35, 35, 35) .addComponent(sendHour1)) .addGroup(layout.createSequentialGroup() .addComponent(modificarHora2) .addGap(35, 35, 35) .addComponent(sendHour2))) .addGroup(layout.createSequentialGroup() .addComponent(modificarHora3) .addGap(35, 35, 35) .addComponent(sendHour3))) .addContainerGap(26, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(30, 30, 30) .addComponent(host1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(77, 77, 77) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(modificarHora1) .addComponent(sendHour1))) .addGroup(layout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE) .addComponent(host2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(64, 64, 64) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(modificarHora2) .addComponent(sendHour2)))) .addGap(22, 22, 22) .addComponent(host3, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(26, 26, 26)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(modificarHora3) .addComponent(sendHour3)) .addGap(75, 75, 75)))) ); pack(); setLocationRelativeTo(null); }
{ "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 LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\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 Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "0.6944929", "0.6942576", "0.69355655", "0.6931378", "0.6927896", "0.69248974", "0.6924723", "0.69116884", "0.6910487", "0.6892381", "0.68921053", "0.6890637", "0.68896896", "0.68881863", "0.68826133", "0.68815064", "0.6881078", "0.68771756", "0.6875212", "0.68744373", "0.68711984", "0.6858978", "0.68558776", "0.6855172", "0.6854685", "0.685434", "0.68525875", "0.6851834", "0.6851834", "0.684266", "0.6836586", "0.6836431", "0.6828333", "0.68276715", "0.68262815", "0.6823921", "0.682295", "0.68167603", "0.68164384", "0.6809564", "0.68086857", "0.6807804", "0.6807734", "0.68067646", "0.6802192", "0.67943805", "0.67934304", "0.6791657", "0.6789546", "0.6789006", "0.67878324", "0.67877173", "0.6781847", "0.6765398", "0.6765197", "0.6764246", "0.6756036", "0.6755023", "0.6751404", "0.67508715", "0.6743043", "0.67387456", "0.6736752", "0.67356426", "0.6732893", "0.6726715", "0.6726464", "0.67196447", "0.67157453", "0.6714399", "0.67140275", "0.6708251", "0.6707117", "0.670393", "0.6700697", "0.66995865", "0.66989213", "0.6697588", "0.66939527", "0.66908985", "0.668935" ]
0.0
-1
in DialogForButton.java this var is used
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().setAllowEnterTransitionOverlap(false); getWindow().setAllowReturnTransitionOverlap(false); setContentView(R.layout.activity_tagging); mListView = (ListView) findViewById(R.id.listViewIdForTag); ListItemForTags item1 = new ListItemForTags("$20", "Tesco", "12/3.2018", "Please select the adequate TAG for this payment"); ListItemForTags item2 = new ListItemForTags("$120", "BritishGas", "12/3.2018", "Please select the adequate TAG for this payment"); ListItemForTags item3 = new ListItemForTags("$234", "Sainsbury", "11/3.2018", "Please select the adequate TAG for this payment"); ListItemForTags item4 = new ListItemForTags("$230", "Amazon", "10/3.2018", "Please select the adequate TAG for this payment"); ListItemForTags item5 = new ListItemForTags("$45", "eBay", "12/2.2018", "Please select the adequate TAG for this payment"); ListItemForTags item6 = new ListItemForTags("$67", "Tesco", "12/2.2018", "Please select the adequate TAG for this payment"); ListItemForTags item7 = new ListItemForTags("$89", "Tesco", "9/2.2018", "Please select the adequate TAG for this payment"); ListItemForTags item8 = new ListItemForTags("$567", "Landlord", "9/2.2018", "Please select the adequate TAG for this payment"); ListItemForTags item9 = new ListItemForTags("$56", "Tesco", "9/2.2018", "Please select the adequate TAG for this payment"); ListItemForTags item10 = new ListItemForTags("$23", "Tesco", "9/2.2018", "Please select the adequate TAG for this payment"); ListItemForTags item11 = new ListItemForTags("$46", "Tesco", "9/2.2018", "Please select the adequate TAG for this payment"); ListItemForTags item12 = new ListItemForTags("$56", "Tesco", "9/2.2018", "Please select the adequate TAG for this payment"); transactionList = new ArrayList<>(); transactionList.add(item1); transactionList.add(item2); transactionList.add(item3); transactionList.add(item4); transactionList.add(item5); transactionList.add(item6); transactionList.add(item7); transactionList.add(item8); transactionList.add(item9); transactionList.add(item10); transactionList.add(item11); transactionList.add(item12); adapter = new TagsListItemAdapter(this, R.layout.adapter_view_for_tag, transactionList); mListView.setAdapter(adapter); //code for nav bar BottomNavigationView bottomNavigationView = (BottomNavigationView) findViewById(R.id.bottomNavView_Bar); BottomNavigationViewHelper.disableShiftMode(bottomNavigationView); Menu menu = bottomNavigationView.getMenu(); MenuItem menuItem = menu.getItem(2); menuItem.setChecked(true); bottomNavigationView.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.ic_home: Intent intent0 = new Intent(Tagging.this, MainActivity.class); startActivity(intent0); overridePendingTransition(0, 0); break; case R.id.ic_pie: Intent intent1 = new Intent(Tagging.this, FullStatement.class); startActivity(intent1); overridePendingTransition(0, 0); break; case R.id.ic_money: break; case R.id.ic_settings: Intent intent3 = new Intent(Tagging.this, Feedback.class); startActivity(intent3); overridePendingTransition(0, 0); break; } return false; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onDialogMenuPressed() {\n\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int button) {\n\t\t\t}", "@Override\r\n public void onClick(final DialogInterface dialog, final int whichButton) {\r\n }", "@Override\r\n \t\t\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n \t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int id)\n {\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override \n public void onClick(DialogInterface dialog, int which) {\n \n }", "@Override\n public void onClick(\n DialogInterface dialog,\n int which) {\n }", "@Override \n\t\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t\t \t\n\t\t\t }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "private void initDialog() {\n }", "@Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t \t\n\t\t\t\t\t }", "@Override \n\t\t\t\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t \t\n\t\t\t\t\t }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n \n }", "@Override\n public void OnCancelButtonPressed() {\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n\n }", "@Override\n public void OnCancelButtonPressed() {\n }", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id)\n {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id)\n {\n }", "@Override\n public void onClick(DialogInterface dialog, int id)\n {\n }", "@Override\n public void onClick(DialogInterface dialog, int id)\n {\n }", "@Override\n public void onClick(DialogInterface dialog, int id)\n {\n }", "@Override\n public void onClick(DialogInterface dialog, int id)\n {\n }", "@Override\n public void onClick(DialogInterface dialog, int id)\n {\n }", "@Override\n public void onClick(DialogInterface dialog, int id)\n {\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n\t\t\t public void onClick(DialogInterface arg0, int arg1) {\n\t\t\t \n\n\t\t\t\t\t\t\t\n\n\n\t\t\t \n\t\t\t }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "protected Button getOkButton()\r\n\t{\r\n\t\treturn okButton;\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "public int getButtonID(){return i_ButtonID;}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t}", "@Override\n \t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n \t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\n\t\t\t\t\t}" ]
[ "0.6866988", "0.6855853", "0.6762204", "0.66532236", "0.65624", "0.65458626", "0.65458626", "0.65458626", "0.65317947", "0.65317947", "0.65251404", "0.65251404", "0.65231067", "0.65228367", "0.6522226", "0.6522226", "0.6522226", "0.6522226", "0.6522147", "0.6522147", "0.65198374", "0.6513183", "0.6508772", "0.6504502", "0.6500786", "0.6500786", "0.64851946", "0.64851946", "0.64825815", "0.64825815", "0.64825815", "0.64825815", "0.64825815", "0.64825815", "0.64825815", "0.64825815", "0.64825815", "0.64825815", "0.64825815", "0.64740366", "0.64719385", "0.64719385", "0.64702004", "0.64702", "0.6458142", "0.6458142", "0.64466614", "0.6444354", "0.64419675", "0.6429129", "0.64240694", "0.64187205", "0.64187205", "0.64187205", "0.64187205", "0.64187205", "0.64187205", "0.64187205", "0.63997024", "0.63990253", "0.6398734", "0.63968736", "0.63968736", "0.638296", "0.638296", "0.638296", "0.638296", "0.638296", "0.638296", "0.638296", "0.63824475", "0.63824475", "0.63824475", "0.63824475", "0.63824475", "0.6378568", "0.6378437", "0.6378437", "0.6378437", "0.6370169", "0.63687587", "0.6366268", "0.6362576", "0.63572437", "0.63572437", "0.63572437", "0.63560444", "0.63560444", "0.63560444", "0.63560444", "0.63560444", "0.6355554", "0.6355335", "0.6355335", "0.6355335", "0.6355335", "0.63394403", "0.6334334", "0.63320976", "0.6313186", "0.6313186" ]
0.0
-1
validp separado por underline _
public static void main(String[] args) { String variavel_seprada_com_underline; //padrao camelCase String variavelJuntaComCamelCase; // valido porem estranho int _numero = 1; System.out.println(_numero); //valido porem mais estranho ainda! Parece PHP int $outroNumero = 1; System.out.println($outroNumero); /* * nao pode iniciar com caracteres especiais String 1um; int @arroba; String *texto */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String underline(String message) {\n return \"__\" + message + \"__\";\n }", "public static String formatText(String t) {\r\n if (t.length() > 0) {\r\n char chars[] = t.toCharArray();\r\n for (int index = 0; index < chars.length; index++)\r\n if (chars[index] == '_') {\r\n chars[index] = ' ';\r\n if (index + 1 < chars.length && chars[index + 1] >= 'a' && chars[index + 1] <= 'z')\r\n chars[index + 1] = (char) ((chars[index + 1] + 65) - 97);\r\n }\r\n\r\n if (chars[0] >= 'a' && chars[0] <= 'z')\r\n chars[0] = (char) ((chars[0] + 65) - 97);\r\n return new String(chars);\r\n } else {\r\n return t;\r\n }\r\n }", "public static String formatSpaces(String s) {\n\t\tif(s.contains(\"underscores\"))\n\t\treturn s.replaceAll(\" \", \"_\");\n\t\t\n\t\treturn s;\n\t}", "Rule IndentChar() {\n return FirstOf(Letter(), Digit(), \".\", \"_\");\n }", "private static boolean mirarSiTerminado(char[] a) {\r\n\t\tboolean terminado = true;\r\n\t\tfor (int i = 0; i <= a.length - 1; i++) {// COMPRUEBO QUE NO HAYA '_'\r\n\t\t\tif (a[i] == '_') {\r\n\t\t\t\tterminado = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn terminado;\r\n\t}", "public static SpannableString getNormalUnderlineString(String normalStr, String underlineStr) {\n SpannableString ss;\n\n if (TextUtils.isEmpty(normalStr))\n normalStr = \"\";\n\n if (TextUtils.isEmpty(underlineStr)) {\n ss = new SpannableString(normalStr);\n } else {\n int pos = underlineStr.length();\n\n ss = new SpannableString(normalStr + underlineStr);\n //ss.setSpan(new ForegroundColorSpan(Color.WHITE), 0, pos, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n ss.setSpan(new UnderlineSpan(), normalStr.length(), normalStr.length() + underlineStr.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n //ss.setSpan(new ForegroundColorSpan(Color.GRAY), pos + 2, boldStr.length() + normalStr.length() + 2, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n }\n\n return ss;\n }", "@Test\n public void spacesInKeywordTest() {\n tester.correct(\"Laaa Laaa Laaaa Li\" );\n }", "public String formatSpaceBetweenWords(String line) {\r\n line = line.replaceAll(\"\\\\s+\", \" \"); \r\n line = line.toLowerCase();\r\n line = oneSpaceSpecial(line, \".\");\r\n line = oneSpaceSpecial(line, \",\");\r\n line = oneSpaceSpecial(line, \":\");\r\n line = oneSpaceSpecial(line, \"\\\"\");\r\n return line.trim();\r\n }", "public static String formatSpaces(String s) {\n \tString temp = s;\n \tif(s.contains(\"underscores\")) temp = s.replace(\" \", \"_\");\n return temp;\n }", "public static String formatSpaces(String s) {\n\t\t\n\t\tif(s.contains(\"underscores\")==true) {\n\t\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\t\tif(s.charAt(i)==' ') {\n\t\t\t\t\tString t1=s.substring(0, i);\n\t\t\t\t\tString t2=s.substring(i+1, s.length());\n\t\t\ts=t1+\"_\"+t2;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\treturn s;\n\t}", "public boolean isUnderlined() { return false; }", "public static String underlineItalic(String message) {\n return \"__*\" + message + \"*__\";\n }", "public String getUnderline() {\n return underline.getText(); /*FAULT:: return \"y\"; */\n }", "private String sanitize(String str) {\n\t\tstr = str.replace(COMPLETION_LEFT_SEP, \n\t\t\t\tCOMPLETION_LEFT_SEP + COMPLETION_LEFT_SEP);\n\t\tstr = str.replace(COMPLETION_RIGHT_SEP, \n\t\t\t\tCOMPLETION_RIGHT_SEP + COMPLETION_RIGHT_SEP);\n\t\treturn str;\n\t}", "public static String formatTitle(String title)\n {\n char[] temp = title.trim().toCharArray();\n int count = 0;\n for (char c : temp) {\n if (c == ' ') {\n temp[count] = '_';\n } else if (c == '_') {\n temp[count] = ' ';\n }\n count++;\n }\n \n return String.valueOf(temp);\n \n }", "private String replaceSpaces(String value) {\r\n\t\treturn value.replace(\" \", \"_\");\r\n\t}", "private String validateWord (String word) {\r\n String chars = \"\";\r\n for (int i = 0; i < word.length (); ++i) {\r\n if (!Character.isLetter (word.charAt (i))) {\r\n chars += \"\\\"\" + word.charAt (i) + \"\\\" \";\r\n }\r\n }\r\n return chars;\r\n }", "private static String toWebSafe(String str) {\n final var result = PATTERN_COLON.matcher(str)\n .replaceAll(DASH);\n return result;\n }", "static private String formats(String target)\n\t{\n\t\tString tmp = target.trim();\n\t\tif (tmp.length() < 1) return \"NaName\";\n\t\treturn (Character.toString(tmp.charAt(0)).toUpperCase()) + tmp.substring(1,tmp.length()).toLowerCase();\n\t}", "private boolean checkSpacingTabs(){\r\n\t\tString tmp = \"\";\r\n\t\ttry{ tmp = doc.getText(getCaretPosition()-2,1); }\r\n\t\tcatch(BadLocationException a){};\r\n\t\tSystem.out.println((int)tmp.charAt(0));\r\n\t\tif(tmp.charAt(0) == 9) return true;\r\n\t\telse return false;\r\n\t}", "private String putUnderscore(String concept) {\n\t\tStringBuffer newConcept = new StringBuffer(\"\");\n\t\t// concept = concept.replace(\" \", \"_\");\n\t\tStringTokenizer token = new StringTokenizer(concept, \" \");\n\t\tboolean firstTest = true;\n\t\twhile (token.hasMoreTokens()) {\n\t\t\tif (!firstTest) {\n\t\t\t\tnewConcept.append(\"_\");\n\t\t\t}\n\t\t\tfirstTest = false;\n\t\t\tString str = (String) token.nextElement();\n\t\t\tnewConcept.append(str);\n\t\t}\n\n\t\tconcept = newConcept.toString();\n\n\t\treturn concept;\n\n\t}", "private String formatLatex(String text){\r\n\r\n String output=text.replaceAll(\"_\",\"-\");\r\n\r\n return output;\r\n }", "String canonHr(String s) {\n List<String> l = StringUtil.breakAt(s, \":\");\n if (l.size() == 2) {\n return l.get(0) + \":\" + l.get(1).toUpperCase();\n }\n return s.toUpperCase();\n }", "boolean hasPunctuationToAppend();", "private final static String stripDash( String s ) {\n\n StringTokenizer tokDash = new StringTokenizer(s, \"-\");\n\n if (tokDash.countTokens() > 1) {\n return tokDash.nextToken();\n } else {\n return s;\n }\n\n }", "Rule WhiteSpace() {\n return ZeroOrMore(AnyOf(\" \\n\\r\\t\\f\"));\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "private boolean alpha() {\r\n return letter() || CATS(Nd) || CHAR('-') || CHAR('_');\r\n }", "private boolean isAbbreviation(String word) {\n\n boolean abbr = true;\n String[] parts = word.split(\"\\\\.\");\n for (String part : parts) {\n if (part.length() > 1 || !Pattern.matches(\"[a-zA-Z]\", part)) {\n abbr = false;\n break;\n }\n }\n return abbr;\n }", "private boolean getReplaceNonBreakingSpace() {\n return false;\n }", "public static String fmtSqlIdentifier(String toClean) {\n\t\tString regex = \"[^0-9a-zA-Z_]+\";\n\t\tString ret = toClean.replaceAll(regex, \"_\");\n\t\tif(ret.length() > 50)\n\t\t\tret = ret.substring(0, 50);\n\t\treturn ret;\n\t}", "@Test\n public void noSpacesBetweenKeywordsTest() {\n tester.yields(\"LaLaLaLaLaaaLi\", lala.EXPRESSION);\n }", "public static String lineLeader(String s1, String s2, String s3) {\n\t\t\n\t\tString[] last1 = s1.split(\"\");\n\t\tString[] last2 = s2.split(\"\");\n\t\tString[] last3 = s3.split(\"\");\n\t\t\n\t\t\n\t\tString char1 = null;\n\t\tString char2 = null;\n\t\tString char3 = null;\n\t\t\n\t\tString[] abcs = {\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\",\"L\",\"M\",\"N\",\"O\",\"P\",\"Q\",\"R\",\"S\",\"T\",\"U\",\"V\",\"W\",\"X\",\"Y\",\"Z\"};\n\t\t\n\t\tfor (int i = 2; i < last1.length; i++) {\n\t\t\tif(!last1[i].equals(\" \") && last1[i - 1].equals(\" \") && !last1[i - 2].equals(\" \")) {\n\t\t\t\tchar1 = last1[i];\n\t\t\t\t//System.out.println(char1);\n\t\t\t}\n\n\t\t}\n\t\tfor (int i = 2; i < last2.length; i++) {\n\n\t\t\tif(!last2[i].equals(\" \") && last2[i - 1].equals(\" \") && !last2[i - 2].equals(\" \")) {\n\t\t\t\tchar2 = last2[i];\n\t\t\t\t//System.out.println(char2);\n\n\t\t\t}\n\n\t\t}\n\t\tfor (int i = 2; i < last3.length; i++) {\n\n\t\t\tif(!last3[i].equals(\" \") && last3[i - 1].equals(\" \") && !last3[i - 2].equals(\" \")) {\n\t\t\t\tchar3 = last3[i];\n\t\t\t\t//System.out.println(char3);\n\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < abcs.length; i++) {\n\t\t\tif(char1.contains(abcs[i])) {\n\t\t\t\t//System.err.println(s1.replaceAll(\" \", \"\").substring(0, s1.replaceAll(\" \", \"\").length()-1) + \" \" + char1);\n\t\t\t\treturn s1.replaceAll(\" \", \"\").substring(0, s1.replaceAll(\" \", \"\").length()-1) + \" \" + char1;\n\t\t\t}\n\t\t\tif(char2.contains(abcs[i])) {\n\t\t\t\t//System.err.println(s2.replaceAll(\" \", \"\").substring(0, s2.replaceAll(\" \", \"\").length()-1) + \" \" + char2);\n\n\t\t\t\treturn s2.replaceAll(\" \", \"\").substring(0, s2.replaceAll(\" \", \"\").length()-1) + \" \" + char2;\n\t\t\t}\n\t\t\tif(char3.contains(abcs[i])) {\n\t\t\t\t///System.err.println(s3.replaceAll(\" \", \"\").substring(0, s3.replaceAll(\" \", \"\").length()-1) + \" \" + char3);\n\t\t\t\treturn s3.replaceAll(\" \", \"\").substring(0, s3.replaceAll(\" \", \"\").length()-1) + \" \" + char3;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\n\t}", "@Override\n\tprotected String formatted(Walue _) {\n\t\treturn \"\";\n\t}", "public void testShouldAddColonExceptSpace(){\n indentlogic.addText(\"except \\n\");\n assertTrue(indentlogic.shouldAddColon());\n }", "private String format(String text) {\n if(text != null && !text.isEmpty())\n return text.substring(0, 1).toUpperCase(Locale.ENGLISH) + text.substring(1);\n else\n return \"\";\n }", "private boolean isAlpha(char toCheck) {\n return (toCheck >= 'a' && toCheck <= 'z') ||\n (toCheck >= 'A' && toCheck <= 'Z') ||\n toCheck == '_';\n }", "private String trimSponsorName( String sponsorName ){\r\n String dispSponsorName = sponsorName ;\r\n if( dispSponsorName == null ){\r\n dispSponsorName = \"\";\r\n //Modified for case#3341 - Sponsor Code Validation - start \r\n }else if( dispSponsorName.length() > 80 ){\r\n dispSponsorName = dispSponsorName.substring( 0, 80 ) + \"...\" ;\r\n }\r\n dispSponsorName = \" \"+dispSponsorName;\r\n //Modified for case#3341 - Sponsor Code Validation - end\r\n return dispSponsorName;\r\n }", "public static String prettifyText(String ugly) {\n\t\tString[] nameParts = ugly.split(\"_\");\n\t\tif (nameParts.length==1) {\n\t\t\treturn firstUppercase(ugly);\n\t\t}\n\n\t\tStringBuilder sb=new StringBuilder();\n\t\tfor (String part : nameParts) {\n\t\t\tsb.append(firstUppercase(part)+\" \");\n\t\t}\n\n\t\treturn sb.toString();\n\t}", "public static String underlineBoldItalic(String message) {\n return \"__***\" + message + \"***__\";\n }", "private String normalizeSpace(final String arg) {\n return arg.replaceAll(Constants.SPACE_PATTERN, Constants.SPACE);\n }", "@Test //TEST FOUR\n void testSpacesAndCapitalsBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"Netherland Dwarf\");\n assertTrue(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z-][a-zA-z- ]*\"));\n }", "static String correctParagraph(String paragraph) {\n\n\t\t\tString newText = paragraph.replaceAll(\"\\\\s{2,}+\", \" \");\n\n\t\t\tnewText = newText.replaceAll(\"\\\\s+,\", \",\");\n\t\t\tnewText = newText.replaceAll(\"\\\\s+\\\\.\", \".\");\n\n\n\t\t\tString firstLetter = newText.substring(0, 1).toUpperCase();\n\t\t\tnewText = firstLetter + newText.substring(1);\n\n\t\t\tString[] sentences = newText.split(\"\\\\.\");\n\t\t\tfor(int i = 0; i < sentences.length; i++){\n\t\t\t\tString temp = sentences[i].trim();\n\t\t\t\tfirstLetter = temp.substring(0, 1).toUpperCase();\n\t\t\t\tsentences[i] = firstLetter + temp.substring(1);\n\t\t\t}\n\t\t\tStringBuilder newParagraph = new StringBuilder(sentences[0]);\n\t\t\tfor(int i = 1; i < sentences.length; i++){\n\t\t\t\tnewParagraph.append(\". \").append(sentences[i]);\n\t\t\t}\n\t\t\tnewText = newParagraph.append(\".\").toString();\n\n\t\t\treturn newText;\n\t\t}", "public String propergram(String word){\n // word.toLowerCase();\n String[] tempstr =word.split(\"_\");\n String tempstr2;\n\n for(int i=0;i<tempstr.length;i++){\n if((tempstr[i].charAt(0))>='A'&&(tempstr[i].charAt(0))<='Z') {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0)));\n }\n else {\n tempstr2 = (String.valueOf(tempstr[i].charAt(0))).toUpperCase();\n }\n tempstr[i] = tempstr2.concat(tempstr[i].substring(1));\n if (i != 0) {\n word=word.concat(\" \").concat(tempstr[i]);\n } else {\n word = tempstr[i];\n }\n\n }\n return word;\n\n\n }", "public static String underscoreName(String name) {\n\t\treturn name.substring(0, 1).toLowerCase() + name.substring(1).replaceAll(\"([A-Z])\", \"_$1\").toLowerCase();\n\t}", "private boolean isOneSpace(final String message) {\n\t\treturn message.contains(\"1 space\"); //$NON-NLS-1$\n\t}", "private void underlineLabelText(JLabel label) {\n Font font = label.getFont();\n Map attributes = font.getAttributes();\n attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);\n label.setFont(font.deriveFont(attributes));\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "private String getFormattedName(String bossName) {\r\n\t\tString[] startingLetters = { \"corporeal\", \"king black\", \"nomad\", \"tormented\", \"avatar\" };\r\n\t\tfor(int i = 0; i < startingLetters.length; i++)\r\n\t\t\tif(bossName.toLowerCase().contains(startingLetters[i].toLowerCase()))\r\n\t\t\t\treturn \"the \"+bossName;\r\n\t\treturn bossName;\r\n\t}", "public String acronym(String phrase) {\n String accrStr = phrase.replaceAll(\"\\\\B.|\\\\P{L}\", \"\").toUpperCase();\n return accrStr;\n }", "public static String toPropertyStyle(String s)\r\n {\r\n if (isEmpty(s))\r\n return s;\r\n\r\n StringBuffer buf = new StringBuffer();\r\n buf.append(Character.toLowerCase(s.charAt(0)));\r\n boolean uppercase = false;\r\n for (int i = 1; i < s.length(); i++)\r\n {\r\n char c = s.charAt(i);\r\n if (c == '_')\r\n {\r\n uppercase = true;\r\n }\r\n else\r\n {\r\n buf.append(uppercase ? Character.toUpperCase(c) : Character.toLowerCase(c));\r\n uppercase = false;\r\n }\r\n }\r\n return buf.toString();\r\n }", "private static String sanitize(String input) {\n input = input.replaceAll(\"[^A-Za-z0-9_]\", \"\").toLowerCase();\n if (input.matches(\"[0-9]+\") || input.startsWith(\"href\")) {\n return \"\";\n }\n return input;\n }", "static String m33126a(String name, String separator) {\n StringBuilder translation = new StringBuilder();\n int length = name.length();\n for (int i = 0; i < length; i++) {\n char character = name.charAt(i);\n if (Character.isUpperCase(character) && translation.length() != 0) {\n translation.append(separator);\n }\n translation.append(character);\n }\n return translation.toString();\n }", "private String createDashedLine(){\n return \"- \".repeat(Math.max(0, this.columns));\n }", "public void setUnderline(byte underline) {\n\t\tthis.underline = underline;\n\t}", "private static String zzty(String string2) {\n StringBuffer stringBuffer = new StringBuffer();\n int n = 0;\n while (n < string2.length()) {\n char c = string2.charAt(n);\n if (n == 0) {\n stringBuffer.append(Character.toLowerCase(c));\n } else if (Character.isUpperCase(c)) {\n stringBuffer.append('_').append(Character.toLowerCase(c));\n } else {\n stringBuffer.append(c);\n }\n ++n;\n }\n return stringBuffer.toString();\n }", "public static String underlineBold(String message) {\n return \"__**\" + message + \"**__\";\n }", "private String createAcronym(String phrase) {\n String[] words = phrase.split(\"\\\\W+|(?<=\\\\p{Lower})(?=\\\\p{Upper})|(?<=\\\\p{Upper})(?=\\\\p{Upper}\\\\p{Lower})\");\n StringBuffer acronym = new StringBuffer();\n for (int i = 0; i < words.length; i++) {\n acronym.append(words[i].substring(0,1).toUpperCase());\n }\n return acronym.toString();\n }", "private String extarctStudentName(String record) throws noStudentNameException{\n\t\tString name = record.substring(0, record.indexOf(':'));\n\t\tname = name.trim();\n\t\tcheckNameValidation(name);\n\t\treturn name;\n\t}", "@Override\n public String toString() {\n String name = this.name().substring(0,1);\n if (this.name().length() > 1) {\n for (int i = 1; i < this.name().length(); i++) {\n String charAt = this.name().substring(i, i + 1);\n if (charAt.equals(\"_\"))\n charAt = \" \";\n name += charAt.toLowerCase();\n }\n }\n return name;\n }", "public String quitaespacios (String str) {\n\n str = repNull(str);\n str = str.trim();\n str = rep(str, \"[ ]{2,}\", \" \");\n\n return str;\n }", "private String formatTitle(String source) {\r\n if (source.equalsIgnoreCase(\"Robles Ms Et Al. Plos Genet. (2014)\")) {\r\n return \"Robles MS et al. PloS Genet.(2014)\";\r\n }\r\n\r\n StringBuilder res = new StringBuilder();\r\n source = source.toLowerCase();\r\n String[] strArr = source.split(\" \");\r\n for (String str : strArr) {\r\n char[] stringArray = str.trim().toCharArray();\r\n stringArray[0] = Character.toUpperCase(stringArray[0]);\r\n str = new String(stringArray);\r\n res.append(str).append(\" \");\r\n }\r\n return res.toString().trim();\r\n }", "private String escape(String name) {\n return name.replaceAll(\"[^a-zA-Z0-9.-]\", \"_\");\n }", "@Test //TEST FIVE\n void testSpacesAndLowercaseBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"silver fox\");\n assertTrue(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z-][a-zA-z- ]*\"));\n }", "protected void validateFirstName(){\n Boolean firstName = Pattern.matches(\"[A-Z][a-z]{2,}\",getFirstName());\n System.out.println(nameResult(firstName));\n }", "public static String toUnderscoreSeparated(final String javaName) {\n requireNonNull(javaName);\n final StringBuilder result = new StringBuilder();\n final String input = unQuote(javaName.trim());\n for (int i = 0; i < input.length(); i++) {\n final char c = input.charAt(i);\n if (result.length() == 0) {\n result.append(Character.toLowerCase(c));\n } else if (Character.isUpperCase(c)) {\n result.append(\"_\").append(Character.toLowerCase(c));\n } else {\n result.append(c);\n }\n }\n return result.toString();\n }", "public String acronym(String phrase) {\n /*StringBuilder acronymFeed = new StringBuilder(\"\");\n String wordHolder = \"\";\n int spaceIndex;\n char firstLetter;\n do{\n spaceIndex = phrase.indexOf(\" \");\n wordHolder = phrase.substring(0,spaceIndex);\n acronymFeed.append(wordHolder.charAt(0));\n phrase = phrase.replaceFirst(wordHolder, \"\");\n } while (spaceIndex != -1 && wordHolder != \"\" && phrase != \"\");\n \n \n \n \n \n String acronymResult = acronymFeed.toString().toUpperCase();\n return acronymResult;\n */\n \n char[] letters = phrase.toCharArray();\n String firstLetters = \"\";\n firstLetters += String.valueOf(letters[0]);\n for (int i = 1; i < phrase.length();i++){\n if (letters[i-1] == ' '){\n firstLetters += String.valueOf(letters[i]);\n }\n }\n firstLetters = firstLetters.toUpperCase();\n return firstLetters;\n }", "public String buildWord() {\n\t\tStringBuilder word = new StringBuilder();\n\t\t\n\t\tfor(int i = 0; i < letters.size(); i++) {\n\t\t\tLetter tempLetter = letters.get(i);\n\t\t\t\n\t\t\tif(!(letters.get(i).getLetter() >= 'A' && letters.get(i).getLetter() <= 'Z') || tempLetter.getStatus())\n\t\t\t\tif(letters.get(i).getLetter() != ' ')\n\t\t\t\t\tword.append(tempLetter.getLetter());\n\t\t\t\telse\n\t\t\t\t\tword.append(\" \");\n\t\t\telse\n\t\t\t\tif (i == letters.size()-1) word.append(\"_\");\n\t\t\t\telse word.append(\"_ \");\n\t\t}\n\t\treturn word.toString();\n\t}", "private String fixCapsOnlyLines(final String line) {\n if (line.matches(\"^[0-9A-Zl\\\\[\\\\]:'\\\"\\\\(\\\\)\\\\- ]*$\")) {\n return line.replaceAll(\"l\", \"I\");\n }\n return line;\n }", "public String acronym(String phrase) {\n\t\tString[] p = phrase.split(\"[\\\\W\\\\s]\");\n\t\tString returner = \"\";\n\t\tfor (String s : p) {\n\t\t\tif (!s.isEmpty())\n\t\t\t\treturner = returner + s.charAt(0);\n\t\t}\n\t\treturn returner.toUpperCase();\n\t}", "public static String textFormat(String s){\r\n s =s.toLowerCase();\r\n s = s.substring(0, 1).toUpperCase() + s.substring(1);\r\n return(s);\r\n }", "@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tif (s == null || s.length() <= 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString temp = s.toString();\n\t\t\t\tString tem = temp.substring(temp.length() - 1, temp.length());\n\t\t\t\tchar[] temC = tem.toCharArray();\n\t\t\t\tint mid = temC[0];\n\t\t\t\tif (mid >= 65 && mid <= 90) {// 大写字母\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (mid >= 97 && mid <= 122) {// 小写字母\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (String.valueOf((char) mid).equals(\"_\")) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tToast.makeText(mActivity, mActivity.getResources().getString(R.string.name_not_invalid), Toast.LENGTH_SHORT).show();\n\t\t\t\ts.delete(temp.length() - 1, temp.length());\n\n\t\t\t\tif (temp.length() > 6) {\n\t\t\t\t\tToast.makeText(mActivity, \"用户名不能超过六位\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\ts.delete(5, temp.length());\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}", "@Test\r\n public final void rawInputNamesShouldNotHaveSpaces() {\r\n \tString actual = proc.preprocessRawInputName(\" AndThis String\");\r\n \tassertEquals(\"AndThisString\", actual);\r\n }", "private String sanitizeSpecialChars(String value) {\n return value.replaceAll(\"[^a-zA-Z0-9_]\", \"_\");\n }", "private String formatPropertyName(String property) {\r\n property = property.replace( '/', '.' );\r\n property = property.replace( '@', '.' );\r\n return StringExtend.validateString( property, \".\" );\r\n }", "private boolean startsWithSpace(String str) {\r\n\t\treturn str.length() != 0 && str.charAt(0) == ' ';\r\n\t}", "protected static String sanitise(final String name) {\n // Replace illegal chars with\n return name.replaceAll(\"[^\\\\w\\\\.\\\\s\\\\-#&_]\", \"_\");\n }", "private String toCamelCaseUnderscore(String concept) {\n\t\tStringBuffer newConcept = new StringBuffer(\"\");\n\t\t// concept = concept.replace(\" \", \"_\");\n\t\tStringTokenizer token = new StringTokenizer(concept, \" \");\n\t\tboolean firstTest = true;\n\t\twhile (token.hasMoreTokens()) {\n\t\t\tif (!firstTest) {\n\t\t\t\tnewConcept.append(\"_\");\n\t\t\t}\n\t\t\tfirstTest = false;\n\t\t\tString str = (String) token.nextElement();\n\t\t\tstr = str.substring(0, 1).toUpperCase()\n\t\t\t\t\t+ str.substring(1).toLowerCase();\n\t\t\tnewConcept.append(str);\n\t\t}\n\n\t\tconcept = newConcept.toString();\n\n\t\treturn concept;\n\t}", "private static String toPropertyName(String str) {\n return str.toLowerCase().trim().replaceAll(\" +\", \"_\");\n }", "protected void validateLastName(){\n Boolean lastName = Pattern.matches(\"[A-Z][a-z]{2,}\",getLastName());\n System.out.println(nameResult(lastName));\n }", "private String parseGroupNameD2K(String line) {\n\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tsb.append(tokens[0] + \".\");\n\t\tsb.append(tokens[1].replace(';', '_'));\n\t\ttry{\n\t\t\tsb.append(tokens[4].replace('#', '.'));\n\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\t// do nothing\n\t\t}\n\t\treturn sb.toString();\n\t}", "private static String manualTab(String entry)\r\n\t{\r\n\t\tString tab = \"\";\r\n\t\tfor(int count=0; count < 15 - entry.length(); count++)\r\n\t\t\ttab += \" \";\r\n\t\treturn tab;\r\n\t}", "public String addSpaces(String string) {\n string = string.replaceAll(\"_\", \" \");\n return string;\n }", "private String trimName(String line) {\n line = trimLine(line);\n int idx = line.indexOf(\"(\");\n if(idx == -1){\n idx = line.indexOf(\":\");\n }\n if (idx != -1) {\n line = line.substring(0, idx);\n }\n return line.trim();\n }", "private String spacing(String line) {\n \n \t\t/* Remove redundant spaces (keep only one space between two words) */\n \t\tint limit = 0;\n \t\tMatcher matcher = patternSpaces.matcher(line);\n \n \t\tString oldLine = line;\n \n \t\tremSpaces: while (matcher.find()) {\n \n \t\t\tint offset = matcher.start();\n \n \t\t\t// do not remove spaces at the beginning of a line\n \t\t\tif (line.substring(0, offset).trim().equals(\"\"))\n \t\t\t\tcontinue;\n \n \t\t\t/*\n \t\t\t * if the spaces (or tabs) are at the beginning of a line or before a comment, then we keep them\n \t\t\t */\n \t\t\t/*\n \t\t\t * Matcher matcherSpacesBeforeComment = patternSpacesBeforeComment.matcher(line); if\n \t\t\t * (matcherSpacesBeforeComment.find()) { if (offset < matcherSpacesBeforeComment.end()) continue\n \t\t\t * remSpaces; }\n \t\t\t */\n \n \t\t\t// if the spaces are before a comment, then we keep them\n \t\t\tString afterSpaces = line.substring(matcher.end());\n \t\t\tif (afterSpaces.startsWith(\"(*\"))\n \t\t\t\tcontinue remSpaces;\n \n \t\t\t// If we are inside a string, then we skip this replacing\n \t\t\tMatcher matcherString = patternString.matcher(line);\n \t\t\twhile (matcherString.find()) {\n \t\t\t\tif (matcherString.start() <= offset && offset < matcherString.end())\n \t\t\t\t\tcontinue remSpaces;\n \t\t\t}\n \n \t\t\t// If we are inside a comment, then we skip this replacing\n \t\t\tMatcher matcherComment = patternComment.matcher(line);\n \t\t\twhile (matcherComment.find()) {\n \t\t\t\tif (matcherComment.start() <= offset && offset < matcherComment.end())\n \t\t\t\t\tcontinue remSpaces;\n \t\t\t}\n \n \t\t\tline = line.substring(0, offset) + \" \" + line.substring(matcher.end());\n \n \t\t\t// we have to reset the matcher, because we modified the line\n \t\t\tmatcher = patternSpaces.matcher(line);\n \n \t\t\t// we put a limit, just in case we would get into an infinite loop\n \t\t\tif (limit++ > 10000) {\n \t\t\t\tOcamlPlugin.logError(\"Infinite loop detected in formatter during spacing (1): <<\" + oldLine\n \t\t\t\t\t\t+ \">>\");\n \t\t\t\tbreak;\n \t\t\t}\n \n \t\t}\n \n \t\t// remove spaces before commas\n \t\t//line = line.replaceAll(\" ,\", \",\");\n \t\t// remove spaces before semicolons\n \t\t//line = line.replaceAll(\" ;\", \";\");\n \n \t\tfor (int nPattern = 0; nPattern <= 1; nPattern++) {\n \t\t\tPattern patternSpacing;\n \t\t\tif (nPattern == 0)\n \t\t\t\tpatternSpacing = patternSpacingRight;\n \t\t\telse\n \t\t\t\tpatternSpacing = patternSpacingLeft;\n \n \t\t\t/*\n \t\t\t * We put a limit to the number of replacements, just in case we would get into an infinite loop\n \t\t\t */\n \t\t\tlimit = 0;\n \t\t\t// add spaces before some characters\n \t\t\tmatcher = patternSpacing.matcher(line);\n \n \t\t\toldLine = line;\n \n \t\t\taddSpaces: while (matcher.find()) {\n \n \t\t\t\tint offset = matcher.start() + 1;\n \t\t\t\tif (offset > line.length() - 1 || offset < 0) {\n \t\t\t\t\tocaml.OcamlPlugin.logError(\"OcamlIndenter:format : invalid position\");\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \n \t\t\t\t// if we are inside a string, then we skip this replacement\n \t\t\t\tMatcher matcherString = patternString.matcher(line);\n \t\t\t\twhile (matcherString.find()) {\n \t\t\t\t\tif (matcherString.start() <= offset && offset < matcherString.end())\n \t\t\t\t\t\tcontinue addSpaces;\n \t\t\t\t}\n \n \t\t\t\t// Skip replacement if in comment\n \t\t\t\tMatcher matcherComment = patternComment.matcher(line);\n \t\t\t\twhile (matcherComment.find()) {\n \t\t\t\t\tif (matcherComment.start() <= offset && offset < matcherComment.end())\n \t\t\t\t\t\tcontinue addSpaces;\n \t\t\t\t}\n \n \t\t\t\tline = line.substring(0, offset) + \" \" + line.substring(offset);\n \n \t\t\t\t// we have to reset the matcher, because we modified the line\n \t\t\t\tmatcher = patternSpacing.matcher(line);\n \t\t\t\tif (limit++ > 10000) {\n \t\t\t\t\tOcamlPlugin.logError(\"Infinite loop detected in formatter during spacing (2): <<\"\n \t\t\t\t\t\t\t+ oldLine + \">>\");\n \t\t\t\t\tbreak;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn line;\n \n \t}", "private void validExpresion(){\n\t\tString valores =\"+/*-^sinbqrcotah.\";\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint tam = fun.length-1;\n\t\tif(tam > 0){\n\t\t\tif(valores.indexOf(fun[tam]) != -1){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t\t}\n\t\t}\n\n\t\tif(this.getText().equals(\"+\") || this.getText().equals(\"-\") || this.getText().equals(\".\")){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t}\n\n\t\telse if(this.getText().equals(\"s\") || this.getText().equals(\"c\") || this.getText().equals(\"t\")){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t}\n\n\t\telse if(this.getText().equals(\"(\") || this.getText().equals(\"a\") || this.getText().equals(\"i\")){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t}\n\t}", "public String alphabeticalTitle(String title){\n if ( title.toLowerCase().startsWith(\"the \") ) {\n \t String titlePrefix = title.substring(0, 3);\n \t String titleSuffix = title.substring(4, title.length());\n \t title = titleSuffix + \", \" + titlePrefix;\n \t }\n\t\t return title;\n\t }", "private String name() {\n\t\tif (currentIndex >= data.length\n\t\t\t\t|| !Character.isLetter(data[currentIndex])) {\n\t\t\tthrow new LexerException();\n\t\t}\n\n\t\tString value = String.valueOf(data[currentIndex++]);\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& (Character.isLetter(data[currentIndex])\n\t\t\t\t\t\t|| data[currentIndex] == '_'\n\t\t\t\t\t\t|| Character.isDigit(data[currentIndex]))) {\n\t\t\tvalue += data[currentIndex++];\n\t\t}\n\n\t\treturn value;\n\t}", "private boolean spaces() {\r\n return OPT(GO() && space() && spaces());\r\n }", "@Override\n public String toString() {\n return super.toString().replaceAll(\"_\", \" \");\n }", "@Override\n public String toString() {\n return super.toString().replaceAll(\"_\", \" \");\n }", "@Test\n\tpublic void testCreateLinkValidWhitespace() {\n\t\tLink result = helper.createLink(\"http://good.com \");\n\t\tassertEquals(\"http://good.com\", result.getUrl());\n\t\tassertTrue(result.isValid());\n\t}", "private static String removeSoftHyphens(String in) {\n String result = in.replaceAll(\"\\u00AD\", \"\");\n return result.length() == 0 ? \"-\" : result;\n }", "public static void setUnderlined(TextView textView, String text) {\n SpannableString spannable = new SpannableString(text);\n spannable.setSpan(new UnderlineSpan(), 0, text.length(), 0);\n textView.setText(spannable);\n }", "private String filter(String line) {\n return line.toLowerCase().replaceAll(\"[^a-z]\", \"\");\n }", "private static String removeCoherentUnderscores(final String testName) {\n final String validATXName = testName.replace(\"__\", \"_\");\n if (validATXName.equals(testName)) {\n return validATXName;\n } else {\n return removeCoherentUnderscores(validATXName);\n }\n }", "private String getCompletePossibleTitle(List<ContactPartAllocation> notAllocatedAndTitleParts, String separationCharacter) {\n StringBuilder titleCompletionBuilder = new StringBuilder();\n notAllocatedAndTitleParts.forEach(part -> titleCompletionBuilder.append(part.getContactPart().getSecondObject()).append(separationCharacter));\n String finalString = titleCompletionBuilder.toString();\n return finalString.substring(0, finalString.length()-1);\n }", "public void testShouldAddColonExcept(){\n indentlogic.addText(\"except\\n\");\n assertTrue(indentlogic.shouldAddColon());\n }", "private String avoidErrorChar (String original) {\n\t\tStringBuffer modSB = new StringBuffer();\n\t\tfor (int j=0; j < original.length(); j++) {\n\t\t\tchar c = original.charAt(j);\n\t\t\tif (c == '\\n') {\n\t\t\t\tmodSB.append(\"\\\\n\"); // rimpiazzo il ritorno a capo con il simbolo \\n\n\t\t\t} else if (c == '\"') {\n\t\t\t\tmodSB.append(\"''\"); // rimpiazzo le doppie virgolette (\") con due apostofi ('')\n\t\t\t} else if ((int)c > 31 || (int)c !=127){ // non stampo i primi 32 caratteri di controllo\n\t\t\t\tmodSB.append(c);\n\t\t\t}\n\t\t}\n\t\treturn modSB.toString();\n\t}", "private String shortPrefix(String name) {\r\n StringBuilder b = new StringBuilder();\r\n String[] splits = name.split(\"_\");\r\n for (int i = 0; i < splits.length; ++i) {\r\n if (splits[i].length() > 0) {\r\n b.append(splits[i].charAt(0));\r\n }\r\n }\r\n if (b.length() < 3) {\r\n b.append(Integer.toString(name.length() % 10));\r\n }\r\n return b.toString().toLowerCase();\r\n }", "private String trimToSearchFormat(String input) {\n String output = input.replace(\"p:\", \"\")\n .replace(\"[\", \"\")\n .replace(\"]\", \"\")\n .replace(\",\", \"\")\n .replace(\" \", DELIM);\n return output;\n }" ]
[ "0.6071684", "0.5779085", "0.5743146", "0.57384956", "0.5682522", "0.56477493", "0.56394976", "0.5633946", "0.5629729", "0.5520993", "0.5511748", "0.55091435", "0.54804504", "0.5436274", "0.5415606", "0.54029495", "0.5396054", "0.53822964", "0.5364274", "0.53372425", "0.53282744", "0.5300894", "0.5256994", "0.52356917", "0.52162206", "0.5212815", "0.5207233", "0.52045786", "0.51901853", "0.5176338", "0.5151368", "0.5131413", "0.511722", "0.5115989", "0.51131344", "0.5105415", "0.50944525", "0.50891906", "0.5082356", "0.5078465", "0.5077643", "0.5072214", "0.50678563", "0.50581414", "0.505626", "0.50469977", "0.50437367", "0.5038265", "0.5028606", "0.502571", "0.5018511", "0.50184375", "0.5016037", "0.5006211", "0.49977252", "0.49954963", "0.4990043", "0.49863335", "0.4986036", "0.49817732", "0.49759185", "0.49753404", "0.49698788", "0.496869", "0.49676502", "0.49651498", "0.49612382", "0.49521044", "0.49491337", "0.4946774", "0.49401143", "0.4934735", "0.49330458", "0.4927368", "0.49245557", "0.49245477", "0.49084425", "0.49046645", "0.48988023", "0.48972374", "0.48887113", "0.48880237", "0.48867512", "0.48846915", "0.48845983", "0.48779002", "0.48762554", "0.4876217", "0.48735642", "0.4872389", "0.4872389", "0.48701558", "0.48683485", "0.48670623", "0.48651978", "0.48579478", "0.48550898", "0.48462743", "0.48441985", "0.4843674", "0.48349378" ]
0.0
-1
Create a sprite of the given building sprite, and set up its event handlers
public BuildingMenuSprite(ResourceType buildingType) { super(buildingType); setupMouseEventHandlers(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Sprite createSprite(SnakeSmash game) {\n Texture texture = game.getAssetManager().get(\"pinkSquare.png\");\n return new Sprite(texture, texture.getWidth(), texture.getHeight());\n }", "@Override\n public Sprite createSprite(MyCumulusGame game) {\n walkingAnimation = createWalkingAnimation(game);\n jumpingAnimation = createJumpingAnimation(game);\n\n return new Sprite(jumpingAnimation);\n }", "private void buildSprites() {\n\t\tSpriteRotatable sprite = new SpriteRotatable(new Vec2f(0, 0), 1);\n\t\tsprite.setCentered(true);\n\t\tspriteManager.addSprite(sprite, \"avenger.png\");\n\t\tsprite.setVisible(true);\n\t\ttarget = new SpriteRotatable(new Vec2f(2, 2), 1);\n\t\ttarget.setCentered(true);\n\t\tspriteManager.addSprite(target, \"fighter.png\");\n\t\ttarget.setVisible(true);\n\n\t}", "@Override\n\tpublic void create() {\n\t\t// This should come from the platform\n\t\theight = platform.getScreenDimension().getHeight();\n\t\twidth = platform.getScreenDimension().getWidth();\n\n\t\t// create the drawing boards\n\t\tsb = new SpriteBatch();\n\t\tsr = new ShapeRenderer();\n\n\t\t// Push in first state\n\t\tgsm.push(new CountDownState(gsm));\n//\t\tgsm.push(new PlayState(gsm));\n\t}", "Wall(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Wall(Sprite sprite)\", \"2420\");}", "Ground(Sprite sprite) {Collect.Hit(\"BoardFactory.java\",\"Ground(Sprite sprite)\");this.background = sprite; Collect.Hit(\"BoardFactory.java\",\"Ground(Sprite sprite)\", \"3015\");}", "@Override\n public Sprite createSprite(DeathmatchMania game) {\n Animation = createAnimation(game);\n return new Sprite(Animation.getKeyFrame(0, true));\n }", "private Sprite createSprite(Image image)\n\t{\n\t\tSprite sprite = new Sprite(image, image.getWidth(), image.getHeight());\n\t\treturn sprite;\n\t}", "@Override\r\n public Sprite build() {\r\n return new Sprite(imageView, totalNbrFrames, columns, offsetX, offsetY, widthFrame, heightFrame);\r\n }", "@Override\n\tpublic void create () {\n\t\tgempiresAssetHandler = new GempiresAssetHandler(this);\n\t\tbatch = new SpriteBatch();\n\t\tcastle = new CastleScreen(this);\n\t\tsetScreen(new MainMenuScreen(this));\n\t}", "@Override\n public Sprite createSprite(TSSGame game) {\n return new Sprite();\n }", "public Hero(int x, int y) {\r\n this.centerX = x;\r\n this.centerY = y;\r\n this.currentHealth = 100;\r\n rect1 = new FloatRect (100,630,80,110);\r\n imgTexture = new Texture ();\r\n try {\r\n imgTexture.loadFromFile (Paths.get (ImageFile));\r\n } catch (IOException ex) {\r\n ex.printStackTrace ();\r\n }\r\n imgTexture.setSmooth (true);\r\n\r\n img = new Sprite (imgTexture);\r\n img.setOrigin (Vector2f.div (new Vector2f (imgTexture.getSize ()), 2));\r\n img.setPosition (x, y);\r\n // Store references to object and key methods\r\n obj = img;\r\n setPosition = img::setPosition;\r\n\r\n background = new Sprite (bg.loadTextures ());\r\n background.setOrigin(Vector2f.div(new Vector2f(bg.getTexture1 ()), 1000000));\r\n background.setPosition (0,0);\r\n }", "public BoardFactory(PacManSprites spriteStore) {Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\");this.sprites = spriteStore; Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\", \"689\");}", "private void onLoad(Building building) {\n ImageView view = new ImageView(building.getImage());\n addEntity(building, view);\n squares.getChildren().add(view);\n System.out.println(\"Set new Building \" + building.getType());\n }", "public Sprite() {}", "public void addSprite(Scene pScene, int x, int y) {\n\t\t\r\n\t}", "protected abstract void chooseSprite();", "Sprite(float x, float y, float w, float h) {\n _img = createImage(1, 1, RGB);\n _x = x;\n _y = y;\n _w = w;\n _h = h;\n _rotVector = new PVector(1, 0, 0);\n resetRectHitbox();\n }", "@Override\n public void create() {\n\n batch = new SpriteBatch();\n manager = new AssetManager();\n\n manager.load(\"audio/main_theme.mp3\", Music.class);\n // manager.load(\"String sonido\", Sound.class);\n manager.load(\"sprites/dragon.pack\", TextureAtlas.class);\n manager.load(\"sprites/vanyr.pack\", TextureAtlas.class);\n manager.finishLoading();\n\n setScreen(new PlayScreen(this));\n\n }", "public Sprite(String newSpriteLocation){\n\t\timages = new Texture[1];\n\t\timages[0] = new Texture(newSpriteLocation);\n\t}", "private void setSprite(String filepath){\n try {\n this.sprite = new Sprite(new Texture(Gdx.files.internal(filepath)));\n }\n catch (Exception e){\n }\n }", "abstract public void loadSprite();", "@Override\r\n\tpublic void create() {\n\t\tbatch = new SpriteBatch();\r\n\t\tcamera = new OrthographicCamera();\r\n\t\tassets = new AssetManager();\r\n\t\t\r\n\t\tcamera.setToOrtho(false,WIDTH,HEIGHT);\r\n\t\t\r\n\t\tTexture.setAssetManager(assets);\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tsetScreen(new SplashScreen(this));\r\n\t}", "public JewelSprite(int type, int x, int y) {\n\t this.type = type;\n\t setxPos(x);\n\t setyPos(y);\n\n\t String imagePath = \"/\" + Integer.toString(type) + \".png\";\n\t jewelImage = new Image(Jewel.class.getResourceAsStream(imagePath));\n\t ImageView jewelImageView = new ImageView();\n\t jewelImageView.setImage(jewelImage);\n\t jewelImageView.setStyle(\"-fx-background-color:transparent;\");\n\n\t setNode(jewelImageView);\n\t }", "public PowerUp(Sprite sprite, int x, int y) {\n super(x, y);\n newSprite(sprite);\n setNewDimensions();\n name = sprite.name();\n }", "public void addSprite(Sprite s) {\n sprites.addSprite(s);\n }", "@Override\r\n\tpublic void createScene() {\n\t\tthis.setBackground(new Background(255, 255, 255));\r\n\t\tsLogo = new Sprite(BaseActivity.WIDTH / 2, BaseActivity.HEIGHT / 2, logoRegion.getWidth() * 1.23f, logoRegion.getHeight() * 1.23f, logoRegion, engine.getVertexBufferObjectManager());\r\n\t\tthis.attachChild(sLogo);\r\n\t\tSystem.out.println(\"stufff\");\r\n\t\t\r\n\t\tengine.registerUpdateHandler(new TimerHandler(0.2f, new ITimerCallback() \r\n\t {\r\n\t public void onTimePassed(final TimerHandler pTimerHandler) \r\n\t {\r\n\t System.out.println(\"stuff1\");\r\n\t engine.unregisterUpdateHandler(pTimerHandler);\r\n\t PlayScene play = new PlayScene(engine, activity, camera);\r\n\t play.createScene();\r\n\t engine.setScene(play);\r\n\t Resources.getInstance().music.setLooping(true);\r\n\t \t\tResources.getInstance().music.play();\r\n\t play.start();\r\n\t }\r\n\t }));\r\n\t}", "GameObject(int x, int y){\n loadSprite();\n this.x = x;\n this.y = y;\n }", "@Override\n\tpublic void create() {\n\t\tthis.batch = new SpriteBatch();\n\t\t\n//\t\tgame.batch.begin();\n// player.draw(game.batch);\n// \n// game.batch.end();\n\t\t\n\t\tmanager = new AssetManager();\n\t\tmanager.setLoader(TiledMap.class, new TmxMapLoader(new InternalFileHandleResolver()));\n\t\tmanager.load(\"data/level1.tmx\", TiledMap.class);\n\t\tmanager.load(\"data/background.png\", Texture.class);\n//\t\tmanager.load(\"level1.tsx\", TiledMapTileSet.class);\n\t\tmanager.finishLoading();\n\t\tscreen = new GameScreen(this);\n\t\tsetScreen(screen);\n\t\t\n\t}", "public void setSprite(Sprite sprite_)\n\t{\n\t\tsprite=sprite_;\n\t}", "public void addSprite(Sprite s) {\r\n this.sprites.addSprite(s);\r\n }", "public abstract void createSprites() throws FileNotFoundException;", "@Override\n public void chooseSprite() {\n switch(direction){\n case 0:\n sprite=Sprite.python_down;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_down,Sprite.python_down_1,Sprite.python_down_2,Sprite.python_down_3,animate,40);\n break;\n case 1:\n sprite=Sprite.python_right;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_right,Sprite.python_right_1,Sprite.python_right_2,animate,40);\n break;\n case 2:\n sprite=Sprite.python_up;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_up,Sprite.python_up_1,Sprite.python_up_2,animate,40);\n break;\n case 3:\n sprite=Sprite.python_left;\n if(moving)\n sprite=Sprite.movingSprite(Sprite.python_left,Sprite.python_left_1,Sprite.python_left_2,animate,40);\n break;\n\n\n }\n\n }", "public void attachSprite(Sprite s){\n \tgraphicsElements.add(s);\n }", "protected void createSprite(String filename, int imgnumber, int originx, \n \t\tint originy, String name) throws FileNotFoundException\n {\n \tSprite newsprite = new Sprite(filename, imgnumber, originx, originy, \n name, this.applet);\n this.sprites.put(newsprite.getName(), newsprite);\n }", "@Override\n\tpublic void createScene()\n\t\n\t{\n\t loading = new Sprite (0,0,resourceManager.loadingRegion,vbo); // тупо ставим спрайт с картинкой\n\t\tattachChild(loading);\n\t}", "public void sprite() {\n\t\tspr.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = spr;\n\t}", "public void create() {\n connect();\n batch = new SpriteBatch();\n font = new BitmapFont();\n\n audioManager.preloadTracks(\"midlevelmusic.wav\", \"firstlevelmusic.wav\", \"finallevelmusic.wav\", \"mainmenumusic.wav\");\n\n mainMenuScreen = new MainMenuScreen(this);\n pauseMenuScreen = new PauseMenuScreen(this);\n settingsScreen = new SettingsScreen(this);\n completeLevelScreen = new CompleteLevelScreen(this);\n completeGameScreen = new CompleteGameScreen(this);\n\n setScreen(mainMenuScreen);\n }", "public void makeBody()\n {\n Texture text;\n if(bounds.getHeight()<bounds.getWidth()) {\n text = new Texture(\"img/wall.jpg\");\n }else{\n text = new Texture(\"img/wall2.jpg\");\n }\n\n Sprite wallSprite;\n wallSprite = new Sprite(text);\n wallSprite.setSize(bounds.getWidth(),bounds.getHeight());\n wallSprite.setOrigin(bounds.getWidth()/2, bounds.getHeight()/2);\n\n BodyDef bodydef = new BodyDef();\n bodydef.type = BodyType.StaticBody;\n bodydef.position.set(position.x,position.y);\n\n PolygonShape shape = new PolygonShape();\n shape.setAsBox(bounds.width/2, bounds.height/2);\n\n FixtureDef def = new FixtureDef();\n def.shape = shape;\n def.friction = 0.5f;\n def.restitution = 0;\n wall = world.createBody(bodydef);\n wall.createFixture(def);\n wall.getFixtureList().get(0).setUserData(\"w\");\n wall.setUserData(wallSprite);\n\n shape.dispose();\n }", "@Override\n\tpublic void create () {\n\t\tmBatch = new SpriteBatch();\n mFont = new BitmapFont();\n\t\tmCamera = new OrthographicCamera();\n\t\tmCamera.setToOrtho(false, 800, 480); // Regardless of resolution, project screen onto 800 x 480 orthographic matrix\n\n\t\tmGameBackgrounds = new Texture[6]; // Six frames describing six states of damage to the castle, from pristine to broken\n\t\tmGameBackgrounds[0] = new Texture(\"castle_v1.png\");\n\t\tmGameBackgrounds[1] = new Texture(\"castle_v1_dam1.png\");\n\t\tmGameBackgrounds[2] = new Texture(\"castle_v1_dam2.png\");\n\t\tmGameBackgrounds[3] = new Texture(\"castle_v1_dam3.png\");\n\t\tmGameBackgrounds[4] = new Texture(\"castle_v1_dam4.png\");\n\t\tmGameBackgrounds[5] = new Texture(\"castle_v1_dam5.png\");\n\n\t\t// Assign value to list so it may be given objects to store\n\t\tmAttackers = new Attacker[ATTACKER_ARRAY_SIZE];\n\t\tmButtons = new DefenderButtons[7];\n\t\tmButtons[0] = new DefenderButtons(DefenderButtons.TYPE_NEW_GAME);\n\t\tmButtons[1] = new DefenderButtons(DefenderButtons.TYPE_RESUME_SAVED_GAME);\n\t\tmButtons[2] = new DefenderButtons(DefenderButtons.TYPE_PAUSE_GAME);\n\t\tmButtons[3] = new DefenderButtons(DefenderButtons.TYPE_RESUME_PAUSED_GAME);\n\t\tmButtons[4] = new DefenderButtons(DefenderButtons.TYPE_REPAIR_CASTLE);\n\t\tmButtons[5] = new DefenderButtons(DefenderButtons.TYPE_CONTINUE_NEXT_ROUND);\n\t\tmButtons[6] = new DefenderButtons(DefenderButtons.TYPE_SAVE_GAME);\n\n\t\tmButtons[0].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[1].setTexture(new Texture(\"button1.png\"));\n\t\tmButtons[2].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[3].setTexture(new Texture(\"button2.png\"));\n\t\tmButtons[4].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[5].setTexture(new Texture(\"button3.png\"));\n\t\tmButtons[6].setTexture(new Texture(\"button3.png\"));\n\n\t\t// Create the object that tracks the touch coordinates\n\t\tmLastTouch = new Vector3();\n\n // Assign value to miscellaneous game variables\n mRoundTimeElapsed = 0;\n mRoundMaxTime = 25f; // Counted in SECONDS\n\t\tmCastleMaxHealth = 1000f;\n mCastleHealth = mCastleMaxHealth; // Will last 1,000 frames if attacked by one single standard attacker constantly\n\t\tmCastleDamageStage = 0;\n mRoundScore = 0f;\n mTotalScore = 0f;\n mRoundNumber = 1;\n\t\tmGameState = STATE_PRE_GAME;\n\t\tmAttackerDelay = 0;\n mRoundMaxAttackers = 5;\n\t\tmRepairCost = 1000f;\n\t\tmLivingAttackerCount = 0;\n\t\tmKnightSpawnChance = 0.35f; // 35% chance to spawn a knight instead of normal under regular circumstances\n mPaused = false;\n\t\tmRoundSaved = false;\n mHealthText = \"Castle Strength: \" + mCastleHealth;\n mRoundScoreText = \"This Round Score: \" + mRoundScore;\n\t\tmTotalScoreText = \"Total Game Score: \" + mTotalScore;\n\t\tmGameTitle = \"Castle Defender\";\n\t\tmGameSavedText = \"Game Saved!\";\n\t\tmRoundText = \"Round :\" + mRoundNumber;\n\t\tmRandom = new Random();\n\t\t//TEMPORARY! Will change the logic later\n mSpawnTime = 100;\n\t\tmMonsterHouseSpawn = 10;\n\n\t\t// Pull out the normal attacker's frames through temporary objects\n\t\tTexture walkTexture = new Texture(\"attackerSheet.png\");\n\t\tTextureRegion[][] walkTempArray = TextureRegion.split(walkTexture, 64, 64);\n\t\tTextureRegion[] walkFrames = new TextureRegion[16];\n\n\t\tint index = 0; // Cut the animation's frames up using this temporary jagged array (8 by 2 matches the image file rows / cols)\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tfor (int j = 0; j < 8; j++) {\n\t\t\t\twalkFrames[index++] = walkTempArray[i][j];\n\t\t\t}\n\t\t}\n\n\t\tmStandardAttackerWalk = new Animation(0.055f, walkFrames);\n\n\t\t// Do the same process for the knight animations\n\t\tTexture knightWalk = new Texture(\"knight_sheet_walk.png\");\n\t\tTexture knightAttack = new Texture(\"knight_sheet_attack.png\");\n\n\t\tTextureRegion[][] knightWalkTemp = TextureRegion.split(knightWalk, 64, 128);\n\t\tTextureRegion[][] knightAtkTemp = TextureRegion.split(knightAttack, 64, 128);\n\n\t\tTextureRegion[] knightWalkFrames = new TextureRegion[8];\n\t\tTextureRegion[] knightAtkFrames = new TextureRegion[4];\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 2; i++) {\n\t\t\tfor(int j = 0; j < 4; j++) {\n\t\t\t\tknightWalkFrames[index++] = knightWalkTemp[i][j];\n\t\t\t}\n\t\t}\n\n\t\tindex = 0;\n\t\tfor(int i = 0; i < 4; i++) {\n\t\t\tknightAtkFrames[index++] = knightAtkTemp[0][i];\n\t\t}\n\n\t\tmKnightAttackerAttack = new Animation(0.25f, knightAtkFrames);\n\t\tmKnightAttackerWalk = new Animation(0.125f, knightWalkFrames);\n\n\t\t// Populate the mAttackers array with 50 total attackers, 25 of each\n\t\tfor(int i = 0; i < ATTACKER_ARRAY_SIZE; i++){\n\t\t\t// Grab a walk speed between constant minimum and maximum\n\t\t\tfloat walkSpeed = mRandom.nextFloat() * MAX_SPEED_VARIANCE;\n\t\t\twalkSpeed += MIN_SPEED; // Ensures the speed is AT LEAST 60 \"units\"\n\t\t\t// Spawn at a random y coordinate starting at MIN_SPAWN_Y, varying by MAX_SPAWN_Y_VARIANCE\n\t\t\tfloat spawnY = mRandom.nextFloat() * MAX_SPAWN_Y_VARIANCE;\n\t\t\tspawnY += MIN_SPAWN_Y;\n\n\t\t\tif(i < ATTACKER_HALF_SIZE) {\n\t\t\t\t// The first half of the array are normal attackers\n\t\t\t\tmAttackers[i] = new Attacker(1f, walkSpeed, -100f, spawnY, 64f, 64f, \"normal\");\n\t\t\t\tmAttackers[i].addAnimation(mStandardAttackerWalk, \"walk\");\n\t\t\t} else {\n\t\t\t\t// The second half of the array are \"knight\" attackers\n\t\t\t\tmAttackers[i] = new Attacker(2f, walkSpeed * 0.75f, -100f, spawnY, 64f, 128f, \"knight\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerWalk, \"walk\");\n\t\t\t\tmAttackers[i].addAnimation(mKnightAttackerAttack, \"attack\");\n\t\t\t}\n\t\t}\n\t}", "Sprite(String url, float x, float y, float w, float h) {\n _img = loadImage(url);\n _x = x;\n _y = y;\n _w = w;\n _h = h;\n _rotVector = new PVector(1, 0, 0);\n resetRectHitbox();\n }", "void turnToSprite(Sprite s) {\n turnToPoint(s._x, s._y);\n }", "public Phaser(double x, double y, GameComponents.Canvas acanvas)\r\n {\r\n super(x, y, acanvas);\r\n myImage = null;\r\n isPhasing = false;\r\n }", "public void addSprite(Sprite s) {\r\n this.sprites.add(s);\r\n }", "public void initialHeroCastle() {\n Pair<Integer, Integer> heroCastlePosition = world.getHeroCastlePosition();\n SimpleIntegerProperty x2 = new SimpleIntegerProperty();\n SimpleIntegerProperty y2 = new SimpleIntegerProperty();\n x2.set(heroCastlePosition.getValue0());\n y2.set(heroCastlePosition.getValue1());\n String type = \"HeroCastle\";\n Building heroBuilding = new HeroCastleBuilding(x2, y2, type, 0);\n ImageView view = new ImageView(heroBuilding.getImage());\n addEntity(heroBuilding, view);\n squares.getChildren().add(view);\n }", "public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }", "private void generate() {\n preGenerate();\n\n SpriteGrid grid = new SpriteGrid(specState);\n IOHelper.pixelsToBitmap(grid.draw(), sprite);\n\n }", "private void drawSprite(int x, int y, int u, int v)\n {\n GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F);\n this.mc.getTextureManager().bindTexture(STAT_ICONS);\n float f = 0.0078125F;\n float f1 = 0.0078125F;\n int i = 18;\n int j = 18;\n Tessellator tessellator = Tessellator.getInstance();\n BufferBuilder bufferbuilder = tessellator.getBuffer();\n bufferbuilder.begin(7, DefaultVertexFormats.POSITION_TEX);\n bufferbuilder.pos((double)(x + 0), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 18), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 18) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 18), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 18) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n bufferbuilder.pos((double)(x + 0), (double)(y + 0), (double)this.zLevel).tex((double)((float)(u + 0) * 0.0078125F), (double)((float)(v + 0) * 0.0078125F)).endVertex();\n tessellator.draw();\n }", "public Hero(LogicController logicController, Vector2 vec){\n this.setWorld(logicController.getWorld());\n this.logicController=logicController;\n sprite = new Sprite();\n position=vec;\n booleanDefinition();\n resetCounters();\n this.bombs=new ArrayList<Bomb>();\n if(!logicController.getGame().getIsTest())\n heroAnimations();\n heroBody = new HeroBody(logicController, this,vec);\n if(!logicController.getGame().getIsTest()) {\n heroStandingTextureLoad();\n standRight.flip(true, false);\n sprite.setBounds(0, 0, 17*MyGame.PIXEL_TO_METER, 22*MyGame.PIXEL_TO_METER);\n }\n soundHurt= Gdx.audio.newSound(Gdx.files.internal(\"Sounds/hero_hurt.wav\"));\n soundDying= Gdx.audio.newSound(Gdx.files.internal(\"Sounds/hero_dying.wav\"));\n }", "public void move(){\n\t\tswitch(state){\r\n\t\t\tcase ATField.SPRITE_STAND:\r\n\t\t\t\tspriteX = 0;\r\n\t\t\t\tcoords = standbySprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\r\n\t\t\tcase ATField.SPRITE_WALK:\r\n\t\t\t\tif(spriteX >walkSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tcoords = walkSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_RUN:\r\n\t\t\t\t\r\n\t\t\t\tif(spriteX >runSprite.size() - 1){\r\n\t\t\t\t\tspriteX = 0;\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = runSprite.get(spriteX);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase ATField.SPRITE_JUMP:\r\n\t\t\t\tif(spriteX >5){\r\n\t\t\t\t\tsetState(STAND);\r\n\t\t\t\t}\r\n\t\t\t\tcoords = jumpSprite.get(0);\r\n\t\t\t\tspriteImg = new Rect(coords.left,coords.top,coords.right,coords.bottom);\r\n\t\t\t\tactualImg = new Rect(x, y, x + width, y + height);\r\n\t\t\t\tspriteX++;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public Boat() {\n batch = new SpriteBatch();\n }", "public Hero(float x, float y, int controlType) {\n\t\tgraphic = new Graphic(\"HERO\");\n\t\tspeed = 0.12f;\n\t\tthis.controlType = controlType;\n\t\tgraphic.setPosition(x,y);\n\t}", "public void evaluateSprite(){\n if(this.orientation == Orientation.FACING_NORTH) {\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingNorth.png\"));\n }\n if(this.orientation == Orientation.FACING_WEST){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingWest.png\"));\n }\n if(this.orientation == Orientation.FACING_SOUTH){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingSouth.png\"));\n }\n if(this.orientation == Orientation.FACING_EAST){\n texture = new Texture(Gdx.files.internal(\"/assets/gameObjects/playerFacingEast.png\"));\n }\n\n this.sprite = new Sprite(texture);\n }", "public Ufo(int x, int y, int width, int height, int speed, String sprite) {\r\n\t\tsuper();\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.width = width;\r\n\t\tthis.height = height;\r\n\t\tthis.speed = speed;\r\n\t\tthis.sprite = sprite;\r\n\t}", "private void createInstructionManual() {\n TextButton mainMenuButton = new TextButton(\"Main Menu\", skin);\n mainMenuButton.addListener(\n new ChangeListener() {\n @Override\n public void changed(ChangeEvent changeEvent, Actor actor) {\n game.setScreen(GdxGame.ScreenType.MAIN_MENU);\n }\n });\n\n\n Image bgImage = new Image(ServiceLocator.getResourceService()\n .getAsset(\"game-instruction/tutorialScreen_new.png\", Texture.class));\n bgImage.setScaling(Scaling.fit);\n buttonTable = new Table();\n buttonTable.setFillParent(true);\n buttonTable.top().left();\n buttonTable.add(mainMenuButton);\n\n bgTable = new Table();\n bgTable.setFillParent(true);\n bgTable.center();\n bgTable.add(bgImage);\n // add the board to the stage first so that its can be under of score data\n stage.addActor(bgTable);\n stage.addActor(buttonTable);\n\n\n }", "private void init(AttributeSet attrs, int defStyle) {\n wall = new Vector<>();\n sprite = new Vector<>();\n\n // Caractéristiques des bords\n wallPaint = new Paint();\n wallPaint.setAntiAlias(true);\n wallPaint.setColor(0xff224499 );\n wallPaint.setStyle(Paint.Style.STROKE);\n wallPaint.setStrokeWidth(PIXEL_SIZE+1);\n wallPaint.setStrokeCap(Paint.Cap.ROUND);\n\n //On prépare le timer\n handler = new Handler();\n\n // On écoute les évènements.\n setOnTouchListener(this);\n\n }", "public void create() {\r\n\t\t\r\n\t\tTexture.setEnforcePotImages(false);\r\n\t\t\r\n\t\tGdx.input.setInputProcessor(new MyInputProcessor());\r\n\t\t\r\n\t\t\r\n\t\ttextures = Tex.getTex();\r\n\t\t// load images\r\n\t\ttextures.loadTexture(\"res/images/guyDown.png\", \"guyDown\");\r\n\t\ttextures.loadTexture(\"res/images/guyUp.png\", \"guyUp\");\r\n\t\ttextures.loadTexture(\"res/images/guy2Down.png\", \"guyDown2\");\r\n\t\ttextures.loadTexture(\"res/images/guy2Up.png\", \"guyUp2\");\r\n\t\ttextures.loadTexture(\"res/images/enemyDown.png\", \"enemyDown\");\r\n\t\ttextures.loadTexture(\"res/images/enemyUp.png\", \"enemyUp\");\r\n\t\t\r\n\t\ttextures.loadTexture(\"res/images/skyline.png\", \"skyline\");\r\n\t\ttextures.loadTexture(\"res/images/skyline2.jpg\", \"skyline2\");\r\n\t\ttextures.loadTexture(\"res/images/skyline3.png\", \"skyline3\");\t\t\r\n\t\ttextures.loadTexture(\"res/images/circuit board.jpg\", \"fundo2\");\r\n\t\ttextures.loadTexture(\"res/images/grav3.jpg\", \"menu\");\r\n\t\t\r\n\t\ttextures.loadTexture(\"res/images/singleplayer.png\", \"single\");\r\n\t\ttextures.loadTexture(\"res/images/multiplayer.png\", \"multi\");\r\n\t\ttextures.loadTexture(\"res/images/exit.png\", \"exit\");\r\n\t\ttextures.loadTexture(\"res/images/level1B.png\", \"B1\");\r\n\t\ttextures.loadTexture(\"res/images/level2B.png\", \"B2\");\r\n\t\ttextures.loadTexture(\"res/images/level3B.png\", \"B3\");\r\n\t\ttextures.loadTexture(\"res/images/mainMenuB.png\", \"mainB\");\r\n\t\ttextures.loadTexture(\"res/images/win1.png\", \"win1\");\r\n\t\ttextures.loadTexture(\"res/images/win2.png\", \"win2\");\r\n\t\ttextures.loadTexture(\"res/images/tryagain.png\", \"retry\");\r\n\t\ttextures.loadTexture(\"res/images/easy.png\", \"easy\");\r\n\t\ttextures.loadTexture(\"res/images/medium.png\", \"medium\");\r\n\t\ttextures.loadTexture(\"res/images/hard.png\", \"hard\");\r\n\t\ttextures.loadTexture(\"res/images/difficulty.png\", \"difficulty\");\r\n\t\ttextures.loadTexture(\"res/images/thunder2.png\", \"thunder\");\r\n\t\r\n\t\ttextures.loadTexture(\"res/images/levelcleared.png\", \"cleared\");\r\n\t\ttextures.loadTexture(\"res/images/you lost.png\", \"lost\");\r\n\t\ttextures.loadTexture(\"res/images/playerpress.png\", \"playerp\");\r\n\t\ttextures.loadTexture(\"res/images/player1press.png\", \"player1p\");\r\n\t\ttextures.loadTexture(\"res/images/player2press.png\", \"player2p\");\r\n\t\ttextures.loadTexture(\"res/images/selectthelevel.png\", \"select\");\r\n\t\t\r\n\t\t\r\n\t\tsb = new SpriteBatch();\r\n\t\tcam = new OrthographicCamera();\r\n\t\tcam.setToOrtho(false, V_WIDTH, V_HEIGHT);\r\n\t\thudCam = new OrthographicCamera();\r\n\t\thudCam.setToOrtho(false, V_WIDTH, V_HEIGHT);\r\n\t\tgsm = new GameStateManager(this);\r\n\t\t\t\t\r\n\t}", "public Boss() {\n\t\tlife = 3;\n\t\timage = new Image(\"/Model/boss3.png\", true);\n\t\tboss = new ImageView(image);\n\t\tRandom r = new Random();\n\t\tboss.setTranslateX(r.nextInt(900));\n\t\tboss.setTranslateY(0);\n\t\tisAlive = true;\n\t}", "public BuildingState(PocketHandler handler){\n\t\t//Calls parent class\n\t\tsuper(handler);\n\t\t\n\t\t//Instantiate Objects\n\t\tloader = new BufferedImageLoader();\n\t\tmenuTimer = new MenuTimer();\n\t\t\n\t\t\n\t\t//Loads in images required for the main menu\n\t\ttry {\n\t\t\ttext = loader.loadImage(\"/OtherPictures/enterArcade.png\");\n\t\t\tmainMenu = loader.loadImage(\"/OtherPictures/mainMenu.png\");\n\t\t\tspaceText=loader.loadImage(\"/OtherPictures/Space Text.png\");\n\t\t\tborder=loader.loadImage(\"/OtherPictures/Border.png\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t}", "@Override\n public void create () {\n batch = new SpriteBatch();\n height = Gdx.graphics.getHeight();\n width = Gdx.graphics.getWidth();\n\n bullets = new ArrayList<Bullet>();\n fondo = new Texture(\"background.png\");\n nave = new Texture(\"space-ship-24px.png\");\n\n spaceship = new SpaceShip();\n Enemy = new Enemy();\n //Enemy = new Sprite(nave);\n //spaceship.setPosition(348, 50);\n Enemy.setPosition(348, 300);\n System.out.println(x);\n }", "Actor(int x, int y, Texture image) {\n this.setX(x);\n this.setY(y);\n setImage(image);\n }", "public void drawSprite(int x, int y, int width, int height) {\n\n\t}", "private static Sprite makeHuman() {\n Sprite torso = new RectangleSprite(0, 0, 200, 350, 20.0F, false, \"torso\");\n Sprite head = new RectangleSprite(0, 0, 150, 200, 200.0F, true, \"head\");\n Sprite leftUpperLeg = new RectangleSprite(0, 0, 50, 225, 20.0F, true, \"leftupperleg\");\n Sprite rightUpperLeg = new RectangleSprite(0, 0, 50, 225, 20.0F, true, \"rightupperleg\");\n Sprite leftLowerLeg = new RectangleSprite(0, 0, 50, 200, 20.0F, true, \"leftlowerleg\");\n Sprite rightLowerLeg = new RectangleSprite(0, 0, 50, 200, 20.0F, true, \"rightlowerleg\");\n Sprite leftFoot = new RectangleSprite(0, 0, 80, 35, 20.0F, true, \"leftfoot\");\n Sprite rightFoot = new RectangleSprite(0, 0, 80, 35, 20.0F, true, \"rightfoot\");\n Sprite leftUpperArm = new RectangleSprite(0,0, 200, 50, 20.0F, true,\"leftupperarm\");\n Sprite rightUpperArm = new RectangleSprite(0,0, 200, 50, 20.0F, true,\"rightupperarm\");\n Sprite leftLowerArm = new RectangleSprite(0,0, 175, 50, 20.0F, true,\"leftlowerarm\");\n Sprite rightLowerArm = new RectangleSprite(0,0, 175, 50, 20.0F, true,\"rightlowerarm\");\n Sprite leftHand = new RectangleSprite(0, 0, 50, 50, 20.0F, true, \"lefthand\");;\n Sprite rightHand = new RectangleSprite(0, 0, 50, 50, 20.0F, true, \"righthand\");;\n\n // Translate Torso\n Matrix torsoMatrix = new Matrix();\n torsoMatrix.postTranslate(700, 500);\n torso.transform(torsoMatrix);\n\n // Translate Head\n Matrix headMatrix = new Matrix();\n headMatrix.postTranslate(30, -200);\n head.transform(headMatrix);\n\n // Translate Left hand\n Matrix leftHandMatrix = new Matrix();\n leftHandMatrix.postTranslate(-50, 0);\n leftHand.transform(leftHandMatrix);\n\n // Translate Right hand\n Matrix rightHandMatrix = new Matrix();\n rightHandMatrix.postTranslate(175, 0);\n rightHand.transform(rightHandMatrix);\n\n // Translate Left Upper Arm\n Matrix leftUpperArmMatrix = new Matrix();\n leftUpperArmMatrix.postTranslate(-200, 0);\n leftUpperArm.transform(leftUpperArmMatrix);\n\n // Translate Right Upper Arm\n Matrix rightUpperArmMatrix = new Matrix();\n rightUpperArmMatrix.postTranslate(200, 0);\n rightUpperArm.transform(rightUpperArmMatrix);\n\n // Translate Left Lower Arm\n Matrix leftLowerArmMatrix = new Matrix();\n leftLowerArmMatrix.postTranslate(-175, 0);\n leftLowerArm.transform(leftLowerArmMatrix);\n\n // Translate Right Lower Arm\n Matrix rightLowerArmMatrix = new Matrix();\n rightLowerArmMatrix.postTranslate(200, 0);\n rightLowerArm.transform(rightLowerArmMatrix);\n\n // Translate Left Upper Leg\n Matrix leftUpperLegMatrix = new Matrix();\n leftUpperLegMatrix.postTranslate(10, 350);\n leftUpperLeg.transform(leftUpperLegMatrix);\n\n // Translate Right Upper Leg\n Matrix rightUpperLegMatrix = new Matrix();\n rightUpperLegMatrix.postTranslate(140, 350);\n rightUpperLeg.transform(rightUpperLegMatrix);\n\n // Translate Left Lower Leg\n Matrix leftLowerLegMatrix = new Matrix();\n leftLowerLegMatrix.postTranslate(0, 225);\n leftLowerLeg.transform(leftLowerLegMatrix);\n\n // Translate Right Lower Leg\n Matrix rightLowerLegMatrix = new Matrix();\n rightLowerLegMatrix.postTranslate(0, 225);\n rightLowerLeg.transform(rightLowerLegMatrix);\n\n // Translate Left Foot\n Matrix leftFootMatrix = new Matrix();\n leftFootMatrix.postTranslate(-50, 190);\n leftFoot.transform(leftFootMatrix);\n\n // Translate Right Foot\n Matrix rightFootMatrix = new Matrix();\n rightFootMatrix.postTranslate(20, 190);\n rightFoot.transform(rightFootMatrix);\n\n\n // Set Min/Max Rotation for all body parts\n head.max_degree = 50;\n head.min_degree = -50;\n leftUpperLeg.min_degree = -90;\n leftUpperLeg.max_degree = 90;\n rightUpperLeg.min_degree = -90;\n rightUpperLeg.max_degree = 90;\n leftLowerLeg.min_degree = -90;\n leftLowerLeg.max_degree = 90;\n rightLowerLeg.min_degree = -90;\n rightLowerLeg.max_degree = 90;\n leftFoot.min_degree = -35;\n leftFoot.max_degree = 35;\n rightFoot.max_degree = 35;\n rightFoot.min_degree = -35;\n leftLowerArm.min_degree = -135;\n leftLowerArm.max_degree = 135;\n rightLowerArm.min_degree = -135;\n rightLowerArm.max_degree = 135;\n leftHand.min_degree = -35;\n leftHand.max_degree = 35;\n rightHand.min_degree = -35;\n rightHand.max_degree = 35;\n //leftUpperArm.min_degree = -360;\n //leftUpperArm.max_degree = 360;\n\n // Define Torso's children\n torso.addChild(head);\n torso.addChild(leftUpperArm);\n torso.addChild(rightUpperArm);\n torso.addChild(leftUpperLeg);\n torso.addChild(rightUpperLeg);\n\n // Define Upper Arm Children\n leftUpperArm.addChild(leftLowerArm);\n rightUpperArm.addChild(rightLowerArm);\n\n // Define hand Relationship\n leftLowerArm.addChild(leftHand);\n rightLowerArm.addChild(rightHand);\n\n // Define Upper Leg Children\n leftUpperLeg.addChild(leftLowerLeg);\n rightUpperLeg.addChild(rightLowerLeg);\n leftLowerLeg.addChild(leftFoot);\n rightLowerLeg.addChild(rightFoot);\n return torso;\n }", "@Override\n\t\t\tpublic void Execute()\n\t\t\t{\n\t\t\tSquare square = (Square) receiver;\n\t\t\t// The args for SpawnBuildingCommand are the X,Y coordinate for the Building used by the factory, \n\t\t\tIAsteroidGameFactory factory = GameBoard.Instance().GetFactory();\n\t\t\tSystem.out.println(\"Spawning Building at (\" + args[0] + \",\" + args[1] + \")\");\n\t\t\tsquare.Add(factory.MakeBuilding());\n\t\t\tGameBoard.Instance().IncrementBuildingCount();\n\t\t}", "public void addSprite(Sprite thisSprite) {\n\t\tthis.addList.add(thisSprite);\n\t\t\n\t}", "public void addSprite(Sprite sprite) {\n\t\tsprites.add(sprite);\n\t}", "public void addSprite(Sprite sprite) {\n\t\tsprites.add(sprite);\n\t}", "public Square createWall() {Collect.Hit(\"BoardFactory.java\",\"createWall()\"); Collect.Hit(\"BoardFactory.java\",\"createWall()\", \"1976\");return new Wall(sprites.getWallSprite()) ; }", "Button(int ID, Texture image) {\n\n this.ID = ID;\n objectTexture = image;\n\n //Player 1 buttons\n int buttonx = Gdx.graphics.getWidth() - (Gdx.graphics.getHeight() / 4);\n int button1y = 0;\n int button2y = Gdx.graphics.getHeight() / 4;\n int button3y = Gdx.graphics.getHeight() / 2;\n int button4y = (3 * Gdx.graphics.getHeight()) / 4;\n //Player 2 buttons\n int buttonx2 = 0;\n int button5y = (3 * Gdx.graphics.getHeight()) / 4;\n int button6y = Gdx.graphics.getHeight() / 2;\n int button7y = Gdx.graphics.getHeight() / 4;\n int button8y = 0;\n //StartGame Button\n int startGameX = (Gdx.graphics.getWidth()/2)-((Gdx.graphics.getWidth()/3)/2);\n int startGameY = (Gdx.graphics.getHeight()/3)-(Gdx.graphics.getWidth()/3/2/2);\n\n //check which button we are\n switch (ID) {\n case 1:\n currentPosition = new GridPoint2(buttonx, button1y);\n break;\n case 2:\n currentPosition = new GridPoint2(buttonx, button2y);\n break;\n case 3:\n currentPosition = new GridPoint2(buttonx, button3y);\n break;\n case 4:\n currentPosition = new GridPoint2(buttonx, button4y);\n break;\n case 5:\n currentPosition = new GridPoint2(buttonx2, button5y);\n break;\n case 6:\n currentPosition = new GridPoint2(buttonx2, button6y);\n break;\n case 7:\n currentPosition = new GridPoint2(buttonx2, button7y);\n break;\n case 8:\n currentPosition = new GridPoint2(buttonx2, button8y);\n break;\n case 9:\n currentPosition = new GridPoint2(startGameX, startGameY);\n break;\n }\n\n //Now set the area to be clicked. first two parameters are position, then size\n if (ID == 9)\n {\n clickArea = new Rectangle(startGameX, Gdx.graphics.getHeight()-startGameY-(Gdx.graphics.getWidth()/3/2),\n Gdx.graphics.getWidth()/3, (Gdx.graphics.getWidth()/3)/2);\n }\n else {\n clickArea = new Rectangle(currentPosition.x, currentPosition.y,\n Gdx.graphics.getHeight() / 4, Gdx.graphics.getHeight() / 4);\n }\n }", "public Bomb(int x, int y){\r\n\t\t\r\n\t\t//Bomb image.\r\n\t\tImageIcon bombIMG = new ImageIcon(\"src/sprites/bullet9.png\");\r\n\t\tsetImage(bombIMG.getImage());\r\n\t\t\r\n\t\t//It just so works out that the bombs drop nicely from the alien sprite so no offset is needed.\r\n\t\tsetx(x);\r\n\t\tsety(y);\r\n\t\t\r\n\t}", "@Override\n\tpublic void create() {\n\t\t// TODO: create completely new batches for sprites and models\n\t\tsprites = new SpriteBatch();\n\t\tmodelBatch = new ModelBatch();\n\n\t\t// TODO: create a new environment\n\t\t// set a new color attribute for ambient light in the environment\n\t\t// add a new directional light to the environment\n\n\t\tenvironment = new Environment();\n\t\tenvironment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 0.1f));\n\t\tenvironment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));\n\n\t\t// create a new logo texture from the \"data/firstorder.png\" file\n\t\tlogo = new Texture(\"data/firstorder.png\");\n\n\t\t// TODO: create a new perspective camera with a field-of-view of around 70,\n\t\t// and the width and height found in the Gdx.graphics class\n\t\t// set the position of the camera to (100, 100, 100)\n\t\t// set the camera to look at the origin point (0, 0, 0)\n\t\t// set the near and far planes of the camera to 1 and 300\n\t\t// update the camera\n\t\tint width = Gdx.graphics.getWidth();\n\t\tint height = Gdx.graphics.getHeight();\n\t\tcam = new PerspectiveCamera(70f, width, height);\n\t\tcam.position.set(100f,100f,100f);\n\t\tcam.lookAt(0f, 0f, 0f);\n\t\tcam.near = 1f;\n\t\tcam.far = 300f;\n\t\tcam.update();\n\n\t\tbackgroundMusic = Gdx.audio.newMusic(Gdx.files.internal(\"data/StarWarsMusicTheme.mp3\"));\n\t\tbackgroundMusic.setLooping(true);\n\t\tbackgroundMusic.play();\n\n\t\t// create a new model loader\n\t\tfinal ModelLoader modelLoader = new ObjLoader();\n\n\t\t// TODO: load the internal file \"data/stormtrooper.obj\" into the model variable\n\t\tmodel = modelLoader.loadModel(Gdx.files.internal(\"data/stormtrooper_unwrapped.obj\"));\n\n\t\t// TODO: create a new model instance and scale it to 20% it's original size (it's huge...)\n\t\tinstance = new ModelInstance(model); // ← our model instance is here\n\t\tinstance.transform.scale(0.2f, 0.2f, 0.2f);\n\n\t\t// TODO: set the helmet details material to a new diffuse black color attribute\n\n\t\tgetHelmetDetails().material = new Material(ColorAttribute.createDiffuse(Color.BLACK));\n\t\tgetHelmetMoreDetails().material = new Material(ColorAttribute.createDiffuse(Color.DARK_GRAY));\n\t\tgetHelmetBase().material = new Material(ColorAttribute.createDiffuse(Color.WHITE));\n\n\t\t// set the input processor to work with our custom input:\n\t\t// clicking the image in the lower right should change the colors of the helmets\n\t\t// bonus points: implement your own GestureDetector and an input processor based on it\n\t\tGdx.app.log(\"instance node size\", \"\"+String.valueOf(instance.nodes.size));\n\n\n\t\tGdx.input.setInputProcessor(new FirstOrderInputProcessor(cam, new Runnable() {\n\t\t\tprivate Texture camouflage = new Texture(\"data/camouflage.png\");\n\t\t\tprivate Texture paper = new Texture(\"data/paper.png\");\n\t\t\tprivate Texture hive = new Texture(\"data/hive.png\");\n\t\t\tprivate Texture strips = new Texture(\"data/strip.png\");\n\t\t\tprivate Texture grass = new Texture(\"data/grass.jpeg\");\n\t\t\tpublic void run() {\n\t\t\t\t// TODO: change the helmet details material to a new diffuse random color\n\n\t\t\t\tgetHelmetDetails().material = getRandomMaterial();\n\t\t\t\tgetHelmetMoreDetails().material = getRandomMaterial();\n\n\t\t\t\t// bonus points:\n\t\t\t\t// randomly change the material of the helmet base to a texture\n\t\t\t\t// from the files aloha.png and camouflage.png (or add your own!)\n\t\t\t\tgetHelmetBase().material = getRandomMaterial();\n\t\t\t\tsetRandomLight();\n\n\t\t\t}\n\n\t\t\tprivate Material getRandomMaterial() {\n\t\t\t\tint rand = (int) (MathUtils.random() * 100) % 8;\n\t\t\t\tGdx.app.log(\"Random\", \"\" + rand);\n\n\t\t\t\t//Texture aloha = new Texture(\"data/aloha.png\");\n\t\t\t\tMaterial randMaterial = null;\n\n\t\t\t\tswitch (rand) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createReflection(Color.WHITE));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(paper));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(hive));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(camouflage));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\trandMaterial = new Material(ColorAttribute.createDiffuse(getRandomColor()));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(strips));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\trandMaterial = new Material(TextureAttribute.createDiffuse(grass));\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn randMaterial;\n\t\t\t}\n\t\t}));\n\t}", "public SpriteUIComponentBackground(UIComponent master, HandlerRelay handlers, \n\t\t\tSprite sprite)\n\t{\n\t\tsuper(master, handlers);\n\t\t\n\t\tthis.drawer = new SingleSpriteDrawer(\n\t\t\t\tsprite.withDimensions(master.getDimensions()), this, handlers);\n\t\tthis.drawer.setOrigin(master.getOrigin());\n\t\tthis.lastOrigin = master.getOrigin();\n\t\tthis.lastDimensions = master.getDimensions();\n\t}", "public void create() {\n\t\t// TODO Auto-generated method stub\n\t\tskin = new Skin(Gdx.files.internal(\"uiskin.json\"));\n\t\tstage = new Stage();\n\t\tfinal TextButton playButton = new TextButton(\"Play\", skin, \"default\"); // Creates button with label \"play\"\n\t\tfinal TextButton leaderboardButton = new TextButton(\"Leaderboards\", skin, \"default\"); // Creates button with\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// label \"leaderboards\"\n\t\tfinal TextButton optionsButton = new TextButton(\"Options\", skin, \"default\"); // Creates button with label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"options\"\n\t\tfinal TextButton userInfoButton = new TextButton(\"User Info\", skin, \"default\");// Creates button with label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// \"User Info\"\n\t\tfinal TextButton quitGameButton = new TextButton(\"Exit Game\", skin, \"default\");\n\n\t\t// Three lines below this set the widths of buttons using the constant widths\n\t\tplayButton.setWidth(Gdx.graphics.getWidth() / 3);\n\t\tleaderboardButton.setWidth(playButton.getWidth());\n\t\toptionsButton.setWidth(playButton.getWidth());\n\t\tuserInfoButton.setWidth(playButton.getWidth());\n\t\tquitGameButton.setWidth(playButton.getWidth());\n\n\t\t// Set the heights using constant height\n\t\tplayButton.setHeight(Gdx.graphics.getHeight() / 15);\n\t\tleaderboardButton.setHeight(playButton.getHeight());\n\t\toptionsButton.setHeight(playButton.getHeight());\n\t\tuserInfoButton.setHeight(playButton.getHeight());\n\t\tquitGameButton.setHeight(playButton.getHeight());\n\n\t\t// Sets positions for buttons\n\t\tplayButton.setPosition(Gdx.graphics.getWidth() / 20, Gdx.graphics.getHeight() / 3);\n\t\tleaderboardButton.setPosition(playButton.getX(), playButton.getY() - leaderboardButton.getHeight());\n\t\toptionsButton.setPosition(playButton.getX(), leaderboardButton.getY() - optionsButton.getHeight());\n\t\tuserInfoButton.setPosition(playButton.getX(), optionsButton.getY() - userInfoButton.getHeight());\n\t\tquitGameButton.setPosition(playButton.getX(), userInfoButton.getY() - quitGameButton.getHeight());\n\n\t\t// User Info Name and sign in/ sign out button at the top of the screen\n\t\tfinal Label userInfoLabel = new Label(\"HI GUYS: \" + Constants.user, skin, \"default\");\n\t\tfinal TextButton userSignButton = new TextButton(\"singin/out\", skin, \"default\");\n\t\tuserSignButton.setHeight(Gdx.graphics.getHeight() / 40);\n\t\tuserSignButton.setPosition(Gdx.graphics.getWidth() - userSignButton.getWidth(),\n\t\t\t\tGdx.graphics.getHeight() - userSignButton.getHeight());\n\t\tif (Constants.userID == 0)\n\t\t\tuserSignButton.setText(\"Sign In\");\n\t\telse\n\t\t\tuserSignButton.setText(\"Sign Out\");\n\t\tuserSignButton.addListener(new ClickListener() { // When Sign in/Sing out is pressed in the top right\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tif (Constants.userID == 0) { // If no one is signed in\n\t\t\t\t\tdispose();\n\t\t\t\t\tgame.setScreen(new UserInfoScreen(game));\n\t\t\t\t} else { // If a user is currently signed in\n\t\t\t\t\tConstants.userID = 0;\n\t\t\t\t\tConstants.user = \"Temporary User\";\n\t\t\t\t\tcreate();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tuserInfoLabel.setHeight(userSignButton.getHeight());\n\t\tuserInfoLabel.setPosition(Gdx.graphics.getWidth() - userInfoLabel.getWidth() - userSignButton.getWidth(),\n\t\t\t\tGdx.graphics.getHeight() - userInfoLabel.getHeight());\n\t\tstage.addActor(userInfoLabel);\n\t\tstage.addActor(userSignButton);\n\n\t\tplayButton.addListener(new ClickListener() { // This tells button what to do when clicked\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new LobbyScreen(game)); // Switch over to lobby screen\n\t\t\t}\n\t\t});\n\n\t\tleaderboardButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new LeaderboardScreen(game)); // Switch over to leaderboard screen\n\t\t\t}\n\t\t});\n\n\t\toptionsButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t// Do some stuff when clicked\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new OptionsScreen(game));\n\n\t\t\t}\n\t\t});\n\n\t\tuserInfoButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tgame.setScreen(new UserInfoScreen(game));\n\n\t\t\t}\n\t\t});\n\n\t\tquitGameButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tdispose();\n\t\t\t\tGdx.app.exit();\n\t\t\t}\n\t\t});\n\n\t\t// Adds all buttons to stage to be rendered\n\t\tstage.addActor(playButton);\n\t\tstage.addActor(leaderboardButton);\n\t\tstage.addActor(optionsButton);\n\t\tstage.addActor(userInfoButton);\n\t\tstage.addActor(quitGameButton);\n\n\t\tGdx.input.setInputProcessor(stage);\n\t}", "void moveToSprite(Sprite s) {\n _x = s._x;\n _y = s._y;\n }", "@Override\r\n\tpublic void render(SpriteBatch sb) {\n\t\tsb.draw(this.getSpritesheet(), this.getPos().getX(), this.getPos().getY());\r\n\t}", "@Override\n\tpublic void create() {\n\t\tassets = new AssetManager();\n\t\tspriteBatch = new SpriteBatch();\n\t\tGdx.input.setInputProcessor(this);\n\t\tGdx.input.setCatchMenuKey(true);\n\t\tGdx.input.setCatchBackKey(true);\n\t\tGdx.input.setInputProcessor(this);\n\t\t\n\t\t//WorldRenderer.BLEND_FUN1=GL20.GL_SRC_ALPHA;\n\t\t//WorldRenderer.BLEND_FUN2=GL20.GL_ONE_MINUS_SRC_ALPHA;\n\t\t//WorldRenderer.CLEAR_COLOR.set(0.5f,0.1f,0.2f,1);\n\t\t//UIRenderer.BLEND_FUN1=GL20.GL_SRC_ALPHA;\n\t\t//UIRenderer.BLEND_FUN2=GL20.GL_ONE_MINUS_SRC_ALPHA;\n\t\t\n\t\tspriteBatch.setBlendFunction(GL20.GL_SRC_ALPHA,GL20.GL_ONE);\n\t\tspriteBatch.enableBlending();\n\t\t\n\t\tdefaultShader=SpriteBatch.createDefaultShader();\n\t}", "Enemy(int floor, int position, String n, int l){\r\n\t\tname = n;\r\n\t\talive = true;\r\n\t\tlevel = l;\r\n\t\thealth = 2*level;\r\n\t\tleftImage = new ImageIcon(getClass().getClassLoader().getResource(n +\"Left.png\"));\r\n\t\trightImage = new ImageIcon(getClass().getClassLoader().getResource(n +\"Right.png\"));\r\n\t\tsetIcon(rightImage);\r\n\r\n\t\t\ty = floor - 100;\r\n\t\t\tx = position;\r\n\t\t\tsetSize(50, 100);\r\n\t\t\tsetLocation(x,y);\r\n\t\t\tsetBackground(Color.red);\r\n\r\n\r\n\t\t}", "void generateEnemy(){\n\t\tEnemy e = new Enemy((int)(Math.random()*\n\t\t\t(cp.getWidthScreen() - (ss.getWidth()/2)))\n\t\t\t,ss.getHeight(), cp.getHieghtScreen());\t\t\t\t//Enemy (int x, int y, int heightScreen)\n\t\tcp.shapes.add(e);\n\t\tenemies.add(e);\n\t}", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "Sprite(Sprite s) {\n _img = s._img;\n _x = s._x;\n _y = s._y;\n _w = s._w;\n _h = s._h;\n _rotVector = new PVector(s._rotVector.x, s._rotVector.y, 0);\n _front = s._front;\n _hitboxCenter = new PVector(s._hitboxCenter.x, s._hitboxCenter.y);\n _hitbox = new PVector[s._hitbox.length];\n for (int i = 0; i < _hitbox.length; i++) {\n _hitbox[i] = new PVector(s._hitbox[i].x, s._hitbox[i].y);\n }\n _flipped = s._flipped;\n }", "private void createGraphics(Texture spriteSheet, float frameTime) {\n createAnimations(spriteSheet, frameTime);\n createIdleRegions(spriteSheet);\n }", "private void renderSprite(RenderEntity ent) {\n float radius = ent.radius;\n boolean useAxis = (ent.flags & RenderEntity.FLAG_SPRITE_AXIS) == RenderEntity.FLAG_SPRITE_AXIS;\n if(useAxis) {\n left.set(ent.axis[0]);\n up.set(ent.axis[1]);\n } else {\n left.set(view.ViewAxis[1]);\n up.set(view.ViewAxis[2]);\n }\n left.scale(radius);\n up.scale(-radius);\n\n float s1 = 0, t1 = 0, s2 = 1, t2 = 1;\n \n if(ent.mat != null && ent.mat.getTexture() != null) {\n Vector2f texSize = ent.mat.getTextureSize();\n Vector2f texOffset = ent.mat.getTextureOffset(ent.frame);\n s1 = texOffset.x;\n t1 = texOffset.y;\n s2 = s1 + texSize.x;\n t2 = t1 + texSize.y;\n } \n \n boolean rendernow = !r_batchsprites.isTrue() || currentRenderFlags != RF_POSTDEFERRED;\n if(rendernow) {\n // Setup render state\n if(ent.mat != null && ent.mat.getTexture() != null) {\n // Grab texture offsets from material\n ent.mat.getTexture().Bind();\n if(ent.mat.blendmode == CubeMaterial.BlendMode.ONE) {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);\n } else {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);\n }\n } else {\n GLState.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE_MINUS_SRC_ALPHA);\n Ref.ResMan.getWhiteTexture().Bind();\n }\n\n GL11.glDisable(GL11.GL_CULL_FACE);\n GL11.glDepthMask(false); // dont write to depth\n\n AddQuadStampExt(ent.origin, left, up, ent.outcolor,s1,t1,s2,t2);\n\n // clear renderstate\n GL11.glEnable(GL11.GL_CULL_FACE);\n GL11.glDepthMask(true);\n } else {\n // add to polygon batch and render later\n polyBatcher.addSpriteCall(ent);\n ByteBuffer dst = polyBatcher.getMappedBuffer();\n writeQuadStamp(dst, ent.origin, left, up, ent.outcolor,s1,t1,s2,t2);\n }\n }", "@Override\n\tpublic void show() {\n\t backgroundImage = new Texture(Gdx.files.internal(\"resources/images/menu.png\"));\n\t soccerImage = new Texture(Gdx.files.internal(\"resources/images/ball.gif\"));\n\t boomerangImage = new Texture(Gdx.files.internal(\"resources/images/boomerang.gif\"));\n\t wolfImage = new Texture(Gdx.files.internal(\"resources/images/wolf.gif\"));\n\t boyImage = new Texture(Gdx.files.internal(\"resources/images/bueno2.png\"));\n\t boyImageInv = new Texture(Gdx.files.internal(\"resources/images/bueno2Inv.png\"));\n\t grassImage = new Texture(Gdx.files.internal(\"resources/images/piso.png\"));\n\t \n\n\t // load the drop sound effect and the rain background \"music\"\n\t dropSound = Gdx.audio.newSound(Gdx.files.internal(\"resources/drop.wav\"));\n\t rainMusic = Gdx.audio.newMusic(Gdx.files.internal(\"resources/rain.mp3\"));\n\n\t // start the playback of the background music immediately\n\t rainMusic.setLooping(true);\n\t //rainMusic.play();\n\n\t // create the camera and the SpriteBatch\n\t camera = new OrthographicCamera();\n\t camera.setToOrtho(false, 800, 480);\n\t batch = new SpriteBatch();\n\n\t // create a Rectangle to logically represent the boy\n\t boy = new Rectangle();\n\t boy.x = 130; //800 / 2 - 50 / 2; // center the boy horizontally\n\t boy.y = 235; // just above the ground\n\t boy.width = 50;\n\t boy.height = 74;\n\t \n\t //boy2\n\t boy2 = new Rectangle();\n\t boy2.x = 130;\n\t boy2.y = 160; \n\t boy2.width = 50;\n\t boy2.height = 74;\n\t \n\t //create a grass Rectangle to represent the grass\n\t grass = new Rectangle();\n\t grass.x = 0;\n\t grass.y = camera.viewportHeight/2-30;\n\t \n\t grass2 = new Rectangle();\n\t grass2.x = camera.viewportWidth;\n\t grass2.y = camera.viewportHeight/2-30;\n\t \n\t velocidad = 8;\n\t counterGravity = 0.0;\n\t \n\t countObjs = 1;\n\t //stateTime = 0;\n\n\t // create the soccerballs array and spawn the first soccer ball\n\t soccerballs = new Array<Rectangle>();\n\n\t //create the boomerans array and spawn the first boomerang\n\t boomerangs = new Array<Rectangle>();\n\t \n\n\t spawnBoomerangs();\n\t spawnSoccerBall();\n\t\t\n\t}", "Enemy(int floor, int position, String n, int l, int m){\r\n\t\tname = n;\r\n\t\talive = true;\r\n\t\tmovetype = m;\r\n\t\tlevel = l;\r\n\t\thealth = 10*level;\r\n\t\tleftImage = new ImageIcon(getClass().getClassLoader().getResource(n +\"Left.png\"));\r\n\t\trightImage = new ImageIcon(getClass().getClassLoader().getResource(n +\"Right.png\"));\r\n\t\tsetIcon(rightImage);\r\n\r\n\t\t\ty = floor - 100;\r\n\t\t\tx = position;\r\n\t\t\tsetSize(50, 100);\r\n\t\t\tsetLocation(x,y);\r\n\t\t\tsetBackground(Color.red);\r\n\r\n\r\n\t\t}", "@Override\n\tpublic void createScene() {\n\t\t\n\t\tSprite backGround = new Sprite(0, 0, rm.setting_background_region, rm.vbo);\n\t\t\n\t\tv_on = new Sprite(400,100,rm.on_region,rm.vbo){\n\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\n\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\n\t\t\t\t\tisVoice = true;\n\t\t\t\t\t\n\t\t\t\t\tv_on.setColor(0, 0, 1);\n\t\t\t\t\tv_off.setColor(1,0,0);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t return false;\n\t\t\t}};\n\t\tv_off = new Sprite(500,100,rm.off_region,rm.vbo){\n\t\t\t\t@Override\n\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\n\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tisVoice = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tv_off.setColor(0, 0, 1);\n\t\t\t\t\t\tv_on.setColor(1,0,0);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t return false;\n\t\t }};\n\t\ts_on = new Sprite(400,170,rm.on_region,rm.vbo){\n\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\n\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tisSound = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\ts_on.setColor(0, 0, 1);\n\t\t\t\t\t\ts_off.setColor(1,0,0);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t return false;\n\t\t\t\t}};\n\t\ts_off = new Sprite(500,170,rm.off_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisSound = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ts_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\ts_on.setColor(1,0,0);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t }};\n\t\t \n\t\t\n\t\t \n\t\tauto_on = new Sprite(400,240,rm.on_region,rm.vbo){\n\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\n\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tisAutofight = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\tauto_on.setColor(0, 0, 1);\n\t\t\t\t\t\tauto_off.setColor(1,0,0);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t return false;\n\t\t\t\t}};\n\t\tauto_off = new Sprite(500,240,rm.off_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisAutofight = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tauto_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\tauto_on.setColor(1,0,0);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t }};\n\t\t\t p_on = new Sprite(400,310,rm.on_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tisParticle = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tp_on.setColor(0, 0, 1);\n\t\t\t\t\t\t\tp_off.setColor(1,0,0);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t\t\t}};\n\t\t\tp_off = new Sprite(500,310,rm.off_region,rm.vbo){\n\t\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tisParticle = false;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tp_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\t\tp_on.setColor(1,0,0);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t return false;\n\t\t\t\t }};\n\t\t\t\t \n\t\t\t\t skill_on = new Sprite(400,380,rm.on_region,rm.vbo){\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tshowSkillEffect = true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tskill_on.setColor(0, 0, 1);\n\t\t\t\t\t\t\t\tskill_off.setColor(1,0,0);\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t return false;\n\t\t\t\t\t\t}};\n\t\t\t\tskill_off = new Sprite(500,380,rm.off_region,rm.vbo){\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tshowSkillEffect = false;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tskill_off.setColor(0, 0, 1);\n\t\t\t\t\t\t\t\t\tskill_on.setColor(1,0,0);\n\t\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t return false;\n\t\t\t\t\t }};\n\t\t\t \n\t\t\t Sprite back = new Sprite(690,365,rm.options_back_region,rm.vbo){\n\t\t\t\t\t@Override\n\t\t\t\tpublic boolean onAreaTouched(final TouchEvent pSceneTouchEvent, final float pTouchAreaLocalX, final float pTouchAreaLocalY) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(pSceneTouchEvent.isActionDown()){\n\t\t\t\t\t\t\tonBackKeyPressed();\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t return false;\n\t\t\t }};\n\t\t\t reset();\n\t\t \n\t \n\t\t \n\t attachChild(backGround);\n\t attachChild(v_off);\n\t attachChild(v_on);\n\t attachChild(s_off);\n\t attachChild(s_on);\n\t attachChild(auto_off);\n\t attachChild(auto_on);\n\t attachChild(p_off);\n\t attachChild(p_on);\n\t attachChild(skill_off);\n\t attachChild(skill_on);\n attachChild(back);\n\t\t\t\n\t registerTouchArea(v_off);\n registerTouchArea(v_on);\n registerTouchArea(s_off);\n registerTouchArea(s_on);\n registerTouchArea(auto_off);\n registerTouchArea(auto_on);\n registerTouchArea(p_off);\n registerTouchArea(p_on);\n registerTouchArea(skill_off);\n registerTouchArea(skill_on);\n \n\t registerTouchArea(back);\n\t \n\t\t\n\t}", "public Button(Vector2 pos, Main game, Texture[] texture) {\n// Setting variables\n this.buttonRect = new Rectangle();\n this.pos = pos;\n this.string = null;\n this.texture = texture[0];\n if (texture[1] != null) {\n this.selectTexture = texture[1];\n }\n this.game = game;\n\n// Adding the button to the list of buttons\n Main.buttons.add(this);\n\n// Setting position\n this.buttonRect.set(pos.x - (texture[0].getWidth() / 2f), pos.y - (texture[0].getHeight() / 2f), texture[0].getWidth(), texture[0].getHeight());\n clickSound = Gdx.audio.newSound(Gdx.files.internal(\"audio/sound effects/menuChoose.wav\"));\n }", "@Override\n public void show() {\n player = new Player(game.getAssetManager().get(\"player.png\", Texture.class), world, new Vector2(1, 2));\n floor = new Floor(game.getAssetManager().get(\"floor.png\", Texture.class), world, new Vector2(0, 0 + 0.5f), 20f, 1f);\n hud = new HUD();\n\n stage.addActor(floor);\n stage.addActor(player);\n\n //TODO: AUTOGENERATE when the player goes up.\n platforms.clear();\n int ax = (int) (Math.random() * 5 + 0);\n platforms.add(new Platform(game.getAssetManager().get(\"platform.png\", Texture.class), world, new Vector2(ax, 3), 1.2f, 0.3f));\n for (int i = 3; i <= 25; i++) {\n\n int x, y;\n x = (int) (Math.random() * 4.5 + 0.5);\n y = ((int) (Math.random() * 3 + 1)) + i;\n\n while ((x < ax && x > ax + 1f) && (x > ax && x < ax - 1f)) {\n x = (int) (Math.random() * 4.5 + 0.5);\n }\n Gdx.app.log(\"kk\",x+\"x\"+y);\n platforms.add(new Platform(game.getAssetManager().get(\"platform.png\", Texture.class), world, new Vector2(x, y), 1f, 0.3f));\n ax = x;\n }\n\n for (Platform platform : platforms) {\n stage.addActor(platform);\n }\n\n stage.getCamera().position.set(cameraInitialPosition);\n stage.getCamera().update();\n\n playing = false;\n jumps = 0;\n lastPlatformTouched = 0;\n\n song.play();\n\n }", "public Square createGround() {Collect.Hit(\"BoardFactory.java\",\"createGround()\"); Collect.Hit(\"BoardFactory.java\",\"createGround()\", \"1746\");return new Ground(sprites.getGroundSprite()) ; }", "public Bomb(int x, int y, String xFunction, String yFunction)\r\n\t{\t\r\n\t\tsuper(x, y, new Image[] { bombImage } , 0, 0, 1000, xFunction, yFunction);\r\n\t\tstartX = x;\r\n\t\tstartY = y;\r\n\t\t\r\n\t\t// Play the bomb sound when a bomb is made\r\n\t\tbombSound = new Sound(\"bomb.wav\");\r\n bombSound.playOnce();\r\n\t}", "public void onUpReleased(){\n// player.getSprite().setFitHeight(50);\n shipSoundPlayer.stop();\n if(GameEngine.isPlaying)\n player.setSprite(\"Sprites\\\\spaceship_new.png\");\n }", "public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }", "private void createWalls(){\n\t \tfloat wallWidth = GameRenderer.BOARD_WIDTH ;\n\t \tfloat wallHeight = GameRenderer.BOARD_HEIGHT ;\n\t \tint offset = -2;\n\t \tint actionBaOffset = 2;\n\t \t\n\t \t//Left Wall\n\t \tnew SpriteWall(0, actionBaOffset, 0, wallHeight+offset);\n\t \t\n\t \t//Right Wall\n\t \tnew SpriteWall(wallWidth+offset, actionBaOffset, wallWidth+offset, wallHeight+offset);\n\t \t\n\t \t//Top Wall\n\t \tnew SpriteWall(0, actionBaOffset, wallWidth+offset, actionBaOffset);\n\t \t\n\t \t//Bottom Wall\n\t \tnew SpriteWall(0, wallHeight+offset, wallWidth+offset, wallHeight+offset);\n\t \t\n\t }", "Stone create();", "public LevelButton(int y, String number, int stars){\n this.stars = stars;\n this.name = number;\n this.number = new Sprite(new Texture(Gdx.files.internal(\"huds/numbers/\"+number+\".png\")));\n\n slot = new Sprite(new Texture(Gdx.files.internal(\"huds/menu/level slot.png\")));\n star1 = new Sprite(new Texture(Gdx.files.internal(\"huds/menu/star.png\")));\n star2 = new Sprite(star1.getTexture());\n star3 = new Sprite(star1.getTexture());\n slot.setSize(slot.getWidth()*2,slot.getHeight()*2);\n slot.setPosition(Initial.HEIGHT/5, Initial.WIDTH*0.69f - (slot.getHeight()+ 10)*y);\n this.number.setPosition(slot.getX()+slot.getWidth()*0.35f,slot.getY()+slot.getHeight()*0.3f);\n this.number.setSize(this.number.getWidth()*3,this.number.getHeight()*3);\n if(stars == 2){\n star3.setColor(Color.BLACK);\n }\n if(stars == 1){\n star2.setColor(Color.BLACK);\n star3.setColor(Color.BLACK);\n }\n if(stars == 0){\n star1.setColor(Color.BLACK);\n star2.setColor(Color.BLACK);\n star3.setColor(Color.BLACK);\n }\n star1.setPosition(slot.getX() + 5 + slot.getWidth(),slot.getY()+slot.getHeight()/6);\n star2.setPosition(slot.getX() + slot.getWidth()*2 -5,slot.getY()+slot.getHeight()/6);\n star3.setPosition(slot.getX() + slot.getWidth()*3 -10,slot.getY()+slot.getHeight()/6);\n star1.setSize(slot.getWidth()*0.7f,slot.getHeight()*0.7f);\n star2.setSize(slot.getWidth()*0.7f,slot.getHeight()*0.7f);\n star3.setSize(slot.getWidth()*0.7f,slot.getHeight()*0.7f);\n\n rect = new Rectangle(slot.getX(),slot.getY(), Initial.WIDTH/2.7f,slot.getHeight());\n }", "private void createEnemy()\n {\n scorpion = new Enemy(\"Giant Scorpion\", 5, 10); \n rusch = new Enemy(\"Mr. Rusch\", 10, 1000);\n skeleton = new Enemy(\"Skeleton\", 10, 50);\n zombie = new Enemy(\"Zombie\", 12, 25);\n ghoul = new Enemy(\"Ghoul\", 15, 45);\n ghost = new Enemy(\"Ghost\", 400, 100);\n cthulu = new Enemy(\"Cthulu\", 10000000, 999999);\n concierge = new Enemy(\"Concierge\", 6, 100);\n wookie = new Enemy(\"Savage Wookie\", 100, 300);\n }", "void ship_setup() {\n ship = new Ship(level);\n ship_image_view = new ImageView(ship_image);\n ship_image_view.setX(ship.x_position);\n ship_image_view.setY(ship.y_position);\n ship_image_view.setFitWidth(Ship.SHIP_WIDTH);\n ship_image_view.setFitHeight(Ship.SHIP_HEIGHT);\n game_pane.getChildren().add(ship_image_view);\n }", "public interface ISprite\r\n{\r\n\t/*\r\n\t * By defining types, we hope to optimise collision detection.\r\n\t */\r\n\tpublic enum Type{OBSTACLE, GOODIE, USER_MOVEABLE, ENEMY, DECORATION, PLATFORM};\r\n\tpublic enum Collision{LEFT, RIGHT, TOP, BOTTOM,NONE};\r\n\t/**\r\n\t * Find out the current Position of this Sprite.\r\n\t * @return Point GWT Point location object.\r\n\t */\r\n\tpublic Vector getLocation();\r\n\t/**\r\n\t * Inform the Sprite of it's new location\r\n\t * @param point\r\n\t */\r\n\tpublic void setLocation(Vector location);\r\n\t\r\n\t/**\r\n\t * A flag to determine a Sprites selection state.\r\n\t * @return\r\n\t */\r\n\tpublic boolean isSelected();\r\n\t\r\n\t/**\r\n\t * Render this Sprite.\r\n\t * We have a back and front context to facilitate double buffering.\r\n\t * \r\n\t * @param context\r\n\t */\r\n\tpublic void draw(Canvas canvas);\r\n\t\r\n\t/**\r\n\t * Update this Sprites model data.\r\n\t */\r\n\tpublic void update(InputEvent event);\r\n\t\r\n\t/*\r\n\t * Every ISprite type will handle obstacles differently.\r\n\t * Examples: <Comments here to help design implementation>\r\n\t * \r\n\t * Obstacle: Prevents colliding sprite from moving in one direction.\r\n\t * Goodie: Increases points, disposes\r\n\t * Enemy: Removes a life or kills user sprite\r\n\t * Decoration: Does nothing\r\n\t * Platform: Sprites falling down wards are stopped. Sprites can jump through (up).\r\n\t */\r\n\tpublic void handleCollision(ISprite collisionSprite, Collision collisionType);\t\r\n\t\r\n\t/**\r\n\t * Checks if the two sprites collide. \r\n\t * The return value describes the direction of\r\n\t * the collision. Collision.NONE means there\r\n\t * was no collision detected.\r\n\t * \r\n\t * @param sprite\r\n\t * @return Collision.LEFT, Collision.RIGHT etc...\r\n\t */\r\n\tpublic Collision getCollisionType(ISprite sprite);\r\n\t\r\n\t/**\r\n\t * A layer dictates a Sprites paint order. Those at the back are painted\r\n\t * first. Those in the from painted last. A Z order in a way.\r\n\t * @return\r\n\t */\r\n\tpublic Layer.Layers getLayer();\r\n\t\r\n\tpublic void dispose();\r\n\t\r\n\tpublic boolean isDisposed();\r\n\t\r\n\tpublic Type getType();\r\n\t\r\n\tpublic Rectangle getBounds();\r\n}", "@Override\n public void create() {\n tex = new Texture(Gdx.files.internal(\"data/scene.png\"));\n\n //important since we aren't using some uniforms and attributes that SpriteBatch expects\n ShaderProgram.pedantic = false;\n\n //print it out for clarity\n System.out.println(\"Vertex Shader:\\n-------------\\n\\n\" + VERT);\n System.out.println(\"\\n\");\n System.out.println(\"Fragment Shader:\\n-------------\\n\\n\" + FRAG);\n\n shader = new ShaderProgram(VERT, FRAG);\n if (!shader.isCompiled()) {\n System.err.println(shader.getLog());\n System.exit(0);\n }\n if (shader.getLog().length() != 0)\n System.out.println(shader.getLog());\n\n\n batch = new SpriteBatch(1000, shader);\n batch.setShader(shader);\n\n cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n cam.setToOrtho(false);\n }", "public void buildInitialScene() {\n\t\t\n\t\t//Creation image background\n\t\tfinal String BACKGROUND_PATH = \"src/assets/img/temp_background.png\";\n\t\tthis.background = new GameImage(BACKGROUND_PATH);\n\n\t\t//Creation image Game Over\n\t\tfinal String GAME_OVER_PATH = \"src/assets/img/erro.png\";\n\t\tthis.errorScene = new Sprite(GAME_OVER_PATH);\n\n\t\t//Game over sprite center position\n\t\tthis.errorScene.x = spos.calculatePosition(WindowConstants.WIDTH, 2, this.errorScene, 2);\n\t\tthis.errorScene.y = spos.calculatePosition(WindowConstants.HEIGHT, 2, this.errorScene, 2);\n\t}", "public MyAnimation getSprite();" ]
[ "0.6418427", "0.63999707", "0.6230884", "0.6203467", "0.6201792", "0.61747724", "0.616705", "0.6134814", "0.6121533", "0.60940397", "0.6048517", "0.6043761", "0.60343784", "0.5991929", "0.5945766", "0.59391105", "0.583737", "0.5831112", "0.5789291", "0.57702327", "0.57615274", "0.574908", "0.5708078", "0.568897", "0.5668182", "0.56463736", "0.56256396", "0.5610806", "0.55942583", "0.5582757", "0.5558906", "0.5546268", "0.55454475", "0.554412", "0.55333626", "0.55327797", "0.55307937", "0.5529552", "0.55192584", "0.5518567", "0.55184746", "0.5482155", "0.54553145", "0.5454663", "0.54407233", "0.5427506", "0.5418973", "0.5414274", "0.5404446", "0.5398325", "0.5392677", "0.539215", "0.5388751", "0.5369384", "0.5364622", "0.53605735", "0.5356881", "0.5348546", "0.53364533", "0.53357124", "0.5323587", "0.5321335", "0.5308665", "0.52875173", "0.52868783", "0.528166", "0.528166", "0.52761775", "0.5275791", "0.5275409", "0.5272635", "0.5259886", "0.5257561", "0.52424026", "0.52411246", "0.5240555", "0.5236316", "0.52288514", "0.5228806", "0.5207843", "0.520645", "0.5200557", "0.5199873", "0.5198384", "0.5198094", "0.5179145", "0.51789486", "0.51716375", "0.51694953", "0.51661056", "0.51582325", "0.5155477", "0.51488155", "0.514016", "0.51329666", "0.5127001", "0.5122642", "0.5122124", "0.51206595", "0.5110281" ]
0.73386484
0
Setup the mouse event handlers for this sprite
private void setupMouseEventHandlers() { this.setOnMouseClicked(event -> { if (event.getButton() == MouseButton.PRIMARY) { fireEvent(new MenuSelectedEvent( MenuManager.MenuType.BUILDING, this.getSpriteType(), event.getSceneX(), event.getSceneY())); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void registerEvents() {\n MouseEventHandler handler = new MouseEventHandler();\n setOnMousePressed(handler);\n setOnMouseReleased(handler);\n setOnMouseMoved(handler);\n setOnMouseEntered(handler);\n setOnMouseExited(handler);\n\n }", "public MouseHandler()\n {\n // initialise instance variables:\n //INSTANTIATE listeners list:\n _listeners = new ArrayList<IMouseListener>();\n \n }", "private void setupListeners() {\t\t\n\n\t\tnextButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t gameModel.generateGame();\n\t\t\t\t \n\t\t\t\t setGameModel(gameModel);\n\t\t\t\t \n\t\t\t\t //gameModel = new GameModel(gameModel.getList());\n\t\t\t\t \n\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\ttilePanel.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"PRESS\");\n\t\t\t}\n\t\t\t\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"RELEASED\");\n\t\t\t}\n\t\t});\n\t}", "private void initListeners() {\n this.setOnMousePressed((event -> {\n this.setPressedStyle();\n }));\n\n this.setOnMouseReleased((event -> {\n this.setReleasedStyle();\n }));\n\n this.setOnMouseEntered((event -> {\n this.setEffect(new DropShadow());\n }));\n\n this.setOnMouseExited((event -> {\n this.setEffect(null);\n }));\n }", "@Override\n\tpublic void Update() {\n\t\tDispatchKeyEvents();\n\t\tDispatchMouseEvents();\n\t}", "private void setMouseListeners(Scene scene, Stage secondaryStage) {\n Rectangle2D bounds = Screen.getPrimary().getVisualBounds();\n secondaryStage.setX(bounds.getMaxX() - scene.getWidth() - (bounds.getMaxX()/10));\n secondaryStage.setY(bounds.getMinY() + (bounds.getMaxY()/10));\n\n //add support for drag and move\n scene.setOnMousePressed(event -> {\n xOffset = secondaryStage.getX() - event.getScreenX();\n yOffset = secondaryStage.getY() - event.getScreenY();\n });\n\n scene.setOnMouseDragged(event -> {\n secondaryStage.setX(event.getScreenX() + xOffset);\n secondaryStage.setY(event.getScreenY() + yOffset);\n });\n }", "private void registerListeners() {\n\n\t\tline.addActionListener(new LineButtonListener());\n\t\trect.addActionListener(new RectButtonListener());\n\t\toval.addActionListener(new OvalButtonListener());\n\t\timage.addActionListener(new ImageButtonListener());\n\n\t\tMouseListener listener = new ListenToMouse();\n\t\tMouseMotionListener motionListener = new ListenToMouse();\n\n\t\tcanvas.addMouseMotionListener(motionListener);\n\t\tcanvas.addMouseListener(listener);\n\n\t}", "void configureMouseListener();", "@Override\n\t\t\tpublic void handle(MouseEvent arg0) {\n\t\t\t\tMain.scene.setCursor(Cursor.HAND);\n\t\t\t}", "private void setMousePossition() {\n mouseX = Mouse.getMouseX() / Display.SCALE;\n mouseY = Mouse.getMouseY() / Display.SCALE;\n }", "public MouseHandler(TicTacToePanel ticTacToePanel) {\n\t}", "public void create() {\n \n EventHandler filter2 = \n new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n /*sim.updateCanvasMouseCoordinates(event.getX(), event.getY());\n sim.screenMouseX = event.getScreenX();\n sim.screenMouseY = event.getScreenY();\n sim.sceneMouseX = event.getSceneX();\n sim.sceneMouseY = event.getSceneY();*/\n //System.out.println(\"H: \" + spCanvasContainer.getHvalue() + \" Y:\" + spCanvasContainer.getVvalue());\n //System.out.println(\"Hm: \" + spCanvasContainer.getHmax() + \" Ym:\" + spCanvasContainer.getVmax());\n //System.out.println(\"Move: \" + canvasMouseX + \" Y:\" + canvasMouseY);\n }\n };\n this.addEventFilter(MouseEvent.ANY, filter2);\n\n this.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n //onMouseClick(event.getX(), event.getY());\n if (event.getButton() == MouseButton.PRIMARY) {\n onLeftClick(event.getX(), event.getY());\n //scenario.leftClick(event.getX(), event.getY());\n //event.consume();\n }\n else if (event.getButton() == MouseButton.SECONDARY) {\n onRightClick(event.getX(), event.getY());\n //scenario.rightClick(event.getX(), event.getY());\n }\n }\n });\n\n this.setOnMousePressed(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n if (event.getButton() == MouseButton.PRIMARY) {\n onLeftPressed(event.getX(), event.getY());\n }\n else if (event.getButton() == MouseButton.SECONDARY) {\n onRightPressed(event.getX(), event.getY());\n }\n }\n });\n\n this.setOnMouseDragged(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n if (event.getButton() == MouseButton.PRIMARY) {\n onLeftDragged(event.getX(), event.getY());\n }\n else if (event.getButton() == MouseButton.SECONDARY) {\n onRightDragged(event.getX(), event.getY());\n }\n }\n });\n\n this.setOnMouseReleased(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n //draggingWell = null;\n //onMouseDragged(event.getX(), event.getY());\n /*if (event.isPrimaryButtonDown()) {\n // scenario.onMouseDrag(event.getX(), event.getY());\n event.consume();\n }\n else if (event.isSecondaryButtonDown()) {\n }*/\n }\n });\n\n this.setOnMouseMoved(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n onMouseMove(event.getX(), event.getY());\n }\n });\n }", "@Override\n\tpublic void nullifyEventHandlers() {\n\t\tshape.setOnMousePressed(null);\n\t\tshape.setOnMouseDragged(null);\n\t\tshape.setOnMouseClicked(null);\n\t\tshape.setOnMouseReleased(null);\n\t\t\n\t}", "public void init()\n\t{\n\t\taddKeyListener(this);\n\t\taddMouseListener(this);\n\t\taddMouseMotionListener(this);\n\t\n\t}", "@Override\n\tpublic void mouseMoved(MouseEvent arg0) {\n\t\t\n\t\tdouble x = arg0.getX();\n\t\tdouble y = arg0.getY();\n\t\tint row, column;\n\t\t\n\t\tcolumn = (int) (x * VerilogSprite.PIXEL_COLUMNS / width);\n\t\trow = (int) (y * VerilogSprite.PIXEL_ROWS / height);\n\t\t\n\t\tif (leftDown) {\n\t\t\t\n\t\t\tsprite.data[row][column] = 1;\n\t\t}\n\t\tif (rightDown)\n\t\t{\n\t\t\t\n\t\t\tsprite.data[row][column] = 0;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public abstract void mouseInput();", "@Override\n\tpublic void start() {\n\t\tMouseEvtHandler handler = new MouseEvtHandler();\n\t\ttable.addMouseListener(handler);\n\n\t}", "@Override\n public void init() {\n f = new SampleFrame2(\"Handle Mouse events.\");\n f.setSize(300, 200);\n f.setVisible(true);\n\n // register this object to receive its own mouse events\n addMouseListener(this);\n addMouseMotionListener(this);\n }", "private void setUpKeys() {\n inputManager.addMapping(\"Up\", new KeyTrigger(KeyInput.KEY_W));\n inputManager.addMapping(\"Down\", new KeyTrigger(KeyInput.KEY_S));\n inputManager.addMapping(\"Left\", new KeyTrigger(KeyInput.KEY_A));\n inputManager.addMapping(\"Right\", new KeyTrigger(KeyInput.KEY_D));\n inputManager.addMapping(\"Click\", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));\n inputManager.addListener(this, \"Up\");\n inputManager.addListener(this, \"Down\");\n inputManager.addListener(this, \"Left\");\n inputManager.addListener(this, \"Right\");\n inputManager.addListener(this, \"Click\");\n }", "public void init() {\n // Initialization Statements\n setSize(640,480);\n addMouseListener(this);\n addMouseMotionListener(this);\n }", "private void initHandlers(){\n\t\tlabel.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent e) {\n\t\t\t\tfor(TLEventLabel label : eventLabels){\n\t\t\t\t\tlabel.setSelected(false);\n\t\t\t\t}\n\t\t\t\tsetSelected(true);\n\t\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmodel.selectEvent(event);\n\t\t\t\t\t}\n\t\t\t\t}).start();\n\t\t\t}\n\t\t});\n\t}", "public MouseInput(IMouseHandler handler) {\n theHandler = handler;\n }", "public void mousePressed() {\n }", "protected void initControls()\n {\n glfwSetKeyCallback(windowID, new KeyboardInput());\n MouseInput.init(windowID);\n }", "public void init(){ \n\t\tcreatePieces(); \n\t\taddMouseListener(ChessMousePressListener.getInstance(this));\n\t}", "private void makeMouseListener() {\n myMouseListener = new MouseListener() {\n @Override\n public void mouseClicked (MouseEvent e) {\n myController.handleMapClick(e.getLocationOnScreen());\n }\n @Override\n public void mouseEntered (MouseEvent e) {\n }\n @Override\n public void mouseExited (MouseEvent e) {\n }\n @Override\n public void mousePressed (MouseEvent e) {\n }\n @Override\n public void mouseReleased (MouseEvent e) {\n }\n };\n }", "public void mousePressed (MouseEvent event) {}", "private void configure() {\n\t\tthis.pressedListener = new EventHandler<MouseEvent>() {\n\t\t\t@Override\n\t\t\tpublic void handle(MouseEvent me) {\n\t\t\t\tstartDragX = me.getSceneX();\n\t\t\t\tstartDragY = me.getSceneY();\n\t\t\t\tstartNodeX = getTranslateX();\n\t\t\t\tstartNodeY = getTranslateY();\n\t\t\t\tstartWidth = getMaxWidth();\n\t\t\t\tstartHeight = getMaxHeight();\n\t\t\t}\n\t\t};\n\t\ttopDragger.setOnMousePressed(this.pressedListener);\n\t\tbottomDragger.setOnMousePressed(this.pressedListener);\n\t\tleftDragger.setOnMousePressed(this.pressedListener);\n\t\trightDragger.setOnMousePressed(this.pressedListener);\n\n\t\tsetTop(topDragger);\n\t\tsetBottom(bottomDragger);\n\t\tsetLeft(leftDragger);\n\t\tsetRight(rightDragger);\n\t\tsetCenter(center);\n\t\tbuildDragListeners();\n\t\tbuildResizeListeners();\n\t}", "public interface MouseEvents {\n\n /**\n * Called when a key is pressed\n * */\n void keyPressed(String code);\n\n /**\n * Called when the mouse button mouse is pressed\n * */\n void mousePressed(double x, double y, MouseEvent e );\n\n /**\n * Called when the mouse button mouse is released\n * */\n void mouseReleased(double x, double y, MouseEvent e );\n\n /**\n * Called when the mouse button mouse is clicked\n * */\n void mouseClicked(double x, double y, MouseEvent e );\n\n /**\n * Called when the mouse button mouse have moved\n * */\n void mouseMoved(double x, double y, MouseEvent e );\n\n /**\n * Called when the mouse button mouse is dragged\n * */\n void mouseDragged(double x, double y, MouseEvent e );\n}", "@Override\n public void initiateMouse() {\n\n MouseHandler m = new MouseHandler();\n m.addRunnablePress(1, new SelectNote(this.model, this.view.getGui(), m));\n m.addRunnablePress(3, new SelectNoteToBeAdded(this.model, this.view.getGui(), m));\n m.addRunnableRelease(3, new AddNote(this.model, this.view.getGui(), this.view, m));\n\n this.view.addMouseListener(m);\n\n }", "private void registerEventListeners() {\n addDisposeListener(new DisposeListener() {\n @Override\n public void widgetDisposed(DisposeEvent de) {\n Display display = getDisplay();\n display.removeFilter(SWT.Move, moveFilter);\n OldFXCanvas.this.widgetDisposed(de);\n }\n });\n\n addPaintListener(pe -> {\n OldFXCanvas.this.paintControl(pe);\n });\n\n addMouseListener(new MouseListener() {\n @Override\n public void mouseDoubleClick(MouseEvent me) {\n // Clicks and double-clicks are handled in FX\n }\n @Override\n public void mouseDown(MouseEvent me) {\n // FX only supports 3 buttons so don't send the event for other buttons\n if (me.button > 3) {\n return;\n }\n OldFXCanvas.this.sendMouseEventToFX(me, AbstractEvents.MOUSEEVENT_PRESSED);\n }\n @Override\n public void mouseUp(MouseEvent me) {\n // FX only supports 3 buttons so don't send the event for other buttons\n if (me.button > 3) {\n return;\n }\n OldFXCanvas.this.sendMouseEventToFX(me, AbstractEvents.MOUSEEVENT_RELEASED);\n }\n });\n\n addMouseMoveListener(me -> {\n if ((me.stateMask & SWT.BUTTON_MASK) != 0) {\n // FX only supports 3 buttons so don't send the event for other buttons\n if ((me.stateMask & (SWT.BUTTON1 | SWT.BUTTON2 | SWT.BUTTON3)) != 0) {\n OldFXCanvas.this.sendMouseEventToFX(me, AbstractEvents.MOUSEEVENT_DRAGGED);\n } else {\n OldFXCanvas.this.sendMouseEventToFX(me, AbstractEvents.MOUSEEVENT_MOVED);\n }\n } else {\n OldFXCanvas.this.sendMouseEventToFX(me, AbstractEvents.MOUSEEVENT_MOVED);\n }\n });\n\n addMouseWheelListener(me -> {\n OldFXCanvas.this.sendMouseEventToFX(me, AbstractEvents.MOUSEEVENT_WHEEL);\n });\n\n addMouseTrackListener(new MouseTrackListener() {\n @Override\n public void mouseEnter(MouseEvent me) {\n OldFXCanvas.this.sendMouseEventToFX(me, AbstractEvents.MOUSEEVENT_ENTERED);\n }\n @Override\n public void mouseExit(MouseEvent me) {\n OldFXCanvas.this.sendMouseEventToFX(me, AbstractEvents.MOUSEEVENT_EXITED);\n }\n @Override\n public void mouseHover(MouseEvent me) {\n // No mouse hovering in FX\n }\n });\n\n addControlListener(new ControlListener() {\n @Override\n public void controlMoved(ControlEvent ce) {\n OldFXCanvas.this.sendMoveEventToFX();\n }\n @Override\n public void controlResized(ControlEvent ce) {\n OldFXCanvas.this.sendResizeEventToFX();\n }\n });\n\n addFocusListener(new FocusListener() {\n @Override\n public void focusGained(FocusEvent fe) {\n OldFXCanvas.this.sendFocusEventToFX(fe, true);\n }\n @Override\n public void focusLost(FocusEvent fe) {\n OldFXCanvas.this.sendFocusEventToFX(fe, false);\n }\n });\n\n addKeyListener(new KeyListener() {\n @Override\n public void keyPressed(KeyEvent e) {\n OldFXCanvas.this.sendKeyEventToFX(e, SWT.KeyDown);\n \n }\n @Override\n public void keyReleased(KeyEvent e) {\n OldFXCanvas.this.sendKeyEventToFX(e, SWT.KeyUp);\n }\n });\n \n addMenuDetectListener(e -> {\n Runnable r = () -> {\n if (isDisposed()) {\n return;\n }\n OldFXCanvas.this.sendMenuEventToFX(e);\n };\n // In SWT, MenuDetect comes before the equivalent mouse event\n // On Mac, the order is MenuDetect, MouseDown, MouseUp. FX\n // does not expect this order and when it gets the MouseDown,\n // it closes the menu. The fix is to defer the MenuDetect\n // notification until after the MouseDown is sent to FX.\n if (\"cocoa\".equals(SWT.getPlatform())) {\n getDisplay().asyncExec(r);\n } else {\n r.run();\n }\n });\n }", "private void setupPlayerControls() {\n ExtendableScene currScene = SceneManager.getSceneParent();\n\n // Controls for the player\n // Delegated to player controller\n currScene.setOnKeyPressed(PlayerController.get()::onKeyPressed);\n currScene.setOnKeyReleased(PlayerController.get()::onKeyReleased);\n\n // All mouse movement events (for turret rotation)\n view.getPane().setOnMouseMoved(view::changeMouseEvent);\n view.getPane().setOnMouseDragged(view::changeMouseEvent);\n\n // Setup player shooting\n view.getPane().setOnMousePressed(view::createBullet);\n }", "public void mousePressed(MouseEvent event)\r\n {\n }", "public abstract void moveMouse(int iPosX, int iPosY);", "public void handleUserInput() {\n mouseProcessor.handleUserInput();\n }", "public void addMouseListener(EventHandler<MouseEvent> eh) {\n\t\tcanvas.addEventHandler(MouseEvent.MOUSE_PRESSED, eh);\n\t\tcanvas.addEventHandler(MouseEvent.MOUSE_DRAGGED, eh);\n\t\tcanvas.addEventHandler(MouseEvent.MOUSE_RELEASED, eh);\n\t\tcanvas.addEventHandler(MouseEvent.MOUSE_CLICKED, eh);\n\t\tcanvas.addEventHandler(MouseEvent.MOUSE_MOVED, eh);\n\t}", "protected void handleEvent(MouseEvent ev) {\n\t}", "@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }", "@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }", "@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }", "public abstract void mousePressed(MousePressedEvent mp);", "public void init() {\n\n // sends a callback when the mouse is moved\n glfwSetCursorPosCallback(window.getWindowHandle(), (window, xpos, ypos) -> {\n currentPos.x = xpos;\n currentPos.y = ypos;\n });\n // sends a callback when the mouse enters the window\n glfwSetCursorEnterCallback(window.getWindowHandle(), (windowHandle, entered) -> {\n inWindow = entered;\n });\n // sends a callback when one action occurs\n glfwSetMouseButtonCallback(window.getWindowHandle(), (windowHandle, button, action, mode) -> {\n // checks is the left mouse button is pressed\n leftButtonPressed = button == GLFW_MOUSE_BUTTON_1 && action == GLFW_PRESS;\n });\n }", "@Override\r\n\tpublic void onMouseMove(Widget who, int x, int y) {\n\r\n\t}", "public void setupHandlers(){\n\t\trestartButtonHandler rbh = new restartButtonHandler();\n\t\trestart.addActionListener(rbh);\n\t\tInstructionButtonHandler ibh = new InstructionButtonHandler();\n\t\tinstruction.addActionListener(ibh);\n\t\tCardButtonHandler cbh = new CardButtonHandler();\n\t\tfor (int i = 0; i < 4; i++){\n\t\t\tfor(int j = 0; j < 6; j++){\n\t\t\t\t\tbuttons[i][j].addActionListener(cbh);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void mousePressed( MouseEvent event ){}", "private void setupListeners() {\n\t\tfor (int i = 0; i < _controlPoints.length; i++) {\n\t\t\taddControlPointListener(_controlPoints[i][0], i);\n\t\t\taddControlPointListener(_controlPoints[i][1], i);\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _selectionButtons.length; i++) {\n\t\t\taddPointSelectionButtonListener(i);\n\t\t}\n\t}", "private void setInputListeners () {\r\n // initialize input state\r\n myLastKeyPressed = NO_KEY_PRESSED;\r\n myKeys = new TreeSet<Integer>();\r\n addKeyListener(new KeyAdapter() {\r\n @Override\r\n public void keyPressed (KeyEvent e) {\r\n // resets key after being used once. Does not affect getKeysPressed.\r\n if (myLastKeyPressed == e.getKeyCode()) {\r\n myLastKeyPressed = NO_KEY_PRESSED;\r\n }\r\n else {\r\n myLastKeyPressed = e.getKeyCode();\r\n }\r\n myKeys.add(e.getKeyCode());\r\n }\r\n\r\n @Override\r\n public void keyReleased (KeyEvent e) {\r\n myKeys.remove(e.getKeyCode());\r\n }\r\n });\r\n myLastMousePosition = NO_MOUSE_PRESSED;\r\n addMouseMotionListener(new MouseMotionAdapter() {\r\n @Override\r\n public void mouseDragged (MouseEvent e) {\r\n myLastMousePosition = e.getPoint();\r\n }\r\n });\r\n addMouseListener(new MouseAdapter() {\r\n @Override\r\n public void mousePressed (MouseEvent e) {\r\n myLastMousePosition = e.getPoint();\r\n myMouseClick = true;\r\n }\r\n\r\n @Override\r\n public void mouseReleased (MouseEvent e) {\r\n myLastMousePosition = NO_MOUSE_PRESSED;\r\n myMouseClick = false;\r\n }\r\n });\r\n }", "@Override\n\t\t\tpublic void handle(MouseEvent arg0) {\n\t\t\t\tMain.scene.setCursor(Cursor.DEFAULT);\n\t\t\t}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "public void mousePressed(MouseEvent e) {}", "@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t\t}", "public void mousePressed(MouseEvent e) {\r\n }", "public void mousePressed(MouseEvent arg0) {\n\n }", "public void mousePressed(MouseEvent arg0) {\n\n }", "public void mousePressed(MouseEvent e) {\n }", "@Override\n public void mousePressed(MouseEvent e) {\n x_pressed = e.getX();\n y_pressed = e.getY();\n \n }", "void handleMouseEvent(MouseEvent event);", "public SimpleTrackMouse()\n { \n // Set background color and arrange for the panel to listen for mouse events.\n setBackground(Color.WHITE);\n MouseHandler listener = new MouseHandler();\n addMouseListener(listener); // Register mouse listener.\n addMouseMotionListener(listener); // Register mouse motion listener.\n }", "public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void onMouseDown(Widget who, int x, int y) {\n\r\n\t}", "@Override\n public void mousePressed(MouseEvent me) {\n mouse_x = me.getX();\n mouse_y = me.getY();\n super.mousePressed(me);\n }", "private void setUpKeys() {\n inputManager.addMapping(\"Left\", new KeyTrigger(KeyInput.KEY_A));\n inputManager.addMapping(\"Right\", new KeyTrigger(KeyInput.KEY_D));\n inputManager.addMapping(\"Up\", new KeyTrigger(KeyInput.KEY_W));\n inputManager.addMapping(\"Down\", new KeyTrigger(KeyInput.KEY_S));\n //inputManager.addMapping(\"Shoot\", new KeyTrigger (KeyInput.KEY_LSHIFT));\n inputManager.addMapping(\"Jump\", new KeyTrigger(KeyInput.KEY_SPACE));\n inputManager.addListener(this, \"Left\");\n inputManager.addListener(this, \"Right\");\n inputManager.addListener(this, \"Up\");\n inputManager.addListener(this, \"Down\");\n \n inputManager.addListener(this, \"Jump\");\n }", "@Override\n public void handle(MouseEvent event) {\n }", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "public void setMarioEvents() {\n\t\tCollisionEvent event1, event2, event4, event98, event6, event7, event8, event9;\n\t\tAdvancedCollisionEvent event_1LandsTop4, event_1Touches4NotTop, event5;\n\t\ttry {\n\t\t\t// player with block\n\t\t\tevent1 = new CollisionEvent(\n\t\t\t\t\tArrays.asList(new String[] { \"0\", \"1\" }),\n\t\t\t\t\tPLAYER_LANDING_ON_BLOCK_STRING);\n\t\t\t// enemy with block\n\t\t\tevent2 = new CollisionEvent(Arrays.asList(\"1\", \"2\"),\n\t\t\t\t\tENEMY_ON_BLOCK_STRING);\n\t\t\t// player killing enemy\n\t\t\tevent_1LandsTop4 = new AdvancedCollisionEvent(Arrays.asList(\"0\",\n\t\t\t\t\t\"2\", \"true\", \"false\", \"false\", \"false\", \"false\"),\n\t\t\t\t\tPLAYER_JUMPING_ON_ENEMY_STRING);\n\t\t\t// enemy kills player\n\t\t\tevent_1Touches4NotTop = new AdvancedCollisionEvent(Arrays.asList(\n\t\t\t\t\t\"0\", \"2\", \"false\", \"true\", \"true\", \"true\", \"false\"),\n\t\t\t\t\tENEMY_KILLING_PLAYER_STRING);\n\t\t\t// player reaches goal\n\t\t\tevent4 = new CollisionEvent(Arrays.asList(\"0\", \"3\"),\n\t\t\t\t\tPLAYER_HITTING_GOAL_STRING);\n\t\t\t// player collects coin\n\t\t\tevent98 = new CollisionEvent(Arrays.asList(\"0\", \"5\"),\n\t\t\t\t\tPLAYER_COLLECTING_COIN_STRING);\n\t\t\t// bullet hits enemy\n\t\t\tevent5 = new AdvancedCollisionEvent(Arrays.asList(\"2\", \"150\",\n\t\t\t\t\t\"true\", \"true\", \"true\", \"true\", \"true\"),\n\t\t\t\t\tBULLET_HITTING_ENEMY_STRING);\n\t\t\t// player gets gun power up\n\t\t\tevent6 = new CollisionEvent(Arrays.asList(\"0\", \"6\"),\n\t\t\t\t\tPLAYER_HITS_GUN_POWERUP_STRING);\n\t\t\t// player gets invincibility power up\n\t\t\tevent7 = new CollisionEvent(Arrays.asList(\"0\", \"7\"),\n\t\t\t\t\tPLAYER_HITS_INVINCIBILITY_POWERUP_STRING);\n\t\t\t// player gets size power up\n\t\t\tevent8 = new CollisionEvent(Arrays.asList(\"0\", \"8\"),\n\t\t\t\t\tPLAYER_HITS_SIZE_POWER_UP_STRING);\n\t\t\t// player gets speed power up\n\t\t\tevent9 = new CollisionEvent(Arrays.asList(\"0\", \"9\"),\n\t\t\t\t\tPLAYER_HITS_SPEED_POWERUP_STRING);\n\t\t\tAddPowerUpAction action13 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"8\",\n\t\t\t\t\t\t\tSIZE_POWER_UP_STRING, \"10\", \"mario\")));\n\t\t\tAddPowerUpAction action12 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"9\",\n\t\t\t\t\t\t\tSPEED_POWER_UP_STRING, \"10\", \"bullet\")));\n\n\t\t\tDecreaseObjectHitPointsByCollisionAction action14 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"8\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action15 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"9\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action9 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"6\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action11 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"7\", \"0\")));\n\t\t\tAddPowerUpAction action7 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"6\",\n\t\t\t\t\t\t\tGUN_POWERUP_STRING, \"10\", \"mario\")));\n\t\t\tAddPowerUpAction action8 = new AddPowerUpAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\", \"7\",\n\t\t\t\t\t\t\tINVINCIBILITY_POWERUP_STRING, \"10\", \"mobile\")));\n\t\t\tCollideSolidAction action = new CollideSolidAction(\n\t\t\t\t\tnew Tuple<Integer>(0, 1).toListString());\n\t\t\tCollideSolidAction action2 = new CollideSolidAction(\n\t\t\t\t\tnew Tuple<Integer>(2, 1).toListString());\n\t\t\tKillPlayerAction action3 = new KillPlayerAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"0\")));\n\n\t\t\tDecreaseObjectHitPointsByCollisionAction action10 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"5\", \"0\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action5 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"150\", \"2\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action6 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"2\", \"150\")));\n\t\t\tEndLevelAction action4 = new EndLevelAction(new ArrayList<String>());\n\n\t\t\tChangeScoreAction action98 = new ChangeScoreAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"5\")));\n\t\t\tDecreaseObjectHitPointsByCollisionAction action_1Kills4 = new DecreaseObjectHitPointsByCollisionAction(\n\t\t\t\t\tnew ArrayList<String>(Arrays.asList(\"2\", \"0\")));\n\n\t\t\tevent1.addAction(action);\n\t\t\tevent2.addAction(action2);\n\t\t\tevent_1Touches4NotTop.addAction(action3);\n\t\t\tevent_1LandsTop4.addAction(action_1Kills4);\n\t\t\tevent4.addAction(action4);\n\t\t\tevent98.addAction(action98);\n\t\t\tevent98.addAction(action10);\n\t\t\tevent5.addAction(action5, action6);\n\t\t\tevent6.addAction(action7, action9);\n\t\t\tevent7.addAction(action8, action11);\n\t\t\tevent9.addAction(action12, action15);\n\t\t\tevent8.addAction(action13, action14);\n\t\t\tmyLevel.addEvent(event1, event2, event_1Touches4NotTop, event4,\n\t\t\t\t\tevent98, event_1LandsTop4, event5, event6, event7, event8,\n\t\t\t\t\tevent9);\n\t\t\tmyLevelObjectBar.initializeEventsMap(myLevel.getEvents());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void mouseEnterHandler(MouseEvent e) {\n\n\t}", "void addMouseListener(MouseListener mouseListener);", "public void hover(){\n\t\t\n\t\tfor(MouseListener m: listeners){\n\t\t\t\n\t\t\tm.mouseEntered();\n\t\t}\n\t}", "public void mousePressed(MouseEvent e) {\n \t\t\r\n \t}", "public void mouseMoved(MouseEvent event) {\n }", "public void mousePressed(MouseEvent e) {\n\n }", "public void mousePressed(MouseEvent e)\n { }", "void mousePressed(MouseEvent mouseEvent);", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "public void mousePressed(MouseEvent e) {\n\t\t\t\n\t\t}", "@Override\n public void mousePressed(MouseEvent e){\n }", "public abstract void mouseMoved(int displayX, int displayY);", "@Override\r\n public void mousePressed(MouseEvent arg0)\r\n {\n\r\n }", "private void initEvents() {\n\t\tuser_head_img.setOnClickListener(this);\r\n\t\ttxt_zcgl.setOnClickListener(this);\r\n\t\ttxt_tzgl.setOnClickListener(this);\r\n\t\ttxt_jlcx.setOnClickListener(this);\r\n\t\ttxt_wdyhk.setOnClickListener(this);\r\n\t\ttxt_wdxx.setOnClickListener(this);\r\n\t\tlayout_zhaq.setOnClickListener(this);\r\n\t\tlayout_ssmm.setOnClickListener(this);\r\n\t\ttxt_myredpager.setOnClickListener(this);\r\n\t}", "@Override\n public void mousePressed(MouseEvent evt) {\n }", "@Override\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\tmouseX = e.getX();\n\t\t\t\tmouseY = e.getY();\n\t\t\t\tmenu.setMouseX(mouseX);\n\t\t\t\tmenu.setMouseY(mouseY);\n\t\t\t}", "public void sendMouseMoveEvent(MouseEvent event){\n // Kirim event OnMouseMove ke subs dari MouseClickSubs saat klik\n // Ini dipanggil oleh Avatar Duel pada setOnMouseClicked pada handle()\n // Reference: (1) - Cari bagian mouse move\n for (int i = 0; i < mouseMoveSubs.size(); i++){\n mouseMoveSubs.get(i).onMouseMove(event);\n }\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n }", "@Override\n public void mousePressed(MouseEvent e) {\n\n }", "@Override\n\tpublic void mouseMoved(MouseEvent arg0) {\n\t\t//Get mouse screen positions\n\t\tmouseScreenX = arg0.getX();\n\t\tmouseScreenY = arg0.getY();\n\t\t//Convert screen to board position\n\t\tscreenToBoardPos(mouseScreenX, mouseScreenY, mouseBoardPos);\n\t\t//Check if mouse is in the private area\n\t\tmouseInPrivateArea = ObjectFunctions.isInPrivateArea(privateArea, mouseBoardPos.getXI(), mouseBoardPos.getYI());\n\t\tmouseInStacker = ObjectFunctions.isOnShape(id, gameInstance, table.stackerShape, boardToScreenTransformation, mouseBoardPos.getXI(), mouseBoardPos.getYI());\n\n\t\t//Check if some key is pressed\n\t\tif (player != null) {\n\t\t\t//set the mouse position of the player to send to other players\n\t\t\tgameInstance.update(new PlayerMousePositionUpdate(id, player, player, mouseBoardPos.getXI(), mouseBoardPos.getYI()));\n\n\t\t\tif (!player.visitor) {\n\t\t\t\t//Disable action string if mouse moves and no key is pressed\n\t\t\t\tif (downKeys.size() == 0) {\n\t\t\t\t\tplayer.actionString = \"\";\n\t\t\t\t}\n\t\t\t\t//get nearest object concerning the mouse position\n\t\t\t\tObjectInstance nearestObject = ObjectFunctions.getNearestObjectByPosition(this, gameInstance, player, mouseBoardPos.getXI(), mouseBoardPos.getYI(), 1, null);\n\t\t\t\t//do actions if mouse is in the private area or not and there is some nearest object\n\t\t\t\tif (mouseInPrivateArea && nearestObject != null && !arg0.isControlDown() && !arg0.isShiftDown() && !arg0.isAltDown()) {\n\t\t\t\t\tif (hoveredObject != null)\n\t\t\t\t\t{\n\t\t\t\t\t\thoveredObject.state.isActive = false;\n\t\t\t\t\t}\n\t\t\t\t\tnearestObject.state.isActive = false;\n\t\t\t\t\tsetHoveredObject(gameInstance, player, nearestObject);\n\t\t\t\t} else if (!mouseInPrivateArea) {\n\t\t\t\t\tif (nearestObject != null && !nearestObject.state.inPrivateArea) {\n\t\t\t\t\t\tif (hoveredObject == null) {\n\t\t\t\t\t\t\tsetHoveredObject(gameInstance, player, nearestObject);\n\t\t\t\t\t\t} else if (nearestObject.id != hoveredObject.id) {\n\t\t\t\t\t\t\tsetHoveredObject(gameInstance, player, nearestObject);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isDebug && hoveredObject != null) {\n\t\t\t\t\t\t\toutText = \"Hover Object: \" + hoveredObject.id;\n\t\t\t\t\t\t\toutText += \"\\n Select: \" + hoveredObject.state.isSelected;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tunhoverObject(gameInstance, player);\n\t\t\t\t\t\tif (isDebug) {\n\t\t\t\t\t\t\toutText = \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//TODO do repaint if something happens and not if mouse moved?\n\t\trepaint();\n\t}" ]
[ "0.72483945", "0.65101904", "0.61638564", "0.6125569", "0.6086019", "0.59919256", "0.5979346", "0.5917381", "0.5907649", "0.58449936", "0.5833827", "0.5827517", "0.5761196", "0.5741097", "0.5738649", "0.5710899", "0.56948775", "0.56912166", "0.56824607", "0.5666017", "0.5664565", "0.5662863", "0.5650701", "0.5650637", "0.56476754", "0.5636683", "0.5619053", "0.56173944", "0.5617351", "0.56158257", "0.5614104", "0.55905914", "0.55809665", "0.557676", "0.5572065", "0.5565664", "0.55650795", "0.5557322", "0.5557322", "0.5557322", "0.55291647", "0.5528655", "0.5526516", "0.55153793", "0.5508414", "0.55067086", "0.55036235", "0.5498764", "0.54902357", "0.54902357", "0.54902357", "0.5485203", "0.54712516", "0.54683954", "0.54683954", "0.5456437", "0.54558384", "0.5451376", "0.5440072", "0.54350585", "0.54350585", "0.54324585", "0.5421052", "0.5416314", "0.5414683", "0.54125005", "0.54125005", "0.54125005", "0.54125005", "0.54125005", "0.54125005", "0.54125005", "0.54125005", "0.54125005", "0.54125005", "0.53989434", "0.53984493", "0.5396799", "0.5394296", "0.53887874", "0.5387065", "0.53867364", "0.5383399", "0.5380787", "0.5380384", "0.5380384", "0.5380384", "0.5380384", "0.53738475", "0.5373673", "0.5370193", "0.5364366", "0.53636575", "0.5362106", "0.5340811", "0.5337324", "0.5337324", "0.5337324", "0.5337324", "0.5336736" ]
0.7488541
0
String accept = request.getHeader("Accept");
public ResponseEntity<Void> createSkills(@ApiParam(value = "skill object that needs to be added to data base" ,required=true ) @Valid @RequestBody Skill skill) { skillService.addSkillDetails(skill); return new ResponseEntity<Void>(HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccept() {\n return accept;\n }", "public List<MediaType> getAccept()\r\n/* 87: */ {\r\n/* 88:148 */ String value = getFirst(\"Accept\");\r\n/* 89:149 */ return value != null ? MediaType.parseMediaTypes(value) : Collections.emptyList();\r\n/* 90: */ }", "public final String getAcceptContentType() {\n return properties.get(ACCEPT_CONTENT_TYPE_PROPERTY);\n }", "public final String getAcceptAttribute() {\n return getAttributeValue(\"accept\");\n }", "public int accept(HttpResponseProlog prolog, HttpHeaders headers);", "public static boolean useJsonResponse(HttpServletRequest request) {\n String acceptHeaderValue = request.getHeader(\"Accept\");\n if (acceptHeaderValue == null) {\n return false;\n }\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(HttpHeaders.ACCEPT, acceptHeaderValue);\n List<MediaType> acceptedMediaTypes = httpHeaders.getAccept();\n boolean acceptsHtml = acceptedMediaTypes.contains(MediaType.TEXT_HTML);\n boolean acceptsJson = acceptedMediaTypes.contains(MediaType.APPLICATION_JSON);\n if (acceptsJson && (!acceptsHtml)) {\n return true;\n } else {\n return false;\n }\n }", "public String getAcceptEncodingHeaderValue() {\n return acceptEncodingHeaderValue;\n }", "public String getIsAccept() {\r\n\t\treturn isAccept;\r\n\t}", "boolean supportsAccepts();", "public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }", "MimeType mediaType();", "String getRequest();", "public static Locale getHeaderFieldAcceptLanguage(Request request) {\n\t\tHttpServletRequest httpServletRequest = request.raw();\n\t\treturn httpServletRequest.getLocale();\n\t}", "public Response get(Cluster cluster, String path, String accept)\n throws IOException {\n Header[] headers = new Header[1];\n headers[0] = new Header(\"Accept\", accept);\n return get(cluster, path, headers);\n }", "String getHeader(HttpServletRequest request, String name) throws ValidationException;", "@Override\n public boolean accept(String link) {\n \n URL url;\n URLConnection connection;\n String type;\n boolean ret;\n\n ret = false;\n try {\n url = new URL (link);\n connection = url.openConnection ();\n type = connection.getContentType ();\n if (type == null)\n ret = false;\n else\n ret = type.startsWith (\"text/html\");\n }catch (IOException e) {\n// XLogger.getInstance().log(Level.WARNING, \"{0}. {1}\", this.getClass(), e, link);\n }\n \n return (ret);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t\tSystem.out.println(\":::::::::::::::doPost\");\n\t\t//한글 처리\n\t\treq.setCharacterEncoding(\"UTF-8\");\n\t\tresp.setContentType(\"text/html\");\n\t\tresp.setCharacterEncoding(\"UTF-8\");\n\t\t\n\t\t//화면 출력 \n\t\tPrintWriter out = resp.getWriter();\n\t\t\n\t\t//전송할때 개발자도구(F12) network > Request Header 정보에 있는 데이터가 뿌려진다\n\t\tEnumeration<String> en = req.getHeaderNames();\n\t\t\n\t\twhile(en.hasMoreElements()){ //다음 값이 있는지 (true,false) \n\t\t\tString key = en.nextElement(); //다음 값의 키를 가져온다.\n\t\t\tString value = req.getHeader(key);\n\t\t\tout.println(\"key : \"+ key + \"<br/> value : \" + value + \"<br/><br/>\");\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}", "@Override\n public boolean accepts(HttpResponse response) {\n Header[] headers = response.getHeaders(HttpHeaders.CONTENT_TYPE);\n for (Header header : headers) {\n if (header != null && header.getValue().contains(NTLMConstants.CONTENT_TYPE_FOR_SPNEGO)) {\n return true;\n }\n }\n return false;\n }", "public void setAccept(List<MediaType> acceptableMediaTypes)\r\n/* 82: */ {\r\n/* 83:139 */ set(\"Accept\", MediaType.toString(acceptableMediaTypes));\r\n/* 84: */ }", "public AcceptHeader getAcceptHeader(String headerName)\n\t{\n\t\tString lowerName = headerName.toLowerCase();\n\t\tAcceptHeader header = this.acceptHeaders.get(lowerName);\n\t\tif (header == null)\n\t\t{\n\t\t\tString headerValue = getHeaderValue(headerName);\n\t\t\tif (headerValue != null)\n\t\t\t{\n\t\t\t\theader = new AcceptHeader(headerName, headerValue);\n\t\t\t\tthis.acceptHeaders.put(lowerName, header);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn header;\n\t}", "public boolean isSupported(MediaType mediaType);", "String getResponseHeader();", "private void mimicSunRequestHeaders() {\n if (!isHeaderSet(method.getRequestHeader(\"Accept\"))) {\n setRequestProperty(\"Accept\", acceptHeader);\n }\n if (!isHeaderSet(method.getRequestHeader(\"Connection\"))) {\n setRequestProperty(\"Connection\", \"keep-alive\");\n }\n }", "Headers getHeaders();", "public static String getMediaType(Request request) {\n\t\tList<Preference<MediaType>> acceptedMediaTypes = request.getClientInfo().getAcceptedMediaTypes();\n\t\tfor (Preference<MediaType> preference : acceptedMediaTypes) {\n\t\t\tMediaType mediaType = preference.getMetadata();\n\t\t\tString mediaTypeName = mediaType.getName().trim();\n\t\t\tmediaTypeName=mediaTypeName.replaceAll(\"\\\\s\", \"\");\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_JSONVERBOSE.getName())){\n\t\t\t\treturn \".json\";\n\t\t\t}\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_ATOM.getName())){\n\t\t\t\treturn \".xml\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "RequestHeaders headers();", "private static String getHTTPHeader(PortletRequest request, String name) {\n String value = null;\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPHeader(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPHeader(request, name);\n }\n return value;\n }", "public boolean isAccept(){\n return isAccept; \n }", "public List<Charset> getAcceptCharset()\r\n/* 107: */ {\r\n/* 108:174 */ List<Charset> result = new ArrayList();\r\n/* 109:175 */ String value = getFirst(\"Accept-Charset\");\r\n/* 110:176 */ if (value != null)\r\n/* 111: */ {\r\n/* 112:177 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 113:178 */ for (String token : tokens)\r\n/* 114: */ {\r\n/* 115:179 */ int paramIdx = token.indexOf(';');\r\n/* 116: */ String charsetName;\r\n/* 117: */ String charsetName;\r\n/* 118:181 */ if (paramIdx == -1) {\r\n/* 119:182 */ charsetName = token;\r\n/* 120: */ } else {\r\n/* 121:185 */ charsetName = token.substring(0, paramIdx);\r\n/* 122: */ }\r\n/* 123:187 */ if (!charsetName.equals(\"*\")) {\r\n/* 124:188 */ result.add(Charset.forName(charsetName));\r\n/* 125: */ }\r\n/* 126: */ }\r\n/* 127: */ }\r\n/* 128:192 */ return result;\r\n/* 129: */ }", "public void setAccept(boolean accept) {\n this.accept = accept;\n }", "MediaType getMediaType();", "public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }", "String getRequest(String url);", "@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }", "@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}", "String getUserAgent();", "public void handleRequest(Request req) {\n\n }", "public Response get(String path, String accept) throws IOException {\n return get(cluster, path, accept);\n }", "protected abstract MediaType getSupportedMediaType();", "private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }", "public void setAcceptHeader(AcceptHeader header)\n\t{\n\t\tif (header == null)\n\t\t\treturn;\n\t\t\n\t\tString headerName = header.getName();\n\t\tString lowerName = headerName.toLowerCase();\n\t\t\n\t\tthis.acceptHeaders.put(lowerName, header);\n\t\tsetHeader(headerName, header.parseHeaderValue());\n\t}", "EReqOrCap getReq_cap();", "protected static HttpHeaders getJsonHeaders(){ \n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n headers.setContentType(MediaType.APPLICATION_JSON);\n return headers;\n }", "public final GetHTTP setAcceptContentType(final String acceptContentType) {\n properties.put(ACCEPT_CONTENT_TYPE_PROPERTY, acceptContentType);\n return this;\n }", "private void validatePreferHeader(ODataRequest request) throws ODataHandlerException {\n List<String> returnPreference = request.getHeaders(PREFER);\n if (null != returnPreference) {\n for (String preference : returnPreference) {\n if (preference.equals(RETURN_MINIMAL) || preference.equals(RETURN_REPRESENTATION)) {\n throw new ODataHandlerException(\"Prefer Header not supported: \" + preference,\n ODataHandlerException.MessageKeys.INVALID_PREFER_HEADER, preference);\n } \n }\n }\n }", "public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) {\n Enumeration enum = wc.getRequest().getParameterNames();\n \n // don't accept if we have request parameters\n if (enum.hasMoreElements())\n return false;\n \n // and then only accept if this is a get request\n return wc.getRequest().getMethod().equalsIgnoreCase(\"GET\");\n }", "@Override\n\tprotected ResponseEntity<Object> handleHttpMediaTypeNotAcceptable(\n\t\t\tHttpMediaTypeNotAcceptableException ex, HttpHeaders headers,\n\t\t\tHttpStatus status, WebRequest request) {\n\t\tMediaType mediaType= MediaType.parseMediaType(request.getHeader(\"accept\"));\n\t\tHttpMediaTypeNotSupportedException exa = new HttpMediaTypeNotSupportedException(mediaType, ex.getSupportedMediaTypes());\n\t\theaders.setAccept(ex.getSupportedMediaTypes());\n\t\tResponseError body= createResponseError(exa, HttpStatus.UNSUPPORTED_MEDIA_TYPE,HttpStatus.UNSUPPORTED_MEDIA_TYPE.toString(), \"ERROR_BUSINESS_EXCEPTION\");\n\t\treturn handleExceptionInternal(exa,body, headers, HttpStatus.UNSUPPORTED_MEDIA_TYPE, request);\n\t}", "@Nullable\n private static HttpEncodingType determineEncoding(String acceptEncoding) {\n float starQ = -1.0f;\n final Map<HttpEncodingType, Float> encodings = new LinkedHashMap<>();\n for (String encoding : acceptEncoding.split(\",\")) {\n float q = 1.0f;\n final int equalsPos = encoding.indexOf('=');\n if (equalsPos != -1) {\n try {\n q = Float.parseFloat(encoding.substring(equalsPos + 1));\n } catch (NumberFormatException e) {\n // Ignore encoding\n q = 0.0f;\n }\n }\n if (encoding.contains(\"*\")) {\n starQ = q;\n } else if (encoding.contains(\"br\") && Brotli.isAvailable()) {\n encodings.put(HttpEncodingType.BROTLI, q);\n } else if (encoding.contains(\"gzip\")) {\n encodings.put(HttpEncodingType.GZIP, q);\n } else if (encoding.contains(\"deflate\")) {\n encodings.put(HttpEncodingType.DEFLATE, q);\n }\n }\n\n if (!encodings.isEmpty()) {\n final Entry<HttpEncodingType, Float> entry = Collections.max(encodings.entrySet(),\n Entry.comparingByValue());\n if (entry.getValue() > 0.0f) {\n return entry.getKey();\n }\n }\n if (starQ > 0.0f) {\n if (!encodings.containsKey(HttpEncodingType.BROTLI) && Brotli.isAvailable()) {\n return HttpEncodingType.BROTLI;\n }\n if (!encodings.containsKey(HttpEncodingType.GZIP)) {\n return HttpEncodingType.GZIP;\n }\n if (!encodings.containsKey(HttpEncodingType.DEFLATE)) {\n return HttpEncodingType.DEFLATE;\n }\n }\n return null;\n }", "int getOneof2616();", "@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}", "@Bean\n\tpublic LocaleResolver localeResolver() {\n\t\tAcceptHeaderLocaleResolver locale = new AcceptHeaderLocaleResolver(); // as we are passing the locale in accept header\n\t\tlocale.setDefaultLocale(Locale.US);\n\t\treturn locale;\n\t}", "@Override\n\tpublic AuthorizationResponse decide(HttpServletRequest request) {\n\t\t\treturn this.decide(request, null);\n\t}", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "private ModelAndView handleScriptGetReq(HttpServletResponse response, final String agent_type)\n {\n \tif(agent_type.equals(CUSTOM_HTTP_HEADER_AGENT_TYPE_VALUE))\n\t{ \t\n\t response.setHeader(\"WWW-Authenticate\", \"Basic realm=\\\"ESGF\\\"\");\n\t response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n\t}\t \n\treturn null; /* Do not return a view. */\n }", "private String getRequestedTypeFace(HttpServletRequest req) {\n\tfinal String tf = getRequestParameter(req, QPARAM_NAME_TYPE_FACE);\n\tif (tf != null && !tf.isEmpty()) {\n\t return tf;\n\t}\n\treturn null;\n }", "private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }", "public static boolean isAjax(HttpServletRequest request) {\n String requestedWithHeader = request.getHeader(\"X-Requested-With\");\n return \"XMLHttpRequest\".equals(requestedWithHeader);\n}", "public String getUserAgent();", "public String getRequestCharSet() {\n return getContentCharSet(getRequestHeader(\"Content-Type\"));\n }", "@Override\n public void intercept(RequestInterceptor.RequestFacade request) {\n request.addHeader(\"Accept\", \"application/json\");\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream()));\n //read the client \n String XMLdata = br.readLine();\n boolean isSignatureVerified = parseXMLData(XMLdata);\n //set the client status based on the signature verification\n if (isSignatureVerified) {\n response.setStatus(200);\n } else {\n response.setStatus(401);\n }\n }", "@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }", "public String getRequestMethod(){\n return this.requestMethod;\n }", "private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}", "@Override\nprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n}", "@Override\n\tpublic boolean match(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\treturn (header != null)\n\t\t\t&& (Pattern.matches(\"^\\\\s*(OAuth|Bearer)(.*)$\", header));\n\t}", "java.lang.String getUserAgent();", "@Test // SPR-11443\n\tvoid handleInfoGetCorsFilter() {\n\t\tthis.servletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, \"foobar:123\");\n\n\t\thandleRequest(\"GET\", \"/echo/info\", HttpStatus.OK);\n\n\t\tassertThat(this.servletResponse.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)).isEqualTo(\"foobar:123\");\n\t}", "public String getContentType() {\n return getHeader(\"Content-Type\");\n }", "void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Test\n public void VerifyContentTypeWithAssertThat(){\n given().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/employees/100\")\n .then().assertThat().statusCode(200)\n .and().contentType(ContentType.JSON);\n }", "String getServletInfo();", "String decideResponseOriginHeader(List<String> allowed, String origin) {\n\t\tif (allowed == null || allowed.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tif (allowed.contains(\"*\")) {\n\t\t\treturn \"*\";\n\t\t}\n\t\tif (allowed.contains(origin)) {\n\t\t\treturn origin;\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "public void process(HttpRequest request, HttpContext context) {\n\t\t\t\tif (!request.containsHeader(HEADER_ACCEPT_ENCODING)) {\r\n\t\t\t\t\trequest.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP);\r\n\t\t\t\t}\r\n\t\t\t}", "static boolean Requested(HttpServletRequest request, String paramName)\n {\n \n String value = request.getParameter(paramName);\n Logging.debug(\"Got parameter \"+paramName+\"=\" + value);\n \n if (value != null) {\n if (yesMatcher.matcher(value).lookingAt()) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public static String detectCharset( HttpResponse response ) {\n\t\tif ( response != null && response.containsHeader( \"Content-Type\" ) ) {\n\t\t\tHeader[] headers = response.getHeaders( \"Content-Type\" );\n\t\t\tfor ( int i = 0 ; i < headers.length ; i++ ) {\n\t\t\t\tString headerinfo = headers[i].getValue();\n\t\t\t\tString charset = StringUtils.extractFirst( headerinfo, \"charset=([^;]+)\", 1 );\n\t\t\t\tif ( charset != null && charset.length() > 0 ) {\n\t\t\t\t\treturn charset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static String m21385a() {\n return System.getProperty(\"http.agent\");\n }", "public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {\n\t\tlogger.info(request.getRequestURI());\n\t //method\n\t\tlogger.info(request.getMethod());\n\t //ip\n\t\tlogger.info(request.getRemoteAddr());\n\t\tEnumeration enu=request.getParameterNames(); \n\t\twhile(enu.hasMoreElements()){ \n\t\t\tString paraName=(String)enu.nextElement(); \n\t\t\tlogger.info(paraName+\": \"+request.getParameter(paraName));\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public String getRequestProtocol(){\n return this.requestProtocol;\n }", "Map<String, String> getRequestHeaders();", "String getContentType();", "String getContentType();", "String getContentType();", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "boolean hasUserAgent();", "public abstract HttpHeaders headers();", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "public final int getHeaderID() {\n return ACCEPT_ENCODING;\n }", "void handleRequest();", "private String calculateAllowHeaders(Map<String, String> queryHeaders) {\n\t\t\treturn System.getProperty(ACCESS_CONTROL_ALLOW_HEADER_PROPERTY_NAME,\n\t\t\t\t\tDEFAULT_ALLOWED_HEADERS);\n\t\t}", "String getBrowser();", "public boolean isContentTypeSupported(String contentType)\n {\n if(contentType.equals(DEFAULT_MIME_TYPE))\n return true;\n else if(contentType.equals(\"text/html\"))\n return true;\n else\n return false;\n }", "public String getMediaType() {\r\n return mediaType;\r\n }", "private HttpHeaders getHeaders(String contentType) {\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.set(WebConstants.CONTENT_TYPE, WebConstants.TEXT_PLAIN_UTF8);\n return httpHeaders;\n }", "String getHttpMethod();", "String getHttpMethod();", "public URI getRequestURI();" ]
[ "0.6981159", "0.67891747", "0.6664245", "0.63275236", "0.62929153", "0.6221579", "0.61109495", "0.60769117", "0.6033655", "0.5975624", "0.59612006", "0.59376794", "0.5858096", "0.58441573", "0.57603", "0.57166827", "0.57071847", "0.5696793", "0.5687573", "0.5641366", "0.56368464", "0.5632734", "0.5628953", "0.56285787", "0.56010807", "0.5597088", "0.5574855", "0.5562156", "0.5548604", "0.5535198", "0.5528665", "0.5514056", "0.55071634", "0.54773396", "0.546498", "0.5450835", "0.5449949", "0.544309", "0.54374444", "0.5433028", "0.5387009", "0.5382736", "0.53823286", "0.53710127", "0.5346074", "0.53089476", "0.52836245", "0.5279807", "0.5278372", "0.52477866", "0.5243396", "0.52357185", "0.5233873", "0.52189916", "0.5211904", "0.5208926", "0.5204127", "0.51927876", "0.5181715", "0.5170927", "0.51666814", "0.5166081", "0.51646847", "0.51599044", "0.5145204", "0.51393414", "0.51290464", "0.5128278", "0.5114271", "0.51039577", "0.5102827", "0.5074611", "0.50727445", "0.50637335", "0.50592375", "0.5055502", "0.50518477", "0.5050086", "0.504677", "0.50454116", "0.5042322", "0.50283474", "0.5025372", "0.5024128", "0.50222725", "0.50222725", "0.50222725", "0.5012153", "0.49989855", "0.49982435", "0.49902758", "0.49852103", "0.49840605", "0.4983937", "0.49723914", "0.49699494", "0.49608892", "0.49593264", "0.49590734", "0.49590734", "0.4958833" ]
0.0
-1
String accept = request.getHeader("Accept");
public ResponseEntity<Void> deleteEmp(@ApiParam(value = "employee id to delete",required=true) @PathVariable("empId") Long empId) { Employee newEmp= empService.getEmployeeById(empId); if(newEmp==null) { throw new ResourceNotFoundException("Skill with id "+empId+" is not found"); } else { // LOGGER.trace(" Trying to trace skills to delete details"); empService.deleteEmp(empId); return new ResponseEntity<>(HttpStatus.ACCEPTED); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccept() {\n return accept;\n }", "public List<MediaType> getAccept()\r\n/* 87: */ {\r\n/* 88:148 */ String value = getFirst(\"Accept\");\r\n/* 89:149 */ return value != null ? MediaType.parseMediaTypes(value) : Collections.emptyList();\r\n/* 90: */ }", "public final String getAcceptContentType() {\n return properties.get(ACCEPT_CONTENT_TYPE_PROPERTY);\n }", "public final String getAcceptAttribute() {\n return getAttributeValue(\"accept\");\n }", "public int accept(HttpResponseProlog prolog, HttpHeaders headers);", "public static boolean useJsonResponse(HttpServletRequest request) {\n String acceptHeaderValue = request.getHeader(\"Accept\");\n if (acceptHeaderValue == null) {\n return false;\n }\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(HttpHeaders.ACCEPT, acceptHeaderValue);\n List<MediaType> acceptedMediaTypes = httpHeaders.getAccept();\n boolean acceptsHtml = acceptedMediaTypes.contains(MediaType.TEXT_HTML);\n boolean acceptsJson = acceptedMediaTypes.contains(MediaType.APPLICATION_JSON);\n if (acceptsJson && (!acceptsHtml)) {\n return true;\n } else {\n return false;\n }\n }", "public String getAcceptEncodingHeaderValue() {\n return acceptEncodingHeaderValue;\n }", "public String getIsAccept() {\r\n\t\treturn isAccept;\r\n\t}", "boolean supportsAccepts();", "public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }", "MimeType mediaType();", "String getRequest();", "public static Locale getHeaderFieldAcceptLanguage(Request request) {\n\t\tHttpServletRequest httpServletRequest = request.raw();\n\t\treturn httpServletRequest.getLocale();\n\t}", "public Response get(Cluster cluster, String path, String accept)\n throws IOException {\n Header[] headers = new Header[1];\n headers[0] = new Header(\"Accept\", accept);\n return get(cluster, path, headers);\n }", "String getHeader(HttpServletRequest request, String name) throws ValidationException;", "@Override\n public boolean accept(String link) {\n \n URL url;\n URLConnection connection;\n String type;\n boolean ret;\n\n ret = false;\n try {\n url = new URL (link);\n connection = url.openConnection ();\n type = connection.getContentType ();\n if (type == null)\n ret = false;\n else\n ret = type.startsWith (\"text/html\");\n }catch (IOException e) {\n// XLogger.getInstance().log(Level.WARNING, \"{0}. {1}\", this.getClass(), e, link);\n }\n \n return (ret);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t\tSystem.out.println(\":::::::::::::::doPost\");\n\t\t//한글 처리\n\t\treq.setCharacterEncoding(\"UTF-8\");\n\t\tresp.setContentType(\"text/html\");\n\t\tresp.setCharacterEncoding(\"UTF-8\");\n\t\t\n\t\t//화면 출력 \n\t\tPrintWriter out = resp.getWriter();\n\t\t\n\t\t//전송할때 개발자도구(F12) network > Request Header 정보에 있는 데이터가 뿌려진다\n\t\tEnumeration<String> en = req.getHeaderNames();\n\t\t\n\t\twhile(en.hasMoreElements()){ //다음 값이 있는지 (true,false) \n\t\t\tString key = en.nextElement(); //다음 값의 키를 가져온다.\n\t\t\tString value = req.getHeader(key);\n\t\t\tout.println(\"key : \"+ key + \"<br/> value : \" + value + \"<br/><br/>\");\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}", "@Override\n public boolean accepts(HttpResponse response) {\n Header[] headers = response.getHeaders(HttpHeaders.CONTENT_TYPE);\n for (Header header : headers) {\n if (header != null && header.getValue().contains(NTLMConstants.CONTENT_TYPE_FOR_SPNEGO)) {\n return true;\n }\n }\n return false;\n }", "public void setAccept(List<MediaType> acceptableMediaTypes)\r\n/* 82: */ {\r\n/* 83:139 */ set(\"Accept\", MediaType.toString(acceptableMediaTypes));\r\n/* 84: */ }", "public AcceptHeader getAcceptHeader(String headerName)\n\t{\n\t\tString lowerName = headerName.toLowerCase();\n\t\tAcceptHeader header = this.acceptHeaders.get(lowerName);\n\t\tif (header == null)\n\t\t{\n\t\t\tString headerValue = getHeaderValue(headerName);\n\t\t\tif (headerValue != null)\n\t\t\t{\n\t\t\t\theader = new AcceptHeader(headerName, headerValue);\n\t\t\t\tthis.acceptHeaders.put(lowerName, header);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn header;\n\t}", "public boolean isSupported(MediaType mediaType);", "String getResponseHeader();", "private void mimicSunRequestHeaders() {\n if (!isHeaderSet(method.getRequestHeader(\"Accept\"))) {\n setRequestProperty(\"Accept\", acceptHeader);\n }\n if (!isHeaderSet(method.getRequestHeader(\"Connection\"))) {\n setRequestProperty(\"Connection\", \"keep-alive\");\n }\n }", "Headers getHeaders();", "public static String getMediaType(Request request) {\n\t\tList<Preference<MediaType>> acceptedMediaTypes = request.getClientInfo().getAcceptedMediaTypes();\n\t\tfor (Preference<MediaType> preference : acceptedMediaTypes) {\n\t\t\tMediaType mediaType = preference.getMetadata();\n\t\t\tString mediaTypeName = mediaType.getName().trim();\n\t\t\tmediaTypeName=mediaTypeName.replaceAll(\"\\\\s\", \"\");\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_JSONVERBOSE.getName())){\n\t\t\t\treturn \".json\";\n\t\t\t}\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_ATOM.getName())){\n\t\t\t\treturn \".xml\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "RequestHeaders headers();", "private static String getHTTPHeader(PortletRequest request, String name) {\n String value = null;\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPHeader(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPHeader(request, name);\n }\n return value;\n }", "public boolean isAccept(){\n return isAccept; \n }", "public List<Charset> getAcceptCharset()\r\n/* 107: */ {\r\n/* 108:174 */ List<Charset> result = new ArrayList();\r\n/* 109:175 */ String value = getFirst(\"Accept-Charset\");\r\n/* 110:176 */ if (value != null)\r\n/* 111: */ {\r\n/* 112:177 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 113:178 */ for (String token : tokens)\r\n/* 114: */ {\r\n/* 115:179 */ int paramIdx = token.indexOf(';');\r\n/* 116: */ String charsetName;\r\n/* 117: */ String charsetName;\r\n/* 118:181 */ if (paramIdx == -1) {\r\n/* 119:182 */ charsetName = token;\r\n/* 120: */ } else {\r\n/* 121:185 */ charsetName = token.substring(0, paramIdx);\r\n/* 122: */ }\r\n/* 123:187 */ if (!charsetName.equals(\"*\")) {\r\n/* 124:188 */ result.add(Charset.forName(charsetName));\r\n/* 125: */ }\r\n/* 126: */ }\r\n/* 127: */ }\r\n/* 128:192 */ return result;\r\n/* 129: */ }", "public void setAccept(boolean accept) {\n this.accept = accept;\n }", "MediaType getMediaType();", "public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }", "String getRequest(String url);", "@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }", "@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}", "String getUserAgent();", "public void handleRequest(Request req) {\n\n }", "public Response get(String path, String accept) throws IOException {\n return get(cluster, path, accept);\n }", "protected abstract MediaType getSupportedMediaType();", "private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }", "public void setAcceptHeader(AcceptHeader header)\n\t{\n\t\tif (header == null)\n\t\t\treturn;\n\t\t\n\t\tString headerName = header.getName();\n\t\tString lowerName = headerName.toLowerCase();\n\t\t\n\t\tthis.acceptHeaders.put(lowerName, header);\n\t\tsetHeader(headerName, header.parseHeaderValue());\n\t}", "EReqOrCap getReq_cap();", "protected static HttpHeaders getJsonHeaders(){ \n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n headers.setContentType(MediaType.APPLICATION_JSON);\n return headers;\n }", "public final GetHTTP setAcceptContentType(final String acceptContentType) {\n properties.put(ACCEPT_CONTENT_TYPE_PROPERTY, acceptContentType);\n return this;\n }", "private void validatePreferHeader(ODataRequest request) throws ODataHandlerException {\n List<String> returnPreference = request.getHeaders(PREFER);\n if (null != returnPreference) {\n for (String preference : returnPreference) {\n if (preference.equals(RETURN_MINIMAL) || preference.equals(RETURN_REPRESENTATION)) {\n throw new ODataHandlerException(\"Prefer Header not supported: \" + preference,\n ODataHandlerException.MessageKeys.INVALID_PREFER_HEADER, preference);\n } \n }\n }\n }", "public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) {\n Enumeration enum = wc.getRequest().getParameterNames();\n \n // don't accept if we have request parameters\n if (enum.hasMoreElements())\n return false;\n \n // and then only accept if this is a get request\n return wc.getRequest().getMethod().equalsIgnoreCase(\"GET\");\n }", "@Override\n\tprotected ResponseEntity<Object> handleHttpMediaTypeNotAcceptable(\n\t\t\tHttpMediaTypeNotAcceptableException ex, HttpHeaders headers,\n\t\t\tHttpStatus status, WebRequest request) {\n\t\tMediaType mediaType= MediaType.parseMediaType(request.getHeader(\"accept\"));\n\t\tHttpMediaTypeNotSupportedException exa = new HttpMediaTypeNotSupportedException(mediaType, ex.getSupportedMediaTypes());\n\t\theaders.setAccept(ex.getSupportedMediaTypes());\n\t\tResponseError body= createResponseError(exa, HttpStatus.UNSUPPORTED_MEDIA_TYPE,HttpStatus.UNSUPPORTED_MEDIA_TYPE.toString(), \"ERROR_BUSINESS_EXCEPTION\");\n\t\treturn handleExceptionInternal(exa,body, headers, HttpStatus.UNSUPPORTED_MEDIA_TYPE, request);\n\t}", "@Nullable\n private static HttpEncodingType determineEncoding(String acceptEncoding) {\n float starQ = -1.0f;\n final Map<HttpEncodingType, Float> encodings = new LinkedHashMap<>();\n for (String encoding : acceptEncoding.split(\",\")) {\n float q = 1.0f;\n final int equalsPos = encoding.indexOf('=');\n if (equalsPos != -1) {\n try {\n q = Float.parseFloat(encoding.substring(equalsPos + 1));\n } catch (NumberFormatException e) {\n // Ignore encoding\n q = 0.0f;\n }\n }\n if (encoding.contains(\"*\")) {\n starQ = q;\n } else if (encoding.contains(\"br\") && Brotli.isAvailable()) {\n encodings.put(HttpEncodingType.BROTLI, q);\n } else if (encoding.contains(\"gzip\")) {\n encodings.put(HttpEncodingType.GZIP, q);\n } else if (encoding.contains(\"deflate\")) {\n encodings.put(HttpEncodingType.DEFLATE, q);\n }\n }\n\n if (!encodings.isEmpty()) {\n final Entry<HttpEncodingType, Float> entry = Collections.max(encodings.entrySet(),\n Entry.comparingByValue());\n if (entry.getValue() > 0.0f) {\n return entry.getKey();\n }\n }\n if (starQ > 0.0f) {\n if (!encodings.containsKey(HttpEncodingType.BROTLI) && Brotli.isAvailable()) {\n return HttpEncodingType.BROTLI;\n }\n if (!encodings.containsKey(HttpEncodingType.GZIP)) {\n return HttpEncodingType.GZIP;\n }\n if (!encodings.containsKey(HttpEncodingType.DEFLATE)) {\n return HttpEncodingType.DEFLATE;\n }\n }\n return null;\n }", "int getOneof2616();", "@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}", "@Bean\n\tpublic LocaleResolver localeResolver() {\n\t\tAcceptHeaderLocaleResolver locale = new AcceptHeaderLocaleResolver(); // as we are passing the locale in accept header\n\t\tlocale.setDefaultLocale(Locale.US);\n\t\treturn locale;\n\t}", "@Override\n\tpublic AuthorizationResponse decide(HttpServletRequest request) {\n\t\t\treturn this.decide(request, null);\n\t}", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "private ModelAndView handleScriptGetReq(HttpServletResponse response, final String agent_type)\n {\n \tif(agent_type.equals(CUSTOM_HTTP_HEADER_AGENT_TYPE_VALUE))\n\t{ \t\n\t response.setHeader(\"WWW-Authenticate\", \"Basic realm=\\\"ESGF\\\"\");\n\t response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n\t}\t \n\treturn null; /* Do not return a view. */\n }", "private String getRequestedTypeFace(HttpServletRequest req) {\n\tfinal String tf = getRequestParameter(req, QPARAM_NAME_TYPE_FACE);\n\tif (tf != null && !tf.isEmpty()) {\n\t return tf;\n\t}\n\treturn null;\n }", "private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }", "public static boolean isAjax(HttpServletRequest request) {\n String requestedWithHeader = request.getHeader(\"X-Requested-With\");\n return \"XMLHttpRequest\".equals(requestedWithHeader);\n}", "public String getUserAgent();", "public String getRequestCharSet() {\n return getContentCharSet(getRequestHeader(\"Content-Type\"));\n }", "@Override\n public void intercept(RequestInterceptor.RequestFacade request) {\n request.addHeader(\"Accept\", \"application/json\");\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream()));\n //read the client \n String XMLdata = br.readLine();\n boolean isSignatureVerified = parseXMLData(XMLdata);\n //set the client status based on the signature verification\n if (isSignatureVerified) {\n response.setStatus(200);\n } else {\n response.setStatus(401);\n }\n }", "@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }", "public String getRequestMethod(){\n return this.requestMethod;\n }", "private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}", "@Override\nprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n}", "@Override\n\tpublic boolean match(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\treturn (header != null)\n\t\t\t&& (Pattern.matches(\"^\\\\s*(OAuth|Bearer)(.*)$\", header));\n\t}", "java.lang.String getUserAgent();", "@Test // SPR-11443\n\tvoid handleInfoGetCorsFilter() {\n\t\tthis.servletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, \"foobar:123\");\n\n\t\thandleRequest(\"GET\", \"/echo/info\", HttpStatus.OK);\n\n\t\tassertThat(this.servletResponse.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)).isEqualTo(\"foobar:123\");\n\t}", "public String getContentType() {\n return getHeader(\"Content-Type\");\n }", "void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Test\n public void VerifyContentTypeWithAssertThat(){\n given().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/employees/100\")\n .then().assertThat().statusCode(200)\n .and().contentType(ContentType.JSON);\n }", "String getServletInfo();", "String decideResponseOriginHeader(List<String> allowed, String origin) {\n\t\tif (allowed == null || allowed.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tif (allowed.contains(\"*\")) {\n\t\t\treturn \"*\";\n\t\t}\n\t\tif (allowed.contains(origin)) {\n\t\t\treturn origin;\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "public void process(HttpRequest request, HttpContext context) {\n\t\t\t\tif (!request.containsHeader(HEADER_ACCEPT_ENCODING)) {\r\n\t\t\t\t\trequest.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP);\r\n\t\t\t\t}\r\n\t\t\t}", "static boolean Requested(HttpServletRequest request, String paramName)\n {\n \n String value = request.getParameter(paramName);\n Logging.debug(\"Got parameter \"+paramName+\"=\" + value);\n \n if (value != null) {\n if (yesMatcher.matcher(value).lookingAt()) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public static String detectCharset( HttpResponse response ) {\n\t\tif ( response != null && response.containsHeader( \"Content-Type\" ) ) {\n\t\t\tHeader[] headers = response.getHeaders( \"Content-Type\" );\n\t\t\tfor ( int i = 0 ; i < headers.length ; i++ ) {\n\t\t\t\tString headerinfo = headers[i].getValue();\n\t\t\t\tString charset = StringUtils.extractFirst( headerinfo, \"charset=([^;]+)\", 1 );\n\t\t\t\tif ( charset != null && charset.length() > 0 ) {\n\t\t\t\t\treturn charset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static String m21385a() {\n return System.getProperty(\"http.agent\");\n }", "public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {\n\t\tlogger.info(request.getRequestURI());\n\t //method\n\t\tlogger.info(request.getMethod());\n\t //ip\n\t\tlogger.info(request.getRemoteAddr());\n\t\tEnumeration enu=request.getParameterNames(); \n\t\twhile(enu.hasMoreElements()){ \n\t\t\tString paraName=(String)enu.nextElement(); \n\t\t\tlogger.info(paraName+\": \"+request.getParameter(paraName));\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public String getRequestProtocol(){\n return this.requestProtocol;\n }", "Map<String, String> getRequestHeaders();", "String getContentType();", "String getContentType();", "String getContentType();", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "boolean hasUserAgent();", "public abstract HttpHeaders headers();", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "public final int getHeaderID() {\n return ACCEPT_ENCODING;\n }", "void handleRequest();", "private String calculateAllowHeaders(Map<String, String> queryHeaders) {\n\t\t\treturn System.getProperty(ACCESS_CONTROL_ALLOW_HEADER_PROPERTY_NAME,\n\t\t\t\t\tDEFAULT_ALLOWED_HEADERS);\n\t\t}", "String getBrowser();", "public boolean isContentTypeSupported(String contentType)\n {\n if(contentType.equals(DEFAULT_MIME_TYPE))\n return true;\n else if(contentType.equals(\"text/html\"))\n return true;\n else\n return false;\n }", "public String getMediaType() {\r\n return mediaType;\r\n }", "private HttpHeaders getHeaders(String contentType) {\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.set(WebConstants.CONTENT_TYPE, WebConstants.TEXT_PLAIN_UTF8);\n return httpHeaders;\n }", "String getHttpMethod();", "String getHttpMethod();", "public URI getRequestURI();" ]
[ "0.6981159", "0.67891747", "0.6664245", "0.63275236", "0.62929153", "0.6221579", "0.61109495", "0.60769117", "0.6033655", "0.5975624", "0.59612006", "0.59376794", "0.5858096", "0.58441573", "0.57603", "0.57166827", "0.57071847", "0.5696793", "0.5687573", "0.5641366", "0.56368464", "0.5632734", "0.5628953", "0.56285787", "0.56010807", "0.5597088", "0.5574855", "0.5562156", "0.5548604", "0.5535198", "0.5528665", "0.5514056", "0.55071634", "0.54773396", "0.546498", "0.5450835", "0.5449949", "0.544309", "0.54374444", "0.5433028", "0.5387009", "0.5382736", "0.53823286", "0.53710127", "0.5346074", "0.53089476", "0.52836245", "0.5279807", "0.5278372", "0.52477866", "0.5243396", "0.52357185", "0.5233873", "0.52189916", "0.5211904", "0.5208926", "0.5204127", "0.51927876", "0.5181715", "0.5170927", "0.51666814", "0.5166081", "0.51646847", "0.51599044", "0.5145204", "0.51393414", "0.51290464", "0.5128278", "0.5114271", "0.51039577", "0.5102827", "0.5074611", "0.50727445", "0.50637335", "0.50592375", "0.5055502", "0.50518477", "0.5050086", "0.504677", "0.50454116", "0.5042322", "0.50283474", "0.5025372", "0.5024128", "0.50222725", "0.50222725", "0.50222725", "0.5012153", "0.49989855", "0.49982435", "0.49902758", "0.49852103", "0.49840605", "0.4983937", "0.49723914", "0.49699494", "0.49608892", "0.49593264", "0.49590734", "0.49590734", "0.4958833" ]
0.0
-1
String accept = request.getHeader("Accept");
public ResponseEntity<Void> deleteEmployeeDetails(@ApiParam(value = "employee id to delete",required=true) @PathVariable("empId") Long empId) { Employee newEmp= empService.getEmployeeById(empId); if(newEmp==null) { throw new ResourceNotFoundException("Skill with id "+empId+" is not found"); } else { // LOGGER.trace(" Trying to trace skills to delete details"); empService.deleteEmployeeDetails(empId); return new ResponseEntity<>(HttpStatus.ACCEPTED); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccept() {\n return accept;\n }", "public List<MediaType> getAccept()\r\n/* 87: */ {\r\n/* 88:148 */ String value = getFirst(\"Accept\");\r\n/* 89:149 */ return value != null ? MediaType.parseMediaTypes(value) : Collections.emptyList();\r\n/* 90: */ }", "public final String getAcceptContentType() {\n return properties.get(ACCEPT_CONTENT_TYPE_PROPERTY);\n }", "public final String getAcceptAttribute() {\n return getAttributeValue(\"accept\");\n }", "public int accept(HttpResponseProlog prolog, HttpHeaders headers);", "public static boolean useJsonResponse(HttpServletRequest request) {\n String acceptHeaderValue = request.getHeader(\"Accept\");\n if (acceptHeaderValue == null) {\n return false;\n }\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(HttpHeaders.ACCEPT, acceptHeaderValue);\n List<MediaType> acceptedMediaTypes = httpHeaders.getAccept();\n boolean acceptsHtml = acceptedMediaTypes.contains(MediaType.TEXT_HTML);\n boolean acceptsJson = acceptedMediaTypes.contains(MediaType.APPLICATION_JSON);\n if (acceptsJson && (!acceptsHtml)) {\n return true;\n } else {\n return false;\n }\n }", "public String getAcceptEncodingHeaderValue() {\n return acceptEncodingHeaderValue;\n }", "public String getIsAccept() {\r\n\t\treturn isAccept;\r\n\t}", "boolean supportsAccepts();", "public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }", "MimeType mediaType();", "String getRequest();", "public static Locale getHeaderFieldAcceptLanguage(Request request) {\n\t\tHttpServletRequest httpServletRequest = request.raw();\n\t\treturn httpServletRequest.getLocale();\n\t}", "public Response get(Cluster cluster, String path, String accept)\n throws IOException {\n Header[] headers = new Header[1];\n headers[0] = new Header(\"Accept\", accept);\n return get(cluster, path, headers);\n }", "String getHeader(HttpServletRequest request, String name) throws ValidationException;", "@Override\n public boolean accept(String link) {\n \n URL url;\n URLConnection connection;\n String type;\n boolean ret;\n\n ret = false;\n try {\n url = new URL (link);\n connection = url.openConnection ();\n type = connection.getContentType ();\n if (type == null)\n ret = false;\n else\n ret = type.startsWith (\"text/html\");\n }catch (IOException e) {\n// XLogger.getInstance().log(Level.WARNING, \"{0}. {1}\", this.getClass(), e, link);\n }\n \n return (ret);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t\tSystem.out.println(\":::::::::::::::doPost\");\n\t\t//한글 처리\n\t\treq.setCharacterEncoding(\"UTF-8\");\n\t\tresp.setContentType(\"text/html\");\n\t\tresp.setCharacterEncoding(\"UTF-8\");\n\t\t\n\t\t//화면 출력 \n\t\tPrintWriter out = resp.getWriter();\n\t\t\n\t\t//전송할때 개발자도구(F12) network > Request Header 정보에 있는 데이터가 뿌려진다\n\t\tEnumeration<String> en = req.getHeaderNames();\n\t\t\n\t\twhile(en.hasMoreElements()){ //다음 값이 있는지 (true,false) \n\t\t\tString key = en.nextElement(); //다음 값의 키를 가져온다.\n\t\t\tString value = req.getHeader(key);\n\t\t\tout.println(\"key : \"+ key + \"<br/> value : \" + value + \"<br/><br/>\");\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}", "@Override\n public boolean accepts(HttpResponse response) {\n Header[] headers = response.getHeaders(HttpHeaders.CONTENT_TYPE);\n for (Header header : headers) {\n if (header != null && header.getValue().contains(NTLMConstants.CONTENT_TYPE_FOR_SPNEGO)) {\n return true;\n }\n }\n return false;\n }", "public void setAccept(List<MediaType> acceptableMediaTypes)\r\n/* 82: */ {\r\n/* 83:139 */ set(\"Accept\", MediaType.toString(acceptableMediaTypes));\r\n/* 84: */ }", "public AcceptHeader getAcceptHeader(String headerName)\n\t{\n\t\tString lowerName = headerName.toLowerCase();\n\t\tAcceptHeader header = this.acceptHeaders.get(lowerName);\n\t\tif (header == null)\n\t\t{\n\t\t\tString headerValue = getHeaderValue(headerName);\n\t\t\tif (headerValue != null)\n\t\t\t{\n\t\t\t\theader = new AcceptHeader(headerName, headerValue);\n\t\t\t\tthis.acceptHeaders.put(lowerName, header);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn header;\n\t}", "public boolean isSupported(MediaType mediaType);", "String getResponseHeader();", "private void mimicSunRequestHeaders() {\n if (!isHeaderSet(method.getRequestHeader(\"Accept\"))) {\n setRequestProperty(\"Accept\", acceptHeader);\n }\n if (!isHeaderSet(method.getRequestHeader(\"Connection\"))) {\n setRequestProperty(\"Connection\", \"keep-alive\");\n }\n }", "Headers getHeaders();", "public static String getMediaType(Request request) {\n\t\tList<Preference<MediaType>> acceptedMediaTypes = request.getClientInfo().getAcceptedMediaTypes();\n\t\tfor (Preference<MediaType> preference : acceptedMediaTypes) {\n\t\t\tMediaType mediaType = preference.getMetadata();\n\t\t\tString mediaTypeName = mediaType.getName().trim();\n\t\t\tmediaTypeName=mediaTypeName.replaceAll(\"\\\\s\", \"\");\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_JSONVERBOSE.getName())){\n\t\t\t\treturn \".json\";\n\t\t\t}\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_ATOM.getName())){\n\t\t\t\treturn \".xml\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "RequestHeaders headers();", "private static String getHTTPHeader(PortletRequest request, String name) {\n String value = null;\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPHeader(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPHeader(request, name);\n }\n return value;\n }", "public boolean isAccept(){\n return isAccept; \n }", "public List<Charset> getAcceptCharset()\r\n/* 107: */ {\r\n/* 108:174 */ List<Charset> result = new ArrayList();\r\n/* 109:175 */ String value = getFirst(\"Accept-Charset\");\r\n/* 110:176 */ if (value != null)\r\n/* 111: */ {\r\n/* 112:177 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 113:178 */ for (String token : tokens)\r\n/* 114: */ {\r\n/* 115:179 */ int paramIdx = token.indexOf(';');\r\n/* 116: */ String charsetName;\r\n/* 117: */ String charsetName;\r\n/* 118:181 */ if (paramIdx == -1) {\r\n/* 119:182 */ charsetName = token;\r\n/* 120: */ } else {\r\n/* 121:185 */ charsetName = token.substring(0, paramIdx);\r\n/* 122: */ }\r\n/* 123:187 */ if (!charsetName.equals(\"*\")) {\r\n/* 124:188 */ result.add(Charset.forName(charsetName));\r\n/* 125: */ }\r\n/* 126: */ }\r\n/* 127: */ }\r\n/* 128:192 */ return result;\r\n/* 129: */ }", "public void setAccept(boolean accept) {\n this.accept = accept;\n }", "MediaType getMediaType();", "public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }", "String getRequest(String url);", "@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }", "@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}", "String getUserAgent();", "public void handleRequest(Request req) {\n\n }", "public Response get(String path, String accept) throws IOException {\n return get(cluster, path, accept);\n }", "protected abstract MediaType getSupportedMediaType();", "private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }", "public void setAcceptHeader(AcceptHeader header)\n\t{\n\t\tif (header == null)\n\t\t\treturn;\n\t\t\n\t\tString headerName = header.getName();\n\t\tString lowerName = headerName.toLowerCase();\n\t\t\n\t\tthis.acceptHeaders.put(lowerName, header);\n\t\tsetHeader(headerName, header.parseHeaderValue());\n\t}", "EReqOrCap getReq_cap();", "protected static HttpHeaders getJsonHeaders(){ \n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n headers.setContentType(MediaType.APPLICATION_JSON);\n return headers;\n }", "public final GetHTTP setAcceptContentType(final String acceptContentType) {\n properties.put(ACCEPT_CONTENT_TYPE_PROPERTY, acceptContentType);\n return this;\n }", "private void validatePreferHeader(ODataRequest request) throws ODataHandlerException {\n List<String> returnPreference = request.getHeaders(PREFER);\n if (null != returnPreference) {\n for (String preference : returnPreference) {\n if (preference.equals(RETURN_MINIMAL) || preference.equals(RETURN_REPRESENTATION)) {\n throw new ODataHandlerException(\"Prefer Header not supported: \" + preference,\n ODataHandlerException.MessageKeys.INVALID_PREFER_HEADER, preference);\n } \n }\n }\n }", "public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) {\n Enumeration enum = wc.getRequest().getParameterNames();\n \n // don't accept if we have request parameters\n if (enum.hasMoreElements())\n return false;\n \n // and then only accept if this is a get request\n return wc.getRequest().getMethod().equalsIgnoreCase(\"GET\");\n }", "@Override\n\tprotected ResponseEntity<Object> handleHttpMediaTypeNotAcceptable(\n\t\t\tHttpMediaTypeNotAcceptableException ex, HttpHeaders headers,\n\t\t\tHttpStatus status, WebRequest request) {\n\t\tMediaType mediaType= MediaType.parseMediaType(request.getHeader(\"accept\"));\n\t\tHttpMediaTypeNotSupportedException exa = new HttpMediaTypeNotSupportedException(mediaType, ex.getSupportedMediaTypes());\n\t\theaders.setAccept(ex.getSupportedMediaTypes());\n\t\tResponseError body= createResponseError(exa, HttpStatus.UNSUPPORTED_MEDIA_TYPE,HttpStatus.UNSUPPORTED_MEDIA_TYPE.toString(), \"ERROR_BUSINESS_EXCEPTION\");\n\t\treturn handleExceptionInternal(exa,body, headers, HttpStatus.UNSUPPORTED_MEDIA_TYPE, request);\n\t}", "@Nullable\n private static HttpEncodingType determineEncoding(String acceptEncoding) {\n float starQ = -1.0f;\n final Map<HttpEncodingType, Float> encodings = new LinkedHashMap<>();\n for (String encoding : acceptEncoding.split(\",\")) {\n float q = 1.0f;\n final int equalsPos = encoding.indexOf('=');\n if (equalsPos != -1) {\n try {\n q = Float.parseFloat(encoding.substring(equalsPos + 1));\n } catch (NumberFormatException e) {\n // Ignore encoding\n q = 0.0f;\n }\n }\n if (encoding.contains(\"*\")) {\n starQ = q;\n } else if (encoding.contains(\"br\") && Brotli.isAvailable()) {\n encodings.put(HttpEncodingType.BROTLI, q);\n } else if (encoding.contains(\"gzip\")) {\n encodings.put(HttpEncodingType.GZIP, q);\n } else if (encoding.contains(\"deflate\")) {\n encodings.put(HttpEncodingType.DEFLATE, q);\n }\n }\n\n if (!encodings.isEmpty()) {\n final Entry<HttpEncodingType, Float> entry = Collections.max(encodings.entrySet(),\n Entry.comparingByValue());\n if (entry.getValue() > 0.0f) {\n return entry.getKey();\n }\n }\n if (starQ > 0.0f) {\n if (!encodings.containsKey(HttpEncodingType.BROTLI) && Brotli.isAvailable()) {\n return HttpEncodingType.BROTLI;\n }\n if (!encodings.containsKey(HttpEncodingType.GZIP)) {\n return HttpEncodingType.GZIP;\n }\n if (!encodings.containsKey(HttpEncodingType.DEFLATE)) {\n return HttpEncodingType.DEFLATE;\n }\n }\n return null;\n }", "int getOneof2616();", "@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}", "@Bean\n\tpublic LocaleResolver localeResolver() {\n\t\tAcceptHeaderLocaleResolver locale = new AcceptHeaderLocaleResolver(); // as we are passing the locale in accept header\n\t\tlocale.setDefaultLocale(Locale.US);\n\t\treturn locale;\n\t}", "@Override\n\tpublic AuthorizationResponse decide(HttpServletRequest request) {\n\t\t\treturn this.decide(request, null);\n\t}", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "private ModelAndView handleScriptGetReq(HttpServletResponse response, final String agent_type)\n {\n \tif(agent_type.equals(CUSTOM_HTTP_HEADER_AGENT_TYPE_VALUE))\n\t{ \t\n\t response.setHeader(\"WWW-Authenticate\", \"Basic realm=\\\"ESGF\\\"\");\n\t response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n\t}\t \n\treturn null; /* Do not return a view. */\n }", "private String getRequestedTypeFace(HttpServletRequest req) {\n\tfinal String tf = getRequestParameter(req, QPARAM_NAME_TYPE_FACE);\n\tif (tf != null && !tf.isEmpty()) {\n\t return tf;\n\t}\n\treturn null;\n }", "private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }", "public static boolean isAjax(HttpServletRequest request) {\n String requestedWithHeader = request.getHeader(\"X-Requested-With\");\n return \"XMLHttpRequest\".equals(requestedWithHeader);\n}", "public String getUserAgent();", "public String getRequestCharSet() {\n return getContentCharSet(getRequestHeader(\"Content-Type\"));\n }", "@Override\n public void intercept(RequestInterceptor.RequestFacade request) {\n request.addHeader(\"Accept\", \"application/json\");\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream()));\n //read the client \n String XMLdata = br.readLine();\n boolean isSignatureVerified = parseXMLData(XMLdata);\n //set the client status based on the signature verification\n if (isSignatureVerified) {\n response.setStatus(200);\n } else {\n response.setStatus(401);\n }\n }", "@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }", "public String getRequestMethod(){\n return this.requestMethod;\n }", "private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}", "@Override\nprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n}", "@Override\n\tpublic boolean match(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\treturn (header != null)\n\t\t\t&& (Pattern.matches(\"^\\\\s*(OAuth|Bearer)(.*)$\", header));\n\t}", "java.lang.String getUserAgent();", "@Test // SPR-11443\n\tvoid handleInfoGetCorsFilter() {\n\t\tthis.servletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, \"foobar:123\");\n\n\t\thandleRequest(\"GET\", \"/echo/info\", HttpStatus.OK);\n\n\t\tassertThat(this.servletResponse.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)).isEqualTo(\"foobar:123\");\n\t}", "public String getContentType() {\n return getHeader(\"Content-Type\");\n }", "void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Test\n public void VerifyContentTypeWithAssertThat(){\n given().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/employees/100\")\n .then().assertThat().statusCode(200)\n .and().contentType(ContentType.JSON);\n }", "String getServletInfo();", "String decideResponseOriginHeader(List<String> allowed, String origin) {\n\t\tif (allowed == null || allowed.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tif (allowed.contains(\"*\")) {\n\t\t\treturn \"*\";\n\t\t}\n\t\tif (allowed.contains(origin)) {\n\t\t\treturn origin;\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "public void process(HttpRequest request, HttpContext context) {\n\t\t\t\tif (!request.containsHeader(HEADER_ACCEPT_ENCODING)) {\r\n\t\t\t\t\trequest.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP);\r\n\t\t\t\t}\r\n\t\t\t}", "static boolean Requested(HttpServletRequest request, String paramName)\n {\n \n String value = request.getParameter(paramName);\n Logging.debug(\"Got parameter \"+paramName+\"=\" + value);\n \n if (value != null) {\n if (yesMatcher.matcher(value).lookingAt()) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public static String detectCharset( HttpResponse response ) {\n\t\tif ( response != null && response.containsHeader( \"Content-Type\" ) ) {\n\t\t\tHeader[] headers = response.getHeaders( \"Content-Type\" );\n\t\t\tfor ( int i = 0 ; i < headers.length ; i++ ) {\n\t\t\t\tString headerinfo = headers[i].getValue();\n\t\t\t\tString charset = StringUtils.extractFirst( headerinfo, \"charset=([^;]+)\", 1 );\n\t\t\t\tif ( charset != null && charset.length() > 0 ) {\n\t\t\t\t\treturn charset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static String m21385a() {\n return System.getProperty(\"http.agent\");\n }", "public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {\n\t\tlogger.info(request.getRequestURI());\n\t //method\n\t\tlogger.info(request.getMethod());\n\t //ip\n\t\tlogger.info(request.getRemoteAddr());\n\t\tEnumeration enu=request.getParameterNames(); \n\t\twhile(enu.hasMoreElements()){ \n\t\t\tString paraName=(String)enu.nextElement(); \n\t\t\tlogger.info(paraName+\": \"+request.getParameter(paraName));\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public String getRequestProtocol(){\n return this.requestProtocol;\n }", "Map<String, String> getRequestHeaders();", "String getContentType();", "String getContentType();", "String getContentType();", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "boolean hasUserAgent();", "public abstract HttpHeaders headers();", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "public final int getHeaderID() {\n return ACCEPT_ENCODING;\n }", "void handleRequest();", "private String calculateAllowHeaders(Map<String, String> queryHeaders) {\n\t\t\treturn System.getProperty(ACCESS_CONTROL_ALLOW_HEADER_PROPERTY_NAME,\n\t\t\t\t\tDEFAULT_ALLOWED_HEADERS);\n\t\t}", "String getBrowser();", "public boolean isContentTypeSupported(String contentType)\n {\n if(contentType.equals(DEFAULT_MIME_TYPE))\n return true;\n else if(contentType.equals(\"text/html\"))\n return true;\n else\n return false;\n }", "public String getMediaType() {\r\n return mediaType;\r\n }", "private HttpHeaders getHeaders(String contentType) {\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.set(WebConstants.CONTENT_TYPE, WebConstants.TEXT_PLAIN_UTF8);\n return httpHeaders;\n }", "String getHttpMethod();", "String getHttpMethod();", "public URI getRequestURI();" ]
[ "0.6981159", "0.67891747", "0.6664245", "0.63275236", "0.62929153", "0.6221579", "0.61109495", "0.60769117", "0.6033655", "0.5975624", "0.59612006", "0.59376794", "0.5858096", "0.58441573", "0.57603", "0.57166827", "0.57071847", "0.5696793", "0.5687573", "0.5641366", "0.56368464", "0.5632734", "0.5628953", "0.56285787", "0.56010807", "0.5597088", "0.5574855", "0.5562156", "0.5548604", "0.5535198", "0.5528665", "0.5514056", "0.55071634", "0.54773396", "0.546498", "0.5450835", "0.5449949", "0.544309", "0.54374444", "0.5433028", "0.5387009", "0.5382736", "0.53823286", "0.53710127", "0.5346074", "0.53089476", "0.52836245", "0.5279807", "0.5278372", "0.52477866", "0.5243396", "0.52357185", "0.5233873", "0.52189916", "0.5211904", "0.5208926", "0.5204127", "0.51927876", "0.5181715", "0.5170927", "0.51666814", "0.5166081", "0.51646847", "0.51599044", "0.5145204", "0.51393414", "0.51290464", "0.5128278", "0.5114271", "0.51039577", "0.5102827", "0.5074611", "0.50727445", "0.50637335", "0.50592375", "0.5055502", "0.50518477", "0.5050086", "0.504677", "0.50454116", "0.5042322", "0.50283474", "0.5025372", "0.5024128", "0.50222725", "0.50222725", "0.50222725", "0.5012153", "0.49989855", "0.49982435", "0.49902758", "0.49852103", "0.49840605", "0.4983937", "0.49723914", "0.49699494", "0.49608892", "0.49593264", "0.49590734", "0.49590734", "0.4958833" ]
0.0
-1
String accept = request.getHeader("Accept");
public ResponseEntity<Void> deleteSkillDetails(@Min(1L)@ApiParam(value = "skill Id od the skills that needs to be deleted",required=true) @PathVariable("skillId") Long skillId) { Skill newSkill= skillService.findSkillById(skillId); if(newSkill==null) { throw new ResourceNotFoundException("Skill with id "+skillId+" is not found"); } else { // LOGGER.trace(" Trying to trace skills to delete details"); skillService.deleteSkillDetails(skillId); return new ResponseEntity<>(HttpStatus.ACCEPTED); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccept() {\n return accept;\n }", "public List<MediaType> getAccept()\r\n/* 87: */ {\r\n/* 88:148 */ String value = getFirst(\"Accept\");\r\n/* 89:149 */ return value != null ? MediaType.parseMediaTypes(value) : Collections.emptyList();\r\n/* 90: */ }", "public final String getAcceptContentType() {\n return properties.get(ACCEPT_CONTENT_TYPE_PROPERTY);\n }", "public final String getAcceptAttribute() {\n return getAttributeValue(\"accept\");\n }", "public int accept(HttpResponseProlog prolog, HttpHeaders headers);", "public static boolean useJsonResponse(HttpServletRequest request) {\n String acceptHeaderValue = request.getHeader(\"Accept\");\n if (acceptHeaderValue == null) {\n return false;\n }\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(HttpHeaders.ACCEPT, acceptHeaderValue);\n List<MediaType> acceptedMediaTypes = httpHeaders.getAccept();\n boolean acceptsHtml = acceptedMediaTypes.contains(MediaType.TEXT_HTML);\n boolean acceptsJson = acceptedMediaTypes.contains(MediaType.APPLICATION_JSON);\n if (acceptsJson && (!acceptsHtml)) {\n return true;\n } else {\n return false;\n }\n }", "public String getAcceptEncodingHeaderValue() {\n return acceptEncodingHeaderValue;\n }", "public String getIsAccept() {\r\n\t\treturn isAccept;\r\n\t}", "boolean supportsAccepts();", "public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }", "MimeType mediaType();", "String getRequest();", "public static Locale getHeaderFieldAcceptLanguage(Request request) {\n\t\tHttpServletRequest httpServletRequest = request.raw();\n\t\treturn httpServletRequest.getLocale();\n\t}", "public Response get(Cluster cluster, String path, String accept)\n throws IOException {\n Header[] headers = new Header[1];\n headers[0] = new Header(\"Accept\", accept);\n return get(cluster, path, headers);\n }", "String getHeader(HttpServletRequest request, String name) throws ValidationException;", "@Override\n public boolean accept(String link) {\n \n URL url;\n URLConnection connection;\n String type;\n boolean ret;\n\n ret = false;\n try {\n url = new URL (link);\n connection = url.openConnection ();\n type = connection.getContentType ();\n if (type == null)\n ret = false;\n else\n ret = type.startsWith (\"text/html\");\n }catch (IOException e) {\n// XLogger.getInstance().log(Level.WARNING, \"{0}. {1}\", this.getClass(), e, link);\n }\n \n return (ret);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t\tSystem.out.println(\":::::::::::::::doPost\");\n\t\t//한글 처리\n\t\treq.setCharacterEncoding(\"UTF-8\");\n\t\tresp.setContentType(\"text/html\");\n\t\tresp.setCharacterEncoding(\"UTF-8\");\n\t\t\n\t\t//화면 출력 \n\t\tPrintWriter out = resp.getWriter();\n\t\t\n\t\t//전송할때 개발자도구(F12) network > Request Header 정보에 있는 데이터가 뿌려진다\n\t\tEnumeration<String> en = req.getHeaderNames();\n\t\t\n\t\twhile(en.hasMoreElements()){ //다음 값이 있는지 (true,false) \n\t\t\tString key = en.nextElement(); //다음 값의 키를 가져온다.\n\t\t\tString value = req.getHeader(key);\n\t\t\tout.println(\"key : \"+ key + \"<br/> value : \" + value + \"<br/><br/>\");\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}", "@Override\n public boolean accepts(HttpResponse response) {\n Header[] headers = response.getHeaders(HttpHeaders.CONTENT_TYPE);\n for (Header header : headers) {\n if (header != null && header.getValue().contains(NTLMConstants.CONTENT_TYPE_FOR_SPNEGO)) {\n return true;\n }\n }\n return false;\n }", "public void setAccept(List<MediaType> acceptableMediaTypes)\r\n/* 82: */ {\r\n/* 83:139 */ set(\"Accept\", MediaType.toString(acceptableMediaTypes));\r\n/* 84: */ }", "public AcceptHeader getAcceptHeader(String headerName)\n\t{\n\t\tString lowerName = headerName.toLowerCase();\n\t\tAcceptHeader header = this.acceptHeaders.get(lowerName);\n\t\tif (header == null)\n\t\t{\n\t\t\tString headerValue = getHeaderValue(headerName);\n\t\t\tif (headerValue != null)\n\t\t\t{\n\t\t\t\theader = new AcceptHeader(headerName, headerValue);\n\t\t\t\tthis.acceptHeaders.put(lowerName, header);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn header;\n\t}", "public boolean isSupported(MediaType mediaType);", "String getResponseHeader();", "private void mimicSunRequestHeaders() {\n if (!isHeaderSet(method.getRequestHeader(\"Accept\"))) {\n setRequestProperty(\"Accept\", acceptHeader);\n }\n if (!isHeaderSet(method.getRequestHeader(\"Connection\"))) {\n setRequestProperty(\"Connection\", \"keep-alive\");\n }\n }", "Headers getHeaders();", "public static String getMediaType(Request request) {\n\t\tList<Preference<MediaType>> acceptedMediaTypes = request.getClientInfo().getAcceptedMediaTypes();\n\t\tfor (Preference<MediaType> preference : acceptedMediaTypes) {\n\t\t\tMediaType mediaType = preference.getMetadata();\n\t\t\tString mediaTypeName = mediaType.getName().trim();\n\t\t\tmediaTypeName=mediaTypeName.replaceAll(\"\\\\s\", \"\");\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_JSONVERBOSE.getName())){\n\t\t\t\treturn \".json\";\n\t\t\t}\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_ATOM.getName())){\n\t\t\t\treturn \".xml\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "RequestHeaders headers();", "private static String getHTTPHeader(PortletRequest request, String name) {\n String value = null;\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPHeader(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPHeader(request, name);\n }\n return value;\n }", "public boolean isAccept(){\n return isAccept; \n }", "public List<Charset> getAcceptCharset()\r\n/* 107: */ {\r\n/* 108:174 */ List<Charset> result = new ArrayList();\r\n/* 109:175 */ String value = getFirst(\"Accept-Charset\");\r\n/* 110:176 */ if (value != null)\r\n/* 111: */ {\r\n/* 112:177 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 113:178 */ for (String token : tokens)\r\n/* 114: */ {\r\n/* 115:179 */ int paramIdx = token.indexOf(';');\r\n/* 116: */ String charsetName;\r\n/* 117: */ String charsetName;\r\n/* 118:181 */ if (paramIdx == -1) {\r\n/* 119:182 */ charsetName = token;\r\n/* 120: */ } else {\r\n/* 121:185 */ charsetName = token.substring(0, paramIdx);\r\n/* 122: */ }\r\n/* 123:187 */ if (!charsetName.equals(\"*\")) {\r\n/* 124:188 */ result.add(Charset.forName(charsetName));\r\n/* 125: */ }\r\n/* 126: */ }\r\n/* 127: */ }\r\n/* 128:192 */ return result;\r\n/* 129: */ }", "public void setAccept(boolean accept) {\n this.accept = accept;\n }", "MediaType getMediaType();", "public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }", "String getRequest(String url);", "@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }", "@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}", "String getUserAgent();", "public void handleRequest(Request req) {\n\n }", "public Response get(String path, String accept) throws IOException {\n return get(cluster, path, accept);\n }", "protected abstract MediaType getSupportedMediaType();", "private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }", "public void setAcceptHeader(AcceptHeader header)\n\t{\n\t\tif (header == null)\n\t\t\treturn;\n\t\t\n\t\tString headerName = header.getName();\n\t\tString lowerName = headerName.toLowerCase();\n\t\t\n\t\tthis.acceptHeaders.put(lowerName, header);\n\t\tsetHeader(headerName, header.parseHeaderValue());\n\t}", "EReqOrCap getReq_cap();", "protected static HttpHeaders getJsonHeaders(){ \n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n headers.setContentType(MediaType.APPLICATION_JSON);\n return headers;\n }", "public final GetHTTP setAcceptContentType(final String acceptContentType) {\n properties.put(ACCEPT_CONTENT_TYPE_PROPERTY, acceptContentType);\n return this;\n }", "private void validatePreferHeader(ODataRequest request) throws ODataHandlerException {\n List<String> returnPreference = request.getHeaders(PREFER);\n if (null != returnPreference) {\n for (String preference : returnPreference) {\n if (preference.equals(RETURN_MINIMAL) || preference.equals(RETURN_REPRESENTATION)) {\n throw new ODataHandlerException(\"Prefer Header not supported: \" + preference,\n ODataHandlerException.MessageKeys.INVALID_PREFER_HEADER, preference);\n } \n }\n }\n }", "public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) {\n Enumeration enum = wc.getRequest().getParameterNames();\n \n // don't accept if we have request parameters\n if (enum.hasMoreElements())\n return false;\n \n // and then only accept if this is a get request\n return wc.getRequest().getMethod().equalsIgnoreCase(\"GET\");\n }", "@Override\n\tprotected ResponseEntity<Object> handleHttpMediaTypeNotAcceptable(\n\t\t\tHttpMediaTypeNotAcceptableException ex, HttpHeaders headers,\n\t\t\tHttpStatus status, WebRequest request) {\n\t\tMediaType mediaType= MediaType.parseMediaType(request.getHeader(\"accept\"));\n\t\tHttpMediaTypeNotSupportedException exa = new HttpMediaTypeNotSupportedException(mediaType, ex.getSupportedMediaTypes());\n\t\theaders.setAccept(ex.getSupportedMediaTypes());\n\t\tResponseError body= createResponseError(exa, HttpStatus.UNSUPPORTED_MEDIA_TYPE,HttpStatus.UNSUPPORTED_MEDIA_TYPE.toString(), \"ERROR_BUSINESS_EXCEPTION\");\n\t\treturn handleExceptionInternal(exa,body, headers, HttpStatus.UNSUPPORTED_MEDIA_TYPE, request);\n\t}", "@Nullable\n private static HttpEncodingType determineEncoding(String acceptEncoding) {\n float starQ = -1.0f;\n final Map<HttpEncodingType, Float> encodings = new LinkedHashMap<>();\n for (String encoding : acceptEncoding.split(\",\")) {\n float q = 1.0f;\n final int equalsPos = encoding.indexOf('=');\n if (equalsPos != -1) {\n try {\n q = Float.parseFloat(encoding.substring(equalsPos + 1));\n } catch (NumberFormatException e) {\n // Ignore encoding\n q = 0.0f;\n }\n }\n if (encoding.contains(\"*\")) {\n starQ = q;\n } else if (encoding.contains(\"br\") && Brotli.isAvailable()) {\n encodings.put(HttpEncodingType.BROTLI, q);\n } else if (encoding.contains(\"gzip\")) {\n encodings.put(HttpEncodingType.GZIP, q);\n } else if (encoding.contains(\"deflate\")) {\n encodings.put(HttpEncodingType.DEFLATE, q);\n }\n }\n\n if (!encodings.isEmpty()) {\n final Entry<HttpEncodingType, Float> entry = Collections.max(encodings.entrySet(),\n Entry.comparingByValue());\n if (entry.getValue() > 0.0f) {\n return entry.getKey();\n }\n }\n if (starQ > 0.0f) {\n if (!encodings.containsKey(HttpEncodingType.BROTLI) && Brotli.isAvailable()) {\n return HttpEncodingType.BROTLI;\n }\n if (!encodings.containsKey(HttpEncodingType.GZIP)) {\n return HttpEncodingType.GZIP;\n }\n if (!encodings.containsKey(HttpEncodingType.DEFLATE)) {\n return HttpEncodingType.DEFLATE;\n }\n }\n return null;\n }", "int getOneof2616();", "@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}", "@Bean\n\tpublic LocaleResolver localeResolver() {\n\t\tAcceptHeaderLocaleResolver locale = new AcceptHeaderLocaleResolver(); // as we are passing the locale in accept header\n\t\tlocale.setDefaultLocale(Locale.US);\n\t\treturn locale;\n\t}", "@Override\n\tpublic AuthorizationResponse decide(HttpServletRequest request) {\n\t\t\treturn this.decide(request, null);\n\t}", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "private ModelAndView handleScriptGetReq(HttpServletResponse response, final String agent_type)\n {\n \tif(agent_type.equals(CUSTOM_HTTP_HEADER_AGENT_TYPE_VALUE))\n\t{ \t\n\t response.setHeader(\"WWW-Authenticate\", \"Basic realm=\\\"ESGF\\\"\");\n\t response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n\t}\t \n\treturn null; /* Do not return a view. */\n }", "private String getRequestedTypeFace(HttpServletRequest req) {\n\tfinal String tf = getRequestParameter(req, QPARAM_NAME_TYPE_FACE);\n\tif (tf != null && !tf.isEmpty()) {\n\t return tf;\n\t}\n\treturn null;\n }", "private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }", "public static boolean isAjax(HttpServletRequest request) {\n String requestedWithHeader = request.getHeader(\"X-Requested-With\");\n return \"XMLHttpRequest\".equals(requestedWithHeader);\n}", "public String getUserAgent();", "public String getRequestCharSet() {\n return getContentCharSet(getRequestHeader(\"Content-Type\"));\n }", "@Override\n public void intercept(RequestInterceptor.RequestFacade request) {\n request.addHeader(\"Accept\", \"application/json\");\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream()));\n //read the client \n String XMLdata = br.readLine();\n boolean isSignatureVerified = parseXMLData(XMLdata);\n //set the client status based on the signature verification\n if (isSignatureVerified) {\n response.setStatus(200);\n } else {\n response.setStatus(401);\n }\n }", "@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }", "public String getRequestMethod(){\n return this.requestMethod;\n }", "private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}", "@Override\nprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n}", "@Override\n\tpublic boolean match(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\treturn (header != null)\n\t\t\t&& (Pattern.matches(\"^\\\\s*(OAuth|Bearer)(.*)$\", header));\n\t}", "java.lang.String getUserAgent();", "@Test // SPR-11443\n\tvoid handleInfoGetCorsFilter() {\n\t\tthis.servletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, \"foobar:123\");\n\n\t\thandleRequest(\"GET\", \"/echo/info\", HttpStatus.OK);\n\n\t\tassertThat(this.servletResponse.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)).isEqualTo(\"foobar:123\");\n\t}", "public String getContentType() {\n return getHeader(\"Content-Type\");\n }", "void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Test\n public void VerifyContentTypeWithAssertThat(){\n given().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/employees/100\")\n .then().assertThat().statusCode(200)\n .and().contentType(ContentType.JSON);\n }", "String getServletInfo();", "String decideResponseOriginHeader(List<String> allowed, String origin) {\n\t\tif (allowed == null || allowed.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tif (allowed.contains(\"*\")) {\n\t\t\treturn \"*\";\n\t\t}\n\t\tif (allowed.contains(origin)) {\n\t\t\treturn origin;\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "public void process(HttpRequest request, HttpContext context) {\n\t\t\t\tif (!request.containsHeader(HEADER_ACCEPT_ENCODING)) {\r\n\t\t\t\t\trequest.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP);\r\n\t\t\t\t}\r\n\t\t\t}", "static boolean Requested(HttpServletRequest request, String paramName)\n {\n \n String value = request.getParameter(paramName);\n Logging.debug(\"Got parameter \"+paramName+\"=\" + value);\n \n if (value != null) {\n if (yesMatcher.matcher(value).lookingAt()) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public static String detectCharset( HttpResponse response ) {\n\t\tif ( response != null && response.containsHeader( \"Content-Type\" ) ) {\n\t\t\tHeader[] headers = response.getHeaders( \"Content-Type\" );\n\t\t\tfor ( int i = 0 ; i < headers.length ; i++ ) {\n\t\t\t\tString headerinfo = headers[i].getValue();\n\t\t\t\tString charset = StringUtils.extractFirst( headerinfo, \"charset=([^;]+)\", 1 );\n\t\t\t\tif ( charset != null && charset.length() > 0 ) {\n\t\t\t\t\treturn charset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static String m21385a() {\n return System.getProperty(\"http.agent\");\n }", "public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {\n\t\tlogger.info(request.getRequestURI());\n\t //method\n\t\tlogger.info(request.getMethod());\n\t //ip\n\t\tlogger.info(request.getRemoteAddr());\n\t\tEnumeration enu=request.getParameterNames(); \n\t\twhile(enu.hasMoreElements()){ \n\t\t\tString paraName=(String)enu.nextElement(); \n\t\t\tlogger.info(paraName+\": \"+request.getParameter(paraName));\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public String getRequestProtocol(){\n return this.requestProtocol;\n }", "Map<String, String> getRequestHeaders();", "String getContentType();", "String getContentType();", "String getContentType();", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "boolean hasUserAgent();", "public abstract HttpHeaders headers();", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "public final int getHeaderID() {\n return ACCEPT_ENCODING;\n }", "void handleRequest();", "private String calculateAllowHeaders(Map<String, String> queryHeaders) {\n\t\t\treturn System.getProperty(ACCESS_CONTROL_ALLOW_HEADER_PROPERTY_NAME,\n\t\t\t\t\tDEFAULT_ALLOWED_HEADERS);\n\t\t}", "String getBrowser();", "public boolean isContentTypeSupported(String contentType)\n {\n if(contentType.equals(DEFAULT_MIME_TYPE))\n return true;\n else if(contentType.equals(\"text/html\"))\n return true;\n else\n return false;\n }", "public String getMediaType() {\r\n return mediaType;\r\n }", "private HttpHeaders getHeaders(String contentType) {\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.set(WebConstants.CONTENT_TYPE, WebConstants.TEXT_PLAIN_UTF8);\n return httpHeaders;\n }", "String getHttpMethod();", "String getHttpMethod();", "public URI getRequestURI();" ]
[ "0.6981159", "0.67891747", "0.6664245", "0.63275236", "0.62929153", "0.6221579", "0.61109495", "0.60769117", "0.6033655", "0.5975624", "0.59612006", "0.59376794", "0.5858096", "0.58441573", "0.57603", "0.57166827", "0.57071847", "0.5696793", "0.5687573", "0.5641366", "0.56368464", "0.5632734", "0.5628953", "0.56285787", "0.56010807", "0.5597088", "0.5574855", "0.5562156", "0.5548604", "0.5535198", "0.5528665", "0.5514056", "0.55071634", "0.54773396", "0.546498", "0.5450835", "0.5449949", "0.544309", "0.54374444", "0.5433028", "0.5387009", "0.5382736", "0.53823286", "0.53710127", "0.5346074", "0.53089476", "0.52836245", "0.5279807", "0.5278372", "0.52477866", "0.5243396", "0.52357185", "0.5233873", "0.52189916", "0.5211904", "0.5208926", "0.5204127", "0.51927876", "0.5181715", "0.5170927", "0.51666814", "0.5166081", "0.51646847", "0.51599044", "0.5145204", "0.51393414", "0.51290464", "0.5128278", "0.5114271", "0.51039577", "0.5102827", "0.5074611", "0.50727445", "0.50637335", "0.50592375", "0.5055502", "0.50518477", "0.5050086", "0.504677", "0.50454116", "0.5042322", "0.50283474", "0.5025372", "0.5024128", "0.50222725", "0.50222725", "0.50222725", "0.5012153", "0.49989855", "0.49982435", "0.49902758", "0.49852103", "0.49840605", "0.4983937", "0.49723914", "0.49699494", "0.49608892", "0.49593264", "0.49590734", "0.49590734", "0.4958833" ]
0.0
-1
String accept = request.getHeader("Accept");
public ResponseEntity<List<Employee>> getAllEmployees() { List<Employee> emplist=empService.getAllEmployees(); if(emplist==null) { throw new ResourceNotFoundException("No Employee Details found"); } return new ResponseEntity<>(emplist,HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccept() {\n return accept;\n }", "public List<MediaType> getAccept()\r\n/* 87: */ {\r\n/* 88:148 */ String value = getFirst(\"Accept\");\r\n/* 89:149 */ return value != null ? MediaType.parseMediaTypes(value) : Collections.emptyList();\r\n/* 90: */ }", "public final String getAcceptContentType() {\n return properties.get(ACCEPT_CONTENT_TYPE_PROPERTY);\n }", "public final String getAcceptAttribute() {\n return getAttributeValue(\"accept\");\n }", "public int accept(HttpResponseProlog prolog, HttpHeaders headers);", "public static boolean useJsonResponse(HttpServletRequest request) {\n String acceptHeaderValue = request.getHeader(\"Accept\");\n if (acceptHeaderValue == null) {\n return false;\n }\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(HttpHeaders.ACCEPT, acceptHeaderValue);\n List<MediaType> acceptedMediaTypes = httpHeaders.getAccept();\n boolean acceptsHtml = acceptedMediaTypes.contains(MediaType.TEXT_HTML);\n boolean acceptsJson = acceptedMediaTypes.contains(MediaType.APPLICATION_JSON);\n if (acceptsJson && (!acceptsHtml)) {\n return true;\n } else {\n return false;\n }\n }", "public String getAcceptEncodingHeaderValue() {\n return acceptEncodingHeaderValue;\n }", "public String getIsAccept() {\r\n\t\treturn isAccept;\r\n\t}", "boolean supportsAccepts();", "public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }", "MimeType mediaType();", "String getRequest();", "public static Locale getHeaderFieldAcceptLanguage(Request request) {\n\t\tHttpServletRequest httpServletRequest = request.raw();\n\t\treturn httpServletRequest.getLocale();\n\t}", "public Response get(Cluster cluster, String path, String accept)\n throws IOException {\n Header[] headers = new Header[1];\n headers[0] = new Header(\"Accept\", accept);\n return get(cluster, path, headers);\n }", "String getHeader(HttpServletRequest request, String name) throws ValidationException;", "@Override\n public boolean accept(String link) {\n \n URL url;\n URLConnection connection;\n String type;\n boolean ret;\n\n ret = false;\n try {\n url = new URL (link);\n connection = url.openConnection ();\n type = connection.getContentType ();\n if (type == null)\n ret = false;\n else\n ret = type.startsWith (\"text/html\");\n }catch (IOException e) {\n// XLogger.getInstance().log(Level.WARNING, \"{0}. {1}\", this.getClass(), e, link);\n }\n \n return (ret);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t\tSystem.out.println(\":::::::::::::::doPost\");\n\t\t//한글 처리\n\t\treq.setCharacterEncoding(\"UTF-8\");\n\t\tresp.setContentType(\"text/html\");\n\t\tresp.setCharacterEncoding(\"UTF-8\");\n\t\t\n\t\t//화면 출력 \n\t\tPrintWriter out = resp.getWriter();\n\t\t\n\t\t//전송할때 개발자도구(F12) network > Request Header 정보에 있는 데이터가 뿌려진다\n\t\tEnumeration<String> en = req.getHeaderNames();\n\t\t\n\t\twhile(en.hasMoreElements()){ //다음 값이 있는지 (true,false) \n\t\t\tString key = en.nextElement(); //다음 값의 키를 가져온다.\n\t\t\tString value = req.getHeader(key);\n\t\t\tout.println(\"key : \"+ key + \"<br/> value : \" + value + \"<br/><br/>\");\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}", "@Override\n public boolean accepts(HttpResponse response) {\n Header[] headers = response.getHeaders(HttpHeaders.CONTENT_TYPE);\n for (Header header : headers) {\n if (header != null && header.getValue().contains(NTLMConstants.CONTENT_TYPE_FOR_SPNEGO)) {\n return true;\n }\n }\n return false;\n }", "public void setAccept(List<MediaType> acceptableMediaTypes)\r\n/* 82: */ {\r\n/* 83:139 */ set(\"Accept\", MediaType.toString(acceptableMediaTypes));\r\n/* 84: */ }", "public AcceptHeader getAcceptHeader(String headerName)\n\t{\n\t\tString lowerName = headerName.toLowerCase();\n\t\tAcceptHeader header = this.acceptHeaders.get(lowerName);\n\t\tif (header == null)\n\t\t{\n\t\t\tString headerValue = getHeaderValue(headerName);\n\t\t\tif (headerValue != null)\n\t\t\t{\n\t\t\t\theader = new AcceptHeader(headerName, headerValue);\n\t\t\t\tthis.acceptHeaders.put(lowerName, header);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn header;\n\t}", "public boolean isSupported(MediaType mediaType);", "String getResponseHeader();", "private void mimicSunRequestHeaders() {\n if (!isHeaderSet(method.getRequestHeader(\"Accept\"))) {\n setRequestProperty(\"Accept\", acceptHeader);\n }\n if (!isHeaderSet(method.getRequestHeader(\"Connection\"))) {\n setRequestProperty(\"Connection\", \"keep-alive\");\n }\n }", "Headers getHeaders();", "public static String getMediaType(Request request) {\n\t\tList<Preference<MediaType>> acceptedMediaTypes = request.getClientInfo().getAcceptedMediaTypes();\n\t\tfor (Preference<MediaType> preference : acceptedMediaTypes) {\n\t\t\tMediaType mediaType = preference.getMetadata();\n\t\t\tString mediaTypeName = mediaType.getName().trim();\n\t\t\tmediaTypeName=mediaTypeName.replaceAll(\"\\\\s\", \"\");\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_JSONVERBOSE.getName())){\n\t\t\t\treturn \".json\";\n\t\t\t}\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_ATOM.getName())){\n\t\t\t\treturn \".xml\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "RequestHeaders headers();", "private static String getHTTPHeader(PortletRequest request, String name) {\n String value = null;\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPHeader(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPHeader(request, name);\n }\n return value;\n }", "public boolean isAccept(){\n return isAccept; \n }", "public List<Charset> getAcceptCharset()\r\n/* 107: */ {\r\n/* 108:174 */ List<Charset> result = new ArrayList();\r\n/* 109:175 */ String value = getFirst(\"Accept-Charset\");\r\n/* 110:176 */ if (value != null)\r\n/* 111: */ {\r\n/* 112:177 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 113:178 */ for (String token : tokens)\r\n/* 114: */ {\r\n/* 115:179 */ int paramIdx = token.indexOf(';');\r\n/* 116: */ String charsetName;\r\n/* 117: */ String charsetName;\r\n/* 118:181 */ if (paramIdx == -1) {\r\n/* 119:182 */ charsetName = token;\r\n/* 120: */ } else {\r\n/* 121:185 */ charsetName = token.substring(0, paramIdx);\r\n/* 122: */ }\r\n/* 123:187 */ if (!charsetName.equals(\"*\")) {\r\n/* 124:188 */ result.add(Charset.forName(charsetName));\r\n/* 125: */ }\r\n/* 126: */ }\r\n/* 127: */ }\r\n/* 128:192 */ return result;\r\n/* 129: */ }", "public void setAccept(boolean accept) {\n this.accept = accept;\n }", "MediaType getMediaType();", "public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }", "String getRequest(String url);", "@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }", "@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}", "String getUserAgent();", "public void handleRequest(Request req) {\n\n }", "public Response get(String path, String accept) throws IOException {\n return get(cluster, path, accept);\n }", "protected abstract MediaType getSupportedMediaType();", "private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }", "public void setAcceptHeader(AcceptHeader header)\n\t{\n\t\tif (header == null)\n\t\t\treturn;\n\t\t\n\t\tString headerName = header.getName();\n\t\tString lowerName = headerName.toLowerCase();\n\t\t\n\t\tthis.acceptHeaders.put(lowerName, header);\n\t\tsetHeader(headerName, header.parseHeaderValue());\n\t}", "EReqOrCap getReq_cap();", "protected static HttpHeaders getJsonHeaders(){ \n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n headers.setContentType(MediaType.APPLICATION_JSON);\n return headers;\n }", "public final GetHTTP setAcceptContentType(final String acceptContentType) {\n properties.put(ACCEPT_CONTENT_TYPE_PROPERTY, acceptContentType);\n return this;\n }", "private void validatePreferHeader(ODataRequest request) throws ODataHandlerException {\n List<String> returnPreference = request.getHeaders(PREFER);\n if (null != returnPreference) {\n for (String preference : returnPreference) {\n if (preference.equals(RETURN_MINIMAL) || preference.equals(RETURN_REPRESENTATION)) {\n throw new ODataHandlerException(\"Prefer Header not supported: \" + preference,\n ODataHandlerException.MessageKeys.INVALID_PREFER_HEADER, preference);\n } \n }\n }\n }", "public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) {\n Enumeration enum = wc.getRequest().getParameterNames();\n \n // don't accept if we have request parameters\n if (enum.hasMoreElements())\n return false;\n \n // and then only accept if this is a get request\n return wc.getRequest().getMethod().equalsIgnoreCase(\"GET\");\n }", "@Override\n\tprotected ResponseEntity<Object> handleHttpMediaTypeNotAcceptable(\n\t\t\tHttpMediaTypeNotAcceptableException ex, HttpHeaders headers,\n\t\t\tHttpStatus status, WebRequest request) {\n\t\tMediaType mediaType= MediaType.parseMediaType(request.getHeader(\"accept\"));\n\t\tHttpMediaTypeNotSupportedException exa = new HttpMediaTypeNotSupportedException(mediaType, ex.getSupportedMediaTypes());\n\t\theaders.setAccept(ex.getSupportedMediaTypes());\n\t\tResponseError body= createResponseError(exa, HttpStatus.UNSUPPORTED_MEDIA_TYPE,HttpStatus.UNSUPPORTED_MEDIA_TYPE.toString(), \"ERROR_BUSINESS_EXCEPTION\");\n\t\treturn handleExceptionInternal(exa,body, headers, HttpStatus.UNSUPPORTED_MEDIA_TYPE, request);\n\t}", "@Nullable\n private static HttpEncodingType determineEncoding(String acceptEncoding) {\n float starQ = -1.0f;\n final Map<HttpEncodingType, Float> encodings = new LinkedHashMap<>();\n for (String encoding : acceptEncoding.split(\",\")) {\n float q = 1.0f;\n final int equalsPos = encoding.indexOf('=');\n if (equalsPos != -1) {\n try {\n q = Float.parseFloat(encoding.substring(equalsPos + 1));\n } catch (NumberFormatException e) {\n // Ignore encoding\n q = 0.0f;\n }\n }\n if (encoding.contains(\"*\")) {\n starQ = q;\n } else if (encoding.contains(\"br\") && Brotli.isAvailable()) {\n encodings.put(HttpEncodingType.BROTLI, q);\n } else if (encoding.contains(\"gzip\")) {\n encodings.put(HttpEncodingType.GZIP, q);\n } else if (encoding.contains(\"deflate\")) {\n encodings.put(HttpEncodingType.DEFLATE, q);\n }\n }\n\n if (!encodings.isEmpty()) {\n final Entry<HttpEncodingType, Float> entry = Collections.max(encodings.entrySet(),\n Entry.comparingByValue());\n if (entry.getValue() > 0.0f) {\n return entry.getKey();\n }\n }\n if (starQ > 0.0f) {\n if (!encodings.containsKey(HttpEncodingType.BROTLI) && Brotli.isAvailable()) {\n return HttpEncodingType.BROTLI;\n }\n if (!encodings.containsKey(HttpEncodingType.GZIP)) {\n return HttpEncodingType.GZIP;\n }\n if (!encodings.containsKey(HttpEncodingType.DEFLATE)) {\n return HttpEncodingType.DEFLATE;\n }\n }\n return null;\n }", "int getOneof2616();", "@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}", "@Bean\n\tpublic LocaleResolver localeResolver() {\n\t\tAcceptHeaderLocaleResolver locale = new AcceptHeaderLocaleResolver(); // as we are passing the locale in accept header\n\t\tlocale.setDefaultLocale(Locale.US);\n\t\treturn locale;\n\t}", "@Override\n\tpublic AuthorizationResponse decide(HttpServletRequest request) {\n\t\t\treturn this.decide(request, null);\n\t}", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "private ModelAndView handleScriptGetReq(HttpServletResponse response, final String agent_type)\n {\n \tif(agent_type.equals(CUSTOM_HTTP_HEADER_AGENT_TYPE_VALUE))\n\t{ \t\n\t response.setHeader(\"WWW-Authenticate\", \"Basic realm=\\\"ESGF\\\"\");\n\t response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n\t}\t \n\treturn null; /* Do not return a view. */\n }", "private String getRequestedTypeFace(HttpServletRequest req) {\n\tfinal String tf = getRequestParameter(req, QPARAM_NAME_TYPE_FACE);\n\tif (tf != null && !tf.isEmpty()) {\n\t return tf;\n\t}\n\treturn null;\n }", "private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }", "public static boolean isAjax(HttpServletRequest request) {\n String requestedWithHeader = request.getHeader(\"X-Requested-With\");\n return \"XMLHttpRequest\".equals(requestedWithHeader);\n}", "public String getUserAgent();", "public String getRequestCharSet() {\n return getContentCharSet(getRequestHeader(\"Content-Type\"));\n }", "@Override\n public void intercept(RequestInterceptor.RequestFacade request) {\n request.addHeader(\"Accept\", \"application/json\");\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream()));\n //read the client \n String XMLdata = br.readLine();\n boolean isSignatureVerified = parseXMLData(XMLdata);\n //set the client status based on the signature verification\n if (isSignatureVerified) {\n response.setStatus(200);\n } else {\n response.setStatus(401);\n }\n }", "@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }", "public String getRequestMethod(){\n return this.requestMethod;\n }", "private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}", "@Override\nprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n}", "@Override\n\tpublic boolean match(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\treturn (header != null)\n\t\t\t&& (Pattern.matches(\"^\\\\s*(OAuth|Bearer)(.*)$\", header));\n\t}", "java.lang.String getUserAgent();", "@Test // SPR-11443\n\tvoid handleInfoGetCorsFilter() {\n\t\tthis.servletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, \"foobar:123\");\n\n\t\thandleRequest(\"GET\", \"/echo/info\", HttpStatus.OK);\n\n\t\tassertThat(this.servletResponse.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)).isEqualTo(\"foobar:123\");\n\t}", "public String getContentType() {\n return getHeader(\"Content-Type\");\n }", "void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Test\n public void VerifyContentTypeWithAssertThat(){\n given().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/employees/100\")\n .then().assertThat().statusCode(200)\n .and().contentType(ContentType.JSON);\n }", "String getServletInfo();", "String decideResponseOriginHeader(List<String> allowed, String origin) {\n\t\tif (allowed == null || allowed.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tif (allowed.contains(\"*\")) {\n\t\t\treturn \"*\";\n\t\t}\n\t\tif (allowed.contains(origin)) {\n\t\t\treturn origin;\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "public void process(HttpRequest request, HttpContext context) {\n\t\t\t\tif (!request.containsHeader(HEADER_ACCEPT_ENCODING)) {\r\n\t\t\t\t\trequest.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP);\r\n\t\t\t\t}\r\n\t\t\t}", "static boolean Requested(HttpServletRequest request, String paramName)\n {\n \n String value = request.getParameter(paramName);\n Logging.debug(\"Got parameter \"+paramName+\"=\" + value);\n \n if (value != null) {\n if (yesMatcher.matcher(value).lookingAt()) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public static String detectCharset( HttpResponse response ) {\n\t\tif ( response != null && response.containsHeader( \"Content-Type\" ) ) {\n\t\t\tHeader[] headers = response.getHeaders( \"Content-Type\" );\n\t\t\tfor ( int i = 0 ; i < headers.length ; i++ ) {\n\t\t\t\tString headerinfo = headers[i].getValue();\n\t\t\t\tString charset = StringUtils.extractFirst( headerinfo, \"charset=([^;]+)\", 1 );\n\t\t\t\tif ( charset != null && charset.length() > 0 ) {\n\t\t\t\t\treturn charset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static String m21385a() {\n return System.getProperty(\"http.agent\");\n }", "public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {\n\t\tlogger.info(request.getRequestURI());\n\t //method\n\t\tlogger.info(request.getMethod());\n\t //ip\n\t\tlogger.info(request.getRemoteAddr());\n\t\tEnumeration enu=request.getParameterNames(); \n\t\twhile(enu.hasMoreElements()){ \n\t\t\tString paraName=(String)enu.nextElement(); \n\t\t\tlogger.info(paraName+\": \"+request.getParameter(paraName));\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public String getRequestProtocol(){\n return this.requestProtocol;\n }", "Map<String, String> getRequestHeaders();", "String getContentType();", "String getContentType();", "String getContentType();", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "boolean hasUserAgent();", "public abstract HttpHeaders headers();", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "public final int getHeaderID() {\n return ACCEPT_ENCODING;\n }", "void handleRequest();", "private String calculateAllowHeaders(Map<String, String> queryHeaders) {\n\t\t\treturn System.getProperty(ACCESS_CONTROL_ALLOW_HEADER_PROPERTY_NAME,\n\t\t\t\t\tDEFAULT_ALLOWED_HEADERS);\n\t\t}", "String getBrowser();", "public boolean isContentTypeSupported(String contentType)\n {\n if(contentType.equals(DEFAULT_MIME_TYPE))\n return true;\n else if(contentType.equals(\"text/html\"))\n return true;\n else\n return false;\n }", "public String getMediaType() {\r\n return mediaType;\r\n }", "private HttpHeaders getHeaders(String contentType) {\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.set(WebConstants.CONTENT_TYPE, WebConstants.TEXT_PLAIN_UTF8);\n return httpHeaders;\n }", "String getHttpMethod();", "String getHttpMethod();", "public URI getRequestURI();" ]
[ "0.6981159", "0.67891747", "0.6664245", "0.63275236", "0.62929153", "0.6221579", "0.61109495", "0.60769117", "0.6033655", "0.5975624", "0.59612006", "0.59376794", "0.5858096", "0.58441573", "0.57603", "0.57166827", "0.57071847", "0.5696793", "0.5687573", "0.5641366", "0.56368464", "0.5632734", "0.5628953", "0.56285787", "0.56010807", "0.5597088", "0.5574855", "0.5562156", "0.5548604", "0.5535198", "0.5528665", "0.5514056", "0.55071634", "0.54773396", "0.546498", "0.5450835", "0.5449949", "0.544309", "0.54374444", "0.5433028", "0.5387009", "0.5382736", "0.53823286", "0.53710127", "0.5346074", "0.53089476", "0.52836245", "0.5279807", "0.5278372", "0.52477866", "0.5243396", "0.52357185", "0.5233873", "0.52189916", "0.5211904", "0.5208926", "0.5204127", "0.51927876", "0.5181715", "0.5170927", "0.51666814", "0.5166081", "0.51646847", "0.51599044", "0.5145204", "0.51393414", "0.51290464", "0.5128278", "0.5114271", "0.51039577", "0.5102827", "0.5074611", "0.50727445", "0.50637335", "0.50592375", "0.5055502", "0.50518477", "0.5050086", "0.504677", "0.50454116", "0.5042322", "0.50283474", "0.5025372", "0.5024128", "0.50222725", "0.50222725", "0.50222725", "0.5012153", "0.49989855", "0.49982435", "0.49902758", "0.49852103", "0.49840605", "0.4983937", "0.49723914", "0.49699494", "0.49608892", "0.49593264", "0.49590734", "0.49590734", "0.4958833" ]
0.0
-1
String accept = request.getHeader("Accept");
public ResponseEntity<List<Skill>> getAllSkills() { List<Skill> skillist=skillService.getAllSkills(); // LOGGER.debug(" Trying to Fetch list of Skills"); if(skillist==null) { // LOGGER.error(" No Skill Found"); throw new ResourceNotFoundException("No Skill Details found"); } // LOGGER.info("Successfully Retrieved"); return new ResponseEntity<>(skillist,HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAccept() {\n return accept;\n }", "public List<MediaType> getAccept()\r\n/* 87: */ {\r\n/* 88:148 */ String value = getFirst(\"Accept\");\r\n/* 89:149 */ return value != null ? MediaType.parseMediaTypes(value) : Collections.emptyList();\r\n/* 90: */ }", "public final String getAcceptContentType() {\n return properties.get(ACCEPT_CONTENT_TYPE_PROPERTY);\n }", "public final String getAcceptAttribute() {\n return getAttributeValue(\"accept\");\n }", "public int accept(HttpResponseProlog prolog, HttpHeaders headers);", "public static boolean useJsonResponse(HttpServletRequest request) {\n String acceptHeaderValue = request.getHeader(\"Accept\");\n if (acceptHeaderValue == null) {\n return false;\n }\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.add(HttpHeaders.ACCEPT, acceptHeaderValue);\n List<MediaType> acceptedMediaTypes = httpHeaders.getAccept();\n boolean acceptsHtml = acceptedMediaTypes.contains(MediaType.TEXT_HTML);\n boolean acceptsJson = acceptedMediaTypes.contains(MediaType.APPLICATION_JSON);\n if (acceptsJson && (!acceptsHtml)) {\n return true;\n } else {\n return false;\n }\n }", "public String getAcceptEncodingHeaderValue() {\n return acceptEncodingHeaderValue;\n }", "public String getIsAccept() {\r\n\t\treturn isAccept;\r\n\t}", "boolean supportsAccepts();", "public static String getCompression(HttpServletRequest req) {\n String encoding = req.getHeader(HttpHeaders.ACCEPT_ENCODING);\n if (null != encoding) {\n if (BaseFileServlet.GZIP_PATTERN.matcher(encoding).find()) {\n return \"gzip\";\n //} else if (BR_PATTERN.matcher(encoding).find()) {\n // return \"br\";\n }\n }\n return \"none\";\n }", "MimeType mediaType();", "String getRequest();", "public static Locale getHeaderFieldAcceptLanguage(Request request) {\n\t\tHttpServletRequest httpServletRequest = request.raw();\n\t\treturn httpServletRequest.getLocale();\n\t}", "public Response get(Cluster cluster, String path, String accept)\n throws IOException {\n Header[] headers = new Header[1];\n headers[0] = new Header(\"Accept\", accept);\n return get(cluster, path, headers);\n }", "String getHeader(HttpServletRequest request, String name) throws ValidationException;", "@Override\n public boolean accept(String link) {\n \n URL url;\n URLConnection connection;\n String type;\n boolean ret;\n\n ret = false;\n try {\n url = new URL (link);\n connection = url.openConnection ();\n type = connection.getContentType ();\n if (type == null)\n ret = false;\n else\n ret = type.startsWith (\"text/html\");\n }catch (IOException e) {\n// XLogger.getInstance().log(Level.WARNING, \"{0}. {1}\", this.getClass(), e, link);\n }\n \n return (ret);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t\tSystem.out.println(\":::::::::::::::doPost\");\n\t\t//한글 처리\n\t\treq.setCharacterEncoding(\"UTF-8\");\n\t\tresp.setContentType(\"text/html\");\n\t\tresp.setCharacterEncoding(\"UTF-8\");\n\t\t\n\t\t//화면 출력 \n\t\tPrintWriter out = resp.getWriter();\n\t\t\n\t\t//전송할때 개발자도구(F12) network > Request Header 정보에 있는 데이터가 뿌려진다\n\t\tEnumeration<String> en = req.getHeaderNames();\n\t\t\n\t\twhile(en.hasMoreElements()){ //다음 값이 있는지 (true,false) \n\t\t\tString key = en.nextElement(); //다음 값의 키를 가져온다.\n\t\t\tString value = req.getHeader(key);\n\t\t\tout.println(\"key : \"+ key + \"<br/> value : \" + value + \"<br/><br/>\");\n\t\t\t\n\t\t}\n\t\n\t\t\n\t\t\n\t\tout.flush();\n\t\tout.close();\n\t}", "@Override\n public boolean accepts(HttpResponse response) {\n Header[] headers = response.getHeaders(HttpHeaders.CONTENT_TYPE);\n for (Header header : headers) {\n if (header != null && header.getValue().contains(NTLMConstants.CONTENT_TYPE_FOR_SPNEGO)) {\n return true;\n }\n }\n return false;\n }", "public void setAccept(List<MediaType> acceptableMediaTypes)\r\n/* 82: */ {\r\n/* 83:139 */ set(\"Accept\", MediaType.toString(acceptableMediaTypes));\r\n/* 84: */ }", "public AcceptHeader getAcceptHeader(String headerName)\n\t{\n\t\tString lowerName = headerName.toLowerCase();\n\t\tAcceptHeader header = this.acceptHeaders.get(lowerName);\n\t\tif (header == null)\n\t\t{\n\t\t\tString headerValue = getHeaderValue(headerName);\n\t\t\tif (headerValue != null)\n\t\t\t{\n\t\t\t\theader = new AcceptHeader(headerName, headerValue);\n\t\t\t\tthis.acceptHeaders.put(lowerName, header);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn header;\n\t}", "public boolean isSupported(MediaType mediaType);", "String getResponseHeader();", "private void mimicSunRequestHeaders() {\n if (!isHeaderSet(method.getRequestHeader(\"Accept\"))) {\n setRequestProperty(\"Accept\", acceptHeader);\n }\n if (!isHeaderSet(method.getRequestHeader(\"Connection\"))) {\n setRequestProperty(\"Connection\", \"keep-alive\");\n }\n }", "Headers getHeaders();", "public static String getMediaType(Request request) {\n\t\tList<Preference<MediaType>> acceptedMediaTypes = request.getClientInfo().getAcceptedMediaTypes();\n\t\tfor (Preference<MediaType> preference : acceptedMediaTypes) {\n\t\t\tMediaType mediaType = preference.getMetadata();\n\t\t\tString mediaTypeName = mediaType.getName().trim();\n\t\t\tmediaTypeName=mediaTypeName.replaceAll(\"\\\\s\", \"\");\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_JSONVERBOSE.getName())){\n\t\t\t\treturn \".json\";\n\t\t\t}\n\t\t\tif(mediaTypeName.equalsIgnoreCase(MediaType.APPLICATION_ATOM.getName())){\n\t\t\t\treturn \".xml\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "RequestHeaders headers();", "private static String getHTTPHeader(PortletRequest request, String name) {\n String value = null;\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPHeader(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPHeader(request, name);\n }\n return value;\n }", "public boolean isAccept(){\n return isAccept; \n }", "public List<Charset> getAcceptCharset()\r\n/* 107: */ {\r\n/* 108:174 */ List<Charset> result = new ArrayList();\r\n/* 109:175 */ String value = getFirst(\"Accept-Charset\");\r\n/* 110:176 */ if (value != null)\r\n/* 111: */ {\r\n/* 112:177 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 113:178 */ for (String token : tokens)\r\n/* 114: */ {\r\n/* 115:179 */ int paramIdx = token.indexOf(';');\r\n/* 116: */ String charsetName;\r\n/* 117: */ String charsetName;\r\n/* 118:181 */ if (paramIdx == -1) {\r\n/* 119:182 */ charsetName = token;\r\n/* 120: */ } else {\r\n/* 121:185 */ charsetName = token.substring(0, paramIdx);\r\n/* 122: */ }\r\n/* 123:187 */ if (!charsetName.equals(\"*\")) {\r\n/* 124:188 */ result.add(Charset.forName(charsetName));\r\n/* 125: */ }\r\n/* 126: */ }\r\n/* 127: */ }\r\n/* 128:192 */ return result;\r\n/* 129: */ }", "public void setAccept(boolean accept) {\n this.accept = accept;\n }", "MediaType getMediaType();", "public MediaType getContentType()\r\n/* 193: */ {\r\n/* 194:289 */ String value = getFirst(\"Content-Type\");\r\n/* 195:290 */ return value != null ? MediaType.parseMediaType(value) : null;\r\n/* 196: */ }", "String getRequest(String url);", "@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }", "@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}", "String getUserAgent();", "public void handleRequest(Request req) {\n\n }", "public Response get(String path, String accept) throws IOException {\n return get(cluster, path, accept);\n }", "protected abstract MediaType getSupportedMediaType();", "private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }", "public void setAcceptHeader(AcceptHeader header)\n\t{\n\t\tif (header == null)\n\t\t\treturn;\n\t\t\n\t\tString headerName = header.getName();\n\t\tString lowerName = headerName.toLowerCase();\n\t\t\n\t\tthis.acceptHeaders.put(lowerName, header);\n\t\tsetHeader(headerName, header.parseHeaderValue());\n\t}", "EReqOrCap getReq_cap();", "protected static HttpHeaders getJsonHeaders(){ \n HttpHeaders headers = new HttpHeaders();\n headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n headers.setContentType(MediaType.APPLICATION_JSON);\n return headers;\n }", "public final GetHTTP setAcceptContentType(final String acceptContentType) {\n properties.put(ACCEPT_CONTENT_TYPE_PROPERTY, acceptContentType);\n return this;\n }", "private void validatePreferHeader(ODataRequest request) throws ODataHandlerException {\n List<String> returnPreference = request.getHeaders(PREFER);\n if (null != returnPreference) {\n for (String preference : returnPreference) {\n if (preference.equals(RETURN_MINIMAL) || preference.equals(RETURN_REPRESENTATION)) {\n throw new ODataHandlerException(\"Prefer Header not supported: \" + preference,\n ODataHandlerException.MessageKeys.INVALID_PREFER_HEADER, preference);\n } \n }\n }\n }", "public boolean accept(WikiSystem wiki, WebContext wc, WikiUser user) {\n Enumeration enum = wc.getRequest().getParameterNames();\n \n // don't accept if we have request parameters\n if (enum.hasMoreElements())\n return false;\n \n // and then only accept if this is a get request\n return wc.getRequest().getMethod().equalsIgnoreCase(\"GET\");\n }", "@Override\n\tprotected ResponseEntity<Object> handleHttpMediaTypeNotAcceptable(\n\t\t\tHttpMediaTypeNotAcceptableException ex, HttpHeaders headers,\n\t\t\tHttpStatus status, WebRequest request) {\n\t\tMediaType mediaType= MediaType.parseMediaType(request.getHeader(\"accept\"));\n\t\tHttpMediaTypeNotSupportedException exa = new HttpMediaTypeNotSupportedException(mediaType, ex.getSupportedMediaTypes());\n\t\theaders.setAccept(ex.getSupportedMediaTypes());\n\t\tResponseError body= createResponseError(exa, HttpStatus.UNSUPPORTED_MEDIA_TYPE,HttpStatus.UNSUPPORTED_MEDIA_TYPE.toString(), \"ERROR_BUSINESS_EXCEPTION\");\n\t\treturn handleExceptionInternal(exa,body, headers, HttpStatus.UNSUPPORTED_MEDIA_TYPE, request);\n\t}", "@Nullable\n private static HttpEncodingType determineEncoding(String acceptEncoding) {\n float starQ = -1.0f;\n final Map<HttpEncodingType, Float> encodings = new LinkedHashMap<>();\n for (String encoding : acceptEncoding.split(\",\")) {\n float q = 1.0f;\n final int equalsPos = encoding.indexOf('=');\n if (equalsPos != -1) {\n try {\n q = Float.parseFloat(encoding.substring(equalsPos + 1));\n } catch (NumberFormatException e) {\n // Ignore encoding\n q = 0.0f;\n }\n }\n if (encoding.contains(\"*\")) {\n starQ = q;\n } else if (encoding.contains(\"br\") && Brotli.isAvailable()) {\n encodings.put(HttpEncodingType.BROTLI, q);\n } else if (encoding.contains(\"gzip\")) {\n encodings.put(HttpEncodingType.GZIP, q);\n } else if (encoding.contains(\"deflate\")) {\n encodings.put(HttpEncodingType.DEFLATE, q);\n }\n }\n\n if (!encodings.isEmpty()) {\n final Entry<HttpEncodingType, Float> entry = Collections.max(encodings.entrySet(),\n Entry.comparingByValue());\n if (entry.getValue() > 0.0f) {\n return entry.getKey();\n }\n }\n if (starQ > 0.0f) {\n if (!encodings.containsKey(HttpEncodingType.BROTLI) && Brotli.isAvailable()) {\n return HttpEncodingType.BROTLI;\n }\n if (!encodings.containsKey(HttpEncodingType.GZIP)) {\n return HttpEncodingType.GZIP;\n }\n if (!encodings.containsKey(HttpEncodingType.DEFLATE)) {\n return HttpEncodingType.DEFLATE;\n }\n }\n return null;\n }", "int getOneof2616();", "@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}", "default boolean visitHeader() {\n\t\treturn true;\n\t}", "private HttpHeaders getHeaders() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));\n\t\treturn headers;\n\t}", "@Bean\n\tpublic LocaleResolver localeResolver() {\n\t\tAcceptHeaderLocaleResolver locale = new AcceptHeaderLocaleResolver(); // as we are passing the locale in accept header\n\t\tlocale.setDefaultLocale(Locale.US);\n\t\treturn locale;\n\t}", "@Override\n\tpublic AuthorizationResponse decide(HttpServletRequest request) {\n\t\t\treturn this.decide(request, null);\n\t}", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "private ModelAndView handleScriptGetReq(HttpServletResponse response, final String agent_type)\n {\n \tif(agent_type.equals(CUSTOM_HTTP_HEADER_AGENT_TYPE_VALUE))\n\t{ \t\n\t response.setHeader(\"WWW-Authenticate\", \"Basic realm=\\\"ESGF\\\"\");\n\t response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);\n\t}\t \n\treturn null; /* Do not return a view. */\n }", "private String getRequestedTypeFace(HttpServletRequest req) {\n\tfinal String tf = getRequestParameter(req, QPARAM_NAME_TYPE_FACE);\n\tif (tf != null && !tf.isEmpty()) {\n\t return tf;\n\t}\n\treturn null;\n }", "private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }", "public static boolean isAjax(HttpServletRequest request) {\n String requestedWithHeader = request.getHeader(\"X-Requested-With\");\n return \"XMLHttpRequest\".equals(requestedWithHeader);\n}", "public String getUserAgent();", "public String getRequestCharSet() {\n return getContentCharSet(getRequestHeader(\"Content-Type\"));\n }", "@Override\n public void intercept(RequestInterceptor.RequestFacade request) {\n request.addHeader(\"Accept\", \"application/json\");\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(request.getInputStream()));\n //read the client \n String XMLdata = br.readLine();\n boolean isSignatureVerified = parseXMLData(XMLdata);\n //set the client status based on the signature verification\n if (isSignatureVerified) {\n response.setStatus(200);\n } else {\n response.setStatus(401);\n }\n }", "@Override\n protected com.squareup.okhttp.Request.Builder universal_header(com.squareup.okhttp.Request.Builder chain) {\n chain.addHeader(\"Accept\", \"*/*\");\n chain.addHeader(\"Accept-Language\", \"zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,zh-CN;q=0.2\");\n chain.addHeader(\"Content-Type\", \"text/html; charset=utf-8\");\n chain.addHeader(\"User-Agent\", \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36\");\n return super.universal_header(chain);\n }", "public String getRequestMethod(){\n return this.requestMethod;\n }", "private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}", "@Override\nprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n}", "@Override\n\tpublic boolean match(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\treturn (header != null)\n\t\t\t&& (Pattern.matches(\"^\\\\s*(OAuth|Bearer)(.*)$\", header));\n\t}", "java.lang.String getUserAgent();", "@Test // SPR-11443\n\tvoid handleInfoGetCorsFilter() {\n\t\tthis.servletResponse.setHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, \"foobar:123\");\n\n\t\thandleRequest(\"GET\", \"/echo/info\", HttpStatus.OK);\n\n\t\tassertThat(this.servletResponse.getHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)).isEqualTo(\"foobar:123\");\n\t}", "public String getContentType() {\n return getHeader(\"Content-Type\");\n }", "void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "@Test\n public void VerifyContentTypeWithAssertThat(){\n given().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/employees/100\")\n .then().assertThat().statusCode(200)\n .and().contentType(ContentType.JSON);\n }", "String getServletInfo();", "String decideResponseOriginHeader(List<String> allowed, String origin) {\n\t\tif (allowed == null || allowed.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tif (allowed.contains(\"*\")) {\n\t\t\treturn \"*\";\n\t\t}\n\t\tif (allowed.contains(origin)) {\n\t\t\treturn origin;\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "public void process(HttpRequest request, HttpContext context) {\n\t\t\t\tif (!request.containsHeader(HEADER_ACCEPT_ENCODING)) {\r\n\t\t\t\t\trequest.addHeader(HEADER_ACCEPT_ENCODING, ENCODING_GZIP);\r\n\t\t\t\t}\r\n\t\t\t}", "static boolean Requested(HttpServletRequest request, String paramName)\n {\n \n String value = request.getParameter(paramName);\n Logging.debug(\"Got parameter \"+paramName+\"=\" + value);\n \n if (value != null) {\n if (yesMatcher.matcher(value).lookingAt()) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public static String detectCharset( HttpResponse response ) {\n\t\tif ( response != null && response.containsHeader( \"Content-Type\" ) ) {\n\t\t\tHeader[] headers = response.getHeaders( \"Content-Type\" );\n\t\t\tfor ( int i = 0 ; i < headers.length ; i++ ) {\n\t\t\t\tString headerinfo = headers[i].getValue();\n\t\t\t\tString charset = StringUtils.extractFirst( headerinfo, \"charset=([^;]+)\", 1 );\n\t\t\t\tif ( charset != null && charset.length() > 0 ) {\n\t\t\t\t\treturn charset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static String m21385a() {\n return System.getProperty(\"http.agent\");\n }", "public interface HttpRequest {\n // MIME types\n public static final String JNLP_MIME_TYPE = \"application/x-java-jnlp-file\";\n public static final String ERROR_MIME_TYPE = \"application/x-java-jnlp-error\";\n public static final String JAR_MIME_TYPE = \"application/x-java-archive\";\n public static final String JARDIFF_MIME_TYPE = \"application/x-java-archive-diff\";\n public static final String GIF_MIME_TYPE = \"image/gif\";\n public static final String JPEG_MIME_TYPE = \"image/jpeg\";\n \n // Low-level interface\n HttpResponse doHeadRequest(URL url) throws IOException;\n HttpResponse doGetRequest (URL url) throws IOException;\n \n HttpResponse doHeadRequest(URL url, String[] headerKeys, String[] headerValues) throws IOException;\n HttpResponse doGetRequest (URL url, String[] headerKeys, String[] headerValues) throws IOException;\n}", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object object) throws Exception {\n\t\tlogger.info(request.getRequestURI());\n\t //method\n\t\tlogger.info(request.getMethod());\n\t //ip\n\t\tlogger.info(request.getRemoteAddr());\n\t\tEnumeration enu=request.getParameterNames(); \n\t\twhile(enu.hasMoreElements()){ \n\t\t\tString paraName=(String)enu.nextElement(); \n\t\t\tlogger.info(paraName+\": \"+request.getParameter(paraName));\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public String getRequestProtocol(){\n return this.requestProtocol;\n }", "Map<String, String> getRequestHeaders();", "String getContentType();", "String getContentType();", "String getContentType();", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "boolean hasUserAgent();", "public abstract HttpHeaders headers();", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "public final int getHeaderID() {\n return ACCEPT_ENCODING;\n }", "void handleRequest();", "private String calculateAllowHeaders(Map<String, String> queryHeaders) {\n\t\t\treturn System.getProperty(ACCESS_CONTROL_ALLOW_HEADER_PROPERTY_NAME,\n\t\t\t\t\tDEFAULT_ALLOWED_HEADERS);\n\t\t}", "String getBrowser();", "public boolean isContentTypeSupported(String contentType)\n {\n if(contentType.equals(DEFAULT_MIME_TYPE))\n return true;\n else if(contentType.equals(\"text/html\"))\n return true;\n else\n return false;\n }", "public String getMediaType() {\r\n return mediaType;\r\n }", "private HttpHeaders getHeaders(String contentType) {\n HttpHeaders httpHeaders = new HttpHeaders();\n httpHeaders.set(WebConstants.CONTENT_TYPE, WebConstants.TEXT_PLAIN_UTF8);\n return httpHeaders;\n }", "String getHttpMethod();", "String getHttpMethod();", "public URI getRequestURI();" ]
[ "0.6981159", "0.67891747", "0.6664245", "0.63275236", "0.62929153", "0.6221579", "0.61109495", "0.60769117", "0.6033655", "0.5975624", "0.59612006", "0.59376794", "0.5858096", "0.58441573", "0.57603", "0.57166827", "0.57071847", "0.5696793", "0.5687573", "0.5641366", "0.56368464", "0.5632734", "0.5628953", "0.56285787", "0.56010807", "0.5597088", "0.5574855", "0.5562156", "0.5548604", "0.5535198", "0.5528665", "0.5514056", "0.55071634", "0.54773396", "0.546498", "0.5450835", "0.5449949", "0.544309", "0.54374444", "0.5433028", "0.5387009", "0.5382736", "0.53823286", "0.53710127", "0.5346074", "0.53089476", "0.52836245", "0.5279807", "0.5278372", "0.52477866", "0.5243396", "0.52357185", "0.5233873", "0.52189916", "0.5211904", "0.5208926", "0.5204127", "0.51927876", "0.5181715", "0.5170927", "0.51666814", "0.5166081", "0.51646847", "0.51599044", "0.5145204", "0.51393414", "0.51290464", "0.5128278", "0.5114271", "0.51039577", "0.5102827", "0.5074611", "0.50727445", "0.50637335", "0.50592375", "0.5055502", "0.50518477", "0.5050086", "0.504677", "0.50454116", "0.5042322", "0.50283474", "0.5025372", "0.5024128", "0.50222725", "0.50222725", "0.50222725", "0.5012153", "0.49989855", "0.49982435", "0.49902758", "0.49852103", "0.49840605", "0.4983937", "0.49723914", "0.49699494", "0.49608892", "0.49593264", "0.49590734", "0.49590734", "0.4958833" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<Book> findAll() { return dao.findAll(); }
{ "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
Returns a String object representing this type's value.
public String toString() { switch (getOrdinal()) { case _FIRST_INDEX: return "FIRST"; case _SECOND_INDEX: return "SECOND"; case _THIRD_INDEX: return "THIRD"; case _FOURTH_INDEX: return "FOURTH"; default: throw new RuntimeException("Unknown ordinal!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public StringType asString() {\n return TypeFactory.getStringType(this.getValue());\n }", "public String toStr() {\r\n return value.toString();\r\n }", "@Override\n public String toString() {\n return value + symbol(this.type);\n }", "public String getValue() {\n return String.valueOf(value);\n }", "@java.lang.Override\n public java.lang.String getStringValue() {\n java.lang.Object ref = \"\";\n if (typeCase_ == 5) {\n ref = type_;\n }\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 (typeCase_ == 5) {\n type_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"%s:%s\", type, value);\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getStringValueBytes() {\n java.lang.Object ref = \"\";\n if (typeCase_ == 5) {\n ref = type_;\n }\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n if (typeCase_ == 5) {\n type_ = b;\n }\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getStringValue() {\n java.lang.Object ref = \"\";\n if (typeCase_ == 5) {\n ref = type_;\n }\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 (typeCase_ == 5) {\n type_ = s;\n }\n return s;\n }\n }", "public String toString() {\n return value;\n }", "@Override\n\tpublic String getString() {\n\t\treturn value;\n\t}", "public String toString() {\n return value;\r\n }", "public java.lang.String getValue() {\n return value;\n }", "@Override\n public String getValue() {\n return this.value.toString();\n }", "@Override\n public String toString() {\n return String.valueOf(value());\n }", "String getValue()\n {\n return value.toString();\n }", "@Override\n public final String toString() {\n return this.value;\n }", "public java.lang.String getValue() {\n java.lang.Object ref = value_;\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 value_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getValue() {\n java.lang.Object ref = value_;\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 value_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getValue() {\n java.lang.Object ref = value_;\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 value_ = s;\n }\n return s;\n }\n }", "public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n value_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n value_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getValueAsString();", "@Override\r\n\tpublic String toString() {\n\t\treturn value + \"\";\r\n\t}", "public String getString() { \n return new BigInteger(this.value).toString();\n }", "public String getStringValue() {\n return box.getFormat().format(box, box.getValue());\n }", "public java.lang.String getValue() {\n java.lang.Object ref = value_;\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 value_ = s;\n return s;\n }\n }", "public String getValue() {\n Object ref = value_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n value_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public java.lang.String getValue() {\n java.lang.Object ref = value_;\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 value_ = s;\n return s;\n }\n }", "public String getAsString() {\n\t\treturn new String(this.getAsBytes());\n\t}", "public java.lang.String getValue() {\n java.lang.Object ref = value_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n value_ = s;\n return s;\n }\n }", "public String value() {\n return value;\n }", "public String getValueAsString() {\n return value == null ? StringUtils.EMPTY : value.toString();\n }", "@Override\n\tpublic String toString() {\n\t\treturn value;\n\t}", "public String getVal() {\n Object ref = val_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n val_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public String toString() {\n return type.toString();\n }", "public String getValue() {\n Object ref = value_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n value_ = s;\n return s;\n }\n }", "public abstract String valueAsText();", "public String getVal() {\n Object ref = val_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n val_ = s;\n }\n return s;\n }\n }", "String value();", "String value();", "public String toString(){\n\t\treturn getValue();\n\t}", "public String toString() {\n\t\treturn (getValue().toString());\r\n\t}", "public com.google.protobuf.ByteString\n getStringValueBytes() {\n java.lang.Object ref = \"\";\n if (typeCase_ == 5) {\n ref = type_;\n }\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 if (typeCase_ == 5) {\n type_ = b;\n }\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public final String getPrimitiveStringValue() {\r\n return (String) (value = value.toString());\r\n }", "@Override\n public String toString() {\n return \"\" + this.value;\n }", "public String getTypeString() {\r\n return Prediction.getTypeString(type);\r\n }", "public String value()\n {\n return value;\n }", "@Override\n public String asText() {\n return value;\n }", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "@Override\n public String toString(){\n return String.valueOf(value);\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "@Override\n\t\t\tpublic String getValue() {\n\t\t\t\treturn value;\n\t\t\t}", "public String toJava() {\n return String.valueOf(getValue());\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue()\n {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\r\n return value;\r\n }", "public String value() {\n return this.value;\n }", "public String value() {\n return this.value;\n }", "public String getValue() {\r\n\t\treturn value;\r\n\t}", "public String getValue() { return value; }", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String toString() {\n\t String outPut = \"byteValue(): \" + byteValue()\n\t \t\t+ \"\\nshortValue(): \" + shortValue()\n\t \t\t+ \"\\nintValue(): \" + intValue()\n\t \t\t+ \"\\nlongValue(): \" + longValue()\n\t \t\t+ \"\\nfloatValue(): \" + floatValue()\n\t \t\t+ \"\\ndoubleValue(): \" + doubleValue();\n\t \n\t return outPut;\n }", "public String getValue()\n {\n return value;\n }", "public String toString() {\n return type;\n }", "@Override\r\n\tpublic String getValue() {\n\t\treturn value;\r\n\t}", "public String shortRepr() {\n\t\treturn \"Value of some kind.\";\n\t}", "public String getValue () { return value; }", "@Override\n\tpublic String toString() {\n\t\treturn rawValue;\n\t}", "public String getStringValue()\n {\n return this.getValue();\n }", "@Override\n public String toString(){\n return this.getValue();\n }", "public String getValue()\n {\n return value;\n }" ]
[ "0.80491114", "0.7951873", "0.78560585", "0.77466995", "0.7726427", "0.7683589", "0.7605727", "0.7586579", "0.7549321", "0.75161207", "0.75145835", "0.75142574", "0.7493942", "0.7491756", "0.7448442", "0.7433172", "0.74261934", "0.7416481", "0.7415841", "0.7391932", "0.73905087", "0.7387499", "0.73717403", "0.7353975", "0.73536915", "0.735135", "0.73462754", "0.734413", "0.73357195", "0.7334909", "0.7331384", "0.72988063", "0.7298549", "0.7296371", "0.7289987", "0.72736776", "0.72619677", "0.725449", "0.72458667", "0.72458667", "0.72353894", "0.72291344", "0.72179574", "0.72113407", "0.7206416", "0.7198299", "0.7190313", "0.718238", "0.718192", "0.718192", "0.718192", "0.718192", "0.718192", "0.718192", "0.7163411", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71473736", "0.71390533", "0.71335024", "0.7133058", "0.7133058", "0.7133058", "0.7133058", "0.7133058", "0.71320933", "0.7123439", "0.71171623", "0.71090347", "0.71090347", "0.7100313", "0.70923406", "0.7085583", "0.7085583", "0.7085583", "0.7085583", "0.7085583", "0.7077661", "0.7071834", "0.70583785", "0.7057806", "0.70549935", "0.70522565", "0.7045437", "0.70437145", "0.7042846", "0.7042746" ]
0.0
-1
Returns the enumeration element represented by the supplied string, or null if not matched.
public static BasicEnum fromString(String s) { for (int i = 0; i < _ENUMERATION_NAMES.length; i++) { if (_ENUMERATION_NAMES[i].equals(s)) { return _ENUMERATIONS[i]; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static RecordStatusEnum get(String string) {\n if (string == null) {\n return null;\n }\n try {\n Integer id = Integer.valueOf(string);\n RecordStatusEnum enumeration = getById(id);\n if (enumeration != null) {\n return enumeration;\n }\n }\n catch (Exception e) {\n // ignore\n }\n return getByLabel(string);\n }", "public static DataStructure getEnum(String s) {\n for (DataStructure e : DataStructure.values())\n if (e.getString().equals(s))\n return e;\n return NONE;\n }", "public static EnumCardNumber fromString(String s) {\r\n\t\ttry {\r\n\t\t\tInteger index = Integer.parseInt(s);\r\n\t\t\treturn getNumbers().get(index - 1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tswitch (s.toLowerCase()) {\r\n\t\t\tcase \"one\":\r\n\t\t\t\treturn ONE;\r\n\t\t\tcase \"two\":\r\n\t\t\t\treturn TWO;\r\n\t\t\tcase \"three\":\r\n\t\t\t\treturn THREE;\r\n\t\t\tcase \"four\":\r\n\t\t\t\treturn FOUR;\r\n\t\t\tcase \"five\":\r\n\t\t\t\treturn FIVE;\r\n\t\t\tcase \"six\":\r\n\t\t\t\treturn SIX;\r\n\t\t\tcase \"seven\":\r\n\t\t\t\treturn SEVEN;\r\n\t\t\tcase \"eight\":\r\n\t\t\t\treturn EIGHT;\r\n\t\t\tcase \"nine\":\r\n\t\t\t\treturn NINE;\r\n\t\t\tcase \"ten\":\r\n\t\t\t\treturn TEN;\r\n\t\t\tcase \"jack\":\r\n\t\t\t\treturn JACK;\r\n\t\t\tcase \"king\":\r\n\t\t\t\treturn KING;\r\n\t\t\tcase \"queen\":\r\n\t\t\t\treturn QUEEN;\r\n\t\t\tcase \"ace\":\r\n\t\t\t\treturn ACE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public static EventType fromString(String s) {\n if (s != null) {\n EventType[] vs = values();\n for (int i = 0; i < vs.length; i++) {\n if (vs[i].toString().equalsIgnoreCase(s)) {\n return vs[i];\n }\n }\n }\n return null;\n }", "public static Enum forString(java.lang.String s)\r\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static TransactionType getEnumFromString(String string) {\n for (TransactionType transactionType : TransactionType.values()) {\n if (transactionType.getTransactionType().equals(string)) {\n return transactionType;\n }\n }\n\n throw new UnsupportedOperationException(\"Zadali ste chybný názov transakcie\");\n }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "private static TransitionType getTransitionType(String s)\n\t{\n\t\tfor (int i=0; i<transitionTypes.size(); i++)\n\t\t{\n\t\t\tif (transitionTypes.get(i).name.equals(s)) return transitionTypes.get(i);\n\t\t}\n\n\t\treturn null;\n\t}", "public Enum<?> findEnum(final String key) {\n Enum<?> en = _enumsById.get(key);\n if (en == null) {\n if (_isIgnoreCase) {\n return _findEnumCaseInsensitive(key);\n }\n }\n return en;\n }", "public static int getValue(String string){\n for (ItemAttributeEnum item : ItemAttributeEnum.values()) {\n if (string.equals(item.toString())){\n return item.intValue;\n }\n }\n return -1;\n }", "public static ArrayList parseEnumeration(String d, String s) {\n ArrayList result = new ArrayList();\n if (s != null) {\n AttributeTokenizer at = new AttributeTokenizer(s);\n do {\n\tString key = at.getKey();\n\tif (key == null) {\n\t throw new IllegalArgumentException(\"Directive \" + d + \", unexpected character at: \"\n\t\t\t\t\t + at.getRest());\n\t}\n\tif (!at.getEntryEnd()) {\n\t throw new IllegalArgumentException(\"Directive \" + d + \", expected end of entry at: \"\n\t\t\t\t\t + at.getRest());\n\t}\n\tint i = Math.abs(binarySearch(result, strComp, key) + 1);\n\tresult.add(i, key);\n } while (!at.getEnd());\n return result;\n } else {\n return null;\n }\n }", "public String getElement()\n {\n return \"enum\";\n }", "public static State findState(String string) {\n String find = string.toUpperCase();\n\n if (find.contains(WAITING.name())) {\n return WAITING;\n }\n else if (find.contains(STARTING.name())) {\n return STARTING;\n }\n else if (find.contains(PLAYING.name())) {\n return PLAYING;\n }\n else if (find.contains(ENDING.name())) {\n return ENDING;\n }\n else if (find.contains(ENDED.name())) {\n return ENDED;\n }\n else {\n return OFFLINE;\n }\n }", "public static SimulationType getSimulationType(String str) {\n for(SimulationType type: SimulationType.values()) {\n if(type.name().equalsIgnoreCase(str)) {\n return type;\n }\n }\n return null;\n }", "public java.lang.String getEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getElement(final String element) {\n\t\tif (Arrays.asList(Commands.firealiases).contains(element) || Arrays.asList(Commands.firecomboaliases).contains(element)) {\n\t\t\treturn \"fire\";\n\t\t} else if (Arrays.asList(Commands.combustionaliases).contains(element)) {\n\t\t\treturn \"combustion\";\n\t\t} else if (Arrays.asList(Commands.lightningaliases).contains(element)) {\n\t\t\treturn \"lightning\";\n\t\t} else if (Arrays.asList(Commands.earthaliases).contains(element) || Arrays.asList(Commands.earthcomboaliases).contains(element)) {\n\t\t\treturn \"earth\";\n\t\t} else if (Arrays.asList(Commands.metalbendingaliases).contains(element)) {\n\t\t\treturn \"metal\";\n\t\t} else if (Arrays.asList(Commands.sandbendingaliases).contains(element)) {\n\t\t\treturn \"sand\";\n\t\t} else if (Arrays.asList(Commands.lavabendingaliases).contains(element)) {\n\t\t\treturn \"lava\";\n\t\t} else if (Arrays.asList(Commands.airaliases).contains(element) || Arrays.asList(Commands.aircomboaliases).contains(element)) {\n\t\t\treturn \"air\";\n\t\t} else if (Arrays.asList(Commands.spiritualprojectionaliases).contains(element)) {\n\t\t\treturn \"spiritual\";\n\t\t} else if (Arrays.asList(Commands.flightaliases).contains(element)) {\n\t\t\treturn \"flight\";\n\t\t} else if (Arrays.asList(Commands.wateraliases).contains(element) || Arrays.asList(Commands.watercomboaliases).contains(element)) {\n\t\t\treturn \"water\";\n\t\t} else if (Arrays.asList(Commands.healingaliases).contains(element)) {\n\t\t\treturn \"healing\";\n\t\t} else if (Arrays.asList(Commands.bloodaliases).contains(element)) {\n\t\t\treturn \"blood\";\n\t\t} else if (Arrays.asList(Commands.icealiases).contains(element)) {\n\t\t\treturn \"ice\";\n\t\t} else if (Arrays.asList(Commands.plantaliases).contains(element)) {\n\t\t\treturn \"plant\";\n\t\t} else if (Arrays.asList(Commands.chialiases).contains(element) || Arrays.asList(Commands.chicomboaliases).contains(element)) {\n\t\t\treturn \"chi\";\n\t\t}\n\t\treturn null;\n\t}", "public static UserRole fromString(String str) {\n\t\tfor (UserRole role : values()) {\n\t\t\tif (role.name.equalsIgnoreCase(str)) {\n\t\t\t\treturn role;\n\t\t\t}\n\t\t}\n\t\treturn null; // not found\n\t}", "public static State fromString(String s) {\n if (s != null) {\n State[] vs = values();\n for (int i = 0; i < vs.length; i++) {\n if (vs[i].toString().equalsIgnoreCase(s)) {\n return vs[i];\n }\n }\n }\n return null;\n }", "private static ContextLabel stringToContextLabel(String s)\n {\n \tfor (ContextLabel enumVal : ContextLabel.values())\n \t{\n \t\tif (enumVal.toString().equals(s))\n \t\t\treturn enumVal;\n \t}\n \t\n \t// in case of failure\n \treturn ContextLabel.UNKNOWN;\n }", "public static SheetTraitEnum get(String literal) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tSheetTraitEnum result = VALUES_ARRAY[i];\r\n\t\t\tif (result.toString().equals(literal)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t AppInterfaceUnregisteredReason temp = AppInterfaceUnregisteredReason.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}", "public static String umlType(String s)\n {\n read_if_needed_();\n \n int index = _builtins.length;\n \n while (index-- != 0)\n if (_builtins[index].java.equals(s))\n return _builtins[index].uml;\n \n return null;\n }", "public static Enum getRole(String s){\n for(Roles roles : Roles.values()) {\n if(roles.toString().equalsIgnoreCase(s)){\n return roles;\n }\n }\n return GUEST;\n }", "public static FieldType fromString(String s) \n {\n if (s!=null) \n for (FieldType t : FieldType.values())\n if (s.equalsIgnoreCase(t.name))\n return t;\n \n return null;\n }", "public static OperationType stateOf(String state) {\n for (OperationType stateEnum : values()) {\n if (stateEnum.getOperation().equals(state)) {\n return stateEnum;\n }\n }\n return null;\n }", "public java.lang.String getEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private PatternType matchPatternEnum(String s){\n s = s.toLowerCase();\n switch(s){\n case \"factory method\":\n return PatternType.FACTORY_METHOD;\n case \"prototype\":\n return PatternType.PROTOTYPE;\n case \"singleton\":\n return PatternType.SINGLETON;\n case \"(object)adapter\":\n return PatternType.OBJECT_ADAPTER;\n case \"command\":\n return PatternType.COMMAND;\n case \"composite\":\n return PatternType.COMPOSITE;\n case \"decorator\":\n return PatternType.DECORATOR;\n case \"observer\":\n return PatternType.OBSERVER;\n case \"state\":\n return PatternType.STATE;\n case \"strategy\":\n return PatternType.STRATEGY;\n case \"bridge\":\n return PatternType.BRIDGE;\n case \"template method\":\n return PatternType.TEMPLATE_METHOD;\n case \"visitor\":\n return PatternType.VISITOR;\n case \"proxy\":\n return PatternType.PROXY;\n case \"proxy2\":\n return PatternType.PROXY2;\n case \"chain of responsibility\":\n return PatternType.CHAIN_OF_RESPONSIBILITY;\n default:\n System.out.println(\"Was not able to match pattern with an enum. Exiting because this should not happen\");\n System.exit(0);\n\n }\n //should never get here because we exit on the default case\n return null;\n }", "public org.apache.xmlbeans.XmlString xgetEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLNAME$8);\n return target;\n }\n }", "public V get(String str) \n {\n \tEntry curr = root;\n \tfor (int i=0; i<str.length(); i++)\n \t{\n \t\tchar ch = str.charAt(i);\n \t\tEntry node = curr.child.get(ch);\n \t\t//If node does not exist for given character\n \t\tif (node == null) \n \t\t{\n \t\t return null;\t\n \t\t}\n \t\tcurr = node;\n \t}\n \t//If word exists but it was not added individually into Trie\n \treturn curr.EndOfWord == true ? curr.value : null;\n }", "private static DirType getEnum(String name) {\n\t\t\t//Find provided string in directions map.\n\t\t\tDirType direction = directions.get(name.toUpperCase());\n\t\t\tif (direction == null) {\n\t\t\t\tdirection = DirType.NONE;\n\t\t\t}\n\t\t\treturn direction;\n\t\t}", "public static Instrument fromString(String text) {\r\n\t\tif (text != null) {\r\n\t\t\tfor (Instrument g : Instrument.values()) {\r\n\t\t\t\tif (text.equalsIgnoreCase(g.toString())) {\r\n\t\t\t\t\treturn g;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static Resource_kind get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tResource_kind result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static BioRelTypes getRelationshipType(String str, String pattern) {\n if (str.contains(pattern)) { \n String str1 = str.split(pattern)[0].toUpperCase().trim();\n log.info(\"str1 =\" + str1);\n return BioRelTypes.getEnum(str1);\n }\n return null;\n }", "public static AssociationKind get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tAssociationKind result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static Obj enumType(String type) {\n\t\tif ((type != null) && !type.isEmpty() && (StrObj.containsKey(type)))\n\t\t\treturn StrObj.get(type);\n\t\telse\n\t\t\treturn Obj.UNKOBJ;\n\t}", "public static Object getEnumAttribute(Node archiveNode, String attrName, Object[] values, Object defaultValue) {\n\n Node attr = archiveNode.getAttributes().getNamedItem(attrName);\n if (attr != null) {\n String found = attr.getNodeValue();\n for (Object value : values) {\n if (value.toString().equalsIgnoreCase(found)) {\n return value;\n }\n }\n }\n\n return defaultValue;\n }", "public static StatusType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tStatusType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private ScalarEnum getInputType(final String inputType) {\n String temp = inputType.replaceAll(\"-\", \"_\");\n INPUT_TYPE answer = Arrays.stream(\n INPUT_TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(INPUT_TYPE.unknown);\n return answer.getScalar();\n }", "public static TasklistEnum enumOf(int i) {\n\t\t\tfor (TasklistEnum enumType : TasklistEnum.values()) {\n\t\t\t\tif (enumType.index == i) {\n\t\t\t\t\treturn enumType;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public static Enum<?> findMatchingEnumVal(Field field, String unknownEnumName) {\n if (unknownEnumName == null || unknownEnumName.length() == 0) {\n return null;\n }\n for (Enum<?> enumVal : (Enum<?>[]) field.getType().getEnumConstants()) {\n if (enumVal.name().equals(unknownEnumName)) {\n return enumVal;\n }\n }\n throw new IllegalArgumentException(\"Unknwown enum unknown name \" + unknownEnumName + \" for field \" + field);\n }", "private static ContextType stringToContextType(String s) \n {\n for (ContextType enumVal : ContextType.values())\n {\n if (enumVal.toString().equals(s))\n return enumVal;\n }\n \n // in case of failure:\n return ContextType.UNKNOWN;\n }", "public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t\tRadioBand temp = RadioBand.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}", "public static String decode(String str){\r\n\t\treturn HtmlCodec.DefaultChar2ENUM.decode(str);\r\n\t}", "public final synchronized alb mo39459a(String str) {\n if (this.f40716Q == null) {\n return null;\n }\n return (alb) this.f40716Q.get(str);\n }", "private static Optional<Gesture> parseGesture(final String str) {\n return Stream.of(gestures)\n .filter(g -> (g.getLabel().equalsIgnoreCase(str) || g.name().equalsIgnoreCase(str)))\n .findFirst();\n }", "private TYPE getType(final String type) {\n String temp = type.replaceAll(\"-\", \"_\");\n TYPE answer = Arrays.stream(\n TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(TYPE.unknown);\n return answer;\n }", "public static APIVersionType get(String literal) {\n for (int i = 0; i < VALUES_ARRAY.length; ++i) {\n APIVersionType result = VALUES_ARRAY[i];\n if (result.toString().equals(literal)) {\n return result;\n }\n }\n return null;\n }", "public static Icon lookup(String name) \r\n\t{\r\n\t\tEntry\t\ttab[] = m_table;\r\n\t\tEntry\t\te;\r\n\t\tint\t\t\tindex;\r\n\t\r\n\t\tif (tab != null) {\r\n\t\t\tindex = (name.hashCode() & 0x7FFFFFFF) % tab.length;\r\n\t\r\n\t\t\tfor (e = tab[index] ; e != null ; e = e.m_next) {\r\n\t\t\t\tif (name.compareTo(e.m_name) == 0) {\r\n\t\t\t\t\treturn(e.m_value);\r\n\t\t}\t}\t}\r\n\t\treturn null;\r\n\t}", "public static PaymentStatusEnum findEnumByTag(String tagName) {\n\t\t\tfor (PaymentStatusEnum oneEnumSample : PaymentStatusEnum.values()) {\n\t\t\t\tif (oneEnumSample.paymentStatus.equalsIgnoreCase(tagName))\n\t\t\t\t\treturn oneEnumSample;\n\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public static Operator getOperator(String string) {\n\t\tif (string.equals(\"%\")) {\n\t\t\treturn MOD;\n\t\t} else if (string.equals(\"/\")) {\n\t\t\treturn DIV;\n\t\t}\n\t\tfor (Operator operator : Operator.values()) {\n\t\t\tif (operator.toString().equals(string)) {\n\t\t\t\treturn operator;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public org.apache.xmlbeans.XmlString xgetEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLID$10);\n return target;\n }\n }", "<T> T getElementFromString(final String elementString, final Class<T> movilizerElementClass);", "public static ChannelType getChannelTypeByString(String type) {\n for (ChannelType tmp : ChannelType.values()) {\n if (type.equalsIgnoreCase(tmp.name())) {\n return tmp;\n }\n }\n return null;\n }", "public static InterfaceModeType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tInterfaceModeType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static AccessType fromExternalName(String externalName) {\n\t\tif (externalName == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (AccessType accessType : AccessType.values()) {\n\t\t\tif (accessType.getExternalName().equals(externalName)) {\n\t\t\t\treturn accessType;\n\t\t\t}\n\t\t}\n\t\tthrow new UnknownEnumExternalNameException(externalName);\n\t}", "String getElement();", "public static EndpointType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tEndpointType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t SamplingRate temp = SamplingRate.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}", "public static String parseElId(String name) {\n String patternString = \"(^[GT]\\\\w+\\\\.?\\\\w*):\";\n Pattern pattern = Pattern.compile(patternString);\n java.util.regex.Matcher matcher = pattern.matcher(name);\n if (matcher.find())\n return matcher.group(1);\n else\n return null;\n }", "public static CountryCodeEnum getEnumFromDescription(String description) {\r\n for (int i = 0; i < CountryCodeEnum.values().length; i++) {\r\n if (CountryCodeEnum.values()[i].getDescription().equals(description)) {\r\n return CountryCodeEnum.values()[i];\r\n }\r\n }\r\n return null;\r\n }", "public static grms_schema.types.LocalrmnameType valueOf(\n java.lang.String string) {\n java.lang.Object obj = null;\n\n if (string != null) {\n obj = _memberTable.get(string);\n }\n\n if (obj == null) {\n String err = \"'\" + string + \"' is not a valid LocalrmnameType\";\n throw new IllegalArgumentException(err);\n }\n\n return (LocalrmnameType) obj;\n }", "public static TasklistEnum enumOf(String fileName) {\n\t\t\tfor (TasklistEnum enumType : TasklistEnum.values()) {\n\t\t\t\tif (enumType.filename.equals(fileName)) {\n\t\t\t\t\treturn enumType;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public static <T extends Enum<T>> T findMatch(Class<T> type, CharSequence input) {\n return literalMatcher(type).apply(input);\n }", "public static Gate findGate( String s ) {\n\t// quick and dirty implementation\n\tfor (Gate i: gates) {\n\t if (i.name.equals( s )) {\n\t\treturn i;\n\t }\n\t}\n\treturn null;\n }", "public T getExactMatch(String arg)\n\t{\n\t\treturn null;\n\t}", "public T caseCharEnum(CharEnum object)\n {\n return null;\n }", "public static Collection valueOf(String next) {\n\t\treturn null;\n\t}", "public void testInvalidEnum () {\n\t\tString example = \"uSer_ExiT\";\n\t\ttry {\n\t\t AppInterfaceUnregisteredReason temp = AppInterfaceUnregisteredReason.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (IllegalArgumentException exception) {\n fail(\"Invalid enum throws IllegalArgumentException.\");\n\t\t}\n\t}", "public static Direction getValue(String val) {\n for (Direction e : Direction.values()) {\n if (e.direction.equals(val)) {\n return e;\n }\n }\n return null;// not found\n }", "protected static Integer getIntegerString(String string) {\n Integer i;\n try {\n i = Integer.parseInt(string);\n } catch(Exception e) {\n return null;\n }\n\n return i;\n }", "public static StatusType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tStatusType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static String valueOfOrDefault(String myValue) {\n\t\t String value=myValue.toUpperCase().replaceAll(\"\\\\s\", \"_\");\r\n\t\t for(RegioneItaliana type : RegioneItaliana.class.getEnumConstants()) {\r\n\t\t if(type.name().equalsIgnoreCase(value)) {\r\n\t\t return type.toString();\r\n\t\t }\r\n\t\t }\r\n\t\t return myValue;\r\n\t\t }", "@SuppressWarnings(\"unchecked\")\n public <T extends Enum<T>> T getEnum(final int index) throws ClassNotFoundException {\n /*\n * Supressing the unchecked warning because the returnType is\n * dynamically identified and could lead to a ClassCastException when\n * returnType is cast to Class<T>, which is expected by the method's\n * contract.\n */\n T returnable;\n final String element;\n final String[] splitValues;\n final int numberOfValues;\n final StringBuilder returnTypeName;\n final StringBuilder enumName;\n final Class<T> returnType;\n /* Make sure the element at the index is a String. */\n element = this.getString(index);\n if (element == null) {\n return null;\n }\n /* Get the package, class, and enum names. */\n splitValues = element.split(\"\\\\.\");\n numberOfValues = splitValues.length;\n returnTypeName = new StringBuilder();\n enumName = new StringBuilder();\n for (int i = 0; i < numberOfValues; i++) {\n if (i == (numberOfValues - 1)) {\n /*\n * If it is the last split value then it should be the name of\n * the Enum since dots are not allowed in enum names.\n */\n enumName.append(splitValues[i]);\n } else if (i == (numberOfValues - 2)) {\n /*\n * If it is the penultimate split value then it should be the\n * end of the package/enum type and not need a dot appended to\n * it.\n */\n returnTypeName.append(splitValues[i]);\n } else {\n /*\n * Must be part of the package/enum type and will need a dot\n * appended to it since they got removed in the split.\n */\n returnTypeName.append(splitValues[i]);\n returnTypeName.append(\".\");\n }\n }\n /* Use the package/class and enum names to get the Enum<T>. */\n returnType = (Class<T>) Class.forName(returnTypeName.toString());\n returnable = Enum.valueOf(returnType, enumName.toString());\n return returnable;\n }", "public static MediumOrientationMedOrient get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tMediumOrientationMedOrient result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Object get(String string) {\n\t\treturn null;\n\t}", "public Element getElement(String subExpression) {\n Element result = null;\n String expression = contextNode + \"/\" + subExpression;\n try {\n Node n = (Node)xp.evaluate(expression, source, XPathConstants.NODE);\n if (n.getNodeType() == Node.ELEMENT_NODE) result = (Element) n;\n } catch(Exception e) {\n Util.log(\"XML error: can't read node \" + expression + \".\");\n Util.logException(e);\n }\n return result;\n }", "public AbsenceType findByName(String name);", "public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t ECallConfirmationStatus temp = ECallConfirmationStatus.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}", "public static DatabaseType getDatabaseType(final String s) {\n DatabaseType e = STRINGTOENUM.get(s);\n if (e != null) return e;\n\n for (final String dispval : STRINGTOENUM.keySet()) {\n if (dispval.equalsIgnoreCase(s))\n return STRINGTOENUM.get(dispval);\n }\n\n return null;\n }", "public static ResponseType getByName(String name) {\n if (name == null || name.length() < 1) {\n return ResponseType.INVALID;\n }\n name = name.trim();\n for (int i = 0; i < list.size(); i++) {\n ResponseType temp = (ResponseType) list.get(i);\n if (temp.getName().equalsIgnoreCase(name)) {\n return temp;\n }\n }\n return ResponseType.INVALID;\n }", "public static DDataAttribute find(String propertyName, DDataAttribute in) {\n if (in.getJavaType() != null)\n for (Field field : in.getJavaType().getDeclaredFields())\n if (field.isEnumConstant()) {\n @SuppressWarnings(\"unchecked\")\n DDataAttribute atr = (DDataAttribute) Enum.valueOf((Class<? extends Enum>) in.getJavaType(), field.getName());\n if (propertyName.equals(atr.getPropertyName())) {\n return atr;\n }\n }\n return null;\n }", "public static String getElementName(String type) {\n switch(type){\n case(\"1\"):\n return \"Kinetic\";\n case(\"2\"):\n return \"Arc\";\n case(\"3\"):\n return \"Solar\";\n case(\"4\"):\n return \"Void\";\n default:\n return \"Damage Type Not Found\";\n }\n }", "public static EndConditionTypes get(String literal)\n {\n for (int i = 0; i < VALUES_ARRAY.length; ++i)\n {\n EndConditionTypes result = VALUES_ARRAY[i];\n if (result.toString().equals(literal))\n {\n return result;\n }\n }\n return null;\n }", "private static String getFaction(String string) {\r\n\t\tString faction = \"Нейтрал\";\r\n\t\tswitch (string) {\r\n\t\tcase \"2\":\r\n\t\t\tfaction = factions[0];\r\n\t\t\tbreak;\r\n\t\tcase \"3\":\r\n\t\t\tfaction = factions[1];\r\n\t\t\tbreak;\r\n\t\tcase \"4\":\r\n\t\t\tfaction = factions[2];\r\n\t\t\tbreak;\r\n\t\tcase \"5\":\r\n\t\t\tfaction = factions[3];\r\n\t\t\tbreak;\r\n\t\tcase \"6\":\r\n\t\t\tfaction = factions[4];\r\n\t\t}\r\n\t\treturn faction;\r\n\t}", "public int mo75909b(String str) {\n C32569u.m150519b(str, \"element\");\n return this.f51596a.indexOf(str);\n }", "public static Library getEnum(String value) throws IllegalArgumentException {\n for (Library e : Library.values()) {\n if (e.getInternalPluginName().equalsIgnoreCase(value))\n return e;\n }\n\n throw new IllegalArgumentException(\"There is no library called '\" + value + \"'!\");\n }", "public void testInvalidEnum () {\n\t\tString example = \"noRMal\";\n\t\ttry {\n\t\t ECallConfirmationStatus temp = ECallConfirmationStatus.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (IllegalArgumentException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}", "Element getElement(ContentType type, char c);", "public static CurveCharKind get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCurveCharKind result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private static By ByAccessibilityId(String string) {\n\treturn null;\n}", "public static CoverageType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCoverageType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static EnumMoreSwords getType(String name) {\n\n for (EnumMoreSwords swordType : values()) {\n\n if (swordType.swordName.equalsIgnoreCase(name)) {\n\n return swordType;\n }\n }\n\n Constants.LOGGER.info(\"There was an error when attempting to look up \" + name);\n return null;\n }", "protected Element parseString(String str){\n\t\ttry {\n\t\t\tparser.parse(str);\n\t\t\treturn parser.getDocument().getDocumentElement();\n\t\t} catch (SAXException e) {\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn el(\"failure\", text(\"The workflow instrumenter could not insert an activity here, because\" +\n\t\t\t\"the code for the activitiy, that was supplied in the requirement specification was not correct!\"));\n\t}", "public static TypeDictionaryDicoActionQualificatifActivite get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tTypeDictionaryDicoActionQualificatifActivite result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private V get(StringIterator iter)\n {\n \tEntry curr = root;\n \twhile(iter.hasNext())\n \t{\n \t\tchar ch = iter.next();\n \t\tEntry node = curr.child.get(ch);\n \t\t//If node does not exist for given character\n \t\tif (node == null) \n \t\t{\n \t\t return null;\t\n \t\t}\n \t\tcurr = node;\n \t}\n \t//If word exists but it was not added individually into Trie\n \treturn curr.EndOfWord == true ? curr.value : null;\n }", "public static During get(String literal)\n {\n for (int i = 0; i < VALUES_ARRAY.length; ++i)\n {\n During result = VALUES_ARRAY[i];\n if (result.toString().equals(literal))\n {\n return result;\n }\n }\n return null;\n }" ]
[ "0.67170846", "0.6258818", "0.60206324", "0.6013074", "0.5784679", "0.571882", "0.571882", "0.571882", "0.5715854", "0.5706907", "0.57044744", "0.56770664", "0.56148225", "0.542083", "0.5379907", "0.5345766", "0.53042734", "0.52796364", "0.52605903", "0.5256925", "0.5242504", "0.51975965", "0.5177993", "0.517784", "0.5169227", "0.5165775", "0.5152701", "0.514926", "0.51477027", "0.5142302", "0.5089334", "0.5082888", "0.50702834", "0.50678486", "0.506197", "0.50510997", "0.50510263", "0.50104415", "0.49884957", "0.49760523", "0.49690136", "0.49665862", "0.49647883", "0.49608356", "0.49560413", "0.49251467", "0.49228507", "0.49195883", "0.49172482", "0.4877875", "0.4877592", "0.48709276", "0.48562926", "0.48494154", "0.484557", "0.48442045", "0.48441273", "0.48293394", "0.4824628", "0.48237684", "0.48118865", "0.48049313", "0.48039213", "0.48028377", "0.47989228", "0.4790276", "0.4789869", "0.47875437", "0.4783401", "0.47790077", "0.47725955", "0.47678572", "0.4758058", "0.47540748", "0.47504398", "0.4745152", "0.47441074", "0.47387913", "0.4733991", "0.47320002", "0.4729032", "0.47274214", "0.4720626", "0.47193322", "0.471071", "0.4707785", "0.4697373", "0.46879822", "0.46879765", "0.46778002", "0.46713135", "0.46636754", "0.46612066", "0.46516272", "0.46396834", "0.463935", "0.46384013", "0.46360487", "0.46304753", "0.46266606" ]
0.6181844
2
Returns the nth element of the enumeration.
public static BasicEnum fromOrdinal(int ordinal) { return _ENUMERATIONS[ordinal]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object elementAt(int n) {\r\n\t\treturn elements.get(n);\r\n\t}", "public int getElem(int n){\n return this._elems.get(n);\n }", "protected abstract Object getNthObject(int n);", "public E get(int index) {\n return this.elements[index];\n }", "@Override\n public E get(int index) throws IndexOutOfBoundsException\n {\n if(index > size() - 1 || index < 0)\n {\n throw new IndexOutOfBoundsException();\n }\n Node currNode = getNth(index);\n return currNode.getElement(); \n }", "public Token getNthToken(int n) {\n synchronized (this) {\n return tokens.get(n);\n }\n }", "public int get(int index);", "public RTWElementRef getAsElement(int i);", "E get(int i) throws IndexOutOfBoundsException;", "E get( int index );", "private Element getElement(int index) {\n if (index < this._size / 2) {\n return this.getElementForwards(index);\n } else {\n return this.getElementBackwards(index);\n }\n }", "Object getElementAt(int index);", "public DomainElement elementForIndex(int index);", "public E get(int index);", "Object getArrayElement(int index);", "Object getArrayElement(int index);", "public T get(int index) {\n return items[(nextFirst + 1 + index) % capacity];\n }", "private int findNthElement(int index) {\n if (head == null)\n return 0;\n ListNode pointer1 = head;\n ListNode pointer2 = head;\n int count = 0;\n while (count < index) {\n pointer1 = pointer1.next;\n count++;\n }\n while (pointer1.next != null) {\n pointer1 = pointer1.next;\n pointer2 = pointer2.next;\n }\n return pointer2.data;\n }", "T getElementFromIndex(int index) throws ListException;", "public Type get(int index);", "public Object get(int index) {\r\n return entry(index).element;\r\n }", "public long getElem(int index) {\r\n return a[index];\r\n }", "public E get(int index)\n {\n if (index >= 0 && index < size)\n return data[index];\n else\n throw new NoSuchElementException();\n }", "Object get(int index);", "Object get(int index);", "public T get(int i);", "public E get(int index)\r\n {\r\n checkValidIndex(index);\r\n return listIterator(index).next();\r\n }", "public static BigInteger getNth(long n)\n {\n if (n == 0 || n == 1) { return BigInteger.valueOf(n); }\n else { return power(atom, n - 1)[0][0]; } \n }", "public Item get(int i);", "public Term get(int i) {\n\t\treturn this.elts[i];\n\t}", "public Object get(int index);", "public Object get(int index);", "public T get(int index);", "public T get(int index);", "public T get(int index);", "public BigInteger getNth(int n) {\n\t\twhile(primes.size()<n) {\n\t\t\tgetNext();\n\t\t}\n\n\t\treturn primes.get(primes.size()-1);\n\t}", "public E get(int i) {\n\n\t if (i < 0 && i > num_elements)\n\t return null;\n\t \n\t return(elements[i]);\n\t }", "public Item get(int i) {\n return items[i - 1];\n }", "private Node getNth(int index) \n { \n int currIndex = 0;\n Node currNode = this.head.next;\n while(currIndex < index)\n {\n currNode = currNode.getNext();\n currIndex++;\n }\n return currNode;\n }", "public E get(int index) {\r\n return items.get(index);\r\n }", "public int getElementAtIndex(int index){\r\n return mArray[index];\r\n }", "public T get(int i) {\n if (i == 0) {\n return this.first;\n }\n else {\n return this.rest.get(i--);\n }\n }", "public TypeHere get(int i) {\n return items[i];\n }", "public Object elementAt(int index);", "public E get(int index) {\n\t\tif (index < 0 || index >= size) {\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\treturn elements[index];\n\t}", "public abstract E get(int index);", "public E get(int index) { \n return (E)list[index];\n }", "public E atIndex(int index) {\n\t\tif(index < numElements) {\n\t\t\treturn elements[index];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public Integer get(int index){\n return list.get(index);\n }", "abstract int get(int index);", "Object get(int i);", "@Override\n\tpublic E get(int index) {\n\t\treturn node(index).elementE;\n\t}", "public Object get(int i) {\n return elementAt(i);\n }", "public int getElement(int index) {\r\n\t\t//Defensive\r\n\t\tif (index < 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"Index less than zero\");\r\n\t\t}\r\n\t\tif (index >= getLength()) {\r\n\t\t\tthrow new IllegalArgumentException(\"Index out of upper bound\");\r\n\t\t}\r\n\t\tif (getLength() <= 0) {\r\n\t\t\tthrow new IllegalArgumentException(\"The array does not yet exist\");\r\n\t\t}\r\n\t\t\r\n\t\treturn getNodeAt(index).value;\r\n\t}", "public E token(int n) {\n return mTokens.get(n);\n }", "@Override\n\tpublic E get(int i) {\n\t\tif (i < 0 || i >= this.numberOfElements) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\telse {\n\t\t\treturn this.arrayList[i];\n\t\t}\n\t}", "public Occ get( int index )\n {\n if ( index < 0 || index >= size ) throw new IndexOutOfBoundsException( \"\"+index+\" >= \"+size );\n return data[index];\n }", "public int get(int index) {\n\t\treturn r[index];\n\t}", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "T get(int index);", "public int getElement(int index){\n if(index <0 || index >= array.length){\n throw new RuntimeException(\"Array index out of bound\");\n }\n return array[index];\n }", "public int get(int i) {\n if (i==0) {\n return first;\n }\n return rest.get(i - 1);\n }", "T get(int i);", "public int get(int index) {\n return array[index];\n }", "public E get(int index) {\r\n\t\tif (indices.get(index) == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(index).data;\t\t\r\n\t\t}\r\n\t}", "private E getElement(int index) {\n if (index >= contents.size()) {\n return null;\n } else {\n return contents.get(index);\n }\n }", "private int findNextElement() {\n\t\tif (hasNext()) {\n\t\t\tint value = this.index + 1;\n\t\t\treturn value;\n\n\t\t}\n\t\treturn -1;\n\t}", "@Override\n\tpublic E get(int idx) {\n\t\tE element = null;\n\t\tif (idx < 0 || idx >= size)\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\telement = list[idx];\n\t\treturn element;\n\t}", "@Override\n public Object getElement(int index){\n return gameCollection.elementAt(index);\n }", "@Test\n public void elementLocationTestIterative() {\n int elementNumber = 3;\n System.out.println(nthToLastReturnIterative(list.getHead(), elementNumber).getElement());\n }", "public int get(int i) throws ArrayIndexOutOfBoundsException {\n if (i >= 0 && i < count) {\n return list[i];\n } else {\n throw new ArrayIndexOutOfBoundsException();\n }\n }", "public Item get(int i) {\n return items[i];\n }", "public T get(int aIndex);", "@Override\n public int element() {\n isEmptyList();\n return first.value;\n }", "public int get(int index) {\n\t checkIndex(index);\n\t return elementData[index];\n\t }", "public E get(int i) {\n\t\tif (size == 0) {\n\t\t\tthrow new IllegalArgumentException(\"List is empty, cannot retrieve item.\");\n\t\t}\n\n\t\tif (i < 0 || i >= size) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Requested index is out of bounds.\");\n\t\t}\n\n\t\treturn list[i];\n\n\t}", "public O get(int index)\r\n {\r\n if (index >= count || index < 0) return null;\r\n \r\n if (index > count/2)\r\n {\r\n //search from the end\r\n VectorItem<O> vi = last;\r\n for (int i=count-1;i>index;i--)\r\n {\r\n vi = vi.getPrevious();\r\n }\r\n return vi.getObject(); \r\n \r\n } else\r\n {\r\n //search from the beginning\r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<index;i++)\r\n {\r\n vi = vi.getNext();\r\n }\r\n return vi.getObject(); \r\n }\r\n }", "private int elementNC(int i) {\n return first + i * stride;\n }", "public E get(int index) {\n //make sure the index is valid\n if (this.array.length - 1 >= index) {\n //encapsulate\n Object element = this.array[index];\n return (E) element;\n } \n \n //if the index is invalid, return -1\n throw new IllegalArgumentException();\n }", "public int getFirst();", "int getItem(int index);", "public Item get(int index) {\n int track = nextFirst; //It does not modify nextFirst\n track = moveForward(track, index + 1);\n return items[track];\n }", "public abstract T get(int index);", "public E getElement(int index) {\t//O(1)\r\n\t\t//checks if the index is valid\r\n\t\tif (index>=0 && index<size)\r\n\t\t\treturn (E) list[index];\t//returns element at particular index\r\n\t\treturn null;\r\n\t}", "public E get(int index)\n\t{\n\t\treturn contents[index];\n\t}", "public int getElementAt(int i)\n\t{\n\t\tint elem = 0;\n\t\tint index = -1;\n\t\tSinglyLinkedListNode nextNode = head;\n\t\tSinglyLinkedListNode prevNode = null;\n\t\tif((i < 0 || i >= size()))\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\twhile(true)\n\t\t{\n\t\t\tindex = index + 1;\n\t\t\tif(index == i)\n\t\t\t{\n\t\t\t\telem = nextNode.getData();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = prevNode.getNext();\n\t\t\t}\n\t\t}\t\t\n\t\treturn elem;\n\t}", "public T returnItem(int i) {\n return a[i];\n }", "String get(int index);", "public int getIndexOfElement(Object... value);", "public E get(int index) {\n\t\tif (index < 0 || index >= size()) {\n\t\t\tthrow new IndexOutOfBoundsException(\"Index is out of bounds\");\n\t\t} else {\n\t\t\treturn list[index];\n\t\t}\n\t}", "@Test\n public void displayNthItemTest()\n throws NullPointerException, NoSuchElementException, TimeoutException, ElementNotVisibleException,\n StaleElementReferenceException {\n ArrayList<Integer> nthItems = new ArrayList();\n nthItems.add(3);\n nthItems.add(5);\n ArrayList<String> foodItems = fetchNthFoodItems(driver, nthItems);\n Assert.assertNotNull(foodItems, \"Food items are empty\");\n System.out.println(\"Nth Food item names \");\n System.out.println(\"**********************\");\n for (int idx = 0; idx < foodItems.size(); idx++) {\n System.out.println(nthItems.get(idx) + \" - Food item - \" + foodItems.get(idx));\n }\n }", "@Override\n public E get(final int index) {\n return array[index];\n }", "int getIndexOfElement(T value);", "@Override\n\tpublic E get(int i) throws IndexOutOfBoundsException {\n\t\treturn null;\n\t}", "public synchronized E get(int index) {\n return this.array.get(index);\n }", "public RTWValue getAsValue(int i);", "public Object getValue(int index);", "public static BigInteger getElement(int index) {\n return getElement(index, new BigInteger(\"0\"), new BigInteger(\"1\"));\n }" ]
[ "0.71988297", "0.68172944", "0.6678529", "0.6503489", "0.65013725", "0.6489987", "0.64551586", "0.64532286", "0.64307237", "0.64258015", "0.64049894", "0.63823473", "0.6286173", "0.62835246", "0.62770337", "0.62770337", "0.6242677", "0.6200535", "0.61929566", "0.6184605", "0.6171681", "0.61643195", "0.6161435", "0.6157153", "0.6157153", "0.61489826", "0.6147419", "0.6142053", "0.61212295", "0.6112093", "0.6105877", "0.6105877", "0.60947365", "0.60947365", "0.60947365", "0.6068344", "0.6060873", "0.6054535", "0.60509044", "0.6033682", "0.6032911", "0.5996328", "0.5994406", "0.5991071", "0.59906954", "0.59885275", "0.5979002", "0.59782374", "0.59710395", "0.5963817", "0.5963085", "0.5959236", "0.59400356", "0.5932199", "0.5931877", "0.5926455", "0.591876", "0.59179926", "0.59173596", "0.59173596", "0.59173596", "0.59173596", "0.59173596", "0.591465", "0.5908237", "0.5886783", "0.58757067", "0.58741003", "0.5870431", "0.586739", "0.5853232", "0.5852189", "0.5851052", "0.5824862", "0.5803996", "0.5800273", "0.5799595", "0.579836", "0.5794951", "0.5794727", "0.57914376", "0.5790412", "0.5785682", "0.5764968", "0.57631636", "0.5762", "0.5759891", "0.5748078", "0.5738713", "0.5738036", "0.57311976", "0.5725561", "0.5716195", "0.5713812", "0.56993693", "0.5689698", "0.5689352", "0.5688985", "0.5685276", "0.56710947", "0.5670431" ]
0.0
-1
Returns the enumeration element represented by the supplied numeric value, or null if not matched.
public static BasicEnum fromNumericValue(org.ccsds.moims.mo.mal.structures.UInteger value) { for (int i = 0; i < _ENUMERATION_NUMERIC_VALUES.length; i++) { if (_ENUMERATION_NUMERIC_VALUES[i].equals(value)) { return _ENUMERATIONS[i]; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public Element lookup(int rgbValue)\n {\n for (Element e: Element.values())\n if (e.getValue() == rgbValue)\n return e;\n return null;\n }", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum getValue();", "public static String getString(int value){\n for (ItemAttributeEnum item : ItemAttributeEnum.values()) {\n if (value == item.intValue){\n return item.toString();\n }\n }\n return null;\n }", "public static OrderStatus valueOf(Integer value) {\n return Arrays.stream(values())\n .filter(orderStatus -> orderStatus.value == value)\n .findFirst()\n .orElse(null);\n }", "public static Resource_kind get(int value) {\n\t\tswitch (value) {\n\t\tcase NONE_VALUE:\n\t\t\treturn NONE;\n\t\tcase RAND_VALUE:\n\t\t\treturn RAND;\n\t\tcase LOCK_VALUE:\n\t\t\treturn LOCK;\n\t\tcase SHARE_VALUE:\n\t\t\treturn SHARE;\n\t\t}\n\t\treturn null;\n\t}", "public static AssociationKind get(int value) {\n\t\tswitch (value) {\n\t\t\tcase NONE_VALUE: return NONE;\n\t\t\tcase MAP_VALUE: return MAP;\n\t\t\tcase EXTRA_VALUE: return EXTRA;\n\t\t}\n\t\treturn null;\n\t}", "public static CurveCharKind get(int value) {\n\t\tswitch (value) {\n\t\t\tcase ANSI_EXTREMELY_INVERSE_VALUE: return ANSI_EXTREMELY_INVERSE;\n\t\t}\n\t\treturn null;\n\t}", "public static BendType toEnum(int val) {\r\n\t\t\ttry {\r\n\t\t\t\treturn values()[val - 1];\r\n\t\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}", "public static EsOrderModeType findByValue(int value) { \n switch (value) {\n case -1:\n return UNKNOWN;\n case 0:\n return ORDER_MODE_FOK;\n case 1:\n return ORDER_MODE_FAK;\n case 2:\n return ORDER_MODE_GFD;\n case 3:\n return ORDER_MODE_GTC;\n case 4:\n return ORDER_MODE_GTD;\n default:\n return null;\n }\n }", "public java.lang.String getFromNumber()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROMNUMBER$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public static Object getEnumAttribute(Node archiveNode, String attrName, Object[] values, Object defaultValue) {\n\n Node attr = archiveNode.getAttributes().getNamedItem(attrName);\n if (attr != null) {\n String found = attr.getNodeValue();\n for (Object value : values) {\n if (value.toString().equalsIgnoreCase(found)) {\n return value;\n }\n }\n }\n\n return defaultValue;\n }", "public static TableSpaceType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase REGULAR: return REGULAR_LITERAL;\n\t\t\tcase LOB: return LOB_LITERAL;\n\t\t\tcase SYSTEM_TEMPORARY: return SYSTEM_TEMPORARY_LITERAL;\n\t\t\tcase USER_TEMPORARY: return USER_TEMPORARY_LITERAL;\n\t\t\tcase PERMANENT: return PERMANENT_LITERAL;\n\t\t\tcase TEMPORARY: return TEMPORARY_LITERAL;\n\t\t\tcase LONG: return LONG_LITERAL;\n\t\t\tcase LARGE: return LARGE_LITERAL;\n\t\t}\n\t\treturn null;\n\t}", "public static APIVersionType get(int value) {\n switch (value) {\n case NONE_VALUE: return NONE;\n case CONTEXT_VALUE: return CONTEXT;\n case URL_VALUE: return URL;\n }\n return null;\n }", "public static CollectionTypes get(int value) {\n\t\tswitch (value) {\n\t\t\tcase SET_VALUE: return SET;\n\t\t\tcase BAG_VALUE: return BAG;\n\t\t\tcase SEQUENCE_VALUE: return SEQUENCE;\n\t\t}\n\t\treturn null;\n\t}", "public static TasklistEnum enumOf(int i) {\n\t\t\tfor (TasklistEnum enumType : TasklistEnum.values()) {\n\t\t\t\tif (enumType.index == i) {\n\t\t\t\t\treturn enumType;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public static SubscribeType findByValue(int value) { \n switch (value) {\n case 0:\n return CLOUD;\n case 1:\n return HDFS;\n case 2:\n return NETWORK;\n case 3:\n return ZOOKEEPER;\n default:\n return null;\n }\n }", "public static StatusType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase INSTALLED_VALUE: return INSTALLED;\n\t\t\tcase NOT_INSTALLED_VALUE: return NOT_INSTALLED;\n\t\t\tcase HALF_CONFIGURED_VALUE: return HALF_CONFIGURED;\n\t\t\tcase HALF_INSTALLED_VALUE: return HALF_INSTALLED;\n\t\t\tcase CONFIG_FILES_VALUE: return CONFIG_FILES;\n\t\t\tcase UNPACKED_VALUE: return UNPACKED;\n\t\t}\n\t\treturn null;\n\t}", "public RTWValue getAsValue(int i);", "public static <T extends IWebGLConstEnum> T getByIntValue(T[] values, int valueToFind) {\r\n\t\tfor(T val:values) {\r\n\t\t\tif(val.getIntValue()==valueToFind) {\r\n\t\t\t\treturn val;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public int getValue()\n {\n try\n {\n return (Integer) AlphaComposite.class.getField(name).get(null);\n }\n catch (Exception e)\n {\n return -1;\n }\n }", "Integer getValue();", "Integer getValue();", "com.yahoo.xpathproto.TransformTestProtos.MessageEnum getEnumValue();", "public static TypeDictionaryDicoActionQualificatifActivite get(int value) {\n\t\tswitch (value) {\n\t\t\tcase UNIQUE_VALUE: return UNIQUE;\n\t\t\tcase MINIMAL_VALUE: return MINIMAL;\n\t\t\tcase MAXIMAL_VALUE: return MAXIMAL;\n\t\t\tcase POSSIBLE_VALUE: return POSSIBLE;\n\t\t}\n\t\treturn null;\n\t}", "int enumField(String name, boolean isDefined, int value,\n GPSEnumDefinition definition) throws NullField, InvalidFieldValue;", "public static DataType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase CLASS_NAME: return CLASS_NAME_LITERAL;\n\t\t\tcase METHOD_NAME: return METHOD_NAME_LITERAL;\n\t\t\tcase METHOD_SIG: return METHOD_SIG_LITERAL;\n\t\t\tcase THIS_OBJECT: return THIS_OBJECT_LITERAL;\n\t\t\tcase ARGS: return ARGS_LITERAL;\n\t\t\tcase RETURNED_OBJECT: return RETURNED_OBJECT_LITERAL;\n\t\t\tcase IS_FINALLY: return IS_FINALLY_LITERAL;\n\t\t\tcase EXCEPTION_OBJECT: return EXCEPTION_OBJECT_LITERAL;\n\t\t\tcase STATIC_FIELD: return STATIC_FIELD_LITERAL;\n\t\t\tcase CLASS_SOURCE_FILE: return CLASS_SOURCE_FILE_LITERAL;\n\t\t\tcase METHOD_NAMES: return METHOD_NAMES_LITERAL;\n\t\t\tcase METHOD_LINE_TABLES: return METHOD_LINE_TABLES_LITERAL;\n\t\t\tcase METHOD_NUMBER: return METHOD_NUMBER_LITERAL;\n\t\t\tcase EXECUTABLE_UNIT_NUMBER: return EXECUTABLE_UNIT_NUMBER_LITERAL;\n\t\t\tcase PREVIOUS_UNIT_NUMBER: return PREVIOUS_UNIT_NUMBER_LITERAL;\n\t\t}\n\t\treturn null;\n\t}", "public static RepresentacionGrafica get(int value) {\n\t\tswitch (value) {\n\t\tcase TEXT_VALUE:\n\t\t\treturn TEXT;\n\t\tcase COMBO_VALUE:\n\t\t\treturn COMBO;\n\t\tcase RADIO_VALUE:\n\t\t\treturn RADIO;\n\t\tcase CHECKBOX_VALUE:\n\t\t\treturn CHECKBOX;\n\t\tcase DATE_VALUE:\n\t\t\treturn DATE;\n\t\t}\n\t\treturn null;\n\t}", "public java.lang.String getEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public static CoverageType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase PATIENT_GENDER_VALUE: return PATIENT_GENDER;\n\t\t\tcase PATIENT_AGE_GROUP_VALUE: return PATIENT_AGE_GROUP;\n\t\t\tcase CLINICAL_FOCUS_VALUE: return CLINICAL_FOCUS;\n\t\t\tcase TARGET_USER_VALUE: return TARGET_USER;\n\t\t\tcase WORKFLOW_SETTING_VALUE: return WORKFLOW_SETTING;\n\t\t\tcase WORKFLOW_TASK_VALUE: return WORKFLOW_TASK;\n\t\t\tcase CLINICAL_VENUE_VALUE: return CLINICAL_VENUE;\n\t\t}\n\t\treturn null;\n\t}", "int value(String name);", "public static String valueOfOrDefault(String myValue) {\n\t\t String value=myValue.toUpperCase().replaceAll(\"\\\\s\", \"_\");\r\n\t\t for(RegioneItaliana type : RegioneItaliana.class.getEnumConstants()) {\r\n\t\t if(type.name().equalsIgnoreCase(value)) {\r\n\t\t return type.toString();\r\n\t\t }\r\n\t\t }\r\n\t\t return myValue;\r\n\t\t }", "public T caseEnumValue(EnumValue object)\n {\n return null;\n }", "public static EndpointType get(int value) {\n\t\tswitch (value) {\n\t\tcase EDGE_VALUE:\n\t\t\treturn EDGE;\n\t\tcase REGIONAL_VALUE:\n\t\t\treturn REGIONAL;\n\t\tcase PRIVATE_VALUE:\n\t\t\treturn PRIVATE;\n\t\t}\n\t\treturn null;\n\t}", "public static JdbcTypeType get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase _1: return _1_LITERAL;\r\n\t\t\tcase _2: return _2_LITERAL;\r\n\t\t\tcase _3: return _3_LITERAL;\r\n\t\t\tcase _4: return _4_LITERAL;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static StatusCode findByValue(int value) { \n switch (value) {\n case 0:\n return Success;\n case 1:\n return ApplicationException;\n case 2:\n return RuntimeException;\n case 3:\n return RpcException;\n case 4:\n return TransportException;\n case 5:\n return ProtocolException;\n case 6:\n return DegradeException;\n case 7:\n return SecurityException;\n case 8:\n return ServiceException;\n case 9:\n return RemoteException;\n default:\n return null;\n }\n }", "public static DealingOrderStateType findByValue(int value) { \n switch (value) {\n case 0:\n return NEW;\n case 1:\n return VERIFY_FAIL;\n case 2:\n return VERIFIED;\n case 3:\n return INPUT_SUCCESS;\n case 4:\n return INPUT_FAIL;\n case 5:\n return UPSIDE_ACCEPTED;\n case 6:\n return UPSIDE_REJECTED;\n case 7:\n return UPSIDE_UNTOUCHED;\n case 8:\n return UPSIDE_TOUCHED;\n case 9:\n return UPSIDE_WORKING;\n case 10:\n return UPSIDE_CANCELING;\n case 11:\n return UPSIDE_PART_FILLED;\n case 12:\n return UPSIDE_SUSPENDED;\n case 13:\n return CANCELED;\n case 14:\n return FILLED;\n case 15:\n return EXPIRED;\n case 16:\n return REQUEST_CANCEL;\n case 17:\n return CANCELING;\n default:\n return null;\n }\n }", "public T caseIntEnum(IntEnum object)\n {\n return null;\n }", "public static Profile lookup(int value) {\n for (Profile p: values()) {\n if (value == p.value)\n return p;\n }\n return null;\n }", "public static Attributes convert(int value) {\n for (Attributes v : Attributes.values()) {\n if (v.getValue() == value) {\n return v;\n }\n }\n return null;\n }", "public static VisualizationType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase HISTOGRAM_VALUE: return HISTOGRAM;\n\t\t\tcase SCATTERPLOT_VALUE: return SCATTERPLOT;\n\t\t}\n\t\treturn null;\n\t}", "public static TopmarkType get(int value) {\n\t\tswitch (value) {\n\t\t\tcase UNKNOWN_VALUE: return UNKNOWN;\n\t\t\tcase CYLINDER_VALUE: return CYLINDER;\n\t\t\tcase CONE_UP_VALUE: return CONE_UP;\n\t\t\tcase CONE_DOWN_VALUE: return CONE_DOWN;\n\t\t\tcase XCROSS_VALUE: return XCROSS;\n\t\t\tcase BALL_VALUE: return BALL;\n\t\t\tcase UPRIGHT_CROSS_VALUE: return UPRIGHT_CROSS;\n\t\t\tcase RHOMBUS_VALUE: return RHOMBUS;\n\t\t\tcase FLAG_VALUE: return FLAG;\n\t\t}\n\t\treturn null;\n\t}", "public static SheetTraitEnum get(String literal) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tSheetTraitEnum result = VALUES_ARRAY[i];\r\n\t\t\tif (result.toString().equals(literal)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "int getFromValue();", "public static ALFormat getEnum(int value)\n {\n switch (value)\n {\n case AL_FORMAT_MONO8:\n return MONO_8;\n case AL_FORMAT_MONO16:\n return MONO_16;\n case AL_FORMAT_STEREO8:\n return STEREO_8;\n case AL_FORMAT_STEREO16:\n return STEREO_16;\n }\n\n throw new SilenceException(\"Unknown format value: \" + value);\n }", "public String getElement()\n {\n return \"enum\";\n }", "public org.ccsds.moims.mo.mal.structures.UInteger getNumericValue()\n {\n return _ENUMERATION_NUMERIC_VALUES[ordinal];\n }", "private static String findNumber() {\n\t\treturn null;\r\n\t}", "public static StatusType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tStatusType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public org.apache.xmlbeans.XmlString xgetEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLID$10);\n return target;\n }\n }", "public static Severity_MIL_STD_882D get(int value) {\n\t\tswitch (value) {\n\t\t\tcase NEGLIGIBLE_IV_VALUE: return NEGLIGIBLE_IV;\n\t\t\tcase MARGINAL_III_VALUE: return MARGINAL_III;\n\t\t\tcase CRITICAL_II_VALUE: return CRITICAL_II;\n\t\t\tcase CATASTROPHIC_I_VALUE: return CATASTROPHIC_I;\n\t\t}\n\t\treturn null;\n\t}", "public static StatusType get(String literal) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tStatusType result = VALUES_ARRAY[i];\n\t\t\tif (result.toString().equals(literal)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static Template get(int value) {\n\t\tswitch (value) {\n\t\t\tcase LINUX_64_232_75H_VALUE: return LINUX_64_232_75H;\n\t\t}\n\t\treturn null;\n\t}", "public Enum<?> findEnum(final String key) {\n Enum<?> en = _enumsById.get(key);\n if (en == null) {\n if (_isIgnoreCase) {\n return _findEnumCaseInsensitive(key);\n }\n }\n return en;\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Constants.cpp\", line = 791,\n FQN=\"llvm::UndefValue::getElementValue\", NM=\"_ZNK4llvm10UndefValue15getElementValueEj\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Constants.cpp -nm=_ZNK4llvm10UndefValue15getElementValueEj\")\n //</editor-fold>\n public UndefValue /*P*/ getElementValue(/*uint*/int Idx) /*const*/ {\n if (isa_SequentialType(getType())) {\n return getSequentialElement();\n }\n return getStructElement(Idx);\n }", "int getIndexOfElement(T value);", "public static PortType get(int value)\n {\n switch (value)\n {\n case INPUT_EN_VALUE: return INPUT_EN;\n case INPUT_RU_VALUE: return INPUT_RU;\n case OUTPUT_EN_VALUE: return OUTPUT_EN;\n case OUTPUT_RU_VALUE: return OUTPUT_RU;\n }\n return null;\n }", "public static NotificationEvent findByValue(int value) { \n switch (value) {\n case 1:\n return NamedMentionMessage;\n case 2:\n return RoleMentionMessage;\n case 3:\n return AllMentionMessage;\n case 4:\n return ActionRequired;\n case 5:\n return AddRole;\n case 6:\n return RemoveRole;\n case 7:\n return JobStart;\n case 8:\n return JobComplete;\n case 9:\n return JobReopen;\n case 10:\n return IssueCreate;\n case 11:\n return IssueResolve;\n case 12:\n return IssueReopen;\n case 13:\n return StandaloneIssueCreate;\n case 14:\n return StandaloneIssueResolve;\n case 15:\n return StandaloneIssueReopen;\n case 16:\n return ThreadNamedMentionMessage;\n case 17:\n return Deviation;\n case 18:\n return Generic;\n default:\n return null;\n }\n }", "ValueType getValue();", "public static Accumulator get(int value) {\n\t\tswitch (value) {\n\t\t\tcase SUM_VALUE: return SUM;\n\t\t\tcase MAXIMUM_VALUE: return MAXIMUM;\n\t\t\tcase MINIMUM_VALUE: return MINIMUM;\n\t\t\tcase AVERAGE_VALUE: return AVERAGE;\n\t\t\tcase STANDARD_DEVIATION_VALUE: return STANDARD_DEVIATION;\n\t\t\tcase PRODUCT_VALUE: return PRODUCT;\n\t\t\tcase CUSTOM_VALUE: return CUSTOM;\n\t\t}\n\t\treturn null;\n\t}", "public Integer getValue();", "public static SheetTraitEnum get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase SHEET_TRAITS_NONE_VALUE: return SHEET_TRAITS_NONE;\r\n\t\t\tcase SHEET_TRAITS_ROWS_VALUE: return SHEET_TRAITS_ROWS;\r\n\t\t\tcase SHEET_TRAITS_COLUMNS_VALUE: return SHEET_TRAITS_COLUMNS;\r\n\t\t\tcase SHEET_TRAITS_GRID_VALUE: return SHEET_TRAITS_GRID;\r\n\t\t\tcase SHEET_TRAITS_BARCHART_VALUE: return SHEET_TRAITS_BARCHART;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static OptimallityCriterionKind get(int value) {\r\n\t\tswitch (value) {\r\n\t\t\tcase MEET_HARD_DEADLINES: return MEET_HARD_DEADLINES_LITERAL;\r\n\t\t\tcase MINIMIZE_MISSED_DEADLINES: return MINIMIZE_MISSED_DEADLINES_LITERAL;\r\n\t\t\tcase MINIMIZED_MEAN_TARDINESS: return MINIMIZED_MEAN_TARDINESS_LITERAL;\r\n\t\t\tcase UNDEF: return UNDEF_LITERAL;\r\n\t\t\tcase OTHER: return OTHER_LITERAL;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public ValueDecl lookupValue(Identifier name) {\n Pair<Integer, ValueDecl> entry = valueScope.get(name);\n if (entry == null) return null;\n return entry.getRight();\n }", "public static ConflictResolution get(int value)\n {\n switch (value)\n {\n case ROLLBACK_VALUE: return ROLLBACK;\n case ABORT_VALUE: return ABORT;\n case FAIL_VALUE: return FAIL;\n case IGNORE_VALUE: return IGNORE;\n case REPLACE_VALUE: return REPLACE;\n }\n return null;\n }", "public static IntegrityControlOption get(int value) {\n\t\tswitch (value) {\n\t\t\tcase ALL: return ALL_LITERAL;\n\t\t\tcase SELECTIVE: return SELECTIVE_LITERAL;\n\t\t\tcase NONE: return NONE_LITERAL;\n\t\t}\n\t\treturn null;\n\t}", "public java.lang.String getEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public static Category getCategoryStringFromInt(int num) {\n for (Category item : Category.values ()) {\n if (item.num == num) {\n return item;\n }\n }\n return null;\n }", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value xgetValue();", "String highValue(String comp) { return null; }", "public static ControlCHCostants getEnumFromRestOrOmocodia(int num) {\n\t\tfor (int i = 0; i<ControlCHCostants.values().length; i++)\n\t\t\tif (String.valueOf(num).equalsIgnoreCase(ControlCHCostants.values()[i].getRestOrOmocodia()))\n\t\t\t\treturn ControlCHCostants.values()[i];\n\t\treturn null;\n\t}", "int provideValue();", "E getValue();", "private static Class<?> enumLiteralValueTypeOf(Class<? extends Enum<?>> enumType) {\r\n\t\tEnum<?>[] enumValues = enumType.getEnumConstants();\r\n\t\tif (enumValues != null) {\r\n\t\t\tfor (Enum<?> enumValue : enumValues) {\r\n\t\t\t\tif (enumValue instanceof DBEnumValue) {\r\n\t\t\t\t\tObject code = ((DBEnumValue<?>) enumValue).getCode();\r\n\t\t\t\t\tif (code != null) {\r\n\t\t\t\t\t\treturn code.getClass();\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 null;\r\n\t}", "public int getValue();", "public int getValue();", "public static EnumCardNumber fromString(String s) {\r\n\t\ttry {\r\n\t\t\tInteger index = Integer.parseInt(s);\r\n\t\t\treturn getNumbers().get(index - 1);\r\n\t\t} catch (Exception e) {\r\n\t\t\tswitch (s.toLowerCase()) {\r\n\t\t\tcase \"one\":\r\n\t\t\t\treturn ONE;\r\n\t\t\tcase \"two\":\r\n\t\t\t\treturn TWO;\r\n\t\t\tcase \"three\":\r\n\t\t\t\treturn THREE;\r\n\t\t\tcase \"four\":\r\n\t\t\t\treturn FOUR;\r\n\t\t\tcase \"five\":\r\n\t\t\t\treturn FIVE;\r\n\t\t\tcase \"six\":\r\n\t\t\t\treturn SIX;\r\n\t\t\tcase \"seven\":\r\n\t\t\t\treturn SEVEN;\r\n\t\t\tcase \"eight\":\r\n\t\t\t\treturn EIGHT;\r\n\t\t\tcase \"nine\":\r\n\t\t\t\treturn NINE;\r\n\t\t\tcase \"ten\":\r\n\t\t\t\treturn TEN;\r\n\t\t\tcase \"jack\":\r\n\t\t\t\treturn JACK;\r\n\t\t\tcase \"king\":\r\n\t\t\t\treturn KING;\r\n\t\t\tcase \"queen\":\r\n\t\t\t\treturn QUEEN;\r\n\t\t\tcase \"ace\":\r\n\t\t\t\treturn ACE;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public static EnumType func_176879_a(int p_176879_0_) {\n/* */ if (p_176879_0_ < 0 || p_176879_0_ >= field_176885_g.length) {\n/* */ p_176879_0_ = 0;\n/* */ }\n/* */ return field_176885_g[p_176879_0_];\n/* */ }", "public static Library getEnum(String value) throws IllegalArgumentException {\n for (Library e : Library.values()) {\n if (e.getInternalPluginName().equalsIgnoreCase(value))\n return e;\n }\n\n throw new IllegalArgumentException(\"There is no library called '\" + value + \"'!\");\n }", "public void testNullEnum () {\n\t\tString example = null;\n\t\ttry {\n\t\t SamplingRate temp = SamplingRate.valueForString(example);\n assertNull(\"Result of valueForString should be null.\", temp);\n\t\t}\n\t\tcatch (NullPointerException exception) {\n fail(\"Null string throws NullPointerException.\");\n\t\t}\n\t}", "public static RecordStatusEnum get(String string) {\n if (string == null) {\n return null;\n }\n try {\n Integer id = Integer.valueOf(string);\n RecordStatusEnum enumeration = getById(id);\n if (enumeration != null) {\n return enumeration;\n }\n }\n catch (Exception e) {\n // ignore\n }\n return getByLabel(string);\n }", "public static EndConditionTypes get(int value)\n {\n switch (value)\n {\n case STEPS_VALUE: return STEPS;\n case PARAMETER_VALUE: return PARAMETER;\n case STATE_VALUE: return STATE;\n }\n return null;\n }", "public static APIVersionType get(String literal) {\n for (int i = 0; i < VALUES_ARRAY.length; ++i) {\n APIVersionType result = VALUES_ARRAY[i];\n if (result.toString().equals(literal)) {\n return result;\n }\n }\n return null;\n }", "public static FileType get(int value) {\n\t\tswitch(value) {\n\t\t\tcase DETECT_VALUE:\n\t\t\t\treturn DETECT;\n\t\t\tcase PUPPET_ROOT_VALUE:\n\t\t\t\treturn PUPPET_ROOT;\n\t\t\tcase MODULE_ROOT_VALUE:\n\t\t\t\treturn MODULE_ROOT;\n\t\t\tcase SINGLE_SOURCE_FILE_VALUE:\n\t\t\t\treturn SINGLE_SOURCE_FILE;\n\t\t}\n\t\treturn null;\n\t}", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "public static MessageStatus get(int value) {\n\t\tswitch (value) {\n\t\t\tcase READY_VALUE: return READY;\n\t\t\tcase TRASMITTED_VALUE: return TRASMITTED;\n\t\t\tcase ERROR_VALUE: return ERROR;\n\t\t}\n\t\treturn null;\n\t}", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();", "int getTypeValue();" ]
[ "0.6047513", "0.57411605", "0.56550264", "0.5528253", "0.54863906", "0.5484191", "0.54524237", "0.54451483", "0.5431135", "0.5390254", "0.53841245", "0.5368953", "0.53584015", "0.53573245", "0.53560954", "0.53226846", "0.53192353", "0.5310058", "0.53041774", "0.5300088", "0.5263238", "0.5263238", "0.52037835", "0.5192254", "0.5191595", "0.5185598", "0.5176338", "0.5175218", "0.51638204", "0.51473594", "0.5136475", "0.51306736", "0.5110673", "0.510595", "0.50991356", "0.5088011", "0.5087079", "0.50648105", "0.50597066", "0.50513047", "0.5049603", "0.50485945", "0.5048303", "0.503408", "0.5016589", "0.5016124", "0.49882635", "0.4983229", "0.49800077", "0.49734983", "0.49730375", "0.49644676", "0.4959524", "0.49549907", "0.4951138", "0.49505183", "0.4948193", "0.4945931", "0.49452224", "0.49425945", "0.49415225", "0.4940181", "0.49371094", "0.49161416", "0.49126804", "0.49081847", "0.4894416", "0.48761216", "0.48735145", "0.4868066", "0.48675865", "0.4865536", "0.4865063", "0.48642117", "0.48642117", "0.48596084", "0.48468068", "0.48448235", "0.48367676", "0.48261902", "0.4823059", "0.48214105", "0.48210746", "0.48177025", "0.48177025", "0.48177025", "0.48177025", "0.48177025", "0.48124403", "0.48107967", "0.48107967", "0.48107967", "0.48107967", "0.48107967", "0.48107967", "0.48107967", "0.48107967", "0.48107967", "0.48107967", "0.48107967" ]
0.6630527
0
Returns the numeric value of the enumeration element.
public org.ccsds.moims.mo.mal.structures.UInteger getNumericValue() { return _ENUMERATION_NUMERIC_VALUES[ordinal]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Number getValue() {\n return (Number) getAttributeInternal(VALUE);\n }", "public int getValue()\n {\n try\n {\n return (Integer) AlphaComposite.class.getField(name).get(null);\n }\n catch (Exception e)\n {\n return -1;\n }\n }", "public int getNumericValue() {\n return value;\n }", "Integer getValue();", "Integer getValue();", "public int getVal()\n {\n return this.ordinal();\n }", "public int getNumericValue() {\n return value;\n }", "public Integer getValue();", "public int getValue() {\n\t\treturn this.getValue();\n\t}", "gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value.Enum getValue();", "public int getValue();", "public int getValue();", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "@Override\n public int getValue() {\n return Integer.parseInt(gValue.getText());\n }", "public int getValue() {\r\n\t\treturn this.value;\r\n\t}", "public int getValue() {\r\n\t\treturn this.value;\r\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn this.value;\n\t}", "public int getValue() {\n\t\t\treturn value;\n\t\t}", "public int getValue()\n\t{\n\t\treturn value;\n\t}", "public int getValue()\n\t{\n\t\treturn value;\n\t}", "public int getValue()\n\t{\n\t\treturn value;\n\t}", "public int getNumericValue() {\n return Integer.parseInt(value);\n }", "public int getValue ()\r\n\t{\r\n\t\treturn (m_value);\r\n\t}", "public double getValue() {\n return this.num;\n }", "public int getValue(){\n\t\treturn value;\n\t}", "public int getValue() {\n\t\t \treturn ordinal();\n\t\t }", "public int getValue() {\r\n return value;\r\n }", "public int getValue() {\n\t\treturn mValue;\n\t}", "public int getValue() {\n return value_;\n }", "public int getIntValue(){\n\t\treturn value.intValue();\n\t}", "public Number getNumberValue();", "public int getValue()\n {\n return value;\n }", "public int getValue() {\n return this.value;\n }", "public int getValue() {\n return this.value;\n }", "public int getValue() {\n return this.value;\n }", "public int getValue() {\n return this.value;\n }", "public int getValue() {\n\t\treturn _value;\n\t}", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\r\n return value;\r\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return this.value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return this.value;\n }", "public int getValue()\r\n {\r\n return value;\r\n }", "public int getValue() {\n return value_;\n }", "public int getValue() {\n return value_;\n }", "public int getValue() {\r\n return value;\r\n }", "public int getValue() {\r\n return Value;\r\n }", "public int getValue()\n {\n return mi_value;\n }", "public int getValue()\n {\n return mi_value;\n }", "public int getIntValue() {\n return (int)getValue();\n }", "public int getValue () {\n return value;\n }", "public int getValue()\n {\n return value;\n }", "public final int getValue() {\n return mValue;\n }", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "public int getValue() {\n return m_value;\n }", "public int value() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\n return value_;\n }", "Num\t\tgetNumValue();", "org.apache.xmlbeans.XmlInt xgetValue();", "public int getValue() {\n return mValue;\n }", "@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}", "@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n return _value;\n }", "public static int getValueInt()\n {\n return Util.valueInt;\n }" ]
[ "0.7172482", "0.6815756", "0.6801482", "0.67430174", "0.67430174", "0.67170936", "0.67154014", "0.6606123", "0.6605353", "0.6592658", "0.6573109", "0.6573109", "0.65634644", "0.65634644", "0.65634644", "0.65634644", "0.65634644", "0.65634644", "0.65634644", "0.65634644", "0.653979", "0.6536428", "0.6536428", "0.65340173", "0.65340173", "0.65340173", "0.65340173", "0.6517423", "0.651447", "0.6487161", "0.6487161", "0.6487161", "0.6451916", "0.644379", "0.6436677", "0.6411516", "0.6408028", "0.6407625", "0.6403366", "0.6402944", "0.64014", "0.6401057", "0.64006674", "0.6400654", "0.6400654", "0.6400654", "0.6400654", "0.6399348", "0.639733", "0.639733", "0.639733", "0.639733", "0.639733", "0.639733", "0.63970995", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6393072", "0.6386868", "0.63846546", "0.63846546", "0.6378643", "0.63761103", "0.63722825", "0.63722825", "0.63679796", "0.6366999", "0.6358981", "0.6358981", "0.6357798", "0.6356645", "0.6346738", "0.63336223", "0.6328949", "0.6328949", "0.6328949", "0.6328949", "0.6328949", "0.6322978", "0.6320102", "0.6296087", "0.6295927", "0.6287677", "0.62841743", "0.62727726", "0.62727726", "0.6262354", "0.6255938" ]
0.77022606
0
Returns an instance of this type using the first element of the enumeration. It is a generic factory method but just returns an existing element of the enumeration as new values of enumerations cannot be created at runtime.
public org.ccsds.moims.mo.mal.structures.Element createElement() { return _ENUMERATIONS[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Enumeration createEnumeration();", "public E first() \n throws NoSuchElementException {\n if (entries != null && \n size > 0 ) {\n position = 0;\n E element = entries[position]; \n position++;\n return element;\n } else {\n throw new NoSuchElementException();\n }\n }", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "EnumValue createEnumValue();", "EnumValue createEnumValue();", "EnumValue createEnumValue();", "Union0<First> first(First single);", "public Machine() {\n this(MachineType.values()[0]);\n }", "public Item getFirst();", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "public E getFirst();", "interface Factory<First> {\n /**\n * Creates a Union0 wrapping a value\n * \n * @param single the value\n * @return a Union0 object wrapping the value\n */\n Union0<First> first(First single);\n }", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public E queryFirst() {\n ValueHolder<E> result = ValueHolder.of(null);\n limit(1);\n doIterate(r -> {\n result.set(r);\n return false;\n });\n\n return result.get();\n }", "public VectorItem<O> firstVectorItem()\r\n {\r\n if (isEmpty()) return null; \r\n return first;\r\n }", "public static BasicEnum fromOrdinal(int ordinal)\n {\n return _ENUMERATIONS[ordinal];\n }", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "EEnum createEEnum();", "public static CommandElement firstParsing(CommandElement... elements) {\n return new FirstParsingCommandElement(ImmutableList.copyOf(elements));\n }", "public A first() {\n return first;\n }", "public SeriesInstance getInstanceFirstRep() {\n\t\tif (getInstance().isEmpty()) {\n\t\t\treturn addInstance();\n\t\t}\n\t\treturn getInstance().get(0); \n\t}", "public Builder clearEnumValue() {\n bitField0_ = (bitField0_ & ~0x00000200);\n enumValue_ = com.yahoo.xpathproto.TransformTestProtos.MessageEnum.FIRST;\n onChanged();\n return this;\n }", "T first();", "public SeleniumQueryObject first() {\n\t\treturn FirstFunction.first(this, this.elements);\n\t}", "EnumListValue createEnumListValue();", "public Object firstElement();", "public T first() throws EmptyCollectionException;", "public T first() throws EmptyCollectionException;", "public static StatusType create() {\n\n return valueOf(0);\n }", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public LinkedListIterator<AnyType> first() {\n return new LinkedListIterator<AnyType>(header.next);\n }", "public T getFirst();", "public T getFirst();", "public static <T extends EnumWithKey> T fromKey(Class<T> enumType, String key) {\n\t\tfor (T enumValue : enumType.getEnumConstants()) {\n\t\t\tif (enumValue.getKey().equals(key)) {\n\t\t\t\treturn enumValue;\n\t\t\t}\n\t\t}\n\n\t\tthrow new IllegalArgumentException(\"Invalid key: \" + key);\n\t}", "public final Node<N> first() {\n throw new UnsupportedOperationException();\n }", "EnumValueDefinition createEnumValueDefinition();", "public static RequirementType create(String name) {\n throw new IllegalStateException(\"Enum not extended\");\n }", "public static synchronized EnumFactory getInstance() {\n if (instance == null) {\n instance = new EnumFactory();\n }\n return instance;\n }", "public E getFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public BackendService first() {\n BackendService first = UtilKt.first(this);\n if (first == null) {\n throw new NoSuchElementException();\n }\n return first;\n }", "@NotNull\n public F getFirst() {\n return first;\n }", "public T first(int x)throws EmptyCollectionException, \n InvalidArgumentException;", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "public Unit firstOf(UnitType... unitTypes)\n\t{\n\t\tfor (UnitType type : unitTypes)\n\t\t{\n\t\t\tUnits subSet = whereType(type);\n\t\t\tif (subSet.size() > 0)\n\t\t\t{\n\t\t\t\treturn subSet.first();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public F first() {\n return this.first;\n }", "private TopLevelSimpleType createRoleEnumerationSimpleType(TLCoreObject source, boolean openEnumeration) {\n TopLevelSimpleType rolesEnum = new TopLevelSimpleType();\n Restriction restriction = new Restriction();\n\n if (openEnumeration) {\n rolesEnum.setName( source.getRoleEnumeration().getLocalName() + OPEN );\n rolesEnum.setRestriction( restriction );\n restriction.setBase( new QName( XMLConstants.W3C_XML_SCHEMA_NS_URI, \"string\" ) );\n\n } else { // closed enumeration\n rolesEnum.setName( source.getRoleEnumeration().getLocalName() + \"_Base\" );\n rolesEnum.setRestriction( restriction );\n restriction\n .setBase( new QName( source.getNamespace(), source.getRoleEnumeration().getLocalName() + OPEN ) );\n }\n\n for (TLRole role : PropertyCodegenUtils.getInheritedRoles( source )) {\n TLDocumentation doc = DocumentationFinder.getDocumentation( role );\n NoFixedFacet roleEnumValue = new NoFixedFacet();\n\n roleEnumValue.setValue( role.getName() );\n restriction.getFacets().add( jaxbObjectFactory.createEnumeration( roleEnumValue ) );\n\n if (doc != null) {\n ObjectTransformer<TLDocumentation,Annotation,CodeGenerationTransformerContext> docTransformer =\n getTransformerFactory().getTransformer( doc, Annotation.class );\n\n roleEnumValue.setAnnotation( docTransformer.transform( doc ) );\n }\n }\n if (openEnumeration) {\n NoFixedFacet otherEnumValue = new NoFixedFacet();\n\n otherEnumValue.setValue( TLBaseEnumerationCodegenTransformer.OPEN_ENUM_VALUE );\n restriction.getFacets().add( jaxbObjectFactory.createEnumeration( otherEnumValue ) );\n }\n return rolesEnum;\n }", "public Item sample() {\n if (this.isEmpty()) {\n throw new NoSuchElementException();\n }\n if (this.size == 1) {\n return this.storage[0];\n }\n else {\n return this.storage[StdRandom.uniform(this.currentIndex)];\n }\n }", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "private static Enumeration getEmptyEnum() {\r\n return Collections.enumeration(Collections.EMPTY_LIST);\r\n }", "public static <T> T getFirstElement(final Iterable<T> elements) {\n\t\treturn elements.iterator().next();\n\t}", "public A getFirst() { return first; }", "public T next() {\r\n if (!hasNext()) {\r\n throw new NoSuchElementException();\r\n }\r\n \r\n Random r = new Random();\r\n int rValue = r.nextInt(length);\r\n T next = items[rValue];\r\n // Switch rValue with last item if it is not last item\r\n if (rValue != (length - 1)) {\r\n items[rValue] = items[length - 1];\r\n items[length - 1] = next;\r\n }\r\n length--;\r\n return next;\r\n }", "public static Enum forInt(int i)\r\n { return (Enum)table.forInt(i); }", "EnumRef createEnumRef();", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "EnumTypeDefinition createEnumTypeDefinition();", "public static LocalizedEnumFieldBuilder builder() {\n return LocalizedEnumFieldBuilder.of();\n }", "public Object getFirst() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.next.element;\r\n }", "public static <T> T first(\r\n\t\t\t@Nonnull final Observable<? extends T> source) {\r\n\t\tCloseableIterator<T> it = toIterable(source).iterator();\r\n\t\ttry {\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\treturn it.next();\r\n\t\t\t}\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} finally {\r\n\t\t\tCloseables.closeSilently(it);\r\n\t\t}\r\n\t}", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }", "public Iterator iterator () {\n return new MyIterator (first);\n }", "public EnumFactory() {\n countKeys = new int[EnumFactory.numberOfTypes];\n clearCounts();\n }", "public Type getTypeFirstRep() {\n\t\tif (getType().isEmpty()) {\n\t\t\treturn addType();\n\t\t}\n\t\treturn getType().get(0); \n\t}", "public StringListIterator first()\n {\n\treturn new StringListIterator(head);\n }", "public CustomMof14EnumLiteral createCustomMof14EnumLiteral();", "@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}", "public static DataStructure getEnum(String s) {\n for (DataStructure e : DataStructure.values())\n if (e.getString().equals(s))\n return e;\n return NONE;\n }", "EnumConstant createEnumConstant();", "public T getFirst() {\n return t;\n }", "@Override\n public E element() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return (E) array[0];\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic <T extends Enum<T>> T getEnum(String name, Class<T> enumClass) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Enum value of type \" + enumClass.getName() + \" required, but not specified\");\n\t\t}\n\t\tif (enumClass.isInstance(val)) {\n\t\t\treturn (T) val;\n\t\t}\n\t\ttry {\n\t\t\treturn Enum.valueOf(enumClass, String.valueOf(val));\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Enum value of type \" + enumClass.getName() + \" required, but found: \" + val);\n\t\t}\n\t}", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public ValueTypeElement getByValueType(IValueType valueType) {\n return new ValueTypeElement(valueType);\n }", "EEnumLiteral createEEnumLiteral();", "public static EnumDomain createEnumDomain() {\n\t\treturn new EnumDomain(new String[]{\"1\", \"2\", \"3\"});\n\t}", "public <S extends Component> Selection<S> selectFirst(final Class<S> type) {\n return new Selection<S>(type);\n }", "@Override\n\tpublic <T extends Enum<T>> T getAsEnum(final String key, final Class<T> eClass)\n\t{\n\t\treturn this.getEnumImpl(key, eClass, (T)null);\n\t}", "public Optional<E> first() {\n return Optional.ofNullable(queryFirst());\n }", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "@Override\r\n\t\tpublic E getFirst() {\n\t\t\treturn pair.getFirst();\r\n\t\t}", "public static M1.Builder setSingleEnum(M1.Builder caretAfterThis) {\n // EXPECT-NEXT: Proto2Lite.proto / M1.single_enum\n return caretAfterThis.setSingleEnum(\n // EXPECT-NEXT: Proto2Lite.proto / Shapes\n /* caretAfterThis */ Shapes.\n // EXPECT-NEXT: Proto2Lite.proto / CIRCLE\n /* caretAfterThis */ CIRCLE);\n }", "@SuppressWarnings({\"unchecked\", \"deprecation\"})\n protected static <T extends ExpandableStringEnum<T>> T fromString(String name, Class<T> clazz) {\n if (name == null) {\n return null;\n }\n\n ConcurrentHashMap<String, ?> clazzValues = VALUES.computeIfAbsent(clazz, key -> new ConcurrentHashMap<>());\n T value = (T) clazzValues.get(name);\n\n if (value != null) {\n return value;\n } else {\n MethodHandle ctor = CONSTRUCTORS.computeIfAbsent(clazz, ExpandableStringEnum::getDefaultConstructor);\n\n if (ctor == null) {\n // logged in ExpandableStringEnum::getDefaultConstructor\n return null;\n }\n\n try {\n value = (T) ctor.invoke();\n } catch (Throwable e) {\n LOGGER.warning(\"Failed to create {}, default constructor threw exception\", clazz.getName(), e);\n return null;\n }\n\n return value.nameAndAddValue(name, value, clazz);\n }\n }", "public Enum(String val) \n { \n set(val);\n }", "public UniqueElementException() {\n\t\t\n\t}", "public TurnHelper next() {\n return values()[ordinal() + 1];\n }", "public EnumC30728c fromValue(int i) {\n return EnumC30728c.fromValue(i);\n }", "public E getFirst() {\n return peek();\n }", "default T getOrCreate() {\n if(!isPresent()) {\n return create();\n }\n else {\n return get();\n }\n }", "public static Element addOrGet(String name)\n\t{\n\t\tString lowerName = name.toLowerCase();\n\t\t\n\t\tif(LIST_OF_ACTIVE_ELEMENT.containsKey(lowerName))\n\t\t\treturn LIST_OF_ACTIVE_ELEMENT.get(lowerName);\n\t\telse if(LIST_OF_UNACTIVE_ELEMENT.containsKey(lowerName))\n\t\t\treturn LIST_OF_UNACTIVE_ELEMENT.get(lowerName);\n\t\telse\n\t\t\treturn new Element(lowerName);\n\t}", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "public static AudioNormalizationAlgorithm fromValue(String value) {\n if (value == null || \"\".equals(value)) {\n throw new IllegalArgumentException(\"Value cannot be null or empty!\");\n }\n\n for (AudioNormalizationAlgorithm enumEntry : AudioNormalizationAlgorithm.values()) {\n if (enumEntry.toString().equals(value)) {\n return enumEntry;\n }\n }\n\n throw new IllegalArgumentException(\"Cannot create enum from \" + value + \" value!\");\n }", "public Enum() \n { \n set(\"\");\n }", "public OccurrenceInfo getFirstOccurrence() throws ServiceLocalException {\n\t\treturn (OccurrenceInfo) this.getPropertyBag()\n\t\t\t\t.getObjectFromPropertyDefinition(\n\t\t\t\t\t\tAppointmentSchema.FirstOccurrence);\n\t}", "public U getFirst(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(0);\r\n\t }", "public Item sample() {\n if (isEmpty()) throw new NoSuchElementException();\n return items[index()];\n }" ]
[ "0.5805049", "0.5600495", "0.5328425", "0.52964264", "0.52964264", "0.52964264", "0.5216509", "0.517003", "0.5168801", "0.516634", "0.51471055", "0.5143547", "0.5135568", "0.51193756", "0.50963795", "0.50800854", "0.50609374", "0.50540686", "0.5050975", "0.50501144", "0.5033835", "0.5025296", "0.49936152", "0.49775675", "0.49747205", "0.49723127", "0.4969485", "0.4969485", "0.49551496", "0.49521616", "0.49299622", "0.4925992", "0.4925992", "0.491028", "0.48990953", "0.48980492", "0.48840114", "0.48786712", "0.48671216", "0.48666924", "0.48657987", "0.48634112", "0.4857926", "0.48414075", "0.48312247", "0.48303866", "0.48162067", "0.48068216", "0.48044592", "0.47989956", "0.47888932", "0.478253", "0.47741827", "0.47618106", "0.47572377", "0.47536796", "0.47525978", "0.4752456", "0.474934", "0.47374642", "0.47322685", "0.47322685", "0.47322685", "0.4728808", "0.47236472", "0.47199038", "0.47088572", "0.47056055", "0.47056022", "0.47041374", "0.47031927", "0.46981794", "0.46969983", "0.46950623", "0.4685869", "0.4678364", "0.4669958", "0.46663076", "0.46654722", "0.46654505", "0.46537143", "0.46496242", "0.46460468", "0.46317083", "0.46317083", "0.46253517", "0.46198195", "0.46088338", "0.46073738", "0.46020916", "0.4600647", "0.45847067", "0.4577016", "0.45753214", "0.45689335", "0.45686492", "0.45686364", "0.45659333", "0.45653355", "0.45642298" ]
0.5794622
1
Encodes the value of this object using the provided MALEncoder.
public void encode(org.ccsds.moims.mo.mal.MALEncoder encoder) throws org.ccsds.moims.mo.mal.MALException { encoder.encodeUOctet(new org.ccsds.moims.mo.mal.structures.UOctet(ordinal.shortValue())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void encode(org.ccsds.moims.mo.mal.MALEncoder encoder) throws org.ccsds.moims.mo.mal.MALException\n {\n encoder.encodeNullableShort(counter);\n }", "public static void setEncodedBy( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, ENCODEDBY, value);\r\n\t}", "public void addEncodedBy( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), ENCODEDBY, value);\r\n\t}", "public void setEncodedBy( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), ENCODEDBY, value);\r\n\t}", "public static void addEncodedBy( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(model, instanceResource, ENCODEDBY, value);\r\n\t}", "public void setEncodedBy(Contact value) {\r\n\t\tBase.set(this.model, this.getResource(), ENCODEDBY, value);\r\n\t}", "public void encode(int value, BitOutput arithOut, BitOutput monoOut) throws IOException {\n\t\tif (value >= -arithmeticCodeThreshold && value <= arithmeticCodeThreshold) { // encode value by arithmetic coder\n\t\t\tarithmeticEncoder.encode(value + arithmeticCodeThreshold, arithOut);\n\t\t} else {\n\t\t\t// escape to switch fusion decoder to monotone decoder\n\t\t\tarithmeticEncoder.encode(FusionCoderConstants.ESCAPE_TO_SWITCH_TO_MONOTONE_CODE, arithOut);\n\t\t\tmonotoneEncoder.encode(value, monoOut);\n\t\t}\n\t}", "public void addEncodedBy(Contact value) {\r\n\t\tBase.add(this.model, this.getResource(), ENCODEDBY, value);\r\n\t}", "public BaseItem encode(Object model, Tokener tokener) {\n\t\treturn encode(model, tokener, filter);\n\t}", "Builder addEncoding(MediaObject value);", "public final void encode(ASN1Encoder enc, OutputStream out)\n throws IOException\n {\n content.encode(enc, out);\n return;\n }", "public MyEncodeableUsingEncoderDecoderClass() {}", "public interface Encoder<OutBuffer> {\n\n void encode(Context context, Type type, Object value, Object sourceContext, OutBuffer buffer) throws IOException;\n\n }", "public CNumberEncode get_encode();", "public IsaacRandom getEncode() {\n\t\treturn encode;\n\t}", "interface MessageEncoder\r\n{\r\n\tString encode();\t\r\n}", "public Builder setEncodingValue(int value) {\n encoding_ = value;\n bitField0_ |= 0x00000001;\n onChanged();\n return this;\n }", "@Override\n public void encode(BigEndianEncoder encoderV)\n {\n encoderV.encodeShort(this.id);\n // then encode the 16-bit flags\n encoderV.encodeShort(this.flag);\n // then encode QCOUNT\n encoderV.encodeShort(this.questionCount);\n // then encode ANCOUNT\n encoderV.encodeShort(this.answerCount);\n // then encode NSCOUNT\n encoderV.encodeShort(this.nameServerCount);\n // then encode ARCOUNT\n encoderV.encodeShort(this.additionalFullRRCount);\n\n\n }", "Object encodeObject(Object value);", "public abstract void encode(ByteBuffer buffer, int offset, int value);", "@Override\n public void encrypt() {\n algo.encrypt();\n String cypher = vigenereAlgo(true);\n this.setValue(cypher);\n }", "protected abstract byte[] encode(Object o) throws EncoderException;", "public String encode() {\n return encodeToBase64(encKey.getEncoded()) + \":\" + encodeToBase64(macKey.getEncoded());\n }", "public static void setEncodedBy(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) {\r\n\t\tBase.set(model, instanceResource, ENCODEDBY, value);\r\n\t}", "public interface Encoder<V,M> {\n public M encode(V objectToEncode) throws EncoderException ;\n}", "public static void addEncodedBy(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, Contact value) {\r\n\t\tBase.add(model, instanceResource, ENCODEDBY, value);\r\n\t}", "public String getEnryptedString() {\n this.enryptedString= encoderFunc();\n return this.enryptedString;\n }", "public String getEncoderId() {\n return this.mEncoderId;\n }", "public String getEncoded()\n\t{\n\t\treturn this.encodedText;\n\t}", "public String encodeVal()\n {\n return val;\n }", "Builder addEncoding(MediaObject.Builder value);", "Builder addEncodings(MediaObject value);", "public BlobName setEncoded(Boolean encoded) {\n this.encoded = encoded;\n return this;\n }", "@Override\n\tpublic void encode() {\n\t\tbyte[] messageData = encodeStarsMessage(message);\n\t\t\n\t\t// Allocate\n byte[] res = new byte[10 + messageData.length];\n\n // Write members\n Util.write16(res, 0, unknownWord0);\n Util.write16(res, 2, unknownWord2);\n Util.write16(res, 4, senderId);\n Util.write16(res, 6, receiverId);\n Util.write16(res, 8, unknownWord8);\n \n // Copy in message data\n System.arraycopy(messageData, 0, res, 10, messageData.length);\n \n // Save as decrypted data\n setDecryptedData(res, res.length);\n\t}", "public static void encodeObject(Object obj,String inEncodeType,String outEncodeType)throws Exception {\n try{\n Class destClass=obj.getClass();\n Method[] methods = destClass.getDeclaredMethods();\n for (int i = 0; i < methods.length; i++) {\n Method dm = methods[i];\n String methodName = dm.getName();\n String methodValue = null;\n String methodType=methodName.substring(0, 3);\n\n if (methodType.equalsIgnoreCase(\"set\")) {\n\n methodName = methodName.substring(3);\n try {\n //get sourObject value\n Method sm = destClass.getDeclaredMethod(\"get\" + methodName, null);\n methodValue = (String) sm.invoke(obj, null);\n //set destObject value\n if(methodValue!=null){\n //System.out.println(methodName+\"--\"+methodValue);\n\n Object[] args = {new String(methodValue.getBytes(inEncodeType), outEncodeType)};\n dm.invoke(obj, args);\n }\n }\n catch (Exception ex) {\n //check sourObject no this method,do nothing.\n }\n }\n }\n }catch (Exception ex) {\n\n throw ex;\n }\n\n }", "public FusionEncoder(ArithEncoder arithmeticEncoder, Encoder monotoneEncoder) {\n\t\tthis.arithmeticEncoder = arithmeticEncoder;\n\t\tthis.monotoneEncoder = monotoneEncoder;\n\t}", "private Encoder() {}", "public void setMessageEncoder(MessageEncoder<MessageType> messageEncoder);", "java.lang.String getEncoded();", "public String encode() {\n\t\tString encoded_string = ATTRIBUTE_FIELD;\n\t\tif (attribute != null)\n\t\t\tencoded_string += attribute.encode();\n\t\treturn encoded_string + Separators.NEWLINE;\n\t}", "public void encode(ProtoWriter iVar, ZABEMobileNetwork jVar) throws IOException {\n iVar.mo40528a(jVar.unknownFields());\n }", "void addEncoder(final MediaEncoder encoder) {\n\t\tif (encoder instanceof MediaVideoEncoderBase) {\n\t\t\tif (mVideoEncoder != null)\n\t\t\t\tthrow new IllegalArgumentException(\"Video encoder already added.\");\n\t\t\tmVideoEncoder = encoder;\n\t\t} else if (encoder instanceof MediaAudioEncoder) {\n\t\t\tif (mAudioEncoder != null)\n\t\t\t\tthrow new IllegalArgumentException(\"Video encoder already added.\");\n\t\t\tmAudioEncoder = encoder;\n\t\t} else\n\t\t\tthrow new IllegalArgumentException(\"unsupported encoder\");\n\t\tmEncoderCount = (mVideoEncoder != null ? 1 : 0) + (mAudioEncoder != null ? 1 : 0);\n\t}", "public String encode() {\n\t\tString coded = \"\";\n\t\tfor (Character c: this.input.toCharArray()) {\n\t\t\tcoded += this.mapping.get(c);\n\t\t}\n\t\treturn coded;\n\t}", "public BaseItem encode(Object model, Tokener tokener, Filter filter) {\n\t\tMapEntity map = new MapEntity(filter, flag, this, tokener);\n\t\tif (filter == null) {\n\t\t\tmap.withFilter(this.filter);\n\t\t}\n\t\tif (tokener == null) {\n\t\t\ttokener = jsonTokener;\n\t\t}\n\t\ttokener.withMap(this);\n\t\tBaseItem item = grammar.encode(model, map);\n\n\t\tif (item != null) {\n\t\t\treturn item;\n\t\t}\n\t\treturn encode(model, map);\n\t}", "public java.lang.String getAccountEncoderID() {\r\n return accountEncoderID;\r\n }", "public void setEncTxt(byte[] value) {\n this.encTxt = value;\n }", "public void setEncTxt(byte[] value) {\n this.encTxt = value;\n }", "public TreeNode encode(Node root) {\n return en(root);\n }", "public void setMediaEncryption(MediaEncryption menc);", "public void encode(ProtoWriter iVar, BackendService adVar) throws IOException {\n iVar.mo40528a(adVar.unknownFields());\n }", "public void setencodedCard(String value) {\r\n setAttributeInternal(ENCODEDCARD, value);\r\n }", "@Override\n\tpublic void encode(Crate object, IoBuffer buf) {\n\t}", "@Override\r\n\tpublic String encode() {\n\t\treturn null;\r\n\t}", "Builder addEncoding(String value);", "@Test\n public void encodeTiming()\n {\n final int max = 10000;\n final int value = 236;\n final BinaryEncoder encoder = new BinaryEncoder(256);\n\n long start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsDoubleArray(value);\n }\n\n long end = System.currentTimeMillis();\n logElapsedTime(\"double array\", start, end);\n\n start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsIntArray(value);\n }\n\n end = System.currentTimeMillis();\n logElapsedTime(\"int array\", start, end);\n\n start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsBitSet(value);\n }\n\n end = System.currentTimeMillis();\n logElapsedTime(\"bit set\", start, end);\n\n start = System.currentTimeMillis();\n\n for (int i = 0; i < max; i++)\n {\n encoder.encodeAsString(value);\n }\n\n end = System.currentTimeMillis();\n logElapsedTime(\"string\", start, end);\n }", "public String encodeValue (final Serializable value)\n throws EncodingException {\n\n final String encoding; // to be returned;\n\n try {\n\n // might throw an IO- or SecurityException;\n final String valueString = this.object2String(value);\n\n encoding = this.markEncodingString(valueString);\n\n } catch (final Exception ex) {\n\n final String message = String.format(\n ObjectStringConverter.ERROR_ENCODING_FAILED,\n value,\n ex.getMessage());\n\n throw new EncodingException(message);\n }\n\n return encoding;\n }", "public DataBuffer encode() {\n try {\n\n DataBuffer buffer = new DataBuffer();\n // length\n int length = Header.PROTOCOL_HEADER_LENGTH;\n if (mData != null) {\n length += mData.readableBytes();\n }\n buffer.writeInt(length);\n // header\n mHeader.setLength(length);\n buffer.writeDataBuffer(mHeader.encode(mHeader.getVersion()));\n // data\n buffer.writeDataBuffer(mData);\n\n return buffer;\n } catch (Exception e) {\n //logger.error(\"encode error!!!\", e);\n System.out.println(\"encode error!!\");\n throw new RuntimeException(\"encode error!!!\");\n }\n }", "public void setCode(byte[] code);", "public String encode() {\n\t\tString encoded_string;\n\t\tencoded_string = MEDIA_FIELD;\n\t\tif (media != null)\n\t\t\tencoded_string += media + Separators.SP + port;\n\t\t// Workaround for Microsoft Messenger contributed by Emil Ivov\n\t\t// Leave out the nports parameter as this confuses the messenger.\n\t\tif (nports > 1)\n\t\t\tencoded_string += Separators.SLASH + nports;\n\n\t\tif (proto != null)\n\t\t\tencoded_string += Separators.SP + proto;\n\n\t\tif (formats != null)\n\t\t\tencoded_string += Separators.SP + encodeFormats();\n\n\t\tencoded_string += Separators.NEWLINE;\n\t\treturn encoded_string;\n\t}", "String encode(Object obj);", "public abstract byte[] encode () throws IOException;", "public void setAccountEncoderID(java.lang.String accountEncoderID) {\r\n this.accountEncoderID = accountEncoderID;\r\n }", "public CodePointIterator base64Encode() {\n return base64Encode(Base64Alphabet.STANDARD, true);\n }", "protected String encode(AsciiValueEncoder enc)\n {\n // note: nothing in buffer, can't flush (thus no need to call to check)\n int last = enc.encodeMore(mBuffer, 0, mBuffer.length);\n if (enc.isCompleted()) { // fitted in completely?\n return new String(mBuffer, 0, last);\n }\n // !!! TODO: with Java 5, use StringBuilder instead\n StringBuffer sb = new StringBuffer(mBuffer.length << 1);\n sb.append(mBuffer, 0, last);\n do {\n last = enc.encodeMore(mBuffer, 0, mBuffer.length);\n sb.append(mBuffer, 0, last);\n } while (!enc.isCompleted());\n return sb.toString();\n }", "public interface Encoding {\n String encode(String encodeValue);\n String decode(String encodedValue);\n}", "public void setInputEncoding(org.apache.xmlbeans.XmlAnySimpleType inputEncoding)\n {\n generatedSetterHelperImpl(inputEncoding, INPUTENCODING$16, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public Encode(Path inputPath, Path outputPath) {\n this.inputPath = inputPath;\n this.outputPath = outputPath;\n }", "public void encode(int c, Writer out)\n throws IOException {\n out.write(c);\n }", "public long encode(long value) {\n\n return value ^ (value >> 1);\n }", "Builder addEncodings(MediaObject.Builder value);", "public abstract byte[] getEncoded();", "public void encodeBinary(Buf out)\n {\n out.u2(val.length()+1);\n for (int i=0; i<val.length(); ++i)\n out.u1(val.charAt(i));\n out.u1(0);\n }", "public interface IAudioEncoder {\n\n public interface IADTCallback {\n\n public void onAudioMetaInfo(byte[] meta);\n public void onAudioFrame(byte[] data, long presentationTimeUs);\n }\n\n public void setCallback(IADTCallback callback);\n public int startEncoder(int sampleRate, int channels, int bitrate);\n public int encodeFrame(byte[] data, long presentationTimeUs);\n public void stopEncoder();\n\n public MediaFormat getOutputFormat();\n}", "public static BinaryMessageEncoder<LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS> getEncoder() {\n return ENCODER;\n }", "private static String encodeWritable(Writable obj) throws IOException {\n DataOutputBuffer buf = new DataOutputBuffer();\n obj.write(buf);\n Base64 encoder = new Base64(0, null, true);\n byte[] raw = new byte[buf.getLength()];\n System.arraycopy(buf.getData(), 0, raw, 0, buf.getLength());\n return encoder.encodeToString(raw);\n }", "@Test\n public void encodeAsString()\n {\n int value = 3;\n BinaryEncoder encoder = new BinaryEncoder(16);\n String result = encoder.encodeAsString(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n assertEquals(\"0011\", result);\n\n value = 20; // > 16 outside range\n result = encoder.encodeAsString(value);\n if (IS_VERBOSE)\n {\n System.out.println(\"result = \" + result);\n }\n assertNotNull(result);\n assertEquals(\"0100\", result); // Best fit into 4 digits; ignores higher bits\n\n encoder = new BinaryEncoder(0.0, 360.0, 1.0);\n assertEquals(9, encoder.getLength());\n assertEquals(\"000000000\", encoder.encodeAsString(0.0));\n assertEquals(\"000000001\", encoder.encodeAsString(1.0));\n assertEquals(\"000101101\", encoder.encodeAsString(45.0));\n assertEquals(\"001011010\", encoder.encodeAsString(90.0));\n assertEquals(\"010110100\", encoder.encodeAsString(180.0));\n assertEquals(\"101101000\", encoder.encodeAsString(360.0));\n }", "public Boolean isEncoded() {\n return this.encoded;\n }", "IPayerEntry setCode(CD value);", "public DebugEncoder(Encoder ec) {\n this.ec = ec;\n }", "public String getEncodedValue() throws UnsupportedEncodingException {\n return URLEncoder.encode(this.value, \"UTF-8\");\n }", "public byte[] getEncoded() {\n return toByteArray(Integer.valueOf(this.intValue));\n }", "@Accessor(qualifier = \"encoding\", type = Accessor.Type.SETTER)\n\tpublic void setEncoding(final EncodingEnum value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(ENCODING, value);\n\t}", "@java.lang.Override\n public int getEncodingValue() {\n return encoding_;\n }", "public static BinaryMessageEncoder<Trip> getEncoder() {\n return ENCODER;\n }", "public Base64JavaUtilCodec() {\n this(Base64.getEncoder(), Base64.getMimeDecoder());\n }", "@java.lang.Override\n public int getEncodingValue() {\n return encoding_;\n }", "public MessageEncoder<MessageType> getMessageEncoder();", "@Override\n protected void doEncode(ByteArrayEncodingState encodingState) {\n CoderUtil.resetOutputBuffers(encodingState.outputs,\n encodingState.outputOffsets,\n encodingState.encodeLength);\n\n // MSREncodeData(encodeMatrix, encodingState.encodeLength, encodingState.inputs, encodingState.outputs);\n RSUtil.encodeData(gfTables, encodingState.encodeLength,\n encodingState.inputs,\n encodingState.inputOffsets, encodingState.outputs,\n encodingState.outputOffsets);\n }", "public static BinaryMessageEncoder<DNSLog> getEncoder() {\n return ENCODER;\n }", "private void encodePassword(User customer) {\n\t\tpasswordEncoder = new BCryptPasswordEncoder();\n\t\tcustomer.setPassword(passwordEncoder.encode(customer.getPassword()));\n\t}", "public static JSONEncoder getEncoder() throws CharonException {\n return encoder;\n }", "public void set(String value){\n this.value = new BigInteger(value).toByteArray();\n }", "public String encodeValue(String value) {\r\n\t\treturn (null == value) ? \"\" : JSONUtil.encodeString(value);\r\n\t}", "public void encodeValue(JsonCoder coder, JsonWriter sink)\n\t throws IOException, EncoderException\n {\n\tString separator0 = null;\n\n\tsink.beginObject();\n\t// Encode field 'utcTime'\n\ttry {\n\t DDateTime item1 = this.utcTime;\n\n\t if (item1 != null) {\n\t\t{\n\t\t separator0 = \",\";\n\t\t sink.encodeKey(\"utcTime\");\n\t\t item1.encodeValue(coder, sink);\n\t\t}\n\t } else if (coder.isEncodingOfAbsentComponentsEnabled()) {\n\t\tseparator0 = \",\";\n\t\tcoder.encodeAbsentComponent(sink, \"utcTime\");\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"utcTime\", \"DDateTime\");\n\t throw ee;\n\t}\n\t// Encode field 'long'\n\ttry {\n\t Longitude item1 = this._long;\n\n\t {\n\t\tsink.writeSeparator(separator0);\n\t\tsink.encodeKey(\"long\");\n\t\tcoder.encodeInteger(item1.longValue(), sink);\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"long\", \"Longitude\");\n\t throw ee;\n\t}\n\t// Encode field 'lat'\n\ttry {\n\t Latitude item1 = this.lat;\n\n\t {\n\t\tsink.writeSeparator();\n\t\tsink.encodeKey(\"lat\");\n\t\tcoder.encodeInteger(item1.longValue(), sink);\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"lat\", \"Latitude\");\n\t throw ee;\n\t}\n\t// Encode field 'elevation'\n\ttry {\n\t Elevation item1 = this.elevation;\n\n\t if (item1 != null) {\n\t\t{\n\t\t sink.writeSeparator();\n\t\t sink.encodeKey(\"elevation\");\n\t\t sink.encodeOctetString(item1.byteArrayValue(), item1.getSize());\n\t\t}\n\t } else if (coder.isEncodingOfAbsentComponentsEnabled()) {\n\t\tsink.writeSeparator();\n\t\tcoder.encodeAbsentComponent(sink, \"elevation\");\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"elevation\", \"Elevation\");\n\t throw ee;\n\t}\n\t// Encode field 'heading'\n\ttry {\n\t Heading item1 = this.heading;\n\n\t if (item1 != null) {\n\t\t{\n\t\t sink.writeSeparator();\n\t\t sink.encodeKey(\"heading\");\n\t\t coder.encodeInteger(item1.longValue(), sink);\n\t\t}\n\t } else if (coder.isEncodingOfAbsentComponentsEnabled()) {\n\t\tsink.writeSeparator();\n\t\tcoder.encodeAbsentComponent(sink, \"heading\");\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"heading\", \"Heading\");\n\t throw ee;\n\t}\n\t// Encode field 'speed'\n\ttry {\n\t TransmissionAndSpeed item1 = this.speed;\n\n\t if (item1 != null) {\n\t\t{\n\t\t sink.writeSeparator();\n\t\t sink.encodeKey(\"speed\");\n\t\t sink.encodeOctetString(item1.byteArrayValue(), item1.getSize());\n\t\t}\n\t } else if (coder.isEncodingOfAbsentComponentsEnabled()) {\n\t\tsink.writeSeparator();\n\t\tcoder.encodeAbsentComponent(sink, \"speed\");\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"speed\", \"TransmissionAndSpeed\");\n\t throw ee;\n\t}\n\t// Encode field 'posAccuracy'\n\ttry {\n\t PositionalAccuracy item1 = this.posAccuracy;\n\n\t if (item1 != null) {\n\t\t{\n\t\t sink.writeSeparator();\n\t\t sink.encodeKey(\"posAccuracy\");\n\t\t sink.encodeOctetString(item1.byteArrayValue(), item1.getSize());\n\t\t}\n\t } else if (coder.isEncodingOfAbsentComponentsEnabled()) {\n\t\tsink.writeSeparator();\n\t\tcoder.encodeAbsentComponent(sink, \"posAccuracy\");\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"posAccuracy\", \"PositionalAccuracy\");\n\t throw ee;\n\t}\n\t// Encode field 'timeConfidence'\n\ttry {\n\t TimeConfidence item1 = this.timeConfidence;\n\n\t if (item1 != null) {\n\t\t{\n\t\t sink.writeSeparator();\n\t\t sink.encodeKey(\"timeConfidence\");\n\t\t sink.writeString(item1.name());\n\t\t}\n\t } else if (coder.isEncodingOfAbsentComponentsEnabled()) {\n\t\tsink.writeSeparator();\n\t\tcoder.encodeAbsentComponent(sink, \"timeConfidence\");\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"timeConfidence\", \"TimeConfidence\");\n\t throw ee;\n\t}\n\t// Encode field 'posConfidence'\n\ttry {\n\t PositionConfidenceSet item1 = this.posConfidence;\n\n\t if (item1 != null) {\n\t\t{\n\t\t sink.writeSeparator();\n\t\t sink.encodeKey(\"posConfidence\");\n\t\t sink.encodeOctetString(item1.byteArrayValue(), item1.getSize());\n\t\t}\n\t } else if (coder.isEncodingOfAbsentComponentsEnabled()) {\n\t\tsink.writeSeparator();\n\t\tcoder.encodeAbsentComponent(sink, \"posConfidence\");\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"posConfidence\", \"PositionConfidenceSet\");\n\t throw ee;\n\t}\n\t// Encode field 'speedConfidence'\n\ttry {\n\t SpeedandHeadingandThrottleConfidence item1 = this.speedConfidence;\n\n\t if (item1 != null) {\n\t\t{\n\t\t sink.writeSeparator();\n\t\t sink.encodeKey(\"speedConfidence\");\n\t\t sink.encodeOctetString(item1.byteArrayValue(), item1.getSize());\n\t\t}\n\t } else if (coder.isEncodingOfAbsentComponentsEnabled()) {\n\t\tsink.writeSeparator();\n\t\tcoder.encodeAbsentComponent(sink, \"speedConfidence\");\n\t }\n\t} catch (Exception e) {\n\t EncoderException ee = EncoderException.wrapException(e);\n\t ee.appendFieldContext(\"speedConfidence\", \"SpeedandHeadingandThrottleConfidence\");\n\t throw ee;\n\t}\n\tsink.endObject();\n\n }", "public org.apache.xmlbeans.XmlAnySimpleType addNewInputEncoding()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlAnySimpleType target = null;\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().add_attribute_user(INPUTENCODING$16);\n return target;\n }\n }", "private void encode(){\r\n \r\n StringBuilder sb = new StringBuilder();\r\n \r\n /*\r\n *if a character code is >126 after adding the encryption key, subtract \r\n *95 to wrap\r\n */\r\n for(int i = 0; i < message.length(); i++){\r\n if(message.charAt(i) + key > 126){\r\n int wrappedKey = message.charAt(i) + key - 95;\r\n \r\n sb.append((char) wrappedKey);\r\n \r\n /*\r\n *if a character code ins't > 126 after adding the encryption key\r\n */\r\n } else{\r\n int wrappedKey = message.charAt(i) + key;\r\n sb.append( (char) wrappedKey);\r\n }\r\n }\r\n /*\r\n *case coded message to a string\r\n */\r\n codedMessage = sb.toString();\r\n }", "public interface ImageEncoder {\n\t/** Encodes an AWT image into a byte array in a particular format.\n\t */\n\tpublic byte[] encode(RenderedImage image) throws java.io.IOException;\n\t/** Return the quality of the image encoding.\n\t */\n\tpublic float getQuality();\n\t/** Sets the quality of the image encoding.\n\t * Simply does nothing if the encoder does not support it.\n\t */\n\tpublic void setQuality(float quality);\n\t/** Returns whether to encode the alpha transparency.\n\t */\n\tpublic boolean isEncodingAlpha();\n\t/** Sets whether to encode the alpha transparency.\n\t * Simply does nothing if the encoder does not support it.\n\t */\n\tpublic void setEncodingAlpha(boolean encodeAlpha);\n}", "public String getAudioEncoding() {\n return audioEncoding;\n }", "public BEREncoding\nber_encode()\n throws ASN1Exception\n{\n BEREncoding chosen = null;\n\n BEREncoding enc[];\n\n // Encoding choice: c_resultSets\n if (c_resultSets != null) {\n chosen = c_resultSets.ber_encode(BEREncoding.CONTEXT_SPECIFIC_TAG, 1);\n }\n\n // Encoding choice: c_badSet\n if (c_badSet != null) {\n if (chosen != null)\n throw new ASN1Exception(\"CHOICE multiply set\");\n chosen = c_badSet.ber_encode(BEREncoding.CONTEXT_SPECIFIC_TAG, 2);\n }\n\n // Encoding choice: c_relation\n if (c_relation != null) {\n if (chosen != null)\n throw new ASN1Exception(\"CHOICE multiply set\");\n chosen = c_relation.ber_encode(BEREncoding.CONTEXT_SPECIFIC_TAG, 3);\n }\n\n // Encoding choice: c_unit\n if (c_unit != null) {\n if (chosen != null)\n throw new ASN1Exception(\"CHOICE multiply set\");\n chosen = c_unit.ber_encode(BEREncoding.CONTEXT_SPECIFIC_TAG, 4);\n }\n\n // Encoding choice: c_distance\n if (c_distance != null) {\n if (chosen != null)\n throw new ASN1Exception(\"CHOICE multiply set\");\n chosen = c_distance.ber_encode(BEREncoding.CONTEXT_SPECIFIC_TAG, 5);\n }\n\n // Encoding choice: c_attributes\n if (c_attributes != null) {\n if (chosen != null)\n throw new ASN1Exception(\"CHOICE multiply set\");\n enc = new BEREncoding[1];\n enc[0] = c_attributes.ber_encode();\n chosen = new BERConstructed(BEREncoding.CONTEXT_SPECIFIC_TAG, 6, enc);\n }\n\n // Encoding choice: c_ordered\n if (c_ordered != null) {\n if (chosen != null)\n throw new ASN1Exception(\"CHOICE multiply set\");\n chosen = c_ordered.ber_encode(BEREncoding.CONTEXT_SPECIFIC_TAG, 7);\n }\n\n // Encoding choice: c_exclusion\n if (c_exclusion != null) {\n if (chosen != null)\n throw new ASN1Exception(\"CHOICE multiply set\");\n chosen = c_exclusion.ber_encode(BEREncoding.CONTEXT_SPECIFIC_TAG, 8);\n }\n\n // Check for error of having none of the choices set\n if (chosen == null)\n throw new ASN1Exception(\"CHOICE not set\");\n\n return chosen;\n}", "public MyEncodableUsingEncoderDecoderName() {}" ]
[ "0.6260239", "0.5766444", "0.5755569", "0.5746308", "0.56863475", "0.5662978", "0.564067", "0.5489805", "0.5416618", "0.5412908", "0.53323984", "0.5272881", "0.5256795", "0.5237658", "0.52374965", "0.5180428", "0.5171795", "0.51634264", "0.5143625", "0.5142661", "0.51316273", "0.5130227", "0.5119573", "0.5102616", "0.5081838", "0.508161", "0.50704217", "0.5059807", "0.5058258", "0.50159395", "0.49590054", "0.49116096", "0.49099255", "0.48931938", "0.4887481", "0.48769444", "0.48758522", "0.48701462", "0.48602912", "0.48419237", "0.48360175", "0.4832955", "0.48180184", "0.48123914", "0.48096886", "0.47779894", "0.47779894", "0.47656977", "0.4763522", "0.47534943", "0.47299764", "0.47267544", "0.47261792", "0.47259188", "0.47184053", "0.47117782", "0.4709262", "0.46919787", "0.46893352", "0.46876374", "0.46871743", "0.46789822", "0.46762326", "0.4670405", "0.46612525", "0.46599346", "0.46503395", "0.46364826", "0.46328506", "0.46316132", "0.46197906", "0.4619597", "0.46195793", "0.46144217", "0.461141", "0.4610478", "0.46045834", "0.45952806", "0.45904085", "0.45846948", "0.45819768", "0.45808762", "0.4572464", "0.45694554", "0.45669922", "0.4557522", "0.4551281", "0.45390296", "0.453466", "0.4530702", "0.4524067", "0.45187816", "0.45094904", "0.45048204", "0.45038038", "0.45000914", "0.44925755", "0.4485645", "0.44853196", "0.4475888" ]
0.685083
0
Decodes the value of this object using the provided MALDecoder.
public org.ccsds.moims.mo.mal.structures.Element decode(org.ccsds.moims.mo.mal.MALDecoder decoder) throws org.ccsds.moims.mo.mal.MALException { return fromOrdinal(decoder.decodeUOctet().getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BencodeValue decode() throws IOException\t{\n if (this.getNextIndicator() == -1)\n return null;\n //depending on the possible value of indicator, we decode into an appropriate Object\n if (this.indicator >= '0' && this.indicator <= '9')\n return this.decodeBytes();\n else if (this.indicator == 'i')\n return this.decodeNumber();\n else if (this.indicator == 'l')\n return this.decodeList();\n else if (this.indicator == 'd')\n return this.decodeMap();\n else\n throw new BencodeFormatException\n (\"Unknown indicator '\" + this.indicator + \"'\");\n }", "Object decode(String encoded);", "public void setDecoder(AuthDecoder decoder) {\n this.mDecoder = decoder;\n }", "public org.ccsds.moims.mo.mal.structures.Element decode(org.ccsds.moims.mo.mal.MALDecoder decoder) throws org.ccsds.moims.mo.mal.MALException\n {\n counter = decoder.decodeNullableShort();\n return this;\n }", "public IsaacRandom getDecode() {\n\t\treturn decode;\n\t}", "public Object decode(Object value) {\n\t\treturn decode(value, null, this.filter);\n\t}", "public String getDecoded()\n\t{\n\t\treturn this.decodedText;\n\t}", "@Override\n public Decoder<Object> getMapValueDecoder() {\n return _mapValueDecoder;\n }", "void decodeObject();", "public void decode() throws Exception {\n decodeFat();\n decodeDat();\n }", "public abstract Object decode(InputStream is) ;", "Object decodeObject(Object value);", "private Object decoding(BaseItem value, MapEntity map) {\n\t\tif (value instanceof JsonArray) {\n\t\t\treturn decodingJsonArray((JsonArray) value, map);\n\t\t}\n\t\tif (value instanceof XMLEntity) {\n\t\t\tCharacterBuffer buffer = new CharacterBuffer().with(value.toString());\n\t\t\treturn decodingXMLEntity(this.xmlTokener, buffer, map);\n\t\t}\n\t\tif (value instanceof ByteEntity) {\n\t\t\tByteEntity entity = (ByteEntity) value;\n\t\t\treturn byteTokener.decodeValue(entity, map);\n\t\t}\n\n\t\treturn decodingJsonObject((JsonObject) value, map);\n\t}", "public E decode(ArrayList<Integer> individual);", "String decodeString();", "public static JSONDecoder getDecoder() throws CharonException {\n return decoder;\n }", "public void decodeVal(String val)\n throws Exception\n { \n set(val); \n }", "public static BinaryMessageDecoder<BabbleValue> getDecoder() {\n return DECODER;\n }", "public Object decodeValue (final String value) throws EncodingException {\n\n final Object object;\n\n try {\n\n // might throw an EncodingException;\n final String valueString = this.unmarkEncodingString(value);\n\n // might throw an IllegalArgument-, IO-, Security- or\n // ClassNotFoundException;\n object = this.string2Object(valueString);\n\n } catch (final Exception ex) {\n\n final String message = String.format(\n ObjectStringConverter.ERROR_DECODING_FAILED,\n value,\n ex.getMessage());\n\n throw new EncodingException(message);\n }\n\n return object;\n }", "public static java.lang.Object decodeObject(com.webobjects.foundation.NSCoder coder){\n return null; //TODO codavaj!!\n }", "public Object decode(Object obj) throws DecoderException {\n/* 341 */ if (obj == null)\n/* 342 */ return null; \n/* 343 */ if (obj instanceof byte[])\n/* 344 */ return decode((byte[])obj); \n/* 345 */ if (obj instanceof String) {\n/* 346 */ return decode((String)obj);\n/* */ }\n/* 348 */ throw new DecoderException(\"Objects of type \" + obj.getClass().getName() + \" cannot be URL decoded\");\n/* */ }", "void setTextDecoder(TextDecoder decoder);", "void decode2(DataBuffer buffer, T object);", "T decode1(DataBuffer buffer);", "@Override\n public Message decode( String string ) throws DecodeException {\n try {\n byte[] data = EncodeUtil.decodeBase64Zipped( string );\n InputStream is = new ByteArrayInputStream( data );\n ObjectInputStream ois = new ObjectInputStream( is );\n Object o = ois.readObject();\n ois.close();\n return (Message) o;\n } catch ( Exception e ) {\n throw new RuntimeException( \"Unexpected error trying to decode object.\", e );\n }\n }", "public static BinaryMessageDecoder<Payload> getDecoder() {\n return DECODER;\n }", "public BencodeValue decodeBytes() throws IOException {\n int c = this.getNextIndicator();\n int num = c - '0';\n if (num < 0 || num > 9)\n throw new BencodeFormatException(\"Next char should be a digit, instead it is: '\"\n + (char)c + \"'\");\n this.indicator = 0;\n\n c = this.read();\n int i = c - '0';\n while (i >= 0 && i <= 9) {\n num = num*10 + i; //reconstruct a number digit by digit\n c = this.read();\n i = c - '0';\n }\n\n if (c != ':') {\n throw new BencodeFormatException(\"Next char should be a colon, instead it is: '\" +\n (char)c + \"'\");\n }\n return new BencodeValue(read(num));\n }", "public String decode(String pString) throws DecoderException {\n if (pString == null) {\n return null;\n }\n try {\n return decode(pString, getDefaultCharset());\n } catch(UnsupportedEncodingException e) {\n throw new DecoderException(e.getMessage());\n }\n }", "public String decode(String str) throws DecoderException {\n/* 295 */ if (str == null) {\n/* 296 */ return null;\n/* */ }\n/* */ try {\n/* 299 */ return decode(str, getDefaultCharset());\n/* 300 */ } catch (UnsupportedEncodingException e) {\n/* 301 */ throw new DecoderException(e.getMessage(), e);\n/* */ } \n/* */ }", "@Override\n\tpublic int decode(byte[] buffer, int offset) throws IOException {\n\t\tlong value = NeuronReader.readRawInt64(buffer, offset);\n\t\tunionCache.setLong(fieldIndex, value);\n\n\t\treturn NeuronReader.LONG_SIZE;\n\t}", "public static BinaryMessageDecoder<LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS> getDecoder() {\n return DECODER;\n }", "public static BinaryMessageDecoder<DeviceInfo> getDecoder() {\n return DECODER;\n }", "public DecodedJWT decode (String token) throws JWTDecodeException;", "int decodeInt();", "public Object decode(Object pObject) throws DecoderException {\n if (pObject == null) {\n return null;\n } else if (pObject instanceof byte[]) {\n return decode((byte[])pObject);\n } else if (pObject instanceof String) {\n return decode((String)pObject);\n } else {\n throw new DecoderException(\"Objects of type \" +\n pObject.getClass().getName() + \" cannot be quoted-printable decoded\"); \n \n }\n }", "byte decodeByte();", "public String decode(String message)\n\t{\n\t\treturn decode(message, 0);\n\t}", "public static BinaryMessageDecoder<Trip> getDecoder() {\n return DECODER;\n }", "@Override\n public Model decode(InputStream inStream) throws CoderException, IOException {\n long length = VarInt.decodeLong(inStream);\n if (length < 0) {\n throw new IOException(\"Invalid length \" + length);\n }\n\n InputStream limited = new CloseShieldInputStream(ByteStreams.limit(inStream, length));\n\n return Rio.parse(limited, \"\", RDF_FORMAT);\n }", "public static BinaryMessageDecoder<VehicleInfoAvro> getDecoder() {\n return DECODER;\n }", "public static BinaryMessageDecoder<TokenTransactions> getDecoder() {\n return DECODER;\n }", "public static BinaryMessageDecoder<LargeObjectAvro> getDecoder() {\n return DECODER;\n }", "public static BinaryMessageDecoder<BirthInfo> getDecoder() {\n return DECODER;\n }", "public String decode(String encoded) {\n\t\t// TODO fill this in.\n\t\tStringBuilder output = new StringBuilder();\n\n\t\tint i = 0;\n\t\twhile (i < encoded.length()) {\n\t\t\tStringBuilder characterBuilder = new StringBuilder();\n\n\t\t\twhile (!decodingTable.containsKey(characterBuilder.toString()))\n\t\t\t\tcharacterBuilder.append(encoded.charAt(i++));\n\n\t\t\toutput.append(decodingTable.get(characterBuilder.toString()));\n\t\t}\n\n\t\treturn output.toString();\n\t}", "public static BinaryMessageDecoder<ContentKey> getDecoder() {\n return DECODER;\n }", "public BencodeValue decodeList() throws IOException {\n int c = this.getNextIndicator();\n if (c != 'l') {\n throw new BencodeFormatException(\"List begins with 'l', not '\" +\n (char)c + \"'\");\n }\n this.indicator = 0;\n\n List<BencodeValue> result = new ArrayList<BencodeValue>();\n c = this.getNextIndicator();\n while (c != 'e') {\n result.add(this.decode());\n c = this.getNextIndicator();\n }\n this.indicator = 0;\n\n return new BencodeValue(result);\n }", "public String decode(String str, String charsetName) throws DecoderException, UnsupportedEncodingException {\n/* 276 */ if (str == null) {\n/* 277 */ return null;\n/* */ }\n/* 279 */ return new String(decode(StringUtils.getBytesUsAscii(str)), charsetName);\n/* */ }", "public FullPositionVector decodeValue(JsonCoder coder, JsonReader source)\n\t throws IOException, DecoderException\n {\n\tboolean[] present0 = new boolean[11];\n\n\tcoder.decodeObject(source);\n\tif (coder.hasMoreProperties(source, true))\n\t do {\n\t\tString tag0 = coder.nextProperty(source);\n\t\tFullPositionVector.__Tag t_tag0 = FullPositionVector.__Tag.getTagSub(tag0);\n\t\tif (t_tag0 == null) \n\t\t t_tag0 = FullPositionVector.__Tag._null_;\n\t\tswitch (t_tag0) {\n\t\t case __utcTime:\n\t\t // Decode field 'utcTime'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[0])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t if (this.utcTime == null)\n\t\t\t\tthis.utcTime = new DDateTime();\n\t\t\t this.utcTime.decodeValue(coder, source);\n\t\t\t present0[0] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"utcTime\", \"DDateTime\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case ___long:\n\t\t // Decode field 'long'\n\t\t try {\n\t\t\tif (present0[1])\n\t\t\t throw new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\tif (this._long == null)\n\t\t\t this._long = new Longitude();\n\t\t\tthis._long.setValue(coder.decodeInteger(source));\n\t\t\tpresent0[1] = true;\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"long\", \"Longitude\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __lat:\n\t\t // Decode field 'lat'\n\t\t try {\n\t\t\tif (present0[2])\n\t\t\t throw new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\tif (this.lat == null)\n\t\t\t this.lat = new Latitude();\n\t\t\tthis.lat.setValue(coder.decodeInteger(source));\n\t\t\tpresent0[2] = true;\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"lat\", \"Latitude\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __elevation:\n\t\t // Decode field 'elevation'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[3])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.elevation = new Elevation(coder.decodeOctetString(source));\n\t\t\t present0[3] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"elevation\", \"Elevation\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __heading:\n\t\t // Decode field 'heading'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[4])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t if (this.heading == null)\n\t\t\t\tthis.heading = new Heading();\n\t\t\t this.heading.setValue(coder.decodeInteger(source));\n\t\t\t present0[4] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"heading\", \"Heading\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __speed:\n\t\t // Decode field 'speed'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[5])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.speed = new TransmissionAndSpeed(coder.decodeOctetString(source));\n\t\t\t present0[5] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"speed\", \"TransmissionAndSpeed\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __posAccuracy:\n\t\t // Decode field 'posAccuracy'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[6])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.posAccuracy = new PositionalAccuracy(coder.decodeOctetString(source));\n\t\t\t present0[6] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"posAccuracy\", \"PositionalAccuracy\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __timeConfidence:\n\t\t // Decode field 'timeConfidence'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t String content1 = coder.decodeString(source);\n\t\t\t int idx1;\n\t\t\t TimeConfidence temp1;\n\n\t\t\t if (present0[7])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t idx1 = coder.resolveName(TimeConfidence.cConstantNameList, content1);\n\t\t\t if (idx1 < 0 )\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._not_enumerated, null, \"value = \" + content1);\n\t\t\t else\n\t\t\t\ttemp1 = TimeConfidence.cNamedNumbers[idx1];\n\t\t\t this.timeConfidence = temp1;\n\t\t\t present0[7] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"timeConfidence\", \"TimeConfidence\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __posConfidence:\n\t\t // Decode field 'posConfidence'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[8])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.posConfidence = new PositionConfidenceSet(coder.decodeOctetString(source));\n\t\t\t present0[8] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"posConfidence\", \"PositionConfidenceSet\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __speedConfidence:\n\t\t // Decode field 'speedConfidence'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[9])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.speedConfidence = new SpeedandHeadingandThrottleConfidence(coder.decodeOctetString(source));\n\t\t\t present0[9] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"speedConfidence\", \"SpeedandHeadingandThrottleConfidence\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t default:\n\t\t\tcoder.skipValue(source);\n\t\t\tbreak;\n\t\t}\n\t } while (coder.hasMoreProperties(source, false));\n\tif (!present0[0])\n\t this.utcTime = null;\n\tif (!present0[1])\n\t throw new DecoderException(ExceptionDescriptor._field_omit, \": 'long'\");\n\tif (!present0[2])\n\t throw new DecoderException(ExceptionDescriptor._field_omit, \": 'lat'\");\n\tif (!present0[3])\n\t this.elevation = null;\n\tif (!present0[4])\n\t this.heading = null;\n\tif (!present0[5])\n\t this.speed = null;\n\tif (!present0[6])\n\t this.posAccuracy = null;\n\tif (!present0[7])\n\t this.timeConfidence = null;\n\tif (!present0[8])\n\t this.posConfidence = null;\n\tif (!present0[9])\n\t this.speedConfidence = null;\n\treturn this;\n }", "public MovieObject(final SWFDecoder coder) throws IOException {\r\n type = coder.scanUnsignedShort() >>> Coder.LENGTH_FIELD_SIZE;\r\n length = coder.readUnsignedShort() & Coder.LENGTH_FIELD;\r\n if (length == Coder.IS_EXTENDED) {\r\n length = coder.readInt();\r\n }\r\n data = coder.readBytes(new byte[length]);\r\n }", "long decodeLong();", "public static BinaryMessageDecoder<AvroRide> getDecoder() {\n return DECODER;\n }", "public RTCMPackage decodeValue(JsonCoder coder, JsonReader source)\n\t throws IOException, DecoderException\n {\n\tboolean[] present0 = new boolean[33];\n\n\tcoder.decodeObject(source);\n\tif (coder.hasMoreProperties(source, true))\n\t do {\n\t\tString tag0 = coder.nextProperty(source);\n\t\tRTCMPackage.__Tag t_tag0 = RTCMPackage.__Tag.getTagSub(tag0);\n\t\tif (t_tag0 == null) \n\t\t t_tag0 = RTCMPackage.__Tag._null_;\n\t\tswitch (t_tag0) {\n\t\t case __anchorPoint:\n\t\t // Decode field 'anchorPoint'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[0])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t if (this.anchorPoint == null)\n\t\t\t\tthis.anchorPoint = new FullPositionVector();\n\t\t\t this.anchorPoint.decodeValue(coder, source);\n\t\t\t present0[0] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"anchorPoint\", \"FullPositionVector\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __rtcmHeader:\n\t\t // Decode field 'rtcmHeader'\n\t\t try {\n\t\t\tif (present0[1])\n\t\t\t throw new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\tthis.rtcmHeader = new RTCMHeader(coder.decodeOctetString(source));\n\t\t\tpresent0[1] = true;\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"rtcmHeader\", \"RTCMHeader\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1001:\n\t\t // Decode field 'msg1001'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[2])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1001 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[2] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1001\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1002:\n\t\t // Decode field 'msg1002'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[3])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1002 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[3] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1002\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1003:\n\t\t // Decode field 'msg1003'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[4])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1003 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[4] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1003\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1004:\n\t\t // Decode field 'msg1004'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[5])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1004 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[5] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1004\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1005:\n\t\t // Decode field 'msg1005'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[6])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1005 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[6] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1005\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1006:\n\t\t // Decode field 'msg1006'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[7])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1006 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[7] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1006\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1007:\n\t\t // Decode field 'msg1007'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[8])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1007 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[8] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1007\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1008:\n\t\t // Decode field 'msg1008'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[9])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1008 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[9] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1008\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1009:\n\t\t // Decode field 'msg1009'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[10])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1009 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[10] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1009\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1010:\n\t\t // Decode field 'msg1010'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[11])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1010 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[11] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1010\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1011:\n\t\t // Decode field 'msg1011'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[12])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1011 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[12] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1011\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1012:\n\t\t // Decode field 'msg1012'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[13])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1012 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[13] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1012\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1013:\n\t\t // Decode field 'msg1013'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[14])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1013 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[14] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1013\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1014:\n\t\t // Decode extension 'msg1014'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[15])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1014 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[15] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1014\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1015:\n\t\t // Decode extension 'msg1015'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[16])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1015 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[16] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1015\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1016:\n\t\t // Decode extension 'msg1016'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[17])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1016 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[17] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1016\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1017:\n\t\t // Decode extension 'msg1017'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[18])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1017 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[18] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1017\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1019:\n\t\t // Decode extension 'msg1019'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[19])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1019 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[19] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1019\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1020:\n\t\t // Decode extension 'msg1020'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[20])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1020 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[20] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1020\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1021:\n\t\t // Decode extension 'msg1021'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[21])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1021 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[21] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1021\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1022:\n\t\t // Decode extension 'msg1022'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[22])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1022 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[22] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1022\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1023:\n\t\t // Decode extension 'msg1023'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[23])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1023 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[23] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1023\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1024:\n\t\t // Decode extension 'msg1024'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[24])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1024 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[24] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1024\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1025:\n\t\t // Decode extension 'msg1025'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[25])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1025 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[25] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1025\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1026:\n\t\t // Decode extension 'msg1026'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[26])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1026 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[26] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1026\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1027:\n\t\t // Decode extension 'msg1027'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[27])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1027 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[27] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1027\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1029:\n\t\t // Decode extension 'msg1029'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[28])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1029 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[28] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1029\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1030:\n\t\t // Decode extension 'msg1030'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[29])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1030 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[29] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1030\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1031:\n\t\t // Decode extension 'msg1031'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[30])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1031 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[30] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1031\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t case __msg1032:\n\t\t // Decode extension 'msg1032'\n\t\t try {\n\t\t\tif (!coder.isNullValue(source)) {\n\t\t\t if (present0[31])\n\t\t\t\tthrow new DecoderException(ExceptionDescriptor._field_repeat, null);\n\t\t\t this.msg1032 = new OctetString(coder.decodeOctetString(source));\n\t\t\t present0[31] = true;\n\t\t\t}\n\t\t } catch (Exception e) {\n\t\t\tDecoderException de = DecoderException.wrapException(e);\n\t\t\tde.appendFieldContext(\"msg1032\", \"OCTET STRING\");\n\t\t\tthrow de;\n\t\t }\n\t\t break;\n\t\t default:\n\t\t\tcoder.skipValue(source);\n\t\t\tbreak;\n\t\t}\n\t } while (coder.hasMoreProperties(source, false));\n\tif (!present0[0])\n\t this.anchorPoint = null;\n\tif (!present0[1])\n\t throw new DecoderException(ExceptionDescriptor._field_omit, \": 'rtcmHeader'\");\n\tif (!present0[2])\n\t this.msg1001 = null;\n\tif (!present0[3])\n\t this.msg1002 = null;\n\tif (!present0[4])\n\t this.msg1003 = null;\n\tif (!present0[5])\n\t this.msg1004 = null;\n\tif (!present0[6])\n\t this.msg1005 = null;\n\tif (!present0[7])\n\t this.msg1006 = null;\n\tif (!present0[8])\n\t this.msg1007 = null;\n\tif (!present0[9])\n\t this.msg1008 = null;\n\tif (!present0[10])\n\t this.msg1009 = null;\n\tif (!present0[11])\n\t this.msg1010 = null;\n\tif (!present0[12])\n\t this.msg1011 = null;\n\tif (!present0[13])\n\t this.msg1012 = null;\n\tif (!present0[14])\n\t this.msg1013 = null;\n\tif (!present0[15])\n\t this.msg1014 = null;\n\tif (!present0[16])\n\t this.msg1015 = null;\n\tif (!present0[17])\n\t this.msg1016 = null;\n\tif (!present0[18])\n\t this.msg1017 = null;\n\tif (!present0[19])\n\t this.msg1019 = null;\n\tif (!present0[20])\n\t this.msg1020 = null;\n\tif (!present0[21])\n\t this.msg1021 = null;\n\tif (!present0[22])\n\t this.msg1022 = null;\n\tif (!present0[23])\n\t this.msg1023 = null;\n\tif (!present0[24])\n\t this.msg1024 = null;\n\tif (!present0[25])\n\t this.msg1025 = null;\n\tif (!present0[26])\n\t this.msg1026 = null;\n\tif (!present0[27])\n\t this.msg1027 = null;\n\tif (!present0[28])\n\t this.msg1029 = null;\n\tif (!present0[29])\n\t this.msg1030 = null;\n\tif (!present0[30])\n\t this.msg1031 = null;\n\tif (!present0[31])\n\t this.msg1032 = null;\n\treturn this;\n }", "public void decode()\n {\n if (null == escherRecords || 0 == escherRecords.size()){\n byte[] rawData = getRawData();\n convertToEscherRecords(0, rawData.length, rawData );\n }\n }", "public byte[] doDecoding(byte[] bArr) {\r\n return bArr == null ? null : Base64.decodeBase64(bArr);\r\n }", "public FullPositionVector decodeValue(BerCoder coder, DecoderInput source)\n\t throws DecoderException\n {\n\tint total_len0 = source.mLength;\n\tint end_pos0 = (total_len0 < 0) ? java.lang.Integer.MAX_VALUE : (source.position() + total_len0);\n\tint tag;\n\n\tdo {\n\t tag = source.decodeTagLength();\n\t if (tag == 0xA0) {\n\t\ttry {\n\t\t this.utcTime = new DDateTime();\n\t\t this.utcTime.decodeValue(coder, source);\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"utcTime\", \"DDateTime\");\n\t\t throw ee;\n\t\t}\n\t\ttag = source.decodeTagLength();\n\t }\n\t if (tag != 0x81)\n\t\tsource.raiseTagMismatchException(tag);\n\t try {\n\t\tthis._long = new Longitude(source.decodeLong());\n\t } catch (Exception e) {\n\t\tDecoderException ee = DecoderException.wrapException(e);\n\t\tee.appendFieldContext(\"long\", \"Longitude\");\n\t\tthrow ee;\n\t }\n\t tag = source.decodeTagLength();\n\t if (tag != 0x82)\n\t\tsource.raiseTagMismatchException(tag);\n\t try {\n\t\tthis.lat = new Latitude(source.decodeLong());\n\t } catch (Exception e) {\n\t\tDecoderException ee = DecoderException.wrapException(e);\n\t\tee.appendFieldContext(\"lat\", \"Latitude\");\n\t\tthrow ee;\n\t }\n\t if (source.position() >= end_pos0)\n\t\tbreak;\n\t tag = source.decodeTagLength();\n\t if (tag == 0)\n\t\tbreak;\n\t if (tag == 0x83 || tag == 0xA3) {\n\t\ttry {\n\t\t this.elevation = new Elevation(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"elevation\", \"Elevation\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x84) {\n\t\ttry {\n\t\t this.heading = new Heading(source.decodeLong());\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"heading\", \"Heading\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x85 || tag == 0xA5) {\n\t\ttry {\n\t\t this.speed = new TransmissionAndSpeed(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"speed\", \"TransmissionAndSpeed\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x86 || tag == 0xA6) {\n\t\ttry {\n\t\t this.posAccuracy = new PositionalAccuracy(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"posAccuracy\", \"PositionalAccuracy\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x87) {\n\t\ttry {\n\t\t int idx1 = TimeConfidence.indexOfValue(source.decodeInt());\n\t\t if (idx1 < 0)\n\t\t\tthrow new DecoderException(ExceptionDescriptor._not_enumerated, null);\n\t\t this.timeConfidence = TimeConfidence.cNamedNumbers[idx1];\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"timeConfidence\", \"TimeConfidence\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x88 || tag == 0xA8) {\n\t\ttry {\n\t\t this.posConfidence = new PositionConfidenceSet(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"posConfidence\", \"PositionConfidenceSet\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x89 || tag == 0xA9) {\n\t\ttry {\n\t\t this.speedConfidence = new SpeedandHeadingandThrottleConfidence(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"speedConfidence\", \"SpeedandHeadingandThrottleConfidence\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t for (;;) {\n\t\ttry {\n\t\t coder.skipContents(source);\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendExtensionContext(\"FullPositionVector\", -1);\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t} while(false);\n\n\tif (source.position() > end_pos0)\n\t throw new DecoderException(ExceptionDescriptor._inconsis_len, null);\n\tif (total_len0 < 0 && source.mLength != 0)\n\t throw new DecoderException(ExceptionDescriptor._non_std_eoc, null);\n\n\treturn this;\n }", "void decodeObjectArray();", "public String getDecod(String text) {\n Base64.Decoder decoder = Base64.getDecoder();\n return new String(decoder.decode(text));\n }", "public void decode(byte[] data)\n\t{\n\t\ttry\n\t\t{\n\n\t\t\tByteArrayInputStream bstream = new ByteArrayInputStream(data);\n\t\t\tDataInputStream istream = new DataInputStream(bstream);\n\t\t\tlevel = istream.readInt();\n\t\t\thp = istream.readInt();\n\t\t\tattack = istream.readInt();\n\t\t\tdefend = istream.readInt();\n\t\t\tmoney = istream.readInt();\n\t\t\texperience = istream.readInt();\n\t\t\tyellowKey = istream.readInt();\n\t\t\tblueKey = istream.readInt();\n\t\t\tredKey = istream.readInt();\n\t\t\tint can = istream.readInt();\n\t\t\t// canlookup\n\t\t\tif (can == 0)\n\t\t\t{\n\t\t\t\tcanLookup = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcanLookup = true;\n\t\t\t}\n\t\t\tcan = istream.readInt();\n\t\t\t// canjump\n\t\t\tif (can == 0)\n\t\t\t{\n\t\t\t\tcanJump = false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcanJump = true;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"decode error::\" + e);\n\t\t}\n\t}", "private static void decodeString(String in){\n\t\t//reverse anything done in encoded string\n\t\tString demess = decrypt(in);\n\t\tString decodeMessage = bigIntDecode(demess);\n\n\t\tSystem.out.println(\"Decoded message: \" + decodeMessage + \"***make function to actually decode!\");\n\t}", "public String decode( String encodedPassword );", "protected abstract void DecodeFromCBORObject(CBORObject messageObject) throws CoseException;", "public BencodeValue decodeMap() throws IOException {\n int c = this.getNextIndicator();\n if (c != 'd') {\n throw new BencodeFormatException(\"Dictionary begins with a 'd', not '\" +\n (char)c + \"'\");\n }\n this.indicator = 0;\n\n Map<String, BencodeValue> result = new LinkedHashMap<String, BencodeValue>();\n c = this.getNextIndicator();\n while (c != 'e') {\n // Dictionary keys are always strings.\n String key = this.decode().getString();\n\n BencodeValue value = this.decode();\n result.put(key, value);\n\n c = this.getNextIndicator();\n }\n this.indicator = 0;\n\n return new BencodeValue(result);\n }", "public interface SDecoder\n{\n\n public abstract Object decode(Object obj)\n throws SDecoderException;\n}", "public static BinaryMessageDecoder<LNDCDC_ADS_PRPSL_DEAL_PNT_FEAT_LN> getDecoder() {\n return DECODER;\n }", "IMessage decode(byte[] data) throws InvalidMessageException;", "public Object decodeEMF(String value, Object root) {\n\t\tif (value == null) {\n\t\t\treturn null;\n\t\t}\n\t\tEMFTokener tokener = new EMFTokener();\n\t\tMapEntity map = new MapEntity(filter, flag, this, tokener);\n\t\ttokener.withMap(this);\n\t\tCharacterBuffer buffer = new CharacterBuffer().with(value);\n\t\treturn tokener.decode(map, buffer, root);\n\t}", "public static BinaryMessageDecoder<InterceptTest> getDecoder() {\n return DECODER;\n }", "public ZABEMobileNetwork decode(ProtoReader hVar) throws IOException {\n C30677a aVar = new C30677a();\n long a = hVar.mo40516a();\n while (true) {\n int b = hVar.mo40518b();\n if (b != -1) {\n FieldEncoding c = hVar.mo40519c();\n aVar.addUnknownField(b, c, c.rawProtoAdapter().decode(hVar));\n } else {\n hVar.mo40517a(a);\n return aVar.build();\n }\n }\n }", "public String decode(Reader input) throws IOException\n\t{\n\t\treturn decode(input, 0);\n\t}", "public static String decode(String decode, String decodingName) {\r\n\t\tString decoder = \"\";\r\n\t\tif (decodingName.equalsIgnoreCase(\"base64\")) {\r\n\t\t\tbyte[] decoded = Base64.decodeBase64(decode);\r\n\t\t\ttry {\r\n\t\t\t\tdecoder = new String(decoded, \"UTF-8\");\r\n\t\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (decodingName.equalsIgnoreCase(\"PBEWithMD5AndDES\")) {\r\n\t\t\t// Key generation for enc and desc\r\n\t\t\tKeySpec keySpec = new PBEKeySpec(secretKey.toCharArray(), salt, iterationCount);\r\n\t\t\tSecretKey key;\r\n\t\t\ttry {\r\n\t\t\t\tkey = SecretKeyFactory.getInstance(\"PBEWithMD5AndDES\").generateSecret(keySpec);\r\n\t\t\t\t// Prepare the parameter to the ciphers\r\n\t\t\t\tAlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount);\r\n\t\t\t\t// Decryption process; same key will be used for decr\r\n\t\t\t\tdcipher = Cipher.getInstance(key.getAlgorithm());\r\n\t\t\t\tdcipher.init(Cipher.DECRYPT_MODE, key, paramSpec);\r\n\t\t\t\tif (decode.indexOf(\"(\", 0) > -1) {\r\n\t\t\t\t\tdecode = decode.replace('(', '/');\r\n\t\t\t\t}\r\n\t\t\t\tbyte[] enc = Base64.decodeBase64(decode);\r\n\t\t\t\tbyte[] utf8 = dcipher.doFinal(enc);\r\n\t\t\t\tString charSet = \"UTF-8\";\r\n\t\t\t\tString plainStr = new String(utf8, charSet);\r\n\t\t\t\treturn plainStr;\r\n\t\t\t} catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException\r\n\t\t\t\t\t| InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException\r\n\t\t\t\t\t| IOException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\t\t} else if (decodingName.equalsIgnoreCase(\"DES/ECB/PKCS5Padding\")) {\r\n\t\t\t// Get a cipher object.\r\n\t\t\tCipher cipher;\r\n\t\t\ttry {\r\n\t\t\t\tcipher = Cipher.getInstance(\"DES/ECB/PKCS5Padding\");\r\n\t\t\t\tcipher.init(Cipher.DECRYPT_MODE, generateKey());\r\n\t\t\t\t// decode the BASE64 coded message\r\n\t\t\t\tBASE64Decoder decoder1 = new BASE64Decoder();\r\n\t\t\t\tbyte[] raw = decoder1.decodeBuffer(decode);\r\n\t\t\t\t// decode the message\r\n\t\t\t\tbyte[] stringBytes = cipher.doFinal(raw);\r\n\t\t\t\t// converts the decoded message to a String\r\n\t\t\t\tdecoder = new String(stringBytes, \"UTF8\");\r\n\t\t\t} catch (NoSuchAlgorithmException | NoSuchPaddingException | InvalidKeyException | IOException\r\n\t\t\t\t\t| IllegalBlockSizeException | BadPaddingException e) {\r\n\t\t\t\tlog.error(\"decode :\" + e.getMessage());\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn decoder;\r\n\t}", "private String decoder(String code, Tree iterator) {\n for (int i = 0; i < code.length(); i++) {\n String decodedChar = iterator.decode(code.substring(0, i + 1));\n\n if (decodedChar != null) {\n decode = decode + decodedChar;\n code = code.substring(i + 1);\n i = -1;\n }\n }\n\n return code;\n }", "public static BinaryMessageDecoder<DNSLog> getDecoder() {\n return DECODER;\n }", "@Override\n public String decode(String code) throws IllegalStateException {\n if (code == null || code.equals(\"\")) {\n throw new IllegalStateException(\"the code cannot be null or empty.\");\n }\n Tree iterator = root;\n decode = \"\";\n\n for (int i = 0; i < code.length(); i++) {\n if (!encodingArray.contains(code.charAt(i))) {\n throw new IllegalStateException(\"The encoded string contains illegal symbol\");\n }\n }\n\n code = decoder(code, iterator);\n\n if (code.length() != 0) {\n throw new IllegalStateException(\"there is some problem with decoding.\");\n }\n\n return decode;\n }", "@Override\n\tpublic ProtocolDecoder getDecoder(IoSession arg0) throws Exception {\n\t\treturn decoder;\n\t}", "public void decode(String data) throws JSONException {\n\t\tthis.dtoObj=getObj(data, JrGxpgbillDTO.class);\n\t}", "public void handleDecode(Result rawResult, Bitmap barcode) {\n\t\tif (barcode == null) {\n\n\t\t} else {\n\t\t\thandleDecode(rawResult.getText());\n\t\t}\n\n\t}", "void decode (DataInputStream dis, Node [] table, Decoder decoder) {\n m_size = Decoder.readUnsignedByte (dis);\n if (m_size == 255) {\n m_size = Decoder.readUnsignedByte (dis) * 255 + Decoder.readUnsignedByte (dis) ;\n }\n //System.out.println (m_size);\n if (m_size > 0) {\n m_node = new Node [m_size];\n for (int i = 0; i < m_size; i++) {\n m_node[i] = Node.decode (dis, table, decoder);\n }\n }\n //System.out.println (\"decoding MFNode done\");\n }", "@Override\n\tpublic void decode(Element aElement) throws EPPDecodeException {\n\n\t\t// Status\n\t\tElement theElm = EPPUtil.getElementByTagNameNS(aElement,\n\t\t\t\tEPPNameVerificationMapFactory.NS, ELM_STATUS);\n\t\tString theStatusStr = theElm.getAttribute(ATTR_STATUS);\n\t\tthis.status = EPPNameVerificationStatus.getStatus(theStatusStr);\n\n\t\t// Reason\n\t\tthis.reason = EPPUtil.decodeString(aElement,\n\t\t\t\tEPPNameVerificationMapFactory.NS, ELM_REASON);\n\n\t\t// Language\n\t\t/**\n\t\t * @todo Uncomment once the lang attribute is added to the reason / msg\n\t\t * element. Element theElm =\n\t\t * EPPUtil.getElementByTagNameNS(aElement,\n\t\t * EPPNameVerificationMapFactory.NS, ELM_REASON); this.language =\n\t\t * theElm.getAttribute(ATTR_LANG);\n\t\t */\n\t}", "@Override\r\n\tpublic void finishDecode(IoSession session, ProtocolDecoderOutput out)\r\n\t\t\tthrows Exception {\n\r\n\t}", "public static BinaryMessageDecoder<ContentErrorEvent> getDecoder() {\n return DECODER;\n }", "public abstract void decode(SubtitleInputBuffer subtitleInputBuffer);", "public interface Decoder<InBuffer> {\n\n Class<?> getDefaultClass();\n\n Object decode(Context context, Type type, Short typeLength, Integer typeModifier, InBuffer buffer, Class<?> targetClass, Object targetContext) throws IOException;\n\n }", "@Override\r\n\tpublic Serializable getValue() {\n\t\treturn this.code;\r\n}", "public static Decoder getDecoderById(String satelliteId) {\n\t\treturn null;\r\n\t}", "int decode()\n throws IOException {\n final int start = _in.getBytesRead() - 4;\n \n _callback.objectStart();\n while ( decodeElement() );\n _callback.objectDone();\n \n final int read = _in.getBytesRead() - start;\n\n if ( read != _in._length ) {\n //throw new IllegalArgumentException( \"bad data. lengths don't match \" + read + \" != \" + len );\n }\n\n return _in._length;\n }", "public RTCMPackage decodeValue(BerCoder coder, DecoderInput source)\n\t throws DecoderException\n {\n\tint total_len0 = source.mLength;\n\tint end_pos0 = (total_len0 < 0) ? java.lang.Integer.MAX_VALUE : (source.position() + total_len0);\n\tint tag;\n\n\tdo {\n\t tag = source.decodeTagLength();\n\t if (tag == 0xA0) {\n\t\ttry {\n\t\t this.anchorPoint = new FullPositionVector();\n\t\t this.anchorPoint.decodeValue(coder, source);\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"anchorPoint\", \"FullPositionVector\");\n\t\t throw ee;\n\t\t}\n\t\ttag = source.decodeTagLength();\n\t }\n\t if (tag != 0x81 && tag != 0xA1)\n\t\tsource.raiseTagMismatchException(tag);\n\t try {\n\t\tthis.rtcmHeader = new RTCMHeader(coder.decodeOctetString(source));\n\t } catch (Exception e) {\n\t\tDecoderException ee = DecoderException.wrapException(e);\n\t\tee.appendFieldContext(\"rtcmHeader\", \"RTCMHeader\");\n\t\tthrow ee;\n\t }\n\t if (source.position() >= end_pos0)\n\t\tbreak;\n\t tag = source.decodeTagLength();\n\t if (tag == 0)\n\t\tbreak;\n\t if (tag == 0x82 || tag == 0xA2) {\n\t\ttry {\n\t\t this.msg1001 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1001\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x83 || tag == 0xA3) {\n\t\ttry {\n\t\t this.msg1002 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1002\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x84 || tag == 0xA4) {\n\t\ttry {\n\t\t this.msg1003 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1003\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x85 || tag == 0xA5) {\n\t\ttry {\n\t\t this.msg1004 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1004\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x86 || tag == 0xA6) {\n\t\ttry {\n\t\t this.msg1005 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1005\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x87 || tag == 0xA7) {\n\t\ttry {\n\t\t this.msg1006 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1006\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x88 || tag == 0xA8) {\n\t\ttry {\n\t\t this.msg1007 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1007\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x89 || tag == 0xA9) {\n\t\ttry {\n\t\t this.msg1008 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1008\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8A || tag == 0xAA) {\n\t\ttry {\n\t\t this.msg1009 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1009\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8B || tag == 0xAB) {\n\t\ttry {\n\t\t this.msg1010 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1010\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8C || tag == 0xAC) {\n\t\ttry {\n\t\t this.msg1011 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1011\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8D || tag == 0xAD) {\n\t\ttry {\n\t\t this.msg1012 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1012\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8E || tag == 0xAE) {\n\t\ttry {\n\t\t this.msg1013 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1013\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x8F || tag == 0xAF) {\n\t\ttry {\n\t\t this.msg1014 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1014\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x90 || tag == 0xB0) {\n\t\ttry {\n\t\t this.msg1015 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1015\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x91 || tag == 0xB1) {\n\t\ttry {\n\t\t this.msg1016 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1016\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x92 || tag == 0xB2) {\n\t\ttry {\n\t\t this.msg1017 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1017\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x93 || tag == 0xB3) {\n\t\ttry {\n\t\t this.msg1019 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1019\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x94 || tag == 0xB4) {\n\t\ttry {\n\t\t this.msg1020 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1020\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x95 || tag == 0xB5) {\n\t\ttry {\n\t\t this.msg1021 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1021\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x96 || tag == 0xB6) {\n\t\ttry {\n\t\t this.msg1022 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1022\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x97 || tag == 0xB7) {\n\t\ttry {\n\t\t this.msg1023 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1023\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x98 || tag == 0xB8) {\n\t\ttry {\n\t\t this.msg1024 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1024\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x99 || tag == 0xB9) {\n\t\ttry {\n\t\t this.msg1025 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1025\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9A || tag == 0xBA) {\n\t\ttry {\n\t\t this.msg1026 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1026\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9B || tag == 0xBB) {\n\t\ttry {\n\t\t this.msg1027 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1027\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9C || tag == 0xBC) {\n\t\ttry {\n\t\t this.msg1029 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1029\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9D || tag == 0xBD) {\n\t\ttry {\n\t\t this.msg1030 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1030\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9E || tag == 0xBE) {\n\t\ttry {\n\t\t this.msg1031 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1031\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t if (tag == 0x9F1F || tag == 0xBF1F) {\n\t\ttry {\n\t\t this.msg1032 = new OctetString(coder.decodeOctetString(source));\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendFieldContext(\"msg1032\", \"OCTET STRING\");\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t for (;;) {\n\t\ttry {\n\t\t coder.skipContents(source);\n\t\t} catch (Exception e) {\n\t\t DecoderException ee = DecoderException.wrapException(e);\n\t\t ee.appendExtensionContext(\"RTCMPackage\", -1);\n\t\t throw ee;\n\t\t}\n\t\tif (source.position() >= end_pos0)\n\t\t break;\n\t\ttag = source.decodeTagLength();\n\t\tif (tag == 0)\n\t\t break;\n\t }\n\t} while(false);\n\n\tif (source.position() > end_pos0)\n\t throw new DecoderException(ExceptionDescriptor._inconsis_len, null);\n\tif (total_len0 < 0 && source.mLength != 0)\n\t throw new DecoderException(ExceptionDescriptor._non_std_eoc, null);\n\n\treturn this;\n }", "public static BinaryMessageDecoder<Edge> getDecoder() {\n return DECODER;\n }", "public String decode(InputStream is)\n throws DataProcessingException, IOException {\n sendRecognition();\n streamAudioSource.setInputStream(is);\n sendData();\n String result = readResult();\n return result;\n }", "public void setDecodeParms(List<?> decodeParams) {\n/* 385 */ this.stream.setItem(COSName.DECODE_PARMS, \n/* 386 */ (COSBase)COSArrayList.converterToCOSArray(decodeParams));\n/* */ }", "private void itemDecode(Player player) {\n\t\tPlayerInventory inventory = player.getInventory();\n\t\tItemStack heldItem = inventory.getItemInMainHand();\n\n\t\tif(heldItem.getItemMeta() instanceof BookMeta) {\n\t\t\tBookMeta meta = (BookMeta) heldItem.getItemMeta();\n\t\t\tif(meta.hasPages()) {\n\t\t\t\tList<String> data = meta.getPages();\n\t\t\t\tItemStack decode = CryptoSecure.decodeItemStack(data);\n\t\t\t\t\n\t\t\t\tif(decode != null) {\n\t\t\t\t\tinventory.addItem(decode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn;\n\t\t}\n\t}", "public String base64Decode(String str) throws StoreFactoryException;", "TextDecoder getTextDecoder();", "public BackendService decode(ProtoReader hVar) throws IOException {\n C30726a aVar = new C30726a();\n long a = hVar.mo40516a();\n while (true) {\n int b = hVar.mo40518b();\n if (b != -1) {\n FieldEncoding c = hVar.mo40519c();\n aVar.addUnknownField(b, c, c.rawProtoAdapter().decode(hVar));\n } else {\n hVar.mo40517a(a);\n return aVar.build();\n }\n }\n }", "private static String decodeString(String encoded) throws NullPointerException {\n byte[] dataDec = Base64.decode(encoded, Base64.DEFAULT);\n String decodedString = \"\";\n try {\n decodedString = new String(dataDec, \"UTF-8\");\n } catch (UnsupportedEncodingException ignored) {\n }\n return decodedString;\n }", "public abstract Object unpickle(String value);", "private static String decode(final String extractedStr, Integer[] uncode) {\n if (null == extractedStr || extractedStr.isEmpty())\n return \"\";\n String decodedStr = extractedStr;\n for (Integer codeInt : uncode) {\n switch (codeInt) {\n case 0:\n break;\n case 1:\n decodedStr = changeUnicode(decodedStr);// unicode\n break;\n case 2:\n decodedStr = changeUrlcode(decodedStr, \"utf-8\");// urlcode\n break;\n case 3:\n decodedStr = changeMac(decodedStr);// Mac\n break;\n case 4:\n decodedStr = chageIdfa(decodedStr);\n break;\n case 5:\n decodedStr = chageMacTypeTwo(decodedStr);\n break;\n case 6:\n decodedStr = changeUrlcode(decodedStr, \"gb2312\");// urlcode\n break;\n case 7:\n\n break;\n case 8:\n decodedStr = changeBase64(decodedStr.toString());// base64\n break;\n case 9:\n decodedStr = decodedStr.toLowerCase();\n break;\n case 10:\n decodedStr = decodedStr.toUpperCase();\n break;\n case 11:\n Pattern p = Pattern.compile(\"\\\"scenicId\\\":.*?,\", Pattern.CASE_INSENSITIVE);\n Matcher m = p.matcher(decodedStr);\n while (m.find()) {\n decodedStr = m.group().substring(\"\\\"scenicId\\\":\".length(), m.group().length() - 1);\n }\n break;\n case 12:\n p = Pattern.compile(\"\\\"productId\\\":.*?,\", Pattern.CASE_INSENSITIVE);\n m = p.matcher(decodedStr);\n while (m.find()) {\n decodedStr = m.group().substring(\"\\\"productId\\\":\".length(), m.group().length() - 1);\n }\n break;\n\n }\n }\n return decodedStr;\n }", "@Override\n public void decrypt() {\n algo.decrypt();\n String cypher = vigenereAlgo(false);\n this.setValue(cypher);\n }", "public String decode(String cipher)\n\t {\n\t \treturn null;\n\t }", "public long decode(long value) {\n\n if (value == 0 || value == 1)\n return value;\n\n long mask = Long.highestOneBit(value);\n\n long bit = mask >> 1;\n\n long result = value;\n\n while (mask != 0) {\n\n result ^= bit;\n\n mask >>= 1;\n\n bit = (result & mask) >> 1;\n\n }\n\n return result;\n }", "public Bitmap decodeImage() {\n\t\treturn image == null ? null : image.decodeBitmap();\n\t}" ]
[ "0.6534133", "0.6431342", "0.6180653", "0.60563064", "0.59189415", "0.5885855", "0.58111244", "0.5802445", "0.57585734", "0.570588", "0.56999373", "0.56144917", "0.5563043", "0.5530441", "0.5511912", "0.54914707", "0.5442743", "0.54301316", "0.5418644", "0.53674245", "0.5256459", "0.5250603", "0.52418435", "0.52255136", "0.52163994", "0.5215541", "0.5203828", "0.5170171", "0.51465935", "0.5109835", "0.5107008", "0.5095186", "0.50844955", "0.5072713", "0.50710547", "0.50570685", "0.5055546", "0.5048005", "0.5045669", "0.50449586", "0.50400853", "0.5032328", "0.5032195", "0.5023331", "0.5013491", "0.50087017", "0.5000741", "0.49940404", "0.49870464", "0.4982226", "0.4980294", "0.49794295", "0.49705207", "0.4961893", "0.49377117", "0.49338973", "0.49325138", "0.49302113", "0.4918655", "0.4905657", "0.49031338", "0.49008396", "0.49001518", "0.48966452", "0.48932806", "0.4889346", "0.4874901", "0.48545575", "0.4851596", "0.48501298", "0.4847883", "0.48413992", "0.48357013", "0.4835591", "0.48290274", "0.48205838", "0.48180166", "0.48104072", "0.48092481", "0.48056316", "0.48047483", "0.48009104", "0.47944316", "0.47861797", "0.47696146", "0.47658646", "0.4765718", "0.47547367", "0.4752267", "0.47439206", "0.47260523", "0.47239825", "0.47221127", "0.47204208", "0.47117826", "0.46857947", "0.46839795", "0.46716794", "0.46676338", "0.46614113" ]
0.6595515
0
Returns the absolute short form of this type.
public Long getShortForm() { return SHORT_FORM; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@DerivedProperty\n\tString getShortRepresentation();", "public short toShort() {\n return this.toShortArray()[0];\n }", "public Integer getTypeShortForm()\n {\n return TYPE_SHORT_FORM;\n }", "public Integer getTypeShortForm()\n {\n return TYPE_SHORT_FORM;\n }", "public short get_short() {\n return local_short;\n }", "public double getBboxShortestSide() {\n return getDouble(\"tshort\");\n }", "public String getShort() { \n\t\treturn getShortElement().getValue();\n\t}", "@NonNull\n public String toShortString() {\n return toShortString(new StringBuilder(32));\n }", "public short getShortA() {\n\t\tint i = (payload.get() & 0xFF) << 8 | payload.get() - 128 & 0xFF;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public String shortRepr() {\n\t\treturn \"Value of some kind.\";\n\t}", "public short getLEShortA() {\n\t\tint i = payload.get() - 128 & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public short toShort()\n\t{\n\t\treturn (short)this.ordinal();\n\t}", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default short asShort() {\n \n return notSupportedCast(BasicTypeID.SHORT);\n }", "public String getShort() {\n return m_short;\n }", "public Short getShortAttribute();", "public org.apache.axis2.databinding.types.UnsignedShort getUnsignedShort() {\n return localUnsignedShort;\n }", "public String getShortName() {\n return shortName;\n }", "public String getShortName() {\n return shortName;\n }", "public String getShortName() {\n return shortName;\n }", "public String getShortName() {\n\n\t\treturn shortName;\n\t}", "public String toStringShort() {\n\treturn AbstractFormatter.shape(this);\n}", "default String toShortString() {\n return toString().substring(0, 5);\n }", "public String getShortName() { return shortName; }", "public abstract String toString_short();", "public String getShortName()\r\n\t{\r\n\t\treturn shortName;\r\n\t}", "public String getShortName() {\n\t\treturn SHORT_NAME;\n\t}", "public static final SourceModel.Expr showShort(SourceModel.Expr s) {\n\t\t\treturn \n\t\t\t\tSourceModel.Expr.Application.make(\n\t\t\t\t\tnew SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.showShort), s});\n\t\t}", "public short get_dest() {\n return (short)getUIntElement(offsetBits_dest(), 8);\n }", "public short getLEShort() {\n\t\tint i = payload.get() & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public StringDt getShortElement() { \n\t\tif (myShort == null) {\n\t\t\tmyShort = new StringDt();\n\t\t}\n\t\treturn myShort;\n\t}", "Short getValue();", "@Nullable String getShortName();", "public String shortName() {\r\n\t\treturn \"F\";\r\n\t}", "public String getShortContent();", "public String getShortDes() {\n return shortDes;\n }", "public short get_amtype() {\n return (short)getUIntElement(offsetBits_amtype(), 8);\n }", "String getShortName();", "public abstract String shortName();", "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 }", "public short get_source() {\n return (short)getUIntElement(offsetBits_source(), 8);\n }", "public short getValue() {\n return value;\n }", "public int getSignedSmart() {\n\t\tfinal int peek = payload.get(payload.position());\n\t\tif (peek < 128) {\n\t\t\treturn (get() & 0xFF) - 64;\n\t\t} else {\n\t\t\treturn (getShort() & 0xFFFF) - 49152;\n\t\t}\n\t}", "public String getShortName() {\n\t\treturn shortName + \"\\\"\";\n\t}", "public short getValue() {\n return value;\n }", "private int getShort() {\n shortBuffer.rewind();\n archive.read(shortBuffer);\n shortBuffer.flip();\n return (int) shortBuffer.getShort();\n }", "public int getUnsignedShort() {\n\t\treturn payload.getUnsignedShort();\n\t}", "public String getBShortToken() {\n return instance.getBShortToken();\n }", "public abstract String getShortName();", "public abstract String getShortName();", "public abstract String getShortName();", "public void setShortName() {\n\t\tgetAbsoluteName = false;\n\t}", "@Override\n public String getShortName() {\n return NAME;\n }", "String shortWrite();", "public String getShortExplanation()\r\n\t{\r\n\t\treturn this._shortExplanation;\r\n\t}", "@Override\n public String getFullType() {\n return fullType;\n }", "public long getAnyShortExces() {\n return anyShortExces;\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public String getShortToken() {\n return instance.getShortToken();\n }", "public short[] getShortMask() {\r\n return newShortMask;\r\n }", "public String getShortId() {\n\t\treturn shortId;\n\t}", "public short getShort(int pos) {\n return Tuples.toShort(getObject(pos));\n }", "public AbsoluteLayout getAbs() {\n\t\treturn this.abs;\n\t}", "public short[] getAsShorts() {\n return (short[])data;\n }", "public final String getShortname() {\n\t\treturn JsUtils.getNativePropertyString(this, \"shortname\");\n\t}", "public String getShortCode() {\n return (String) getAttributeInternal(SHORTCODE);\n }", "public short getShort(String key)\n {\n return getShort(key, (short) 0);\n }", "public String getShortToken() {\n return shortToken_;\n }", "public String getShortToken() {\n return shortToken_;\n }", "public String getShortToken() {\n return shortToken_;\n }", "public String getShortToken() {\n return shortToken_;\n }", "public String getShortToken() {\n return shortToken_;\n }", "public String getShortToken() {\n return shortToken_;\n }", "public String getShortToken() {\n return shortToken_;\n }", "public String getShortToken() {\n return shortToken_;\n }", "public String getShortToken() {\n return shortToken_;\n }", "public String getShortToken() {\n return shortToken_;\n }", "public Short getShort(String name) {\n Object o = get(name);\n if (o instanceof Number) {\n return ((Number)o).shortValue();\n }\n\n if (o != null) {\n try {\n String string = o.toString();\n if (string != null) {\n return Short.parseShort(string);\n }\n }\n catch (NumberFormatException e) {}\n }\n return null;\n }", "public String fullwidth() {\n return this.fullwidth;\n }", "public String toStringShort()\n {\n return (denormTemp() + \",\" + denormDO() + \",\" +\n denormPercSat() + \",\" + denormPH() + \",\" +\n denormCond() + \",\" + denormEcoli() + \",\" + clusterId);\n\n }", "@Override\r\n\tpublic int getUnsignedShort(int pos) {\n\t\treturn getShort(pos) & 0x0FFFF;\r\n\t}", "public String getShortID() {\n return shortID;\n }", "public short get_parent() {\n return (short)getUIntElement(offsetBits_parent(), 8);\n }", "public String shortDescription() {\n return this.shortDescription;\n }", "public org.ccsds.moims.mo.mal.structures.UShort getAreaNumber()\n {\n return AREA_SHORT_FORM;\n }", "public org.ccsds.moims.mo.mal.structures.UShort getAreaNumber()\n {\n return AREA_SHORT_FORM;\n }", "public short readShortNonBlock() {\n return ((short) readLongNonBlock());\n }", "public final short m2272g() {\n switch (C06641.f2937a[this.f2952a.ordinal()]) {\n case 1:\n return Short.parseShort(this.f2953b);\n case 2:\n return (short) ((int) this.f2954c);\n case 3:\n return (short) ((int) this.f2955d);\n case 4:\n return this.f2955d != 0 ? (short) 1 : (short) 0;\n default:\n throw new IllegalStateException(\"Value cannot be converted to short: \" + this.f2952a);\n }\n }", "public short getResolutionUnit()\r\n\t{\r\n\t\treturn super.getShort(0);\r\n\t}", "public short get_dataType() {\n return (short)getUIntBEElement(offsetBits_dataType(), 8);\n }", "public short getShort(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? (short)((Long)value).intValue() : 0);\n }", "public boolean isShortTypes() {\n return shortTypes;\n }" ]
[ "0.7072917", "0.671536", "0.6606317", "0.6606317", "0.65154415", "0.64795184", "0.6445869", "0.6397849", "0.6393714", "0.6332989", "0.6301004", "0.6299839", "0.6285858", "0.6282915", "0.6276062", "0.6268373", "0.6187684", "0.6187684", "0.6187684", "0.6156377", "0.61226434", "0.609293", "0.60741466", "0.60339683", "0.6026671", "0.6021243", "0.6007446", "0.59681815", "0.5901023", "0.5860583", "0.5843798", "0.5792828", "0.57826495", "0.57263553", "0.56986874", "0.5683038", "0.5673417", "0.566349", "0.5654365", "0.5627956", "0.5627896", "0.562473", "0.5596505", "0.55869335", "0.5576828", "0.5570265", "0.5568811", "0.5567461", "0.5567461", "0.5567461", "0.55560005", "0.5511707", "0.55021757", "0.5499255", "0.5495067", "0.5481762", "0.5467966", "0.5467966", "0.5467966", "0.5467966", "0.5467966", "0.5467966", "0.5467966", "0.5467966", "0.5467966", "0.5467966", "0.54677415", "0.54545766", "0.54502517", "0.54481375", "0.543038", "0.542248", "0.54132694", "0.5404347", "0.5382183", "0.5382183", "0.5382183", "0.5382183", "0.5382183", "0.5382183", "0.5382183", "0.5382183", "0.5382183", "0.5382183", "0.53725207", "0.53660655", "0.5348611", "0.5346525", "0.53322864", "0.532514", "0.5311157", "0.53107446", "0.53107446", "0.53079414", "0.52983457", "0.5294278", "0.5288153", "0.5275942", "0.5274229" ]
0.6618894
3
Returns the type short form of this type which is unique to the area/service it is defined in but not unique across all types.
public Integer getTypeShortForm() { return TYPE_SHORT_FORM; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getType() {\n\t\tif (isValid())\n\t\t\treturn \"FullHouse\";\n\t\treturn \"\";\n\t}", "UniqueType createUniqueType();", "org.tensorflow.proto.framework.FullTypeId getTypeId();", "public short getType() {\n\t\treturn type;\n\t}", "@Override\n public String getFullType() {\n return fullType;\n }", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public int getTypeId() {\n return instance.getTypeId();\n }", "public String getMainType() {\n\t\treturn Material.getMaterial(this.properties.MAIN_TYPE).toString().replace(\"_\", \" \").toLowerCase();\n\t}", "public String getTypeId() {\r\n return typeId;\r\n }", "public Type getType() {\n @SuppressWarnings(\"deprecation\")\n Type result = Type.valueOf(type_);\n return result == null ? Type.UNRECOGNIZED : result;\n }", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "private String getShortType(String aKey) {\n if (iConnection == null){\n return ModificationConversion.getShortType(aKey);\n } else {\n return ModificationConversion.getShortType(aKey,iConnection);\n }\n }", "String getSType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public Type getType() {\n @SuppressWarnings(\"deprecation\")\n Type result = Type.valueOf(type_);\n return result == null ? Type.UNRECOGNIZED : result;\n }", "public TypeId getTypeId() {\r\n return typeId;\r\n }", "public int getType() {\n\t\treturn 1;\r\n\t}", "public BigDecimal getTypeId() {\n return typeId;\n }", "int getTypeIdValue();", "String getTypeAsString();", "public Rule type()\n \t{\n \t\treturn firstOf(simpleMapType(), nonSimpleMapTypes());\n \t}", "@Override\n public String getDeviceTypeId() {\n \n return this.strTypId;\n }", "public String type();", "public Long getTypeId() {\r\n\t\treturn typeId;\r\n\t}", "public Type getStrandType()\n {\n return type;\n }", "public Long getTypeid() {\n return typeid;\n }", "public com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId getTypeId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId target = null;\n target = (com.walgreens.rxit.ch.cda.POCDMT000040InfrastructureRootTypeId)get_store().find_element_user(TYPEID$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "private TYPE getType(final String type) {\n String temp = type.replaceAll(\"-\", \"_\");\n TYPE answer = Arrays.stream(\n TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(TYPE.unknown);\n return answer;\n }", "public int getTypeId();", "public int getTypeId();", "@Override\n\tpublic String getTypeAsName() {\n\t\treturn null;\n\t}", "public String getTypeName() {\n return type.name();\n }", "public String getType()\n\t{\n\t\t// The enumerated type's name satisfies all the type criteria, so use\n\t\t// it.\n\t\treturn name();\n\t}", "protected abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "public abstract String getType();", "@Nullable\n public com.commercetools.api.models.type.TypeResourceIdentifier getType() {\n return this.type;\n }", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "String type();", "String type();", "String type();" ]
[ "0.6293539", "0.61740655", "0.613777", "0.6078628", "0.6044363", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.5976916", "0.59234065", "0.5861858", "0.5841124", "0.58320594", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.58305717", "0.582781", "0.5814338", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.58076364", "0.5782599", "0.57733196", "0.5765719", "0.5764835", "0.5761194", "0.5753996", "0.5748482", "0.57318985", "0.57250816", "0.569141", "0.56875706", "0.5675859", "0.5647699", "0.5639734", "0.56338245", "0.56338245", "0.5628058", "0.56258076", "0.56226397", "0.5618627", "0.560389", "0.560389", "0.560389", "0.560389", "0.560389", "0.560389", "0.560389", "0.560389", "0.5603087", "0.5600807", "0.5600807", "0.5600807", "0.5600807", "0.5600807", "0.55978656", "0.55978656", "0.55978656" ]
0.6323732
1
Returns the area number of this type.
public org.ccsds.moims.mo.mal.structures.UShort getAreaNumber() { return AREA_SHORT_FORM; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getArea() {\n\t\treturn area;\n\t}", "public int getAreaNo() {\n return areaNo_;\n }", "public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}", "public int getAreaNo() {\n return areaNo_;\n }", "public double getArea() {\n\t\treturn this.area;\n\t}", "public int getArea()\n {\n return area;\n }", "public double getArea()\n {\n return area;\n }", "public float getArea() {\n return area;\n }", "public double get_Area() {\n return this.Area;\n }", "public String getArea() {\n return area;\n }", "public final int getArea()\n\t{\n\t\treturn address >>> 12;\n\t}", "public String getArea() {\n\t\treturn area;\n\t}", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return this.area;\n }", "public int area()\n\t{\n\t\treturn length*width;\n\t}", "public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}", "public static double getArea() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ta\").getDouble(0);\n }", "public int area() {\n \tarea = width()*height();\n }", "public double getArea() {\n\t\tdouble area = Math.round(2 * Math.pow(sideLength, 2) * \n\t\t\t\t(1 + Math.sqrt(2)));\n\t\t\n\t\treturn area;\n\t}", "public double area() {\n\t\treturn width * height;\n\t}", "public double getArea();", "public double getArea();", "public double getArea();", "public int getAreaCount() {\n return area_.size();\n }", "public int getAreaCount() {\n return area_.size();\n }", "public int getAreaCount() {\n return area_.size();\n }", "public double area() {\n return (width * height);\n }", "public Integer getAreaId() {\n return areaId;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public Polygon getArea() {\n\t\treturn area;\n\t}", "public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}", "public Integer getAreacode() {\n return areacode;\n }", "public int getArea() {\n return (getXLength() * getYWidth());\n }", "public int getArea()\n {\n return this.length * this.width;\n }", "public double getArea() {\n return this.length * this.width;\n }", "public float getArea(){\n return area;\n\t}", "@Override\r\n\t\tpublic int Area() {\n\t\t\treturn width*width\t;\r\n\t\t}", "public double area(){\r\n\t\treturn this.base()*this.altezza();\r\n\t}", "public double getArea() {\n\t\treturn this.radius * this.radius * Math.PI;\n\t}", "public double area(){\n\t\tdouble area=length*width;\r\n\t\treturn area;\r\n\t}", "public double getArea() {\n\t\treturn height * length;\n\t}", "public double area()\r\n {\r\n double area;\r\n \r\n area = mRadius * mRadius * 3.14159;\r\n \r\n return area;\r\n }", "public double getArea() {\n return ((this.xR - this.xL) * (this.yT - this.yD));\n }", "double getArea();", "double getArea();", "public Rectangle getArea() {\n return area;\n }", "public double area() {\n\t\treturn width*length;\n\t}", "public double area()\n {\n double area = length * width;\n //System.out.println(area);\n return area;\n }", "public final double getArea() {\n\t\treturn (area < 0) ? computeArea() : area;\n\t}", "public double getArea (){\n int area = length * length;\n System.out.println(area);\n return area;\n }", "public float area() {\n return (base * haltura / 2);\r\n }", "public abstract int getArea();", "public int getAreaCount() {\n if (areaBuilder_ == null) {\n return area_.size();\n } else {\n return areaBuilder_.getCount();\n }\n }", "public int getAreaCount() {\n if (areaBuilder_ == null) {\n return area_.size();\n } else {\n return areaBuilder_.getCount();\n }\n }", "public int getAreaCount() {\n if (areaBuilder_ == null) {\n return area_.size();\n } else {\n return areaBuilder_.getCount();\n }\n }", "public float area() {\n return (getBase() * getAltura() )/ 2;\n }", "public int getAreaCode() {\r\n return areaCode;\r\n }", "public float get_area() {\r\n return 0;\r\n }", "public double getArea()\r\n\t{\r\n\t\tdouble area = Math.PI*(Math.pow(radius, 2));\r\n\t\treturn area;\r\n\t}", "public double area(){\n return (base*height) / 2;\n }", "@Override\n public double getArea() {\n double area = this.length*this.width;\n return area;\n }", "public double Area() {\r\n \treturn(getLength() * getWidth());\r\n }", "public double getArea()\n\t{\n\t\tdouble area = Math.PI * Math.pow(radius, 2); \n\t\treturn area;\n\t}", "public double getArea() {\n /*\n * area = base (1o lado ou 3o lado) x altura (2o lado ou 4o lado)\n */\n\n return this.getLado(1) * this.getLado(2);\n }", "public float area()\n {\n return Math.abs(signedArea());\n }", "@Override\n\tpublic double area() {\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}", "public String areaCode() {\n return areaCode;\n }", "public double getArea(){\n if (getHeight()<0 || getWidth()<0){\n System.out.println(\"Input Invalid\");\n return -1;\n }\n return (getWidth() * getHeight());\n }", "public abstract double getArea();", "public abstract double getArea();", "public abstract double getArea();", "@Override\n\tpublic double area() {\n\t\t\n\t\tdouble area = (Math.PI * Math.pow(radius, 2));\n\t\treturn area;\n\t\t\n\t}", "public int getCodigoArea() { return this.codigoArea; }", "public int getCodigoArea() { return this.codigoArea; }", "@Override\n\tpublic double getArea() {\n\t\tdouble p = getPerimeter() / 2;\n\t\tdouble s = p * ((p - side1) * (p - side2) * (p - side3));\n\t\tdouble Area = Math.sqrt(s);\n\t\treturn Area;\n\t}", "public abstract float getArea();", "@Override\n\tpublic double getArea() {\n\t\treturn (0.5*this.base*this.height);\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn Math.pow(getSide(), 2) * this.N / 4 * (Math.tan(Math.toRadians(180 / this.N)));\n\t}", "public String getArea_id() {\n return area_id;\n }", "public String getAreaCode() \n\t{\n\t\treturn getNumber().substring(1,4);\n\t}", "@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}", "public double getArea() {\n return ((radius * radius) * Math.PI);\n }", "public double getArea() {\n return Math.PI * Math.pow(radius, 2.0);\n }", "public double getArea(){\n return 3.14 * radius * radius;\n }", "@Override\n\tpublic double getArea() {\n\t\treturn width * length;\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}", "Double getAreaValue();", "public double getArea() {\n\t\treturn super.getArea()*height;\r\n\t}", "public int getArea()\n {\n //implement a recursive method\n\t if (width==1) \n\t {\n\t\t return 1;\n\t }\n\t else\n\t {\n\t\t Square smallerSquare = new Square(width - 1);\n\t\t return (2 * width - 1 + smallerSquare.getArea());\n\t }\n }", "public double findArea(){\n\t\tdouble area= (0.5*(length * width));\n\t\treturn area;\n\t}", "public double getArea(){\n double p = (side1 + side2 + side3) / 2;\n return Math.sqrt(p * (p - side1) * (p - side2) * (p - side3));\n }", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "public double area() {\n return 2 * Math.PI * radius;\n }", "@Override\r\n\tpublic double getArea() {\n\t\tdouble Area1 = ((super.getLength() * height));\r\n\t\tdouble Area2 = ((super.getWidth() * height));\r\n\t\treturn (Area1 * 2 + Area2 * 2 + super.getArea() * 2);\r\n\t\t\r\n\t}" ]
[ "0.8283187", "0.82106304", "0.8106855", "0.7994994", "0.7951995", "0.78921306", "0.7856501", "0.78271633", "0.7823225", "0.78002125", "0.7791485", "0.775896", "0.77549", "0.7754217", "0.7754217", "0.7754217", "0.7737789", "0.77036893", "0.76456314", "0.7622774", "0.76202774", "0.7583712", "0.7571131", "0.7548414", "0.7548414", "0.7548414", "0.7539148", "0.7539148", "0.7539148", "0.7535096", "0.752682", "0.752682", "0.7476322", "0.747093", "0.7461228", "0.745421", "0.7448653", "0.74441457", "0.74252725", "0.74117446", "0.7406886", "0.74028414", "0.74027306", "0.73899525", "0.73790556", "0.7367155", "0.7349506", "0.7349506", "0.73493856", "0.73468465", "0.7335625", "0.7330364", "0.73255223", "0.7303313", "0.7291431", "0.728453", "0.728453", "0.728453", "0.72749287", "0.72740257", "0.7273276", "0.727052", "0.7248506", "0.723751", "0.7219175", "0.7211072", "0.72098", "0.71847653", "0.71801496", "0.71776605", "0.71662015", "0.7160811", "0.715637", "0.715637", "0.715637", "0.71544796", "0.71503085", "0.71503085", "0.71493244", "0.7141252", "0.71350485", "0.71278733", "0.7123748", "0.71138865", "0.708823", "0.70836586", "0.7068129", "0.7052633", "0.7040387", "0.70309055", "0.70266277", "0.7025907", "0.70095545", "0.7005104", "0.70016956", "0.69865304", "0.69865304", "0.69830054", "0.6981771" ]
0.75409317
27
Returns the area version of this type.
public org.ccsds.moims.mo.mal.structures.UOctet getAreaVersion() { return AREA_VERSION; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return area;\n }", "public String getArea() {\n return this.area;\n }", "public String getArea() {\n\t\treturn area;\n\t}", "public int getArea() {\n\t\treturn area;\n\t}", "public double getArea() {\n\t\treturn this.area;\n\t}", "public double getArea()\n {\n return area;\n }", "public Polygon getArea() {\n\t\treturn area;\n\t}", "public Rectangle getArea() {\n return area;\n }", "public int getArea()\n {\n return area;\n }", "public float getArea() {\n return area;\n }", "public double get_Area() {\n return this.Area;\n }", "public int area() {\r\n\t\tint area = (getLength()) * (getBreath());\r\n\t\treturn (area);\r\n\t}", "public float getArea(){\n return area;\n\t}", "public abstract int getArea();", "public double getArea();", "public double getArea();", "public double getArea();", "public abstract String getArea();", "public String getLocationArea() {\n return locationArea;\n }", "public abstract double getArea();", "public abstract double getArea();", "public abstract double getArea();", "public static double getArea() {\n return NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ta\").getDouble(0);\n }", "public abstract float getArea();", "public int getArea() {\n\t\treturn this.height * this.width;\n\t}", "public final int getArea()\n\t{\n\t\treturn address >>> 12;\n\t}", "public double area(){\r\n\t\treturn this.base()*this.altezza();\r\n\t}", "public int area() {\n \tarea = width()*height();\n }", "public AreaGeometry getGeometry() {\n return this.geometry;\n }", "public String areaCode() {\n return areaCode;\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public Integer getAreaId() {\n return areaId;\n }", "public Integer getAreaId() {\n return areaId;\n }", "@Override\n\tpublic double area() {\n\t\treturn getBase()*getAltura();\n\t}", "public double getArea() {\n\t\tdouble area = Math.round(2 * Math.pow(sideLength, 2) * \n\t\t\t\t(1 + Math.sqrt(2)));\n\t\t\n\t\treturn area;\n\t}", "public double getArea() {\n\t\treturn height * length;\n\t}", "public double getArea() {\n return ((this.xR - this.xL) * (this.yT - this.yD));\n }", "public double getArea() {\n\t\treturn 4.0 * Math.PI * this.radius * this.radius;\n\t}", "public Integer getArea() {\n\t\treturn this.getX() * this.getY();\n\t}", "public double getArea() {\n /*\n * area = base (1o lado ou 3o lado) x altura (2o lado ou 4o lado)\n */\n\n return this.getLado(1) * this.getLado(2);\n }", "public double area() {\n\t\treturn width * height;\n\t}", "double getArea();", "double getArea();", "public Number getBuildingArea() {\n return (Number) getAttributeInternal(BUILDINGAREA);\n }", "public double getArea(){\n return 3.14 * radius * radius;\n }", "public double getArea() {\n return this.length * this.width;\n }", "public String getAreaName() {\n return areaName;\n }", "public String getAreaName() {\n return areaName;\n }", "public JQLayoutArea getArea()\n {\n return area;\n }", "public float area() {\n return (getBase() * getAltura() )/ 2;\n }", "public double area() {\n return (width * height);\n }", "public int getAreaNo() {\n return areaNo_;\n }", "public double getArea() {\n\t\treturn this.radius * this.radius * Math.PI;\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn (0.5*this.base*this.height);\n\t}", "public org.ccsds.moims.mo.mal.structures.UShort getAreaNumber()\n {\n return AREA_SHORT_FORM;\n }", "public org.ccsds.moims.mo.mal.structures.UShort getAreaNumber()\n {\n return AREA_SHORT_FORM;\n }", "public String getAreaName()\n {\n return this.areaName;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public java.util.List<com.example.grpc.SimpleServiceOuterClass.Area> getAreaList() {\n return area_;\n }", "public final double getArea() {\n\t\treturn (area < 0) ? computeArea() : area;\n\t}", "public float get_area() {\r\n return 0;\r\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public com.example.grpc.SimpleServiceOuterClass.Area getArea(int index) {\n return area_.get(index);\n }", "public Integer getAreacode() {\n return areacode;\n }", "@Override\r\n\tpublic double getArea() {\n\t\treturn (this.base * this.height)/2;\r\n\t}", "public String getAreaCode() {\n return areaCode;\n }", "public String getAreaCode() {\n return areaCode;\n }", "public double area()\r\n {\r\n double area;\r\n \r\n area = mRadius * mRadius * 3.14159;\r\n \r\n return area;\r\n }", "@Override\n public double getArea() {\n return this.length*this.width; //To change body of generated methods, choose Tools | Templates.\n }", "public int getArea() {\n return (getXLength() * getYWidth());\n }", "public String getArea_id() {\n return area_id;\n }", "@Override\n\tpublic double getArea() {\n\t\treturn height * width;\n\t}", "Double getAreaValue();", "double getArea() {\n return width * height;\n }", "public double area(){\n\t\tdouble area=length*width;\r\n\t\treturn area;\r\n\t}", "@Override\n public double getArea() {\n double area = this.length*this.width;\n return area;\n }", "public int getAreaCode() {\r\n return areaCode;\r\n }", "public Number getGroundArea() {\n return (Number) getAttributeInternal(GROUNDAREA);\n }", "public double getArea(){\n return 0;\n }", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "@Override\r\n\tpublic double getArea() {\r\n\t\treturn width * height;\r\n\t}", "public double getArea() {\n\t\treturn super.getArea()*height;\r\n\t}", "public int getArea()\n {\n return this.length * this.width;\n }", "public int getCodigoArea() { return this.codigoArea; }", "public int getCodigoArea() { return this.codigoArea; }", "@Override\r\n\tpublic double getArea() {\n\t\tdouble Area1 = ((super.getLength() * height));\r\n\t\tdouble Area2 = ((super.getWidth() * height));\r\n\t\treturn (Area1 * 2 + Area2 * 2 + super.getArea() * 2);\r\n\t\t\r\n\t}", "public double Area() {\r\n \treturn(getLength() * getWidth());\r\n }", "protected double getArea()\r\n {\r\n return ( side * side ) / 2;\r\n }", "public double Area() {\n return OCCwrapJavaJNI.ShapeAnalysis_FreeBoundData_Area(swigCPtr, this);\n }", "public float area() {\n return (base * haltura / 2);\r\n }", "public String getAreaCode() {\n return this.areaCode;\n }", "@Override\n\tpublic double getArea() {\n\t\treturn (this.getPerimetro()*Math.sqrt(Math.pow(getLongitudLado(), 2))-(Math.pow((getLongitudLado()/2), 2)))/2;\n\t}", "@Override\r\n\t\tpublic int Area() {\n\t\t\treturn width*width\t;\r\n\t\t}", "public int area()\n\t{\n\t\treturn length*width;\n\t}", "@Override\n\tpublic double getArea() {\n\t\treturn Math.pow(getSide(), 2) * this.N / 4 * (Math.tan(Math.toRadians(180 / this.N)));\n\t}", "public double area()\n {\n double area = length * width;\n //System.out.println(area);\n return area;\n }" ]
[ "0.8230999", "0.8197045", "0.8197045", "0.8197045", "0.8178099", "0.81728566", "0.8047783", "0.79241014", "0.79079735", "0.7884766", "0.78769624", "0.78113055", "0.78091955", "0.77634305", "0.75973874", "0.7543476", "0.75215757", "0.7513076", "0.7513076", "0.7513076", "0.745425", "0.74533737", "0.74265057", "0.74265057", "0.74265057", "0.7417855", "0.73643684", "0.7288393", "0.7279309", "0.72513527", "0.72485095", "0.7245821", "0.72305113", "0.7230429", "0.72278154", "0.72278154", "0.7222989", "0.7219407", "0.7214219", "0.72130203", "0.72112966", "0.72108215", "0.7207583", "0.71936804", "0.7179114", "0.7179114", "0.71753883", "0.7156569", "0.715325", "0.7148531", "0.7148531", "0.71438307", "0.71356314", "0.7125196", "0.7103423", "0.7098234", "0.70947367", "0.70796317", "0.70796317", "0.7071204", "0.7065882", "0.7065882", "0.7065882", "0.7062949", "0.7056875", "0.7051126", "0.7051126", "0.7051126", "0.7030308", "0.70256245", "0.7001076", "0.7001076", "0.6997747", "0.6994056", "0.6991531", "0.69791627", "0.6978666", "0.69649935", "0.69623435", "0.695873", "0.69558793", "0.6954021", "0.69493365", "0.6943902", "0.69438064", "0.69438064", "0.69433814", "0.69408923", "0.6937422", "0.6937422", "0.6935767", "0.6934536", "0.69343096", "0.69306266", "0.6925166", "0.69248444", "0.69233173", "0.6922812", "0.69222224", "0.6915275", "0.69018644" ]
0.0
-1
Returns the service number of this type.
public org.ccsds.moims.mo.mal.structures.UShort getServiceNumber() { return SERVICE_SHORT_FORM; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getServiceType() {\r\n return serviceType;\r\n }", "public long getServiceTypeId() {\r\n\t\treturn serviceTypeId;\r\n\t}", "int getServiceNum();", "public Integer getServiceid() {\r\n return serviceid;\r\n }", "public int getServiceID() {\n return serviceID;\n }", "public String getServiceOrderNumber() {\n return serviceOrderNumber.get();\n }", "public java.lang.Integer getServicecode() {\n\treturn servicecode;\n}", "public java.lang.Long getServiceId() {\n return serviceId;\n }", "public java.lang.Long getServiceId() {\n return serviceId;\n }", "public final int getServiceCount() {\r\n return this.m_service_count;\r\n }", "public ID getMainService() { \r\n\t\tID retVal = this.getTypedField(46, 0);\r\n\t\treturn retVal;\r\n }", "public String getTypeOfService(){\n\t\treturn typeOfService;\n\t}", "public long getId() {\n return mServiceId;\n }", "public String getServicenumber() {\r\n return servicenumber;\r\n }", "@Override\n\tpublic String serviceTypeId() throws Exception{\n\t\treturn \"121\";\n\t}", "public String getServiceSn() {\n return serviceSn;\n }", "public Integer getServicetypeid() {\r\n\t\treturn servicetypeid;\r\n\t}", "public ID getServiceID() {\n\treturn serviceID;\n }", "public Integer getServicetypeid() {\r\n return servicetypeid;\r\n }", "public ServiceID getServiceID() {\n\t\treturn null;\n\t}", "public java.lang.String getServiceID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SERVICEID$6, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public int calProxyService() {\n\t\treturn proxyDao.calProxyService();\n\t}", "public ServiceID getServiceID() {\n return null;\n }", "public int getPersistSvcPortNum() {\n return persistSvcPort;\n }", "public int getVersion() {\n return mServiceVersion;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getInstanceNumber() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(INSTANCENUMBER_PROP.get());\n }", "public String getTypeOfService(){\n\treturn typeOfService;\n}", "public String getServiceID();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Integer getInstanceNumber() {\n return (java.lang.Integer)__getInternalInterface().getFieldValue(INSTANCENUMBER_PROP.get());\n }", "public CQ getProductServiceQuantity() { \r\n\t\tCQ retVal = this.getTypedField(12, 0);\r\n\t\treturn retVal;\r\n }", "public int getServicesCount() {\n return services_.size();\n }", "public int getServicesCount() {\n return services_.size();\n }", "public int getNuevoNumServicio(String tipoServicio) throws BaseDeDatosExcepcion, ConexionExcepcion {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNuevoNumServicio(String) - start\");\n\t\t}\n\n\t\tint returnint = incrementarNumServ(tipoServicio);\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"getNuevoNumServicio(String) - end\");\n\t\t}\n\t\treturn returnint;\n\t}", "public int getId_serviceMethod() {\r\n\t\treturn id_serviceMethod;\r\n\t}", "@Override\n public ServiceID getServiceID() {\n\treturn servID;\n }", "public int getIdServicio() {\n return idServicio;\n }", "public int getServicesCount() {\n if (servicesBuilder_ == null) {\n return services_.size();\n } else {\n return servicesBuilder_.getCount();\n }\n }", "public int getServicesCount() {\n if (servicesBuilder_ == null) {\n return services_.size();\n } else {\n return servicesBuilder_.getCount();\n }\n }", "public String getService() {\n\t\treturn service.get();\n\t}", "String getService_id();", "public EI getPayerProductServiceLineItemNumber() { \r\n\t\tEI retVal = this.getTypedField(2, 0);\r\n\t\treturn retVal;\r\n }", "public static String getOSGiServiceIdentifier() {\n\t\treturn getService().getOSGiServiceIdentifier();\n\t}", "public static String getOSGiServiceIdentifier() {\n\t\treturn getService().getOSGiServiceIdentifier();\n\t}", "public static String getOSGiServiceIdentifier() {\n\t\treturn getService().getOSGiServiceIdentifier();\n\t}", "public ID getPsl46_MainService() { \r\n\t\tID retVal = this.getTypedField(46, 0);\r\n\t\treturn retVal;\r\n }", "java.lang.String getServiceId();", "public ServiceInformationType getServiceInformationType() {\r\n\t\treturn this.siType;\r\n\t}", "@Override\n\tpublic String getOSGiServiceIdentifier() {\n\t\treturn MonthlyTradingLocalService.class.getName();\n\t}", "int getServicesCount();", "int getServicesCount();", "public String getNomService() {\r\n\t\treturn nomService;\r\n\t}", "public CQ getPsl12_ProductServiceQuantity() { \r\n\t\tCQ retVal = this.getTypedField(12, 0);\r\n\t\treturn retVal;\r\n }", "public int getNumber() {\n\t\t\n\t\treturn number;\n\t}", "@Transient\n\tpublic String getServiceId()\t{\n\t\treturn mServiceId;\n\t\t//else return \"N/A\";\n\t}", "public String getInstanceNumber()\n {\n return m_instanceNumber;\n }", "public Integer getServicestatusid() {\r\n return servicestatusid;\r\n }", "public EI getProviderProductServiceLineItemNumber() { \r\n\t\tEI retVal = this.getTypedField(1, 0);\r\n\t\treturn retVal;\r\n }", "public String getNumber() {\n\t\treturn getValue(\"number\");\n\t}", "@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _vcmsPortionLocalService.getOSGiServiceIdentifier();\n\t}", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "public String getService() {\n return service;\n }", "String getServiceId();", "public SI getProductServiceLineItemSequenceNumber() { \r\n\t\tSI retVal = this.getTypedField(3, 0);\r\n\t\treturn retVal;\r\n }", "public String getService() {\n return this.service;\n }", "public String getService() {\n return this.service;\n }", "public String getService() {\n return this.service;\n }", "public String getServiceName();", "@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _weatherLocalService.getOSGiServiceIdentifier();\n\t}", "public java.lang.String getOSGiServiceIdentifier();", "public static String getServiceName() {\n\t\treturn serviceName;\n\t}", "public static String getServiceName() {\n\t\treturn serviceName;\n\t}", "public org.apache.xmlbeans.XmlString xgetServiceID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SERVICEID$6, 0);\n return target;\n }\n }", "public static Integer getNumberFromType(Type type) {\n\t\tif (type == Type.PURCHASE)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 2;\n\t}", "public int getNumber() {\n\t\treturn number;\n\t}", "public int getNumber() {\n\t\treturn number;\n\t}", "public int getNumber() {\n\t\treturn number;\n\t}", "public int getNumber() {\n\t\treturn number;\n\t}", "public final int getNumber() {\n return number;\n }", "@Override\n\tpublic java.lang.String getOSGiServiceIdentifier() {\n\t\treturn _clipLocalService.getOSGiServiceIdentifier();\n\t}", "java.lang.String getServiceName();", "java.lang.String getServiceName();", "public int getNumber() {\r\n\t\treturn number;\r\n\t}", "public byte getSNum() {\r\n return _sNum;\r\n }", "public void setServiceID(int value) {\n this.serviceID = value;\n }", "public int getNum() throws RemoteException {\n\t\treturn 0;\r\n\t}", "public String getServiceName() {\n return this.serviceName;\n }", "public java.lang.String getServiceClass() {\n return serviceClass;\n }", "public int number() {\n return number;\n }", "public CodeableConcept serviceType() {\n return getObject(CodeableConcept.class, FhirPropertyNames.PROPERTY_SERVICE_TYPE);\n }", "public String getServiceName() {\r\n return this.serviceName;\r\n }", "public static int getServiceTagFromMetadata(Uint64 metadata) {\n return metadata.toJava().and(MetaDataUtil.METADATA_MASK_SERVICE_INDEX.toJava())\n .shiftRight(60).intValue();\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.ReviewServiceType getServiceType();", "@Override\n public int getPort() {\n final ServiceTracker<HttpService, HttpService> serviceTracker = new ServiceTracker<>(context, HttpService.class, null);\n serviceTracker.open();\n final ServiceReference<HttpService> serviceReference = serviceTracker.getServiceReference();\n serviceTracker.close();\n return ofNullable(serviceReference)\n .map(it -> it.getProperty(\"org.osgi.service.http.port\"))\n .map(String::valueOf)\n .map(Integer::parseInt)\n .orElse(80);\n }", "String getServiceName();", "String getServiceName();", "public String getServiceName()\n {\n return this.mServiceName;\n }", "public String getServiceName() {\n return this.serviceName;\n }", "public java.lang.String getNumber() {\n java.lang.Object ref = number_;\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 number_ = s;\n return s;\n }\n }" ]
[ "0.73643845", "0.7282952", "0.72500175", "0.7066653", "0.7033244", "0.69685787", "0.68939227", "0.6819264", "0.68071836", "0.6720809", "0.6671033", "0.66418874", "0.6613018", "0.66123265", "0.6553716", "0.64730555", "0.64362574", "0.6430929", "0.6429743", "0.64240795", "0.6383458", "0.63631463", "0.6353784", "0.6287273", "0.6232511", "0.62160283", "0.62108487", "0.61835045", "0.61767316", "0.61739606", "0.6166352", "0.6166352", "0.61403733", "0.6113171", "0.60825986", "0.60798514", "0.60704887", "0.60704887", "0.6038285", "0.603548", "0.6020622", "0.6009225", "0.6009225", "0.6009225", "0.59890074", "0.5979603", "0.59551674", "0.5951828", "0.5924949", "0.5924949", "0.59148616", "0.5910047", "0.58947945", "0.58891463", "0.58849835", "0.58837014", "0.587454", "0.58731997", "0.5860702", "0.5860514", "0.5860514", "0.5860514", "0.58579", "0.58506393", "0.58268917", "0.58268917", "0.58268917", "0.58177507", "0.58166605", "0.58023477", "0.57912046", "0.57912046", "0.57650137", "0.5754687", "0.57526886", "0.57526886", "0.57526886", "0.57526886", "0.5735743", "0.5735162", "0.5727607", "0.5727607", "0.57244134", "0.5716242", "0.57148474", "0.5701769", "0.570098", "0.5696913", "0.56940264", "0.5693033", "0.56909287", "0.56828386", "0.56799847", "0.5678024", "0.56760174", "0.56760174", "0.56710565", "0.5670065", "0.56699103" ]
0.7162019
4
PlaceInfo defines a nonmodifiable interface over a Place. It is employed by the classes that need to access the information contained in the place but that cannot modify the place itself.
public interface PlaceInfo { /** * Return the place name * @return the place name */ public String getName(); /** * Return the place description * @return the place description */ public String getDescription(); /** * Is this place the space ship? * @return true if the place represents a space ship */ public boolean isSpaceship(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Placeable {\n}", "public Place() {\r\n\t\tthis.name = \"Unknown Place\";\r\n\t\tthis.data = new LinkedHashMap<Integer, Data>();\r\n\t\tthis.populateData();\r\n\t}", "Place getPlace();", "public String getPlace() {\n\t\treturn place;\n\t}", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "interface Place {\n\n\t// Return the adjacent Place in the given direction\n\tpublic Place goNorth();\n\tpublic Place goSouth();\n\tpublic Place goEast();\n\tpublic Place goWest();\n\n\t// Returns true only for the special \"Wall\" place\n\tpublic boolean isWall();\n\n\t// Returns true only for the special \"Cheese\" place\n\tpublic boolean isCheese();\n}", "public int getPlaceDescription() {\n return mPlaceDescription;\n }", "public interface Place {\n\n public boolean canMoveAbove();\n public boolean canMoveBelow();\n public boolean canMoveLeft();\n public boolean canMoveRight();\n public boolean canMoveDiagonal();\n\n public void setAbove(Place h);\n public void setBelow(Place h);\n public void setLeft(Place h);\n public void setRight(Place h);\n public void setDiagonal(Place h);\n\n public void setPixel(int x, int y);\n public int getX();\n public int getY();\n public void setLabel(String l);\n public String getLabel();\n public Place getAbove();\n public Place getBelow();\n public Place getLeft();\n public Place getRight();\n public Room getDiagonal();\n\n public void setPlayer(Player p);\n public boolean occupiedByPlayer();\n public void removePlayer();\n}", "public Place getPlace() {\n\t\treturn null;\r\n\t}", "public void setPlace(String place){\n this.place = place;\n }", "public String getPlaceId() {\n return placeId;\n }", "public Place(String name, LinkedHashMap<Integer, Data> data) {\r\n\t\tthis.name = name;\r\n\t\tthis.data = data;\r\n\t}", "public final native PlaceResult getPlace() /*-{\n return this.getPlace();\n }-*/;", "public int getPlace() {\n\t\treturn place;\n\t}", "public String getLocationInfo(String _placeInfo) {\r\n String urlString = apiUrl;\r\n obj = getConnection(urlString);\r\n try {\r\n return obj.getString(fixParams(_placeInfo));\r\n } catch (JSONException ex) {\r\n return \"JSONException: Info not found\";\r\n }\r\n }", "public void setPlace(int num) {\n\t\tplace = num;\n\t}", "public void getPlaceInfo(String id, final ApiPlaceInfoResult callback) {\n Call<Place> call = this.mPlaceCall.getPlaceInfo(id);\n call.enqueue(new Callback<Place>() {\n @Override\n public void onResponse(Call<Place> call, Response<Place> response) {\n int statusCode = response.code();\n if (statusCode == HTTP_200) {\n initRetrofitClient();\n Place repository = response.body();\n Log.d(TAG, repository.toString());\n callback.success(repository);\n } else {\n callback.error(statusCode, response.message());\n }\n }\n\n @Override\n public void onFailure(Call<Place> call, Throwable t) {\n Log.e(TAG, \"Error while calling the 'getPlaceInfo' method!\", t);\n callback.error(-1, t.getLocalizedMessage());\n }\n });\n }", "@Override\n public void onPlaceSelected(Place place) {\n latLng = place.getLatLng();\n locationName = place.getName().toString();\n locationAddress = place.getAddress().toString();\n Log.i(TAG, \"Location:latitude: \" + place.getLatLng().latitude);\n Log.i(TAG, \"Location:Address: \" + place.getAddress());\n Log.i(TAG, \"Location:Web: \" + place.getWebsiteUri());\n Log.i(TAG, \"Location:Place: \" + place.getName());\n mMap.addMarker(new MarkerOptions().position(latLng).title(locationName).snippet(locationAddress)).showInfoWindow();\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n }", "public String getPlace(){\n return place;\n }", "public interface PlacesContract {\r\n\r\n interface View extends BaseView<Presenter> {\r\n void showPlaces(List<Place> places);\r\n void showAddPlaceUi();\r\n void showPlaceDetailUI(@NonNull String placeID);\r\n void startDirectionActivity(@NonNull String placeID);\r\n void showNoDataAvailable();\r\n void hideNoDataAvailable();\r\n }\r\n\r\n interface Presenter extends BasePresenter {\r\n void loadPlaces();\r\n void addNewPlace();\r\n void openPlaceDetail(@NonNull String placeID);\r\n void openDirectionActivity(@NonNull String placeID);\r\n }\r\n}", "public Place(String name) {\r\n\t\tthis.name = name;\r\n\t\tthis.data = new LinkedHashMap<Integer, Data>();\r\n\t\tthis.populateData();\r\n\t}", "private static void createPlace(Place place) {\r\n\t\tint tempInt = -1;\r\n\t\tContainerNII placeNii = new ContainerNII();\r\n\t\tGeoCoordinate position = new GeoCoordinate();\r\n\t\tMedia media = new Media();\r\n\t\t\r\n\t\tinsertNIIValues(placeNii, \"place\");\r\n\t\tplace.setNii(placeNii);\r\n\t\t\t\t\r\n\t\tif ((tempInt = insertInteger(\"place radius: \")) != -1)\r\n\t\t\t\tplace.setRadius(tempInt);\r\n\t\t\r\n\t\tinsertPosition(position);\r\n\t\tplace.setPosition(position);\r\n\t\t\r\n\t\tinsertMedia(media);\r\n\t\tplace.setMedia(media);\r\n\t}", "public Place(String name, String address, double longitude, \n\t\t\tdouble latitude, int phoneNumber, String url, String comment,\n\t\t\tint rate, PlaceType type) {\n\t\tdate = System.currentTimeMillis();\n\t\tposition = new GeoPoint(longitude, latitude);\n\t\tthis.name = name;\n\t\tthis.address = address;\n\t\tthis.phoneNumber = phoneNumber;\n\t\tthis.url = url;\n\t\tthis.comment = comment;\n\t\tthis.rate = rate;\n\t\tthis.type = type;\n\t}", "public String Get_place() \n {\n\n return place;\n }", "public int getPlaceLocation() {\n return mPlaceLocation;\n }", "public void Print_place()\n {\n\n System.out.println(\"Place: \" + place);\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\")\n PendingResult<PlaceLikelihoodBuffer> result = Places.PlaceDetectionApi\n .getCurrentPlace(mGoogleApiClient, null);\n result.setResultCallback(new ResultCallback<PlaceLikelihoodBuffer>() {\n @Override\n public void onResult(@NonNull PlaceLikelihoodBuffer likelyPlaces) {\n int i = 0;\n mLikelyPlaceNames = new String[mMaxEntries];\n mLikelyPlaceAddresses = new String[mMaxEntries];\n mLikelyPlaceAttributions = new String[mMaxEntries];\n mLikelyPlaceLatLngs = new LatLng[mMaxEntries];\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user. Max 5.\n Place place = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = (String) place.getName();\n mLikelyPlaceAddresses[i] = (String) place.getAddress();\n mLikelyPlaceAttributions[i] = (String) place.getAttributions();\n mLikelyPlaceLatLngs[i] = place.getLatLng();\n\n i++;\n if (i > (mMaxEntries - 1)) {\n break;\n }\n }\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n }\n });\n } else {\n // Add a default marker, because the user hasn't selected a place.\n /*mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)));*/\n }\n }", "public void setPlaceId(String placeId) {\n this.placeId = placeId;\n }", "public int getPlaceName() {\n return mPlaceName;\n }", "static Place getPlaceByID ( int key)\r\n\t{\r\n\t\treturn tm.get(key);\r\n\t}", "public Pull<Place> thisPlace();", "Place resolveLocation( Place place );", "public PlaceType getType() {\n\t\treturn type;\n\t}", "public ArrayList<Place> getPlaceList() {\n\t\treturn this.places;\n\t}", "@Override\n public void onPlaceSelected(Place place) {\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(place.getLatLng().latitude,\n place.getLatLng().longitude), mMap.getCameraPosition().zoom));\n\n addMarkerAtPoi(place);\n }", "public Place(int placeName, int placeLocation, int placeDescription, int placeGeoData, int placeImage) {\n mPlaceName = placeName;\n mPlaceLocation = placeLocation;\n mPlaceDescription = placeDescription;\n mPlaceGeoData = placeGeoData;\n mPlaceImage = placeImage;\n }", "public interface IModifiablePlacement {\n\t\n\t/**\n\t * Get the placements priority.\n\t * @return The placements priority.\n\t */\n\tpublic Priority getPriority();\n\n\t/**\n\t * Set the placements priority.\n\t * @param priority The placements priority.\n\t */\n\tpublic void setPriority(Priority priority);\n\t\n\t/**\n\t * Get the placements container.\n\t * @return The placements container.\n\t */\n\tpublic Container getContainer();\n\t\n\t/**\n\t * Get the state of the placements.\n\t * @return The state of the placements.\n\t */\n\tpublic IPlacementState getState();\n\t\n\t/**\n\t * Get the placements underlay.\n\t * @return The placements underlay.\n\t */\n\tpublic PlacementUnderlay getUnderlay();\n\t\n\t/**\n\t * Set the placements underlay.\n\t * @param underlay The placements underlay.\n\t */\n\tpublic void setUnderlay(PlacementUnderlay underlay);\n\t\n\t/**\n\t * Get the placements overlay.\n\t * @return The placements overlay.\n\t */\n\tpublic PlacementOverlay getOverlay();\n\t\n\t/**\n\t * Set the placements overlay.\n\t * @param overlay The placements overlay.\n\t */\n\tpublic void setOverlay(PlacementOverlay overlay);\n\t\n\t/**\n\t * Mark this placement for deletion.\n\t */\n\tpublic void MarkForDeletion();\n}", "@Override\r\n\tpublic DiaryEventEditPlace getPlace() {\n\t\treturn null;\r\n\t}", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n return;\n }\n final Task<PlaceLikelihoodBufferResponse> placeResult =\n mPlaceDetectionClient.getCurrentPlace(null);\n placeResult.addOnCompleteListener\n (new OnCompleteListener<PlaceLikelihoodBufferResponse>() {\n @Override\n public void onComplete(@NonNull Task<PlaceLikelihoodBufferResponse> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n PlaceLikelihoodBufferResponse likelyPlaces = task.getResult();\n\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (likelyPlaces.getCount() < M_MAX_ENTRIES) {\n count = likelyPlaces.getCount();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user.\n mLikelyPlaceNames[i] = (String) placeLikelihood.getPlace().getName();\n mLikelyPlaceAddresses[i] = (String) placeLikelihood.getPlace()\n .getAddress();\n mLikelyPlaceAttributions[i] = (String) placeLikelihood.getPlace()\n .getAttributions();\n mLikelyPlaceLatLngs[i] = placeLikelihood.getPlace().getLatLng();\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n\n } else {\n Log.e(TAG, \"Exception: %s\", task.getException());\n }\n }\n });\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)))\n .setIcon(BitmapDescriptorFactory.fromResource(R.drawable.ic_car_marker));\n ;\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "public String getplaceName() {\n\t\treturn placeName;\n\t}", "public Place(String Location, String Name) {\n mLocation = Location;\n mName = Name;\n }", "public interface PlaceService {\n\n List<Place> listPlacesByType(final PlaceType type);\n void savePlacesInDb(final List<Place> places);\n\n}", "public void addPlace(String key, Place place)\n {\n if(mMap!=null) {\n Double lon, lat;\n lat = Double.parseDouble(place.getLat());\n lon = Double.parseDouble(place.getLon());\n String name = place.getName();\n String type = place.getType();\n LatLng placeLatLng = new LatLng(lat, lon);\n\n if (placesMarkers.containsKey(key)) {\n //Already Marker is present,\n\n //Just update the marker\n placesMarkers.get(key).setPosition(placeLatLng);\n placesMarkers.get(key).setTitle(name);\n\n\n } else {\n //Adding marker first time\n\n //Create marker with necessary variables\n placesMarkers.put(key, mMap.addMarker(new MarkerOptions().position(placeLatLng).\n title(name).\n icon(BitmapDescriptorFactory.fromBitmap(unknownUser))));\n }\n\n //Set the icon of marker based on type\n\n if (type.equals(\"home\")) {\n placesMarkers.get(key).setIcon(\n BitmapDescriptorFactory.fromResource(R.drawable.place_home)\n );\n } else if (type.equals(\"date\")) {\n placesMarkers.get(key).setIcon(\n BitmapDescriptorFactory.fromResource(R.drawable.place_dating)\n );\n } else if (type.equals(\"education\")) {\n placesMarkers.get(key).setIcon(\n BitmapDescriptorFactory.fromResource(R.drawable.place_education)\n );\n }\n }\n }", "interface PlaceDetailsColumns {\n\t\tString PLACE_ID = \"place_id\";\n\t\tString PLACE_NAME = \"name\";\n\t\tString PLACE_ADDRESS = \"address\";\n\t\tString PLACE_PHONE = \"phone\";\n\t\tString PLACE_LATITUDE = \"latitude\";\n\t\tString PLACE_LONGITUDE = \"longitude\";\n\t\tString PLACE_ICON = \"icon\";\n\t\tString PLACE_REFERENCE = \"reference\";\n\t\tString PLACE_TYPES = \"types\";\n\t\tString PLACE_VICINITY = \"vicinity\";\n\t\tString PLACE_RATING = \"rating\";\n\t\tString PLACE_URL = \"url\";\n\t\tString PLACE_WEBSITE = \"website\";\n\t\tString PLACE_LAST_UPDATED = \"last_update_time\";\n\t}", "@Override\r\n\tpublic void savePlace(Place place) {\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 = \"INSERT IGNORE INTO places VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, place.getPlaceId());\r\n\t\t\tps.setString(2, place.getName());\r\n\t\t\tps.setDouble(3, place.getRating());\r\n\t\t\tps.setString(4, place.getAddress());\r\n\t\t\tps.setString(5, place.getIcon());\r\n\t\t\tps.setDouble(6, place.getLat());\r\n\t\t\tps.setDouble(7, place.getLon());\r\n\t\t\tps.setString(8, place.getCity());\r\n\t\t\tps.execute();\r\n\r\n\t\t\tif (place.getTypes() != null) {\r\n\t\t\t\tsql = \"INSERT IGNORE INTO types VALUES(?, ?)\";\r\n\t\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\t\tps.setString(1, place.getPlaceId());\r\n\t\t\t\tfor (String type : place.getTypes()) {\r\n\t\t\t\t\tps.setString(2, type);\r\n\t\t\t\t\tps.execute();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (place.getPhotos() != null) {\r\n\t\t\t\tsql = \"INSERT IGNORE INTO photos VALUES(?, ?)\";\r\n\t\t\t\tps = conn.prepareStatement(sql);\r\n\t\t\t\tps.setString(1, place.getPlaceId());\r\n\t\t\t\tfor (String photo : place.getPhotos()) {\r\n\t\t\t\t\tps.setString(2, photo);\r\n\t\t\t\t\tps.execute();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private Place getPlace(Integer idPlace) {\n\t\tPlace place = null;\n\t\tfor(Place p: places ){\n\t\t\tif(p.getId().equals(idPlace)){\n\t\t\t\tplace = p;\n\t\t\t}\n\t\t}\n\t\treturn place;\n\t}", "public String idOfPlace()\n {\n return id;\n }", "private Place getPlace(String identifierPlace) {\n\t\tPlace place = null;\n\t\tfor(Place p: places ){\n\t\t\tif(p.getName().equals(identifierPlace)){\n\t\t\t\tplace = p;\n\t\t\t}\n\t\t}\n\t\treturn place;\n\t}", "public interface LocationPoint {\n\n /**\n * ID of place on the map\n * @return\n */\n int getLocationID();\n /**\n * ID of unique point on the map\n * @return ID\n */\n int getMapPointID();\n\n}", "public void setType(PlaceType type) {\n\t\tthis.type = type;\n\t}", "public String getOwnerPlace(int idPlace) throws Exception {\n if (idPlace > 40 || idPlace < 1) {\n\n throw new Exception(\"Place doesn't exist\");\n } else {\n String dono = (String) Donos.get(idPlace);\n if (dono.equals(\"noOwner\") || dono.equals(\"Luxury Tax\") || dono.equals(\"Income Tax\")) {\n throw new Exception(\"This place can't be owned\");\n } else {\n return (String) Donos.get(idPlace);\n }\n }\n }", "public void setPlace(String place) {\n\t\tthis.place = place == null ? null : place.trim();\n\t}", "public void setPlace(String place) {\n this.place = place == null ? null : place.trim();\n }", "public void setPlace(String place) {\n this.place = place == null ? null : place.trim();\n }", "public void setPlace(String place) {\n this.place = place == null ? null : place.trim();\n }", "public static String getWaypointFromPlace(Place place) {\n return \"geo!\" + place.getLatitude() + \",\" + place.getLongitude();\n }", "public String getOtherPlace() {\r\n return otherPlace;\r\n }", "public int getPlaceImage() {\n return mPlaceImage;\n }", "@XmlTransient\n public List<Place> getPlace() {\n return place;\n }", "@Override\n public View getInfoContents(Marker marker) {\n infoWindow = getLayoutInflater().inflate(R.layout.custom_info_contents,\n (FrameLayout) findViewById(R.id.map), false);\n\n title = ((TextView) infoWindow.findViewById(R.id.title));\n title.setText(place.getAddress());\n\n snippet = ((TextView) infoWindow.findViewById(R.id.snippet));\n snippet.setText(place.getLatLng().latitude + \",\" + place.getLatLng().longitude);\n\n clickhere = ((TextView) infoWindow.findViewById(R.id.tvClickHere));\n clickhere.setText(R.string.click_here);\n\n googleMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n Intent intent = new Intent(MapActivity.this, MoreOptionsActivity.class);\n if (source == null) {\n source = new LatLng(mDefaultLocation.latitude, mDefaultLocation.longitude);\n }\n if (destination == null) {\n destination = source;\n }\n\n intent.putExtra(\"source_Latitude\", source.latitude);\n intent.putExtra(\"source_Longitude\", source.longitude);\n\n intent.putExtra(\"dest_Latitude\", destination.latitude);\n intent.putExtra(\"dest_Longitude\", destination.longitude);\n\n intent.putExtra(\"title\", place.getAddress());\n intent.putExtra(\"place_selection\", place_selection_flag);\n\n startActivity(intent);\n\n }\n });\n\n return infoWindow;\n }", "public int getPlaceGeoData() {\n return mPlaceGeoData;\n }", "public com.google.protobuf.ByteString\n getUiPlaceBytes() {\n java.lang.Object ref = uiPlace_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n uiPlace_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getOwnerPlace() {\r\n return ownerPlace;\r\n }", "public static Map<String, PlaceDescription> getPlaceMap(Gedcomx doc) {\n Map<String, PlaceDescription> map = new HashMap<String, PlaceDescription>();\n if (doc.getPlaces() != null) {\n for (PlaceDescription placeDescription : doc.getPlaces()) {\n map.put(placeDescription.getId(), placeDescription);\n map.put(\"#\" + placeDescription.getId(), placeDescription);\n if (placeDescription.getIdentifiers() != null) {\n for (Identifier identifier : placeDescription.getIdentifiers()) {\n if (identifier.getValue() != null) {\n map.put(identifier.getValue().toString(), placeDescription);\n }\n }\n }\n }\n }\n return map;\n }", "public void insertOrUpdate(Place place) {\n ContentValues values = new ContentValues();\n values.put(IPlace.PLACE_NAME_COLUMN, place.getName());\n values.put(IPlace.PLACE_CATEGORY_COLUMN, place.getCategory());\n values.put(IPlace.PLACE_NEIGHBOURHOOD_COLUMN, place.getNeighbourhood());\n values.put(IPlace.PLACE_COORDINATE_X_COLUMN, place.getX());\n values.put(IPlace.PLACE_COORDINATE_Y_COLUMN, place.getY());\n String[] args = {String.valueOf(place.getObjectId())};\n boolean success = super.update(IPlace.PLACE_OBJECT_ID_COLUMN, args, values);\n if (!success) {\n values.put(IPlace.PLACE_OBJECT_ID_COLUMN, place.getObjectId());\n super.insert(values);\n }\n }", "@Override\n\tpublic String getPlaceCode() {\n\t\treturn null;\n\t}", "public com.google.protobuf.ByteString\n getUiPlaceBytes() {\n java.lang.Object ref = uiPlace_;\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 uiPlace_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@SuppressLint(\"NewApi\")\n @Override\n public void onPlaceSelected(@NonNull final Place place) {\n Log.i(\"ssd\", \"Place: \" + place.getName() + \", \" + place.getId());\n\n final LatLng latLng = place.getLatLng();\n name = place.getName();\n lat= Objects.requireNonNull(place.getLatLng()).latitude;\n longt= Objects.requireNonNull(place.getLatLng()).longitude;\n\n Log.i(\"la\", String.valueOf(latLng));\n\n final MarkerOptions markerOptions = new MarkerOptions();\n\n Toast.makeText(getApplicationContext(), String.valueOf(place.getLatLng()), Toast.LENGTH_LONG).show();\n // Setting the position for the marker\n markerOptions.position(Objects.requireNonNull(place.getLatLng()));\n\n // Setting the title for the marker.\n // This will be displayed on taping the marker\n markerOptions.title(name);\n\n // Clears the previously touched position\n mMap.clear();\n\n mMap.setOnMapLoadedCallback(new GoogleMap.OnMapLoadedCallback() {\n @Override\n public void onMapLoaded() {\n // Animating to the touched position\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 13.3f));\n\n // Placing a marker on the touched position\n mMap.addMarker(markerOptions);\n }\n });\n\n\n Log.i(\"lt\", String.valueOf(Objects.requireNonNull(place.getLatLng()).latitude));\n }", "public Place(String Location, String Name, int ImageResourceID) {\n mLocation = Location;\n mName = Name;\n mImageResourceID = ImageResourceID;\n }", "@SuppressLint(\"SetTextI18n\")\n @Override\n public void onSuccess(FetchPlaceResponse task) {\n\n\n Log.d(TAG, \"onResult: name: \" + task.getPlace().getName());\n Log.d(TAG, \"onResult: name: \" + task.getPlace().getId());\n Log.d(TAG, \"onResult: name: \" + task.getPlace().getAddress());\n\n// getValuesFromCityID(task.getPlace().getId());\n// cityGoogleId = task.getPlace().getId();\n\n\n placeId = null;\n\n// final Place place = task.getPlace();\n\n try{\n mPlace = new PlaceInfo();\n mPlace.setName( task.getPlace().getName().toString());\n// Log.d(TAG, \"onResult: name: \" + place.getName());\n placeName = task.getPlace().getName().toString();\n mPlace.setAddress( task.getPlace().getAddress().toString());\n placeAddress = task.getPlace().getAddress().toString();\n// Log.d(TAG, \"onResult: address: \" + place.getAddress());\n mPlace.setAttributions( task.getPlace().getAttributions().toString());\n//// Log.d(TAG, \"onResult: attributions: \" + place.getAttributions());\n mPlace.setId( task.getPlace().getId());\n placeId = task.getPlace().getId();\n// Log.d(TAG, \"onResult: id:\" + place.getId());\n mPlace.setLatlng( task.getPlace().getLatLng());\n// Log.d(TAG, \"onResult: latlng: \" + place.getLatLng());\n// mPlace.setRating( task.getPlace().getRating());\n// Log.d(TAG, \"onResult: rating: \" + place.getRating());\n mPlace.setPhoneNumber( task.getPlace().getPhoneNumber().toString());\n// Log.d(TAG, \"onResult: phone number: \" + place.getPhoneNumber());\n mPlace.setWebsiteUri( task.getPlace().getWebsiteUri());\n// Log.d(TAG, \"onResult: website uri: \" + place.getWebsiteUri());\n//\n// Log.d(TAG, \"onResult: place: \" + mPlace.toString());\n }catch (NullPointerException e){\n Log.e(TAG, \"onResult: NullPointerException: \" + e.getMessage() );\n }\n\n\n mPlace.setId(task.getPlace().getId());\n moveCamera(task.getPlace().getLatLng(), DEFAULT_ZOOM, task.getPlace().getName());\n\n// places.release();\n\n\n }", "@Override\n public void onPlaceSelected(Place place) {\n Log.i(TAG, \"Place: \" + place.getName());\n editTextBusinessName.setText(place.getName());\n editTextLocation.setText(place.getAddress());\n editTextPhone.setText(place.getPhoneNumber());\n barCoordinates = place.getLatLng();\n //editTextBusinessDescription.setText(place.getAttributions());\n\n }", "interface PlacesColumns {\n\t\tString PLACE_ID = \"place_id\";\n\t\tString PLACE_NAME = \"name\";\n\t\tString PLACE_LATITUDE = \"latitude\";\n\t\tString PLACE_LONGITUDE = \"longitude\";\n\t\tString PLACE_DISTANCE = \"distance\";\n\t\tString PLACE_ICON = \"icon\";\n\t\tString PLACE_REFERENCE = \"reference\";\n\t\tString PLACE_TYPES = \"types\";\n\t\tString PLACE_VICINITY = \"vicinity\";\n\t\tString PLACE_LAST_UPDATED = \"last_update_time\";\n\t}", "public boolean mapsToPlace(Place where) {\n\t\treturn false;\r\n\t}", "private static String fixParams(String _placeInfo) {\r\n String toLowerCase = _placeInfo.toLowerCase();\r\n if (\"city\".equals(toLowerCase) || \"timezone\".equals(toLowerCase)) {\r\n return toLowerCase;\r\n } else {\r\n switch (toLowerCase) {\r\n case \"latitude\":\r\n return \"lat\";\r\n case \"longitude\":\r\n return \"lon\";\r\n case \"countryname\":\r\n return \"country\";\r\n case \"stateorprov\":\r\n return \"region\";\r\n case \"ip\":\r\n return \"query\";\r\n }\r\n return _placeInfo;\r\n }\r\n }", "public String getLivingPlace() {\n return livingPlace;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Place [name=\" + name + \", address=\" + address + \", photo=\" \n\t\t\t\t+ photo + \", phoneNumber=\" + phoneNumber + \", url=\" + url \n\t\t\t\t+ \", comment=\" + comment + \", date=\" + date + \", rate=\" \n\t\t\t\t+ rate + \"]\";\n\t}", "public interface UpdatePlaceAddressPresenter {\n\n\n void updatePlaceAddress(String areaName, String detailAreaName, String objectId);\n}", "public void setPlace(IPlace place) {\n\t\tthis.place = place;\r\n\t\t\r\n\t\t/*\r\n\t\t * 主建筑物的位置,决定了子建筑物的位置\r\n\t\t */\r\n\t\tfor(AbstractBuilding building : getBuildings()){\r\n\t\t\tbuilding.setPlace(place);\r\n\t\t}\r\n\t}", "public String getPlacecode() {\n return placecode;\n }", "@Override\n\tpublic synchronized Collection<Place> getPlaces() {\n\t\treturn this.places;\n\t}", "Builder addContentLocation(Place value);", "@Override\n\tpublic Place find(Place obj) {\n\t\treturn null;\n\t}", "private boolean isPlaceCommand(Command command) {\r\n return command instanceof PlaceCommand;\r\n }", "private HashMap<String, String> getPlace(JSONObject jPlace) {\n\n HashMap<String, String> place = new HashMap<String, String>();\n\n String id = \"\";\n String reference = \"\";\n String description = \"\";\n\n try {\n\n description = jPlace.getString(\"description\");\n id = jPlace.getString(\"place_id\");\n reference = jPlace.getString(\"reference\");\n\n place.put(\"description\", description);\n place.put(\"_id\", id);\n place.put(\"reference\", reference);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return place;\n }", "@Override\r\n\t\tpublic Place getItem(int position) {\n\t\t\treturn mPlaceList.get(position);\r\n\t\t}", "public boolean hasUiPlace() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "public void setPlaces(int places) {\r\n this.places = places;\r\n }", "public interface WorkPlace {\n}", "public interface CityDetailsPresenter {\n public void requetWeatherData(final int placeID);\n}", "public interface GooglePlacesApi {\n\n @GET(\"maps/api/place/autocomplete/json?type=(cities)&language=es\")\n Call<PredictionResult> autoComplete(@Query(\"input\") String text);\n\n @GET(\"maps/api/place/details/json\")\n Call<DetailsResult> getPlaceDetails(@Query(\"place_id\") String text);\n\n\n}", "public interface PlaceTypeLinkModel extends BaseModel {\n\n /**\n * Get the {@code place_id} value.\n */\n long getPlaceId();\n\n /**\n * Get the {@code place_type_id} value.\n */\n long getPlaceTypeId();\n}", "public interface NearbyDetails {\n\n /**\n * 获取周边详情\n * @param uid\n */\n void nearbyDetails(String uid);\n\n void destory();\n\n}", "public interface PlaceAdapterContract {\n interface View {\n\n }\n\n interface Model {\n\n }\n}", "public boolean hasUiPlace() {\n return ((bitField0_ & 0x00000010) != 0);\n }", "public interface DetailsContract {\n\n interface View {\n void loadSearchResults(List<POI> resultsList);\n void loadPlaceTags(List<String> placeTags);\n void loadWeather(WeatherModel model);\n }\n\n interface Presenter {\n void computePlaceTags(Places places);\n void getWeather(String cityName);\n void getPOI(String cityName);\n void onStop();\n }\n}", "public void add(Place place) {\n\t\tthis.places.add(place);\n\t}", "public interface Communicator {\n public void passPlaceIndex(int place_index);\n\n\n public void passBeenMarkerState(Boolean isChecked, int placeIndex);\n\n public void passCurrentLocation(LatLng currentLocation);\n\n public void passPlaces(List<Place> places);\n\n public void passPlace(Place place, int placeIndex);\n\n public void passCameraPosition(LatLng target, float zoom);\n\n public void passMarker(Marker marker);\n}" ]
[ "0.66923064", "0.6635178", "0.6631923", "0.6317192", "0.63142115", "0.63142115", "0.63142115", "0.63142115", "0.62479466", "0.62086016", "0.61862516", "0.61787283", "0.61462796", "0.6066132", "0.60413927", "0.6027888", "0.6011433", "0.5977762", "0.5961801", "0.59359604", "0.5933252", "0.5929024", "0.59101754", "0.591001", "0.58719593", "0.5860788", "0.5836185", "0.58137375", "0.5812135", "0.580103", "0.58002496", "0.57877827", "0.57623863", "0.57620573", "0.5756003", "0.57555586", "0.5734897", "0.57319045", "0.57223034", "0.5720112", "0.5705793", "0.56950694", "0.56941545", "0.56937", "0.56873375", "0.5675836", "0.56727725", "0.5560079", "0.55596036", "0.55593944", "0.5556649", "0.5554732", "0.5553088", "0.5550136", "0.5514761", "0.5511901", "0.5511901", "0.5511901", "0.5510247", "0.5502506", "0.54985994", "0.5488578", "0.54825395", "0.54769844", "0.5475556", "0.5468608", "0.54633564", "0.544923", "0.54456156", "0.54435235", "0.5423757", "0.538195", "0.5378035", "0.53731054", "0.5360385", "0.5359143", "0.53350616", "0.5333408", "0.5331571", "0.532676", "0.53261024", "0.53097683", "0.52987736", "0.5292586", "0.5276451", "0.52683234", "0.52404845", "0.5230352", "0.52270967", "0.52237374", "0.5218458", "0.5217261", "0.5214629", "0.5196627", "0.51920253", "0.5189811", "0.5185292", "0.5160932", "0.515837", "0.51496655" ]
0.8248078
0
Return the place name
public String getName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getplaceName() {\n\t\treturn placeName;\n\t}", "public int getPlaceName() {\n return mPlaceName;\n }", "public String Get_place() \n {\n\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n\t\treturn place;\n\t}", "public String getCustomerPlace() {\r\n return town.getName();\r\n }", "public String getPlace(){\n return place;\n }", "public void printList(ETPlace place) {\n place.getName();\n\n\n }", "public void Print_place()\n {\n\n System.out.println(\"Place: \" + place);\n }", "@ApiModelProperty(value = \"Name of the place\")\n public String getName() {\n return name;\n }", "public String getName () {\n\t return (streetName) ;\n }", "private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}", "public static String getPlace(String place) {\n if (place != null\n && place.contains(\" of \")) {\n return place.substring(place.lastIndexOf(\" of \") + \" of \".length());\n }\n return place;\n }", "private String getName(String name) {\n\t\tint n;\n\t\tif (name.startsWith(\"place_\")) {\n\t\t\tn = Integer.parseInt(name.substring(6));\n\t\t} else if (name.startsWith(\"t_\")) {\n\t\t\tn = Integer.parseInt(name.substring(2));\n\t\t} else {\n\t\t\treturn name;\n\t\t}\n\t\tif (n < net.getPlaces().size()) {\n\t\t\tPlace p = (Place) net.getPlaces().get(n);\n\t\t\treturn \"Place \" + p.getIdentifier();\n\t\t}\n\t\tn -= net.getPlaces().size();\n\t\tn--;\n\t\tif (n < net.getTransitions().size()) {\n\t\t\tTransition t = (Transition) net.getTransitions().get(n);\n\t\t\treturn \"Transition \" + t.getIdentifier();\n\t\t}\n\t\treturn name;\n\t}", "private Place getPlace(String identifierPlace) {\n\t\tPlace place = null;\n\t\tfor(Place p: places ){\n\t\t\tif(p.getName().equals(identifierPlace)){\n\t\t\t\tplace = p;\n\t\t\t}\n\t\t}\n\t\treturn place;\n\t}", "public String getLocationName(Context context){\n // just return the location name if it has already been set, either auto-generated or custom-set\n if (!locationName.equals(\"\") || isCustomLocationName) {\n return locationName;\n }\n\n Geocoder geocoder = new Geocoder(context);\n try {\n // extract the location name using the Address created from the latitude and longitude coordinates\n List<Address> addressName = geocoder.getFromLocation(getLatitude(), getLongitude(), 1);\n locationName = buildLocationName(addressName.listIterator().next());\n }\n catch (Exception e) {\n // set location name to null if there was an error\n locationName = \"\";\n }\n return locationName;\n }", "java.lang.String getCityName();", "Place getPlace();", "public String getOwnerPlace() {\r\n return ownerPlace;\r\n }", "java.lang.String getHotelName();", "private String getLocationName( double lat, double lon ) {\n\t\t//\n\t // Write the location name.\n\t //\n\t try {\n\t Geocoder geo = new Geocoder(this, Locale.getDefault());\n\t List<Address> addresses = geo.getFromLocation(lat, lon, 1);\n\t if (addresses.size() > 0) {\n\t \treturn addresses.get(0).getLocality();\n\t }\n\t }\n\t catch (Exception e) {\n\t e.printStackTrace(); \n\t }\n\t\treturn \"\";\n\t}", "public void setPlace(String place){\n this.place = place;\n }", "@Override\n public void onPlaceSelected(Place place) {\n\n place_str[0] = place.getName() + \",\" + place.getId();\n }", "public String getPlacecode() {\n return placecode;\n }", "public String getInvalidPlaceTypeName() {\n\t\treturn placeTypeName;\n\t}", "public String getActplace() {\r\n return actplace;\r\n }", "String getDepotname();", "public int getPlace() {\n\t\treturn place;\n\t}", "public String getLocationName(){\n return myLoc;\n }", "@Schema(description = \"The name of the marketplace where the event occurred.\")\n public String getMarketplaceName() {\n return marketplaceName;\n }", "public String getOtherPlace() {\r\n return otherPlace;\r\n }", "public String getAsNameAbbreviated(String itemName);", "@Override\n public String getLocationName() {\n\n final String locationName = getElement(getDriver(), By.className(SAVINGS_LOCATION),\n TINY_TIMEOUT).getText();\n setLogString(\"Savings Location Name :\" + locationName, true);\n return locationName;\n }", "int getOriginName();", "public String getLocationName() {\n\n\t\treturn this.locationName;\n\n\t}", "private String buildLocationName(Address address) {\n StringBuilder name = new StringBuilder();\n\n if (address.getFeatureName() != null) {\n name.append(address.getFeatureName());\n }\n\n if (address.getThoroughfare() != null) {\n // if something is already in the location name (i.e. a more specific part of the name), use a comma separator\n if (name.length() != 0) {\n name.append(\", \");\n }\n\n name.append(address.getThoroughfare());\n }\n\n if (address.getLocality() != null) {\n // if something is already in the location name (i.e. a more specific part of the name), use a comma separator\n if (name.length() != 0) {\n name.append(\", \");\n }\n\n name.append(address.getLocality());\n }\n\n if (address.getAdminArea() != null) {\n // if something is already in the location name (i.e. a more specific part of the name), use a comma separator\n if (name.length() != 0) {\n name.append(\", \");\n }\n\n name.append(address.getAdminArea());\n }\n if (address.getCountryName() != null) {\n // if something is already in the location name (i.e. a more specific part of the name), use a comma separator\n if (name.length() != 0) {\n name.append(\", \");\n }\n\n name.append(address.getCountryName());\n }\n\n return name.toString();\n }", "java.lang.String getCountryName();", "public String getLivingPlace() {\n return livingPlace;\n }", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "public java.lang.String getUiPlace() {\n java.lang.Object ref = uiPlace_;\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 uiPlace_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getPlaceId() {\n return placeId;\n }", "String getPreferredName();", "public String getTownname() {\n return townname;\n }", "public String getOwnerPlace(int idPlace) throws Exception {\n if (idPlace > 40 || idPlace < 1) {\n\n throw new Exception(\"Place doesn't exist\");\n } else {\n String dono = (String) Donos.get(idPlace);\n if (dono.equals(\"noOwner\") || dono.equals(\"Luxury Tax\") || dono.equals(\"Income Tax\")) {\n throw new Exception(\"This place can't be owned\");\n } else {\n return (String) Donos.get(idPlace);\n }\n }\n }", "public java.lang.String getUiPlace() {\n java.lang.Object ref = uiPlace_;\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 uiPlace_ = s;\n }\n return s;\n }\n }", "private String getName() {\n System.out.println(\"Enter contact name\");\n return scannerForAddressBook.scannerProvider().nextLine();\n }", "String getPName();" ]
[ "0.82380587", "0.75258696", "0.7516279", "0.72586375", "0.72586375", "0.72586375", "0.72586375", "0.72312075", "0.70277464", "0.7002789", "0.6841935", "0.68066484", "0.6691589", "0.66858953", "0.6683707", "0.66528076", "0.6617058", "0.65640485", "0.65336305", "0.64768785", "0.644453", "0.6386406", "0.6366809", "0.63148576", "0.62578505", "0.62327594", "0.6228052", "0.6220891", "0.6218424", "0.6212285", "0.61869764", "0.6186079", "0.61812127", "0.61759955", "0.6147553", "0.6122413", "0.610884", "0.610188", "0.60968083", "0.6095501", "0.6076787", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.60685974", "0.6062499", "0.6054865", "0.60504293", "0.6049566", "0.6016039", "0.60091186", "0.60059726", "0.5991297" ]
0.0
-1
Return the place description
public String getDescription();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPlaceDescription() {\n return mPlaceDescription;\n }", "String getDisplay_description();", "public PlaceDescription getPlaceDescription(PlaceReference placeReference) {\n return placeReference == null ? null : getPlaceDescription(placeReference.getDescriptionRef());\n }", "public String Get_place() \n {\n\n return place;\n }", "public String getDescription() {\n EditText descriptionField = (EditText) rootView.findViewById(R.id.hazard_description);\n return descriptionField.getText().toString();\n }", "java.lang.String getDesc();", "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();", "String getDesc();", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\n }", "public String getPlace() {\n return place;\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();", "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();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "String getDescription();", "public String getDescription(){\n return getString(KEY_DESCRIPTION);\n }", "@Override\r\n\tpublic String getDesc() {\n\t\treturn pizza.getDesc()+\" , RomaTomatoes(12.88)\";\r\n\t}", "public CharSequence getDescription() {\n return description;\n }", "public String getDescription(){\n\n //returns the value of the description field\n return this.description;\n }", "private static Spanned formatPlaceDetails(Resources res, CharSequence name, CharSequence address) {\n Log.e(TAG, res.getString(R.string.place_details, name, address));\n return Html.fromHtml(res.getString(R.string.place_details, name, address));\n }", "public String description(){\n\t\treturn \"Mark: \" + mark + \"\\n\" + \"Comment: \" + comment;\n\t}", "public String getPlace() {\n\t\treturn place;\n\t}", "public CharSequence getDescription() {\n return description;\n }", "public String getDescription() {\n return (desc);\n }", "public String getDesc()\r\n {\r\n return description;\r\n }", "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}", "@Override\n public String getDescription() {\n return descriptionText;\n }", "public String getPlace(){\n return place;\n }", "public String getDescription()\r\n {\r\n\treturn desc;\r\n }", "public String getDescription(){\n return description;\n }", "public String getDescription(){\n return description;\n }" ]
[ "0.77754575", "0.7134721", "0.7093747", "0.7037811", "0.7027823", "0.7011455", "0.6967971", "0.6967971", "0.6967971", "0.6967971", "0.6967971", "0.6967971", "0.6967971", "0.6967971", "0.6967971", "0.69215465", "0.68725467", "0.68725467", "0.68725467", "0.68725467", "0.68352944", "0.68352944", "0.68352944", "0.68352944", "0.68352944", "0.68352944", "0.68352944", "0.68352944", "0.68352944", "0.68352944", "0.68352944", "0.68352944", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68080026", "0.68039143", "0.6803853", "0.67956257", "0.6786471", "0.6773923", "0.67663366", "0.67602044", "0.6759168", "0.67583597", "0.6697321", "0.6696787", "0.669409", "0.6693893", "0.66819423", "0.66794455", "0.66794455" ]
0.0
-1
Is this place the space ship?
public boolean isSpaceship();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean atSpaceship()\r\n\t{\r\n\t\treturn this.currentPlace.isSpaceship();\r\n\t}", "boolean isPlaced();", "public boolean isShipAlreadyPiloted() {\t\t\n\t\tfor (ACBaseShip othership : Autocraft.shipmanager.ships.values()) {\n\t\t\tfor (int i = 0; i < othership.blocks.length; i++) {\n\t\t\t\tif (blockBelongsToShip(othership.blocks[i], blocks))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean allPlaced() {\n\t\tfor (Ship s : ships) {\n\t\t\tif (!s.isPlaced()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean testPlaceShip(Tester t) {\n return t.checkExpect(ship3.place(this.em),\n em.placeImageXY(new CircleImage(10, OutlineMode.SOLID, Color.CYAN), 50, 50))\n && t.checkExpect(ship1.place(this.em),\n em.placeImageXY(new CircleImage(10, OutlineMode.SOLID, Color.CYAN), 0, 150));\n }", "public boolean hasHitShip() {\n\t\t// see if the lines of the ship have intersected with the lines of the\n\t\t// asteroid\n\t\treturn linesIntersect();\n\n\t}", "public boolean isWarp()\n\t{\n\t\treturn block == Block.WARP_SPACE;\n\t}", "public boolean hasShip(int row, int column) {\n\t\treturn this.grid[row][column].hasShip();\n\t}", "public boolean hasShip(int tile) {\r\n return (tiles[tile] & 1) != 0;\r\n }", "public boolean isValidPlacementSpot() {\n return isEmpty() && ! getNeighbours().stream().allMatch(Spot::isEmpty);\n }", "public boolean isThereStandingShips() {\r\n\t\r\n\t/*\t\r\n\t\tint SIZE = 100;\r\n\t\tint state = 0;\r\n\t\tboolean shipPresent = false;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tstate = shipStateMap.get(new Point(x, y));\r\n\t\t\tif (state == 1)\r\n\t\t\t\tshipPresent = true;\r\n\t\t\tx++;\r\n\t\t}\r\n\t\treturn shipPresent;\r\n\t*/\r\n\r\n\t\treturn (numberOfAllowedShotsRemaining!=0);\r\n\t}", "public boolean contains(Ship s){\n\t\treturn myPolygon.contains(s.getX()-10, s.getY()-10,s.getW()/2,s.getH()/2);\n\t\t\n\t}", "public boolean isSpaceOccupied(Coordinate position) {\n for (Rover rover : rovers) {\n if (rover.getCurrentPosition().equals(position)) {\n return true;\n }\n }\n return false;\n }", "public boolean placementDone() {return placedShips == 4;}", "protected boolean isOccupied(int row, int column){\n return (!ships[row][column].getShipType().equals(\"empty\"));\n }", "public boolean validateShipPlacement(Ship thisShip, String coordinate,\r\n\t\t\tint direction) {\r\n\t\tint letterCoord = letterToIndex(coordinate.charAt(0));\r\n\t\tint numberCoord;\r\n\t\ttry{\r\n\t\tnumberCoord = Integer.parseInt(coordinate.substring(1))-1;\r\n\t\t}catch (NumberFormatException nfe){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (thisShip.placed == true)\r\n\t\t\treturn false;\r\n\t\telse {\r\n\t\t\tif (myBoard.in_Grid(numberCoord, letterCoord)) {\r\n\t\t\t\tif (direction == 1) { //left to right\r\n\t\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\t\tif (myBoard\r\n\t\t\t\t\t\t\t\t.in_Grid(numberCoord+i, letterCoord) == false\r\n\t\t\t\t\t\t\t\t|| isOccupied(numberCoord+i, letterCoord)) {\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (direction == 2) { //top to bottom\r\n\t\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\t\tif (myBoard\r\n\t\t\t\t\t\t\t\t.in_Grid(numberCoord, letterCoord+i) == false\r\n\t\t\t\t\t\t\t\t|| isOccupied(numberCoord, letterCoord+i)) {\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (direction == 3) { //right to left\r\n\t\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\t\tif (myBoard\r\n\t\t\t\t\t\t\t\t.in_Grid(numberCoord-i, letterCoord ) == false\r\n\t\t\t\t\t\t\t\t|| isOccupied(numberCoord-i, letterCoord )) {\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (direction == 4) { //bottom to top\r\n\t\t\t\t\tfor (int i = 0; i < thisShip.getSize(); i++) {\r\n\t\t\t\t\t\tif (myBoard\r\n\t\t\t\t\t\t\t\t.in_Grid(numberCoord, letterCoord-i) == false\r\n\t\t\t\t\t\t\t\t|| isOccupied(numberCoord, letterCoord-i)) {\r\n\t\t\t\t\t\t\treturn false;\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 true;\r\n\t}", "public boolean isShipTo() {\n\t\tObject oo = get_Value(\"IsShipTo\");\n\t\tif (oo != null) {\n\t\t\tif (oo instanceof Boolean)\n\t\t\t\treturn ((Boolean) oo).booleanValue();\n\t\t\treturn \"Y\".equals(oo);\n\t\t}\n\t\treturn false;\n\t}", "private static boolean isWin()\n {\n boolean win = true;\n for(Ship[] k:map)\n {\n for(Ship o:k)\n {\n if(o.getState()==1)\n win=false;\n }\n }\n return win;\n }", "private boolean isAtFish(){\n final RSNPC[] fishing_spots = NPCs.findNearest(\"Fishing spot\");\n if (fishing_spots.length < 1){\n return false;\n }\n return fishing_spots[0].isOnScreen();\n }", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "boolean hasPosition();", "public boolean isOccupied(int x, int y){\r\n\t\tif(myBoard.carrier.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\tif(myBoard.battleship.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\tif(myBoard.cruiser.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\tif(myBoard.submarine.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\tif(myBoard.patrolboat.get_position(x, y))\r\n\t\t\treturn true;\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public boolean isSpawn()\n\t{\n\t\treturn block == Block.FRUIT_SPAWN || block == Block.GHOST_SPAWN || block == Block.PAC_SPAWN;\n\t}", "public boolean isSunk(){\n if(places.isEmpty()){\n //ship cant be sunk if empty\n return false;\n }\n\n //Checks each place in list for hit\n for(Place place : places){\n if(!place.isHit()){\n return false;\n }\n }\n return true;\n }", "public boolean isOnGround() {\n return this.sim_pos.getY() <= 2;\n }", "boolean hasLocation();", "boolean hasLocation();", "public boolean inGoalRegion() {\n return position >= GOAL_POSITION;\n }", "public boolean contains(ShiffmanShip ship) {\n PVector loc =ship.location;\n // is Lover object is inside of mouse controlled fluid?\n // if (loc.x> mouseX && loc.x < mouseX + w && loc.y > mouseY && loc.y < mouseY+ h) { //creates flyover\n // return true;\n // } \n // is Lover object inside of stationary fluid area? Yes? then go back to if statement and apply force\n if (loc.x> x && loc.x < x + w && loc.y > y && loc.y < y+ h) {\n return true;\n } \n // No? then return fals and do not apply drag force\n else {\n return false;\n }\n }", "private boolean isOccupied(Location loc)\n\t{\n\t\treturn grid[loc.getRow()][loc.getCol()] != null;\n\t}", "public boolean validPlacement(double x, double y) {\n\t\treturn myEngineManager.validateTower(x, y);\n\t}", "boolean isOccupiedByAnimal(Vector2d position);", "private boolean isTownHallAt(int x, int y, Node dest) {\n\t\tif (x == dest.getX() && y == dest.getY()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (currentState.isUnitAt(x, y)) {\n\t\t\tint unitID = currentState.unitAt(x, y);\n \t\n String unitName = currentState.getUnit(unitID).getTemplateView().getName();\n if(unitName.equalsIgnoreCase(\"Townhall\")) {\n \treturn true;\n }\n\t\t}\n\t\n\t\treturn false;\n\t}", "boolean isAllOnDestination(){\n\n if(player.getCurrentX()-player.getDestinationX()!=0 || player.getCurrentY()-player.getDestinationY()!=0)\n return false;\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n if(item.getCurrentX()-item.getDestinationX()!=0 || item.getCurrentY()-item.getDestinationY()!=0)\n return false;\n }\n return true;\n }", "private boolean isMyPiece(Loc thisSpot) {\n\t\tfor (Loc loc : currentPiece.getLocation()) {\n\t\t\tif (loc.row == thisSpot.row && loc.col == thisSpot.col) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public final boolean checkIfInZone(int x, int y) { return (getSiege(x, y) != null); }", "public boolean hit(int y, int x)\n {\n if (this.space[y][x].charAt(1) == 'X' || this.space[y][x].charAt(1) == '*') { //Test to see if space already hit wasn't passed to hit method\n throw new IllegalArgumentException(\"A space that was already hit can't be hit again\".toUpperCase());\n }\n \n if (!(this.space[y][x].equals(\"[ ]\"))) { //Remove point y, x on ship and board, illegal values not looked at (X or *)\n Ship shipHit = null;\n for (int i = 0; i < this.fleet.size(); i++)\n {\n if(this.space[y][x].charAt(1) == this.fleet.get(i).getEmblem()) {\n shipHit = this.fleet.get(i);\n break;\n }\n }\n \n if(shipHit.destroyPointOnShip(new int[]{y,x})) //check to see if ship was destroyed and displays appropriate message to user, subtracts from\n //number of ships remaining\n {\n System.out.println((shipHit.getClass().getName().replace('_',' ')+ \" was destroyed!!!\").toUpperCase());\n this.numberOfShips--;\n }\n else {\n System.out.println((shipHit.getClass().getName().replace('_',' ')+ \" was hit at \"+(char)(y+'A') + \"-\" + (x+1)).toUpperCase());\n }\n this.space[y][x] = \"[X]\";\n return true;\n }\n else { //Mark useless shot on Board\n System.out.println(\"Nothing was hit at \".toUpperCase()+ (char)(y+'A') + \"-\" + (x+1) + \".\");\n this.space[y][x] = \"[*]\";\n return false;\n }\n }", "public boolean isPlaced(int index) {\n\t\tif ((index < 0) || (index > ships.size() - 1)) {\n\t\t\tthrow new ArrayIndexOutOfBoundsException(\"Index out of Bounds.\");\n\t\t}\n\t\treturn ships.get(index).isPlaced();\n\t}", "public Boolean check(int x, int y, String direction, int points) {\r\n\t\tBoolean canPlace = true;\r\n\t\tif (direction.equals(\"horizontal\")) {\r\n\t\t\tif ((y + points) < 11) {\r\n\t\t\t\tfor (int j = 0; j < points; j++) {\r\n\t\t\t\t\tif (randomGrid[x][y + j] != 0 || adjacentShipCheck(x, y + j))\r\n\t\t\t\t\t\tcanPlace = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int j = 0; j < points; j++) {\r\n\t\t\t\t\tif (randomGrid[x][y - j] != 0 || adjacentShipCheck(x, y - j))\r\n\t\t\t\t\t\tcanPlace = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\tif ((x + points) < 9) {\r\n\t\t\t\tfor (int j = 0; j < points; j++) {\r\n\t\t\t\t\tif (randomGrid[x + j][y] != 0 || adjacentShipCheck(x + j, y))\r\n\t\t\t\t\t\tcanPlace = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int j = 0; j < points; j++) {\r\n\t\t\t\t\tif (randomGrid[x - j][y] != 0 || adjacentShipCheck(x - j, y))\r\n\t\t\t\t\t\tcanPlace = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn canPlace;\r\n\r\n\t}", "private boolean isOpenSpace(int posX, int posY) {\r\n return Game.getGameBoard()[posX][posY] == Constants.EMPTY;\r\n }", "public boolean isPlaced() {\n return isPlaced;\n }", "public boolean isMine(int x, int y);", "boolean hasCoordinates();", "boolean hasCoordinates();", "boolean hasCoordinates();", "public boolean isSunk() {\n\t\tfor (Coordinate coordinate : shipPositions) {\n\t\t\tif (!coordinate.getIsHit()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public boolean placeShip(int player, int x, int y) {\n\n Ship ship = null;\n\n for (int i = 0; i < 5; i++) {\n if (playerShips[i].selected) {\n ship = playerShips[i];\n }\n }\n if (ship == null) {\n return false;\n }\n\n if (orientation == 1) {\n if (ship.length + y > 10) {\n return false;\n }\n }\n if (orientation == 0) {\n if (ship.length + x > 10) {\n return false;\n }\n }\n for (int i = 0; i < ship.length; i++) {\n if(orientation == 0) {\n if (humanPlayerBoard[y][x+i] != board.water.ordinal()) {\n return false;\n }\n }\n else{\n if(humanPlayerBoard[y+i][x] != board.water.ordinal()){\n return false;\n }\n }\n }\n for (int i = 0; i < ship.length; i++) {\n if(orientation == 0) {\n humanPlayerBoard[y][x+i] = board.ship.ordinal();\n }\n else{\n humanPlayerBoard[y+i][x] = board.ship.ordinal();\n }\n }\n if(ship.placed){\n if(ship.orientation == 1){\n for(int i = 0; i < ship.length; i++){\n humanPlayerBoard[ship.y+i][ship.x] = board.water.ordinal();\n }\n }\n else{\n for(int j = 0; j < ship.length; j++){\n humanPlayerBoard[ship.y][ship.x+j] = board.water.ordinal();\n }\n }\n }\n ship.setShip(x, y, orientation);\n ship.placed = true;\n\n return true;\n }", "boolean canPlaceCity(VertexLocation vertLoc);", "@Override\n public boolean isLocationFogged(XYCoord coord)\n {\n return isLocationFogged(coord.xCoord, coord.yCoord);\n }", "public boolean isPlaceable() {\n\t\tlong now = Calendar.getInstance().getTimeInMillis();\t\t\n\t\treturn now - createTime >= placeableThreshold && \n\t\t\t\tnow - focusTime >= placeableThreshold;\n\t}", "boolean canPlaceRobber(HexLocation hexLoc);", "public boolean collides (){\n if(shipX<=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=40 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY>=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=65){\n return true;\n }\n }\n else if(shipX>=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=75 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n else if(shipX<=astX && shipY<=astY){\n if(Math.abs(shipX-astX)<=60 && Math.abs(shipY-astY)<=55){\n return true;\n }\n }\n return false;\n }", "public boolean canMove (Location loc) {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return false;\n if (!gr.isValid(loc))\n return false;\n Actor neighbor = gr.get(loc);\n return !(neighbor instanceof Wall);\n }", "public boolean isGround()\n {\n return true;\n }", "private boolean inRack(int x, int y) {\n return (y < DoTheDishes.RACK_TOP_Y &&\n x + currentDish.getWidth() > DoTheDishes.RACK_BOTTOM_LEFT_X &&\n x < DoTheDishes.RACK_TOP_RIGHT_X\n );\n }", "boolean isGoodLocation(World world, int x, int y, int z);", "public boolean checkRep() {\n return location.x() >= 0 && location.x() < board.getWidth() && \n location.y() >= 0 && location.y() < board.getHeight(); \n }", "public boolean canMove2() {\n\t\tGrid<Actor> gr = getGrid(); \n\t\tif (gr == null) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\tLocation loc = getLocation(); \n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (!gr.isValid(next)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!gr.isValid(next2)) {\n\t\t\treturn false;\n\t\t}\n\t\tActor neighbor = gr.get(next2); \n\t\treturn (neighbor == null) || (neighbor instanceof Flower); \n\t}", "private boolean hitSides() {\n if (b.numY + 60 >= BOX_HEIGHT || (b.numY - 60 <= 0)) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isSpawn(Location loc) {\n\t\treturn RegionManager.get().hasTag(loc, \"spawn\");\n\t}", "private boolean checkSpaceAvailability(Point targetLocation, ICityFragment element) {\r\n //basic constraint:no other things here\r\n\r\n if (city.isAnythingHere(targetLocation, element.getBoundary().width, element.getBoundary().height, element)) {\r\n return false;\r\n }\r\n\r\n //crossroads:at least one road can connected\r\n if (element instanceof Crossroads) {\r\n var crossroad = (Crossroads) element;\r\n\r\n var accessibleRoad = findAccessibleRoads(crossroad, targetLocation);\r\n\r\n if (accessibleRoad == null || accessibleRoad.size() <= 1) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "public boolean checkForTreasure(){\n Object obj=charactersOccupiedTheLocation[3];\n if(obj!=null){return true;}\n return false; \n }", "private boolean isSpaceFree(Move move) {\n int moveX = move.getMoveX(); \n int moveY = move.getMoveY(); \n if (boardState[moveX][moveY] == 'X' || boardState[moveX][moveY] == 'O') {\n return false; \n }\n return true; \n }", "public boolean isShipFullyDestroyed() {\n return this.goodShipParts.size() <= 0;\n }", "public boolean isShivering();", "boolean hasCoordInfo();", "public boolean isSpaceAvailable(boolean[][] board,Ship ship) {\r\n\t\tint startX = ship.getStartLocationX();\r\n\t\tint startY = ship.getStartLocationY();\r\n\t\tint size = ship.getSize();\r\n\t\tORIENTATION orientation = ship.getOrientation();\r\n\t\tswitch(orientation) {\r\n\t\tcase HORIZONTAL:\r\n\t\t\tif(!isWidthinBoardBoundary(startX+size-1,startY,board)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\tif(board[startX+i][startY]) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\tcase VERTICAL:\r\n\t\t\tif(!isWidthinBoardBoundary(startX,startY+size-1,board)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\t\tif(board[startX][startY+i]) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean haveAnySpawn();", "private boolean isAtStation(){\n\n if (this.selectedTrain.getGPS().getCurrBlock().getStationName() != null){return true; }\n else { return false; }\n }", "public boolean isVisible() {\r\n return !((x + width) < ocean.getXmin() || x > ocean.getXmax() || (y + height) < ocean.getYmin()\r\n || y > ocean.getYmax());\r\n }", "public boolean checkAlienPlacementTile(float x, float y)\r\n/* 471: */ {\r\n/* 472:563 */ if (!tileWalkable(x, y)) {\r\n/* 473:565 */ return false;\r\n/* 474: */ }\r\n/* 475:568 */ AgentModel a = getAgentOnTile(x, y);\r\n/* 476:569 */ if ((a != null) || (((a instanceof DoorModel)) && (!((DoorModel)a).isOpen()))) {\r\n/* 477:571 */ return false;\r\n/* 478: */ }\r\n/* 479:574 */ return true;\r\n/* 480: */ }", "@Override\r\n public boolean collocated(Space other) {\r\n return this.row == other.getRow() &&\r\n this.col == other.getCol();\r\n }", "protected boolean isHit(Coordinate coordinate) {\n\t\t// Due to override of \"equals\" method, \"contains\" only checks whether x-\n\t\t// and y-coordinate are equal.\n\t\t// Other properties of the coordinate object are ignored.\n\t\tif (shipPositions.contains(coordinate)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean onScreen(double x, double y) {\n // get the in game coordinates and real coordinates on screen\n int scaledWidth = (int) (TileDataRegister.TILE_WIDTH * scale);\n int scaledHeight = (int) (TileDataRegister.TILE_HEIGHT * scale);\n double basex = (map.getWidth() * scaledWidth) / 2.0\n + scaledWidth / 4.0;\n double basey = scaledHeight / 4.0;\n\n //reverse the math logic from the GameRenderer\n double realX = ((y - x) / 2.0) * scaledWidth + currentXOffset + xOffset + basex;\n double realY = ((y + x) / 2.0) * scaledHeight + currentYOffset + yOffset + basey;\n\n return !(realX < -0.1 * viewPortWidth - basex || realX > 1.1 * viewPortWidth + basex ||\n realY < -0.1 * viewPortHeight - basex || realY > 1.1 * viewPortHeight + basey);\n }", "public boolean validPosition(Player p, double x, double y) {\n\n\t\tTile tile = getTile(p, x + p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y + p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x - p.BOUNDING_BOX_X, y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttile = getTile(p, x, y - p.BOUNDING_BOX_Y);\n\t\tif (tile == null || !tile.canEnter(p)) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private boolean didMyShipSink(int x, int y) {\n boolean sunk = false; //assumes ship hasn't sunk\n for (int i = 0; i < fleet.size(); i++) { //going through fleet to find boat\n if (fleet.get(i).getStartX() == x && fleet.get(i).getStartY() == y) {\n sunk = fleet.get(i).hitAndMaybeSunk(); \n //System.out.println(\"didMyShipSink(): \" + fleet.get(i).getIsSunk());\n if (sunk) { \n shipsSunk.add(fleet.get(i)); \n fleet.remove(i);\n }\n }\n }\n return sunk;\n }", "boolean hasSide();", "boolean isInsideScreen() {\n if (_hitbox.length == 1) {\n float r = _hitbox[0].x;\n PVector c = _getCenter();\n return 0 <= c.x + r && c.x - r < width && 0 <= c.y + r && c.y - r < height;\n }\n \n PVector[] points = this._getPoints();\n for(PVector p : points) {\n if(0 <= p.x && p.x < width && 0 <= p.y && p.y < height) {\n return true;\n }\n }\n return false;\n }", "public boolean is_Empty(){\n \treturn this.ship==null;\n }", "public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }", "public boolean placeShip(Ship ship, int x, char y, boolean isVertical) {\n Ship s2;\n switch(ship.getShipType()) {\n case \"BATTLESHIP\":\n ship = new Battleship();\n s2 = new Battleship();\n break;\n case \"DESTROYER\":\n ship = new Destroyer();\n s2 = new Destroyer();\n break;\n case \"MINESWEEPER\":\n ship = new Minesweeper();\n s2 = new Minesweeper();\n break;\n default:\n return false;\n }\n\n boolean successful = playersBoard.placeShip(ship, x, y, isVertical);\n if (!successful)\n return false;\n\n boolean opponentPlacedSuccessfully;\n do {\n // AI places random ships, so it might try and place overlapping ships\n // let it try until it gets it right\n opponentPlacedSuccessfully = opponentsBoard.placeShip(s2, randRow(), randCol(), randVertical());\n } while (!opponentPlacedSuccessfully);\n\n return true;\n }", "boolean isBound();", "public boolean hitSide()\n {\n if(accel.getAcceleration(ADXL345_I2C.Axes.kX)>0)\n return true;\n else\n return false;\n }", "boolean hasHotelCenter();", "boolean hasGrid();", "@Override\n\tpublic boolean isCollided(SpaceShip invader, Rocket rocket) {\n\t\t//(posX + width) /2 , (posY + height) /2\n\t\tint spaceshipCenterX = (int)(invader.getPosition().getX() + invader.getSize().getWidth()) / 2;\n\t\tint spaceshipCenterY = (int)(invader.getPosition().getY() + invader.getSize().getHeight()) / 2;\n\t\tPoint spaceshipCenter = new Point(spaceshipCenterX, spaceshipCenterY);\n\t\tif (spaceshipCenter == rocket.getPosition())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean placeShip(int row, int col, int shipSize, char orientation) {\n /* validate the input values before adding the ship */\n if(!checkAddShipParams(row, col, shipSize, orientation))\n return false;\n /* if someone is in the spot already we can't put another ship there */\n else if(spotTaken(row, col, shipSize, orientation))\n return false;\n \n /* We made it this far so everything must be ok, now place the ship */\n if(orientation == 'v' || orientation == 'V') {\n for(int i = 0; i < shipSize; i++)\n this.board[row+i][col] = 'S';\n \n numShips++;\n return true;\n }\n else { // don't need to check if it equals H because it has to if it passed the param check\n for(int i = 0; i < shipSize; i++)\n this.board[row][col+i] = 'S';\n \n numShips++;\n return true;\n }\n }", "boolean hasOrigin();", "boolean hasOrigin();", "public boolean itemonfloor(){\n\t\tint XI = 0;\n\t\tint YI = 0;\n\t\tint Xyou = 1;\n\t\tint Yyou = 1;\n\t\tfor(int i = 0 ; i < this.Items.length;i++){\n\t\t\tfor(int p = 0; p < this.Items.length;p++){\n\t\t\t\tif(this.Items[i][p] != null && this.position[i][p] == 1){\n\t\t\t\t\tYI = i;\n\t\t\t\t\tXI = p;\n\t\t\t\t\tYyou = i;\n\t\t\t\t\tXyou = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}//end of outter for\n\t\tif(YI==Yyou && XI==Xyou){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean onGround() {\n return getLocation().getY() <= 0 || (interactingWithY != null && interactingWithY.getLocation().getY() + interactingWithY.size.height <= getLocation().getY());\n }", "@Override\n\tpublic void IsAtCentre(boolean b, Time time) {\n\t\t\n\t}", "public boolean isInPlanet() {\n return this.currentPlanet != null;\n }", "public boolean isTotallyOnGrid() {\n\t\t\tfor(int i=0; i<4; i++) {\n\t\t\t\tif(position.y + i >= 0)\n\t\t\t\t\treturn true; //everything from here down is on grid\n\t\t\t\t// this row is above grid so look for non-empty squares\n\t\t\t\tfor(int j=0; j<4; j++)\n\t\t\t\t\tif(squares[i][j])\n\t\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\tSystem.err.println(\"TetrisPiece.isTotallyOnGrid internal error\");\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean isInScreen(){\n return this.getX() > App.START_COORDINATE_X - this.getSpriteImage().getWidth() / 2\n && this.getX() < App.SCREEN_WIDTH + this.getSpriteImage().getWidth() / 2;\n }", "protected boolean allBoatsArePlaced() {\n for(BoatDrawing boat : boatMap.values()) {\n if (!boat.isPlaced()) {\n return false;\n }\n }\n logMsg(\"click now on 'valider' button to begin game\");\n return true;\n }", "public boolean spacingExist(Spacing s) {\n for (Spacing spac : spacings) {\n if (spac.getGame1() == s.getGame1() && spac.getGame2() == s.getGame2())\n return true;\n }\n return false;\n }", "public boolean fitShip(int x0, int y0, int x1, int y1) {\r\n\t\tArrayList<OwnField> fields = getFieldsFromCoordinates(x0, y0, x1, y1);\r\n\t\tfor (Field<SetState> field : fields) {\r\n\t\t\tif (field.getState() == SetState.BLOCKED || field.getState() == SetState.SHIP)\r\n\t\t\t\treturn false;\r\n\t\t\tfor (Field<SetState> neighbourField : this.getNeighbours(field)) {\t\t// redundant\r\n\t\t\t\tif (neighbourField.getState() == SetState.SHIP)\r\n\t\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}" ]
[ "0.81468207", "0.7461073", "0.7242022", "0.7068554", "0.70447475", "0.6975956", "0.6937852", "0.6919073", "0.6918173", "0.6886796", "0.6852917", "0.67647666", "0.6760415", "0.67539126", "0.67267275", "0.6705833", "0.6699239", "0.6670856", "0.6640129", "0.6629083", "0.6629083", "0.6629083", "0.6629083", "0.6609919", "0.6597994", "0.65965456", "0.65532887", "0.6550037", "0.6550037", "0.6545233", "0.65328187", "0.6526439", "0.65226996", "0.65190756", "0.65130466", "0.6499256", "0.648922", "0.6479823", "0.6472084", "0.64591527", "0.6438885", "0.64346164", "0.64204234", "0.63856536", "0.63577306", "0.63577306", "0.63577306", "0.6341949", "0.63386333", "0.63382864", "0.6328172", "0.63280284", "0.6325495", "0.6313213", "0.6309698", "0.6302052", "0.6302006", "0.62995285", "0.629529", "0.6290828", "0.6278786", "0.627615", "0.6270698", "0.6270264", "0.6264522", "0.62636065", "0.6243156", "0.6242365", "0.6240144", "0.62367713", "0.62309986", "0.6230955", "0.62298775", "0.6228585", "0.6214861", "0.6211637", "0.6203772", "0.6203563", "0.6199268", "0.61987394", "0.6198342", "0.6195444", "0.618818", "0.6184947", "0.6178317", "0.61728674", "0.61727947", "0.61722934", "0.6171675", "0.6164102", "0.6164102", "0.6163593", "0.6156161", "0.6155927", "0.6154562", "0.6150769", "0.6140144", "0.6138851", "0.6138693", "0.6138513" ]
0.80056345
1
Act do whatever the AnimatedActor wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.
public void act() { if(images != null) { if(animationState == AnimationState.ANIMATING) { if(animationCounter++ > delay) { animationCounter = 0; currentImage = (currentImage + 1) % images.length; setImage(images[currentImage]); } } else if(animationState == AnimationState.SPECIAL) { setImage(specialImage); } else if(animationState == AnimationState.RESTING) { animationState = AnimationState.FROZEN; animationCounter = 0; currentImage = 0; setImage(images[currentImage]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void act() \n {\n gravity();\n animate();\n }", "public void act()\n {\n // handle key events\n String key = Greenfoot.getKey();\n if (key != null)\n {\n handleKeyPress(key);\n } \n\n // handle mouse events\n if (startGameButton.wasClicked())\n {\n handleStartGame();\n }\n }", "public void act() \n {\n frameCount++;\n animateFlying();\n if (getWorld() instanceof DreamWorld)\n {\n dream();\n }\n else if (getWorld() instanceof FinishScreen)\n {\n runEnd();\n }\n }", "public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }", "public void act()\n {\n // Make sure fish is alive and well in the environment -- fish\n // that have been removed from the environment shouldn't act.\n if ( isInEnv() ) \n move();\n }", "public void act() {\r\n\t\tturn(steps[number % steps.length]);\r\n\t\tnumber++;\r\n\t\tsuper.act();\r\n\t}", "@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }", "public void act() \r\n {\r\n key();\r\n win();\r\n fall();\r\n lunch();\r\n }", "public void act() \r\n {\r\n move();\r\n }", "public void act() \r\n {\r\n move(speed); //move at set speed\r\n \r\n if(actCounter < 2) //increases act counter if only 1 act has passed\r\n actCounter++;\r\n\r\n if(actCounter == 1) //if on the first act\r\n {\r\n targetClosestPlanet(); //will target closest planet depending on if it wants to find an unconquered planet, or just the closest one\r\n if(planet == null && findNearestPlanet)\r\n findNearestPlanet = false;\r\n }\r\n \r\n if(health > 0) //if alive\r\n {\r\n if(findNearestPlanet)\r\n targetClosestPlanet();\r\n if(planet != null && planet.getWorld() != null) //if planet exists\r\n moveTowards(); //move toward it\r\n else\r\n moveRandomly(); //move randomly\r\n }\r\n \r\n if(removeMe || atWorldEdge())\r\n getWorld().removeObject(this);\r\n }", "public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }", "public void act() {\n\t}", "public void act() \n {\n // Add your action code here.\n // get the Player's location\n if(!alive) return;\n \n int x = getX();\n int y = getY();\n \n // Move the Player. The setLocation() method will move the Player to the new\n // x and y coordinates.\n \n if( Greenfoot.isKeyDown(\"right\") ){\n setLocation(x+1, y);\n } else if( Greenfoot.isKeyDown(\"left\") ){\n setLocation(x-1, y);\n } else if( Greenfoot.isKeyDown(\"down\") ){\n setLocation(x, y+1);\n } else if( Greenfoot.isKeyDown(\"up\") ){\n setLocation(x, y-1);\n } \n \n removeTouching(Fruit.class);\n if(isTouching(Bomb.class)){\n alive = false;\n }\n \n }", "public void act() \r\n {\r\n if ( Greenfoot.isKeyDown( \"left\" ) )\r\n {\r\n turn( -5 );\r\n }\r\n\r\n else if ( Greenfoot.isKeyDown( \"right\" ) )\r\n {\r\n turn( 5 );\r\n }\r\n if ( Greenfoot.isKeyDown(\"up\") )\r\n {\r\n move(10);\r\n }\r\n else if ( Greenfoot.isKeyDown( \"down\") )\r\n {\r\n move(-10);\r\n }\r\n if ( IsCollidingWithGoal() )\r\n {\r\n getWorld().showText( \"You win!\", 300, 200 );\r\n Greenfoot.stop();\r\n }\r\n }", "@Override\n\tpublic void act(float dt){\n\t\t\n\t}", "@Override\n public void act(float delta) {\n }", "public void act() {\n\t\tif (canMove()) {\n\t\t\tif (isOnBase()) {\n\t\t\t\tif (steps < baseSteps) {\n\t\t\t\t\tmove();\n\t\t\t\t\tsteps++;\n\t\t\t\t} else {\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tsteps = 0;\n\t\t\t\t}\n\t\t\t} else if (steps == baseSteps / 2) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps++;\n\t\t\t} else if (steps == baseSteps + 1) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps = 0;\n\t\t\t} else {\n\t\t\t\tmove();\n\t\t\t\tsteps++;\n\t\t\t}\n\t\t} else {\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}", "public void act() \n {\n movement();\n }", "public void act();", "public void act() \n {\n if(isAlive)\n {\n move(2);\n if(isAtEdge())\n {\n turnTowards(300, 300);\n GreenfootImage img = getImage();\n img.mirrorVertically();\n setImage(img);\n }\n if (getY() <= 150 || getY() >= 395)\n {\n turn(50);\n }\n if(isTouching(Trash.class))\n {\n turnTowards(getX(), 390);\n move(1);\n setLocation(getX(), 390);\n die();\n }\n }\n }", "public void act()\r\n\t{\r\n\t\tyVel += gravity;\r\n\t\t//Resets the jump delay to when greater than 0\r\n\t\tif (jDelay > 0)\r\n\t\t{\r\n\t\t\tjDelay--;\r\n\t\t}\r\n\t\t//Sets the vertical velocity and jump delay of the bird after a jump\r\n\t\tif (alive == true && (Menu.keyPress == KeyEvent.VK_SPACE) && jDelay <= 0) \r\n\t\t{\r\n\t\t\tMenu.keyPress = 0;\r\n\t\t\tyVel = -10;\r\n\t\t\tjDelay = 10;\r\n\t\t}\r\n\t\ty += (int)yVel;\r\n\t}", "@Override\n public void act() {\n }", "public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }", "void act();", "public void act() {\n\t\tif (canMove2()) {\n\t\t\tsteps += 2;\n\t\t\tmove();\n\t\t} else {\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}", "private void act() {\n\t\tmyAction.embodiment();\n\t}", "public void act()\n {\n \n //move();\n //if(canSee(Worm.class))\n //{\n // eat(Worm.class);\n //}\n //else if( atWorldEdge() )\n //{\n // turn(15);\n //}\n\n }", "public void act() \n {\n playerMovement();\n }", "public void act() \n {\n // Add your action code here.\n \n //setRotation();\n setLocation(getX(),getY()+2);\n movement();\n \n }", "@Override\n\tpublic boolean act(float delta) {\n\t\tif(!isRunning) return true;\n\t\t\n\t\t\n\t\treturn false;\n\t}", "@Override\n public void run() {\n chosenActionUnit.run(getGame(), inputCommands);\n }", "public void act ()\n {\n checkScroll();\n checkPlatform();\n checkXAxis();\n checkDeath();\n // get the current state of the mouse\n MouseInfo m = Greenfoot.getMouseInfo();\n // if the mouse is on the screen...\n if (m != null)\n {\n // if the mouse button was pressed\n if (Greenfoot.mousePressed(null))\n {\n // shoot\n player.shoot(m.getX(), m.getY());\n }\n }\n }", "public void act()\n {\n trackTime();\n showScore();\n \n }", "public void act() \n {\n fall();\n }", "public void act() \n {\n if (canGiveTestimony()) {\n giveTestimony();\n }\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \r\n {\n }", "public void act() \n {\n move(5);\n turn(4);\n }", "public void act() \n {\n checkCollision();\n KeyMovements(); \n attackWeapon();\n //stopGame();\n \n }", "@Override\r\n\tpublic void act() {\r\n\t\tdouble tankx, tanky;\r\n\t\ttankx = tank.getX();\r\n\t\ttanky = tank.getY();\r\n\t\t\r\n\t\t// If we're not in the center, rotate toward the center and move.\r\n\t\tif (tankx < 300 || tankx > 500 || tanky < 250 || tanky > 350) {\r\n\t\t\treceiver.receiveCommand(new RotateTowardsCommand(player, 400, 300));\r\n\t\t\treceiver.receiveCommand(new MoveCommand(player, false));\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// We are in the center. Just move the gun around and shoot.\r\n\t\t\treceiver.receiveCommand(new RotateGunCommand2(player, 0.05));\r\n\t\t\treceiver.receiveCommand(new FireCommand(player));\r\n\t\t}\r\n\t}", "public void act() \r\n {\r\n if (startTime > 0) {\r\n startTime--;\r\n }\r\n else {\r\n if (isScared()) {\r\n doScareMode();\r\n }\r\n else {\r\n if (counter == 0 || !canMove(currDirectionStr)) {\r\n counter = CELL_SIZE * 4;\r\n prevDirection = currDirection;\r\n do {\r\n currDirection = (int)(Math.random() * 10);\r\n if (currDirection == 0) {\r\n currDirectionStr = \"up\";\r\n }\r\n else if (currDirection == 1) {\r\n currDirectionStr = \"left\";\r\n }\r\n else if (currDirection == 2) {\r\n currDirectionStr = \"down\";\r\n }\r\n else if (currDirection == 3) {\r\n currDirectionStr = \"right\";\r\n }\r\n } while (!canMove(currDirectionStr));\r\n }\r\n \r\n if (canMove(currDirectionStr)) {\r\n move(currDirectionStr);\r\n }\r\n counter--;\r\n } \r\n }\r\n }", "public void act() \n {\n // Add your action code here.\n /*\n if ( pixelsMoved >= 20 )\n {\n moving = false;\n pixelsMoved = 0;\n }\n */\n if ( moving )\n {\n move(1);\n pixelsMoved++;\n \n if ( pixelsMoved >= 20 )\n {\n setMoving( false );\n }\n }\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \n {\n // Add your action code here.\n MyWorld world = (MyWorld) getWorld();\n jefe = world.comprobarJefe();\n \n \n explotar();\n \n if(jefe)\n {\n girarHaciaEnemigo();\n movimientoPegadoAJefe();\n }\n }", "public void act() \n {\n moveAround();\n die();\n }", "public void act() \n {\n\n World wrld = getWorld();\n if(frameCounter >= frameWait)\n {\n super.act();\n frameCounter = 0;\n }\n else\n {\n frameCounter++;\n }\n if (dying)\n deathcounter++;\n GreenfootImage trans = getImage();\n trans.scale(500,500);\n setImage(trans);\n setLocation(getX(), (getY()));\n\n if (deathcounter > 10)\n {\n wrld.removeObject(this);\n ((Universe)wrld).score += 50;\n }\n else if (getX() < 10)\n wrld.removeObject(this);\n }", "public void act()\n {\n \n if (wait < 75)\n {\n wait = wait + 1;\n }\n \n \n \n \n \n \n if (wait == 75)\n {\n change();\n checkForBounce();\n checkForEdge();\n checkWin(); \n }\n \n \n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() { \n check = borde(flag);\n if(check == true )\n restaura();\n moveRandom(move);\n if(animationE % 3 == 0){\n checkanimation();\n } \n animationE++; \n alive=checkfire();\n if(alive == true){\n enemyoff();\n } \n \n }", "public void act()\n {\n setPosition(posX + liftDirection[0] * liftSpeed, posY\n + liftDirection[1] * liftSpeed);\n setLocation(posToLoc(posX, posY));\n\n if (posY < 50)\n removeSelf();\n }", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "public void act() \n {\n fall();\n if(Greenfoot.isKeyDown(\"space\") && isOnSolidGround())\n {\n jump();\n }\n move();\n }", "public void act() \r\n {\r\n if (Greenfoot.mouseClicked(this)) {\r\n Greenfoot.setWorld(new howToPlayGuide());\r\n }\r\n }", "public void act()\n {\n mudaImagem();\n }", "@FXML\n\tpublic void run(ActionEvent event){\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tif(combat == true && currentPos != finishCircle) {\t// Check if the player is in combat and they are not at the boss circle\n\t\t\n\t\t\tint runCalc = rand.nextInt(101);\n\t\t\n\t\t\tif(runCalc <= 25) {\t// Roll for ability to run\n\t\t\t\n\t\t\t\n\t\t\t\tevents.appendText(\"Run Successful! WOOSH\\n\");\n\t\t\t\t\n\t\t\t\tcombat=false;\n\t\t\t\n\t\t\t} else if(runCalc > 20) {\t\t\n\t\t\n\t\t\t\tevents.appendText(\"Run Failed! Prepare for pain!\\n\");\t\n\t\t\t\t\n\t\t\t\tenemyAttack();\n\t\t\t}\n\t\t\n\t\t}\n\t\telse if(combat == true && currentPos == finishCircle) {\t// Inform player they cannot run at boss\n\t\t\t\n\t\t\tevents.appendText(\"There is no escaping Morthar!\\n\");\n\t\t\t\n\t\t\tenemyAttack();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void act() \n {\n //plays animation with a delay between frames\n explosionSound.play();\n i = (i+1)%(frames.length); \n setImage(frames[i]);\n if(i == 0) getWorld().removeObject(this);\n }", "public void act() \n {\n mouse = Greenfoot.getMouseInfo();\n \n // Removes the achievement after its duration is over if its a popup (when it pops up during the game)\n if(popup){\n if(popupDuration == 0) getWorld().removeObject(this);\n else popupDuration--;\n }\n // Displays the decription of the achievement when the user hovers over it with the mouse\n else{\n if(Greenfoot.mouseMoved(this)) drawDescription();\n if(Greenfoot.mouseMoved(null) && !Greenfoot.mouseMoved(this)) drawMedal();\n }\n }", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "public void act() {\n\t\tboolean willMove = canMove();\n\t\tif (isEnd) {\n\t\t//to show step count when reach the goal\n\t\t\tif (!hasShown) {\n\t\t\t\tString msg = stepCount.toString() + \" steps\";\n\t\t\t\tJOptionPane.showMessageDialog(null, msg);\n\t\t\t\thasShown = true;\n\t\t\t}\n\t\t} else if (willMove) {\n\t\t\t//visit the next node\n\t\t\tisVisited[next.getRow()][next.getCol()] = true;\n\t\t\tmove();\n\t\t\tstepCount++;\n\t\t} else {\n\t\t\t// back to the cross location\n\t\t\tback();\n\t\t\tstepCount++;\n\t\t}\n\t}", "@Override\n protected void doAct() {\n }", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}", "public void act() \r\n {\r\n move(5);\r\n if(isAtEdge())\r\n turn(4);\r\n if(Greenfoot.getRandomNumber(35) < 34)\r\n turn(10);\r\n if(Greenfoot.getRandomNumber(20)<5)\r\n turn(-15);\r\n }", "public void act() \n {\n // Add your action code here.\n tempoUp();\n }", "public void act() \n {\n move(-2);\n if(isAtEdge())\n {\n turn(180);\n getImage().mirrorVertically();\n }\n }", "public void act() {\n\n\tif (0 == stepCount) {\n\n\t ArrayList<Location> node = new ArrayList<Location>();\n\t node.add(getLocation());\n\t crossLocation.push(node);\n\t}\n\n\tboolean willMove = canMove();\n\tif (isEnd == true) {\n\t //to show step count when reach the goal\t\t\n\t if (hasShown == false) {\n\t\tString msg = stepCount.toString() + \" steps\";\n\t\tJOptionPane.showMessageDialog(null, msg);\n\t\thasShown = true;\n\t }\n\t} else if (willMove) {\n\t\n\t move();\n\t //increase step count when move \n\t stepCount++;\n\t} else {\n\t \n\t back();\n\t stepCount++;\n\t}\n\n }", "public void act() \n {\n move(-16);\n \n \n if (isAtEdge())\n {\n setLocation(700,getY());\n }\n \n if (isTouching(Shots.class))\n {\n getWorld().addObject(new SpaceObject(), 500,Greenfoot.getRandomNumber(400));\n }\n \n }", "public void act(){\n super.act();\n }", "public void act() {\t\n\t\twhile (true) { \n\t\t\tleft(60); \n\t\t\t\n\t\t\t// draw a rectangle \n\t\t\tmove(70);\n\t\t\tright(90); \n\t\t\tmove(30); \n\t\t\tright(90); \n\t\t\tmove(70);\n\t\t\tright(90); \n\t\t\tmove(30); \n\t\t\tright(90); \n\t\t}\n\t}", "public void act() \n {\n move(3);\n turnAtEdge(); \n StrikeSeaHorse();\n }", "public void act() {\n boolean willMove = canMove();\n if (isEnd && !hasShown) {\n String msg = stepCount.toString() + \" steps\";\n JOptionPane.showMessageDialog(null, msg);\n hasShown = true;\n } else if (willMove) {\n move();\n stepCount++;\n }\n }", "@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "public void act()\n {\n if (getGrid() == null)\n return;\n if (caughtPokemon.size() <= 0)\n {\n removeSelfFromGrid();\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n return;\n }\n ArrayList<Location> moveLocs = getMoveLocations();\n Location loc = selectMoveLocation(moveLocs);\n makeMove(loc);\n }", "protected abstract void perform(ActiveActor a);", "public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }", "public void act() \n {\n CreatureWorld playerWorld = (CreatureWorld)getWorld();\n\n if( getHealthBar().getCurrent() <= 0 )\n {\n getWorld().showText(\"Charmander has fainted...\", getWorld().getWidth()/2, getWorld().getHeight()/2 + 26);\n Greenfoot.delay(30);\n }\n }", "public void act()\n {\n if (Greenfoot.mouseClicked(this))\n Greenfoot.playSound(\"fanfare.wav\");\n }", "public void act(){\n if (alive) {\n x = x + vx * dt;\n vx = vx * (1. - daempfung); //Luftwiderstand, eventuell muss dass nur in der Spielerklasse implementiert\n //werden, damit die Pilze nicht abgebremst werden.\n if (bewegung == Bewegung.fallen) {\n y = y + vy * dt;\n vy = vy + g * dt;\n }\n }\n }", "public void display()\r\n\t{\r\n\t\t//System.out.println(\"Call to display\");\r\n\t\tif (this.isRunning) {\r\n\t\t\tfor (int i=0;i<Actions.size();i++) {\r\n\t\t\t\t((Action)Actions.elementAt(i)).tick(currTime++);\r\n\t\t\t}\r\n\t\t}\r\n\t\trender(true);\r\n\t}", "protected void execute() {\n \tif (isIntaking) {\n \t\tRobot.conveyor.forward();\n \t} else {\n \t\tRobot.conveyor.backward();\n \t}\n }", "public void act(){\n // Removing object, if out of the simulated zone\n if (atWorldEdge()){\n getWorld().removeObject(this);\n return;\n }\n\n //Move Thanos up\n setLocation (getX(), getY() - speed);\n }", "public void act() \n {\n move(4); \n collision();\n \n \n }", "public void run (){\n\t\t\t\t\t\t\t\t\tgame.setScreen(game.ui);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}" ]
[ "0.7225786", "0.7097554", "0.70825034", "0.6799746", "0.6769843", "0.672311", "0.67191404", "0.6668325", "0.66507107", "0.66349703", "0.66175956", "0.65997654", "0.65924644", "0.6568589", "0.65403336", "0.6502133", "0.6489654", "0.6479274", "0.6453302", "0.6434305", "0.64241076", "0.6418152", "0.6414322", "0.6400783", "0.6397401", "0.63889235", "0.63824105", "0.6370539", "0.6342134", "0.6332405", "0.6302981", "0.6293742", "0.62927246", "0.6281046", "0.6264158", "0.6256963", "0.6256963", "0.6256963", "0.6254989", "0.6254686", "0.6254318", "0.62304777", "0.62100744", "0.61961776", "0.61961776", "0.61695546", "0.61040175", "0.6093349", "0.6077867", "0.60769194", "0.60769194", "0.60769194", "0.60769194", "0.60769194", "0.60769194", "0.60769194", "0.6060785", "0.6060785", "0.6060785", "0.6060785", "0.6060785", "0.6060785", "0.6060785", "0.6060785", "0.6046185", "0.6043187", "0.6039843", "0.6038887", "0.6030407", "0.6006078", "0.60023594", "0.5996422", "0.599343", "0.59822744", "0.598215", "0.5970336", "0.596745", "0.596745", "0.59558713", "0.5955568", "0.59424657", "0.5942118", "0.5937202", "0.5928054", "0.5923596", "0.59219587", "0.5919399", "0.5917155", "0.59073675", "0.5889692", "0.5886977", "0.5882214", "0.5872322", "0.58673626", "0.586381", "0.58398354", "0.58322287", "0.5827384", "0.5823535", "0.5818026" ]
0.6452551
19
No args constructor for use in serialization
public GetHotelRoomResult() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MyEncodeableWithoutPublicNoArgConstructor() {}", "public ObjectSerializationEncoder() {\n // Do nothing\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "defaultConstructor(){}", "public Data() {}", "private SerializerFactory() {\n // do nothing\n }", "public JsonFactory() { this(null); }", "private SingleObject(){}", "public CompactSerializable() {\n }", "public Data() {\n \n }", "public Payload() {}", "void DefaultConstructor(){}", "public Data() {\n }", "public Data() {\n }", "private SingleObject()\r\n {\r\n }", "public CustomDateSerializer() {\n this(null);\n }", "public ClassOne(){\n\t\tthis.age = 55;\t\t// this value won't come while de-serialization.\n\t\tSystem.out.println (\"Default Constructor Running\");\n\t}", "private Instantiation(){}", "public Payload() {\n\t}", "O() { super(null); }", "protected abstract T _createEmpty(DeserializationContext ctxt);", "private SerializationUtils() {\n\n }", "Reproducible newInstance();", "private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "public MinecraftJson() {\n }", "public Constructor(){\n\t\t\n\t}", "public \n PipedObjectReader() \n {}", "private JsonUtils() {\n\t\tsuper();\n\t}", "private void __sep__Constructors__() {}", "public Pleasure() {\r\n\t\t}", "public AvroPerson() {}", "private SingleObject(){\n }", "public Pojo1110110(){\r\n\t}", "public NetworkData() {\n }", "public JSONBuilder() {\n\t\tthis(null, null);\n\t}", "public Member() {}", "@SuppressWarnings(\"unchecked\")\n\tpublic UserSerializer() {\n\t\tsuper();\n\t\tmapSerializer.putAll(BeanRetriever.getBean(\"mapSerializerStrategy\", Map.class));\n\t}", "public JSONLoader() {}", "private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}", "public WCSResponseSerializer()\r\n {\r\n }", "public Clade() {}", "public ClaseJson() {\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public Item() {}", "protected AbstractReadablePacket() {\n this.constructor = createConstructor();\n }", "public Generic(){\n\t\tthis(null);\n\t}", "public MetaDataContract()\n {\n }", "public JobPayload()\n {\n \n }", "public SpeakerSerivceImpl() {\n\t\tSystem.out.println(\"No args in constructor\");\n\t}", "public Person() {}", "public Item(){}", "private Converter()\n\t{\n\t\tsuper();\n\t}", "public JSONUtils() {\n\t\tsuper();\n\t}", "public Value() {}", "private Message(){\n // default constructor\n }", "@objid (\"d5a0862c-6231-11e1-b31a-001ec947ccaf\")\n private ObjIdCollectionSerializer() {\n }", "private NaturePackage() {}", "public ParamJson() {\n\t\n\t}", "public InitialData(){}", "public PersonRecord() {}", "public LargeObjectAvro() {}", "protected abstract void construct();", "public D() {}", "@SuppressWarnings(\"unused\")\n public Item() {\n }", "private Item(){}", "private JSONHelper() {\r\n\t\tsuper();\r\n\t}", "public JAXBConverter() {\n\t}", "public Member() {\n //Empty constructor!\n }", "public AbstractBinaryInteraction() {\n\n\t}", "public FileObject() {\n\t}", "public BabbleValue() {}", "public StringData() {\n\n }", "private AggregDayLogSerializer() {\n\t throw new UnsupportedOperationException(\n\t \"This class can't be instantiated\");\n\t }", "public Mapping() { this(null); }", "public Postoj() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public Node() {}", "public StudentRecord() {}", "@Override\n\tpublic Response construct() {\n\t\treturn null;\n\t}", "public Person()\n {\n //intentionally left empty\n }", "public XObject(){\r\n }", "public XObject(){\n }", "public TeeWriter() {\r\n ; // nothing to do\r\n }", "public ObjectUtils() {\n super();\n }", "public Value() {\n }", "public JsonField() {\n }", "public Identity()\n {\n super( Fields.ARGS );\n }", "MessageSerializer<T> create();", "public CSSTidier() {\n\t}", "public Value(){}", "private NewsWriter() {\n }", "public UE2_0_3Serializer(){\n\t\txstream = new XStream(/*new DomDriver()*/);\n\t}", "public SensorData() {\n\n\t}", "public Pasien() {\r\n }", "public Node() {\n\t}", "public LocalObject() {}", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "public Book() {}", "public Item() {\n\t}" ]
[ "0.74630904", "0.7387007", "0.7210724", "0.7029566", "0.7018587", "0.6977819", "0.69339114", "0.6881743", "0.6739828", "0.6727297", "0.6717886", "0.67169136", "0.669586", "0.669586", "0.66750634", "0.66246814", "0.6604095", "0.6532946", "0.65235436", "0.6500072", "0.6466648", "0.64311725", "0.6420696", "0.63329536", "0.6331174", "0.63080406", "0.6303669", "0.6297327", "0.6289062", "0.62796336", "0.62715524", "0.6246891", "0.6236601", "0.6236527", "0.62337124", "0.621766", "0.62073123", "0.6205364", "0.62028056", "0.61931217", "0.61913615", "0.61901313", "0.6187056", "0.618604", "0.61813384", "0.61712974", "0.6168396", "0.61616594", "0.6159333", "0.61513215", "0.6150306", "0.6144834", "0.6137297", "0.61357254", "0.6134681", "0.61235094", "0.6122921", "0.61144346", "0.6113325", "0.6103046", "0.6093859", "0.6088237", "0.60865474", "0.60842085", "0.6079729", "0.6075916", "0.6066694", "0.6050046", "0.60495526", "0.60494757", "0.60476506", "0.6045192", "0.60441047", "0.6041579", "0.60395074", "0.6038388", "0.6038388", "0.6038388", "0.6038388", "0.6036713", "0.6032801", "0.6030977", "0.60247785", "0.6018193", "0.60155535", "0.60124946", "0.6011776", "0.60107607", "0.6008726", "0.60062283", "0.60036933", "0.5999471", "0.5998251", "0.5996513", "0.59922075", "0.5991442", "0.59912944", "0.5989887", "0.5989741", "0.598915", "0.59881556" ]
0.0
-1
Estructura que contiene todos los autores
public Authors() { mAuthors = new TreeMap<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void limpiar() {\n\t\taut_empleado.limpiar();\n\t\tutilitario.addUpdate(\"aut_empleado\");// limpia y refresca el autocompletar\n\n\n\t}", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela PressaoArterial\\n\");\n\t\tpressaoArterial = new PressaoArterial();\n\t\tlistaPressaoArterial = pressaoArterialService.buscarTodos();\n\n\t}", "private void cargarAutos() {\n Auto autos[]={\n new Auto(\"Bocho\",\"1994\"),\n new Auto(\"Jetta\",\"1997\"),\n new Auto(\"Challenger\",\"2011\"),\n new Auto(\"Ferrari\",\"2003\")\n };\n for (Auto auto : autos) {\n cboAutos.addItem(auto);\n \n }\n spnIndice.setModel(new SpinnerNumberModel(0, 0, autos.length-1, 1));\n }", "@GET\n\t@Path(\"/autos\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic RespuestaDTO listarAutos(){\n\t\tSystem.out.println(\"ini: listarAutos()\");\n\t\tRespuestaDTO respuesta = null;\n\t\t\n\t\tAutoService autoService = new AutoService();\n\t\tArrayList<AutoDTO> lista = autoService.ListadoAuto();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t\trespuesta = new RespuestaDTO(lista);\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarAutos()\");\n\t\t\n\t\treturn respuesta;\n\t}", "private void atualizarTela() {\n\t\tSystem.out.println(\"\\n*** Refresh da Pagina / Consultando Todos os Registro da Tabela Paciente\\n\");\n\t\tpaciente = new Paciente();\n\t\tlistaPaciente = pacienteService.buscarTodos();\n\t\t\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "private void cargarAutorizaciones() {\r\n\t\tif (parametros_empresa != null) {\r\n\t\t\tif (parametros_empresa.getTrabaja_autorizacion()) {\r\n\t\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\t\tadmision_seleccionada);\r\n\r\n\t\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\t\tIRutas_historia.PAGINA_AUTORIZACIONES,\r\n\t\t\t\t\t\t\"AUTORIZACIONES\", parametros);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@GET\n\t@Path(\"/lstautos\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic ArrayList<AutoDTO> listarLstAutos(){\n\t\tSystem.out.println(\"ini: listarLstAutos()\");\n\t\t\n\t\tAutoService autoService = new AutoService();\n\t\tArrayList<AutoDTO> lista = autoService.ListadoAuto();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarLstAutos()\");\n\t\t\n\t\treturn lista;\n\t}", "public void generTirarDados() {\n\r\n\t}", "private void carregarAgendamentos() {\n agendamentos.clear();\n\n // Carregar os agendamentos do banco de dados\n agendamentos = new AgendamentoDAO(this).select();\n\n // Atualizar a lista\n setupRecyclerView();\n }", "public void Listar() {\n try {\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n this.listaApelaciones.clear();\n setListaApelaciones(apelacionesDao.cargaApelaciones());\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }", "public void addAuto(AutomovilDTO auto){\n this.getListaAutos().add(auto);\n }", "public AutoEvents() {\n super();\n _autoEventList = new ArrayList();\n }", "private void carregarAlunosTurma() {\n AcessoFirebase.getFirebase().addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n getUidUsuariosTurma(dataSnapshot);\n montandoArrayListUsuarios(dataSnapshot);\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "private void moverCarroLujo() {\n for (Auto auto : arrEnemigosAuto) {\n auto.render(batch);\n\n auto.moverIzquierda();\n }\n }", "private void setupAllMafiosis()\n {\n }", "public void Lista(){\n\t\tcabeza = null;\n\t\ttamanio = 0;\n\t}", "public void listar() {\n\t\t\n\t}", "public GestorAtracciones()\n {\n gestor_trabajadores = new GestorTrabajadores();\n atracciones = new ArrayList<>();\n lectura = new Scanner(System.in);\n crearAtracciones();\n calculoTipoAtraccion();\n calculoPersonal();\n }", "public void iniciar() {\n\t\tcrearElementos();\n\t\tcrearVista();\n\n\t}", "public static void initalize(){\n //Add all of the commands here by name and id\n autonomousChooser.addDefault(\"Base Line\", 0);\n // addOption​(String name, int object)\n\n SmartDashboard.putData(\"Auto mode\", autonomousChooser);\n }", "@PostConstruct\r\n public void leerListaUsuarios() {\r\n listaUsuarios.addAll(usuarioFacadeLocal.findAll());\r\n }", "public void inicializarSugeridos() {\n\t\tarticulosSugeridos = new ArrayList<>();\n\t\tfor(Articulo articulo : this.getMain().getArticulosEnStock()) {\n\t\t\tarticulosSugeridos.add(articulo.getNombre().get() + \" - \" + articulo.getTalle().get());\n\t\t}\n\t\tasignarSugeridos();\n\t\tinicializarTxtArticuloVendido();\n\t}", "public void inicializa_controles() {\n bloquea_campos();\n bloquea_botones();\n carga_fecha();\n ocultar_labeles();\n }", "public void inicializarListaMascotas()\n {\n //creamos un arreglo de objetos y le cargamos datos\n mascotas = new ArrayList<>();\n mascotas.add(new Mascota(R.drawable.elefante,\"Elefantin\",0));\n mascotas.add(new Mascota(R.drawable.conejo,\"Conejo\",0));\n mascotas.add(new Mascota(R.drawable.tortuga,\"Tortuga\",0));\n mascotas.add(new Mascota(R.drawable.caballo,\"Caballo\",0));\n mascotas.add(new Mascota(R.drawable.rana,\"Rana\",0));\n }", "private DittaAutonoleggio(){\n \n }", "public void autStartConsultaDefault() {\t\t\r\n\t\tAUTBaseComponent bs = new AUTBaseComponent() {};\r\n\t\tbs.autGetDataFlow().autInitDataFlow();\r\n\t\tautStartConsulta(bs.autGetCurrentParameter(AUT_TABLE_PARAMETERS_NAMES.AUT_VA_GERACAO_PEDIDOS, \"AUT_CODIGO_ITEM\").toString());\r\n\t}", "private void getObsequios(){\n mObsequios = estudioAdapter.getListaObsequiosSinEnviar();\n //ca.close();\n }", "@Override\n\tvoid geraDados() {\n\n\t}", "private void carregarEventosLugares() {\n listaLugares.forEach(lugar -> {\n lugar.getCadeira().setOnMouseClicked(evento -> enviarRequisicaoSentar(lugar));\n lugar.getMao().setOnMouseClicked(evento -> enviarRequisicaoApostar(lugar.getNumeroLugar()));\n lugar.getAdicionar().setOnMouseClicked(evento -> enviarRequisicaoAdicionar());\n lugar.getRemover().setOnMouseClicked(evento -> enviarRequisicaoRemover());\n lugar.getPalpite().setOnMouseClicked(evento -> enviarRequisicaoPalpite());\n });\n }", "private void initializeAutoChooser()\n {\n /* Add options (which autonomous commands can be selected) to chooser. */\n m_autoChooser.setDefaultOption(\"DEFAULT COMMAND NAME HERE\", \"default\");\n m_autoChooser.addOption(\"TEST\", \"test\");\n m_autoChooser.addOption(\"THREE BALL FORWARD\", \"three_ball_forward\");\n m_autoChooser.addOption(\"THREE BALL BACKWARD\", \"three_ball_backward\");\n m_autoChooser.addOption(\"SIX BALL\", \"six_ball\");\n\n /*\n * Display chooser on SmartDashboard for operators to select which autonomous\n * command to run during the auto period.\n */\n SmartDashboard.putData(\"Autonomous Command\", m_autoChooser);\n }", "@Override\r\n\tprotected void init() {\r\n\t\tList<Configuracao> configs = servico.listarTodos();\r\n\t\tif (!configs.isEmpty()) {\r\n\t\t\tentidade = configs.get(0);\t// deve haver apenas um registro\r\n\t\t} else {\r\n\t\t\tcreateConfiguracao();\r\n\t\t}\r\n\t\t\r\n carregarTemas();\r\n\t}", "public void consultarEditorialesDAO() {\n Collection<Editorial> editoriales = em.createQuery(\"SELECT e\"\n + \" FROM Editorial e\").getResultList();\n\n //Iteramos entre autores\n for (Editorial e : editoriales) {\n\n System.out.println(e.getNombre());\n\n }\n\n }", "public void prepararDados() {\n\t\tatribuiPrimeiroAnoCasoAnoEstejaNulo();\n\t\t\n\t\tsalvarOuAtualizar(alunosMilitarPraca);\n\t\tsalvarOuAtualizar(alunosMilitarOficial);\n\t\t\n\t\tinit();\n\t\thabilitaBotao=false;\n\t}", "@Override\r\n public List<Assunto> buscarTodas() {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"FROM Assunto As a\");\r\n return query.getResultList();\r\n }", "public listaAlumnos()\r\n\t{\r\n\t\tinicio = fin = null; \r\n\t}", "List<Oficios> buscarActivas();", "private void initVistas() {\n // La actividad responderá al pulsar el botón.\n Button btnSolicitar = (Button) this.findViewById(R.id.btnSolicitar);\n btnSolicitar.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n solicitarDatos();\n }\n });\n lblDatos = (TextView) this.findViewById(R.id.lblDatos);\n }", "public void searchAll() {\r\n\t\tconfiguracionUoDet = new ConfiguracionUoDet();\r\n\t\tidConfiguracionUoDet = null;\r\n\t\tidBarrio = null;\r\n\t\tidCiudad = null;\r\n\t\tidCpt = null;\r\n\t\tidDpto = null;\r\n\t\tmodalidadOcupacion = null;\r\n\t\tcodigoUnidOrgDep = null;\r\n\t\tdenominacion = null;\r\n\t\tllenarListado1();\r\n\t}", "public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}", "public void setAutobusai(List<Autobusai> autobusai) {\r\n\t\tthis.autobusai = autobusai;\r\n\t}", "private String autores(Proyecto proyecto) {\r\n String resultado = \"\";\r\n Item estadoRenunciado = itemService.buscarPorCatalogoCodigo(CatalogoEnum.ESTADOAUTOR.getTipo(), EstadoAutorEnum.RENUNCIADO.getTipo());\r\n if (proyecto.getAutorProyectoList() == null) {\r\n return \"\";\r\n }\r\n int contador = 0;\r\n for (AutorProyecto autorProyecto : proyecto.getAutorProyectoList()) {\r\n if (estadoRenunciado.getId().equals(autorProyecto.getEstadoAutorId())) {\r\n continue;\r\n }\r\n EstudianteCarrera estudianteCarrera = estudianteCarreraService.buscarPorId(new EstudianteCarrera(autorProyecto.getAspiranteId().getId()));\r\n Persona persona = personaService.buscarPorId(new Persona(estudianteCarrera.getEstudianteId().getId()));\r\n if (contador == 0) {\r\n if (persona == null) {\r\n continue;\r\n }\r\n resultado = (persona.getApellidos() + \" \" + persona.getNombres());\r\n } else {\r\n resultado = (resultado + \", \" + persona.getApellidos() + \" \" + persona.getNombres());\r\n }\r\n contador++;\r\n }\r\n return resultado;\r\n }", "public cmdAutoDrop() {\n addSequential(new cmdAutoDrive());\n addSequential(new cmdAutoHopper());\n addParallel(new cmdAutoHopDrive());\n addSequential(new cmdAutoBack());\n addSequential(new cmdAutoTurn());\n }", "public void autonomousInit() {\n\t\tSystem.out.println(\"Auto Init\");\n//\t\tint autonStep = 0;\t//step that autonomous is executing\n\t\tclaw = new Claw();\n\t\televator = new Elevator();\n//\t\televator.elevator();\n\t\tdecode = new Decode();\n//\t\tdecode.decode();\n\t}", "public void autonomousPeriodic() {\n \tswitch(autoSelected) {\n \tcase customAuto:\n //Put custom auto code here \n break;\n \tcase defaultAuto:\n \tdefault:\n \t//Put default auto code here\n break;\n \t}\n }", "void setAutoreCollection(Collection<Autore> autoreCollection);", "private void caricaMacchine(){\n //Carico combo con le auto\n final Spinner cboAddAuto = (Spinner) findViewById(R.id.cboAutoAddRip);\n final ArrayList<Auto> listaAuto= new ArrayList<Auto>();\n\n HTTPRequest reqCamp = new HTTPRequest(url + \"/WebServicesOfficina/elencoMacchine.php\") {\n @Override\n protected void onPostExecute(String result) {\n if (result.contains(\"Exception: \"))\n gestErrori(result);\n else {\n try {\n JSONArray json = new JSONArray(result);\n int i = 0;\n while (i < json.length()) {\n JSONObject jsonAuto = json.getJSONObject(i);\n Auto auto = new Auto();\n auto.setIdAuto(jsonAuto.getInt(\"idAuto\"));\n auto.setModelloAuto(jsonAuto.getString(\"modello\"));\n auto.setMarcaAuto(jsonAuto.getString(\"marca\"));\n listaAuto.add(auto);\n i++;\n }\n PersonalAdAuto adC = new PersonalAdAuto(getApplicationContext(), R.id.linLayoutAuto, listaAuto);\n cboAddAuto.setAdapter(adC);\n } catch (JSONException ex) {\n gestErrori(ex.getMessage());\n }\n }\n }\n };\n reqCamp.execute();\n }", "@Override\r\n\tpublic List<ApkAutomaticConfiguration> selectByApkAutoList() {\n\t\treturn apkAutomaticConfigurationMapper.selectByApkAutoList();\r\n\t}", "public void cargaDatosInicialesSoloParaAdicionDeCuenta() throws Exception {\n GestionContableWrapper gestionContableWrapper = parParametricasService.factoryGestionContable();\n gestionContableWrapper.getNormaContable3();\n parAjustesList = parParametricasService.listaTiposDeAjuste(obtieneEnumTipoAjuste(gestionContableWrapper.getNormaContable3()));\n //Obtien Ajuste Fin\n //Activa formulario para automatico modifica \n if (selectedEntidad.getNivel() >= 3) {\n numeroEspaciadorAdicionar = 260;\n }\n\n if (selectedEntidad.getNivel() == 3) {\n swParAutomatico = false;\n numeroEspaciadorAdicionar = 230;\n }\n if (selectedEntidad.getNivel() == 2) {\n swParAutomatico = true;\n swActivaBoton = true;\n numeroEspaciadorAdicionar = 200;\n }\n if (selectedEntidad.getNivel() == 1) {\n swParAutomatico = true;\n numeroEspaciadorAdicionar = 130;\n cntParametroAutomaticoDeNivel2 = cntParametroAutomaticoService.obtieneObjetoDeParametroAutomatico(selectedEntidad);\n }\n\n mascaraNuevoOpcion = \"N\";\n cntEntidad = (CntEntidad) getCntEntidadesService().find(CntEntidad.class, selectedEntidad.getIdEntidad());\n mascaraNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"N\");\n mascaraSubNivel = getCntEntidadesService().generaCodigoNivelesSubAndPadre(selectedEntidad, \"S\");\n longitudNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"N\");\n longitudSubNivel = getCntEntidadesService().controlaLongitudNumero(selectedEntidad, \"S\");\n }", "public void inicializar() {\n\t\tarestas.forEach(aresta -> {\n\t\t\taresta.getOrigin().atribuirPesoInicial();\n\t\t\taresta.getTarget().atribuirPesoInicial();\n\t\t});\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t\tautonomousCommand = new Auto();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}", "public Principal() {\n initComponents();\n\n System.out.println(\"lista de hoteles disponibles\");\n List<Document> hoteles = db.getAllDocuments(\"hoteles\");\n for (Document hotel : hoteles) {\n this.hoteles.add(hotel.getString(\"nombre\"));\n System.out.println(hotel.getString(\"nombre\"));\n }\n \n List<Document> ciudades = db.getAllDocuments(\"ciudades\");\n for (Document ciudad : ciudades) {\n this.ciudades_destino.add(ciudad.getString(\"nombre\"));\n }\n \n }", "public void buscarGestor(){\r\n\t\t\r\n\t}", "private final void inicializarListas() {\r\n\t\t//Cargo la Lista de orden menos uno\r\n\t\tIterator<Character> it = Constantes.LISTA_CHARSET_LATIN.iterator();\r\n\t\tCharacter letra;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tletra = it.next();\r\n\t\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(letra);\r\n\t\t}\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.crearCharEnContexto(Constantes.EOF);\r\n\t\t\r\n\t\tthis.contextoOrdenMenosUno.actualizarProbabilidades();\r\n\t\t\r\n\t\t//Cargo las listas de ordenes desde 0 al orden definido en la configuración\r\n\t\tOrden ordenContexto;\r\n\t\tfor (int i = 0; i <= this.orden; i++) {\r\n\t\t\tordenContexto = new Orden();\r\n\t\t\tthis.listaOrdenes.add(ordenContexto);\r\n\t\t}\r\n\t}", "@Override\n public List listar() {\n return instalaciones.getAll();\n }", "@Override\r\n\tpublic void analizarUsuario() {\n\t\tfor(IAsesoria ia : usuarios) {\r\n\t\t\tia.analizarUsuario();\r\n\t\t}\t\r\n\t}", "@Override\n\t@WebMethod(action = \"AutoresService/ListarAutores\")\n\t@WebResult(name = \"autor\", targetNamespace = \"\")\n\t@RequestWrapper(localName = \"listarAutores\", targetNamespace = \"http://knight.com/estoque/services/AutoresService/v1\", className = \"com.knight.estoque.services.autoresservice.v1.ListarAutores\")\n\t@ResponseWrapper(localName = \"listarAutoresResponse\", targetNamespace = \"http://knight.com/estoque/services/AutoresService/v1\", className = \"com.knight.estoque.services.autoresservice.v1.ListarAutoresResponse\")\n\tpublic List<Autor> listarAutores() {\n\t\treturn null;\n\t}", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "private void setNameAutomatic(){\n\t}", "public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}", "public void autonomousInit(){\n\t \t//resetAndDisableSystems();\n\t\t \n\t \tautonomousCommand = (Command) autoChooser.getSelected();\n\t \tautonomousCommand.start();\n\t \t\n\t \t\n\t }", "public Artefato() {\r\n\t\tthis.membros = new ArrayList<Membro>();\r\n\t\tthis.servicos = new ArrayList<IServico>();\r\n\t}", "public void solicitarRutinasPorDia() {\n eliminarTodasRutinas();\n\n }", "public void definirCompraAutomatica() {\n this.compra_automatica = true;\n }", "public void executar() {\n\t\tSystem.out.println(dao.getListaPorNome(\"abacatão\"));\n\t}", "public Listas_simplemente_enlazada(){\r\n inicio=null; // este constructor me va servir para apuntar el elemento\r\n fin=null;\r\n }", "public void loadReserva() {\r\n\t\tif(listaReservas.size() != 0) {\r\n\r\n\t\t}else {\r\n\t\t\tfor(int i = 0; i < 8; i++) {\r\n\t\t\t\tReservaDAO aux = new ReservaDAO();\r\n\t\t\t\taux.load_reserva(i+1);\r\n\t\t\t\tif(aux.getTitulo() != null) {\r\n\t\t\t\t\tlistaReservas.add(aux);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void automovil(){\r\n System.out.println(\"Ingrese placa: \");\r\n placa = leer.next();\r\n System.out.println(\"Ingrese marca: \");\r\n marca = leer.next();\r\n \r\n Automovil auto = new Automovil(placa, marca, 10000);\r\n controlador.llenarVehiculo(auto);\r\n {\r\n }\r\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@Override\n public void autonomousPeriodic() {\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n // Put default auto code here\n break;\n }\n }", "@RequestMapping(value = \"/{LivroId}/Autores\", method = RequestMethod.GET)\n\tpublic ResponseEntity<List<AutoresDTO>> findAutoress(@PathVariable Integer livroId) {\n\t\tList<Autores> list = AutoresService.findByAutores(livroId);\n\t\tList<AutoresDTO> listDto = list.stream().map(obj -> new AutoresDTO(obj)).collect(Collectors.toList());\n\t\treturn ResponseEntity.ok().body(listDto);\n\t}", "private void InicializarListaAlbums() {\n\n GestorAlbums gestorAlbums = new GestorAlbums(this.getActivity());\n albums = gestorAlbums.AsignarAlbum();\n }", "public void armarPreguntas(){\n preguntas = file.listaPreguntas(\"Preguntas.txt\");\n }", "@Override\n public void autonomousInit() {\n\n Robot.m_driveTrain.driveTrainLeftFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightFrontMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainRightRearMotor.setSelectedSensorPosition(0);\n Robot.m_driveTrain.driveTrainLeftRearMotor.setSelectedSensorPosition(0);\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n }", "private static void menuManejoJugadores() {\n\t\tint opcion;\n\t\tdo{\n\t\t\topcion=menuManejoJugadores.gestionar();\n\t\t\tgestionarMenuManejoJugador(opcion);\n\t\t}while(opcion!=menuManejoJugadores.getSALIR());\n\t}", "public void admin_enable_auto() {\n\t\tautomerge = true; // merges every time new crystals are added\n\t\tautoidentify = true; // identifies every time merge occurs\n\t\tautodust = true; \n\t\tautosell = false;// cannot have autosell and autodust enabled\n\t}", "private void turnos() {\n\t\tfor(int i=0; i<JuegoListener.elementos.size(); i++){\n\t\t\tElemento elemento = JuegoListener.elementos.get(i);\n\t\t\t\n\t\t\telemento.jugar();\n\t\t}\n\t}", "private void atualizarBotoes() {\r\n\t\tbtIncluir.setDisable(cliente.getId() != null);\r\n\t\tbtAlterar.setDisable(cliente.getId() == null);\r\n\t\tbtExcluir.setDisable(cliente.getId() == null);\r\n\t}", "public static List<File> getAllAutoSaves() throws DatabaseWrapperOperationException{\r\n \t\tList<File> autoSaves = FileSystemAccessWrapper.getAllMatchingFilesInHomeDirectory(DatabaseIntegrityManager.AUTO_SAVE_FILE_REGEX);\r\n \t\tCollections.sort(autoSaves, new Comparator<File>() {\r\n \t\t\t@Override\r\n \t\t\tpublic int compare(File file1, File file2) {\r\n \t\t\t\ttry {\r\n \t\t\t\t\treturn Long.compare(DatabaseIntegrityManager.extractTimeStamp(file2), DatabaseIntegrityManager.extractTimeStamp(file1));\r\n \t\t\t\t} catch (DatabaseWrapperOperationException e) {\r\n \t\t\t\t\treturn -1;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t});\r\n \t\t\r\n \t\treturn autoSaves;\r\n \t}", "@Override\n\tpublic void getDatas() {\n\t\tAutoUpdate autoUpdate=new AutoUpdate();\n\t\tautoUpdate.getVersionData(this, \"0\");\n\t}", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n SmartDashboard.putData(leftMotor1);\n SmartDashboard.putData(leftMotor2);\n SmartDashboard.putData(rightMotor1);\n SmartDashboard.putData(rightMotor2);\n SmartDashboard.putData(firstMotor);\n SmartDashboard.putData(secondMotor);\n \n\n\n\n }", "public void aumentarReproducidas() {\n\t\tsuper.aumentarReproducidas();\n\n\t}", "@Override\n\tpublic void mostrarDados() {\n\t\t\n\t}", "public void buscarDocentes() {\r\n try {\r\n List<DocenteProyecto> docenteProyectos = docenteProyectoService.buscar(new DocenteProyecto(\r\n sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE, null));\r\n if (docenteProyectos.isEmpty()) {\r\n return;\r\n }\r\n for (DocenteProyecto docenteProyecto : docenteProyectos) {\r\n DocenteProyectoDTO docenteProyectoDTO = new DocenteProyectoDTO(docenteProyecto, null,\r\n docenteCarreraService.buscarPorId(new DocenteCarrera(docenteProyecto.getDocenteCarreraId())));\r\n docenteProyectoDTO.setPersona(personaService.buscarPorId(new Persona(docenteProyectoDTO.getDocenteCarrera().getDocenteId().getId())));\r\n sessionProyecto.getDocentesProyectoDTO().add(docenteProyectoDTO);\r\n }\r\n sessionProyecto.setFilterDocentesProyectoDTO(sessionProyecto.getDocentesProyectoDTO());\r\n } catch (Exception e) {\r\n }\r\n }", "@PostConstruct\r\n public void inicializar() {\r\n try {\r\n anioDeclaracion = 0;\r\n existeDedPatente = false;\r\n deducciones = false;\r\n detaleExoDedMul = new ArrayList<String>();\r\n activaBaseImponible = 0;\r\n verBuscaPatente = 0;\r\n inicializarValCalcula();\r\n datoGlobalActual = new DatoGlobal();\r\n patenteActual = new Patente();\r\n patenteValoracionActal = new PatenteValoracion();\r\n verPanelDetalleImp = 0;\r\n habilitaEdicion = false;\r\n numPatente = \"\";\r\n buscNumPat = \"\";\r\n buscAnioPat = \"\";\r\n catDetAnio = new CatalogoDetalle();\r\n verguarda = 0;\r\n verActualiza = 0;\r\n verDetDeducciones = 0;\r\n verBotDetDeducciones = 0;\r\n listarAnios();\r\n } catch (Exception ex) {\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n }\r\n }", "private void inicializarUsuarios(){\n usuarios = new ArrayList<Usuario>();\n Administrador admin=new Administrador();\n admin.setCodigo(1);\n admin.setApellidos(\"Alcaide Gomez\");\n admin.setNombre(\"Juan Carlos\");\n admin.setDni(\"31000518Z\");\n admin.setPassword(\"admin\");\n admin.setCorreo(\"algojuca@alu.uma.es\");\n admin.setDireccion(\"Sebastian Garrido 54\");\n admin.setNacimiento(new Date(1991, 12, 29));\n admin.setNacionalidad(\"España\");\n admin.setCentro(\"Centro\");\n admin.setSexo(\"Varon\");\n admin.setDespacho(\"301\");\n usuarios.add(admin);\n \n JefeServicio js=new JefeServicio();\n js.setCodigo(2);\n js.setApellidos(\"Gutierrez Cazorla\");\n js.setNombre(\"Ruben\");\n js.setDni(\"75895329k\");\n js.setPassword(\"admin\");\n js.setCorreo(\"algojuca@alu.uma.es\");\n js.setDireccion(\"Sebastian Garrido 54\");\n js.setNacimiento(new Date(1991, 12, 29));\n js.setNacionalidad(\"España\");\n js.setCentro(\"Centro\");\n js.setSexo(\"Varon\");\n js.setDespacho(\"301\");\n \n usuarios.add(js);\n \n \n Ciudadano c =new Ciudadano();\n c.setCodigo(3);\n c.setApellidos(\"Moreno\");\n c.setNombre(\"Maria\");\n c.setDni(\"123\");\n c.setPassword(\"123\");\n c.setCorreo(\"magonmo92@alu.uma.es\");\n c.setDireccion(\"Sebastian Garrido 54\");\n c.setNacimiento(new Date(1992, 01, 12));\n c.setCentro(\"Teatinos\");\n c.setNacionalidad(\"España\");\n c.setSexo(\"Mujer\");\n c.setTelefono(\"999\");\n usuarios.add(c);\n \n //--Administrativos--\n Administrativo a =new Administrativo();\n a.setCodigo(4);\n a.setApellidos(\"Fernández\");\n a.setNombre(\"Salva\");\n a.setDni(\"1234\");\n a.setPassword(\"1234\");\n a.setCorreo(\"safcf@alu.uma.es\");\n a.setDireccion(\"Sebastian Garrido 54\");\n a.setNacimiento(new Date(1991, 9, 29));\n a.setNacionalidad(\"España\");\n a.setSexo(\"Hombre\");\n a.setCentro(\"Centro\");\n usuarios.add(a);\n \n Tecnico tec=new Tecnico();\n tec.setCodigo(5);\n tec.setApellidos(\"Alcaide Gomez\");\n tec.setNombre(\"Juan Carlos\");\n tec.setDni(\"tecnico\");\n tec.setPassword(\"tecnico\");\n tec.setCorreo(\"algojuca@alu.uma.es\");\n tec.setDireccion(\"Sebastian Garrido 54\");\n tec.setNacimiento(new Date(1991, 12, 29));\n tec.setNacionalidad(\"España\");\n tec.setCentro(\"Centro\");\n tec.setSexo(\"Varon\");\n tec.setDespacho(\"301\");\n tec.setTelefono(\"664671040\");\n tec.setEspecialidad(\"Maltrato\");\n tec.setTfijo(957375546);\n \n usuarios.add(tec);\n \n }", "private void solicitarDatos() {\n Intent intent = Henson.with(this).gotoAlumnoActivity().edad(mAlumno.getEdad()).nombre(\n mAlumno.getNombre()).build();\n startActivityForResult(intent, RC_ALUMNO);\n }", "private void carregaLista() {\n listagem = (ListView) findViewById(R.id.lst_cadastrados);\n dbhelper = new DBHelper(this);\n UsuarioDAO dao = new UsuarioDAO(dbhelper);\n //Preenche a lista com os dados do banco\n List<Usuarios> usuarios = dao.buscaUsuarios();\n dbhelper.close();\n UsuarioAdapter adapter = new UsuarioAdapter(this, usuarios);\n listagem.setAdapter(adapter);\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tswitch (m_autoSelected) {\n\t\t\tcase kCustomAuto:\n\t\t\t\t// Put custom auto code here\n\t\t\t\tbreak;\n\t\t\tcase kDefaultAuto:\n\t\t\tdefault:\n\t\t\t\t// Put default auto code here\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void menuListados() {\n\t\tSystem.out.println(\"MENU LISTADOS\");\n\t\tSystem.out.println(\"1. Personas con la misma actividad\");\n\t\tSystem.out.println(\"2. Cantidad de personas con la misma actividad\");\n\t\tSystem.out.println(\"0. Salir\");\n\t}", "public String altaGenero(){\n int id = coleccionGenero.size() + 1;\n Genero gen = new Genero(id, generoSeleccionado);\n //graba en bd\n GeneroService serv = new GeneroService();\n //refrescar otra vez la lista\n return \"lista-genero\";\n }", "public void buildAuto(String fileName)\n\t{\n\t\t// Create the autoConfig and return an arrayList with the key and autoConfig\t\t\n\t\tLinkedHashMap<String, AutoConfig> autoConfigs = BuildAuto.buildAutoObject(fileName);\n\t\t\n\t\tconfigs = autoConfigs;\n\t}", "public AC(AutoAPI obj) {\n\t\tthis.auto = obj;\n\t}", "public static void alquilarObjeto(Scanner keyboard, ArrayList<Usuario> usuarios) throws ParseException {\n \n if(!estaVacia(usuarios)){\n Usuario user = (Usuario) mostrarLista(keyboard,usuarios); //usuario que quiere alquilar\n ArrayList<Objeto> objetos = new ArrayList<Objeto>();\n for(Usuario u: usuarios){\n objetos.addAll(u.getObjetos());\n }\n if(!estaVacia(objetos)){\n Objeto obj = (Objeto) mostrarLista(keyboard,objetos);\n Date fechaFin,fechaIni;\n do{\n\n System.out.println(\"Introduzca el intervalo de fechas (DD/MM/YYYY): \");\n\n fechaIni = introducirFecha(keyboard,\"fecha de inicio\");\n fechaFin = introducirFecha(keyboard,\"fecha de fin\");\n\n }while(!comprobarOrdenFechas(fechaFin,fechaIni) && !comprobarIntervalo(fechaIni,fechaFin,obj.getFechaIni(),obj.getFechaFin()));\n\n\n float importeProp = diferenciaFechas(fechaFin,fechaIni)*obj.getCoste();\n user.addGastado(importeProp);\n Alquiler alquiler = new Alquiler(user,obj,fechaIni,fechaFin,importeProp, (float) (importeProp*0.1));\n obj.addAlq(alquiler);\n }\n } \n }" ]
[ "0.66606575", "0.6594653", "0.64604306", "0.6437941", "0.63602585", "0.6292242", "0.6074331", "0.6065478", "0.5925511", "0.58734196", "0.5869098", "0.5862077", "0.58583325", "0.585322", "0.58277667", "0.58055913", "0.5725518", "0.5723795", "0.57123923", "0.57098", "0.5688022", "0.5681436", "0.56677467", "0.56665736", "0.5660245", "0.56462026", "0.56278867", "0.5623804", "0.561042", "0.55961764", "0.55831355", "0.55813223", "0.5581256", "0.5578479", "0.5568234", "0.5559178", "0.55520386", "0.55302346", "0.5524942", "0.55243474", "0.55213964", "0.5518406", "0.5518188", "0.5515146", "0.55137104", "0.5510598", "0.5506583", "0.5504594", "0.5503176", "0.5500216", "0.5498078", "0.54965293", "0.549512", "0.5490559", "0.5482359", "0.5478123", "0.54749423", "0.54736644", "0.54706174", "0.5459611", "0.5449843", "0.54462177", "0.54377186", "0.5432963", "0.5432189", "0.5429964", "0.5423503", "0.54174775", "0.540562", "0.54045886", "0.5385908", "0.53858143", "0.53858143", "0.53858143", "0.53858143", "0.53770995", "0.5377097", "0.537465", "0.5371702", "0.53609896", "0.5360529", "0.5359392", "0.5359124", "0.53488183", "0.5344906", "0.53414375", "0.53396285", "0.53365976", "0.5335939", "0.532978", "0.5327294", "0.5326575", "0.5324974", "0.532061", "0.532061", "0.532061", "0.5318098", "0.5315188", "0.5312247", "0.5300548", "0.5300323" ]
0.0
-1
constructors are used to set up the objects instance variables. constructor is a method that is the same name as the class.
public Person(String name, int birthYear, String homeTown) { // initialises variable and refers to the object this.name = name; this.birthYear = birthYear; this.homeTown = homeTown; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Constructor(){\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "private void __sep__Constructors__() {}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "private Instantiation(){}", "public Bicycle() {\n // You can also call another constructor:\n // this(1, 50, 5, \"Bontrager\");\n System.out.println(\"Bicycle.Bicycle- no arguments\");\n gear = 1;\n cadence = 50;\n speed = 5;\n name = \"Bontrager\";\n }", "public ConstructorsDemo() \n\t {\n\t x = 5; // Set the initial value for the class attribute x\n\t }", "public Car(){\n\t\t\n\t}", "public Calculator() {\r\n\t\t/*\r\n\t\t * Constructor - Method name which has the same class name is called a Consatructor\r\n\t\t */\r\n\t\tSystem.out.println(\"Calling constructor\");\r\n\t}", "public CyanSus() {\n\n }", "public Car() {\n }", "VehicleClass() {}", "public Hello()\n {\n // initialise instance variables\n \n }", "public static void main(String[] args) {\n\t\tthisconstructor rv = new thisconstructor();\n\t\n\t\n\t}", "private SingleObject()\r\n {\r\n }", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "public static void main(String[] args) {\n\t\tConstructor cn=new Constructor(); \r\n\t\t// Note: no need to create object for constructor\r\n\t\r\n\t}", "public EngineClass()\n {\n cyl = 10;\n fuel = new String( BATT );\n }", "public Car() {\n }", "public ObjectFactory() {\n\t}", "protected abstract void construct();", "@Test\n public void constructor(){\n /**Positive tests*/\n Road road = new Road(cityA, cityB, 4);\n assertEquals(road.getFrom(), cityA);\n assertEquals(road.getTo(), cityB);\n assertEquals(road.getLength(), 4);\n }", "public OOP_207(){\n\n }", "public Construct() {\n\tprefixes = new StringBuilder();\n\tvariables = new StringBuilder();\n\twheres = new StringBuilder();\n }", "public CSSTidier() {\n\t}", "public SubjectClass() {\n }", "public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }", "Cab(){\n\t\tSystem.out.println(\"Cab Object Constructed..\");\n\t}", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "public ObjectFactory() {\r\n\t}", "Car()\r\n\t{\r\n\t\tSystem.out.println(\"hello\");\r\n\t}", "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }", "public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}", "public Instance() {\n }", "Vehicle() \n {\n System.out.println(\"Constructor of the Super class called\");\n noOfTyres = 5;\n accessories = true;\n brand = \"X\";\n counter++;\n }", "@Test\n public void constructorTest() {\n // Given (cat data)\n String givenName = \"Zula\";\n Date givenBirthDate = new Date();\n Integer givenId = 0;\n\n // When (a cat is constructed)\n Cat cat = new Cat(givenName, givenBirthDate, givenId);\n\n // When (we retrieve data from the cat)\n String retrievedName = cat.getName();\n Date retrievedBirthDate = cat.getBirthDate();\n Integer retrievedId = cat.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "@Test\n public void constructorTest() {\n // Given (cat data)\n String givenName = \"Zula\";\n Date givenBirthDate = new Date();\n Integer givenId = 0;\n\n // When (a cat is constructed)\n Cat cat = new Cat(givenName, givenBirthDate, givenId);\n\n // When (we retrieve data from the cat)\n String retrievedName = cat.getName();\n Date retrievedBirthDate = cat.getBirthDate();\n Integer retrievedId = cat.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "public MoviesDatabase()\n {\n file = new FileOperation();\n menu = new Menu();\n validation = new Validation();\n }", "public Vehicle() {\n\n\t}", "public Human() { // has to be name of class — COnstuctor\n\t\t\n\t\tname = \"\";\n\t\tage = 0;\n\t\tSystem.out.println(\"CONSTRUCTOR HERE\");\n\t\t\n\t}", "public Excellon ()\n {}", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public Supercar() {\r\n\t\t\r\n\t}", "public City() {\n\t}", "public City() {\n\t}", "public Carrera(){\n }", "TypesOfConstructor(){\n System.out.println(\"This is default constructor\");\n }", "public Classroom() {\n\t}", "private TMCourse() {\n\t}", "defaultConstructor(){}", "public void init(){}", "public void constructor() {\n setEdibleAnimals();\n }", "public AbstractClass() { //Sobrecarga del constructor AbstractClass ya que se puede inicializar de 2 maneras\n }", "public Professor()\n\t{\n\t\t//stuff\n\t}", "public Odontologo() {\n }", "public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }", "public Curso() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }" ]
[ "0.7616191", "0.74267095", "0.6966295", "0.6913893", "0.68433034", "0.67776024", "0.6750942", "0.672654", "0.66847324", "0.66140866", "0.65507686", "0.6549021", "0.65422547", "0.6532212", "0.6516042", "0.6499885", "0.6498869", "0.64941984", "0.6493723", "0.6490978", "0.6487322", "0.64848185", "0.6483413", "0.6468945", "0.646842", "0.64625424", "0.6461798", "0.64546907", "0.6453452", "0.64376736", "0.6420971", "0.6414503", "0.64144665", "0.63956356", "0.6377264", "0.6359348", "0.6359348", "0.63353866", "0.63320696", "0.6331408", "0.6323947", "0.63168544", "0.6313437", "0.6309981", "0.6309981", "0.6301362", "0.6296879", "0.62942535", "0.6287893", "0.628159", "0.62806654", "0.6272832", "0.6272454", "0.6265159", "0.62601227", "0.62544996", "0.6254292", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397", "0.62542397" ]
0.0
-1
creating method to print out name, birth year, hometown + description no constructor as we are printing the instance variables.
public void introduceYourself() { System.out.println( // concatenated strings and variable names "My name is " + this.name + ", I am from " + this.homeTown + ". I was born in " + this.birthYear + " I am " + calculateAge() + " years old"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's VIN is \" + car.VIN + \" and it is make year is \" + car.year );\n\t\t\n\t}", "public String toString() {\n return(\"Name: \" + name + \"\\n\" + \"Year: \" + year);\n }", "public String toString() {\n\t\t\n\t\treturn \"Name: \" + this.name + \"\\n Birth Year: \" + birthYear;\n\t}", "public void printBorrowerDetails()\r\n {\r\n System.out.println( firstName + \" \" + lastName \r\n + \"\\n\" + address.getFullAddress()\r\n + \"\\nLibrary Number: \" + libraryNumber\r\n + \"\\nNumber of loans: \" + noOfBooks);\r\n }", "void printInfo() {\n\t\tdouble salary=120000;\n\t System.out.println(salary);\n\t\tSystem.out.println(name+\" \"+age);\n\t}", "@Override\n public String toString(){\n return String.format(\"%-8s %-8s %4d %7d %8.1f %s\",\n name, nationality, birthYear, yearsServed, height, validate());\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"age is \"+age+\" name is \"+name+\" weight is \"+weight+\" height is \"+height+\" \"\n\t\t\t\t+ \"date of birth is \"+dob;\n\t}", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"The author is \" + author + \" and the isbn is \" + isbn); \n }", "void printData()\n {\n System.out.println(\"Studentname=\" +name);\n System.out.println(\"Student city =\"+city);\n System.out.println(\"Student age = \"+age);\n }", "public void PrintAttributes()\n\t{\n\t\tSystem.out.println(\"Name: \"+ name);\n\t\tSystem.out.println(\"Address: \"+ address);\n\t\tSystem.out.println(\"Phone_Number: \"+ phoneNumber);\n\t\tSystem.out.println(\"Year_Built: \"+ yearBuilt);\n\t\tSystem.out.println(\"Price: \"+ price);\n\t\tSystem.out.println(\"Max_Residents: \"+ maxResidents);\n\t\tSystem.out.println(\"Catagory: \"+ catagory);\n\t\t\n\t\t//GetKeywords(); \n\t\tif(keywords.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Keywords\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor(int i = 0; i < keywords.size(); i++)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Keyword: \" + keywords.get(i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//GetAvailableDates(); \n\t\tif(openDates.size() == 0)\n\t\t{\n\t\t\tSystem.out.println(\"No Available Date\");\n\t\t}\n\t\tfor(int j = 0; j < openDates.size(); j++)\n\t\t{\n\t\t\tSystem.out.println(\"Available Date: \"+openDates.get(j).PrintDate());\n\t\t}\n\t}", "public String toString(){\n\t\treturn name + \", \" + country + \", \" + age;\n }", "void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}", "public void printOut(){\n\t\tSystem.out.println(\"iD: \" + this.getiD());\n\t\tSystem.out.println(\"Titel: \" + this.getTitel());\n\t\tSystem.out.println(\"Produktionsland: \" + this.getProduktionsLand());\n\t\tSystem.out.println(\"Filmlaenge: \" + this.getFilmLaenge());\n\t\tSystem.out.println(\"Originalsprache: \" + this.getOriginalSprache());\n\t\tSystem.out.println(\"Erscheinungsjahr: \" + this.getErscheinungsJahr());\n\t\tSystem.out.println(\"Altersfreigabe: \" + this.getAltersFreigabe());\n\t\tif(this.kameraHauptperson != null) {\n\t\t\tSystem.out.println( \"Kameraperson: \" + this.getKameraHauptperson().toString() );\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println( \"Keine Kameraperson vorhanden \");\n\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tif ( this.listFilmGenre != null) {\n\t\t\tfor( FilmGenre filmGenre: this.listFilmGenre ){\n\t\t\t\tSystem.out.println(\"Filmgenre: \" + filmGenre);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person darsteller: this.listDarsteller ){\n\t\t\tSystem.out.println(\"Darsteller: \" + darsteller);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person synchronSpr: this.listSynchronsprecher ){\n\t\t\tSystem.out.println(\"synchro: \" + synchronSpr);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Person regi: this.listRegisseure ){\n\t\t\tSystem.out.println(\"regi: \" + regi);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tfor( Musikstueck mstk: this.listMusickstuecke ){\n\t\t\tSystem.out.println(\"Musikstueck: \" + mstk);\n\t\t}\n\t\tSystem.out.println(\"----------------------------\");\n\t\tSystem.out.println(\"Datentraeger: \" + this.getDatentraeger());\n\t\tSystem.out.println(\"----------------------------\");\n\t}", "public String toString()\r\n\t{\r\n\t\treturn (name+\" \"+age+\" \"+college+\" \"+course+\" \"+address+\" \");\r\n\t}", "public void printDetails()\n {\n System.out.println(\"Name: \" + foreName + \" \"\n + lastName + \"\\nEmail: \" + emailAddress);\n }", "public String toString() {\n\t // added the Address here\n return String.format(\"%s, %s Hired: %s Birthday: %s \\n Address: %s\", \n lastName, firstName, hireDate, birthDate, Address);\n }", "public String toString(){\n return \"Title: \\\"\" + title + \"\\\", author: \" + author + \", (\" + year + \")\";\n }", "public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }", "@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }", "@Override\n\tpublic String toString() {\n\t\treturn name + \" \" + age;\n\t}", "public void display()\n\t{\n\t\tint [] dateDiff=new int[3];\n\t\tSystem.out.println(\"Name: \"+name);\n\t\tSystem.out.println(\"Date of birth: \"+dob);\n\t\tdateDiff=dob.age();\n\t\tSystem.out.println(\"Age: \"+dateDiff[2]+\" Years \"+dateDiff[1]+\" Months \"+dateDiff[0]+\" Days \");\n\t}", "public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}", "public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}", "@Override\r\n\tpublic void print() {\n\t\tsuper.print();\r\n\t\tSystem.out.println(\"album=\" + album + \", year=\" + year);\r\n\t}", "public void displayLable() {\n\t\tSystem.out.println(\"Name of Company :\"+name+ \" Address :\"+address);\r\n\t}", "public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }", "@Override\n public void information() {\n System.out.println(\"\");\n System.out.println(\"Dog :\");\n System.out.println(\"Age : \" + getAge());\n System.out.println(\"Name : \" + getName());\n System.out.println(\"\");\n }", "public String toString(){\n return \"Available information for this student: \" + fname + \" \" + lname + \", \" + college + \", \"\n + major + \" major, GPA: \" + gpa;\n }", "@Override\n\tpublic String toString() {\n\t\treturn name+\" \"+age;\n\t}", "public String toString(){\r\n return year + \" \" + startCity + \" \" + endCity + \" \" + price + \" \" + distance;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"\\ntoStringcalled\\t\"+name+\"\\t\"+age+\"\\t\"+salary;\n\t}", "public void showInfo()\n\t{\n\t\tSystem.out.println(\"Account Number : \"+getAccountNumber());\n\t\tSystem.out.println(\"Balance : \"+getBalance());\n\t\tSystem.out.println(\"Tenure Year : \"+tenureYear);\n\t}", "public String toString() {\n return title + \" \" + firstName + \" \" + lastName;\n }", "public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }", "@Override\n public String toString() {\n return this.title + \" (\" + this.author.getName() + \"), \" + this.year;\n }", "public String toString(){\n return \"Name: \" +name+\", School Name: \"+school;\n }", "public static void nameAndAddress () {\n\t\tSystem.out.println(\"Andrew Meiling\");\n\t\tSystem.out.println(\"224 South Dennis Ave\");\n\t\tSystem.out.println(\"Republic, MO 65738\");\n\t}", "@Override\n public String toString(){\n return name + \":\" + age;\n }", "public void printDetails()\n {\n super.printDetails();\n System.out.println(\"Body type: \" + bodyType + \" Number of doors: \" + noOfDoors + \" Number of seats: \" + noOfSeats);\n System.out.println();\n }", "@Override\n public String print(){\n String ret = super.print();\n ret += \"\\nYears Until Tenure: \" + m_yearsUntilTenure;\n return ret;\n }", "public String toString(){\n return getfName() +\"\\n\" + getlName() + \"\\n\" + getSsn() + \"\\n\" + getBday() + \"\\n\" + getGender();\n }", "public void print() {\n super.print();\r\n System.out.println(\"Hourly Wage: \" + hourlyWage);\r\n System.out.println(\"Hours Per Week: \" + hoursPerWeek);\r\n System.out.println(\"Weeks Per Year: \" + weeksPerYear);\r\n }", "public String toString () {\r\n\t\treturn (\"\\nName: \" + this.getName()\r\n\t\t\t\t+\"\\nNationality: \" + this.getCountryName()\t\t\r\n\t\t\t\t+\"\\nAge: \"+ this.dob.playerAge() +\" years old \"+ this.getDob() \r\n\t\t\t\t+\"\\nCurrent team:\" + this.getClubName() \r\n\t\t\t\t+\"\\nPosition: Forward\" \r\n\t\t\t\t+\"\\nGames Played: \" + this.getGamesPlayed()\r\n\t\t\t +\"\\nGoals Scored: \" + this.getGoalsScored()\r\n\t\t +\"\\nGoals Assisted: \" + this.getNumAssists ()\r\n\t\t +\"\\nGoals Shot on Target: \" + this.getShotsOnTarget ()\r\n\t\t\t +\"\\nCautions:\"\r\n\t\t\t\t+\"\\nYellow Cards: \" + this.getNumYellowCards()\r\n\t\t\t\t+\"\\nRed Cards: \" + this.getNumRedCards()\r\n\t\t );\r\n\r\n\t\t}", "public static void outputRecord() {\r\n System.out.println(\"First Name: Len\");\r\n System.out.println(\"Last Name: Payne\");\r\n System.out.println(\"College: Lambton College\");\r\n }", "@Override\n\tpublic String toString() {\n\t\tStringBuffer result = new StringBuffer();\n\t\t\n\t\tresult.append(\"orderYear:\" + this.orderYear);\n\t\tresult.append(\"clashDate:\" + this.clashDate);\n\t\tresult.append(\"clashBirthYear:\" + this.clashBirthYear);\n\t\tresult.append(\"name:\" + this.name);\n\t\tresult.append(\"householder:\" + this.householder);\n\t\t\n\t\treturn result.toString();\n\t}", "public String toString(){\n return ( \"\\nName: \" + name \n + \"\\nPhone Number: \" + phoneNumber\n + \"\\nAge: \" + age \n + \"\\nWeight: \" + weight );\n }", "public void printDetails()\n {\n System.out.println(title);\n System.out.println(\"by \" + author);\n System.out.println(\"no. of pages: \" + pages);\n \n if(refNumber == \"\"){\n System.out.println(\"reference no.: zzz\");\n }\n else{\n System.out.println(\"reference no.: \" + refNumber);\n }\n \n System.out.println(\"no. of times borrowed: \" + borrowed);\n }", "public String printDetails(){\n System.out.println(\"This is the Title of the book:\");\n return title;\n System.out.println(\"This is the Author of the book:\");\n return author;\n System.out.println(\"This is how many pages there are:\");\n return pages;\n System.out.println(\"This is the Ref Number:\");\n return refNumber;\n \n }", "public String toString () {\r\n\t\t\r\n\t\treturn \"Title: \"+this.title +\", Company: \"+company+\", Annual Salary: \"+annualSalary;\r\n\t}", "public void print()\n {\n System.out.println(name + \"\\n\");\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n System.out.println((iterator+1) +\". \" + bookList.get(iterator).getTitle()+\" by \" +bookList.get(iterator).getAuthor()); \n }\n }", "public void display(){\r\n System.out.println(\"_____________________valuues of__[th]__constuctor_________________________\");\r\n System.out.println(\"No_of_people = \"+NO_OF_PEOPLE);\r\n System.out.println(\"EVENT_NUBMBER = \"+EVENT_NUMBER);}", "public String toString() {\n return this.title + \"(\" + this.year + \")\\n\\t\" +\n \"Author: \" + this.author + \"\\n\\t\" +\n \"Pg. \" + this.pagesRead + \"/\" + this.pages;\n }", "@Override\n public String toString() {\n return \"Name: \" + firstName + \"\\n\" + \"Lastname: \" + lastName;\n \n }", "public String toString(){\n\t\tString personInfo = \"First Name: \" + this.firstName + \" Last Name: \" + this.lastName;\n\t\t\n\t\treturn personInfo;\n\t}", "public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }", "@Override\r\n public String toString() {\r\n return \"Biography [Author's First Name: \"+this.getAuthorFirstName()+\", Author's Last Name: \"+this.getAuthorLastName()+\", \" +\r\n \"Book Title: \"+this.getBookTitle()+\", Published Year: \"+this.getPublishedYear()+\", Subject: \"+this.getSubject()+\"]\";\r\n }", "public static void main(String[] args) {\n\t\tPerson_19 p = new Person_19(\"Taeyong\", \"Itaewon\", \"0123456789\", \"tyong@gmail.com\");\r\n\t\tStudent_19 s = new Student_19(\"Taeyong\", \"Itaewon\", \"0123456789\", \"tyong@gmail.com\",\"senior\"); //zaplata\r\n\t\tEmployee_19 e = new Employee_19(\"Jackson\", \"Trimage\", \"0123456789\", \"jcks@gmail.com\",\"office 7\", 1000, \"11:00-18:00\");\r\n\t\tFaculty_19 f = new Faculty_19(\"Jungkook\", \"Gangnam\", \"0123456789\", \"jk@gmail.com\",\"office 7\", 666, null, \"11:00-18:00\", 1);\r\n\t\tStaff_19 st = new Staff_19(\"Taeyong\", \"Itaewon\", \"0123456789\", \"tyong@gmail.com\",\"office 23\", 1234, null, \"11:00-18:00\");\r\n\t\tSystem.out.println(p.toString());\r\n//\t\tSystem.out.println();\r\n\t\tSystem.out.println(s.toString());\r\n//\t\tSystem.out.println();\r\n\t\tSystem.out.println(f.toString());\r\n//\t\tSystem.out.println();\r\n\t\tSystem.out.println(st.toString());\r\n\t\tSystem.out.println(e.toString());\r\n\t}", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public String toString(){\r\n String details = \"Name: \" + name + \" Monthly Salary: \" + monthlySalary;\r\n return details; \r\n }", "@Override\n\tpublic String toString() {\n\t\treturn name + \" \" + age + \" \" + sex;\n\t}", "@Override\n public /*final*/ String toString() {\n return name + \" / \" + address + \" / \" + salary;\n }", "@Override\n\tpublic String toString() {\n\t\tSystem.out.println(\"_____Fiction Book_____\");\n\t\treturn \"Title :\" + getTitle() + \"\\nPrice :$\" + getPrice() + \"\\n\";\n\t}", "public String toString()\n\t{\n\t\tString ret = \"I am a \" + age + \" year old \";\n\t\tif (gender == 'M' || gender == 'm')\n\t\t\tret += \"male \";\n\t\telse\n\t\t\tret += \"female \";\n\t\tret += \"and my name is \" + firstName + \" \" + lastName + \".\";\n\t\t\n\t\tret += \" Also, b/c I trust you, my SSN is \" + getSsnString(\"password123\") + \".\";\n\t\t\n\t\treturn ret;\n\t}", "public void printAnnuaireName() {\n\t\t\n\t}", "void display() {\n System.out.println(id + \" \" + name + \" \" + age);\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 void printDetails() {\n System.out.println(\"Name: \" + getFirstName() + \" \" + getLastName());\n System.out.println(\"Height: \" + getHeight() + \" inches\");\n System.out.println(\"Weight: \" + (int) getWeight() + \" pounds\");\n\n // unary, binary, ternary(3)\n // ternary operator\n String travelMessage = canTravel ? \"Does travel\" : \"Does not travel\";\n System.out.println(travelMessage);\n\n String smokeMessage = smokes ? \"Does smoke\" : \"Does not smoke\";\n System.out.println(smokeMessage);\n\n // ternary operators can replace simple if-else statement\n // System.out.print(\"Does \");\n // if (!isCanTravel())\n // System.out.print(\"not \");\n // System.out.println(\"travel\");\n // System.out.print(\"Does \");\n // if (!isSmokes())\n // System.out.print(\"not \");\n // System.out.println(\"smoke\");\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 }", "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 String toString(){\n\t\treturn this.title+\" av \"+this.painter+\", \"+this.year;\n\t\t\n\t}", "void printCarInfo();", "@Override\n public String toString() {\n return bookName + \"-\" + authorName;\n }", "@Override\n public String toString(){\n return (\"firstName:\"+getFirstName()+\" lastName:\"+getLastName()+\" Social Insurance Number:\"+getSocialInsuranceNumber());\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 toString() {\r\n\t\treturn \"\\n\\tName: \" + lastName + \", \" + firstName;\r\n\t}", "@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }", "public String toString() { return \"StudentYear: ...\"; }", "public String toString(){\r\n String text = String.format(\"%-20s %s %-20s %d\", \"Undergrad Student: \", super.toString(), \"\\n\\tYear level:\", getYearLevel());\r\n return text;\r\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"我叫\"+this.getName()+\"今年\"+this.getAge()+\"岁\" ;\r\n\t}", "public String toString(){\n \n \t\t return \"make:\"+this.make+\" ,model:\"+this.model+\",year:\"+this.year+\",Mileage\"+this.mileage;\n\t}", "public String fomatToPrint() {\n\t\treturn String.format(FORMAT_FOR_PRINT, author, ibn, year);\n\t}", "@Override\n public String toString(){\n \n String result = (year + \" \" + preTB + \" \" + postTB + \" \" + Total + \"\\n\");\n return result;\n }", "public void print() {\n System.out.println(\"Person of name \" + name);\n }", "public void printDetails() {\r\n\t\tSystem.out.println(\" \");\r\n\t\tSystem.out.println(showtimeId + \" \" + movie.getTitle() + \" starts at \" + startTime.toString());\r\n\t}", "public String toString()\n\t{\n\t\treturn \"Given Name: \" + givenName + \"\\t\" + \"Surname: \" + surname + \"\\t\" + \"Street Address: \" + streetAddress + \"\\t\" + \"City: \" + city + \"\\t\" + \"State: \" + state + \"\\t\" + \"Zip Code: \" + zipCode + \"\\t\" + \"Blood Type: \" + bloodType + \"\\t\" + \"Rhesus Factor: \" + rhesus + \".\";\n\t}", "@Override\n public String getInfo() {\n return \"Car:\\n\" + \"\\tBrand: \" + getBrand() + \"\\n\" + \"\\tModel: \" + getModel() + \"\\n\"\n + \"\\tRegistration Number: \" + getRegistrationNumber() + \"\\n\"\n + \"\\tNumber of Doors: \" + getNumberOfDoors() + \"\\n\"\n + \"\\tBelongs to \" + owner.getName() + \" - \" + owner.getAddress();\n }", "public String toString() { return \"Name: \" + firstName + ' ' + lastName + \"\\tGrade: \" + grade; }", "public String toString()\n {\n String str = \"The specs of this book are: \";\n str += \"\\n\\t Title: \" + title;\n str += \"\\n\\t Author: \" + author;\n \n return str;\n }", "@Override public String toString(){\n\t\treturn String.format(\"%s %s %s\", firstName, middleName, lastName);\n\t}", "public String toString() {\n return getName() + \", \" + getAuthor() + \", \" + getPrice();\n }", "public String toString(){\n return \"Name: \"+this.name+\" Salary: \"+this.salary; // returning emp name and salary\r\n }", "public String toString(){\n\n\t\t/*\n\t\t *Puts the rental and due dates into two nicely formated\n\t\t *Strings.\n\t\t */\n\t\tdf.setCalendar(bought);\n\t\tString jazz = df.format(bought.getTime());\n\t\tdf.setCalendar(boughtReturn);\n\t\tString jazz2 = df.format(boughtReturn.getTime());\n\n\t\t/*\n\t\t * Returns the components of the DVD class. Categories are \n\t\t * highlighted in red using html codes.\n\t\t */\n\t\treturn \"<html><font color='red'>Name: </font>\" + \n\t\t getNameofRenter() + \", <font color='red'>Title: </font>\" + \n\t\tgetTitle() + \", <font color='red'>Rented On: </font>\"+ jazz + \n\t\t\", \" + \"<font color='red'>Due Back On: </font>\"+ jazz2;\n\n\t}", "public String toString(){\n return name + \"|Pop: \" + pop + \"|Gdp: \" +gdp + \"|Social: \" +social + \"|Living: \" + living;\n }", "public String toString(){\r\n return super.toString() + \"\\nYearly Salary: \" + salary;\r\n }", "public void printUser() {\n\t\tSystem.out.println(\"First name: \" + this.firstname);\n\t\tSystem.out.println(\"Last name: \" + this.lastname);\n\t\tSystem.out.println(\"Age: \" + this.age);\n\t\tSystem.out.println(\"Email: \" + this.email);\n\t\tSystem.out.println(\"Gender: \" + this.gender);\n\t\tSystem.out.println(\"City: \" + this.city);\n\t\tSystem.out.println(\"State: \" + this.state + \"\\n\");\n\t}", "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 toString() {\n\t\treturn \"Name : \" + getName() + \", level : \" + level + \", Dni : \" + getDni()\n\t\t + \", Age : \" + getAge() \n\t\t + super.toString()+\"\\n\";\n\t}", "public String toString() {\r\n\t\treturn \"Name: \" + name + \"\\nAddress: \" + addr + \"\\n\" + city + \"\\n\"\r\n\t\t\t\t+ state + \"\\n\" + zip + \"\\nPhone: \" + phone + \"\\nId: \" + id\r\n\t\t\t\t+ \"\\nMajor: \" + major + \"\\nGPA: \" + gpa;\r\n\t}", "public String toString() {\n return getFirstName() + \" \" + getLastName() + \" \" + getEmail() + \" \" + getPhone() + \" \" + getAffiliate();\n }" ]
[ "0.71845484", "0.71734506", "0.71382284", "0.70813006", "0.7067713", "0.6980432", "0.6973758", "0.69405925", "0.6937054", "0.6929009", "0.69180906", "0.6902271", "0.6814145", "0.6800957", "0.67826664", "0.67821753", "0.67747015", "0.6773761", "0.67664534", "0.67233956", "0.67203236", "0.66917485", "0.66576517", "0.665237", "0.66303587", "0.66247064", "0.66245097", "0.6609682", "0.6603849", "0.66013193", "0.6583922", "0.65618134", "0.65616125", "0.6557824", "0.65565497", "0.65540576", "0.6543723", "0.65434974", "0.6518277", "0.64949214", "0.6492563", "0.64882815", "0.64818686", "0.6478006", "0.6471059", "0.64631206", "0.6461246", "0.6460785", "0.64507", "0.645041", "0.6447151", "0.6445867", "0.6424695", "0.64178854", "0.6405526", "0.6398216", "0.639577", "0.6395003", "0.6379613", "0.63732374", "0.63720876", "0.6370012", "0.63584113", "0.6353914", "0.6351211", "0.6350147", "0.63376915", "0.63305736", "0.63290864", "0.63273096", "0.63102543", "0.63025624", "0.62975013", "0.62970066", "0.6287411", "0.6282745", "0.62818277", "0.6271919", "0.6268503", "0.62567556", "0.6245344", "0.62359864", "0.622875", "0.6223067", "0.622252", "0.62167686", "0.621548", "0.6214385", "0.6212148", "0.6210651", "0.62106246", "0.6209079", "0.62065566", "0.61896175", "0.6186303", "0.6184547", "0.6179756", "0.61788625", "0.6178032", "0.6174499" ]
0.63530165
64
private function as it is used in the same class. It is not needed in any other class.
private int calculateAge() { return LocalDate.now().getYear() - this.birthYear; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private Rekenhulp()\n\t{\n\t}", "public final void mo51373a() {\n }", "private void m50366E() {\n }", "protected boolean func_70814_o() { return true; }", "public void method_4270() {}", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private Util() { }", "private Unescaper() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "protected Doodler() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private NativeSupport() {\n\t}", "public void smell() {\n\t\t\n\t}", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\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 protected void initialize() {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private void kk12() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "@Override\n protected void init() {\n }", "protected boolean func_70041_e_() { return false; }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "private FlyWithWings(){\n\t\t\n\t}", "private void strin() {\n\n\t}", "private Utils() {\n\t}", "private Utils() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void m23075a() {\n }", "private UtilsCache() {\n\t\tsuper();\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n protected void initialize() \n {\n \n }", "public abstract void mo56925d();", "@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 static void SelfCallForLoading() {\n\t}", "private TMCourse() {\n\t}", "private void init() {\n\n\t}", "protected void init() {\n // to override and use this method\n }", "public final void mo91715d() {\n }", "private Singletion3() {}", "public static void thisMethod() {\n }", "public abstract void mo70713b();", "private void m50367F() {\n }", "private test5() {\r\n\t\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private PrngFixes() {\n }", "@Override\n public void init() {\n\n }", "protected void h() {}", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "private SnapshotUtils() {\r\n\t}", "@Override\n void init() {\n }", "private EncryptionUtility(){\r\n\t\treturn;\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 public void init() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "private XhtmlUtils()\n\t{\n\t}", "void m1864a() {\r\n }", "private CollectionUtils() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private ProcessorUtils() { }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "private StringUtilities() {\n // nothing to do\n }", "@Override\n\tpublic void anular() {\n\n\t}", "private ControlloFile() {\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "protected void mo6255a() {\n }", "private void _init() {\n }", "protected void _init(){}", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "private Infer() {\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 tires() {\n\t\t\r\n\t}", "private Util() {\n }" ]
[ "0.68812364", "0.6279464", "0.6247597", "0.6247597", "0.6224738", "0.6195021", "0.6189289", "0.61354756", "0.6117386", "0.60744697", "0.6054416", "0.60488427", "0.5991083", "0.59816355", "0.5966875", "0.5907934", "0.5887122", "0.5875844", "0.5867288", "0.5862794", "0.5858605", "0.5856591", "0.5856582", "0.58525324", "0.5851934", "0.58479404", "0.58410263", "0.58410263", "0.58410263", "0.58410263", "0.58410263", "0.58410263", "0.57863045", "0.5772445", "0.57723516", "0.57723516", "0.57723516", "0.57723516", "0.57696354", "0.5756184", "0.5753834", "0.5753834", "0.57430375", "0.5740191", "0.5723314", "0.5723314", "0.5717936", "0.5712255", "0.5710201", "0.57022154", "0.5696825", "0.56926644", "0.56859845", "0.56859845", "0.5682916", "0.5678241", "0.5677529", "0.56772995", "0.56658375", "0.56654084", "0.56614566", "0.56561625", "0.565565", "0.5649252", "0.5639522", "0.5632069", "0.5631058", "0.5629618", "0.5625727", "0.5624906", "0.5621924", "0.56215227", "0.5620378", "0.56170297", "0.5613822", "0.5613822", "0.56114167", "0.56101954", "0.5609993", "0.56051755", "0.5604474", "0.5602151", "0.56021243", "0.56011117", "0.5598732", "0.55972564", "0.55961096", "0.5592611", "0.5591388", "0.5591382", "0.5591382", "0.558863", "0.55812156", "0.55657923", "0.55654466", "0.5561324", "0.55589104", "0.55583405", "0.55583405", "0.55577475", "0.5556128" ]
0.0
-1
TODO Autogenerated method stub
@Override public int queryMsgCount(Object object, int minPrice, int maxPrice, int minDis, int maxDis, int minAge, int maxAge) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public List<Object> showMsgInfoList(int curPage, int rowsPrePage, Object object, String order, int minPrice, int maxPrice, int minDis, int maxDis, int minAge, int maxAge) { return null; }
{ "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 elion on 24/01/16.
public interface AdminMainEntity { public static final String MAIN_ENTITY_NAME_PROPERTY = "__adminMainEntity"; public String getMainEntityName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@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 public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\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\tpublic void anular() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void m50366E() {\n }", "public void mo38117a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void init() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@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 getExras() {\n }", "@Override\n void init() {\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 protected void initialize() {\n }", "@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 initialize() {\n\n \n }", "@Override\n\tpublic void einkaufen() {\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 initialize() {\n\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\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "private void strin() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\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}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void method_4270() {}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public void mo12628c() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "protected void mo6255a() {\n }", "public void mo6081a() {\n }", "public abstract void mo70713b();", "@Override\r\n\tprotected void initialize() {\n\r\n\t}" ]
[ "0.59351104", "0.58251554", "0.57573754", "0.57494926", "0.57283026", "0.5703902", "0.5703902", "0.56492186", "0.5624646", "0.5607486", "0.56007385", "0.56006515", "0.55949044", "0.558321", "0.55826765", "0.556789", "0.5550926", "0.55377865", "0.55377865", "0.55377865", "0.55377865", "0.55377865", "0.5529508", "0.55244976", "0.5521565", "0.5520077", "0.5517151", "0.54996365", "0.5485262", "0.5483331", "0.54731387", "0.5472237", "0.5455953", "0.5453398", "0.5453398", "0.54387164", "0.54258156", "0.5417058", "0.54168963", "0.5416775", "0.54128945", "0.540839", "0.5407539", "0.54061896", "0.5391788", "0.5385508", "0.53822786", "0.5377662", "0.5377662", "0.5377662", "0.53740335", "0.5374004", "0.53732234", "0.53732234", "0.53732234", "0.53732234", "0.53732234", "0.53732234", "0.537103", "0.537103", "0.537103", "0.53688866", "0.5348284", "0.5341781", "0.5341781", "0.5341781", "0.53417265", "0.5341283", "0.5330564", "0.5330564", "0.5330564", "0.5330564", "0.5330564", "0.5330564", "0.5330564", "0.53259736", "0.5324553", "0.5324553", "0.5321766", "0.5314607", "0.53031385", "0.5299041", "0.5298805", "0.52986366", "0.52969533", "0.52969533", "0.52917314", "0.5287843", "0.5266809", "0.5266577", "0.5265789", "0.5261131", "0.5257407", "0.525223", "0.5233217", "0.52249265", "0.52249265", "0.52173686", "0.52169824", "0.52153945", "0.5215168" ]
0.0
-1
Get days based on user ID
@Query("SELECT d FROM Day d WHERE user_id = ?1") List<Day> getByUserID(Integer id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Day> getDays(String userName);", "Integer getDaysSpanned();", "@Override\n\tpublic List<PatientSeanceDays> findByUserLike(User user) {\n\t\treturn repository.findByUserLike(user);\n\t}", "public void getUsersByDays() throws IOException, SystemException {\n List<UserSubscribeDTO> usersList = planReminderService.getUsersByDays();\n LOGGER.info(\"userLIst Recievec:\" + usersList);\n shootReminderMails(usersList);\n }", "@Override\n\tpublic List<DailyData> getDaywiseFood(int username) {\n\t\treturn mobileDao.getFoodData(username);\n\t}", "public static Task<DocumentSnapshot> getUserDates(String userId) {\n Log.d(Const.TAG, \"getUserDatesForCal: \" + Thread.currentThread().getId());\n return FirebaseFirestore.getInstance()\n .collection(Const.USERS_COLLECTION)\n .document(userId)\n .get();\n }", "@Query(\"SELECT d FROM Day d WHERE date = ?1 and user_id = ?2\")\n Optional<Day> getByUserIDAndDate(LocalDate date, Integer id);", "int getNumberDays();", "public ArrayList<PomoDaily> getDaily(String userId) {\r\n PomoServer server = new PomoServer();\r\n String parameters = PomoServer.MODE_SELECT + \"&\" + \"userid=\" + userId;\r\n String url = PomoServer.DOMAIN_URL + PomoServer.SERVLET_DAILY;\r\n String data = server.get(url, parameters);\r\n ArrayList<PomoDaily> list = new ArrayList<>();\r\n if (data.equals(\"0\")) {\r\n return list;\r\n }\r\n String[] dailies = data.split(\";\");\r\n for (String d : dailies) {\r\n String[] attributes = d.split(\"&\");\r\n String id = attributes[0];\r\n String date = attributes[1];\r\n int plan = Integer.parseInt(attributes[2]);\r\n list.add(new PomoDaily(id, date, plan, userId));\r\n }\r\n return list;\r\n }", "public long getDays() {\r\n \treturn days;\r\n }", "@Override\n\tpublic User getUserDt(int id) {\n\t\treturn userdao.getUserDt(id);\n\t}", "public void getDaysEvents(int userid, int day, int month, int year) {\r\n\t\t// Populate DaysEventsListIDs, DaysEventsListStartHour, DaysEventsListStopHour, DaysEventsListStartMin, DaysEventsListStopMin, DaysEventsListTitles\r\n\t\teventList.clear();\r\n\t\tEventList myEvent = new EventList();\r\n\t\ttry {\r\n\t\t Statement statement = connection.createStatement();\r\n\t\t statement.setQueryTimeout(30); // set timeout to 30 sec.\r\n\t\t ResultSet rs = statement.executeQuery(\r\n\t\t \t\t \"select id, starthour, startmin, stophour, stopmin, title, details from events where userid = \" + userid\r\n\t\t \t\t + \" and day = \" + day\r\n\t\t \t\t + \" and month = \" + month\r\n\t\t \t\t + \" and year = \" + year\r\n\t\t \t\t + \" order by starthour, startmin\");\r\n\t\t while(rs.next())\r\n\t\t {\r\n\t\t \tmyEvent = new EventList();\r\n\t\t // read the result set\r\n\t\t \tmyEvent.eid = rs.getInt(\"id\");\r\n\t\t \tmyEvent.starthour = rs.getInt(\"starthour\");\r\n\t\t \tmyEvent.startmin = rs.getInt(\"startmin\");\r\n\t\t \tmyEvent.stophour = rs.getInt(\"stophour\");\r\n\t\t \tmyEvent.stopmin = rs.getInt(\"stopmin\");\r\n\t\t \tmyEvent.title = rs.getString(\"title\");\r\n\t\t \tmyEvent.details = rs.getString(\"details\");\r\n\t\t \teventList.add(myEvent);\r\n\t\t }\r\n\t\t\t}\r\n\t\t catch(SQLException e)\r\n\t\t {\r\n\t\t // if the error message is \"out of memory\", \r\n\t\t // it probably means no database file is found\r\n\t\t System.err.println(e.getMessage());\r\n\t\t \r\n\t\t }\r\n\t\t\r\n\t\t//Query DB to get those details.\r\n\t}", "long getTermDays();", "public int getUDays() {\n return uDays;\n }", "double getAgeDays();", "List<Day> findDaysByPerson(Long person);", "@Override\n\tpublic int getDaysSinceLastLogin() {\n\t\tDate now = sabre.getTimeNow();\n\t\tlong timeDiff = now.getTime() - lastLogin.getTime();\n\t\tlong diffDays = TimeUnit.DAYS.convert(timeDiff, TimeUnit.MILLISECONDS);\n\t\treturn (int)diffDays;\n\t}", "public int getDays(){\r\n\t\treturn days;\r\n\t}", "public int getDays() {\n return this.days;\n }", "public abstract SortedSet<CalendarEvent> getEventsAt(User user, Date day);", "Integer getDay();", "private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}", "public ObservableList<Date> getStudentDays(int studentID);", "public int getIDays() {\n return iDays;\n }", "public abstract CalendarEvent getEventById(User user, String id);", "@SuppressWarnings(\"deprecation\")\n\t@RequestMapping(value = \"get_number_of_registred_users\", method = { RequestMethod.GET })\n\tpublic int getNumberOfRegistredUsers(@RequestParam(\"days\") int days) throws IOException {\n\t\tSystem.out.println(days + \"\");\n\t\tint result = 0;\n\t\tMongoClient mongoClient = null;\n\t\ttry {\n\t\t\t// Create the date before n days\n\t\t\tDate startDate = new Date();\n\t\t\tstartDate.setDate(startDate.getDate() - days);\n\t\t\tstartDate.setHours(0);\n\t\t\tstartDate.setMinutes(0);\n\t\t\tstartDate.setSeconds(0);\n\n\t\t\t// Create Mongo client\n\t\t\tmongoClient = new MongoClient(\"localhost\", 27017);\n\t\t\tMongoDatabase db = mongoClient.getDatabase(\"projectDB\");\n\n\t\t\t// Create Users collection\n\t\t\tMongoCollection<Document> collection = db.getCollection(\"USERS\");\n\n\t\t\t// Get all user before n days\n\t\t\tFindIterable<Document> iterDoc = collection.find(gt(\"RegistrationDate\", startDate));\n\t\t\tIterator it = iterDoc.iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tit.next();\n\t\t\t\tresult++;\n\t\t\t}\n\n\t\t\t// Close DB connection\n\t\t\tmongoClient.close();\n\n\t\t} catch (Exception e) {\n\t\t\tmongoClient.close();\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn result;\n\n\t}", "Date computeDays(Date d, int days){\n d.setTime(d.getTime() + days*1000*60*60*24);\n return d;\n }", "public Response getSingleUserData(int userId, int day) throws ClientErrorException {\n return client.target(url).path(\"single/\" + userId + \"/\" + day).request(TEXT_PLAIN).get();\n }", "public int getLBR_CollectionReturnDays();", "public int daysOverdue(int today);", "@Query(\"select reportJournal_ \"\r\n\t\t\t+ \"from ReportJournal reportJournal_ \"\r\n\t\t\t+ \"where reportJournal_.id in (\"\r\n\t\t\t\t+ \" select max(r_.id) \"\r\n\t\t\t\t+ \" from ReportJournal r_ \"\r\n\t\t\t\t+ \" where r_.user.id = ?1 \"\r\n\t\t\t\t+ \" group by r_.report.id, r_.reportJournalType, r_.day) \"\r\n\t\t\t+ \"and reportJournal_.issueDate between ?2 and ?3 \"\r\n\t\t\t+ \"order by reportJournal_.eventDate DESC, reportJournal_.reportJournalType ASC \")\r\n\tList<ReportJournal> findGroupByDay(int userId, Date start, Date end);", "public static int getDaysFromNow(Date date) throws Exception{\n\n if(date != null) {\n Days daysbetween = Days.daysBetween(new DateTime(date.getTime()), new DateTime().now());\n return daysbetween.getDays();\n }\n else\n throw new Exception();\n }", "public int getEDays() {\n return eDays;\n }", "io.dstore.values.TimestampValue getDay();", "public Integer getTotalDays()\r\n/* 68: */ {\r\n/* 69:67 */ return this.totalDays;\r\n/* 70: */ }", "public void setupDays() {\n\n //if(days.isEmpty()) {\n days.clear();\n int day_number = today.getActualMaximum(Calendar.DAY_OF_MONTH);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEEE\");\n SimpleDateFormat sdfMonth = new SimpleDateFormat(\"MMM\");\n today.set(Calendar.DATE, 1);\n for (int i = 1; i <= day_number; i++) {\n OrariAttivita data = new OrariAttivita();\n data.setId_utente(mActualUser.getID());\n\n //Trasformare in sql date\n java.sql.Date sqldate = new java.sql.Date(today.getTimeInMillis());\n data.setGiorno(sqldate.toString());\n\n data.setDay(i);\n data.setMonth(today.get(Calendar.MONTH) + 1);\n\n data.setDay_of_week(today.get(Calendar.DAY_OF_WEEK));\n Date date = today.getTime();\n String day_name = sdf.format(date);\n data.setDay_name(day_name);\n data.setMonth_name(sdfMonth.format(date));\n\n int indice;\n\n if (!attivitaMensili.isEmpty()) {\n if ((indice = attivitaMensili.indexOf(data)) > -1) {\n OrariAttivita temp = attivitaMensili.get(indice);\n if (temp.getOre_totali() == 0.5) {\n int occurence = Collections.frequency(attivitaMensili, temp);\n if (occurence == 2) {\n for (OrariAttivita other : attivitaMensili) {\n if (other.equals(temp) && other.getCommessa() != temp.getCommessa()) {\n data.setOtherHalf(other);\n data.getOtherHalf().setModifica(true);\n }\n }\n\n }\n }\n data.setFromOld(temp);\n data.setModifica(true);\n }\n }\n isFerie(data);\n\n\n //Aggiungi la data alla lista\n days.add(data);\n\n //Aggiugni un giorno alla data attuale\n today.add(Calendar.DATE, 1);\n }\n\n today.setTime(actualDate);\n\n mCalendarAdapter.notifyDataSetChanged();\n mCalendarList.setAdapter(mCalendarAdapter);\n showProgress(false);\n }", "public void calculateVacationDays(){\n }", "private long daysBetween() throws ParseException {\n Scanner input = new Scanner(System.in);\n System.out.println(\"Enter the date of when you rented the game dd/MM/yyyy:\");\n String dateReturn = input.nextLine();\n Date date = new SimpleDateFormat(\"dd/MM/yyyy\").parse(dateReturn);\n long interval = new Date().getTime() - date.getTime();\n return TimeUnit.DAYS.convert(interval, TimeUnit.MILLISECONDS);\n }", "List<Integer> getIdUsersWithExpiredLifeTimeList( Timestamp currentTimestamp );", "@Override\n\tpublic List<Integer> usersDate(String fecha) {\n\t\treturn controlA.usersDate(fecha);\n\t}", "@Override\n\tpublic List<DailyData> getFoodData(String username, String date) {\n\t\treturn mobileDao.getFoodData(username,date);\n\t}", "public Integer getPresentDays()\r\n/* 48: */ {\r\n/* 49:51 */ return this.presentDays;\r\n/* 50: */ }", "public int activeDays() {return activeDay;}", "public int getNumberOfDays() {\n return numberOfDays;\n }", "public java.util.List<DataEntry> findByUserId(long userId);", "public List<UserAttendance> getDayAttendance(Date[] dates, SysUser sysUser) {\n return findByQuery(\"from UserAttendance where (checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=? or checkdate=?) and user.id=? and type is not null order by checkdate, noon\",\n dates[0], dates[1], dates[2], dates[3], dates[4], dates[5], dates[6], sysUser.getId());\n }", "io.dstore.values.TimestampValue getToDay();", "public long daysToDeadline() {\n return DateWrapper.getTimeBetween(Clock.now().getDateWrapper(), getDate(), ChronoUnit.DAYS);\n }", "public int getNumDaysForComponent(Record record);", "public int daysBetween(Day day)\n\t{\n\t\tlong millisBetween = Math.abs(this.getDayStart(TimeZoneEx.GMT).getTime() - day.getDayStart(TimeZoneEx.GMT).getTime());\n\t\treturn (int) Math.round((float) millisBetween / (1000F * 60F * 60F * 24F));\n\t}", "public static ArrayList<Integer> getAllDareIdForUser(String userId) {\n\n Connection conn = null;\n Statement statement = null;\n ResultSet resultFromQuery = null;\n\n ArrayList<Integer> dareId = new ArrayList<>();\n\n try {\n Class.forName(\"org.sqlite.JDBC\");\n String path = \"jdbc:sqlite:lib/dare_n_share.db\";\n conn = DriverManager.getConnection(path);\n\n\n String query = \"SELECT DareId from Participants where UserId='\" + userId + \"';\";\n statement = conn.createStatement();\n statement.execute(query);\n\n resultFromQuery = statement.getResultSet();\n while (resultFromQuery.next()) {\n int dare = resultFromQuery.getInt(\"DareId\");\n dareId.add(dare);\n }\n\n } catch (ClassNotFoundException | SQLException e) {\n e.printStackTrace();\n } finally {\n try { if (resultFromQuery != null) resultFromQuery.close(); } catch (Exception e) {}\n try { if (statement != null) statement.close(); } catch (Exception e) {}\n try { if (conn != null) conn.close(); } catch (Exception e) {}\n }\n\n return dareId;\n }", "public Day[] getDays() {\n\t\treturn days;\n\t}", "public List<Login> getUniqueDates();", "private long getDaysBetween(LocalDateTime d1, LocalDateTime d2) {\n return d1.until(d2,DAYS);\n }", "public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }", "public int getLBR_ProtestDays();", "public List<Login> getUsers(Date startDate, Date endDate);", "public int getKeepLogDays() {\n\t\tInteger ii = (Integer) get_Value(\"KeepLogDays\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "@Override\n\tpublic Integer getFactDateNull(String userName) {\n\t\treturn dao.getFactDateNull(userName);\n\t}", "public List<TaskMaster> retrieveTasksForSpecificDaysById(Date currdate, Date xDaysAgo, Long projectId, Long userId, List<Long> projectIds);", "@Override\n public Long getRunningTimeInDays() {\n return null;\n }", "Integer getStartDay();", "public void setDays(int days) {\n this.days = days;\n }", "@Query(value = \"SELECT * FROM fish_time_record WHERE checkin_time > CURRENT_DATE AND checkin_time < CURRENT_DATE + 1 AND user_id = :userId ORDER BY id LIMIT 1\", nativeQuery = true)\n TblFishTimeRecord findTodayByUserId(@Param(\"userId\") String userId);", "private String getDays() {\n StringBuilder daysSB = new StringBuilder();\n\n if (days > 0) {\n daysSB.append(days);\n } else {\n daysSB.append(\"0\");\n }\n\n return daysSB.toString();\n }", "public static Date getDateByDays(Date val, int Days){\n\t\treturn DateUtils.addDays(val, Days);\n\t}", "public List<TaskMaster> retrieveAllTasksForSpecificDays(Date currdate, Date xDaysAgo, List<Long> projectIds, Long userIds);", "public int getDay()\n {\n return day;\n }", "public int calcDays() {\n\t\tint days = day-1;\r\n\t\tdays += ((month-1)*30);\r\n\t\tdays += ((year -2000) * (12*30));\r\n\t\treturn days;\r\n\t}", "public java.util.List<DataEntry> findByUserId(\n\t\tlong userId, int start, int end);", "public static int getDays(Date t, Date baseDate) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(baseDate);\n long sl = cal.getTimeInMillis();\n long el, delta;\n cal.setTime(t);\n el = cal.getTimeInMillis();\n delta = el - sl;\n int value = (int) (delta / (24 * 60 * 60 * 1000));\n\n return value;\n }", "private int[] setDaysOfWeek() {\n int[] daysOfWeek = new int[7];\n\n for (int i = 0; i < 6; i++) {\n daysOfWeek[i] = calculateNumberOfDaysOfWeek(DayOfWeek.of(i + 1));\n }\n\n return daysOfWeek;\n }", "private static Date findOrderExpirationDate(int userId) throws ServiceException {\n OrderService orderService = new OrderService();\n Optional<Order> optionalOrder = orderService.findOrderByUserId(userId);\n\n if (optionalOrder.isPresent()) {\n Order order = optionalOrder.get();\n return order.getExpirationDate();\n\n } else {\n throw new ServiceException(\"Couldn't build order for DateManager information.\");\n }\n }", "public int getUpDays() {\n return (int)(_uptime / 86400000);\n }", "public static int getNumberOfDays() {\n\t\treturn numberOfDays;\n\t}", "private ArrayList<DateData> getDaysBetweenDates(Date startDate, Date endDate) {\n\n String language = UserDTO.getUserDTO().getLanguage();\n ArrayList<DateData> dataArrayList = new ArrayList<>();\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(startDate);\n\n while (calendar.getTime().before(endDate)) {\n Date result = calendar.getTime();\n try {\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", result));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", result));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", result));\n dataArrayList.add(new DateData(day, month, year, \"middle\"));\n calendar.add(Calendar.DATE, 1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", endDate));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", endDate));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", endDate));\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dataArrayList.add(new DateData(day, month, year, \"right\"));\n } else {\n dataArrayList.add(new DateData(day, month, year, \"left\"));\n }\n\n DateData dateData = dataArrayList.get(0);\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dateData.setBackground(\"left\");\n\n } else {\n dateData.setBackground(\"right\");\n }\n dataArrayList.set(0, dateData);\n return dataArrayList;\n }", "ArrayList<Day> getDays() {\n return days;\n }", "Map<Long, Integer> getUsersWithPendingMeeting(Long forUserId);", "@Override\n public List<ScheduledInterview> getForPerson(String userId) {\n List<ScheduledInterview> relevantInterviews = new ArrayList<>();\n List<ScheduledInterview> scheduledInterviews = new ArrayList<ScheduledInterview>(data.values());\n scheduledInterviews.sort(\n (ScheduledInterview s1, ScheduledInterview s2) -> {\n if (s1.when().start().equals(s2.when().start())) {\n return 0;\n }\n if (s1.when().start().isBefore(s2.when().start())) {\n return -1;\n }\n return 1;\n });\n\n for (ScheduledInterview scheduledInterview : scheduledInterviews) {\n if (userId.equals(scheduledInterview.interviewerId())\n || userId.equals(scheduledInterview.intervieweeId())\n || userId.equals(scheduledInterview.shadowId())) {\n relevantInterviews.add(scheduledInterview);\n }\n }\n return relevantInterviews;\n }", "@Override\r\n\tpublic int[] getDayPeople() {\n\t\tint[] result = new int[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tresult[0] = cinemaConditionDao.getDayCount(date);\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tresult[i+1] = cinemaConditionDao.getDayCount(date);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "String addDay(String userName, int dayOfYear);", "public ArrayList <User> getuserList2(){\n \n ArrayList<User> userList = new ArrayList<User>();\n Connection con = DBconnect.connectdb();\n \n Statement st;\n ResultSet rs;\n \n try {\n \n String today = new SimpleDateFormat(\"yyyy-MM-dd\").format(Calendar.getInstance().getTime());\n \n \n \n String query= \"SELECT * FROM Product WHERE Qty>0 and DATEDIFF(day,EXP_Date,'\" + today + \"')>=1 \";//DATEDIFF - today is current day , Date is database day\n \n st = con.createStatement();\n rs= st.executeQuery(query);\n User user;\n while(rs.next()){\n user = new User(rs.getDate(\"EXP_Date\"),rs.getInt(\"Product_Code\"),rs.getFloat(\"Total_Cost\"),rs.getFloat(\"Qty\"));\n userList.add(user);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return userList;\n }", "public List<DigitoUnico> listOfdigits(Long id) {\n\t\tOptional<User> user = repository.findById(id);\n\n\t\tif (user.isPresent()) {\n\n\t\t\treturn user.get().getDigitoUnico();\n\t\t} else {\n\t\t\tthrow new NotFoundException(\"User com o Id: \" + id + \" não encontrado em nossa base de dados!\");\n\t\t}\n\t}", "public int[] getDaysOfWeek() {\n return daysOfWeek;\n }", "private int getDifferenceDays(Date d1, Date d2) {\n int daysdiff = 0;\n long diff = d2.getTime() - d1.getTime();\n long diffDays = diff / (24 * 60 * 60 * 1000) + 1;\n daysdiff = (int) diffDays;\n return daysdiff;\n }", "boolean isDayTracked(String userName, int dayOfYear);", "public int getDay() {\n return day;\n }", "public void setDays(int daysIn){\r\n\t\tdays = daysIn;\r\n\t}", "public int getCurrentDay() {\n return daysPassed;\n }", "void getHolidayDaysById(long id, AsyncCallback<HolidayDays> callback);", "List<UserPosition> getUserPositionByIdUser(Long id_user, Date date);", "public int days() {\n if (isInfinite()) {\n return 0;\n }\n Period p = new Period(asInterval(), PeriodType.days());\n return p.getDays();\n }", "public int getDay() {\r\n return day;\r\n }", "@Given(\"^that the expiry date of Licence is in (\\\\d+) days$\")\n public void that_the_expiry_date_of_Licence_is_in_days(int arg1) throws Throwable {\n driverUser = new DriverUser(LocalDate.now().plusDays(arg1), LocalDate.now(), \"nu;;\", \"null\");\n }", "public List<Diary> getAlldiary(String user_e) {\n String[] columns = {\n FeedEntry.COLUMN_NAME_USER,\n FeedEntry.COLUMN_NAME_TITLE,\n FeedEntry.COLUMN_NAME_DETAIL,\n FeedEntry.COLUMN_NAME_DATE,\n FeedEntry.COLUMN_NAME_COVER\n };\n\n String selection = FeedEntry.COLUMN_NAME_USER + \" = ?\";\n\n String[] v_columns = {\n user_e\n };\n\n List<Diary> diaryList = new ArrayList<Diary>();\n\n SQLiteDatabase db = this.getReadableDatabase();\n\n // query the user table\n /**\n * Here query function is used to fetch records from user table this function works like we use sql query.\n * SQL query equivalent to this query function is\n * SELECT user_id,user_name,user_email,user_password FROM user ORDER BY user_name;\n */\n Cursor cursor = db.query(FeedEntry.TABLE_NAME, //Table to query\n columns, //columns to return\n selection, //columns for the WHERE clause\n v_columns, //The values for the WHERE clause\n null, //group the rows\n null, //filter by row groups\n null); //The sort order\n\n\n // Traversing through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n\n\n Diary user = new Diary(\n cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_USER)),\n cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_DATE)),\n cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_TITLE)),\n cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_DETAIL)),\n cursor.getString(cursor.getColumnIndex(FeedEntry.COLUMN_NAME_COVER))\n );\n\n // Adding diary record to list\n diaryList.add(user);\n } while (cursor.moveToNext());\n }\n cursor.close();\n db.close();\n\n // return user list\n return diaryList;\n }", "public Integer getGestationaldays() {\n return gestationaldays;\n }", "List<Integer> getIdUsersWithExpiredPasswordsList( Timestamp currentTimestamp );", "String updateDay(String userName, Day day);", "public Integer getAbsentDays()\r\n/* 58: */ {\r\n/* 59:59 */ return this.absentDays;\r\n/* 60: */ }", "public Day getDay(final int i) {\n if (i > days.size() - 1) {\n return null;\n }\n return days.get(i);\n }" ]
[ "0.75158197", "0.6261649", "0.62462765", "0.61508644", "0.60980064", "0.6077595", "0.59882236", "0.5984151", "0.5971931", "0.58886117", "0.58884656", "0.5867247", "0.5862067", "0.5834341", "0.5830582", "0.58262485", "0.5766865", "0.574859", "0.5738255", "0.5730856", "0.56873715", "0.5624501", "0.55553913", "0.5551214", "0.55258673", "0.5480366", "0.5473498", "0.54516494", "0.54389", "0.54249483", "0.5403324", "0.538459", "0.5356271", "0.53513074", "0.534957", "0.533669", "0.53219306", "0.5319084", "0.53185844", "0.5315859", "0.5281684", "0.52628064", "0.5251575", "0.52437764", "0.52413386", "0.5235587", "0.52298397", "0.5227651", "0.5206471", "0.5191743", "0.5186048", "0.5171005", "0.51662856", "0.5156792", "0.5152218", "0.51473904", "0.5145077", "0.51400197", "0.51291245", "0.5124221", "0.51098174", "0.5105044", "0.5104156", "0.51030916", "0.5099986", "0.50945073", "0.509311", "0.50920826", "0.50818574", "0.5075941", "0.5071423", "0.5062658", "0.50590134", "0.5056093", "0.50519115", "0.50510854", "0.5049779", "0.5041482", "0.50414383", "0.5037545", "0.5034239", "0.5031812", "0.50307906", "0.5028013", "0.5027039", "0.5022671", "0.50151527", "0.50109375", "0.5002078", "0.5000702", "0.4997056", "0.4997041", "0.49968314", "0.4992349", "0.49888834", "0.49805313", "0.49776796", "0.4970317", "0.49689266", "0.4965339" ]
0.6470321
1
Get days based on date
@Query("SELECT d FROM Day d WHERE date = ?1") List<Day> getByDate(Date date);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Day> getDays(String userName);", "int getNumberDays();", "public static int getDaysFromNow(Date date) throws Exception{\n\n if(date != null) {\n Days daysbetween = Days.daysBetween(new DateTime(date.getTime()), new DateTime().now());\n return daysbetween.getDays();\n }\n else\n throw new Exception();\n }", "Integer getDaysSpanned();", "public static double days_from_date(String date) {\n\n try {\n Date providedDate = dateFormat.parse(date);\n double diff = providedDate.getTime() / (1000 * 60 * 60 * 24);\n return diff > 0 ? Math.ceil(diff) : Math.floor(diff);\n } catch (ParseException e) {\n return Double.NaN;\n }\n }", "public static int getDays(Date t, Date baseDate) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(baseDate);\n long sl = cal.getTimeInMillis();\n long el, delta;\n cal.setTime(t);\n el = cal.getTimeInMillis();\n delta = el - sl;\n int value = (int) (delta / (24 * 60 * 60 * 1000));\n\n return value;\n }", "private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}", "public int calcDays() {\n\t\tint days = day-1;\r\n\t\tdays += ((month-1)*30);\r\n\t\tdays += ((year -2000) * (12*30));\r\n\t\treturn days;\r\n\t}", "Date computeDays(Date d, int days){\n d.setTime(d.getTime() + days*1000*60*60*24);\n return d;\n }", "long getTermDays();", "public ArrayList<Integer> getValidDays(Date date)\r\n\t{\r\n\t\tint maxDay = Date.maxDayOfMonthAndYear(date.getYear(), date.getMonth());\r\n\t\tArrayList <Integer> validDays = new ArrayList<Integer>(maxDay);\r\n\t\t\r\n\t\tfor (int day = 1; day <= maxDay; day++)\r\n\t\t\tvalidDays.add(day);\r\n\t\t\r\n\t\treturn validDays;\r\n\t}", "public long days(Date date2) {\n\t\tlong getDaysDiff =0;\n\t\t DateFormat simpleDateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\n\t\t Date currentDate = new Date();\n\t\t Date date1 = null;\n\t\t Date date3 = null;\n\n\t\t\n\n\t\t try {\n\t\t String startDate = simpleDateFormat.format(date2);\n\t\t String endDate = simpleDateFormat.format(currentDate);\n\n\t\t date1 = simpleDateFormat.parse(startDate);\n\t\t date3 = simpleDateFormat.parse(endDate);\n\n\t\t long getDiff = date3.getTime() - date1.getTime();\n\n\t\t getDaysDiff = getDiff / (24 * 60 * 60 * 1000);\n\t\t \n\t\t \n\t\t \n\t\t } catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t }\n\t\t return getDaysDiff;\n\n}", "public long getDays() {\r\n \treturn days;\r\n }", "public int getDays() {\n return this.days;\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n public int daysBetweenDates(LocalDate date1, LocalDate date2) {\n Period period = Period.between(date1, date2);\n int diff = period.getDays();\n return diff;\n }", "public int getDays(){\r\n\t\treturn days;\r\n\t}", "public Day[] getDays() {\n\t\treturn days;\n\t}", "public int daysBetween(Day day)\n\t{\n\t\tlong millisBetween = Math.abs(this.getDayStart(TimeZoneEx.GMT).getTime() - day.getDayStart(TimeZoneEx.GMT).getTime());\n\t\treturn (int) Math.round((float) millisBetween / (1000F * 60F * 60F * 24F));\n\t}", "Integer getDay();", "public static int getDayNumberByDate(Date val) {\n\t\t if (val != null) {\n\t\t SimpleDateFormat format = new SimpleDateFormat(\"dd\");\n\t\t return parseInt(format.format(val));\n\t\t } else {\n\n\t\t return 0;\n\n\t\t }\n\t}", "private long getDaysBetween(LocalDateTime d1, LocalDateTime d2) {\n return d1.until(d2,DAYS);\n }", "private long daysBetween() throws ParseException {\n Scanner input = new Scanner(System.in);\n System.out.println(\"Enter the date of when you rented the game dd/MM/yyyy:\");\n String dateReturn = input.nextLine();\n Date date = new SimpleDateFormat(\"dd/MM/yyyy\").parse(dateReturn);\n long interval = new Date().getTime() - date.getTime();\n return TimeUnit.DAYS.convert(interval, TimeUnit.MILLISECONDS);\n }", "public static void main(String[] args){\n\n\n DateTimeFormatter formatter1 = DateTimeFormat.forPattern(\"yyyy-MM-dd\");\n DateTime d1 = DateTime.parse(\"2018-05-02\",formatter1);\n DateTime d2 = DateTime.parse(\"2018-05-01\",formatter1);\n System.out.println(Days.daysIn(new Interval(d2,d1)).getDays());\n }", "public int days() {\n if (isInfinite()) {\n return 0;\n }\n Period p = new Period(asInterval(), PeriodType.days());\n return p.getDays();\n }", "@Override\n public final long daysInEffect(final LocalDate comparison) {\n return ChronoUnit.DAYS.between(this.getStartDate(), comparison);\n }", "public static long getDiffDays(Date date1,Date date2) {\n Calendar calendar1= Calendar.getInstance();\n Calendar calendar2 = Calendar.getInstance();\n\n calendar1.setTime(date1);\n calendar2.setTime(date2);\n\n long msDiff = calendar1.getTimeInMillis()-calendar2.getTimeInMillis();\n long daysDiff = TimeUnit.MILLISECONDS.toDays(msDiff);\n Log.e(\"Amarneh\",\"diffDays>>\"+daysDiff);\n return daysDiff;\n }", "private int getDifferenceDays(Date d1, Date d2) {\n int daysdiff = 0;\n long diff = d2.getTime() - d1.getTime();\n long diffDays = diff / (24 * 60 * 60 * 1000) + 1;\n daysdiff = (int) diffDays;\n return daysdiff;\n }", "public int getNumDaysForComponent(Record record);", "private LocalDate getMensDay1(LocalDate input){\n LocalDate dateFist = LocalDate.parse(file.getData(\"date\"), DateTimeFormatter.ofPattern(\"dd.MM.yyyy\"));\n int days = Integer.parseInt(file.getData(\"days\"));\n\n while(dateFist.isBefore(input)){\n dateFist = dateFist.plusDays(days);\n }\n return dateFist.minusDays(days);\n }", "public int getLBR_CollectionReturnDays();", "@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate = \" + eDate);\n List<DateTime> dateList = DateUtil.rangeToList(bDate, eDate, DateField.DAY_OF_YEAR);//创建日期范围生成器\n List<String> collect = dateList.stream().map(e -> e.toString(\"yyyy-MM-dd\")).collect(Collectors.toList());\n System.out.println(\"collect = \" + collect);\n\n }", "public int getNumberOfDays() {\n return numberOfDays;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic Integer getDateDiffWorkingDays(Date dateFrom, Date dateTo) {\n\t\tString sql = dateFrom.after(dateTo)\n\t\t\t\t? \"select count(*) * -1 from calendar where id_date >= :dateTo and id_date < :dateFrom and holiday = 0\"\n\t\t\t\t\t\t: \"select count(*) from calendar where id_date > :dateFrom and id_date <= :dateTo and holiday = 0\";\n\t\tQuery query = entityManager.createNativeQuery(sql);\n\t\tquery.setParameter(\"dateFrom\", dateFrom);\n\t\tquery.setParameter(\"dateTo\", dateTo);\n\t\treturn Utils.isNull(Utils.first(query.getResultList()), (Integer) null);\n\t}", "public abstract int daysInMonth(DMYcount DMYcount);", "double getAgeDays();", "public static int getNumberOfDays() {\n\t\treturn numberOfDays;\n\t}", "private long dateDiffInNumberOfDays(LocalDate startDate, LocalDate endDate) {\n\n return ChronoUnit.DAYS.between(startDate, endDate);\n }", "private ArrayList<DateData> getDaysBetweenDates(Date startDate, Date endDate) {\n\n String language = UserDTO.getUserDTO().getLanguage();\n ArrayList<DateData> dataArrayList = new ArrayList<>();\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(startDate);\n\n while (calendar.getTime().before(endDate)) {\n Date result = calendar.getTime();\n try {\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", result));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", result));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", result));\n dataArrayList.add(new DateData(day, month, year, \"middle\"));\n calendar.add(Calendar.DATE, 1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", endDate));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", endDate));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", endDate));\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dataArrayList.add(new DateData(day, month, year, \"right\"));\n } else {\n dataArrayList.add(new DateData(day, month, year, \"left\"));\n }\n\n DateData dateData = dataArrayList.get(0);\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dateData.setBackground(\"left\");\n\n } else {\n dateData.setBackground(\"right\");\n }\n dataArrayList.set(0, dateData);\n return dataArrayList;\n }", "@Override\r\n\tpublic int getDayCount(Date date) {\n\t\tString hql = \"select cc.count from cinema_condition cc where cc.date = ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, date);\r\n\t\tif(query.uniqueResult()==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint resutl = (Integer) query.uniqueResult();\r\n\t\treturn resutl;\r\n\t}", "public static Date getDateByDays(Date val, int Days){\n\t\treturn DateUtils.addDays(val, Days);\n\t}", "private boolean makeCalendarByDays() {\n if (calendar != null) {\n for (Date date:calendar.keySet()) {\n Date startDay;\n if (date.getTime() > date.getTime() - 3600000 * 2 - date.getTime() % 86400000)\n startDay = new Date(date.getTime() + 3600000 * 22 - date.getTime() % 86400000);\n else startDay = new Date(date.getTime() - 3600000 * 2 - date.getTime() % 86400000);\n calendarByDays.put(startDay, calendar.get(date));\n }\n return true;\n }\n return false;\n }", "public static int getDayBetweenDates(Date dBeginn, Date dEnde) {\r\n int iReturn = -1;\r\n\r\n long lngBetween = dEnde.getTime() - dBeginn.getTime();\r\n lngBetween = ((lngBetween / 1000) / 3600) / 24;\r\n\r\n iReturn = (int) lngBetween;\r\n\r\n return (iReturn);\r\n }", "public int daysOverdue(int today);", "ArrayList<Day> getDays() {\n return days;\n }", "private Date getTestDate(int numberOfDays) {\n Calendar c = Calendar.getInstance();\n c.add(Calendar.DATE, numberOfDays);\n return c.getTime();\n }", "public int daysBetweenDates(String date1, String date2) {\n\n return 0;\n }", "public int getDay(){\n String[] dateSplit = this.date.split(\"-\");\n calendar.set(Calendar.DAY_OF_MONTH, Integer.valueOf(dateSplit[2]));\n calendar.set(Calendar.MONTH, Integer.valueOf(dateSplit[1])-1);\n calendar.set(Calendar.YEAR, Integer.valueOf(dateSplit[0]));\n return calendar.get(Calendar.DAY_OF_WEEK);\n }", "public int betweenDates() {\n return Period.between(arrivalDate, departureDate).getDays();\n }", "public long daysToDeadline() {\n return DateWrapper.getTimeBetween(Clock.now().getDateWrapper(), getDate(), ChronoUnit.DAYS);\n }", "public int getNumberOfDays()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1 || mn == 3 || mn == 5 || mn == 7 || mn == 8 || mn == 10 || mn == 12)\r\n {return 31;}\r\n if (mn == 4 || mn == 6 || mn == 9 || mn == 11)\r\n {return 30;}\r\n else\r\n {return 28;}\r\n }", "private static int getDayNumberNew(LocalDate date) {\n DayOfWeek day = date.getDayOfWeek();\n return day.getValue() % 7;\n }", "public static String calculateFeedbackDays(String dataPublicare, String dataFeedback){\n DateTimeFormatter fmt = DateTimeFormatter.ofPattern(\"dd.MM.yyyy\");\n try {\n LocalDate startDate = LocalDate.parse(dataPublicare, fmt);\n LocalDate endDate = LocalDate.parse(dataFeedback, fmt);\n // Range = End date - Start date\n Long range = ChronoUnit.DAYS.between(startDate, endDate);\n\n return range.toString();\n }catch (Exception e){\n e.printStackTrace();\n }\n return \"0\";\n }", "Date getStartDay();", "public void calculateVacationDays(){\n }", "LocalDate getDate();", "io.dstore.values.TimestampValue getDay();", "public static long daysTillNow(Date from) { \n \tDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tDateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n \tLocalDate dateBefore = LocalDate.parse(df.format(from), formatter);\n \treturn ChronoUnit.DAYS.between( dateBefore , LocalDate.now()); \t\n }", "public static int daysUntil(String dateString) throws ParseException {\r\n\t\t\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.UK);\t\t\t\r\n\t\tDate itemDate = (Date) sdf.parse(dateString);\r\n\t\tDate nowDate = (Date) sdf.parse(getTodaysDate());\r\n\t\treturn Days.daysBetween(new DateTime(nowDate), new DateTime(itemDate)).getDays();\r\n\t\t\r\n\t}", "@SuppressLint(\"SimpleDateFormat\")\n public static List<String> getDaysBetweenDates(String startDate, String endDate)\n throws ParseException {\n List<String> dates = new ArrayList<>();\n\n DateFormat df = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(new SimpleDateFormat(\"dd.MM.yyyy\").parse(startDate));\n\n while (calendar.getTime().before(new SimpleDateFormat(\"dd.MM.yyyy\").parse(endDate)))\n {\n Date result = calendar.getTime();\n dates.add(df.format(result));\n calendar.add(Calendar.DATE, 1);\n }\n dates.add(endDate);\n return dates;\n }", "public static List<Date> getTradeDays() {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt \"\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public static void main(String[] args) {\n DateMidnight start = new DateMidnight(\"2019-07-01\");\n DateMidnight end = new DateMidnight(\"2019-07-22\");\n\n // Get days between the start date and end date.\n int days = Days.daysBetween(start, end).getDays();\n\n // Print the result.\n System.out.println(\"Days between \" +\n start.toString(\"yyyy-MM-dd\") + \" and \" +\n end.toString(\"yyyy-MM-dd\") + \" = \" +\n days + \" day(s)\");\n\n // Using LocalDate object.\n LocalDate date1 = LocalDate.parse(\"2019-07-01\");\n LocalDate date2 = LocalDate.now();\n days = Days.daysBetween(date1, date2).getDays();\n\n // Print the result.\n System.out.println(\"Days between \" +\n date1.toString(\"yyyy-MM-dd\") + \" and \" +\n date2.toString(\"yyyy-MM-dd\") + \" = \" +\n days + \" day(s)\");\n }", "public ArrayList<String> getVacationDay(GregorianCalendar date) throws IOException {\r\n\t\tArrayList<String> vacation = new ArrayList<String>();\r\n\t\tif (calendar.existsVacationDay(date)) {\r\n\t\t\t// getting shifts\r\n\t\t\tArrayList<Turno> shifts = calendar.getShiftsOfADay(date);\r\n\t\t\tfor (Turno t : shifts) {\r\n\t\t\t\t// adding number of doctors\r\n\t\t\t\tvacation.add(Integer.toString(t.getNumberOfDoctors()));\r\n\t\t\t}\r\n\t\t\t// adding special date\r\n\t\t\tvacation.add(shifts.get(0).getSpecialDate());\r\n\t\t\treturn vacation;\r\n\t\t}\r\n\t\telse throw new IOException(\"La fecha no corresponde a ningun dia vacacional \");\t\r\n\t}", "public int trimestre(LocalDate d);", "private static List<Date> getTradeDays(Date startDate, Date expiration) {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt where \"\r\n\t\t\t\t+ \"opt.trade_date >= :tradeDate \" \r\n\t\t\t\t+ \"and opt.expiration=:expiration \"\t\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setParameter(\"tradeDate\", startDate);\r\n\t\tquery.setParameter(\"expiration\", expiration);\r\n\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public static Date getDateByDays(int Days){\n\t\treturn DateUtils.addDays(new Date(), Days);\n\t}", "public List<String> getDates() {\n\n List<String> listDate = new ArrayList<>();\n\n Calendar calendarToday = Calendar.getInstance();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n String today = simpleDateFormat.format(calendarToday.getTime());\n\n Calendar calendarDayBefore = Calendar.getInstance();\n calendarDayBefore.setTime(calendarDayBefore.getTime());\n\n int daysCounter = 0;\n\n while (daysCounter <= 7) {\n\n if (daysCounter == 0) { // means that its present day\n listDate.add(today);\n } else { // subtracts 1 day after each pass\n calendarDayBefore.add(Calendar.DAY_OF_MONTH, -1);\n Date dateMinusOneDay = calendarDayBefore.getTime();\n String oneDayAgo = simpleDateFormat.format(dateMinusOneDay);\n\n listDate.add(oneDayAgo);\n\n }\n\n daysCounter++;\n }\n\n return listDate;\n\n }", "public static void dateDifference(){\r\n\t\t\r\n\t\tLocalDate firstDate = LocalDate.of(2013, 3, 20);\r\n\t\tLocalDate secondDate = LocalDate.of(2015, 8, 12);\r\n\t\t\r\n\t\tPeriod diff = Period.between(firstDate, secondDate);\r\n\t\tSystem.out.println(\"The Difference is ::\"+diff.getDays());\r\n\t}", "public int getLBR_ProtestDays();", "private Date getdDay() {\n\t\treturn this.dDay;\r\n\t}", "public int getIDays() {\n return iDays;\n }", "public int getNumDays() {\n\t\treturn numDays;\n\t}", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public static int getNoOfDaysBetweenDates(Date fromDate, Date toDate) {\n\t\tint noOfDays = 0;\n\t\tif(fromDate.compareTo(toDate)>0){\n\t\tnoOfDays = fromDate.subtract(toDate);\n\t\tnoOfDays = -(noOfDays + 1);\n\t\t}else if(fromDate.compareTo(toDate)==0){\n\t\t\tnoOfDays = fromDate.subtract(toDate);\n\t\t\tnoOfDays = noOfDays + 1;\n\t\t}else{\n\t\t\tnoOfDays = toDate.subtract(fromDate);\n\t\t\tnoOfDays = noOfDays + 1;\n\t\t}\n\t\treturn noOfDays;\n\t}", "public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }", "public Integer get_count_of_days(String Created_date_String, String Expire_date_String) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\", Locale.getDefault());\n\n Date Created_convertedDate = null, Expire_CovertedDate = null, todayWithZeroTime = null;\n try {\n Created_convertedDate = dateFormat.parse(Created_date_String);\n Expire_CovertedDate = dateFormat.parse(Expire_date_String);\n\n Date today = new Date();\n\n todayWithZeroTime = dateFormat.parse(dateFormat.format(today));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n Calendar c_cal = Calendar.getInstance();\n c_cal.setTime(todayWithZeroTime);\n int c_year = c_cal.get(Calendar.YEAR);\n int c_month = c_cal.get(Calendar.MONTH);\n int c_day = c_cal.get(Calendar.DAY_OF_MONTH);\n\n\n Calendar e_cal = Calendar.getInstance();\n e_cal.setTime(Expire_CovertedDate);\n int e_year = e_cal.get(Calendar.YEAR);\n int e_month = e_cal.get(Calendar.MONTH);\n int e_day = e_cal.get(Calendar.DAY_OF_MONTH);\n\n Calendar date1 = Calendar.getInstance();\n Calendar date2 = Calendar.getInstance();\n\n date1.clear();\n date1.set(c_year, c_month, c_day);\n date2.clear();\n date2.set(e_year, e_month, e_day);\n\n long diff = date2.getTimeInMillis() - date1.getTimeInMillis();\n\n long dayCount = diff / (24 * 60 * 60 * 1000);\n\n return (int) dayCount;\n }", "public Date getDay() {\n return day;\n }", "public static long getDayNumber(long date) {\n TimeZone tz = TimeZone.getDefault();\n long gmtOffset = tz.getOffset(date);\n return (date + gmtOffset) / DAY_IN_MILLIS;\n }", "public int getDaysSinceStartOfEpoch() {\r\n long millis = new GregorianCalendar(year, month - 1, day).getTimeInMillis();\r\n return (int) (millis / MILLIS_PER_DAY);\r\n\r\n }", "private String getDays() {\n StringBuilder daysSB = new StringBuilder();\n\n if (days > 0) {\n daysSB.append(days);\n } else {\n daysSB.append(\"0\");\n }\n\n return daysSB.toString();\n }", "io.dstore.values.TimestampValue getToDay();", "Date getForDate();", "public int getEDays() {\n return eDays;\n }", "public ObservableList<Date> getStudentDays(int studentID);", "Integer getStartDay();", "public static int getDayBetweenDates(HISDate dBeginn, HISDate dEnde) {\r\n return HISDate.getDayBetweenDates(dBeginn.toSQLDate(), dEnde.toSQLDate());\r\n }", "public Integer getTotalDays()\r\n/* 68: */ {\r\n/* 69:67 */ return this.totalDays;\r\n/* 70: */ }", "@Override\r\n\tpublic int[] getDayPeople() {\n\t\tint[] result = new int[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tresult[0] = cinemaConditionDao.getDayCount(date);\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tresult[i+1] = cinemaConditionDao.getDayCount(date);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "static long getDaysPart(Duration d) {\n long t = d.getSeconds() / 60 / 60 / 24;\n return t;\n }", "public int getTotalDays() {\r\n int totalDays = 0;\r\n for (int d = 0; d < 5; d++) {\r\n for (int h = 0; h < 13; h++) {\r\n if (weekData[d][h] != 0) {\r\n totalDays += 1;\r\n break;\r\n }\r\n }\r\n }\r\n return totalDays;\r\n }", "@Test\n\tpublic void testNumberOfDays() {\n\t\tint thirtyExpected = 30;\n\t\tint thirtyResult = Main.numberOfDays(9, 2015);\n\t\tassertTrue(thirtyExpected == thirtyResult);\n\n\t\t// Test regular 31 day month\n\t\tint thirtyOneExpected = 31;\n\t\tint thirtyOneResult = Main.numberOfDays(1, 2016);\n\t\tassertTrue(thirtyOneExpected == thirtyOneResult);\n\n\t\t// Test 'Feb 2016' - regular leap year\n\t\tint regularLeapExpected = 29;\n\t\tint regularLeapResult = Main.numberOfDays(2, 2016);\n\t\tassertTrue(regularLeapExpected == regularLeapResult);\n\n\t\t// Test 'February 2300' - century but not a leap year\n\t\tint notCenturyLeapExpected = 28;\n\t\tint notCenturyLeapResult = Main.numberOfDays(2, 2300);\n\t\tassertTrue(notCenturyLeapExpected == notCenturyLeapResult);\n\n\t\t// Test 'February 2400' - century and a leap year\n\t\tint centuryLeapExpected = 29;\n\t\tint centuryLeapResult = Main.numberOfDays(2, 2400);\n\t\tassertTrue(centuryLeapExpected == centuryLeapResult);\n\n\t}", "public int getDateDay(int columnIndex) {\n DateDayVector vector = (DateDayVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }", "public int getDay()\n {\n return day;\n }", "public Number getDayDate() {\n return (Number) getAttributeInternal(DAYDATE);\n }", "private static long getQtdDias(String dataAniversario){\n DateTimeFormatter data = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n LocalDateTime now = LocalDateTime.now();\n String dataHoje = data.format(now);\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.ENGLISH);\n try {\n Date dtAniversario = sdf.parse(dataAniversario);\n Date hoje = sdf.parse(dataHoje);\n //Date hoje = sdf.parse(\"51515/55454\");\n long diferenca = Math.abs(hoje.getTime() - dtAniversario.getTime());\n long qtdDias = TimeUnit.DAYS.convert(diferenca, TimeUnit.MILLISECONDS);\n return qtdDias;\n } catch (ParseException e) {\n e.printStackTrace();\n }\n return 0;\n }", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\r\n return day;\r\n }", "public int getDateDay(String columnName) {\n DateDayVector vector = (DateDayVector) table.getVector(columnName);\n return vector.get(rowNumber);\n }" ]
[ "0.7043548", "0.696782", "0.69486356", "0.6905191", "0.6783714", "0.668871", "0.66701704", "0.6632443", "0.66026425", "0.65971875", "0.6539258", "0.6530725", "0.65084416", "0.65051603", "0.6476227", "0.64506936", "0.6449009", "0.63916326", "0.63901484", "0.6361038", "0.6343756", "0.632797", "0.63087785", "0.6301464", "0.6298746", "0.62865376", "0.62677455", "0.6259655", "0.6223545", "0.6220828", "0.6208667", "0.6204116", "0.61913097", "0.6181897", "0.618034", "0.6171011", "0.61444414", "0.6130666", "0.61060905", "0.6046922", "0.60430086", "0.60354537", "0.6025348", "0.6020249", "0.6019814", "0.60190564", "0.6016684", "0.601421", "0.598344", "0.59741277", "0.5957256", "0.59456426", "0.5937205", "0.5936124", "0.5930177", "0.59271765", "0.5902615", "0.5896593", "0.58938265", "0.587805", "0.58730084", "0.5871722", "0.5868882", "0.58668065", "0.58647305", "0.5853671", "0.58399904", "0.5838176", "0.5835592", "0.5833259", "0.5823789", "0.5822486", "0.5822486", "0.5822486", "0.5822486", "0.5822486", "0.5811298", "0.58097905", "0.5785983", "0.5777101", "0.5772121", "0.5769728", "0.57662433", "0.5763646", "0.5751427", "0.5741632", "0.572877", "0.5727589", "0.5720933", "0.57104796", "0.5709778", "0.57064945", "0.56912667", "0.5690644", "0.5687647", "0.5686681", "0.56846523", "0.56769717", "0.5676521", "0.5676009", "0.56692255" ]
0.0
-1
gets day from user by specific day
@Query("SELECT d FROM Day d WHERE date = ?1 and user_id = ?2") Optional<Day> getByUserIDAndDate(LocalDate date, Integer id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer getDay();", "private Day getDay(int day, int month) {\n return mainForm.getDay(day, month);\n }", "public void inputDay () {\n\t\tSystem.out.print(\"Enter a day: \");\r\n\t\tday = input.nextInt();\r\n\r\n\t}", "String updateDay(String userName, Day day);", "public String getSignupDay(int day) {\r\n\t\t\treturn signupByDay.get(day);\r\n\t\t\r\n\t\t}", "@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }", "String getDayofservice();", "@java.lang.Override\n public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }", "public String getDay() {\n return day.getText();\n }", "Date getStartDay();", "private String checkIfToday(String day) {\n GregorianCalendar cal = new GregorianCalendar();\n switch(cal.get(Calendar.DAY_OF_WEEK)) {\n case Calendar.MONDAY:\n if (day.equals(\"Mo.\") || day.equals(\"Mon\")) {\n return International.getString(\"heute\");\n }\n case Calendar.TUESDAY:\n if (day.equals(\"Di.\") || day.equals(\"Tue\")) {\n return International.getString(\"heute\");\n }\n case Calendar.WEDNESDAY:\n if (day.equals(\"Mi.\") || day.equals(\"Wed\")) {\n return International.getString(\"heute\");\n }\n case Calendar.THURSDAY:\n if (day.equals(\"Do.\") || day.equals(\"Thu\")) {\n return International.getString(\"heute\");\n }\n case Calendar.FRIDAY:\n if (day.equals(\"Fr.\") || day.equals(\"Fri\")) {\n return International.getString(\"heute\");\n }\n case Calendar.SATURDAY:\n if (day.equals(\"Sa.\") || day.equals(\"Sat\")) {\n return International.getString(\"heute\");\n }\n case Calendar.SUNDAY:\n if (day.equals(\"So.\") || day.equals(\"Sun\")) {\n return International.getString(\"heute\");\n }\n }\n return day;\n }", "io.dstore.values.StringValue getDay();", "public int getDay()\n {\n return day;\n }", "Day getDay(String account, int dayOfYear);", "Integer getStartDay();", "public String getDay() {\n return this.day;\n }", "public void setDay(int day)\n {\n this.day = day;\n }", "public void setDay(int day) {\r\n this.day = day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public int getDay() {\r\n return day;\r\n }", "public int getDay() {\n return day;\n }", "public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public int getDay() {\n\treturn day;\n }", "public int getDay(){\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public Date getDay() {\n return day;\n }", "public void setDay(Date day) {\n this.day = day;\n }", "private static void determineDayOfTheWeek() {\n System.out.println(\"Enter a number:\");\r\n Scanner s = new Scanner(System.in);\r\n int d = Integer.parseInt(s.nextLine());\r\n switch (d) {\r\n case 1:\r\n System.out.println(\"It is Monday\");\r\n break;\r\n case 2:\r\n System.out.println(\"It is Tuesday\");\r\n break;\r\n case 3:\r\n System.out.println(\"It is Wednesday\");\r\n break;\r\n case 4:\r\n System.out.println(\"It is Thursday\");\r\n break;\r\n case 5:\r\n System.out.println(\"It is Friday\");\r\n break;\r\n case 6:\r\n System.out.println(\"It is Saturday\");\r\n break;\r\n case 7:\r\n System.out.println(\"It is Sunday\");\r\n break;\r\n default:\r\n System.out.println(\"Wrong input\");\r\n }\r\n }", "public String getDay() {\n\t\treturn day;\n\t}", "Date getForDate();", "public DayOfWeek primeiroDiaSemanaAno(int ano);", "public int getDay(){\n\t return this.day;\n }", "public static String DiaActual(){\n java.util.Date fecha = new Date();\n int dia = fecha.getDay();\n String myDia=null;\n switch (dia){\n case 1:\n myDia=\"LUNES\";\n break;\n case 2:\n myDia=\"MARTES\";\n break;\n case 3:\n myDia=\"MIERCOLES\";\n break;\n case 4:\n myDia=\"JUEVES\";\n break;\n case 5:\n myDia=\"VIERNES\";\n break;\n case 6:\n myDia=\"SABADO\";\n break;\n case 7:\n myDia=\"DOMINGO\";\n break; \n }\n return myDia;\n }", "public void setDay(int day) {\n\t\tthis.day = day;\n\t}", "public void setDay(int day) {\n\t\tthis.day = day;\n\t}", "public static void dayOfWeek(){\n\t\t int x , y0 , m0 , d0;\n\t\t \n\t\t System.out.println(\"enter day month and year\");\n\t\t int day = scanner.nextInt();\n\t\t int month = scanner.nextInt();\n\t\t int year = scanner.nextInt();\n\t\t\n\t\ty0 = year - (14-month) / 12;\n\t\tx = y0 + y0 / 4-y0 / 100+y0 / 400;\n\t\tm0 = month + 12 * ((14-month)/12) -2;\n\t\td0 =(day+x+(31*m0) / 12) % 7;\n\t\t\n\t\tswitch(d0)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\tSystem.out.println(\"it is sunday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"it is monday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println(\"it is tuesday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"it is wednesday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tSystem.out.println(\"it is thursday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tSystem.out.println(\"it is friday\");\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tSystem.out.println(\"it is saturday\");\n\t\t\tbreak;\n\t\t}\n\t\t\t\n\t}", "public void produceDateFromDay(String dayInput, int plus) {\n LocalDate date = null;\n \n if (plus == 2) {\n date = LocalDate.now().plusWeeks(1);\n } else if (plus == 3) {\n date = LocalDate.now().plusMonths(1);\n } else if (plus == 4) {\n date = LocalDate.now().plusYears(1);\n } else if (plus == 5) {\n date = LocalDate.now();\n } else if (plus == 6) {\n date = LocalDate.now().plusDays(1);\n } else {\n for (int n = 0; n < Constants.DAYS_LIST.length; n++) {\n if (dayInput.toLowerCase().matches(Constants.DAYS_LIST[n])) {\n int days = (n+1) - LocalDate.now().getDayOfWeek().getValue();\n\n if (days >= 0) {\n if (plus == 1) {\n date = LocalDate.now().plusDays(days+7);\n } else {\n date = LocalDate.now().plusDays(days);\n }\n } else {\n date = LocalDate.now().plusDays(days+7);\n }\n\n break;\n }\n }\n }\n startDate = date.getDayOfMonth() + \"/\" + date.getMonthValue() + \"/\" +date.getYear();\n }", "public String getDay() {\n\n\t\treturn day;\n\t}", "private Date getdDay() {\n\t\treturn this.dDay;\r\n\t}", "public static int calendarDay2Day(int day) {\n switch (day) {\n case Calendar.SUNDAY:\n return RRuleContants.SU;\n case Calendar.MONDAY:\n return RRuleContants.MO;\n case Calendar.TUESDAY:\n return RRuleContants.TU;\n case Calendar.WEDNESDAY:\n return RRuleContants.WE;\n case Calendar.THURSDAY:\n return RRuleContants.TH;\n case Calendar.FRIDAY:\n return RRuleContants.FR;\n case Calendar.SATURDAY:\n return RRuleContants.SA;\n default:\n throw new RuntimeException(\"bad day of week: \" + day);\n }\n }", "public String getDay(int Day)\n {\n int dayIndex = Day;\n String[] days = {\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"};\n String realDay = days[dayIndex];\n return realDay;\n }", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "io.dstore.values.TimestampValue getDay();", "public Integer getDay()\n {\n return this.day;\n }", "private DailyHours findEntryByDate(String day)\r\n\t{\r\n\t\t//cycle the dailyHourLog arraylist\r\n\t\tfor(DailyHours singleDay : dailyHourLog)\r\n\t\t{\r\n\t\t\t//selection structure returning true that the date matches \r\n\t\t\tif(singleDay.getDate().equals(day))\r\n\t\t\t{\r\n\t\t\t\treturn singleDay;\r\n\t\t\t\t\t\t\r\n\t\t\t}//end selection structure returning the date equals \r\n\t\t}//end for loop cycling the dailyHourLog ArrayList\r\n\t\t\r\n\t\t//else the value was not found, so return null\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\n\n\n Scanner scan = new Scanner(System.in);\n\n System.out.println(\"Enter a number please \");\n int day = scan.nextInt();\n\n\n\n if (day == 1) {\n System.out.println(\"It's a Monday!\");\n }\n if (day == 2) {\n System.out.println(\"It's a Tuesday!\");\n }\n if (day == 3) {\n System.out.println(\"It's a Wednesday!\");\n }\n if (day == 4) {\n System.out.println(\"It's a Thursday!\");\n }\n if (day == 5) {\n System.out.println(\"It's a Friday!\");\n }\n if (day == 6) {\n System.out.println(\"It's a Saturday!\");\n }\n if (day == 7) {\n System.out.println(\"It's a Sunday!\");\n }else if(day>7 || day <1){\n System.out.println(\"There is no such a day!\");\n }\n\n\n\n\n\n\n }", "io.dstore.values.TimestampValue getFromDay();", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "String addDay(String userName, int dayOfYear);", "public String getDayOfTheWeek(){\r\n Calendar calendar = Calendar.getInstance();\r\n int day = calendar.get(Calendar.DAY_OF_WEEK);\r\n String calendar_Id = null;\r\n switch (day) {\r\n case Calendar.SUNDAY:\r\n calendar_Id =\"(90300)\";\r\n break;\r\n case Calendar.MONDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.TUESDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.WEDNESDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.THURSDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.FRIDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.SATURDAY:\r\n calendar_Id =\"(90200,90238)\";\r\n break;\r\n }\r\n\r\n return calendar_Id;\r\n }", "public int getDay() {\n\t\treturn this.day;\n\t}", "public int getDay() {\n\t\treturn this.day;\n\t}", "@Override\n public void onDayClick(Date dateClicked) {\n\n String pass_date = new String(DayEvent.format(dateClicked).toString());\n\n Intent in = new Intent(getApplicationContext(), CustomerListCalendar.class);\n in.putExtra(PASS_VAR, String.valueOf(pass_date));\n startActivityForResult(in, 100);\n\n System.out.println(\"ini tanggal yang dipilih : \"+pass_date);\n\n }", "List<Day> getDays(String userName);", "public void setDay(final int day) {\n\t\tthis.day = day;\n\t}", "public static void date(int num) {\n String date = \"\";\n // Tests for what day of the week it is by using modulus to allign with a day.\n if (num%7==0) {\n date = \"Saturday\";\n } else if (num%7 == 1) {\n date = \"Sunday\";\n } else if (num%7 == 2) {\n date = \"Monday\";\n } else if (num%7 == 3) {\n date = \"Tuesday\";\n } else if (num%7 == 4) {\n date = \"Wednesday\";\n } else if (num%7 == 5) {\n date = \"Thursday\";\n } else if (num%7 == 6) {\n date = \"Friday\";\n }\n // Prints name of day inputted date falls on.\n System.out.println(\"That day is a \"+date);\n }", "public int getDay() {\r\n\t\treturn (this.day);\r\n\t}", "public static boolean getTime(){\r\n String choice = \"a\";\r\n boolean day = true, repeat = true;\r\n sc.nextLine();\r\n do{\r\n System.out.println(\"Please select day or night by typing in either \\\"Day\\\" or \\\"Night\\\"\");\r\n choice = sc.nextLine();\r\n choice = choice.trim();\r\n if(choice.equalsIgnoreCase(\"day\")){\r\n day = true;\r\n repeat = false;\r\n }\r\n else if(choice.equalsIgnoreCase(\"night\")){\r\n day = false;\r\n repeat = false;\r\n }\r\n else{\r\n System.out.println(\"Error: Incorrect input\");\r\n repeat = true;\r\n }\r\n }while(repeat);\r\n return day;\r\n }", "private String getDayFromUTCTimeStamp(String stDate_in) {\n try {\n long timeStamp = Long.parseLong(stDate_in) * 1000L;\n SimpleDateFormat sdfDay = new SimpleDateFormat(\"E\");\n SimpleDateFormat sdfDateTime = new SimpleDateFormat(\"E MM/dd/yyyy HH:mm:ss\");\n Date netDate = (new Date(timeStamp));\n return sdfDay.format(netDate);\n } catch (Exception e) {\n AppDataLog.TPostExep(e);\n return null;\n }\n }", "private Day getDay(String dayName){\n for(Day day: dayOfTheWeek)\n if(dayName.equals(day.getDay()))\n return (day);\n return(new Day());\n }", "public io.dstore.values.StringValue getDay() {\n if (dayBuilder_ == null) {\n return day_ == null ? io.dstore.values.StringValue.getDefaultInstance() : day_;\n } else {\n return dayBuilder_.getMessage();\n }\n }", "private String getEventDate(final int dayNumber)\n\t{\n\t\tString dayOfWeek = \"\" + dayArray[cModel.findDayOfWeek(dayNumber) - 1];\n\t\tint month = cModel.getCalMonth() + 1; //first month is 0\n\t\tint year = cModel.getCalYear();\n\t\t\n\t\treturn dayOfWeek + \" \" + month + \"/\" + dayNumber + \"/\" + year;\n\t}", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "public String calculateDay(String day) throws ParseException {\n\t\tSimpleDateFormat simpleDateformat = new SimpleDateFormat(\"EEEE\");\r\n\t\tint iYear = Calendar.getInstance().get(Calendar.YEAR);\r\n\t\tint iMonth = Calendar.getInstance().get(Calendar.MONTH) + 1;\r\n\t\tString yourDate = 15 + \"/\" + iMonth + \"/\" + iYear;\r\n\t\t// String string = yourDate;\r\n\t\tDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\", Locale.ENGLISH);\r\n\t\tDate date = format.parse(yourDate);\r\n\t\tthis.calculatedDay = simpleDateformat.format(date);\r\n\t\t//System.out.println(\"Calculated Day :: \" + this.calculatedDay);\r\n\t\treturn calculatedDay;\r\n\t}", "private static int day(int month, int day, int year) {\n int y = year - (14 - month) / 12;\n int x = y + y / 4 - y / 100 + y / 400;\n int m = month + 12 * ((14 - month) / 12) - 2;\n int d = (day + x + (31 * m) / 12) % 7;\n return d;\n }", "public java.lang.String getDay() {\r\n return localDay;\r\n }", "public java.lang.String getDay() {\r\n return localDay;\r\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }", "public LocalDate getDay(DayOfWeek dayOfWeek) {\n return days.get(dayOfWeek.getValue() - 1);\n }", "public static String findDay(int month, int day, int year) {\n LocalDate localDate = LocalDate.of(year, month, day);\n DayOfWeek dayOfWeek = localDate.getDayOfWeek();\n return dayOfWeek.toString();\n }", "private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }", "public byte getDay() {\r\n return day;\r\n }", "public void dayIsLike() \r\n\t{ \r\n\t\tswitch (day) \r\n\t\t{ \r\n\t\tcase MONDAY: \r\n\t\t\tSystem.out.println(\"Mondays are bad.\"); \r\n\t\t\tbreak; \r\n\t\tcase FRIDAY: \r\n\t\t\tSystem.out.println(\"Fridays are better.\"); \r\n\t\t\tbreak; \r\n\t\tcase SATURDAY: \r\n\t\t\tSystem.out.println(\"Saturdays are better.\"); \r\n\t\t\tbreak;\r\n\t\tcase SUNDAY: \r\n\t\t\tSystem.out.println(\"Weekends are best.\"); \r\n\t\t\tbreak; \r\n\t\tdefault: \r\n\t\t\tSystem.out.println(\"Midweek days are so-so.\"); \r\n\t\t\tbreak; \r\n\t\t} \r\n\t}", "private static String getDate() {\n Scanner input = new Scanner(System.in);\n\n String monthName = input.next();\n int month = monthNum(monthName);\n int day = input.nextInt();\n String date = \"'2010-\" + month + \"-\" + day + \"'\";\n return date;\n }", "public String Identifier(String day){\n if(day.equals(\"Mon\")){\n return \"M\";\n }\n else if(day.equals(\"Tue\")){\n return \"T\";\n }\n else if(day.equals(\"Wed\")){\n return \"W\";\n }\n else if(day.equals(\"Thu\")){\n return \"TH\";\n }\n else if(day.equals(\"Fri\")){\n return \"FR\";\n }\n else if(day.equals(\"Sat\")){\n return \"SA\";\n }\n else{\n return \"SU\";\n }\n }", "public java.lang.String getDay()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DAY$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "protected static int getDay(String dateTime) {\n return Integer.parseInt(dateTime.substring(5, 7));\n }", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "public byte getDay() {\n return day;\n }", "public Day getDay(int dayNum) {\n\t\tif (dayNum <= days.length) {\n\t\t\treturn days[dayNum - 1];\n\t\t}\n\t\treturn null;\n\t}", "static double userOnDay(final float rate, final int day) {\n return Math.pow(rate, day);\n }", "public static void main(String[] args)throws Exception {\n\t\tScanner sc=new Scanner(System.in);\n\t\tSystem.out.println(\"Enter date in dd-MM-yyyy format :\");\n\t\tString s=sc.nextLine();\n\t\tSystem.out.println(getDay(s));\n\t}", "private String getFileOftheDay() throws IOException {\n Calendar calendar = Calendar.getInstance();\n int day = calendar.get(Calendar.DAY_OF_WEEK);\n if (Calendar.SUNDAY == day) {\n day = Calendar.SATURDAY;\n } else if (Calendar.MONDAY <= day && Calendar.SATURDAY >= day) {\n day -= 1;\n }\n return (pathFiles + \"h_\" + day + \"_\" + getCustomerCode() + \".xml\");\n }", "public static int getTodaysDay() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.monthDay;\t\r\n\t\t\r\n\t}", "public Day getDay(int dayVal) {\n int startDay = (dayVal + this.start) % 7; // calculate remainder taking into account start day\n return Day.fromValue(startDay);\n }", "com.czht.face.recognition.Czhtdev.Week getWeekday();" ]
[ "0.71416664", "0.69668883", "0.69322544", "0.6870018", "0.668608", "0.6674964", "0.6639356", "0.6606275", "0.6585972", "0.64474094", "0.6424248", "0.63794225", "0.6371169", "0.6358615", "0.63516885", "0.6338965", "0.6327637", "0.63119304", "0.63093364", "0.63093364", "0.63093364", "0.63093364", "0.63093364", "0.6306722", "0.62976587", "0.62763536", "0.6267976", "0.6267976", "0.6267976", "0.6267976", "0.6267976", "0.62600565", "0.62579256", "0.62528986", "0.6230017", "0.6229481", "0.6210739", "0.6207918", "0.61938906", "0.61780345", "0.61285746", "0.6127316", "0.6115765", "0.6115765", "0.6090044", "0.60899854", "0.608607", "0.6057104", "0.6054357", "0.6049604", "0.6046151", "0.6046151", "0.6046151", "0.6025945", "0.59999317", "0.599466", "0.5991079", "0.5979003", "0.59772575", "0.5972339", "0.5967167", "0.5959155", "0.5959155", "0.59537613", "0.59300977", "0.592721", "0.59178835", "0.5914614", "0.59042406", "0.5896842", "0.58844453", "0.5883375", "0.5883229", "0.5877564", "0.5858562", "0.5845661", "0.5840165", "0.5840165", "0.5826389", "0.5824212", "0.5824212", "0.5824212", "0.5820814", "0.58199465", "0.58132124", "0.581228", "0.5805764", "0.58002275", "0.57936156", "0.5793204", "0.57895976", "0.5785714", "0.5784934", "0.5752872", "0.575255", "0.57502276", "0.5748047", "0.57370704", "0.5733664", "0.5732683", "0.57310605" ]
0.0
-1
Add stripe based on user and date
@Transactional @Modifying @Query("UPDATE Day SET stripes = stripes + ?1 WHERE date = ?2 AND user_id = ?3") void updateStripes(Integer amountOfStripes, LocalDate date, Integer id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "UserAccount createUserAccount(User user, double amount);", "@ThreadConfined(type = ThreadConfined.ThreadType.JFX)\n void addStripe(EventStripe stripe) {\n rootEventStripes.add(stripe);\n nestedEvents.add(stripe);\n }", "void setAsInCharge(User user, Project project, Date date);", "@Override\r\n\tpublic void addUserHopedGetProductDate(PaymentDetails paymentDetails) {\n\r\n\t}", "@Transactional\n\t@Override\n\tpublic void createUser(User user) {\n\t\tString token = UUID.randomUUID().toString();\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.DAY_OF_YEAR, 1);\n\n\t\tuser.setExpiryDate(cal.getTime());\n\t\tuser.setToken(token);\n\t\tAccount account = user.getAccount();\n\t\tRole role = new Role(\"ROLE_CUSTOMER\");\n\t\taccount.setRole(role);\n\t\taccount.setEnabled(false);\n\t\taccountService.createAccount(account);\n\t\tuserRepository.insertUser(user);\n\t\tthis.sendRegistrationToken(user);\n\t}", "@Override\n public void logDeposit(UUID userUUID, double amount) {\n }", "@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}", "@Override\n public void onClick(View view) {\n newUser.setEmail(email.getText().toString());\n newUser.setUsername(email.getText().toString());\n newUser.setPassword(\"password\");\n\n newUser.signUpInBackground(new SignUpCallback() {\n @Override\n public void done(ParseException e) {\n gotItId = ParseUser.getCurrentUser().getObjectId(); //get the latest user id\n\n String url; //url ending\n FormBody body;\n\n //metadata JSON object used to send additional data to Stripe\n JSONObject metadata = new JSONObject();\n try {\n metadata.put(\"gotit_id\", gotItId);\n } catch (JSONException ex) {\n ex.printStackTrace();\n }\n\n //test if creating user with or without a card\n if(isChecked && card != null) {\n card = cardInputWidget.getCard(); //get a Card object from the widget used to enter card details\n\n //add the variables need to send it to the server to the body\n body = new FormBody.Builder()\n .add(\"name\", name.getText().toString())\n .add(\"metadata\", metadata.toString())\n .add(\"email\", email.getText().toString())\n .add(\"phone\", phone.getText().toString())\n .add(\"line1\", line1.getText().toString())\n .add(\"line2\", line2.getText().toString())\n .add(\"city\", city.getText().toString())\n .add(\"state\", state.getText().toString())\n .add(\"postal_code\", postal.getText().toString())\n .add(\"number\", Objects.requireNonNull(card.getNumber()))\n .add(\"exp_month\", Objects.requireNonNull(card.getExpMonth()).toString())\n .add(\"exp_year\", Objects.requireNonNull(card.getExpYear()).toString())\n .add(\"cvc\", Objects.requireNonNull(card.getCvc()))\n .build();\n url=\"create_customer_w_payment\";\n }\n else {\n body = new FormBody.Builder()\n .add(\"name\", name.getText().toString())\n .add(\"metadata\", metadata.toString())\n .add(\"email\", email.getText().toString())\n .add(\"phone\", phone.getText().toString())\n .add(\"line1\", line1.getText().toString())\n .add(\"line2\", line2.getText().toString())\n .add(\"city\", city.getText().toString())\n .add(\"state\", state.getText().toString())\n .add(\"postal_code\", postal.getText().toString())\n .build();\n url = \"create_customer\";\n }\n\n //Create the request to be sent over HTTP\n //TODO: Replace backend_app_id in string.xml\n //TODO: Replace backend_url in string.xml in production\n Request request = new Request.Builder()\n .addHeader(\"applicationId\",getString(R.string.backend_app_id))\n .url(getString(R.string.backend_url) + url)\n .post(body)\n .build();\n\n //make actual call\n //the request must be enqueued to run a different thread\n httpClient.newCall(request).enqueue(new PostCallback(ref));\n\n }\n });\n }", "public Recurring addRecurring(User user, AddRecurringForm recurringForm) {\n\n // validation\n Date now = new Date();\n if(!Util.inMonth(recurringForm.getRecurringAt(), new Date())) {\n throw new DataConstraintException(\"recurringAt\", \"Recurring Date must within \" + Util.toFriendlyMonthDisplay(now) + \" \" + (now.getYear() + 1900));\n }\n // end validation\n Budget budget = findBudgetById(user, recurringForm.getBudgetId());\n budget.setActual(budget.getActual() + recurringForm.getAmount());\n budgetDAO.update(budget);\n\n Recurring recurring = new Recurring();\n recurring.setAmount(recurringForm.getAmount());\n recurring.setLastRunAt(recurringForm.getRecurringAt());\n recurring.setRecurringType(recurringForm.getRecurringType());\n recurring.setBudgetType(budget.getBudgetType());\n recurring.setRemark(recurringForm.getRemark());\n recurring = recurringDAO.addRecurring(recurring);\n\n Transaction transaction = new Transaction();\n transaction.setName(budget.getName());\n transaction.setAmount(recurring.getAmount());\n transaction.setRemark(recurringForm.getRemark());\n transaction.setAuto(Boolean.TRUE);\n transaction.setTransactionOn(recurring.getLastRunAt());\n transaction.setBudget(budget);\n transaction.setRecurring(recurring);\n transactionDAO.addTransaction(transaction);\n\n\n return recurring;\n }", "public void addBuyerCrew(int postIndex, int projectId, int userId, Date currentDate) {\n BuyerCrew buyerCrew = new BuyerCrew();\n BuyerCrewIdentity buyerCrewIdentity = new BuyerCrewIdentity();\n buyerCrewIdentity.setPostindexId(postIndex);\n buyerCrewIdentity.setProjectId(projectId);\n buyerCrewIdentity.setUserId(userId);\n buyerCrew.setBuyerCrewIdentity(buyerCrewIdentity);\n buyerCrew.setPurchaseDate(currentDate);\n\n buyerCrewRepository.save(buyerCrew);\n\n }", "public static String createCharge(Request request, Response response) {\n Stripe.apiKey = \"sk_test_nKon8YMF1HyqAvNgvFpFHGbi\";\n CardChargeMakerParams cm = JsonUtil.getInstance().fromJson(request.body(), CardChargeMakerParams.class);\n\n // Get charge meta information\n String token = cm.getId();\n EntityManager em = DatabaseManager.getInstance().getEntityManager();\n TableSession session = em\n .find(TableSession.class, request.session().attribute(\"TableSessionKey\"));\n Transaction transaction = getCurrentTransaction(session.getRestaurantTable());\n int total = (int) (transaction.getTotal() * 100);\n\n // Create params\n Map<String, Object> params = new HashMap<>();\n params.put(\"amount\", total);\n params.put(\"currency\", \"gbp\");\n params.put(\"description\", \"Your meal at Oaxaca\");\n params.put(\"source\", token);\n\n try {\n // Charge customer card\n Charge charge = Charge.create(params);\n // Change status in database\n em.getTransaction().begin();\n\n Transaction temp = em.find(Transaction.class, transaction.getTransactionId());\n\n temp.setDatetimePaid(new Timestamp(System.currentTimeMillis()));\n temp.setIsPaid(true);\n session.getRestaurantTable().setStatus(TableStatus.NEEDS_CLEANING);\n em.getTransaction().commit();\n NotificationEndpoint.startNotificationService(temp);\n return \"success\";\n } catch (AuthenticationException | InvalidRequestException | CardException | APIConnectionException | APIException e) {\n e.printStackTrace();\n return \"failure\";\n } finally {\n em.close();\n }\n }", "@Override\n public void logWithdrawal(UUID userUUID, double amount) {\n }", "@Override\n\tpublic void Recive(User user, Date logDate) throws ServiceException {\n\n\t}", "public void createUser(User user) throws JsonProcessingException {\n\n userRepo.save(user);\n redis.opsForValue().set(REDIS_USER_KEY_PREFIX+user.getUserId(),user);\n\n\n JSONObject jObj = new JSONObject();\n jObj.put(\"userId\",user.getUserId());\n jObj.put(\"balance\",defaultBalance);\n\n // Produce an event for User Creation ( Would be Consumed by Wallet Creation Service)\n kafka.send(TOPIC_USER_CREATED,user.getUserId(), objectMappper.writeValueAsString(jObj));\n\n\n }", "public void withdraw(String PIN, float amount, String currentDate) {\n String finalDate = ProcessingDates.computeFinalDay(currentDate, this.period);\n if(finalDate.compareTo(currentDate) < 0) {\n System.out.println(\"Daca retrageti bani inainte de data scadenta a contului, va veti pierde dobanda\");\n }\n else if(finalDate == currentDate) {\n if (amount <= this.getCurrentBalance()) {\n this.setCurrentBalance(this.getCurrentBalance() - amount);\n\n AccountStatement accountStatement = new AccountStatement(currentDate, \"Retragere numerar\", \"Debit\", amount);\n this.addAccountStatement(accountStatement);\n System.out.println(\"Retragere realizata cu succes!\");\n } else {\n System.out.println(\"Fonduri insuficiente!\");\n }\n }\n }", "public Timestamp getDateAcct();", "public Timestamp getDateAcct();", "public void addUser(Customer user) {}", "private void fireCreditCardTokenCreation() {\n Card creditCard = binding.creditCardInputWidget.getCard();\n\n Stripe stripe = new Stripe(this, Utils.STRIPE_PUBLISHABLE_KEY);\n stripe.createToken(\n creditCard,\n new TokenCallback() {\n public void onSuccess(Token token) {\n // Credit card token has been successfully created\n // Update order object in database\n placeOrder(token);\n\n progressDialog.dismiss();\n\n // Proceed to confirmation activity\n proceedToConfirmation();\n }\n public void onError(Exception error) {\n // Show localized error message\n Toast.makeText(PaymentActivity.this, error.getLocalizedMessage(), Toast.LENGTH_LONG)\n .show();\n }\n });\n }", "private void chargeUser(double fee, String user, String returnDate, int ISBN) {\r\n\t\tdb.executeAddFee(fee, user);\r\n\t\tdb.validateReturn(user, ISBN, returnDate);\r\n\t}", "private void automaticPayment(String accountName, String reciever, String billName, final int amount, String date) {\n Log.d(TAG, \"makeTransaction: Has been called\");\n final DocumentReference senderDocRef = db.collection(\"users\").document(user.getEmail())\n .collection(\"accounts\").document(accountName);\n\n final DocumentReference recieverDocRef = db.collection(\"companies\").document(reciever);\n\n final DocumentReference billDocRef = db.collection(\"companies\").document(reciever).collection(\"customer\")\n .document(user.getEmail()).collection(\"bills\").document(billName);\n\n db.runTransaction(new Transaction.Function<Void>() {\n @Override\n public Void apply(Transaction transaction) throws FirebaseFirestoreException {\n DocumentSnapshot sender = transaction.get(senderDocRef);\n DocumentSnapshot reciever = transaction.get(recieverDocRef);\n\n\n int senderBalance = sender.getLong(\"balance\").intValue();\n int recieverBalance = reciever.getLong(\"amount\").intValue();\n int transactionBalance = Math.abs(amount);\n\n if (senderBalance >= transactionBalance) {\n transaction.update(senderDocRef, \"balance\", senderBalance - transactionBalance);\n transaction.update(recieverDocRef, \"amount\", recieverBalance + transactionBalance);\n transaction.update(billDocRef, \"isPaid\", true);\n\n\n SimpleDateFormat dateformat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date newDate = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(newDate);\n cal.add(Calendar.MONTH, 1);\n newDate = cal.getTime();\n transaction.update(billDocRef, \"recurring\", dateformat.format(newDate));\n } else {\n Log.d(TAG, \"apply: Transaction ikke fuldført\");\n }\n\n // Success\n return null;\n }\n }).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"Transaction success!\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Transaction failure.\", e);\n }\n });\n\n }", "public ChequingAccount(String id, User owner, Date createdDate) {\n super(id, owner, createdDate);\n }", "private void payAutomaticBills() {\n\n Date date = new Date();\n\n db.collection(\"companies\").document(\"boligforeningen\").collection(\"customer\")\n .document(user.getEmail()).collection(\"bills\").whereEqualTo(\"recurring\", new SimpleDateFormat(\"dd-MM-yyyy\").format(date))\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n\n if (document.getBoolean(\"isPaid\")){\n updateIsPaid(document.getId());\n }\n\n if (document.getBoolean(\"automatic\")) {\n automaticPayment(document.getString(\"fromAccount\"),\n \"boligforeningen\", document.getId(), document.getLong(\"amount\").intValue(), document.getString(\"recurring\"));\n }\n\n\n Log.d(TAG, document.getId() + \" => \" + document.getData());\n }\n } else {\n Log.d(TAG, \"Error getting documents: \", task.getException());\n }\n }\n });\n\n\n }", "public static void getAccountCreatedOn(java.util.Date date) {\n\t\t\n\t\n\t java.sql.Date sqlDate = new java.sql.Date(date.getTime());\n\t\t\n\t\taccounts.clear();\n\n\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t \"from ser322.account,ser322.customer \" + \n\t \"WHERE customer.accID = account.accID AND dateCreated =\" + \"'\" + sqlDate + \"'\";\n\n\t\ttry {\n\t\t\t\n\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t ResultSet rs = stmt.executeQuery(query);\n\t while (rs.next()) {\n\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t \n\t }\n\t \n\t } catch (SQLException e ) {\n\t \tSystem.out.println(\"QUERY WRONG - getAccountCreatedOn\");\n\t }\n\n\t}", "Builder addDateCreated(Date value);", "String addAccount(UserInfo userInfo);", "public static void withdraw(double amount, Date date, Bank bank, String username, User user) {\n\t\tdouble preamount = (bank.userMap.get(username).getAmount());\n\t\tif (amount > preamount) {\n\t\t\tSystem.out.println(\"Insufficient balance.\");\n\n\t\t} else {\n\t\t\tpreamount = preamount - amount;\n\t\t\tbank.userMap.get(username).setAmount(preamount);\n\n\t\t\t// -----------------------------------------------------------------\n\t\t\tObjectOutputStream oos = null;\n\t\t\tString outputFile = \"resource/Bank.txt\";\n\n\t\t\ttry {\n\t\t\t\toos = new ObjectOutputStream(new FileOutputStream(outputFile));\n\n//\t\tSystem.out.println(\"user ye : \"+user);\n\t\t\t\tbank.userMap.replace(username, new User(user.getName(), user.getAddress(), user.getPhone(), username,\n\t\t\t\t\t\tuser.getPassword(), preamount, user.getDate()));\n//\t System.out.println(\"user u \"+user);\n\n\t\t\t\tfor (Entry<String, User> entry : bank.userMap.entrySet())\n\t\t\t\t\toos.writeObject(bank.userMap);\n\t\t\t\toos.close();\n\t\t\t} catch (OptionalDataException e) {\n\t\t\t\tSystem.out.println();\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} finally {\n\t\t\t\tif (oos != null)\n\t\t\t\t\ttry {\n\t\t\t\t\t\toos.close();\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tdepositAmount(String.format(username + \", amount \" + amount + \" debited from your account. Balance - \"\n\t\t\t\t\t+ preamount + \" as on \" + \"%1$tD\" + \" at with \" + \"%1$tT.\", date), bank, username);\n\t\t}\n\n\t\t// -------------------------------------------------------------------\n\n\t}", "void addConfirmedTransaction(int transId, String userId);", "private static void generateAddCustomer(int branchID) {\n long accountNo = getNewAccountNo(branchID);\n int balance = getRandomBalance();\n writeToFile(String.format(\"%d %d\\n\", accountNo, balance));\n }", "public void add (String frist_name, String lastName, String nationality, \n int age, Date commingDate, Date checkOutDate){\n \n String insertTransaction = \"INSERT INTO customer \"+\n \"(First_name, Last_name, nationality, age, coming_date, check_out_date) \"\n +\"values ('\"+frist_name+\"','\"+lastName+\"','\"\n +nationality+\"',\"+age+\",'\"+\n commingDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\n \"', '\"+checkOutDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\"')\";\n try {\n statement.executeUpdate(insertTransaction);//insert into the DB\n } catch (SQLException ex) {\n ex.printStackTrace();\n }finally{\n setQuery(DEFUALT_QUERY);\n }\n }", "public ValueDateRec addValueDate(ValueDateRec valueDate, UserRec usr, String source) \n throws BacException {\n try{\n valueDate = configDM.addValueDate(valueDate, usr, source);\n }catch(Exception ex){\n LOGGER.log(INFO, \"addValueDate DB exception {0}\", ex.getLocalizedMessage());\n throw new BacException(\"Could not save value date \",\"VALDT:01\");\n }\n LOGGER.log(INFO, \"BasicSetup.addValueDate returns value date with id {0}\", valueDate.getId());\n return valueDate;\n }", "Document createAccount(String username, String accountDisplayName,\n String accountFullName, double balance, double interestRate);", "@WebMethod public void addPaymentMethod(Account user,CreditCard e);", "public void addAccountInfo(StringBuilder sb) {\n sb.append(\"\\n\\nUser:\");\n sb.append(getUser());\n sb.append('\\n');\n sb.append(\"Phone:\");\n sb.append(getPhoneNumber());\n int overpaidDays = DonationManager.instance().getOverpaidDays();\n if (overpaidDays > 0) {\n sb.append(\"\\nOverpaid:\");\n sb.append(overpaidDays);\n }\n }", "public AppointmentCard(User user, LocalDate date) {\n this.stage = new Stage();\n this.userId = user.getId();\n this.datePicker.setValue(date);\n System.out.println(\"constructor3: \" + userId);\n }", "private Account createAccount4() {\n Account account = new Account(\"123456004\", \"Chad I. Cobbs\",\n new SimpleDate(4, 23, 1976).asDate(), \"chadc@netzero.com\", true, false,\n new CreditCard(\"1234123412340004\"), new CreditCard(\"4320123412340005\"));\n\n final Percentage percent50 = new Percentage(0.5);\n final Percentage percent25 = new Percentage(0.25);\n account.addBeneficiary(\"Jane\", percent25);\n account.addBeneficiary(\"Amy\", percent25);\n account.addBeneficiary(\"Susan\", percent50);\n return account;\n }", "public void addUser(User u){\n\r\n userRef.child(u.getUuid()).setValue(u);\r\n\r\n DatabaseReference zipUserReference;\r\n DatabaseReference zipNotifTokenReference;\r\n List<String> zipList = u.getZipCodes();\r\n\r\n for (String zipCode : zipList) {\r\n zipUserReference = baseRef.child(zipCode).child(ZIPCODE_USERID_REFERENCE_LIST);\r\n // Add uuid to zipcode user list\r\n zipUserReference.child(u.getUuid()).setValue(u.getUuid());\r\n\r\n // Add notifToken to list\r\n zipNotifTokenReference = baseRef.child(zipCode).child(ZIPCODE_NOTIFICATION_TOKENS_LIST);\r\n zipNotifTokenReference.child(u.getNotificationToken()).setValue(u.getNotificationToken());\r\n\r\n }\r\n }", "public Timestamp getBPJSRegistrationDate();", "Registration registration(long idUser, long idTrail);", "private static void addStripes() {\n double stripeHeight = FLAG_HEIGHT / 13;\n for (int i = 12; i >= 0; i--) {\n PPRect stripe = new PPRect(x0, y0 + i * stripeHeight,\n FLAG_WIDTH, stripeHeight);\n stripe.setColor((i % 2 == 0) ? Color.RED : Color.WHITE);\n slide.add(stripe);\n }\n }", "private Date generateExpirationDate(){\n Calendar c = Calendar.getInstance();\n c.setTime(new Date());\n c.add(Calendar.DAY_OF_WEEK, CommonSecurityConfig.EXPIRATION);\n return c.getTime();\n }", "public void setDateAcct (Timestamp DateAcct);", "public void setDateAcct (Timestamp DateAcct);", "private Map<String, Object> generateJWTToken(Customer user) {\n long timestamp = System.currentTimeMillis();\n String token = Jwts.builder().signWith(SignatureAlgorithm.HS256, Constant.API_SECRET_KEY)\n .setIssuedAt(new Date(timestamp))\n .setExpiration(new Date(timestamp + Constant.TOKEN_VALIDITY))\n .claim(\"userId\", user.getId())\n// .claim(\"email\", user.getEmail())\n// .claim(\"password\", user.getPassword())\n .compact();\n Map<String, Object> map = new HashMap();\n map.put(\"token\", token);\n map.put(\"customer\", user);\n return map;\n\t}", "public void createUserAccount(UserAccount account);", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "private void setupSignInDripFlow() {\n List<DUsers> users = AppConfig.getInstance().getdUsersDAO().findAllInternal();\n if (users == null || users.isEmpty()) return;\n\n LOG.info(\"setupSignInDripFlow total users = \" + users.size());\n\n // anyone who logged-in even 1 hr before the last run time.\n Date recentEnoughLoginTime = new Date(lastRunDate.getTime() - 60*60*1000);\n List<DUsers> recentlyLoggedInUsers = usersLoggedInPostDate(users, recentEnoughLoginTime);\n DripFlows.removeFromProjectInviteFlow(recentlyLoggedInUsers);\n DripFlows.removeFromProjectIncompleteFlow(recentlyLoggedInUsers);\n\n\n List<DUsers> recentlyCreatedUsers = usersCreatedPostDate(users, lastRunDate);\n\n LOG.info(\"setupSignInDripFlow recentlyCreatedUsers = \" + recentlyCreatedUsers.size());\n DripFlows.addToSignInFlow(recentlyCreatedUsers);\n\n LOG.info(\"setupSignInDripFlow post drip call recentlyCreatedUsers = \" + recentlyCreatedUsers.size());\n }", "public AccountingDocumentConfirmation addAccountingDocument(RetailscmUserContext userContext, String accountingDocumentConfirmationId, String name, Date accountingDocumentDate, String accountingPeriodId, String documentTypeId , String [] tokensExpr) throws Exception;", "private void subscribeUser(String callerId) throws DAOException\n\t{\n\t\tUserBean user = new UserBean();\n\n\t\tuser.setMsisdn(callerId);\n\t\tuser.setSubscriptionStatus(Constants.SUBSCRIPTION_STATUS_SUBSCRIBED);\n\t\tuser.save();\n\t}", "public Stripes(String name)\r\n {\r\n super(name);\r\n\t}", "public void setNextChargeTime(Date nextChargeTime) {\n this.nextChargeTime = nextChargeTime;\n }", "public void addUserIntoPools(String userId){\n long timestamp = DateUtil.getCurrentTime()/1000;\n client.zadd(newStarDateRedisKey, timestamp, userId);\n client.zadd(getRedisKey(), 0, userId);\n }", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "public void createESEAccount(String farmerId, String farmerAcctNo, Date txnTime, int type);", "ShipmentItemBilling createShipmentItemBilling();", "private void acceptBid(final String listUserID)\r\n {\r\n //get date and time\r\n Calendar calendar = Calendar.getInstance();\r\n SimpleDateFormat currentDate = new SimpleDateFormat(\"MM-dd-yyyy\");\r\n final String saveCurrentDate = currentDate.format(calendar.getTime());\r\n\r\n //add data into firebase database\r\n bidsRef.child(currentUserID).child(listUserID).addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n //check if data exists\r\n if(dataSnapshot.exists())\r\n {\r\n\r\n\r\n final String estimatedHour = dataSnapshot.child(\"estimated_hour\").getValue().toString();\r\n final String hourlyRate= dataSnapshot.child(\"hourly_rate\").getValue().toString();\r\n\r\n serviceRef.child(currentUserID).child(listUserID).child(\"estimated_hour\").setValue(estimatedHour);\r\n serviceRef.child(currentUserID).child(listUserID).child(\"hourly_rate\").setValue(hourlyRate);\r\n serviceRef.child(currentUserID).child(listUserID).child(\"request_type\").setValue(\"sent\");\r\n serviceRef.child(currentUserID).child(listUserID).child(\"date\").setValue(saveCurrentDate)\r\n .addOnSuccessListener(new OnSuccessListener<Void>() {\r\n @Override\r\n public void onSuccess(Void aVoid) {\r\n //bind data to UI\r\n serviceRef.child(listUserID).child(currentUserID).child(\"hourly_rate\").setValue(hourlyRate);\r\n serviceRef.child(listUserID).child(currentUserID).child(\"estimated_hour\").setValue(estimatedHour);\r\n serviceRef.child(listUserID).child(currentUserID).child(\"request_type\").setValue(\"received\");\r\n serviceRef.child(listUserID).child(currentUserID).child(\"date\").setValue(saveCurrentDate)\r\n .addOnSuccessListener(new OnSuccessListener<Void>() {\r\n //bind data to UI\r\n @Override\r\n public void onSuccess(Void aVoid) {\r\n\r\n bidsRef.child(currentUserID).child(listUserID).removeValue().addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n bidsRef.child(listUserID).child(currentUserID).removeValue().addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if(task.isSuccessful()){\r\n\r\n Toast.makeText(getApplicationContext(), \"Bid Accepted.\", Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n });\r\n }\r\n\r\n }\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n\r\n\r\n }", "private void addPaymentStartEvent() {\n /*09th July 2019, Resolved Pyze library issue*/\n HashMap<String, Object> customAttributes = new HashMap<String, Object>();\n customAttributes.put(\"packageID\", String.valueOf(PackageID));\n customAttributes.put(\"userID\", String.valueOf(UserID));\n customAttributes.put(\"paymentType\", getIntent().getStringExtra(\"PaymentType\"));\n PyzeEvents.PyzeCommercePayment.postPaymentStarted(customAttributes);\n }", "Order setInvoiceCreatedStatus(Order order, User user, Date invoiceDate, Date invoiceDueDate);", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "public void addUser(User user) {\n\t\t\r\n\t}", "public static String addBill(String account, String amount, String duedate){\n return \"insert into current_bills(cb_account,cb_bill,cb_duedate,cb_paid,cb_late) values('\"+account+\"'\"+\",'\"+amount+\"'\"+\",'\"+duedate+\"',0,0)\";\n }", "@Scheduled(cron = \"0 0 1 * * *\")\n\tpublic void removeExpiredPremiumUsers(){\n\t\tIterable <User> users = userDao.findAll();\n\t\tDate now = new Date();\n\t\t\n\t\tfor (User user : users){\n\t\t\tif (user.isPremium()){\n\t\t\t\ttry{\n\t\t\t\t\tif(user.getPremiumExpiryDate().before(now)){\n\t\t\t\t\t\tuser.removePremium();\n\t\t\t\t\t\tuserDao.save(user);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\tcatch(Exception e){\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "Builder addDateCreated(DateTime value);", "void insertCustomerDDPay(CustomerDDPay cddp);", "@Test(groups ={Slingshot,Regression})\n\tpublic void VerifyPaperbillingAddnewUser() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify whether the customer is able to register successfully using MUMV without paperless billing option\");\n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"Switchtopaperlessacctspecificsdata\");\t\t\n\t\tnew LoginAction()\n\t\t.BgbnavigateToLogin()\n\t\t.BgbloginDetails(userProfile);\n\t\tnew MultiUserMultiViewAction()\n\t\t.ClickManageUserLink()\n\t\t.ClickAddNewUserLink()\n\t\t.AddUserRadioButton()\n\t\t.SuperUserCreation()\n\t\t.SuperUserOverlayyes();\t\t\t\t\t\t \t \t\t\t\t\t \t \t\n\t\tnew BgbRegistrationAction()\t\t\n\t\t.AddNewSuperUser_paperaction(userProfile);\t\t\n\t\tnew MultiUserMultiViewAction()\n\t\t.verifyAuditTable(userProfile)\n\t\t.AdduserConfirmationPage();\t\n\t\tnew PaperlessBillingAction()\n\t \t.BgbnavigateToLogin()\n\t\t.PBDirectDebitLogin_Secondlogin(userProfile)\n\t\t.BgbverifyAfterLogin();\t\t\t\t\t\n\t \tnew PaperlessBillingAction()\n\t \t.verifyManageAccountLink(userProfile)\n\t \t.specificpaperlesssetupAction()\t\n\t \t.VerifyAudit_EmailtriggeredAction(userProfile);\n\t}", "public int addCard(int userID) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn CreditCardDA.addCard(userID, number, expirationDate, type, csc);\r\n\t}", "public static void createAccount(Customer customer) {\n\t\tcustomerList.add(customer);\n\t}", "void onUserCreated(FirebaseUser firebaseUser);", "private void seePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nPayments Dashboard\\n\");\n\n\t\t\tOffer offer;\n\t\t\ttry {\n\t\t\t\tlog.info(\"Select an Offer by typing in the id:\\n\");\n\t\t\t\tlog.info(\"\t\tOr press ENTER to quit\\n\");\n\t\t\t\tInteger offer_id = Integer.parseInt(sc.nextLine());\n\t\t\t\toffer = cService.getOfferById(offer_id);\n\t\t\t\tlog.info(\"Current Offer: \" + offer + \"\\n\");\n\t\t\t\tList<Payment> payments = cService.viewUnPaidPayments(user, offer);\n\t\t\t\tpayments.stream().forEach(p -> log.info(p.toString()));\n\n\t\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\t\tlog.info(\"\t\tPress 1 to Make a Payment on an Item\");\n\t\t\t\tlog.info(\"\t\tPress anything else to return to the PURCHASES DASHBOARD\");\n\t\t\t\tString choice = sc.nextLine();\n\t\t\t\tswitch (choice) {\n\t\t\t\tcase \"1\":\n\t\t\t\t\tif (payments.size() > 0) {\n\t\t\t\t\t\tmakePayment(user, sc, payments.get(0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog.info(\"\\nSorry, payments can't be made on this offer!\\n\");\n\t\t\t\t\t\trun = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlog.info(\"\\nGoing back to the PURCHASES DASHBOARD\\n\");\n\t\t\t\t\trun = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException n) {\n\t\t\t\tlog.info(\"\\nPlease type in a valid number. Start all over again.\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while (run);\n\n\t}", "private void managePayments(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"\\nThe Following are your Purchases\\n\");\n\t\t\tList<Offer> offers = cService.seeAllOwnedOffers(user);\n\t\t\toffers.stream().filter(offer -> offer.getStatus().getStatus_name().equals(\"pending\"))\n\t\t\t\t\t.forEach(offer -> log.info(offer.toString()));\n\n\t\t\tlog.info(\"\\nChoose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to See Payments for an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to return to the CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tseePayments(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "public Account() {\n dateCreated = new java.util.Date();\n }", "public Account() {\n dateCreated = new java.util.Date();\n }", "public Account(String firstName, String lastName, String address, String zipCode, Date currentDate) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.address = address;\n this.zipCode = zipCode;\n this.currentDate = currentDate;\n }", "@Override\n\tpublic void create(User user) {\n\t\t\n\t}", "Order setAsInCharge(Order order, User user);", "public OneTimeDonation(float amount, LocalDateTime date) {\n super(amount, date);\n }", "@Override\n public BigDecimal getBalanceAtDate(Date atDate, String customerId, boolean openingBalance, DebtorsParameters param, EMCUserData userData) {\n BigDecimal balance = BigDecimal.ZERO;\n\n if (openingBalance) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(atDate);\n cal.add(Calendar.DAY_OF_YEAR, -1);\n\n atDate = cal.getTime();\n }\n\n //Use aging to get balance at date.\n List<DebtorsAgingHelper> balanceAgingHelpers = this.getDebtorsAging(customerId, atDate, DebtorsAgingMode.NONE, null, param, userData);\n\n for (DebtorsAgingHelper balanceAgingHelper : balanceAgingHelpers) {\n balance = balance.add(balanceAgingHelper.getBinAmount());\n }\n\n //Add unallocated credit to balance\n //Reverse sign.\n balance = balance.add(getTotalUnallocatedCredit(customerId, atDate, userData).multiply(new BigDecimal(-1)));\n\n return balance;\n }", "@Override\n\tpublic void addNewUser(User user) {\n\t\tusersHashtable.put(user.getAccount(),user);\n\t}", "@Transactional//to interacting with the relational database\n //Create method called signup inside this class which take RegisterRequest as input\n /*1*/ public void signup(RegisterRequest registerRequest) throws SpringRedditException {\n //the first thing we create an object for the user class\n User user = new User();\n //and we will map the data we have from the register request object to the user object\n user.setUsername(registerRequest.getUsername());\n user.setEmail(registerRequest.getEmail());\n user.setPassword(passwordEncoder.encode(registerRequest.getPassword()));\n /*pass in value as instant.now => this is java class took at current time\n and lastly we will disable and set it false\n */\n user.setEnabled(false);\n //save\n userRepository.save(user);\n /*5*/ //create verified user via email using UUID to generate\n String token = generateVerificationToken(user);\n //after that, create mailTemp.html\n /*6*/ //right after generate verification token method\n\n mailService.sendMail(new NotificationEmail(\"Please Active Your Account\", user.getEmail(), \"Thank you for signing up to Spring Reddit,\" +\n \" please click on the below url to activate your account : \"\n + \"http://localhost:8080/api/auth/accountVerification\" + \"/\" + token));\n }", "private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }", "private void addDailyFoodLog(User user, JSONObject foodLogObject) {\n DailyFoodLog dailyFoodLog = new DailyFoodLog();\n\n String date = foodLogObject.getString(\"date\");\n dailyFoodLog.setDate(date);\n\n JSONArray jsonArray = foodLogObject.getJSONArray(\"entries\");\n for (Object json : jsonArray) {\n JSONObject jsonEntry = (JSONObject) json;\n String meal = jsonEntry.getString(\"meal\");\n String food = jsonEntry.getString(\"food\");\n int calories = jsonEntry.getInt(\"calories\");\n int protein = jsonEntry.getInt(\"protein\");\n int fat = jsonEntry.getInt(\"fat\");\n int carbs = jsonEntry.getInt(\"carbs\");\n\n Entry entry = new Entry(meal,food,calories);\n entry.setMacros(protein,fat,carbs);\n dailyFoodLog.addEntry(entry);\n }\n user.addDailyFoodLog(dailyFoodLog);\n }", "@PostMapping(\"/payment_info/{userId}\")\n\t public payment_info createPaymentInfo(@PathVariable(value = \"userId\") String userId, \n\t \t\t@Valid @RequestBody payment_info paymentInfo) {\n\t \t\n\t \tpaymentInfo.setUserId(userId);\n\t \t//paymentInfo.setCardNumber(convert(paymentInfo.getCardNumber()));\n\t return paymentInfoRepository.save(paymentInfo);\n\t }", "public Date getRealBillingDate(final Context context)\r\n {\r\n Date billingDate = getBillingDate();\r\n\r\n // Only monthly recharge needs prebill\r\n if (isRecurringRecharge() && SafetyUtil.safeEquals(getChargingCycle(), ChargingCycleEnum.MONTHLY) && !getSub().isPrepaid())\r\n {\r\n boolean isPreBilled = false;\r\n \r\n try\r\n {\r\n if (isPreBilled(context))\r\n {\r\n billingDate = CalendarSupportHelper.get(context).getDayBefore(billingDate);\r\n }\r\n }\r\n catch (final Throwable t)\r\n {\r\n LogSupport.minor(context, this, \"invalid SPID\");\r\n /*\r\n * the chance for such such exception is really low, we can afford to ignore\r\n * it.\r\n */\r\n }\r\n \r\n }\r\n if(getSub().isPrepaid())//The billing date is set in context only to modify receive date using bill date in PPSM transaction for prepaid. \r\n context.put(PostpaidSupportMsisdnTransHome.PPSM_BILLING_DATE,billingDate.getTime()); \r\n\r\n\r\n return billingDate;\r\n }", "void addBankAccount(Klant klant) throws SessionExpiredException, IllegalArgumentException, RemoteException;", "@Override\r\n\t\tpublic boolean addDev(Dev_User user) {\n\t\t int flag= session.insert(\"com.app.dao.AppMapper.insDev\", user); \r\n\t\t if(flag>0){\r\n\t\t\t return true;\r\n\t\t }\r\n\t\t else{\r\n\t\t\treturn false;\r\n\t\t }\r\n\t\t}", "public List<UserCard> addCard(Goods goods,long num,List<UserCard> userCards){\n UserCard userCard = new UserCard();\n userCard.setGoods(goods);\n userCard.setNum(num);\n userCards.add(userCard);\n System.out.println(userCard);\n return userCards;\n }", "void setUserCreated(final Long userCreated);", "Account create();", "@Override\r\n\tpublic void add(User user) {\n\r\n\t}", "private boolean upsertCreditCard(CreditCardSetupForm form, long ccId, User user, JoinDealSessionObject jdso) {\n CreditCardDetail ccd = ccId > 0 ? CreditCardDetail.getById(ccId) : new CreditCardDetail();\n\n ccd.setFirstName(form.getFirstName());\n ccd.setLastName(form.getLastName());\n ccd.setAddress1(form.getAddress1());\n ccd.setAddress2(form.getAddress2());\n ccd.setCity(form.getCity());\n ccd.setState(form.getState());\n ccd.setZipCode(form.getZipCode());\n ccd.setCountry(form.getCountry());\n ccd.setCardholderName(form.getCardholderName());\n ccd.setCreditCardNum(form.getCreditCardNumber()); // not to be persisted in DB\n ccd.setCardType(form.getCardType());\n ccd.setCvv(form.getCvv());\n ccd.setLastFour(CreditCardUtil.getEncodedLastFourDigits(form.getCreditCardNumber()));\n ccd.setExpiryDate(DateUtils.getDateFromMonthYear(\n Integer.parseInt(form.getExpMonth())-1, Integer.parseInt(form.getExpYear())));\n ccd.setUserId(user.getUserId());\n\n Date now = new Date();\n if (ccId <= 0) {\n ccd.setDateCreated(now);\n }\n ccd.setDateModified(now);\n ccd.setDoNotSaveToDb(form.isDoNotSave());\n \n jdso.setCreditCardDetail(ccd);\n if(form.isSameAsShippingAddr()) {\n ShippingAddress shAddr = new ShippingAddress();\n shAddr.setUserId(user.getUserId());\n shAddr.setAddress1(ccd.getAddress1());\n shAddr.setAddress2(ccd.getAddress2());\n shAddr.setCity(ccd.getCity());\n shAddr.setState(ccd.getState());\n shAddr.setZipCode(ccd.getZipCode());\n shAddr.setCountry(ccd.getCountry());\n shAddr.setFirstName(ccd.getFirstName());\n shAddr.setLastName(ccd.getLastName());\n shAddr.setDoNotSaveToDb(ccd.isDoNotSaveToDb());\n jdso.setShippingAddress(shAddr);\n } else {\n // reset shipping whenever checkbox is unchecked (i.e. in edit mode) and next is pressed.\n jdso.setShippingAddress(null);\n }\n \n return true;\n }", "public void setRegisterDateTime(Date dateTime) { this.registerDateTime = dateTime; }", "@Override\n public BigDecimal getTotalUnallocatedCredit(String customerId, Date atDate, EMCUserData userData) {\n BigDecimal outstandingCredit = null;\n\n //Get total outstanding credits for customer, which existed at atDate\n EMCQuery query = new EMCQuery(enumQueryTypes.SELECT, DebtorsOpenTransactions.class);\n query.addFieldAggregateFunction(\"credit\", \"SUM\");\n query.addFieldAggregateFunction(\"creditAmountSettled\", \"SUM\");\n\n //Customer is optional.\n if (customerId != null) {\n query.addAnd(\"customerId\", customerId);\n }\n\n //Bev requested that we remove this check. This will now show all unallocated credits,\n //regardless of whether or not they existed at atDate.\n //query.addAnd(\"createdDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n //Check that future payments are not included.\n query.addAnd(\"transactionDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n Object[] creditTotals = (Object[]) util.executeSingleResultQuery(query, userData);\n\n if (creditTotals != null) {\n BigDecimal totalCredit = creditTotals[0] == null ? BigDecimal.ZERO : (BigDecimal) creditTotals[0];\n BigDecimal totalCreditSettled = creditTotals[1] == null ? BigDecimal.ZERO : (BigDecimal) creditTotals[1];\n\n outstandingCredit = totalCredit.subtract(totalCreditSettled);\n }\n\n //If atDate less than today, ignore updates made to transactions between atDate and today.\n //Only check dates, not time\n Calendar atCalendar = Calendar.getInstance();\n atCalendar.setTime(atDate);\n atCalendar.set(Calendar.HOUR, 0);\n atCalendar.set(Calendar.MINUTE, 0);\n atCalendar.set(Calendar.SECOND, 0);\n atCalendar.set(Calendar.MILLISECOND, 0);\n\n Calendar nowCalendar = Calendar.getInstance();\n nowCalendar.setTime(Functions.nowDate());\n nowCalendar.set(Calendar.HOUR, 0);\n nowCalendar.set(Calendar.MINUTE, 0);\n nowCalendar.set(Calendar.SECOND, 0);\n nowCalendar.set(Calendar.MILLISECOND, 0);\n\n if (atCalendar.compareTo(nowCalendar) < 0) {\n EMCQuery creditQuery = new EMCQuery(enumQueryTypes.SELECT, DebtorsTransactionSettlementHistory.class);\n creditQuery.addFieldAggregateFunction(\"creditSettled\", \"SUM\");\n //Only include transactions that existed on atDate. Bev requested that we remove this check.\n //creditQuery.addAnd(\"transactionCreatedDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n //Only include transactions that fall on or before atDate.\n creditQuery.addAnd(\"creditTransactionDate\", atDate, EMCQueryConditions.LESS_THAN_EQ);\n\n //Customer Id is optional.\n if (customerId != null) {\n creditQuery.addAnd(\"customerId\", customerId);\n }\n\n //Only include transactions settled after atDate\n creditQuery.addAnd(\"createdDate\", atDate, EMCQueryConditions.GREATER_THAN);\n\n BigDecimal creditSettled = (BigDecimal) util.executeSingleResultQuery(creditQuery, userData);\n if (creditSettled == null) {\n creditSettled = BigDecimal.ZERO;\n }\n\n outstandingCredit = outstandingCredit.add(creditSettled);\n }\n\n return outstandingCredit;\n }", "private void makeDeposit() {\n\t\t\r\n\t}", "private void addUserAsMarker() {\n firestoreService.findUserById(new OnUserDocumentReady() {\n @Override\n public void onReady(UserDocument userDocument) {\n if(userDocument != null && userDocument.getUserid().equals(preferences.get(\"user_id\",0L))) {\n String id = preferences.get(DOCUMENT_ID, \"\");\n //Add current user to ListInBounds\n userDocumentAll.setDocumentid(id);\n userDocumentAll.setUsername(userDocument.getUsername());\n userDocumentAll.setPicture(userDocument.getPicture());\n userDocumentAll.setLocation(userDocument.getLocation());\n userDocumentAll.setFollowers(userDocument.getFollowers());\n userDocumentAll.setIsvisible(userDocument.getIsvisible());\n userDocumentAll.setIsprivate(userDocument.getIsprivate());\n userDocumentAll.setIsverified(userDocument.getIsverified());\n userDocumentAll.setUserid(userDocument.getUserid());\n userDocumentAll.setToken(userDocument.getToken());\n oneTimeAddableList.add(userDocumentAll);\n }\n }\n\n @Override\n public void onFail() {\n\n }\n\n @Override\n public void onFail(Throwable cause) {\n\n }\n });\n\n }", "if (payDateTime == adhocTicket.getPaidDateTime()) {\n System.out.println(\"Paid Date Time is passed\");\n }", "Date getNextIncomeDate() throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }", "@Override\n public Date getRegistrationDate() {\n return null;\n }", "public void insertNewDay(User user, long time, float distance) {\n TrackingRecord updateRecord = user.getRecords().newDayRecord(time, distance);\n Map<String, Object> data = new HashMap<>();\n data.put(\"records\", updateRecord);\n\n fStore.collection(DB_NAME).document(getID()).set(data, SetOptions.merge());\n }", "public void addPatientForLocalUser(final String patientTz, final Context context){\n db.collection(Constants.PATIENTS_COLLECTION_FIELD).whereEqualTo(Constants.TZ_FIELD, patientTz).get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n boolean patientExists = false;\n for (QueryDocumentSnapshot myDoc : task.getResult()) {\n patientExists = true;\n final Patient patient = myDoc.toObject(Patient.class);\n // return if user already treats/follows this patient\n if (localUser.getPatientIds().contains(patient.getId())){\n Toast.makeText(context, context.getString(R.string.already_following_patient_message), Toast.LENGTH_LONG).show();\n return;\n }\n // add as caregiver iff user is patient's caregiver\n if (patient.hasCaregiverWithId(localUser.getId()) && !localUser.getPatientIds().contains(patient.getId())){\n Toast.makeText(context, context.getString(R.string.added_patient_as_caregiver_message), Toast.LENGTH_LONG).show();\n localUser.addPatientId(patient.getId());\n updateUserInDatabase(localUser);\n }\n // add as friend iff user is patient's friend\n if (patient.hasFriendWithId(localUser.getId()) && !localUser.getPatientIds().contains(patient.getId())){\n Toast.makeText(context, context.getString(R.string.added_patient_as_friend_message), Toast.LENGTH_LONG).show();\n localUser.addPatientId(patient.getId());\n updateUserInDatabase(localUser);\n }\n // display error message if user isn't treating/following this patient\n else {\n String message = context.getString(R.string.friend_unable_to_add_patient_message);\n if (localUser.isCareGiver()){\n message = context.getString(R.string.caregiver_unable_to_add_patient_message);\n }\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }\n }\n if (!patientExists){\n // caregivers can create new patients\n if (localUser.isCareGiver()){\n ((PatientsListActivity)context).openActivityAddPatient(patientTz);\n }\n }\n }\n }\n });\n }", "public void createUserAndFundFromCash(\n constants.core.clientExperience.Constants.BrokerageAccountType desiredAccountType,\n constants.core.clientExperience.Constants.BankAccountType cashAccountType,\n constants.core.clientExperience.Constants.BrokerageAccountType destinationAccountType) throws Exception {\n\n AdvisorSplashPage advisorSplashPage = new AdvisorSplashPage(getDriver());\n AddAccountsPage addAccountsPage = signupUser(advisorSplashPage, Constants.LastName.PREMIUM_INDIVIDUAL);\n\n DepositCashForm depositCashForm = addAccountsPage.clickOpenDepositCashBtn();\n addAccountsPage = depositCashForm.reportCashAccount(\n desiredAccountType,\n \"5000\",\n cashAccountType,\n getFreeGaslampUser().routingNumber,\n getFreeGaslampUser().accountNumber);\n\n ReviewTransfersPage reviewTransfersPage = addAccountsPage.navigateToReviewTransfersPage();\n softAssert.assertTrue(reviewTransfersPage.verifyDestinationAccountType(0, destinationAccountType));\n\n ManagedApplicationPage managedApplicationPage = reviewTransfersPage.clickOnNextBtn();\n enrollFreeUserToPremium(managedApplicationPage);\n\n PaperworkStatusPage paperworkStatusPage = managedApplicationPage.navigateToPaperworkStatusPage();\n DocuSignPage docuSignPage = paperworkStatusPage.waitForPageToTransitionToDocuSign();\n paperworkStatusPage = docuSignPage.skipDocusign();\n PremiumRetirementDashboardPage retirementDashboardPage = paperworkStatusPage.clickOnGoToDashboard();\n\n softAssert.assertTrue(retirementDashboardPage.isClientEnrolling());\n\n retirementDashboardPage.header.logOut();\n softAssert.assertAll();\n }" ]
[ "0.55725425", "0.55714405", "0.55524015", "0.5452496", "0.5241146", "0.5224819", "0.5216838", "0.5161876", "0.5110458", "0.5099528", "0.5059709", "0.50437206", "0.50426805", "0.5037811", "0.5025624", "0.50210035", "0.50210035", "0.5011103", "0.49474055", "0.49133486", "0.49082384", "0.48792228", "0.48781478", "0.48534796", "0.48380727", "0.48345432", "0.48199332", "0.47928718", "0.47827166", "0.47773212", "0.47657287", "0.47637442", "0.47633955", "0.47286168", "0.472807", "0.47236934", "0.47211012", "0.47190154", "0.47068536", "0.46985802", "0.46970195", "0.46952", "0.46952", "0.4692098", "0.4676091", "0.4674308", "0.4673196", "0.46477962", "0.46444947", "0.46371335", "0.46320188", "0.4630037", "0.46238768", "0.46211362", "0.4619961", "0.46111304", "0.46087414", "0.46063998", "0.46018043", "0.45913008", "0.4590587", "0.45812437", "0.45781618", "0.45672068", "0.45644435", "0.4557916", "0.45569095", "0.4553446", "0.45515043", "0.4550662", "0.4547479", "0.4547479", "0.45457083", "0.45440468", "0.4543488", "0.4535805", "0.45341533", "0.4529469", "0.45291844", "0.45180482", "0.4516292", "0.45150718", "0.45148122", "0.4513793", "0.45135456", "0.45120427", "0.45116243", "0.4508776", "0.45072263", "0.4504805", "0.4496734", "0.44965333", "0.44962722", "0.44928643", "0.44897288", "0.4488451", "0.44817948", "0.44797176", "0.44777447", "0.4477396" ]
0.5825072
0
Downloading data in nonui thread
@Override protected String doInBackground(String... url) { // For storing data from web service String data = ""; try{ // Fetching the data from web service data = downloadUrl(url[0]); }catch(Exception e){ Log.d("Background Task",e.toString()); } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void download() {\r\n\t\t\ttThread = new Thread(this);\r\n\t\t\ttThread.start();\r\n\t\t}", "protected void download() {\r\n\t\tsetState(DOWNLOADING);\r\n\t\t\r\n\t\tThread t = new Thread(this);\r\n\t\tt.start();\r\n\t}", "private void startDownload(){\n final DownloadCurrent downloadCurrent = new DownloadCurrent(this);\n downloadCurrent.execute(UpdateTalesData.sData_HTTP);\n sProgDialDownload.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n downloadCurrent.cancel(true);\n }\n });\n\n }", "@Override\n protected String doInBackground(String... url) {\n String data = \"\";\n try {\n // Gui request len\n data = downloadUrl(url[0]);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return data;\n }", "public void retrieveThread() {\n\t\tRunnable runScrape = () -> {\n\t\t\ttry {\n\t\t\t\tPlatform.runLater(() -> { //enables non-FX application thread to update UI elements\n\t\t\t\t\tsetLoadingTxt(\"Getting data...\");\n\t\t\t\t\tsetErrorTxt(\"\");\n\t\t\t\t});\n\t\t\t\tscraper.retrieve(url.getText());\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tPlatform.runLater(() -> setErrorTxt(\"Error: could not retrieve data\"));\n\t\t\t}\n\t\t\tPlatform.runLater(() -> setLoadingTxt(\"\"));\n\t\t};\n\t\tThread t = new Thread(runScrape);\n\t\tt.start();\n\t}", "public void downloadImage(View v)\n {\n\n String url=editText.getText().toString();\n Thread mythread=new Thread(new downloadImagesUsingWorkerThread(url));\n mythread.start();\n // downloadImagesUsingThreads(listofImages[0]);//must not do this downloading on main thread\n }", "private void startRtDownload(final DataObject data){\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (streaming_rt) {\n\t\t\t\t\trunOnUiThread(new Runnable() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tdata.setValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(35);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t}", "private void btnDownloadActionPerformed(java.awt.event.ActionEvent evt) {\n path = JOptionPane.showInputDialog(\"Digite o local de destino do arquivo:\");\n System.out.println(\"Path\" + path);\n if (rbBpa.isSelected()) {\n site = \"ftp://arpoador.datasus.gov.br/siasus/BPA/\";\n } else {\n site = \"ftp://arpoador.datasus.gov.br/siasus/sia/\";\n }\n resposta = Download.terminou;\n System.out.println(\"Resposta \" + resposta);\n\n new Thread() {\n public void run() {\n progress.setValue(0);\n progress.setStringPainted(true);\n// Download.downloadArquivo(site, path);\n for (int i = 0; i < 101; i++) {\n progress.setValue(i);\n progress.setString(i + \"%\");\n try {\n Thread.sleep(100);\n } catch (InterruptedException err) {\n\n }\n if (i == 5) {\n lbMsg.setText(\"Baixando arquivo.\");\n }\n if (i > 5) {\n while (resposta != true) {\n Download.downloadArquivo(site, path);\n lbMsg.setText(\"Baixando arquivo....\");\n resposta = Download.terminou;\n }\n }\n if (i == 100) {\n lbMsg.setText(\"Arquivo baixado\");\n }\n }\n }\n }.start();\n\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}", "@Override\r\n\t\t\tprotected String doInBackground(String... url) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdata = downloadUrl(url[0]);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tLog.d(\"Background Task\", e.toString());\r\n\t\t\t\t}\r\n\t\t\t\treturn data;\r\n\t\t\t}", "private void downloadInBackground(){\n\t\tdownloadResourceInBackground(imageUrl1, R.id.dl_image_1, R.id.dl_progressbar_1);\n\t\tdownloadResourceInBackground(imageUrl2, R.id.dl_image_2, R.id.dl_progressbar_2);\n\t\tdownloadResourceInBackground(imageUrl3, R.id.dl_image_3, R.id.dl_progressbar_3);\n\t\tdownloadResourceInBackground(imageUrl4, R.id.dl_image_4, R.id.dl_progressbar_4);\n\t\tdownloadResourceInBackground(imageUrl5, R.id.dl_image_5, R.id.dl_progressbar_5);\n\t}", "@Override\n protected String doInBackground(String... url) {\n try {\n data = downloadUrl(url[0]);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "@Override\n protected String doInBackground(String... url) {\n try {\n data = downloadUrl(url[0]);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "@Override\n\t\tprotected String doInBackground(String... url)\n\t\t{\n\n\t\t\t// For storing data from web service\n\t\t\tString data = \"\";\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Fetching the data from web service\n\t\t\t\tdata = MainActivity.this.downloadUrl(url[0]);\n\t\t\t} catch (Exception e)\n\t\t\t{\n\t\t\t\tLog.d(\"Background Task\", e.toString());\n\t\t\t}\n\t\t\treturn data;\n\t\t}", "public void download() {\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tDownloadDialog dialog = new DownloadDialog(Database.currentActivity, text, list);\r\n\t\t\t\tdialog.show();\r\n\t\t\t}", "private void requestData(String uri) {\n MyTask myTask = new MyTask();\n\n // Work parralial\n myTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, uri);\n }", "public void testDownloadFile(){\n final String url = \"http://www.zebrai.cn/login/picture/getCaptcha\";\n new Thread(new Runnable() {\n @Override\n public void run() {\n downloadFile(url);\n }\n }).start();\n\n }", "@Override\n\t\tprotected String doInBackground(String... url) {\n\n\t\t\t// For storing data from web service\n\t\t\tString data = \"\";\n\n\t\t\ttry {\n\t\t\t\t// Fetching the data from web service\n\t\t\t\tdata = downloadUrl(url[0]);\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Background Task\", e.toString());\n\t\t\t}\n\t\t\treturn data;\n\t\t}", "public void downloadData() {\n\t\tint start = millis();\n\t\tdthread = new DaysimDownloadThread();\n\t\tdthread.start();\n\t\tdataready = false;\n\t\twhile(!dataready) {\n\t\t\tif((millis() - start)/175 < 99) {\n\t\t\t\tLightMaskClient.setMainText(\"\\n\\n\" + \"Downloading: \" + (millis() - start)/175 + \"% completed\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tLightMaskClient.setMainText(\"Downloading: \" + 99 + \"% completed\");\n\t\t\t}\n\t\t\tdelay(100);\n\t\t}\n\t\tdthread.quit();\n\t\tLightMaskClient.setMainText(\"\\n\\n\" + \"Downloading: 100% completed\");\n\t\tToolkit.getDefaultToolkit().beep();\n\t\tdelay(1000); \n\t\tLightMaskClient.setMainText(\"Please disconnect the Daysimeter\");\n\t\tLightMaskClient.dlComplete = true;\n\t\t//setup the download for processing\n\t\tfor(int i = 0; i < EEPROM.length; i++) {\n\t\t\tEEPROM[i] = bytefile1[i] & 0xFF;\n\t\t}\n\t \n\t\tfor(int i = 0; i < header.length; i++) {\n\t\t\theader[i] = bytefile2[i] & 0xFF;\n\t\t}\n\t\t\n\t\tasciiheader = MakeList(header);\n\t\tisnew = asciiheader[2].contains(\"daysimeter\");\n\t\tisUTC = asciiheader[1].contains(\"1.3\") || asciiheader[1].contains(\"1.4\")\n\t\t\n\t\torganizeEEPROM();\n\t\tprocessData();\n\t\tsavefile();\n\t}", "private void fetchData() {\r\n if (fetchDialogDataInBackground != null && fetchDialogDataInBackground.getStatus() != AsyncTask.Status.FINISHED)\r\n fetchDialogDataInBackground.cancel(true);\r\n fetchDialogDataInBackground = new FetchDialogDataInBackground();\r\n fetchDialogDataInBackground.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\r\n }", "@Override\r\n\tpublic void download() {\n\t\t\r\n\t}", "@Override\n public void run() {\n DownloadListener.getListener().execute();\n }", "@Override public String Async_key() {return Key_wiki_download;}", "@Override\r\n\t protected String doInBackground(String... url) {\r\n\t \r\n\t // For storing data from web service\r\n\t String data = \"\";\r\n\t \r\n\t try{\r\n\t // Fetching the data from web service\r\n\t data = downloadUrl(url[0]);\r\n\t }catch(Exception e){\r\n\t Log.d(\"Background Task\",e.toString());\r\n\t }\r\n\t return data;\r\n\t }", "private void getData(){\r\n \tsetProgressBarIndeterminateVisibility(true);\r\n \t\r\n\t String url = \"HospitalInfo?hospital=\" + URLEncoder.encode(hospital) + \"&ssid=\" + UserInfo.getSSID();\r\n\t download = new HttpGetJSONConnection(url, mHandler, TASK_GETDATA);\r\n\t download.start();\r\n }", "@Override\r\n protected String doInBackground(String... url) {\n String data = \"\";\r\n\r\n try {\r\n // Fetching the data from web service\r\n data = downloadUrl(url[0]);\r\n Log.d(\"Background Task data\", data.toString());\r\n } catch (Exception e) {\r\n Log.d(\"Background Task\", e.toString());\r\n }\r\n return data;\r\n }", "@Override\n protected String doInBackground(String... url) {\n\n // Increment progress up to half of total background processing\n while(progress_status < 50){\n\n progress_status += 2;\n\n // send progress to UI thread\n publishProgress(progress_status);\n\n // sleep to show progress bar\n SystemClock.sleep(SLEEP_DURATION);\n }\n\n String s = null;\n try {\n\n // Download directions with url\n s = downloadUrl(url[0]);\n }\n catch (IOException e) {\n Log.d(\"Background Task\",e.toString());\n }\n\n // Return a string with xml data\n return s;\n }", "@Override\r\n protected void onPostExecute(String file_url) {\r\n System.out.println(\"Downloaded\");\r\n }", "@Override\n protected String doInBackground(String... url) {\n String data = \"\";\n\n try{\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n }catch(Exception e){\n Log.d(\"Background Task\",e.toString());\n }\n\n return data;\n }", "private void download()\n {\n if(mDownloadConnection!=null && mDownloadConnection.mBinder!=null)\n {\n if (mDownloadConnection.mBinder.download(\"file1\"))\n {\n mTvFilename.setText(\"file1\");\n }\n }\n }", "@Override\r\n protected String doInBackground(String... url) {\r\n\r\n // For storing data from web service\r\n String data = \"\";\r\n\r\n try{\r\n // Fetching the data from web service\r\n data = downloadUrl(url[0]);\r\n }catch(Exception e){\r\n Log.d(\"Background Task\",e.toString());\r\n }\r\n return data;\r\n }", "private void startDownloadActivity() {\n checking();\n numDownloading = 0;\n updateMax = 0;\n updateProgress = 0;\n readPref();\n writePref();\n update();\n }", "private void downloadRtData(){\n\t\ttry {\n\t\t\tif (socket != null) {\n\t\t\t\tInputStream inStream = socket.getInputStream();\n\t\t\t\tParser.readRtData(inStream, \"MainActivity\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.d(\"IOException\", \"Exception downloading real time data\");\n\t\t}\n\t}", "@Override\n protected String doInBackground(String... url) {\n String data = \"\";\n try {\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n Log.d(\"Background Task data\", data.toString());\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "@Override\n protected String doInBackground(String... url) {\n try{\n Log.d(\"URL:\",url[0]);\n data = downloadUrl(url[0]);\n }catch(Exception e){\n Log.d(\"Background Task\",e.toString());\n }\n return data;\n }", "@Override\n public void run() {\n downloadInfo.state = STATE_DOWNLOADING;\n notifyStateChange(downloadInfo);\n\n //6.specific download, two kinds of education\n // re-download and resume downloads\n Request request;\n File file = new File(downloadInfo.path);\n if (!file.exists() || file.length() != downloadInfo.currentLength) {\n //file is not exists, or file size in downloadInfo saved inconsistent\n //the file is invalid\n file.delete();\n downloadInfo.currentLength = 0;\n\n //need to re-download\n String url = String.format(Url.APP_DOWNLOAD, downloadInfo.downloadUrl);\n request = new Request.Builder().url(url).build();\n } else {\n //need to resume download\n String url = String.format(Url.APP_BREAK_DOWNLOAD, downloadInfo.downloadUrl, downloadInfo.currentLength);\n request = new Request.Builder().url(url).build();\n }\n\n Response response = null;\n InputStream is = null;\n FileOutputStream fos = null;\n\n try {\n response = okHttpClient.newCall(request).execute();\n is = response.body().byteStream();\n\n if (response != null && is != null) {\n fos = new FileOutputStream(file, true);\n\n byte[] buffer = new byte[1024 * 8];\n int len = -1;\n while ((len = is.read(buffer)) != -1 && downloadInfo.state == STATE_DOWNLOADING) {\n fos.write(buffer, 0, len);\n fos.flush();\n\n downloadInfo.currentLength = downloadInfo.currentLength + len;\n notifyProgressChange(downloadInfo);\n }\n } else {\n //the server return an error\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n } finally {\n try {\n fos.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //handle the case did not come here,there are has three situation\n //1.download finish 2.download error 3.download pause\n if (file.length() == downloadInfo.currentLength && downloadInfo.state == STATE_DOWNLOADING) {\n //说明下载完成\n downloadInfo.state = STATE_FINISH;\n notifyStateChange(downloadInfo);\n } else if (downloadInfo.state == STATE_PAUSE) {\n notifyStateChange(downloadInfo);\n } else {\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n //requires runnable is removed from the current from downloadTaskMap at the end of the task\n downloadTaskMap.remove(downloadInfo.id);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tLooper.prepare();\n\t\t\t\tif (syncArticleContent()) {\n\t\t\t\t\thandler.sendEmptyMessage(OFFLINE_DOWNLOAD);\n\t\t\t\t}\n\t\t\t}", "@Override\n protected String doInBackground(String... url) {\n String data = \"\";\n\n try {\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n Log.d(\"Background Task data\", data.toString());\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "@Override\n protected String doInBackground(String... url) {\n String data = \"\";\n\n try {\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n Log.d(\"Background Task data\", data.toString());\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "@Override\n protected String doInBackground(String... url) {\n String data = \"\";\n\n try {\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n Log.d(\"Background Task data\", data.toString());\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\n\t\t\t((Activity) mContext).runOnUiThread(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\n\t\t}", "@Override\n\tpublic void handleDownloadThreadUpdate(final DownloadTask dt) {\n\t\t// we want to modify the progress bar so we need to do it from the UI thread \n\t\t// how can we make sure the code runs in the UI thread? use the handler!\n\t\thandler.post(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tint total = downloadThread.getTotalQueued();\n\t\t\t\tint completed = downloadThread.getTotalCompleted();\n\n\t\t\t\t//System.out.println(\"progress so far: \" + completed + \" / \" + total);\n\n\t\t\t\tif(dt instanceof NfcTagServerTask)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\thandleBusStop((String) dt.getResult());\n\t\t\t\t\tsetProgressBarVisible(false);\n\t\t\t\t}\n\n\n\n\n\t\t\t}\n\t\t});\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tbm = getBitmap(url);\n\t\t\tdownLoaderListenner.onDownLoadSuccess(bm,url);\n\t\t}", "@Override\n protected String doInBackground(String... url) {\n String data = \"\";\n\n try {\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n// Log.e(\"Background Task data\", data.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return data;\n }", "@Override\n public void run() {\n load_remote_data();\n }", "public void run() {\n\t\tHtmlPage page = null;\n\t\tHtmlSelect select = null;\n\t\tHtmlOption option = null;\n\t\tDataStreamWriter connection = null;\n\t\tWebClient client = new WebClient(BrowserVersion.FIREFOX_3);\n\t\t/* eseguo i job assegnati al thread in esecuzione */\n\t\tfor(int j = 0; j < this.jobs.length; j++) {\n\t\t\tint currentJob = this.jobs[j];\n\t\t\ttry {\n\t\t\t\t/* faccio dei tentativi per collegarmi alle pagine */\n\t\t\t\tpage = getPage(client, this.getDataSourceURL());\n\t\t\t\t/* seleziono l'opzione relativa alla regione assegnata al task */\n\t\t\t\tselect = (HtmlSelect) page.getByXPath(\"//select\").get(0);\n\t\t\t\toption = select.getOption(currentJob);\n\t\t\t\toption.setSelected(true);\n\t\t\t\tString regione = option.asText();\n\t\t\t\t/* seleziono l'opzione ed ottengo la pagina aggiornata */\n\t\t\t\tpage = (HtmlPage) select.fireEvent(Event.TYPE_CHANGE).getNewPage();\n\t\t\t\t\n\t\t\t\t/* estraggo i dati e li salvo nello \"storage\" */\n\t\t\t\tconnection = this.storageFacade.getDataStreamWriter();\n\t\t\t\tconnection.openStreamWriter();\n\t\t\t\tthis.extractData(client, connection, page, regione);\n\t\t\t}\n\t\t\tcatch (HTMLCrawlerException e) {\n\t\t\t\tSystem.err.println(\"@ HTMLCrawlerException : Extracting Data Error\");\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\t//client.closeAllWindows();\n\t\t\t\tif (connection != null)\n\t\t\t\t\tconnection.closeStreamWriter();\n\t\t\t}\n\t\t}\n\t\tclient.closeAllWindows();\n\t}", "public void onClick(DialogInterface dialog, int id) {\n int notificationID=getNotifyId();\r\n Thread dow=new Thread(() -> {\r\n try {\r\n Socket socket = new Socket();\r\n socket.connect(new InetSocketAddress(serverIP,entry),timeout);\r\n\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n PrintWriter printer = new PrintWriter(socket.getOutputStream());\r\n printer.println(\"user:test,pas:1234,action:\"+ACTION_CODE_DOWNLOAD+\",file:\"+target+\",\");\r\n printer.flush();\r\n\r\n Double size=Double.parseDouble(reader.readLine());\r\n System.out.println(\"download start size=\"+size);\r\n\r\n BufferedInputStream buf=new BufferedInputStream(socket.getInputStream());\r\n String root=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString();\r\n String path=root+\"/\"+target.substring(target.lastIndexOf(\"\\\\\")+1);\r\n FileOutputStream fout=new FileOutputStream(path);\r\n int l=0;\r\n byte[] bytes=new byte[4096];\r\n long now=0;\r\n int pre=0;\r\n while((l=buf.read(bytes))!=-1){\r\n fout.write(bytes,0, l);\r\n now+=l;\r\n int progress=(int)(Math.ceil(now/1024/1024.0/size*100));\r\n if(pre!=progress){\r\n pre=progress;\r\n //System.out.println(\"now:\"+now/1024/1024.0+\"mb \"+progress+\"%\");\r\n\r\n notifyBuilder.setProgress(100,progress,false);\r\n notifyBuilder.setContentText(progress+\"%\");\r\n notificationManager.notify(notificationID,notifyBuilder.build());\r\n }\r\n\r\n }\r\n\r\n buf.close();\r\n fout.flush();\r\n fout.close();\r\n reader.close();\r\n printer.close();\r\n socket.close();\r\n Thread.sleep(100);\r\n notifyBuilder.setContentTitle(\"finish download \"+target).setProgress(100,100,false);\r\n notificationManager.notify(notificationID,notifyBuilder.build());\r\n MainActivity.this.runOnUiThread(() -> {\r\n Toast.makeText(MainActivity.this,\"download finish\",Toast.LENGTH_SHORT).show();\r\n openFile(path);\r\n });\r\n\r\n } catch (SocketTimeoutException e){\r\n MainActivity.this.runOnUiThread(() -> {\r\n Toast.makeText(MainActivity.this,\"can not connect to server\",Toast.LENGTH_SHORT).show();\r\n });\r\n }catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n\r\n });\r\n dow.start();\r\n }", "@Override\n protected void onPostExecute(String file_url) {\n mContext.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n MyApplication.getContext().stopProgress(mContext);\n MyApplication.getContext().showCustomProgress(mContext, R.drawable.complete, Constants.DOWNLOAD_COMPLETE);\n MyApplication.getContext().scheduleDismiss();\n mAdapter.notifyDataSetChanged();\n }\n });\n\n }", "@Override\n protected String doInBackground(String... urls) {\n try {\n return downloadUrl(urls[0]);\n } catch (IOException e) {\n\n\n return \"Unable to retrieve data. We are working on it..\";\n }\n }", "@Override\n public void run() {\n downloadFile(Const.MONITOR_SERVER_ADDRESS, downFilePath);\n }", "public void fetchData()\n {\n FetchingDataTask fetchingDataTask = new FetchingDataTask();\n fetchingDataTask.execute();\n }", "static Page Download(){\n // TODO: reference to fetch to download webpages\n WebURL url = queue.poll();\n // call http request to get the web page\n return null;\n }", "@Override\n public void run() {\n tileset.setIsDownloading(false);\n downloadButton.setOnClickListener(null);\n downloadButton.setColorFilter(0xFF00FF00);\n\n // Update tileset / add to local ArrayList\n Context context = activity.getApplicationContext();\n updateTilesetInDB(context, tileset);\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tDialog.setMessage(\"Downloading Delivery Data..\");\n\t\t\tDialog.setCancelable(false);\n\t\t\tDialog.show();\n\t\t}", "void mo54428b(DownloadTask downloadTask);", "@Override\n public void run() {\n adapterOverView.notifyDataSetChanged();\n\n // hide progress bar\n progressBarInOverViewWait.setVisibility(View.GONE);\n\n // change var for false if end getting data - can't start new request if old one is not finish\n isGetingDataFromMSSQL = false;\n }", "@Override\n protected Integer doInBackground(String... params) {\n\n // Set current thread priority lower than main thread priority, so main thread Pause, Continue and Cancel action will not be blocked.\n Thread.currentThread().setPriority(Thread.NORM_PRIORITY - 2);\n\n String downloadFileUrl = \"\";\n if(params!=null && params.length > 0)\n {\n downloadFileUrl = params[0];\n }\n\n currDownloadUrl = downloadFileUrl;\n File downloadLocalFile = createDownloadLocalFile(downloadFileUrl);\n\n int ret = DownloadUtil.downloadFileFromUrl(downloadFileUrl, downloadLocalFile);\n\n return ret;\n }", "private ImageDownloadManager() {\n\n /*\n * Creates a work queue for the pool of Thread objects used for downloading, using a linked\n * list queue that blocks when the queue is empty.\n */\n downloadWorkQueue = new LinkedBlockingQueue<Runnable>();\n\n /*\n * Creates a work queue for the set of of task objects that control downloading\n * using a linked list queue that blocks when the queue is empty.\n */\n imageDownloadTaskWorkQueue = new LinkedBlockingQueue<ImageDownloadTask>();\n\n /*\n * Creates a new pool of Thread objects for the download work queue\n */\n mDownloadThreadPool = new ThreadPoolExecutor(CORE_POOL_SIZE, MAXIMUM_POOL_SIZE,\n KEEP_ALIVE_TIME, KEEP_ALIVE_TIME_UNIT, downloadWorkQueue);\n\n\n // Anonymous object used to retrieve messags froma worker thread and pass\n // them to the UI thread\n mHandler = new Handler(Looper.getMainLooper()) {\n\n @Override\n public void handleMessage(Message inputMessage) {\n\n ImageDownloadTask imageDownloadTask = (ImageDownloadTask) inputMessage.obj;\n\n switch (inputMessage.what) {\n case DOWNLOAD_STARTED:\n break;\n\n case DOWNLOAD_COMPLETE:\n notifyListeners(imageDownloadTask);\n returnTaskToFreePool(imageDownloadTask);\n break;\n case DOWNLOAD_FAILED:\n returnTaskToFreePool(imageDownloadTask);\n break;\n default:\n super.handleMessage(inputMessage);\n }\n }\n };\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\r\n protected void onPreExecute() {\r\n super.onPreExecute();\r\n System.out.println(\"Starting download\");\r\n }", "@Override\n protected String doInBackground(String... params) {\n String data = \"\";\n\n try {\n // Fetching the data from web service\n data = downloadUrl(params[0]);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "public void getData() {\n new DownloadWebpageTask(new AsyncResult() {\n @Override\n public void onResult(JSONObject object) {\n processJson(object);\n }\n }).execute(\"https://spreadsheets.google.com/tq?key=1gGyJS2phIcmiTEEUdUhOsyqekEudBue_NtNkjKsTQrQ\");\n }", "private void downloadImages(){\n new Thread(new Runnable() {\n @Override\n public void run() {\n while(true){\n if(jsonFlag) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"\\tJSON DOWNLOADED\\nIMAGES DOWNLOADING...\", Toast.LENGTH_SHORT).show();\n }\n });\n for ( int i = 0; i < getSize(); ++i) {\n final int index = i;\n new Thread(new Runnable() {\n @Override\n public void run() {\n long startTime;\n synchronized (mutex) {\n startTime = System.currentTimeMillis();\n bitmapList.add(getBitmapFromURL(urlList.get(index)));\n threadOrder.add(index);\n }\n long stopTime = System.currentTimeMillis();\n long elapsedTime = stopTime - startTime;\n Log.i(TAG, \"Image [\" + index + \"] downloaded. Duration is: \" + elapsedTime + \" ms.\");\n ++downloadCount;\n if (downloadCount == getSize()) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"IMAGES DOWNLOADED\", Toast.LENGTH_SHORT).show();\n }\n });\n downloadFlag = true;\n downloadCount = 0;\n }\n }\n }).start();\n }\n break;\n }\n }\n }\n }).start();\n }", "@Override\n\t\tpublic void run() {\n\t\t\tURL url;\n\t\t\ttry {\n\t\t\t\tThread.sleep(3000);\n\t\t\t\turl = new URL(strUrl);\n\t\t\t\tURLConnection con = url.openConnection();\n\t\t\t\tcon.connect();\n\t\t\t\tInputStream input = con.getInputStream();\n\t\t\t\tList<Map<String,Object>> temp = json.getListItems(input);\n\t\t\t\tif(temp != null){\n\t\t\t\t\tif(merger.mergeTwoList(list, temp, direction))\n\t\t\t\t\t\tmyHandler.sendEmptyMessage(1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tmyHandler.sendEmptyMessage(5);\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t} catch (MalformedURLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\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} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}", "public void download() {\n // Attempt to perform the download\n Log.d(TAG, \"download\");\n try {\n // Open a connection to the PHP server.\n // Get the response code\n // Open an input stream as well as a buffered input reader\n try {\n // if (responseCode == HttpURLConnection.HTTP_OK) {\n // Attempt to parse the data from the server\n\n /* Add the crumb objects, but only add the coordinates, the rating,\n * the name, and the number of visits to the local database structure.\n */\n\n // Perhaps add a post method to add the crumbs to the hashmap\n\n // Post: Notify the UI thread that the markers are ready to be loaded.\n\n } catch (Exception e) {\n\n } finally {\n // Close the input streams\n }\n } catch(Exception e) {\n\n }\n }", "private void downloadStudentData(String uri)\n\t{\n\t\tpb.setVisibility(View.VISIBLE);\n\t\tdb = new DatabaseHandler(EventUploadDownload.this, getSchoolName());\n\t\tStringRequest request = new StringRequest(uri,\n\t\t\t\tnew Response.Listener<String>()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResponse(String response)\n\t\t\t\t\t{\n\t\t\t\t\t\tLog.d(\"response message: \", response);\n\t\t\t\t\t\tString resp = response;\n\t\t\t\t\t\tArrayList<StudentInfo> studentInfoList = Utility\n\t\t\t\t\t\t\t\t.getParsedStudentInfoList(resp);\n\t\t\t\t\t\tdb = new DatabaseHandler(EventUploadDownload.this,\n\t\t\t\t\t\t\t\tgetSchoolName());\n\t\t\t\t\t\tfor (StudentInfo studentInfo : studentInfoList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"hello...\" + studentInfo.getImage_str());\n\t\t\t\t\t\t\tstudentInfo.setIsUploaded(2);\n\t\t\t\t\t\t\tdb.addStudentInfo(studentInfo);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tupdateCounters();\n\t\t\t\t\t\tpb.setVisibility(View.INVISIBLE);\n\t\t\t\t\t}\n\t\t\t\t}, new Response.ErrorListener()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error)\n\t\t\t\t\t{\n\t\t\t\t\t\tToast.makeText(EventUploadDownload.this,\n\t\t\t\t\t\t\t\terror.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tRequestQueue queue = Volley.newRequestQueue(this);\n\t\tqueue.add(request);\n\t}", "public void downloadStarted();", "@SuppressLint(\"NewApi\")\n\t\tpublic S<T> download(String url){\n\t\t \n\t\t// declare the dialog as a member field of your activity\n\t\t\t String fileName = url.substring( url.lastIndexOf('/')+1, url.length() );\n\n\t\t\t \n\t\t \n\t\t //if(!service){\n\t\t\t // instantiate it within the onCreate method\n\t\t\t mProgressDialog = new ProgressDialog(activity);\n\t\t\t mProgressDialog.setMessage(\"Downloading ...\");\n\t\t\t mProgressDialog.setIndeterminate(true);\n\t\t\t mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n\t\t\t mProgressDialog.setCancelable(true);\n\t\t\t \n\t\t\t mProgressDialog.show(); \n\t\t\t Intent intent = new Intent(activity, DownloadService.class);\n\t\t\t intent.putExtra(\"url\", url);\n\t\t\t intent.putExtra(\"filename\", fileName);\n\t\t\t intent.putExtra(\"receiver\", new DownloadReceiver(new Handler()));\n\t\t\t activity.startService(intent);\n\t\t\t \n\t\t return this;\n\t }", "public void run() {\n /*\n r28 = this;\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled\n r24 = r0\n boolean r24 = r24.get()\n if (r24 == 0) goto L_0x000d\n L_0x000c:\n return\n L_0x000d:\n r6 = 0\n r17 = 0\n r14 = 0\n java.io.File r9 = new java.io.File // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r0 = r28\n java.net.URL r0 = r0.url // Catch:{ Exception -> 0x02f2 }\n r25 = r0\n java.lang.String r25 = r25.toString() // Catch:{ Exception -> 0x02f2 }\n java.lang.String r24 = r24.getTempFile(r25) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r9.<init>(r0) // Catch:{ Exception -> 0x02f2 }\n boolean r15 = r9.exists() // Catch:{ Exception -> 0x02f2 }\n anetwork.channel.entity.RequestImpl r19 = new anetwork.channel.entity.RequestImpl // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.net.URL r0 = r0.url // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r0 = r19\n r1 = r24\n r0.<init>((java.net.URL) r1) // Catch:{ Exception -> 0x02f2 }\n r24 = 0\n r0 = r19\n r1 = r24\n r0.setRetryTime(r1) // Catch:{ Exception -> 0x02f2 }\n r24 = 1\n r0 = r19\n r1 = r24\n r0.setFollowRedirects(r1) // Catch:{ Exception -> 0x02f2 }\n if (r15 == 0) goto L_0x007e\n java.lang.String r24 = \"Range\"\n java.lang.StringBuilder r25 = new java.lang.StringBuilder // Catch:{ Exception -> 0x02f2 }\n r25.<init>() // Catch:{ Exception -> 0x02f2 }\n java.lang.String r26 = \"bytes=\"\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n long r26 = r9.length() // Catch:{ Exception -> 0x02f2 }\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n java.lang.String r26 = \"-\"\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n java.lang.String r25 = r25.toString() // Catch:{ Exception -> 0x02f2 }\n r0 = r19\n r1 = r24\n r2 = r25\n r0.addHeader(r1, r2) // Catch:{ Exception -> 0x02f2 }\n L_0x007e:\n anetwork.channel.degrade.DegradableNetwork r16 = new anetwork.channel.degrade.DegradableNetwork // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n android.content.Context r24 = r24.context // Catch:{ Exception -> 0x02f2 }\n r0 = r16\n r1 = r24\n r0.<init>(r1) // Catch:{ Exception -> 0x02f2 }\n r24 = 0\n r0 = r16\n r1 = r19\n r2 = r24\n anetwork.channel.aidl.Connection r24 = r0.getConnection(r1, r2) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r1 = r28\n r1.conn = r0 // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n int r20 = r24.getStatusCode() // Catch:{ Exception -> 0x02f2 }\n if (r20 <= 0) goto L_0x00c7\n r24 = 200(0xc8, float:2.8E-43)\n r0 = r20\n r1 = r24\n if (r0 == r1) goto L_0x0121\n r24 = 206(0xce, float:2.89E-43)\n r0 = r20\n r1 = r24\n if (r0 == r1) goto L_0x0121\n r24 = 416(0x1a0, float:5.83E-43)\n r0 = r20\n r1 = r24\n if (r0 == r1) goto L_0x0121\n L_0x00c7:\n r24 = -102(0xffffffffffffff9a, float:NaN)\n java.lang.StringBuilder r25 = new java.lang.StringBuilder // Catch:{ Exception -> 0x02f2 }\n r25.<init>() // Catch:{ Exception -> 0x02f2 }\n java.lang.String r26 = \"ResponseCode:\"\n java.lang.StringBuilder r25 = r25.append(r26) // Catch:{ Exception -> 0x02f2 }\n r0 = r25\n r1 = r20\n java.lang.StringBuilder r25 = r0.append(r1) // Catch:{ Exception -> 0x02f2 }\n java.lang.String r25 = r25.toString() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n r1 = r24\n r2 = r25\n r0.notifyFail(r1, r2) // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x00ef\n r6.close() // Catch:{ Exception -> 0x0421 }\n L_0x00ef:\n if (r17 == 0) goto L_0x00f4\n r17.close() // Catch:{ Exception -> 0x0424 }\n L_0x00f4:\n if (r14 == 0) goto L_0x00f9\n r14.close() // Catch:{ Exception -> 0x0427 }\n L_0x00f9:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x011e }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x011e }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x011e }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x011e }\n monitor-exit(r25) // Catch:{ all -> 0x011e }\n goto L_0x000c\n L_0x011e:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x011e }\n throw r24\n L_0x0121:\n if (r15 == 0) goto L_0x0195\n r24 = 416(0x1a0, float:5.83E-43)\n r0 = r20\n r1 = r24\n if (r0 != r1) goto L_0x018c\n r15 = 0\n java.util.List r24 = r19.getHeaders() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n r1 = r24\n r0.removeRangeHeader(r1) // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x017a\n if (r6 == 0) goto L_0x0148\n r6.close() // Catch:{ Exception -> 0x042a }\n L_0x0148:\n if (r17 == 0) goto L_0x014d\n r17.close() // Catch:{ Exception -> 0x042d }\n L_0x014d:\n if (r14 == 0) goto L_0x0152\n r14.close() // Catch:{ Exception -> 0x0430 }\n L_0x0152:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x0177 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x0177 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x0177 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x0177 }\n monitor-exit(r25) // Catch:{ all -> 0x0177 }\n goto L_0x000c\n L_0x0177:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x0177 }\n throw r24\n L_0x017a:\n r24 = 0\n r0 = r16\n r1 = r19\n r2 = r24\n anetwork.channel.aidl.Connection r24 = r0.getConnection(r1, r2) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r1 = r28\n r1.conn = r0 // Catch:{ Exception -> 0x02f2 }\n L_0x018c:\n r24 = 200(0xc8, float:2.8E-43)\n r0 = r20\n r1 = r24\n if (r0 != r1) goto L_0x0195\n r15 = 0\n L_0x0195:\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x01d8\n if (r6 == 0) goto L_0x01a6\n r6.close() // Catch:{ Exception -> 0x0433 }\n L_0x01a6:\n if (r17 == 0) goto L_0x01ab\n r17.close() // Catch:{ Exception -> 0x0436 }\n L_0x01ab:\n if (r14 == 0) goto L_0x01b0\n r14.close() // Catch:{ Exception -> 0x0439 }\n L_0x01b0:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x01d5 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x01d5 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x01d5 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x01d5 }\n monitor-exit(r25) // Catch:{ all -> 0x01d5 }\n goto L_0x000c\n L_0x01d5:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x01d5 }\n throw r24\n L_0x01d8:\n r12 = 0\n if (r15 != 0) goto L_0x0250\n java.io.BufferedOutputStream r7 = new java.io.BufferedOutputStream // Catch:{ Exception -> 0x02f2 }\n java.io.FileOutputStream r24 = new java.io.FileOutputStream // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r0.<init>(r9) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r7.<init>(r0) // Catch:{ Exception -> 0x02f2 }\n r6 = r7\n L_0x01eb:\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n java.util.Map r24 = r24.getConnHeadFields() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n r1 = r20\n r2 = r24\n long r22 = r0.parseContentLength(r1, r2, r12) // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n anetwork.channel.aidl.ParcelableInputStream r14 = r24.getInputStream() // Catch:{ Exception -> 0x02f2 }\n if (r14 != 0) goto L_0x0279\n r24 = -103(0xffffffffffffff99, float:NaN)\n java.lang.String r25 = \"input stream is null.\"\n r0 = r28\n r1 = r24\n r2 = r25\n r0.notifyFail(r1, r2) // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x021e\n r6.close() // Catch:{ Exception -> 0x043c }\n L_0x021e:\n if (r17 == 0) goto L_0x0223\n r17.close() // Catch:{ Exception -> 0x043f }\n L_0x0223:\n if (r14 == 0) goto L_0x0228\n r14.close() // Catch:{ Exception -> 0x0442 }\n L_0x0228:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x024d }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x024d }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x024d }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x024d }\n monitor-exit(r25) // Catch:{ all -> 0x024d }\n goto L_0x000c\n L_0x024d:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x024d }\n throw r24\n L_0x0250:\n java.io.RandomAccessFile r18 = new java.io.RandomAccessFile // Catch:{ Exception -> 0x02f2 }\n java.lang.String r24 = \"rw\"\n r0 = r18\n r1 = r24\n r0.<init>(r9, r1) // Catch:{ Exception -> 0x02f2 }\n long r12 = r18.length() // Catch:{ Exception -> 0x0474, all -> 0x046f }\n r0 = r18\n r0.seek(r12) // Catch:{ Exception -> 0x0474, all -> 0x046f }\n java.io.BufferedOutputStream r7 = new java.io.BufferedOutputStream // Catch:{ Exception -> 0x0474, all -> 0x046f }\n java.nio.channels.FileChannel r24 = r18.getChannel() // Catch:{ Exception -> 0x0474, all -> 0x046f }\n java.io.OutputStream r24 = java.nio.channels.Channels.newOutputStream(r24) // Catch:{ Exception -> 0x0474, all -> 0x046f }\n r0 = r24\n r7.<init>(r0) // Catch:{ Exception -> 0x0474, all -> 0x046f }\n r17 = r18\n r6 = r7\n goto L_0x01eb\n L_0x0279:\n r10 = -1\n r21 = 0\n r24 = 2048(0x800, float:2.87E-42)\n r0 = r24\n byte[] r8 = new byte[r0] // Catch:{ Exception -> 0x02f2 }\n L_0x0282:\n int r10 = r14.read(r8) // Catch:{ Exception -> 0x02f2 }\n r24 = -1\n r0 = r24\n if (r10 == r0) goto L_0x0354\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x02d8\n r0 = r28\n anetwork.channel.aidl.Connection r0 = r0.conn // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r24.cancel() // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x02a6\n r6.close() // Catch:{ Exception -> 0x0445 }\n L_0x02a6:\n if (r17 == 0) goto L_0x02ab\n r17.close() // Catch:{ Exception -> 0x0448 }\n L_0x02ab:\n if (r14 == 0) goto L_0x02b0\n r14.close() // Catch:{ Exception -> 0x044b }\n L_0x02b0:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x02d5 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x02d5 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x02d5 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x02d5 }\n monitor-exit(r25) // Catch:{ all -> 0x02d5 }\n goto L_0x000c\n L_0x02d5:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x02d5 }\n throw r24\n L_0x02d8:\n int r21 = r21 + r10\n r24 = 0\n r0 = r24\n r6.write(r8, r0, r10) // Catch:{ Exception -> 0x02f2 }\n r0 = r21\n long r0 = (long) r0 // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n long r24 = r24 + r12\n r0 = r28\n r1 = r24\n r3 = r22\n r0.notifyProgress(r1, r3) // Catch:{ Exception -> 0x02f2 }\n goto L_0x0282\n L_0x02f2:\n r11 = move-exception\n L_0x02f3:\n java.lang.String r24 = \"anet.DownloadManager\"\n java.lang.String r25 = \"file download failed!\"\n r26 = 0\n r27 = 0\n r0 = r27\n java.lang.Object[] r0 = new java.lang.Object[r0] // Catch:{ all -> 0x03ee }\n r27 = r0\n r0 = r24\n r1 = r25\n r2 = r26\n r3 = r27\n anet.channel.util.ALog.e(r0, r1, r2, r11, r3) // Catch:{ all -> 0x03ee }\n r24 = -104(0xffffffffffffff98, float:NaN)\n java.lang.String r25 = r11.toString() // Catch:{ all -> 0x03ee }\n r0 = r28\n r1 = r24\n r2 = r25\n r0.notifyFail(r1, r2) // Catch:{ all -> 0x03ee }\n if (r6 == 0) goto L_0x0322\n r6.close() // Catch:{ Exception -> 0x0460 }\n L_0x0322:\n if (r17 == 0) goto L_0x0327\n r17.close() // Catch:{ Exception -> 0x0463 }\n L_0x0327:\n if (r14 == 0) goto L_0x032c\n r14.close() // Catch:{ Exception -> 0x0466 }\n L_0x032c:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x0351 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x0351 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x0351 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x0351 }\n monitor-exit(r25) // Catch:{ all -> 0x0351 }\n goto L_0x000c\n L_0x0351:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x0351 }\n throw r24\n L_0x0354:\n r6.flush() // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.util.concurrent.atomic.AtomicBoolean r0 = r0.isCancelled // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n boolean r24 = r24.get() // Catch:{ Exception -> 0x02f2 }\n if (r24 == 0) goto L_0x039a\n if (r6 == 0) goto L_0x0368\n r6.close() // Catch:{ Exception -> 0x044e }\n L_0x0368:\n if (r17 == 0) goto L_0x036d\n r17.close() // Catch:{ Exception -> 0x0451 }\n L_0x036d:\n if (r14 == 0) goto L_0x0372\n r14.close() // Catch:{ Exception -> 0x0454 }\n L_0x0372:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x0397 }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x0397 }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x0397 }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x0397 }\n monitor-exit(r25) // Catch:{ all -> 0x0397 }\n goto L_0x000c\n L_0x0397:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x0397 }\n throw r24\n L_0x039a:\n java.io.File r24 = new java.io.File // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.lang.String r0 = r0.filePath // Catch:{ Exception -> 0x02f2 }\n r25 = r0\n r24.<init>(r25) // Catch:{ Exception -> 0x02f2 }\n r0 = r24\n r9.renameTo(r0) // Catch:{ Exception -> 0x02f2 }\n r0 = r28\n java.lang.String r0 = r0.filePath // Catch:{ Exception -> 0x02f2 }\n r24 = r0\n r0 = r28\n r1 = r24\n r0.notifySuccess(r1) // Catch:{ Exception -> 0x02f2 }\n if (r6 == 0) goto L_0x03bc\n r6.close() // Catch:{ Exception -> 0x0457 }\n L_0x03bc:\n if (r17 == 0) goto L_0x03c1\n r17.close() // Catch:{ Exception -> 0x045a }\n L_0x03c1:\n if (r14 == 0) goto L_0x03c6\n r14.close() // Catch:{ Exception -> 0x045d }\n L_0x03c6:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r24 = r0\n android.util.SparseArray r25 = r24.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x03eb }\n r24 = r0\n android.util.SparseArray r24 = r24.taskMap // Catch:{ all -> 0x03eb }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x03eb }\n r26 = r0\n r0 = r24\n r1 = r26\n r0.remove(r1) // Catch:{ all -> 0x03eb }\n monitor-exit(r25) // Catch:{ all -> 0x03eb }\n goto L_0x000c\n L_0x03eb:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x03eb }\n throw r24\n L_0x03ee:\n r24 = move-exception\n L_0x03ef:\n if (r6 == 0) goto L_0x03f4\n r6.close() // Catch:{ Exception -> 0x0469 }\n L_0x03f4:\n if (r17 == 0) goto L_0x03f9\n r17.close() // Catch:{ Exception -> 0x046b }\n L_0x03f9:\n if (r14 == 0) goto L_0x03fe\n r14.close() // Catch:{ Exception -> 0x046d }\n L_0x03fe:\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this\n r25 = r0\n android.util.SparseArray r25 = r25.taskMap\n monitor-enter(r25)\n r0 = r28\n anetwork.channel.download.DownloadManager r0 = anetwork.channel.download.DownloadManager.this // Catch:{ all -> 0x041e }\n r26 = r0\n android.util.SparseArray r26 = r26.taskMap // Catch:{ all -> 0x041e }\n r0 = r28\n int r0 = r0.taskId // Catch:{ all -> 0x041e }\n r27 = r0\n r26.remove(r27) // Catch:{ all -> 0x041e }\n monitor-exit(r25) // Catch:{ all -> 0x041e }\n throw r24\n L_0x041e:\n r24 = move-exception\n monitor-exit(r25) // Catch:{ all -> 0x041e }\n throw r24\n L_0x0421:\n r24 = move-exception\n goto L_0x00ef\n L_0x0424:\n r24 = move-exception\n goto L_0x00f4\n L_0x0427:\n r24 = move-exception\n goto L_0x00f9\n L_0x042a:\n r24 = move-exception\n goto L_0x0148\n L_0x042d:\n r24 = move-exception\n goto L_0x014d\n L_0x0430:\n r24 = move-exception\n goto L_0x0152\n L_0x0433:\n r24 = move-exception\n goto L_0x01a6\n L_0x0436:\n r24 = move-exception\n goto L_0x01ab\n L_0x0439:\n r24 = move-exception\n goto L_0x01b0\n L_0x043c:\n r24 = move-exception\n goto L_0x021e\n L_0x043f:\n r24 = move-exception\n goto L_0x0223\n L_0x0442:\n r24 = move-exception\n goto L_0x0228\n L_0x0445:\n r24 = move-exception\n goto L_0x02a6\n L_0x0448:\n r24 = move-exception\n goto L_0x02ab\n L_0x044b:\n r24 = move-exception\n goto L_0x02b0\n L_0x044e:\n r24 = move-exception\n goto L_0x0368\n L_0x0451:\n r24 = move-exception\n goto L_0x036d\n L_0x0454:\n r24 = move-exception\n goto L_0x0372\n L_0x0457:\n r24 = move-exception\n goto L_0x03bc\n L_0x045a:\n r24 = move-exception\n goto L_0x03c1\n L_0x045d:\n r24 = move-exception\n goto L_0x03c6\n L_0x0460:\n r24 = move-exception\n goto L_0x0322\n L_0x0463:\n r24 = move-exception\n goto L_0x0327\n L_0x0466:\n r24 = move-exception\n goto L_0x032c\n L_0x0469:\n r25 = move-exception\n goto L_0x03f4\n L_0x046b:\n r25 = move-exception\n goto L_0x03f9\n L_0x046d:\n r25 = move-exception\n goto L_0x03fe\n L_0x046f:\n r24 = move-exception\n r17 = r18\n goto L_0x03ef\n L_0x0474:\n r11 = move-exception\n r17 = r18\n goto L_0x02f3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: anetwork.channel.download.DownloadManager.DownloadTask.run():void\");\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}", "public void testDownloadAndShowImage(){\n final String url = \"https://ict.image.alimmdn.com/banma_h5/zebrai/zebra_login_bg.png\";\n new Thread(new Runnable() {\n @Override\n public void run() {\n String hash = DownImageUtils.downloadImage(url);\n final String fileName = DownImageUtils.getImagePath(hash);\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //YmImageUtil.showImageInView(getContext(), fileName);\n showImage(fileName);\n }\n });\n }\n }).start();\n }", "@Override\n\t\tprotected String doInBackground(Void... arg0) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t//\tif (handler != null){\n\t\t //\t\thandler.removeCallbacks(runnable);\n\t\t //\t}\n\t\t\t\t\n\t\t\t\t//handler.postDelayed(runnable, 5000);\n\t\t\t\t\n\t\t\t\t//Log.v(\"upl\", \"ok\");\n\t\t\t\t\n\t\t\t\tupload_data();\n\t\t\t\t//download_data();\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tLog.v(\"error upl noo\", e.toString());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn null;\n\t\t}", "private void DownloadFile(String url){\n ContentManager contentManager = ContentManager.getInstance();\n String fileName = contentManager.getCurrentPlayingSongTitle().trim();\n fileName = TextUtil.removeAccent(fileName);\n fileName += url.substring(url.length()-4, url.length());\n final FileDownloadWorker fileDownloadWorker = new FileDownloadWorker(getContext(), true, this);\n fileDownloadWorker\n .setDialogMessage(getContext().getString(R.string.wait_downloading))\n .setHorizontalProgressbar()\n .setDialogCancelCallback(getContext().getString(R.string.hide), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n fileDownloadWorker.showNotificationProgress();\n }\n });\n fileDownloadWorker.execute(url, fileName);\n }", "@Override\n protected String doInBackground(String... url) {\n\n // For storing data from web service\n String data = \"\";\n\n try {\n // Fetching the data from web service\n data = downloadUrl(url[0]);\n Log.e(\"place json\", data);\n } catch (Exception e) {\n Log.d(\"Background Task\", e.toString());\n }\n return data;\n }", "@Override\n protected void onPostExecute(String file_url) {\n Log.i(TAG,\"onPostExecute()\");\n download = null;\n // dismiss the dialog after the file was downloaded\n runOnUiThread(()->dismissDialog());\n }", "@Override\n public void run() {\n if (imageViewReused(loadDataHolder))\n return;\n // Download image from web url\n Bitmap bitmap = getBitmap(loadDataHolder.getUrl());\n\n // Save to cache\n if (bitmap != null) {\n memoryCache.put(loadDataHolder.getUrl(), bitmap);\n }\n\n if (imageViewReused(loadDataHolder))\n return;\n\n // Get bitmap to display\n BitmapDisplayRunnable displayRunnable =\n new BitmapDisplayRunnable(bitmap, loadDataHolder);\n\n // Post message to handler associated with UI thread\n handler.post(displayRunnable);\n }", "public ClientApp() {\n\t\tsetResizable(false);\n\t\tsetTitle(\"ClientApp\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(500, 200, 824, 593);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\tcontentPane.setLayout(null);\n\t\tdata1 = new DataClientShare();\n\t\tdata2 = new DataClientShare();\n\t\tdata3 = new DataClientShare();\n\t\t\n\t\tFile fileServers = new File(\"./Client File\");\n\t\tfileServers.mkdir();\n\t\t/*\n\t\tThread t1 = new Thread() {\n\t\t\t@Override\n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\t\tint value = 0;\n\t\t\t\t\twhile (value < 100)\n\t\t\t\t\t{\n\t\t\t\t\t\tpsBProgress1.setValue(value);\n\t\t\t\t\t\tvalue = data1.getProgress();\n\t\t\t\t\t}\n\t\t\t\t\tpsBProgress1.setValue(100);\t\t\t\n\t\t\t}\n\t\t};\n\t\t*/\n\t\tbtnDownload = new JButton(\"Download\\r\\n\");\n\t\tbtnDownload.setEnabled(false);\n\t\tbtnDownload.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t//if (btnTree1.getModel().isPressed())\n\t\t\t\t//{\n\t\t\t\t\tDefaultMutableTreeNode value1 = (DefaultMutableTreeNode) tree1.getLastSelectedPathComponent();\n\t\t\t\t\tthreadDownload1 = new ThreadDownloadOfClient(19, value1.getUserObject().toString(), data1);\n\t\t\t\t\tclient1.sendDownload(19);\n\t\t\t\t\tthreadDownload1.start();\n\t\t\t\t\tbtnTree1.setEnabled(false);\n\t\t\t\t//}\n\t\t\t\t\n\t\t\t\t//if (btnTree2.getModel().isPressed())\n\t\t\t\t//{\n\t\t\t\t\tDefaultMutableTreeNode value2 = (DefaultMutableTreeNode) tree2.getLastSelectedPathComponent();\n\t\t\t\t\tthreadDownload2 = new ThreadDownloadOfClient(20, value2.getUserObject().toString(), data2);\n\t\t\t\t\tclient2.sendDownload(20);\n\t\t\t\t\tthreadDownload2.start();\n\t\t\t\t\tbtnTree2.setEnabled(false);\n\t\t\t\t//}\n\t\t\t\t\n\t\t\t\t//if (btnTree3.getModel().isPressed())\n\t\t\t\t//{\n\t\t\t\t\tDefaultMutableTreeNode value3 = (DefaultMutableTreeNode) tree3.getLastSelectedPathComponent();\n\t\t\t\t\tthreadDownload3 = new ThreadDownloadOfClient(21, value3.getUserObject().toString(), data3);\t\t\t\n\t\t\t\t\tclient3.sendDownload(21);\n\t\t\t\t\tthreadDownload3.start();\n\t\t\t\t\tbtnTree3.setEnabled(false);\n\t\t\t\t//}\n\t\t\t\t\n\t\t\t\tbtnDownload.setEnabled(false);\n\t\t\t\t//t1.start();\n\t\t\t\t// tao 3 thread cho ket noi cong 19, 20, 21. moi thread co 1 bien luu ten thu muc can tai. khi co ket noi toi thi se gui ten thu muc di va cho nhan file. sau khi nhan duoc file thi luu file va dong cong\n\t\t\t}\n\t\t});\n\t\tbtnDownload.setBounds(286, 522, 94, 23);\n\t\tcontentPane.add(btnDownload);\n\t\t\n\t\tbtnViewFileDownload = new JButton(\"File Downloaded\\r\\n\");\n\t\tbtnViewFileDownload.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tDesktop d = null;\n\t\t\t\tFile file = new File(\"./Client File\");\n\t\t\t\tif (Desktop.isDesktopSupported())\n\t\t\t\t{\n\t\t\t\t\td = Desktop.getDesktop();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\td.open(file);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnViewFileDownload.setEnabled(true);\n\t\tbtnViewFileDownload.setBounds(390, 522, 139, 23);\n\t\tcontentPane.add(btnViewFileDownload);\n\t\t\n\t\tpanel = new JPanel();\n\t\tpanel.setBorder(new TitledBorder(null, \"Server1\", TitledBorder.CENTER, TitledBorder.TOP, null, null));\n\t\tpanel.setBounds(10, 37, 243, 458);\n\t\tcontentPane.add(panel);\n\t\tpanel.setLayout(null);\n\t\t\n\t\tttfIP1 = new JTextField();\n\t\tttfIP1.addCaretListener(new CaretListener() {\n\t\t\tpublic void caretUpdate(CaretEvent e) {\n\t\t\t\tif (client1 == null)\n\t\t\t\t{\n\t\t\t\t\tif (!ttfPort1.getText().equals(\"\") && !ttfIP1.getText().equals(\"\"))\n\t\t\t\t\t\tbtnConnect1.setEnabled(true);\n\t\t\t\t\telse \n\t\t\t\t\t\tbtnConnect1.setEnabled(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tttfIP1.setColumns(10);\n\t\tttfIP1.setBounds(50, 21, 86, 20);\n\t\tpanel.add(ttfIP1);\n\t\t\n\t\tttfPort1 = new JTextField();\n\t\tttfPort1.addCaretListener(new CaretListener() {\n\t\t\tpublic void caretUpdate(CaretEvent e) {\n\t\t\t\tif (client1 == null)\n\t\t\t\t{\n\t\t\t\t\tif (!ttfIP1.getText().equals(\"\") && !ttfPort1.getText().equals(\"\"))\n\t\t\t\t\t\tbtnConnect1.setEnabled(true);\n\t\t\t\t\telse \n\t\t\t\t\t\tbtnConnect1.setEnabled(false);\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\tttfPort1.setColumns(10);\n\t\tttfPort1.setBounds(50, 46, 86, 20);\n\t\tpanel.add(ttfPort1);\n\t\t\n\t\tlbIP1 = new JLabel(\"IP:\");\n\t\tlbIP1.setBounds(10, 24, 46, 14);\n\t\tpanel.add(lbIP1);\n\t\t\n\t\tlbPort1 = new JLabel(\"Port:\");\n\t\tlbPort1.setBounds(10, 49, 46, 14);\n\t\tpanel.add(lbPort1);\n\t\t\n\t\tpChoose1 = new JPanel();\n\t\tpChoose1.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(255, 255, 255), new Color(160, 160, 160)), \"Server File\", TitledBorder.LEFT, TitledBorder.BELOW_TOP, null, new Color(0, 0, 0)));\n\t\tpChoose1.setLayout(null);\n\t\tpChoose1.setBounds(10, 77, 224, 305);\n\t\tpanel.add(pChoose1);\n\t\t\n\t\ttree1 = new JTree();\n\t\ttree1.addTreeSelectionListener(new TreeSelectionListener() {\n\t\t\tpublic void valueChanged(TreeSelectionEvent e) {\n\t\t\t\tDefaultMutableTreeNode value = (DefaultMutableTreeNode) tree1.getLastSelectedPathComponent();\n\t\t\t\tif (value != null)\n\t\t\t\t\tbtnTree1.setEnabled(true);\n\t\t\t}\n\t\t});\n\t\ttree1.setEditable(false);\n\t\ttree1.setEnabled(false);\n\t\ttree1.setShowsRootHandles(true);\n\t\ttree1.setBounds(10, 28, 204, 236);\n\t\tpChoose1.add(tree1);\n\t\tbtnTree1 = new JButton(\"OK\");\n\t\tbtnTree1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tDefaultMutableTreeNode value = (DefaultMutableTreeNode) tree1.getLastSelectedPathComponent();\n\t\t\t\tlbFileName1.setText(value.getUserObject().toString());\n\t\t\t\tbtnTree1.setEnabled(false);\n\t\t\t\ttree1.setEnabled(false);\n\t\t\t\tbtnDownload.setEnabled(true);\n\t\t\t}\n\t\t});\n\t\tbtnTree1.setEnabled(false);\n\t\tbtnTree1.setBounds(125, 271, 89, 23);\n\t\tpChoose1.add(btnTree1);\n\t\t\n\t\tbtnRefresh1 = new JButton(\"Refresh\");\n\t\tbtnRefresh1.setEnabled(false);\n\t\tbtnRefresh1.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclient1.sendRefresh();\n\t\t\t\tSystem.out.print(\"null at getTree Client1\");\n\t\t\t\twhile (data1.getTree() == null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"null at getTree Client\");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"null at getTree Client2\");\n\t\t\t\tString[] treeArr = data1.getTree();\n\t\t\t\tDefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(\"Server File\");\n\t\t\t\tfor (String str : treeArr)\n\t\t\t\t{\n\t\t\t\t\tDefaultMutableTreeNode childNode = new DefaultMutableTreeNode(str);\n\t\t\t\t\trootNode.add(childNode);\n\t\t\t\t}\n\t\t\t\tDefaultTreeModel defaultTreeModel = new DefaultTreeModel(rootNode);\n\t\t\t\ttree1.setModel(defaultTreeModel);\n\t\t\t\ttree1.setEnabled(true);\n\t\t\t\tlbFileName1.setText(\"file_name_1\");\n\t\t\t\tdata1.setTree(null);\n\t\t\t}\n\t\t});\n\t\tbtnRefresh1.setBounds(10, 271, 89, 23);\n\t\tpChoose1.add(btnRefresh1);\n\t\t\n\t\tbtnConnect1 = new JButton(\"Connect\");\n\t\tbtnConnect1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(!lbIP1.getText().equals(\"\") && !lbPort1.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tint port = Integer.parseInt(ttfPort1.getText());\n\t\t\t\t\tString IP = ttfIP1.getText();\n\t\t\t\t\tclient1 = new ThreadClient(IP, port, data1);\n\t\t\t\t\tif (client1.ConnectSV())\n\t\t\t\t\t{\n\t\t\t\t\t\twriteState(\"Server1 Connected!\", Color.BLUE);\n\t\t\t\t\t\tclient1.start();\n\t\t\t\t\t\tlbState.setEnabled(true);\n\t\t\t\t\t\tttfIP1.setEditable(false);\n\t\t\t\t\t\tttfPort1.setEditable(false);\n\t\t\t\t\t\tbtnConnect1.setEnabled(false);\n\t\t\t\t\t\tbtnClose1.setEnabled(true);\n\t\t\t\t\t\tbtnRefresh1.setEnabled(true);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\twriteState(\"Server1: IP or Port is wrong!\", Color.RED);\n\t\t\t\t\t\tttfPort1.setText(\"\");\n\t\t\t\t\t\tttfIP1.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnConnect1.setEnabled(false);\n\t\tbtnConnect1.setBounds(146, 20, 88, 23);\n\t\tpanel.add(btnConnect1);\n\t\t\n\t\tpProgress1 = new JPanel();\n\t\tpProgress1.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(255, 255, 255), new Color(160, 160, 160)), \"Progress\", TitledBorder.LEADING, TitledBorder.BELOW_TOP, null, new Color(0, 0, 0)));\n\t\tpProgress1.setBounds(10, 394, 223, 53);\n\t\tpanel.add(pProgress1);\n\t\tpProgress1.setLayout(null);\n\t\t\n\t\tlbProgress1.setEnabled(true);\n\t\tlbProgress1.setBounds(10, 28, 203, 14);\n\t\tlbProgress1.setVerticalTextPosition(JLabel.CENTER);\n\t\tlbProgress1.setHorizontalAlignment(JLabel.CENTER);\n\t\tpProgress1.add(lbProgress1);\n\t\t\n\t\t\n\t\tbtnClose1 = new JButton(\"Close\");\n\t\tbtnClose1.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclient1.CloseClient();\n\t\t\t\twriteState(\"Client1 Closed!\", Color.BLUE);\n\t\t\t\tbtnConnect1.setEnabled(false);\n\t\t\t\tttfPort1.setText(\"\");\n\t\t\t\tttfIP1.setText(\"\");\n\t\t\t\tttfPort1.setEditable(true);\n\t\t\t\tttfIP1.setEditable(true);\n\t\t\t\tbtnClose1.setEnabled(false);\n\t\t\t\tbtnConnect1.setEnabled(false);\n\t\t\t\tbtnRefresh1.setEnabled(false);\n\t\t\t\ttree1.setEnabled(false);\n\t\t\t\tclient1 = null;\n\t\t\t}\n\t\t});\n\t\tbtnClose1.setEnabled(false);\n\t\tbtnClose1.setBounds(146, 45, 88, 23);\n\t\tpanel.add(btnClose1);\n\t\t\n\t\tpanel_2 = new JPanel();\n\t\tpanel_2.setLayout(null);\n\t\tpanel_2.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(255, 255, 255), new Color(160, 160, 160)), \"Server2\", TitledBorder.CENTER, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tpanel_2.setBounds(286, 37, 243, 458);\n\t\tcontentPane.add(panel_2);\n\t\t\n\t\tttfIP2 = new JTextField();\n\t\tttfIP2.addCaretListener(new CaretListener() {\n\t\t\tpublic void caretUpdate(CaretEvent e) {\n\t\t\t\tif (client2 == null)\n\t\t\t\t{\n\t\t\t\t\tif (!ttfPort2.getText().equals(\"\") && !ttfIP2.getText().equals(\"\"))\n\t\t\t\t\t\tbtnConnect2.setEnabled(true);\n\t\t\t\t\telse \n\t\t\t\t\t\tbtnConnect2.setEnabled(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tttfIP2.setColumns(10);\n\t\tttfIP2.setBounds(50, 21, 86, 20);\n\t\tpanel_2.add(ttfIP2);\n\t\t\n\t\tttfPort2 = new JTextField();\n\t\tttfPort2.addCaretListener(new CaretListener() {\n\t\t\tpublic void caretUpdate(CaretEvent e) {\n\t\t\t\tif (client2 == null)\n\t\t\t\t{\n\t\t\t\t\tif (!ttfIP2.getText().equals(\"\") && !ttfPort2.getText().equals(\"\"))\n\t\t\t\t\t\tbtnConnect2.setEnabled(true);\n\t\t\t\t\telse \n\t\t\t\t\t\tbtnConnect2.setEnabled(false);\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\tttfPort2.setColumns(10);\n\t\tttfPort2.setBounds(50, 46, 86, 20);\n\t\tpanel_2.add(ttfPort2);\n\t\t\n\t\tlbIP2 = new JLabel(\"IP:\");\n\t\tlbIP2.setBounds(10, 24, 46, 14);\n\t\tpanel_2.add(lbIP2);\n\t\t\n\t\tlbPort2 = new JLabel(\"Port:\");\n\t\tlbPort2.setBounds(10, 49, 46, 14);\n\t\tpanel_2.add(lbPort2);\n\t\t\n\t\tpChoose2 = new JPanel();\n\t\tpChoose2.setLayout(null);\n\t\tpChoose2.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(255, 255, 255), new Color(160, 160, 160)), \"Server File\", TitledBorder.LEFT, TitledBorder.BELOW_TOP, null, new Color(0, 0, 0)));\n\t\tpChoose2.setBounds(10, 77, 224, 305);\n\t\tpanel_2.add(pChoose2);\n\t\t\n\t\ttree2 = new JTree();\n\t\ttree2.addTreeSelectionListener(new TreeSelectionListener() {\n\t\t\tpublic void valueChanged(TreeSelectionEvent e) {\n\t\t\t\tDefaultMutableTreeNode value = (DefaultMutableTreeNode) tree2.getLastSelectedPathComponent();\n\t\t\t\tif (value != null)\n\t\t\t\t\tbtnTree2.setEnabled(true);\n\t\t\t}\n\t\t});\n\t\ttree2.setEnabled(false);\n\t\ttree2.setBounds(10, 28, 204, 236);\n\t\tpChoose2.add(tree2);\n\t\t\n\t\tbtnTree2 = new JButton(\"OK\");\n\t\tbtnTree2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tDefaultMutableTreeNode value = (DefaultMutableTreeNode) tree2.getLastSelectedPathComponent();\n\t\t\t\tlbFileName2.setText(value.getUserObject().toString());\n\t\t\t\tbtnTree2.setEnabled(false);\n\t\t\t\ttree2.setEnabled(false);\n\t\t\t\tbtnDownload.setEnabled(true);\n\t\t\t}\n\t\t});\n\t\tbtnTree2.setEnabled(false);\n\t\tbtnTree2.setBounds(125, 271, 89, 23);\n\t\tpChoose2.add(btnTree2);\n\t\t\n\t\tbtnRefresh2 = new JButton(\"Refresh\");\n\t\tbtnRefresh2.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclient2.sendRefresh();\n\t\t\t\tSystem.out.print(\"null at getTree Client1\");\n\t\t\t\twhile (data2.getTree() == null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"null at getTree Client\");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"null at getTree Client2\");\n\t\t\t\tString[] treeArr = data2.getTree();\n\t\t\t\tDefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(\"Server File\");\n\t\t\t\tfor (String str : treeArr)\n\t\t\t\t{\n\t\t\t\t\tDefaultMutableTreeNode childNode = new DefaultMutableTreeNode(str);\n\t\t\t\t\trootNode.add(childNode);\n\t\t\t\t}\n\t\t\t\tDefaultTreeModel defaultTreeModel = new DefaultTreeModel(rootNode);\n\t\t\t\ttree2.setModel(defaultTreeModel);\n\t\t\t\ttree2.setEnabled(true);\n\t\t\t\tlbFileName2.setText(\"file_name_2\");\n\t\t\t\tdata2.setTree(null);\n\t\t\t}\n\t\t});\n\t\tbtnRefresh2.setEnabled(false);\n\t\tbtnRefresh2.setBounds(10, 271, 89, 23);\n\t\tpChoose2.add(btnRefresh2);\n\t\t\n\t\tbtnConnect2 = new JButton(\"Connect\");\n\t\tbtnConnect2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(!lbIP2.getText().equals(\"\") && !lbPort2.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tint port = Integer.parseInt(ttfPort2.getText());\n\t\t\t\t\tString IP = ttfIP2.getText();\n\t\t\t\t\tclient2 = new ThreadClient(IP, port, data2);\n\t\t\t\t\tif (client2.ConnectSV())\n\t\t\t\t\t{\n\t\t\t\t\t\twriteState(\"Server2 Connected!\", Color.BLUE);\n\t\t\t\t\t\tclient2.start();\n\t\t\t\t\t\tlbState.setEnabled(true);\n\t\t\t\t\t\tttfIP2.setEditable(false);\n\t\t\t\t\t\tttfPort2.setEditable(false);\n\t\t\t\t\t\tbtnConnect2.setEnabled(false);\n\t\t\t\t\t\tbtnClose2.setEnabled(true);\n\t\t\t\t\t\tbtnRefresh2.setEnabled(true);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\twriteState(\"Server2: IP or Port is wrong!\", Color.RED);\n\t\t\t\t\t\tttfPort2.setText(\"\");\n\t\t\t\t\t\tttfIP2.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnConnect2.setEnabled(false);\n\t\tbtnConnect2.setBounds(146, 20, 88, 23);\n\t\tpanel_2.add(btnConnect2);\n\n\t\tpProgress2 = new JPanel();\n\t\tpProgress2.setLayout(null);\n\t\tpProgress2.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(255, 255, 255), new Color(160, 160, 160)), \"Progress\", TitledBorder.LEADING, TitledBorder.BELOW_TOP, null, new Color(0, 0, 0)));\n\t\tpProgress2.setBounds(11, 393, 223, 53);\n\t\tpanel_2.add(pProgress2);\n\n\t\tlbProgress2.setEnabled(true);\n\t\tlbProgress2.setBounds(10, 28, 203, 14);\n\t\tlbProgress2.setVerticalTextPosition(JLabel.CENTER);\n\t\tlbProgress2.setHorizontalAlignment(JLabel.CENTER);\n\t\tpProgress2.add(lbProgress2);\n\t\t\n\t\tbtnClose2 = new JButton(\"Close\\r\\n\");\n\t\tbtnClose2.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclient2.CloseClient();\n\t\t\t\twriteState(\"Client2 Closed!\", Color.BLUE);\n\t\t\t\tbtnConnect2.setEnabled(false);\n\t\t\t\tttfPort2.setText(\"\");\n\t\t\t\tttfIP2.setText(\"\");\n\t\t\t\tttfPort2.setEditable(true);\n\t\t\t\tttfIP2.setEditable(true);\n\t\t\t\tbtnClose2.setEnabled(false);\n\t\t\t\tbtnConnect2.setEnabled(false);\n\t\t\t\tbtnRefresh2.setEnabled(false);\n\t\t\t\ttree2.setEnabled(false);\n\t\t\t\tclient2 = null;\n\t\t\t}\n\t\t});\n\t\tbtnClose2.setEnabled(false);\n\t\tbtnClose2.setBounds(146, 45, 88, 23);\n\t\tpanel_2.add(btnClose2);\n\n\t\tpanel_3 = new JPanel();\n\t\tpanel_3.setLayout(null);\n\t\tpanel_3.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(255, 255, 255), new Color(160, 160, 160)), \"Server3\", TitledBorder.CENTER, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tpanel_3.setBounds(563, 37, 243, 458);\n\t\tcontentPane.add(panel_3);\n\t\t\n\t\tttfIP3 = new JTextField();\n\t\tttfIP3.addCaretListener(new CaretListener() {\n\t\t\tpublic void caretUpdate(CaretEvent e) {\n\t\t\t\tif (client3 == null)\n\t\t\t\t{\n\t\t\t\t\tif (!ttfPort3.getText().equals(\"\") && !ttfIP3.getText().equals(\"\"))\n\t\t\t\t\t\tbtnConnect3.setEnabled(true);\n\t\t\t\t\telse \n\t\t\t\t\t\tbtnConnect3.setEnabled(false);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tttfIP3.setColumns(10);\n\t\tttfIP3.setBounds(50, 21, 86, 20);\n\t\tpanel_3.add(ttfIP3);\n\t\t\n\t\tttfPort3 = new JTextField();\n\t\tttfPort3.addCaretListener(new CaretListener() {\n\t\t\tpublic void caretUpdate(CaretEvent e) {\n\t\t\t\tif (client3 == null)\n\t\t\t\t{\n\t\t\t\t\tif (!ttfIP3.getText().equals(\"\") && !ttfPort3.getText().equals(\"\"))\n\t\t\t\t\t\tbtnConnect3.setEnabled(true);\n\t\t\t\t\telse \n\t\t\t\t\t\tbtnConnect3.setEnabled(false);\n\t\t\t\t}\t\n\t\t\t}\n\t\t});\n\t\tttfPort3.setColumns(10);\n\t\tttfPort3.setBounds(50, 46, 86, 20);\n\t\tpanel_3.add(ttfPort3);\n\n\t\tlbIP3 = new JLabel(\"IP:\");\n\t\tlbIP3.setBounds(10, 24, 46, 14);\n\t\tpanel_3.add(lbIP3);\n\n\t\tlbPort3 = new JLabel(\"Port:\");\n\t\tlbPort3.setBounds(10, 49, 46, 14);\n\t\tpanel_3.add(lbPort3);\n\t\t\n\t\tpChoose3 = new JPanel();\n\t\tpChoose3.setLayout(null);\n\t\tpChoose3.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(255, 255, 255), new Color(160, 160, 160)), \"Server File\", TitledBorder.LEFT, TitledBorder.BELOW_TOP, null, new Color(0, 0, 0)));\n\t\tpChoose3.setBounds(10, 77, 224, 305);\n\t\tpanel_3.add(pChoose3);\n\t\t\n\t\ttree3 = new JTree();\n\t\ttree3.addTreeSelectionListener(new TreeSelectionListener() {\n\t\t\tpublic void valueChanged(TreeSelectionEvent e) {\n\t\t\t\tDefaultMutableTreeNode value = (DefaultMutableTreeNode) tree3.getLastSelectedPathComponent();\n\t\t\t\tif (value != null)\n\t\t\t\t\tbtnTree3.setEnabled(true);\n\t\t\t}\n\t\t});\n\t\ttree3.setEnabled(false);\n\t\ttree3.setBounds(10, 28, 204, 236);\n\t\tpChoose3.add(tree3);\n\t\t\n\t\tbtnTree3 = new JButton(\"OK\");\n\t\tbtnTree3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tDefaultMutableTreeNode value = (DefaultMutableTreeNode) tree3.getLastSelectedPathComponent();\n\t\t\t\tlbFileName3.setText(value.getUserObject().toString());\n\t\t\t\tbtnTree3.setEnabled(false);\n\t\t\t\ttree3.setEnabled(false);\n\t\t\t\tbtnDownload.setEnabled(true);\n\t\t\t}\n\t\t});\n\t\tbtnTree3.setEnabled(false);\n\t\tbtnTree3.setBounds(125, 271, 89, 23);\n\t\tpChoose3.add(btnTree3);\n\t\t\n\t\tbtnRefresh3 = new JButton(\"Refresh\");\n\t\tbtnRefresh3.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclient3.sendRefresh();\n\t\t\t\tSystem.out.print(\"null at getTree Client3\");\n\t\t\t\twhile (data3.getTree() == null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"null at getTree Client\");\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"null at getTree Client3\");\n\t\t\t\tString[] treeArr = data3.getTree();\n\t\t\t\tDefaultMutableTreeNode rootNode = new DefaultMutableTreeNode(\"Server File\");\n\t\t\t\tfor (String str : treeArr)\n\t\t\t\t{\n\t\t\t\t\tDefaultMutableTreeNode childNode = new DefaultMutableTreeNode(str);\n\t\t\t\t\trootNode.add(childNode);\n\t\t\t\t}\n\t\t\t\tDefaultTreeModel defaultTreeModel = new DefaultTreeModel(rootNode);\n\t\t\t\ttree3.setModel(defaultTreeModel);\n\t\t\t\ttree3.setEnabled(true);\n\t\t\t\tlbFileName3.setText(\"file_name_3\");\n\t\t\t\tdata3.setTree(null);\n\t\t\t}\n\t\t});\n\t\tbtnRefresh3.setEnabled(false);\n\t\tbtnRefresh3.setBounds(10, 271, 89, 23);\n\t\tpChoose3.add(btnRefresh3);\n\n\t\tbtnConnect3 = new JButton(\"Connect\");\n\t\tbtnConnect3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(!lbIP3.getText().equals(\"\") && !lbPort3.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tint port = Integer.parseInt(ttfPort3.getText());\n\t\t\t\t\tString IP = ttfIP3.getText();\n\t\t\t\t\tclient3 = new ThreadClient(IP, port, data3);\n\t\t\t\t\tif (client3.ConnectSV())\n\t\t\t\t\t{\n\t\t\t\t\t\twriteState(\"Server3 Connected!\", Color.BLUE);\n\t\t\t\t\t\tclient3.start();\n\t\t\t\t\t\tlbState.setEnabled(true);\n\t\t\t\t\t\tttfIP3.setEditable(false);\n\t\t\t\t\t\tttfPort3.setEditable(false);\n\t\t\t\t\t\tbtnConnect3.setEnabled(false);\n\t\t\t\t\t\tbtnClose3.setEnabled(true);\n\t\t\t\t\t\tbtnRefresh3.setEnabled(true);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\twriteState(\"Server3: IP or Port is wrong!\", Color.RED);\n\t\t\t\t\t\tttfPort3.setText(\"\");\n\t\t\t\t\t\tttfIP3.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnConnect3.setEnabled(false);\n\t\tbtnConnect3.setBounds(146, 20, 88, 23);\n\t\tpanel_3.add(btnConnect3);\n\t\t\n\n\t\tpProgress3 = new JPanel();\n\t\tpProgress3.setLayout(null);\n\t\tpProgress3.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(255, 255, 255), new Color(160, 160, 160)), \"Progress\", TitledBorder.LEADING, TitledBorder.BELOW_TOP, null, new Color(0, 0, 0)));\n\t\tpProgress3.setBounds(10, 394, 223, 53);\n\t\tpanel_3.add(pProgress3);\n\t\t\n\t\tlbProgress3.setEnabled(true);\n\t\tlbProgress3.setBounds(10, 28, 203, 14);\n\t\tlbProgress3.setVerticalTextPosition(JLabel.CENTER);\n\t\tlbProgress3.setHorizontalAlignment(JLabel.CENTER);\n\t\tpProgress3.add(lbProgress3);\n\t\t\n\t\tbtnClose3 = new JButton(\"Close\");\n\t\tbtnClose3.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tclient3.CloseClient();\n\t\t\t\twriteState(\"Client3 Closed!\", Color.BLUE);\n\t\t\t\tbtnConnect3.setEnabled(false);\n\t\t\t\tttfPort3.setText(\"\");\n\t\t\t\tttfIP3.setText(\"\");\n\t\t\t\tttfPort3.setEditable(true);\n\t\t\t\tttfIP3.setEditable(true);\n\t\t\t\tbtnClose3.setEnabled(false);\n\t\t\t\tbtnConnect3.setEnabled(false);\n\t\t\t\tbtnRefresh3.setEnabled(false);\n\t\t\t\ttree3.setEnabled(false);\n\t\t\t\tclient3 = null;\n\t\t\t}\n\t\t});\n\t\tbtnClose3.setEnabled(false);\n\t\tbtnClose3.setBounds(146, 45, 88, 23);\n\t\tpanel_3.add(btnClose3);\n\t\t\n\t\tlbState = new JLabel(\"State...\");\n\t\tlbState.setEnabled(false);\n\t\tlbState.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\tlbState.setForeground(new Color(0, 0, 255));\n\t\tlbState.setBackground(new Color(255, 255, 255));\n\t\tlbState.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlbState.setBounds(10, 11, 796, 23);\n\t\tcontentPane.add(lbState);\t\t\n\t\t\n\t\tlbFileName1 = new JLabel(\"file_name_1\");\n\t\tlbFileName1.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlbFileName1.setBounds(52, 11, 112, 20);\n\t\tpProgress1.add(lbFileName1);\n\t\t\n\t\tlbFileName2 = new JLabel(\"file_name_2\");\n\t\tlbFileName2.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlbFileName2.setBounds(51, 11, 112, 20);\n\t\tpProgress2.add(lbFileName2);\n\n\t\tlbFileName3 = new JLabel(\"file_name_3\");\n\t\tlbFileName3.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlbFileName3.setBounds(52, 11, 112, 20);\n\t\tpProgress3.add(lbFileName3);\n\t}", "private void startDownload() {\n Uri uri = Uri.parse( data.getStringExtra(PARAM_URL) );\n dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n DownloadManager.Request request = new DownloadManager.Request( uri );\n request.setAllowedNetworkTypes( DownloadManager.Request.NETWORK_MOBILE | DownloadManager.Request.NETWORK_WIFI)\n //移动网络情况下是否允许漫游。\n .setAllowedOverRoaming(false)\n .setTitle(\"更新\") // 用于信息查看\n .setDescription(\"下载apk\"); // 用于信息查看\n //利用此属性下载后使用响应程序打开下载文件\n //request.setMimeType(\"application/vnd.android.package-archive\");\n request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, new Date().getTime()+\".apatch\");\n enqueue = dm.enqueue(request);\n }", "@Override\n\tpublic void run() {\n\t\t\t\t\n\t\tString codigo = null;\n\t\ttry {\n\t\t\tcodigo = page.get();\n\t\t} catch (InterruptedException e) {\n\t\t\t//e.printStackTrace();\n\t\t} catch (ExecutionException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t\n\t\tif(codigo != null)\n\t\t{\n\t\t\ttrabalharCodigo(codigo);\t\t\t\n\t\t\t\t\n\t\t\tadapter = new NoticiaAdapter(getApplicationContext(),noticias);\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\tmsg = new Message();\n\t\tmsg.arg1 = 1;\n\t\thandler.sendMessage(msg);\n\t\t\n\t}", "public void downloadData(final String tripId, final String username) {\n HashMap<String, String> map = new HashMap<>();\n map.put(db.KEY_IS_BEGIN_DAY, \"false\");\n map.put(db.KEY_IS_LOAD_VERIFIED, \"false\");\n map.put(db.KEY_IS_END_DAY, \"false\");\n db.addData(db.LOCK_FLAGS, map);\n Chain chain = new Chain(new Chain.Link() {\n @Override\n public void run() {\n go();\n }\n });\n chain.setFail(new Chain.Link() {\n @Override\n public void run() throws Exception {\n fail();\n }\n });\n chain.add(new Chain.Link() {\n @Override\n public void run() {\n TripHeader.load(SettingsActivity.this, tripId, db);\n LoadDelivery.load(SettingsActivity.this, tripId, db);\n ArticleHeaders.load(SettingsActivity.this, tripId, db);\n CustomerHeaders.load(SettingsActivity.this, tripId, db);\n VisitList.load(SettingsActivity.this, tripId, db);\n Messages.load(SettingsActivity.this, username, db);\n CustomerDelivery.load(SettingsActivity.this, tripId, db);\n /*ArticleHeaders.loadData(getApplicationContext());\n CustomerHeaders.loadData(getApplicationContext());*/\n }\n });\n chain.add(new Chain.Link() {\n @Override\n public void run() {\n /*TripHeader.load(LoginActivity.this,tripId, db);\n LoadDelivery.load(LoginActivity.this,tripId, db);\n ArticleHeaders.load(LoginActivity.this, tripId, db);\n CustomerHeaders.load(LoginActivity.this, tripId, db);\n VisitList.load(LoginActivity.this,tripId, db);\n Messages.load(LoginActivity.this,username,db);*/\n ArticleHeaders.loadData(getApplicationContext());\n CustomerHeaders.loadData(getApplicationContext());\n OrderReasons.loadData(getApplicationContext());\n }\n });\n chain.start();\n }", "public void start() {\n\n String pathFile = mainMenu.menuTakePathFile();\n int countThreads = mainMenu.menuCountThreads();\n int downloadSpeed = mainMenu.menuDownloadSpeed();\n String folderForDownload = mainMenu.menuPathDownload();\n\n List<String> urls = null;\n try {\n urls = bootPreparation.parsingFileForUrls(pathFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n List<String> fileNames = bootPreparation.parsingListUrlsForNames(urls);\n\n multiThreadedDownloader.startDownloading(countThreads, urls.size(), urls, fileNames, downloadSpeed, folderForDownload);\n\n }", "void mo54418a(DownloadTask downloadTask);", "public String downloadText(String URL){\n\t \tdownloadInProgress = 1;\n \t\t int BUFFER_SIZE = 2000;\n\t InputStream in = null;\n\t String str = \"\";\n\t try {\n\t in = Obj_Downloader.OpenHttpConnection(URL);\n\t InputStreamReader isr = new InputStreamReader(in);\n\t int charRead;\n\t char[] inputBuffer = new char[BUFFER_SIZE]; \n\t try{\n\t \twhile ((charRead = isr.read(inputBuffer))>0){ \n\t //---convert the chars to a String---\n\t String readString = String.copyValueOf(inputBuffer, 0, charRead); \n\t str += readString;\n\t inputBuffer = new char[BUFFER_SIZE];\n\t }\n\t in.close();\n\t }catch(IOException e){\n\t \t\t\t Log.i(\"ZZ\", \"AppDelegate:downloadText: ERROR - 1: \" + e.getMessage()); \n\t \tstr = \"\";\n\t }\n\t }catch (Exception je){\n\t\t\t Log.i(\"ZZ\", \"AppDelegate:downloadText: ERROR - 2: \" + je.getMessage()); \n\t\t } \n\t downloadInProgress = 0;\n\t return str; \n\t }", "private void getDataFromServer(final String TAG) {\n queue = customVolley.Rest(Request.Method.GET, getUrlToDownload(), null, TAG);\n\n }", "@Override\n protected Void call() {\n if(download_queue.isEmpty()) return null;\n \n //Proceed to create a file with a list of addresses\n Writer writer = null;\n String file_dir = Configuration.root_dir + \"Download_list.txt\";\n try{\n writer = new BufferedWriter(\n new OutputStreamWriter(\n new FileOutputStream(\n file_dir), \"utf-8\"));\n String server_root = Configuration.getInstance().getSina_server_root();\n //Traverse through the download list and write each download address to file\n String content = \"\";\n for(int i = 0; i < download_queue.size(); i++){\n SoundTrack track = download_queue.get(i);\n String address = server_root + track.getLocalFileName();\n content += address;\n if(i < (download_queue.size() - 1)){\n content += \"\\n\";\n }\n }\n //Write to file\n writer.write(content);\n \n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } finally{\n try {\n if(writer != null)\n writer.close();\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n //Run wget command to download the listed files\n String command = \"wget\";\n command += \" -P \" + Configuration.root_dir + \"SoundTracks/\";\n command += \" -i list\";\n try {\n Process p = Runtime.getRuntime().exec(command);\n p.waitFor();\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InterruptedException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return null;\n }", "public void run() {\n \t\t\r\n\t\t\tarraylist_destination.clear();\r\n\t\t\tarraylist_driverid.clear();\r\n\t\t\tarraylist_riderid.clear();\r\n\t\t\tarraylist_drivername.clear();\r\n\t\t\tarraylist_pickuptime.clear();\r\n\t\t\tarraylist_tripid.clear();\r\n\t\t\tarraylist_driver_image.clear();\r\n\t\t\tarraylist_rider_image.clear();\r\n\t\t\tarraylist_distance.clear();\r\n\t\t\tarraylist_requesttype.clear();\r\n\t\t\tarraylist_start.clear();\r\n\t\t\tarraylist_actualfare.clear();\r\n\t\t\tarraylist_suggestion.clear();\r\n\t\t\tarraylist_eta.clear();\r\n\t\t\tarraylist_driverrating.clear();\r\n\t\t\tarraylist_status.clear();\r\n\t\t\tarraylist_vehicle_color.clear();\r\n\t\t\tarraylist_vehicle_type.clear();\r\n\t\t\tarraylist_vehicle_name.clear();\r\n\t\t\tarraylist_vehicle_img.clear();\r\n\t\t\tarraylist_vehicle_year.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(Utility.isConnectingToInternet(RiderQueue_Activity.this))\r\n \t \t{\r\n \t\t\t\t/**call pending request for rider queue class**/\r\n\t\t\t\tnew httpPendingRequest_riderqueue().execute(); \r\n \t \t\t}\r\n \t \telse{\r\n \t \t\tUtility.alertMessage(RiderQueue_Activity.this,\"error in internet connection\");\r\n \t \t}\r\n\t\t \r\n }", "public void runCode(View view) {\n\n for(String songName:SongsPlaylist.songs)\n {\n /*\n Message.obtain(); it create a ThreadPool for message and if the message id already available in the pool it send\n its benefit is again and agian Message object is not created and destroyed ...means its increase the performance\n */\n Message message = Message.obtain();\n /*\n we can send data thu sendData method pass bundle but we need one string so we send the obj variable that Message class\n builtin\n */\n message.obj = songName;\n\n /*here we can access the handler object that is created in the DownloadThread or you can say the handler of the\n DownloadThread we using that handler i send the message in the MessageQueue of DownloadThread for executing*/\n downloadThread.handler.sendMessage(message);\n }\n }", "public void run() {\n\t\t\t\tHttpURLConnection connection = null;\r\n\t\t\t\tStringBuilder response = new StringBuilder();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tURL url = new URL(address);\r\n\t\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\r\n\t\t\t\t\tconnection.setRequestMethod(\"GET\");\r\n\t\t\t\t\tconnection.setConnectTimeout(8000);\r\n\t\t\t\t\tconnection.setReadTimeout(8000);\r\n\t\t\t\t\tconnection.setDoInput(true);\r\n\t\t\t\t\t//connection.setDoOutput(true);\r\n\t\t\t\t\tint responseCode = connection.getResponseCode();\r\n\t\t\t\t\tLog.d(\"HttpUtil\", String.valueOf(responseCode));\r\n\t\t\t\t\tif(responseCode != 200){\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Fail\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tInputStream in = connection.getInputStream();\r\n\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\r\n\t\t\t\t\t\tString line;\r\n\t\t\t\t\t\twhile((line = reader.readLine()) != null){\r\n\t\t\t\t\t\t\tresponse.append(line);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Success\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onFinish(response.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onError(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}finally{\r\n\t\t\t\t\tif(connection != null){\r\n\t\t\t\t\t\tconnection.disconnect();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public boolean isDownloadable() {\n return true;\n }", "@Override\n public void execute() {\n Task<Void> task = new Task<Void>() {\n @Override\n protected Void call() throws Exception {\n exportData();\n return null;\n }\n\n @Override\n protected void succeeded(){\n callback.onSuccess();\n super.succeeded();\n }\n\n @Override\n protected void failed(){\n callback.onFail(this.getException());\n super.failed();\n }\n };\n new Thread(task).start();\n }", "private void update() {\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n List<File> list = getContents(NOT_TRASHED + \" and \" + NOT_FOLDER + \" and \" + SUPPORTED_FILES);\n List<File> filteredList = new ArrayList<File>();\n \n // filters out shared drive files\n for (File f : list) {\n if(!f.getShared()) {\n filteredList.add(f);\n }\n }\n\n numDownloading = filteredList.size();\n Log.e(\"START NUM\", \"\" + numDownloading);\n updateMax = numDownloading;\n \n // notification progress bar\n String note = getResources().getString(R.string.notification_message);\n nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n mBuilder = new NotificationCompat.Builder(mContext);\n mBuilder.setContentTitle(note)\n .setSmallIcon(android.R.drawable.stat_sys_download)\n .setTicker(note);\n\n // main progress bar\n mProgress = (ProgressBar) findViewById(R.id.progressBar1);\n new Thread(new Runnable() {\n @Override\n public void run() {\n while (numDownloading > 0) {\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n int progress = 100 * (updateMax - numDownloading) / updateMax; \n mProgress.setProgress(progress);\n if (numDownloading <= 0) {\n back();//finish();\n }\n } \n });\n }\n }\n }).start();\n\n if (!targetDir.exists())\n targetDir.mkdirs();\n getDriveContents();\n }\n });\n t.start();\n }", "@Override\r\n protected String doInBackground(String... f_url) {\r\n int count;\r\n try {\r\n String root = Environment.getExternalStorageDirectory().toString();\r\n\r\n System.out.println(\"Downloading\");\r\n URL url = new URL(f_url[0]);\r\n\r\n URLConnection conection = url.openConnection();\r\n conection.connect();\r\n // getting file length\r\n int lenghtOfFile = conection.getContentLength();\r\n\r\n // input stream to read file - with 8k buffer\r\n InputStream input = new BufferedInputStream(url.openStream(), 8192);\r\n\r\n // Output stream to write file\r\n\r\n OutputStream output = new FileOutputStream(root+\"/downloadedfile.jpg\");\r\n byte data[] = new byte[1024];\r\n\r\n long total = 0;\r\n while ((count = input.read(data)) != -1) {\r\n total += count;\r\n\r\n // writing data to file\r\n output.write(data, 0, count);\r\n\r\n }\r\n\r\n // flushing output\r\n output.flush();\r\n\r\n // closing streams\r\n output.close();\r\n input.close();\r\n\r\n } catch (Exception e) {\r\n Log.e(\"Error: \", e.getMessage());\r\n }\r\n\r\n return null;\r\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private IOHandler(){\n download_queue = new ArrayList<>(); \n initialize();\n }", "private void downloadContent(){\n try {\n URL yahoo = new URL( \"http://api.letsleapahead.com/LeapAheadMultiFreindzy/index.php?action=getLang&langCode=EN&langId=1&appId=6\");\n BufferedReader in = new BufferedReader(\n new InputStreamReader(yahoo.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null)\n Log.e(\"TAG\" , inputLine);\n in.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n\n }", "protected void onPostExecute(String file_url) {\n // dismiss the dialog after getting all products\n pDialog.dismiss();\n fetchallTrees();\n }" ]
[ "0.7673995", "0.74566185", "0.701102", "0.700257", "0.6885092", "0.6872166", "0.6860243", "0.67279416", "0.6717457", "0.66336757", "0.6560041", "0.64592224", "0.64592224", "0.6426438", "0.64258105", "0.6386361", "0.63794327", "0.6366766", "0.63310707", "0.63212496", "0.63156384", "0.6310532", "0.6299173", "0.6292514", "0.629191", "0.62800276", "0.62702525", "0.62602526", "0.6250046", "0.6222893", "0.6222032", "0.6219421", "0.6211649", "0.6210908", "0.6203626", "0.6195662", "0.61787426", "0.6176408", "0.6169995", "0.6169995", "0.6169995", "0.61582094", "0.61504614", "0.6149249", "0.6143573", "0.6128656", "0.61266357", "0.61209375", "0.6103465", "0.60996765", "0.6097077", "0.60746616", "0.60676885", "0.6059189", "0.6055503", "0.6054584", "0.6051385", "0.6040617", "0.6035953", "0.6008909", "0.6004606", "0.5989303", "0.59883404", "0.59672636", "0.5961996", "0.5953862", "0.59441215", "0.59380114", "0.593148", "0.5900888", "0.5888476", "0.58832246", "0.5882931", "0.5877623", "0.5876333", "0.58506316", "0.5843751", "0.58381104", "0.58370614", "0.5814121", "0.5809486", "0.57910985", "0.5790943", "0.57735616", "0.57729656", "0.57686", "0.57587844", "0.5753134", "0.57470137", "0.57468414", "0.5746307", "0.57434565", "0.5731408", "0.5721635", "0.5713375", "0.569854", "0.5686232" ]
0.6149345
46
Executes in UI thread, after the execution of doInBackground()
@Override protected void onPostExecute(String result) { super.onPostExecute(result); ParserTask parserTask = new ParserTask(); // Invokes the thread for parsing the JSON data parserTask.execute(result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void done() {\n\t\ttry {\n\t\t\t// get the result of doInBackground and display it\n\t\t\tresultJLabel.setText(get().toString());\n\t\t} // end try\n\t\tcatch (InterruptedException ex) {\n\t\t\tresultJLabel.setText(\"Interrupted while waiting for results.\");\n\t\t} // end catch\n\t\tcatch (ExecutionException ex) {\n\t\t\tresultJLabel.setText(\"Error encountered while performing calculation.\");\n\t\t} // end catch\n\t}", "protected void onPostExecute() {\r\n\t}", "void inTheEndOfDoInBackground(NetworkResponse networkResponse);", "@Override\n protected void onPreExecute()\n {\n taskCompleted = false;\n\n //display the progress dialog\n showProgressDialog();\n }", "protected void onPostExecute() {\n }", "protected void onPostExecute() {\n }", "@Override\n protected void onPostExecute(Void result) {\n // This is where we would process the results if needed.\n this.progressDialog.dismiss();\n }", "@Override\n protected void onPreExecute(){\n //do before task doing in background\n }", "public void done() {\n try {\n C1000c.this.mo5101e(get());\n } catch (InterruptedException e) {\n Log.w(\"AsyncTask\", e);\n } catch (ExecutionException e2) {\n throw new RuntimeException(\"An error occurred while executing doInBackground()\", e2.getCause());\n } catch (CancellationException unused) {\n C1000c.this.mo5101e(null);\n } catch (Throwable th) {\n throw new RuntimeException(\"An error occurred while executing doInBackground()\", th);\n }\n }", "protected void onPreExecute() {\n // Display the progress dialog on async task start\n // mProgressDialog.show();\n }", "public final /* synthetic */ void onPostExecute(Object obj) {\n t_$J_ t__j_ = (t_$J_) obj;\n Callback callback = this.G__G_;\n if (callback != null) {\n callback.run(t__j_);\n }\n }", "protected void onPostExecute() {\n }", "@Override\n public Void doInBackground() {\n \tsetProgress(0);\n \tparseMapData(filename);\n \tsetProgress(100);\n return null;\n }", "@Override\n public void run() {\n mRunnable.onPostExecute();\n mExecutor.onPostExecuteCallback(mRunnable);\n }", "@SuppressLint(\"NewApi\") @Override\n\t\t\t\t\tprotected void onPreExecute() {\n\t\t\t\t\t\tsuper.onPreExecute();\n\t\t\t\t\t\t// Shows Progress Bar Dialog and then call doInBackground method\n\t\t\t\t\t\tshowDialog(progress_bar_type);\n\t\t\t\t\t\t\n\t\t\t\t\t\tprgDialog.setProgress(0);\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// ===============================================\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}", "@Override\n protected Boolean doInBackground(Void... params)\n {\n\n mainLayoutTransaction.replace(com.example.thenotoriousrog.tornadomusicplayer.R.id.startup_layout, loadingScreenFragment);\n //mainLayoutTransaction.addToBackStack(null);\n mainLayoutTransaction.show(loadingScreenFragment);\n mainLayoutTransaction.commit(); // show this fragment while waiting for the songsInfo list to be set.\n\n convertToSongInfoThread.start(); // start the thread\n\n while(convertToSongInfoThread.isAlive()){\n // do nothing until the thread has finished.\n }\n\n mainLayoutTransaction.remove(loadingScreenFragment); // remove the loading fragment after we have finished with our loading screen.\n return true;\n }", "@Override\n protected void onPostExecute(Void result) {\n super.onPostExecute(result);//Run the generic code that should be ran when the task is complete\n onCompleteListener.onAsyncTaskComplete(result);//Run the code that should occur when the task is complete\n }", "@Override\n protected Void doInBackground() {\n System.out.println(\"SwingWorker has started working.\");\n updateFields(gameService.receiveUpdates());\n return null;\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t Toast.makeText(getBaseContext(),\"Task Completed\",Toast.LENGTH_LONG).show();\n\t progressStatus=0; \n\t myProgress=0;\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tView rootView =(View)result;\n\t\t\ttry {\n\t\t\t\tThread.sleep(400);\n\t\t\t} catch (InterruptedException e) {\t\t\t\t\n\t\t\t}\n\t\t\tsetContentView(rootView);\t\t\t\n\t\t\tgetProgressDialog().hide();\n\t\t}", "@Override\n\tpublic void onTaskPostExecute() {\n\t\tLog.i(TAG, \"post executing\");\n\t\tupdateAdapter();\n\t\tspinner.setVisibility(View.GONE);\n\t\tlistView.setVisibility(View.VISIBLE);\n\t\tlistView.onLoadMoreComplete();\n\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "@Override\n protected void onPreExecute() {\n Log.e(TAG, \"onPreExecute\");\n\n // showing the ProgressBar \n //simpleWaitDialog = ProgressDialog.show(settingslistactivity.this, \"loading records from datastore...\", \"excecuting task...\");\n //simpleWaitDialog.setCancelable(true);\n\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute() {\n Log.e(TAG, \"onPreExecute\");\n\n // showing the ProgressBar \n //simpleWaitDialog = ProgressDialog.show(settingslistactivity.this, \"loading records from datastore...\", \"excecuting task...\");\n //simpleWaitDialog.setCancelable(true);\n\n super.onPreExecute();\n }", "public void done() {\n AppMethodBeat.i(98166);\n try {\n AsyncTask.this.a(get());\n AppMethodBeat.o(98166);\n } catch (InterruptedException e) {\n AppMethodBeat.o(98166);\n } catch (ExecutionException e2) {\n RuntimeException runtimeException = new RuntimeException(\"An error occured while executing doInBackground()\", e2.getCause());\n AppMethodBeat.o(98166);\n throw runtimeException;\n } catch (CancellationException e3) {\n AsyncTask.this.a(null);\n AppMethodBeat.o(98166);\n }\n }", "@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Send start message to UI thread\n\n fillProgressbar(progressBar); //Fill progress bar as a long time operation\n //Message with information SHOW_NEW_COLOR as a end of long time operation\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_NEW_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Message with end result is sent\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}", "@Override\n\t protected void onPostExecute(String result) \n\t {\n\t \tmHandler.post(updateList);\n\t \t\n\t //mProgress.setVisibility(View.GONE);\n\n\t }", "protected void onPostExecute(String message) {\n // dismiss the dialog once done\n super.onPostExecute(message);\n\n progressDialog.dismiss();\n jumpToMainActivity();\n //message 为接收doInbackground的返回值\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "@Override\n protected void onPreExecute() {\n Utils.showProcessingDialog(_context);\n }", "public void done() {\n try {\n AsyncTask.this.a(get());\n } catch (InterruptedException e) {\n Log.w(\"AsyncTask\", e);\n } catch (ExecutionException e2) {\n throw new RuntimeException(\"An error occured while executing doInBackground()\", e2.getCause());\n } catch (CancellationException unused) {\n AsyncTask.this.a(null);\n }\n }", "@Override\n\t\tprotected String doInBackground(Void... arg0) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t//\tif (handler != null){\n\t\t //\t\thandler.removeCallbacks(runnable);\n\t\t //\t}\n\t\t\t\t\n\t\t\t\t//handler.postDelayed(runnable, 5000);\n\t\t\t\t\n\t\t\t\t//Log.v(\"upl\", \"ok\");\n\t\t\t\t\n\t\t\t\tupload_data();\n\t\t\t\t//download_data();\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\tLog.v(\"error upl noo\", e.toString());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn null;\n\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(progressStatus<100)\n\t\t\t\t{\n\t\t\t\t\tprogressStatus=performTask();\n\t\t\t\t\tmyHandler.post(new Runnable()\n\t\t\t\t\t{\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\tprogressBar.setProgress(progressStatus);\n\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\tmyHandler.post(new Runnable() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t Toast.makeText(getBaseContext(),\"Task Completed\",Toast.LENGTH_LONG).show();\n\t progressStatus=0; \n\t myProgress=0;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}", "@Override\n protected void onPostExecute(Void aVoid) {\n }", "@Override\n protected Void doInBackground() {\n progressBar.setIndeterminate(true);\n if (outputMerge) {\n mergeOut();\n } else {\n separateOut();\n }\n return null;\n }", "@Override\n protected void onPostExecute(BackgroundTaskResult result)\n {\n taskCompleted = true;\n dismissProgressDialog();\n notifyTaskCompletion(result);\n }", "protected void onPostExecute(Void v) {\n\n\n }", "@Override\n protected void onPostExecute(final Void unused) {\n super.onPostExecute(unused);\n Log.i(\"Dict\", \"Done processing\");\n delegate.processFinish(result);\n }", "protected void onPreExecute() {\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "protected void onPostExecute(String file_url) {\n // dismiss the dialog after getting all products\n pDialog.dismiss();\n // updating UI from Background Thread\n\n Emp = (TextView) findViewById(R.id.empresa);\n cal = (TextView) findViewById(R.id.calle);\n num = (TextView) findViewById(R.id.Numero);\n ciu = (TextView) findViewById(R.id.ciudad);\n prov = (TextView) findViewById(R.id.provincia);\n prob = (TextView) findViewById(R.id.problema);\n\n\n\n Emp.setText(empresa);\n cal.setText(calle);\n num.setText(numero);\n ciu.setText(ciudad);\n prov.setText(provincia);\n prob.setText(problema);\n\n\n\n\n }", "protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "protected void onPreExecute() {\n\n this.dialog.setMessage(\"Refreshing data...\");\n this.dialog.show();\n }", "@Override\n \t\tprotected void onPostExecute(Void result) \n \t\t{\n\t\t\t//close the progress dialog\n\t\t\tprogressDialog.dismiss();\n\t\t\tprogressDialog = null;\n \t\t}", "@Override\n\t\t\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\texit = new ExitDialog();\n\t\t\t\t\t\t\t}});\n\t\t\t\t\t\tcenter.exit();\n\t\t\t\t\t\texit.closeSucess();\n\t\t\t\t\t\tcloseButton.setEnabled(false);\n\t\t\t\t\t\tstartButton.setEnabled(true);\n\t\t\t\t\t\t//infomation = new closeJPanel();\n\t\t\t\t\t\t//frmIpfs.getContentPane().add(infomation,BorderLayout.CENTER);\n\t\t\t\t\t\t//new Thread(infomation).start();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tprotected Void doInBackground() {\n\t\t\t\t\t\tinfomation.drawStart();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\twait = new waittingDialog();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}}).start();\n\t\t\t\t\t\t\tcenter.start();\n\t\t\t\t\t\t\twait.startSucess();\n\t\t\t\t\t\t\tstartButton.setEnabled(false);\n\t\t\t\t\t\t\tcloseButton.setEnabled(true);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew IODialog();\n\t\t\t\t\t\t} catch (CipherException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew BlockChainDialog();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tnew ExceptionDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}", "@Override\n\t protected Void doInBackground() throws Exception {\n Thread.sleep(SLEEP_TIME);\n return null;\n }", "@Override\r\n\t public Void doInBackground() {\r\n\r\n\t int progress = 0;\r\n\t // Initialize progress property.\r\n\t setProgress(0);\r\n setProgress(Math.min(progress, 100));\r\n \r\n\t\t\ttry {\r\n\t\t\t\tSplit977 sp = new Split977();\r\n\t\t\t\tsp.setAcuerdo(jtf.getText());\r\n\t\t\t\tString[] f = jtaFicheros.getText().split(\"\\n\");\r\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Número de ficheros:\"\r\n\t\t\t\t\t\t+ f.length);\r\n\t\t\t\tsp.setFicheros(f);\r\n\t\t\t\tsp.setBorrarTablas(jcbBorrarTablas.isSelected());\r\n\t\t\t\tsp.setDetalleLlamadas(jcbDetalleLlamadas.isSelected());\r\n\t\t\t\tsp.setDetalleLlamadasRI(jcbDetalleLlamadasRI.isSelected());\r\n\t\t\t\tfor (int i = 0; i < f.length; i++) {\r\n\t\t\t\t\tjtaResultado.append(f[i] + \"\\n\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tString pass = new String(jpfPass.getPassword());\r\n\t\t\t\tSystem.out.println(pass);\r\n\r\n\t\t\t\tjtaResultado.append(sp.execute());\r\n\t\t\t\t// JOptionPane.showConfirmDialog(frame, \"Finito!\");\r\n\t\t\t\tJOptionPane.showMessageDialog(frame, \"Finito!\");\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t}\r\n \r\n\r\n\t return null;\r\n\t }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\n\t\t\t((Activity) mContext).runOnUiThread(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\n\t\t}", "protected void onPreExecute(){\n // Display the progress dialog on async task start\n // mProgressDialog.show();\n }", "protected void onPostExecute(Void v) {\n\n }", "protected void onPostExecute(Void v) {\n\n }", "@Override\n protected void onPreExecute() {\n String msg = \"Please Wait....\";\n cd.showProgressDialog(msg);\n\n }", "public void onPostExecute(String fromDoInBackground){\n CovAdt.notifyDataSetChanged();\n pb.setVisibility(View.INVISIBLE);\n }", "@Override\n\t\t\t\t protected void onPostExecute(Void result)\n\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif (progressDialog != null)\n\t\t\t\t\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t\t }", "protected void onPostExecute(String file_url) {\n\t\t\tpDialog.dismiss();\n\t\t\t// updating UI from Background Thread\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public void onPreExecute() {\n progressDialog.show();\n }", "@Override\r\n protected String doInBackground(String... params) {\n Thread th = new Thread(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // TODO Auto-generated method stub\r\n upload();\r\n }\r\n });\r\n th.start();\r\n try {\r\n th.join();\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "@Override\r\n\tprotected void onPostExecute(String result)\r\n\t{\r\n\t\tprogress.dismiss();\r\n\t\tsuper.onPostExecute(result);\r\n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n txtV.setText(\"AsyncTask Start \");\n }", "@Override\n protected void onPreExecute() {\n if (mProgressDialog != null) {\n mProgressDialog.show();\n }\n }", "protected void onPostExecute(Void v) {\n }", "@Override\n protected void onPostExecute(String result){\n finish();\n }", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n\n // Close the progress bar\n pb.setVisibility(View.GONE);\n\n // Start background processing for xml parsing\n XMLTask xmlTask = new XMLTask();\n xmlTask.execute(result);\n }", "@Override\n\tprotected void onPreExecute() {\n\t\tUtils.showProcessingDialog(_context);\n\t}", "@Override\n\t\tprotected Void doInBackground(Void... args) {\n\n\t\t\tMonitors mMonitors=new Monitors(mContext,pref);\n\t\t\tmMonitors.start();//this step takes time\n\t\t\tCommonMethods.Log(\"MonitorAsyncTask.doInBackground() completed\");\n\t\t\treturn null;\t\t\n\t\t}", "public void run() {\n Looper.prepare();\n operationRunnableOver = false;\n oper.operate();\n operationRunnableOver = true;\n if (StatusCheckUtil.mediaUpdating > 0) {\n return;\n }\n Message mess = new Message();\n mess.what = Constants.OperationContants.FINISH_OPERATION;\n mess.obj = operatingDialog;\n ((CommonActivity) context).handler.sendMessage(mess);\n\n Looper.loop();\n }", "@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Retrieving workouts list...\");\n this.progressDialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tprogressDialog = ProgressDialog.show(MainActivity.this, \"\",\n\t\t\t\t\t\"Loading...\");\n\t\t}", "@Override\n protected void onProgressUpdate(String... values) {\n setUiDuringBackgroundTask(values[0]);\n }", "@Override\n protected void onProgressUpdate(String... values) {\n setUiDuringBackgroundTask(values[0]);\n }", "@Override\n protected void onPreExecute() {\n this.progressDialog.setMessage(\"Adding workouts...\");\n this.progressDialog.show();\n }", "@Override\n protected void onPostExecute(String temp) {\n\n progressDialog.dismiss();\n }", "protected Boolean doInBackground(Void... param) {\n SystemClock.sleep(1000);\n return false;\n }", "@Override\n\t\t\t protected void onPostExecute(Void result)\n\t\t\t {\n\t\t\t\t\t\t\t\t\tif (progressDialog != null)\n\t\t\t\t\t\t\t\t\t\tprogressDialog.dismiss();\n\t\t\t }", "@Override\r\n\t\tprotected void onPostExecute(Void result) \r\n\t\t{\n\t\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n // Do something like display a progress bar\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tshowLoadingProgressDialog();\n\t\t}", "@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\tprogressDialog = ProgressDialog.show(MainActivity.this, \"Wait\", \"Serving...\");\n\t\t\t\n\t\t}", "public void run() {\n\t\t\twhile (true) {\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tThread.sleep(500L);\n\t\t\t\t\t// Thread.sleep(30);\n\t\t\t\t\trunOnUiThread(done);\n\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\t}\n\t\t}", "@Override\r\n\t\tprotected void onPostExecute(Void result)\r\n\t\t{\n\t\t}", "@Override\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tsuper.onPostExecute(result);\t\t\n\t\t\tprogressDialog.dismiss();\n\t\t\tsetAllValues();\n\t\t}", "public void run() {\n \t\t\r\n\t\t\tarraylist_destination.clear();\r\n\t\t\tarraylist_driverid.clear();\r\n\t\t\tarraylist_riderid.clear();\r\n\t\t\tarraylist_drivername.clear();\r\n\t\t\tarraylist_pickuptime.clear();\r\n\t\t\tarraylist_tripid.clear();\r\n\t\t\tarraylist_driver_image.clear();\r\n\t\t\tarraylist_rider_image.clear();\r\n\t\t\tarraylist_distance.clear();\r\n\t\t\tarraylist_requesttype.clear();\r\n\t\t\tarraylist_start.clear();\r\n\t\t\tarraylist_actualfare.clear();\r\n\t\t\tarraylist_suggestion.clear();\r\n\t\t\tarraylist_eta.clear();\r\n\t\t\tarraylist_driverrating.clear();\r\n\t\t\tarraylist_status.clear();\r\n\t\t\tarraylist_vehicle_color.clear();\r\n\t\t\tarraylist_vehicle_type.clear();\r\n\t\t\tarraylist_vehicle_name.clear();\r\n\t\t\tarraylist_vehicle_img.clear();\r\n\t\t\tarraylist_vehicle_year.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(Utility.isConnectingToInternet(RiderQueue_Activity.this))\r\n \t \t{\r\n \t\t\t\t/**call pending request for rider queue class**/\r\n\t\t\t\tnew httpPendingRequest_riderqueue().execute(); \r\n \t \t\t}\r\n \t \telse{\r\n \t \t\tUtility.alertMessage(RiderQueue_Activity.this,\"error in internet connection\");\r\n \t \t}\r\n\t\t \r\n }", "@Override\n \t\tprotected Void doInBackground(Void... params) \n \t\t{\n \t\t\ttry \n \t\t\t{\n \t\t\t\twhile(m_progress < 100) {\n \t\t\t\t\t//Get the current thread's token\n \t\t\t\t\tsynchronized (this) \n \t\t\t\t\t{\n \t\t\t\t\t\tthis.wait();\n \t\t\t\t\t\t//Set the current progress. \n \t\t\t\t\t\t//This value is going to be passed to the onProgressUpdate() method.\n \t\t\t\t\t\tpublishProgress(m_progress);\n \t\t\t\t\t}\n \t\t\t\t}\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\treturn null;\n \t\t}", "protected void onPostExecute(Void result) {\n mNotificationHelper.completed();\r\n// \tmsc.connect();\r\n }", "@Override\n\tpublic void onTaskPreExecute() {\n\t\tLog.i(TAG, \"pre executing\");\n\t}", "@Override\n protected void onPreExecute() {\n progress = ProgressDialog.show(ModeSelection.this, \"Connecting...\", \"Please wait!!!\"); //show a progress dialog\n }", "@Override\r\n protected void onPostExecute(Void result) {\n mProgressDialog.dismiss();\r\n }", "@Override\n protected void onPostExecute(Void result) {\n\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tDialog.setMessage(\"Downloading Delivery Data..\");\n\t\t\tDialog.setCancelable(false);\n\t\t\tDialog.show();\n\t\t}", "@Override\n protected Void doInBackground() throws Exception {\n assert doStuff != null: \"Jævla dritt i doInBackground\";\n doStuff.showSplashScreen();\n return null;\n }", "@Override\n protected void onPreExecute() {\n\n dialog.setCancelable(true);\n dialog.setMessage(\"Fetching...\");\n\n dialog.show();\n\n }", "@Override\n\tprotected void onPostExecute(HashMap<String, String> result) {\n\t\tsuper.onPostExecute(result);\n\t\tpleaseWait.dismiss();\n\t}", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "@Override\n protected void onPreExecute() {\n showLoadingProgressDialog();\n }", "@Override\r\n protected void onPostExecute(Void result) {\n\r\n }", "@Override\n\t\t protected void onPostExecute(Void result) {\n\t\t \t\n\t\t super.onPostExecute(result); \n\t\t }" ]
[ "0.7080858", "0.69996303", "0.6968305", "0.68851155", "0.6857415", "0.6857415", "0.6851172", "0.6818394", "0.67464525", "0.6732881", "0.6732841", "0.67194235", "0.6686236", "0.6677945", "0.6633168", "0.6626516", "0.662449", "0.66165674", "0.6607995", "0.66015875", "0.65987015", "0.6598339", "0.6598339", "0.6579534", "0.6579534", "0.6578247", "0.65693235", "0.6563951", "0.6555204", "0.655264", "0.6551274", "0.6551274", "0.6551274", "0.6547323", "0.65283644", "0.65144247", "0.65100616", "0.65086347", "0.6503438", "0.6502857", "0.6502364", "0.65021205", "0.6498416", "0.6496869", "0.6464031", "0.6464031", "0.6464031", "0.646246", "0.64560705", "0.6455034", "0.64545095", "0.6448611", "0.6440171", "0.6434595", "0.6425664", "0.6425664", "0.6416831", "0.64094937", "0.640049", "0.63959444", "0.639522", "0.6393197", "0.63889796", "0.6378197", "0.63776284", "0.63751173", "0.63700354", "0.6368701", "0.6358447", "0.6358422", "0.6352707", "0.63514775", "0.63483584", "0.63454205", "0.63454205", "0.6339457", "0.6335105", "0.63336116", "0.63334566", "0.63242894", "0.6324248", "0.63226986", "0.6322182", "0.6319369", "0.63175976", "0.6316989", "0.6315609", "0.6312265", "0.6310788", "0.62958395", "0.6287029", "0.628435", "0.6273007", "0.6272164", "0.6269805", "0.62638086", "0.6261774", "0.6259521", "0.6259521", "0.6252157", "0.6248866" ]
0.0
-1
Date date = new Date();
public String saveBitmap(Bitmap bitmap){ String imagePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)+ "/screenshot.png"; File mFile = new File(imagePath); FileOutputStream outputStream; try { outputStream = new FileOutputStream(mFile); bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream); outputStream.flush(); outputStream.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return imagePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Date getDate();", "Date getDate();", "Date getDate();", "public Date GetDate();", "public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}", "public static Date date() {\n GregorianCalendar cal = new GregorianCalendar();\n return cal.getTime();\n }", "public Date date (){\r\n\t\t\treturn _date;\r\n\t\t}", "public static Date now()\r\n\t{\r\n\t\treturn new Date(System.currentTimeMillis());\r\n\t}", "public java.util.Date getDate() {\n\t}", "public Date getDate()\n {\n return date;\n }", "public Date getDate(){\n\t\treturn date;\n\t}", "public Date getDate() {\n return date;\n }", "public Date() {\r\n }", "public static Date getCurrentDate() {\n return new Date();\n }", "public Date getDate()\n\t{\n\t\treturn date;\n\t}", "public Date getDate() {\n\t\n\t\treturn date;\n\t\n\t}", "final public synchronized Date getDate() {\n return new Date(crtime) ;\n }", "public java.util.Date getDate(){\n return localDate;\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\r\n return date;\r\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date getDate() {\n return date;\n }", "public Date date() {\r\n\t\treturn date;\r\n\t}", "public Date getCurrentDate() {\n\t\treturn new Date();\n\t}", "public static Date today() // should it be void?\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int day = currentDate.get(GregorianCalendar.DATE);\n int month = currentDate.get(GregorianCalendar.MONTH) + 1;\n int year = currentDate.get(GregorianCalendar.YEAR);\n int hour = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minute = currentDate.get(GregorianCalendar.MINUTE);\n return new Date(day, month, year, hour, minute);\n }", "public void setDate() {\n this.date = new Date();\n }", "public Date getDate() {\n\t\treturn date_;\n\t}", "public static Date getNowUtilDate()\n {\n return new Date();\n }", "public static java.sql.Date getDateTime() {\n\t\treturn new java.sql.Date(new java.util.Date().getTime());\n\t}", "@Override\n public Date getDate() {\n return date;\n }", "public Date getDate() {\n\t\treturn date;\n\t}", "public Date getDate() {\n\t\treturn date;\n\t}", "public Date getDate() {\r\n\t\treturn date;\r\n\t}", "public Date getDate() {\r\n\t\treturn date;\r\n\t}", "public static Date getCurrentDate() {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tjava.util.Date currentDate = calendar.getTime();\r\n\t\tDate date = new Date(currentDate.getTime());\r\n\t\treturn date;\r\n\t}", "public static native JsDate create() /*-{\n return new Date();\n }-*/;", "Date getEDate();", "public Date date()\n\t{\n\t\treturn this.date;\n\t}", "public Date getDate()\n {\n return this.date;\n }", "public Date getDate() {\n return dateTime;\n }", "public Date getDate() {\n\t\treturn _date;\n\t}", "public String getDate(){\n return date;\n }", "Date getCreateDate();", "Date getCreateDate();", "public String Get_date() \n {\n \n return date;\n }", "public String getDate(){\n return date;\n }", "public Sad(){\n\t\tthis.date = new Date(System.currentTimeMillis());\n\t}", "public int getDate(){\n return date;\n }", "long getDate();", "public static Date now() {\n return Calendar.getInstance().getTime();\n }", "public static Date now() {\n return Calendar.getInstance().getTime();\n }", "public String getDate() {\n return date;\n }", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "LocalDate getDate();", "public Date getDate() {\n return this.currentDate;\n }", "public Date getCreateDate();", "public Date getCreateDate();", "public Date getCreateDate();", "String getDate();", "String getDate();", "public int getDate() {\n return date ;\n }", "public long getDate() {\n return date;\n }", "public Date getDate() {\n return this.date;\n }", "public long getDate() {\n return date_;\n }", "@NotNull\n @Generated\n @Selector(\"date\")\n public native NSDate date();", "public Date getDate() {\n return mDate;\n }", "public Date date() {\n return new Date(this.msec);\n }", "Date getForDate();", "public void setDate(DateTime \n date) {\n this.date = date;\n }", "public String getDate() {\r\n return date;\r\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public long getDate() {\n return date;\n }", "public Calendar getDate()\n {\n return date;\n }", "public java.util.Calendar getDate() {\n return date;\n }", "public java.util.Calendar getDate() {\n return date;\n }", "public Timestamp getDate(){\n return date;\n }", "static long getDateTime(){\n return System.currentTimeMillis();\n }", "public Calendar getDate(){\n return date;\n }", "public java.util.Date getDateInst(){\r\n return this.dateInst;\r\n }", "public Date getDateCreated() {\r\n\t\t\r\n\t\t\tDate date= new Date(System.currentTimeMillis());\r\n\t\treturn date;\r\n\t}", "public Calendar getDate() {\n\treturn date;\n }", "public Date getSystemDateTime(){\n\t\tDate systemDate = new Date();\t\t\n\t\treturn systemDate;\n\t}", "public long getDate() {\n return date_;\n }" ]
[ "0.78122973", "0.78122973", "0.78122973", "0.7671101", "0.76436347", "0.7406821", "0.72810316", "0.7249149", "0.72077906", "0.7204371", "0.7169471", "0.7165299", "0.71591574", "0.71166754", "0.71138746", "0.7063312", "0.7057763", "0.70386666", "0.70362943", "0.70362943", "0.70362943", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7011921", "0.7002155", "0.6963076", "0.6944184", "0.69358766", "0.6929685", "0.6900661", "0.6896304", "0.6895367", "0.68880403", "0.68880403", "0.6887892", "0.6887892", "0.68757206", "0.6874325", "0.68677837", "0.68675476", "0.68625593", "0.6858304", "0.68527055", "0.6843028", "0.6830776", "0.6830776", "0.67929924", "0.6785542", "0.6783903", "0.67809254", "0.6774721", "0.67737496", "0.67737496", "0.6770796", "0.6767248", "0.6767248", "0.6760919", "0.67514443", "0.6745612", "0.6745612", "0.6745612", "0.67446536", "0.67446536", "0.67326486", "0.6722863", "0.6696694", "0.669321", "0.6687991", "0.6686926", "0.66643256", "0.6639454", "0.6637344", "0.6632635", "0.66264874", "0.66264874", "0.66264874", "0.66264874", "0.66264874", "0.66232044", "0.66021824", "0.6595964", "0.6595964", "0.65924674", "0.65859437", "0.65853477", "0.6572567", "0.65666825", "0.65617156", "0.6561115", "0.65604275" ]
0.0
-1
/ The action bar home/up action should open or close the drawer. mDrawerToggle will take care of this.
@Override public boolean onOptionsItemSelected(com.actionbarsherlock.view.MenuItem item) { if (mDrawerToggle.onOptionsItemSelected(item)) { return true; } // Handle action buttons switch (item.getItemId()) { // this is not a desirable approach! case android.R.id.home: // Toast.makeText(this, "Need to be implemented", // Toast.LENGTH_SHORT).show(); /* * android.support.v4.app.FragmentTransaction ft = * getSupportFragmentManager().beginTransaction(); * ft.replace(R.id.container, fmt); ft.commit(); */ break; case R.id.action_websearch: // // create intent to perform web search for this planet // Intent intent = new Intent(Intent.ACTION_WEB_SEARCH); // intent.putExtra(SearchManager.QUERY, getActionBar().getTitle()); // // catch event that there's no activity to handle intent // if (intent.resolveActivity(getPackageManager()) != null) { // startActivity(intent); // } else { // Toast.makeText(this, R.string.app_not_available, // Toast.LENGTH_LONG).show(); // } // item.expandActionView(); return false; case R.id.menu_exit: this.exitApplication(); break; case R.id.action_share: // String message = "Text I wan't to share."; // Intent share = new Intent(Intent.ACTION_SEND); // share.setType("text/plain"); // share.putExtra(Intent.EXTRA_TEXT, message); // startActivity(Intent.createChooser(share, // "Title of the dialog the system will open")); break; case R.id.menu_settings2: Intent intent3 = new Intent(this, SettingsPreferences.class); startActivity(intent3); break; case R.id.set_date: final CharSequence[] items; items = getResources().getTextArray(R.array.dates_for_police); AlertDialog.Builder builder = Global.giveMeDialog(this, "Choose a month for police data"); builder.setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { } }); int i = 0; for (; i < items.length; i++) { if (items[i].equals(Global.POLICE_DATA_REQUEST_MONTH)) break; } builder.setSingleChoiceItems(items, i, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { Global.setPOLICE_DATA_REQUEST_MONTH(items[which].toString()); } }); builder.show(); break; case R.id.register_dialgo_action_bar: if (!Global.isRegistered(this)) { if (regDialog == null) { regDialog = new RegDialogFragment(); regDialog.show(getSupportFragmentManager(), "should be changed here"); } else { regDialog.show(getSupportFragmentManager(), "should be changed here"); // Toast.makeText(this, DEBUG + " ID Yes", // Toast.LENGTH_SHORT).show(); } } else { item.setVisible(false); } break; case R.id.email_developer: Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("message/rfc822"); intent.putExtra(Intent.EXTRA_EMAIL, new String[] { "yw@it-innovation.soton.ac.uk" }); intent.putExtra(Intent.EXTRA_SUBJECT, "[DESURBS] - YOURSafe"); intent.putExtra(Intent.EXTRA_TEXT, "Hi, Yang \n\n"); try { startActivity(Intent.createChooser(intent, "Send mail...")); } catch (android.content.ActivityNotFoundException ex) { Toast.makeText(this, "There are no email clients installed.", Toast.LENGTH_SHORT).show(); } break; case R.id.survey_developer: String url = "https://docs.google.com/forms/d/1HgHhfY-Xgt53xqMPCZC_Q_rL8AKUhNi9LiPXyhKkPq4/viewform"; intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); startActivity(intent); break; case R.id.menu_about: Toast.makeText(this, "This is Version " + this.getString(R.string.version_name), Toast.LENGTH_SHORT).show(); break; default: return super.onOptionsItemSelected(item); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n switch (item.getItemId()) {\n case android.R.id.home:\n drawerLayout.openDrawer(GravityCompat.START);\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\r\n return true;\r\n }\r\n\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n mDrawerLayout.openDrawer(GravityCompat.START);\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n mDrawer.openDrawer(GravityCompat.START);\n return true;\n }\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n \tLog.d(\"MainActivity\", \"onOptionsItemSelected\");\r\n if (mDrawerToggle.onOptionsItemSelected(item)) {\r\n \tLog.d(\"MainActivity\", \"======\");\r\n// \treturn true;\r\n }\r\n debugMemory(\"title:\"+item.getTitle()+\"--itemId:\"+item.getItemId()+\" android.id\"+android.R.id.home);\r\n \r\n switch (item.getItemId()) {\r\n\t\tcase R.id.action_search:\r\n\t\t\tLog.d(\"MainActivity\", \"===action_search==\");\r\n\t\t\tgetActionBar().setIcon(R.drawable.search_white);\r\n\t\t\tmDrawerToggle.setDrawerIndicatorEnabled(false);\r\n\t\t\tbreak;\r\n\t\tcase R.id.action_alarm:\r\n\t\t\tmDrawerToggle.setDrawerIndicatorEnabled(false);\r\n\t\t\tLog.d(\"MainActivity\", \"===action_alarm==\");\r\n\t\t\tbreak;\r\n\t\tcase android.R.id.home:\r\n\t\t\tif (mDrawerToggle.isDrawerIndicatorEnabled() == false) {\r\n\t\t\t\tgetActionBar().setIcon(null);\r\n\t\t\t\tmDrawerToggle.setDrawerIndicatorEnabled(true);\r\n\t\t\t\tdebugMemory(\"android.R.id.home\");\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n \r\n // Handle your other action bar items...\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\nint home=item.getItemId();\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings) {\r\n return true;\r\n }\r\nif(home==R.id.home){\r\n drawerlayout.openDrawer(Gravity.LEFT);\r\n}\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n if (drawerLayout.isDrawerOpen(listViewSliding)){\n drawerLayout.closeDrawer(listViewSliding);\n }else{\n drawerLayout.openDrawer(listViewSliding);\n }\n break;\n\n default:\n break;\n }\n return true;\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n if (drawerLayout.isDrawerOpen(linearLayout)) {\n drawerLayout.closeDrawers();\n } else {\n drawerLayout.openDrawer(linearLayout);\n }\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\r\n return true;\r\n }\r\n // Handle your other action bar items...\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public void onHomeButtonClick() {\n drawerLayout.openDrawer(Gravity.LEFT);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_filter) {\n if (myDrawer.isDrawerOpen(rightDrawer)) {\n myDrawer.closeDrawer(rightDrawer);\n } else {\n myDrawer.openDrawer(rightDrawer);\n if (myDrawer.isDrawerOpen(leftDrawer)) {\n myDrawer.closeDrawer(leftDrawer);\n }\n }\n return true;\n } else if (id == android.R.id.home) {\n if (myDrawer.isDrawerOpen(leftDrawer)) {\n myDrawer.closeDrawer(leftDrawer);\n } else {\n myDrawer.openDrawer(leftDrawer);\n if (myDrawer.isDrawerOpen(rightDrawer)) {\n myDrawer.closeDrawer(rightDrawer);\n }\n }\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n mDrawer.openDrawer(GravityCompat.START);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n mDrawer.openDrawer(GravityCompat.START);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void onDrawerOpened(View drawerView) {\n menuvalue = 1;\n getSupportActionBar().setHomeAsUpIndicator(R.mipmap.back_arrow);\n }", "@Override\n public final boolean onOptionsItemSelected(MenuItem item) {\n if (actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n //noinspection SimplifiableIfStatement\n case android.R.id.home:\n drawerLayout.openDrawer(GravityCompat.START);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "void displayDrawer() {\n //toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n actionbar = getSupportActionBar();\n actionbar.setDisplayHomeAsUpEnabled(true);\n\n actionbar.setHomeAsUpIndicator(R.drawable.ic_menu);\n\n navigationView.setNavigationItemSelectedListener(\n new NavigationView.OnNavigationItemSelectedListener() {\n @Override\n public boolean onNavigationItemSelected(MenuItem menuItem) {\n // set item as selected to persist highlight\n menuItem.setChecked(true);\n // close drawer when item is tapped\n mdrawer.closeDrawers();\n\n String choice = menuItem.getTitle().toString();\n\n switch (choice) {\n case \"Register\":\n Intent i = new Intent(getBaseContext(), SignIn.class);\n startActivity(i);\n break;\n case \"Log In\":\n Intent p = new Intent(getBaseContext(), LoginActivity.class);\n startActivity(p);\n break;\n\n case \"Profile Picture\":\n Intent pic = new Intent(getBaseContext(), ImageUpload.class);\n startActivity(pic);\n break;\n\n case \"Users\":\n Intent users = new Intent(getBaseContext(), Userlist.class);\n startActivity(users);\n break;\n\n case \"Chats\":\n Intent chats = new Intent(getBaseContext(), ChatList.class);\n startActivity(chats);\n break;\n }\n\n // Add code here to update the UI based on the item selected\n // For example, swap UI fragments here\n\n return true;\n }\n });\n }", "private void toggleDrawer() {\n DrawerLayout drawer = (DrawerLayout)findViewById(R.id.menu);\n if(drawer.isDrawerOpen(Gravity.START)) {\n drawer.closeDrawer(Gravity.START);\n }\n else drawer.openDrawer(Gravity.START);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\t switch (item.getItemId()) {\n\t case R.id.action_settings:\n\t \tToast.makeText(getApplicationContext(), \"Refresh!\", Toast.LENGTH_SHORT).show();\n\t break;\n\t }\n\t return true;\n\t}", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t if (mDrawerToggle.onOptionsItemSelected(item)) {\n\t return true;\n\t }\n\t else{\n\t return super.onOptionsItemSelected(item);\n\t }\n\t }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n mDrawerLayout.openDrawer(GravityCompat.START);\n return true;\n case R.id.action_settings:\n return true;\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n// getActionBar().setTitle(\"WXTJ Student Radio\");\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n mDrawerLayout.openDrawer(GravityCompat.START);\n return true;\n case R.id.action_settings:\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void onDrawerClosed(View view) {\n\t\t\t\t\t invalidateOptionsMenu(); \n\t\t\t\t\t }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n if (_actionBarDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n switch(item.getItemId()) {\n case R.id.item_logout:\n LogOut();\n return true;\n case R.id.item_about:\n showErrorMessage(\"Clicked About\");\n return true;\n case R.id.item_refresh:\n Reload();\n return true;\n case R.id.item_search:\n LaunchSearch();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n //}\n // Handle other action bar items...\n //return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_settings) {\r\n return true;\r\n } else if (id == android.R.id.home) {\r\n mDrawerLayout.openDrawer(GravityCompat.START);\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(mDrawerToggle.onOptionsItemSelected(item)){\n return true;\n }\n\n\n// int id = item.getItemId();\n//\n// //noinspection SimplifiableIfStatement\n// if (id == R.id.action_settings) {\n// return true;\n// }\n\n return super.onOptionsItemSelected(item);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n// getActionBar().setTitle(mTitle);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n// getActionBar().setTitle(mTitle);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "private void toggleDrawer() {\n ActionBarDrawerToggle drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar,\n R.string.navigation_drawer_open, R.string.navigation_drawer_close);\n drawerLayout.addDrawerListener(drawerToggle);\n drawerToggle.syncState();\n }", "public void onDrawerOpened(View drawerView) {\n\t\t\t\t\t invalidateOptionsMenu(); \n\t\t\t\t\t }", "public void onDrawerClosed(View view) {\n menuvalue = 0;\n getSupportActionBar().setHomeAsUpIndicator(R.mipmap.menu);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n return true;\n }\n if (id == android.R.id.home) {\n mDrawerLayout.openDrawer(GravityCompat.START);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void onDrawerClosed(View view) {\n getActionBar().setTitle(\"Closed Drawer\");\n }", "@Override\n public void onDrawerClosed(View drawerView) {\n invalidateOptionsMenu();\n Log.d(\"Apps Main\", \"Close drawer \");\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n if (mDrawerToggle.onOptionsItemSelected(item))\n {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n//done: set a button to open drawer\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n if (!drawerLayout.isDrawerOpen(drawer))\n drawerLayout.openDrawer(drawer);\n else\n drawerLayout.closeDrawers();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n int id = item.getItemId();\n if (id == R.id.action_settings) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle your other action bar items...\n\n switch(item.getItemId()){\n case R.id.action_settings:\n openSettings();\n break;\n\n case R.id.action_refresh:\n if (mLastFragment != null) {\n mLastFragment.refresh();\n }\n break;\n\n default: return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (mDrawerToggle.onOptionsItemSelected(item)) {\n\t\t\treturn true;\n\t\t}\n\t\t// Handle your other action bar items...\n\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "public void doDrawerStuff() {\n Toolbar myToolbar = (Toolbar) findViewById(R.id.my_toolbar);\n setSupportActionBar(myToolbar);\n\n mPlanetTitles = getResources().getStringArray(R.array.planets_array);\n mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);\n\n\n mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout,myToolbar, R.string.drawer_open, R.string.drawer_close) {\n\n /** Called when a drawer has settled in a completely closed state. */\n public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n // getSupportActionBar().setTitle(mTitle);\n\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }\n\n /** Called when a drawer has settled in a completely open state. */\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n // getSupportActionBar().setTitle(mDrawerTitle);\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }\n };\n\n // Set the drawer toggle as the DrawerListener\n mDrawerLayout.setDrawerListener(mDrawerToggle);\n\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setHomeButtonEnabled(true);\n\n\n\n mDrawerList = (ListView) findViewById(R.id.left_drawer);\n\n // Set the adapter for the list view\n mDrawerList.setAdapter(new ArrayAdapter<String>(this,\n R.layout.drawer_list_item, mPlanetTitles));\n // Set the list's click listener\n mDrawerList.setOnItemClickListener(new DrawerItemClickListener());\n\n\n\n\n\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n try {\n getSupportActionBar().setTitle(activityTitle);\n }catch(NullPointerException e){\n Toast.makeText(NavigationDrawerActivity.this, \"ActionBar \"+ e, Toast.LENGTH_SHORT).show();\n }\n //invalidateOptionsMenu();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == R.id.center) {\n centerMapFile();\n } else\n // Activate the filter control\n if (item.getItemId() == R.id.filter) {\n if (mic != null && mic.getActivationListener() != null) {\n mic.getActivationListener().onClick(item.getActionView());\n }\n } else \n // Drawer part\n if (item.getItemId() == android.R.id.home) {\n\n if (mDrawerList != null && mDrawerLayout.isDrawerOpen(mDrawerList)) {\n mDrawerLayout.closeDrawer(mDrawerList);\n } else {\n if (mDrawerList != null) {\n mDrawerLayout.openDrawer(mDrawerList);\n }\n if (mLayerMenu != null) {\n mDrawerLayout.closeDrawer(mLayerMenu);\n }\n }\n // layer menu part\n } else if (item.getItemId() == R.id.layer_menu_action) {\n if (mLayerMenu != null && mDrawerLayout.isDrawerOpen(mLayerMenu)) {\n mDrawerLayout.closeDrawer(mLayerMenu);\n } else {\n if (mLayerMenu != null) {\n mDrawerLayout.openDrawer(mLayerMenu);\n }\n if (mDrawerList != null) {\n mDrawerLayout.closeDrawer(mDrawerList);\n }\n }\n } else if (item.getItemId() == R.id.settings) {\n Intent pref = new Intent(this, EditPreferences.class);\n startActivity(pref);\n } else if (item.getItemId() == R.id.infoview) {\n Intent info = new Intent(this, InfoView.class);\n startActivity(info);\n } else if (item.getItemId() == R.id.exitview) {\n confirmExit();\n }\n return super.onOptionsItemSelected(item);\n \n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n DrawerLayout drawerLayout = findViewById(R.id.drawer_layout);\n\n switch (item.getItemId()) {\n case R.id.action_menu:\n drawerLayout.openDrawer(GravityCompat.START);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (drawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t\t\tpublic void onDrawerClosed() {\n\t\t\t\tshowUp();\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n // Activate the navigation drawer toggle\n if (id == R.id.action_location_found)\n {\n Toast.makeText(Home.this, \"Action Location\", Toast.LENGTH_SHORT).show();\n }\n else if (id == R.id.action_refresh)\n {\n Toast.makeText(Home.this, \"Action Refresh\", Toast.LENGTH_SHORT).show();\n }\n else if (id == R.id.action_help)\n {\n Toast.makeText(Home.this, \"Action Help\", Toast.LENGTH_SHORT).show();\n }\n else if (id == R.id.action_check_updates)\n {\n Toast.makeText(Home.this, \"Action Check Updates\", Toast.LENGTH_SHORT).show();\n }\n\n if (mDrawerToggle.onOptionsItemSelected(item))\n {\n return true;\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "public void onDrawerClosed(View view) {\n \tactivity.getSupportActionBar().setTitle(\"Txootx!\");\n \tactivity.invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n //getSupportActionBar().setTitle(\"Navigation Drawer\");\n invalidateOptionsMenu();\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n //getSupportActionBar().setTitle(mActivityTitle);\n invalidateOptionsMenu();\n }", "private void setupDrawer(){\n drawerToggle = new ActionBarDrawerToggle(\n this,\n drawerLayout,\n R.string.drawer_open,\n R.string.drawer_close) {\n\n public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }\n\n public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n getSupportActionBar().setTitle(appTitle);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }\n };\n drawerToggle.setDrawerIndicatorEnabled(true);\n drawerLayout.addDrawerListener(drawerToggle);\n }", "private ActionBarDrawerToggle setupDrawerToggle() {\n return new ActionBarDrawerToggle(this, mDrawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);\n }", "private ActionBarDrawerToggle setupDrawerToggle() {\n return new ActionBarDrawerToggle(this, mDrawer, toolbar, R.string.drawer_open, R.string.drawer_close);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n // getSupportActionBar().setTitle(mTitle);\n\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "@Override\n public void onDrawerOpened(View drawerView) {\n Log.d(\"Apps Main\", \"Open drawer \");\n }", "@Test\n public void clickOnAndroidHomeIcon_OpensNavigationDrawer() {\n onView(withId(R.id.drawer_layout))\n .check(matches(isClosed(Gravity.LEFT))); // Left Drawer should be closed.\n\n // Open Drawer\n onView(withId(R.id.drawer_layout))\n .perform(open());\n\n // Check if drawer is open\n onView(withId(R.id.drawer_layout))\n .check(matches(isOpen(Gravity.LEFT))); // Left drawer is open open.\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case R.id.action_search: {\n isSearch = true;\n searchToolbar.setVisibility(View.VISIBLE);\n prepareActionBar(searchToolbar);\n ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(\n this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);\n drawer.addDrawerListener(toggle);\n toggle.syncState();\n\n return true;\n }\n case android.R.id.home:\n closeSearch();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n //getActionBar().setTitle(mTitle);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t// The action bar home/up action should open or close the drawer.\n\t\t// ActionBarDrawerToggle will take care of this.\n\n\t\tIntent i;\n\t\t// Handle action buttons\n\t\t// switch (item.getItemId()) {\n\t\t// case R.id.menu_add_new_list:\n\t\t// if (task.getString(\"user_id\", null) != null) {\n\t\t// i = new Intent(getBaseContext(), MyMap.class);\n\t\t// startActivity(i);\n\t\t// } else {\n\t\t// Toast.makeText(this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t// }\n\t\t// return true;\n\t\t// case R.id.menu_dashboard:\n\t\t// if (task.getString(\"user_id\", null) != null) {\n\t\t// i = new Intent(this, dashboard_main.class);\n\t\t// i.putExtra(\"edit\", \"12344\");\n\t\t// startActivity(i);\n\t\t// } else {\n\t\t// Toast.makeText(this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t// }\n\t\t// return true;\n\t\t// case R.id.menu_login:\n\t\t// if (bedMenuItem.getTitle().equals(\"Logout\")) {\n\t\t// SharedPreferences.Editor editor = getSharedPreferences(\"user\",\n\t\t// MODE_PRIVATE).edit();\n\t\t// editor.clear();\n\t\t// editor.commit();\n\t\t// bedMenuItem.setTitle(\"Login/Register\");\n\t\t// } else {\n\t\t// Intent i_user = new Intent(getBaseContext(), user_login.class);\n\t\t// startActivity(i_user);\n\t\t// }\n\t\t//\n\t\t// return true;\n\t\t//\n\t\t// // case R.id.menu_search:\n\t\t// // showSearchDialog();\n\t\t// // return true;\n\t\t//\n\t\t// case android.R.id.home:\n\t\t//\n\t\t// finish();\n\t\t//\n\t\t// return super.onOptionsItemSelected(item);\n\t\t// default:\n\t\treturn super.onOptionsItemSelected(item);\n\n\t}", "@Test\n public void clickOnAndroidHomeIcon_OpensNavigation() {\n onView(withId(R.id.drawer_layout))\n .check(matches(isClosed(Gravity.LEFT))); // Left Drawer should be closed.\n\n // Open Drawer\n String navigateUpDesc = mActivityTestRule.getActivity()\n .getString(android.support.v7.appcompat.R.string.abc_action_bar_up_description);\n// onView(withContentDescription(navigateUpDesc)).perform(click());\n onView(withId(R.id.drawer_layout)).perform(open());\n // Check if drawer is open\n onView(withId(R.id.drawer_layout))\n .check(matches(isOpen(Gravity.LEFT))); // Left drawer is open open.\n }", "public void onDrawerClosed(View view) {\n if (Build.VERSION.SDK_INT >= 11) {\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n } else {\n //Call it directly on gingerbread.\n onPrepareOptionsMenu(mMenu);\n }\n\n// startFullscreenIfNeeded();\n }", "@Override\n\t\t\tpublic void onDrawerOpened() {\n\t\t\t\tshowDown();\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n switch (item.getItemId())\n {\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n // Handle action buttons\n switch(item.getItemId()) {\n case R.id.action_filter:\n \tif(mDrawerLayout.isDrawerOpen(mDrawerRight)){\n \t\tmDrawerLayout.closeDrawer(mDrawerRight);\n\t } else {\n\t \tmDrawerLayout.openDrawer(mDrawerRight);\n\t }\n \treturn true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n// getActionBar().setTitle(\"Select Destination\");\n }", "private void setupDrawer(){\n\n drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, R.string.drawerOpen,\n R.string.drawerClose){\n\n public void onDrawerOpened(View drawerView){\n\n super.onDrawerOpened(drawerView);\n getSupportActionBar().setTitle(R.string.app_name);\n invalidateOptionsMenu();\n }\n\n public void onDrawerClosed(View view){\n\n super.onDrawerClosed(view);\n getSupportActionBar().setTitle(activityTitle);\n invalidateOptionsMenu();\n }\n };\n drawerToggle.setDrawerIndicatorEnabled(true);\n drawerLayout.setDrawerListener(drawerToggle);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n if (id == R.id.action_log_out) {\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void onDrawerOpened(View drawerView) {\n supportInvalidateOptionsMenu();\n }", "public void onDrawerClosed(View view) {\n invalidateOptionsMenu();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.menu_star) {\n Toast.makeText(this,\"click star!\",Toast.LENGTH_SHORT).show();\n return true;\n } if (id == R.id.menu_search) {\n Toast.makeText(this,\"click search!\",Toast.LENGTH_SHORT).show();\n return true;\n } else if(id == android.R.id.home){\n mDrawerLayout.openDrawer(GravityCompat.START);\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n //getActionBar().setTitle(mTitle);\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n //getActionBar().setTitle(mTitle);\n //invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n try {\n getSupportActionBar().setTitle(\"Settings\");\n }catch(NullPointerException e){\n Toast.makeText(NavigationDrawerActivity.this, \"ActionBar \"+ e, Toast.LENGTH_SHORT).show();\n }\n //invalidateOptionsMenu();\n }", "public void onDrawerClosed(View view) {\n super.onDrawerClosed(view);\n if (actionBar != null) actionBar.setTitle(activityTitle);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "protected void onCreateDrawer(boolean canOpen){\n Toolbar toolbar = (Toolbar) findViewById(R.id.tb);\n\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n if(canOpen){ //If the activity can open the menu\n\n FrameLayout db = (FrameLayout) findViewById(R.id.drawer_button);\n\n //Clicks on the menu buttons\n db.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n setDisplayUserName();\n // open right drawer\n DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);\n drawer.openDrawer(GravityCompat.END);\n View view = getCurrentFocus();\n }\n\n });\n\n\n //Listener on the menu items in order to change page\n NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);\n navigationView.bringToFront();\n navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {\n @Override\n @RequiresApi(api = Build.VERSION_CODES.N)\n public boolean onNavigationItemSelected(MenuItem menuItem) {\n\n switch (menuItem.toString()) {\n case \"Catalogue\":\n Intent myIntent = new Intent(getApplicationContext(), CatalogActivity.class);\n startActivity(myIntent);\n break;\n case \"Mon panier\":\n Intent intent = getIntent();\n Intent topass = new Intent(getApplicationContext(), Cart.class);\n\n topass.putExtra(\"order\", intent.getSerializableExtra(\"order\"));\n startActivity(topass);\n break;\n case \"Recette personalisée\":\n Intent intentForm = new Intent(getApplicationContext(), FormActivity.class);\n startActivity(intentForm);\n break;\n case \"Mode nuit\":\n changeTheme();\n Intent reloadIntent = getIntent();\n finish();\n startActivity(reloadIntent);\n break;\n case \"Déconnexion\":\n //Clears the preferences\n SharedPreferences prefs;\n prefs = getApplicationContext().getSharedPreferences(\"UserPref\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.clear().commit();\n\n Intent intentLogout = new Intent(getApplicationContext(), ConnectionActivity.class);\n startActivity(intentLogout);\n\n notification();\n break;\n case \"Mes commandes\":\n Intent myOrders = new Intent(getApplicationContext(), MyOrders.class);\n startActivity(myOrders);\n break;\n\n }\n return false;\n }\n });\n\n }\n else{\n Toast.makeText(getBaseContext(), \"Impossible d'ouvrir le menu ici.\", Toast.LENGTH_LONG).show();\n }\n\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n// getActionBar().setTitle(mDrawerTitle);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n// getActionBar().setTitle(mDrawerTitle);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n Log.d(\"ppgllrd\", \"onOptionsItemSelected: \"+item);\n\n if (studentInfoFragment.isShown())\n return false; //don't open drawer\n\n if (actionBarTitleController.onOptionsItemSelected(item)) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "public void onDrawerOpened(View drawerView) {\n\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n //boolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n //menu.findItem(R.id.action_websearch).setVisible(!drawerOpen);\n return super.onPrepareOptionsMenu(menu);\n }", "public void onDrawerOpened(View drawerView) {\n super.onDrawerOpened(drawerView);\n getActionBar().setTitle(R.string.drawer_open);\n invalidateOptionsMenu(); // creates call to onPrepareOptionsMenu()\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (item != null && item.getItemId() == android.R.id.home) {\n if (drawer.isDrawerOpen(Gravity.RIGHT)) {\n drawer.closeDrawer(Gravity.RIGHT);\n } else {\n drawer.openDrawer(Gravity.RIGHT);\n }\n }\n //noinspection SimplifiableIfStatement\n return super.onOptionsItemSelected(item);\n }", "@Test\n public void onPressMenuHome(){\n onView(withId(R.id.drawer_layout))\n .check(matches(isClosed(Gravity.LEFT))) // Left Drawer should be closed.\n .perform(DrawerActions.open()); // Open Drawer\n\n // Show Content\n onView(withId(R.id.nav_view))\n .perform(NavigationViewActions.navigateTo(R.id.nav_home));\n }" ]
[ "0.7370486", "0.73059696", "0.72780573", "0.72641367", "0.7236749", "0.7213512", "0.7146903", "0.7090519", "0.7076204", "0.7065108", "0.70614344", "0.70614344", "0.7040906", "0.70081776", "0.70081776", "0.70081776", "0.70081776", "0.70081776", "0.70081776", "0.70081776", "0.69922096", "0.69922096", "0.69473726", "0.69473726", "0.6942183", "0.6917938", "0.68898964", "0.68566936", "0.6850274", "0.6812494", "0.680969", "0.6806297", "0.6801746", "0.6799979", "0.6786782", "0.6784773", "0.6767857", "0.6767857", "0.67568904", "0.6744626", "0.6704308", "0.668436", "0.668436", "0.6679517", "0.6676278", "0.66702", "0.66670054", "0.6661472", "0.6639685", "0.66370094", "0.66254854", "0.66189724", "0.66132116", "0.6594772", "0.6576049", "0.6562941", "0.65587765", "0.65557474", "0.6545652", "0.65223587", "0.6517732", "0.6517732", "0.651254", "0.6510422", "0.6504028", "0.649375", "0.6490921", "0.64684755", "0.6466711", "0.6455235", "0.644844", "0.64479524", "0.6443206", "0.6426771", "0.6426747", "0.64243615", "0.64140856", "0.6413246", "0.64116645", "0.64102834", "0.64015347", "0.63986933", "0.63879025", "0.6387315", "0.6387284", "0.63849163", "0.6376211", "0.63711447", "0.63711447", "0.6368242", "0.63661456", "0.63620937", "0.63543886", "0.63543886", "0.63531804", "0.6351293", "0.63450605", "0.6344416", "0.63436264", "0.63428974" ]
0.64655054
69
this interface is a listener between the Date Dialog fragment and the activity to update the buttons date
public void updateChangedDate(int year, int month, int day);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n new DatePickerDialog(UserUpdate.this, date, cal\n .get(Calendar.YEAR), cal.get(Calendar.MONTH), cal\n .get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\r\n\tpublic void dateDialogCallBack(String date) {\n\t\tnoteGlobal.dateString=date;\r\n\t\tnoteGlobal.getPlan(date);\r\n\t\tdateTextView.setText(date);\r\n\t\tdateString = date;\r\n\t\taddPlan_View();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tshowDialog(SET_DATE_DIALOG);\n\n\t\t\t}", "@Override\n public void onClick(Date date) {\n Event_dialog(date);\n }", "@OnClick(R.id.fragApod_btnSelectDate)\n public void onClickBtnSelectDate(){\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(),\n android.R.style.Theme_DeviceDefault_Light_Panel,\n new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n //Le damos el formato requerido a la fecha seleccionada\n date = new StringBuilder();\n date.append(year).append(\"-\");\n if((monthOfYear+1) < 10) date.append(\"0\");\n date.append(monthOfYear+1).append(\"-\");\n if(dayOfMonth < 10) date.append(\"0\");\n date.append(dayOfMonth);\n\n //LLamamos al método que establece su callback\n apodServiceEnqueue(apodService);\n }\n }, iYear, iMonth, iDay);\n datePickerDialog.show();\n //datePickerDialog.setTitle(getString(R.string.fragApod_msgSelectDate));\n //Sólo puede seleccionar hasta la fecha actual\n datePickerDialog.getDatePicker().setMaxDate(calendar.getTimeInMillis());\n\n //Le restamos 16 años a la fecha actual para ponerla como fecha mínima de selección\n Calendar calendarTemp = Calendar.getInstance();\n calendarTemp.add(calendar.YEAR,-16);\n datePickerDialog.getDatePicker().setMinDate(calendarTemp.getTimeInMillis());\n }", "@Override\r\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\r\n int mYear = c.get(Calendar.YEAR); // current year\r\n int mMonth = c.get(Calendar.MONTH); // current month\r\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\r\n\r\n\r\n // date picker dialog\r\n datePickerDialog = new DatePickerDialog(task_setting.this,\r\n new DatePickerDialog.OnDateSetListener() {\r\n\r\n\r\n @Override\r\n public void onDateSet(DatePicker view, int year,\r\n int monthOfYear, int dayOfMonth) {\r\n // set day of month , month and year value in the edit text\r\n\r\n final String[] MONTHS = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\r\n String mon = MONTHS[monthOfYear];\r\n date.setText(mon + \" \" + dayOfMonth + \", \" + year);\r\n }\r\n }, mYear, mMonth, mDay);\r\n datePickerDialog.getDatePicker().setMinDate(System.currentTimeMillis() - 1000);\r\n datePickerDialog.show();\r\n }", "public void onPickDateButtonClick(View v){\n\t\tDialogFragment newFragment = new DatePickerFragment();\n\t\t\n\t\tlong milis = -1;\t\t\n\t\tif (mGameSettings.contains(Constants.GAME_PREFERENCES_DOB)) {\n\t\t\tmilis = mGameSettings.getLong(Constants.GAME_PREFERENCES_DOB, 0);\n\t\t}\n\t\t\n\t\tBundle parametros = new Bundle();\n\t\tparametros.putLong(\"date\", milis); \n\t\t\n\t\tnewFragment.setArguments(parametros);\t\n\t\t\n\t\t\n\t\tnewFragment.show(getSupportFragmentManager(), \"datePicker\");\n\t}", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n\n autoD8.setText(dayOfMonth + \" \" + monthString(monthOfYear + 1) + \" \" + year);\n\n dialogueCal.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n dialogueCal.set(Calendar.YEAR, year);\n dialogueCal.set(Calendar.MONTH, monthOfYear);\n timeAndDate = dialogueCal.getTimeInMillis();\n\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), startdatepicker, trigger.getStarttime().get(Calendar.YEAR), trigger.getStarttime().get(Calendar.MONTH), trigger.getStarttime().get(Calendar.DAY_OF_MONTH)).show();\n }", "public void updateDate()\n\t{\n\t\t// Translate year, month and day into a Date object.\n\t\tmDate = new GregorianCalendar(mYear, mMonth, mDay, mHour, mMin).getTime();\n\t\t\n\t\t// Update arguments to preserve selected value on rotation.\n\t\tgetArguments().putSerializable(CrimeFragment.EXTRA_DATE, mDate);\n\t}", "private void showDateDialog(){\n final Calendar newCalendar = Calendar.getInstance();\n\n /**\n * Initiate DatePicker dialog\n */\n datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n /**\n * Method ini dipanggil saat kita selesai memilih tanggal di DatePicker\n */\n\n /**\n * Set Calendar untuk menampung tanggal yang dipilih\n */\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n\n if(!newDate.before(newCalendar)){\n /**\n * Update TextView with choosen date\n */\n newDate.set(Calendar.HOUR_OF_DAY, 0);\n newDate.set(Calendar.MINUTE, 0);\n newDate.set(Calendar.SECOND, 0);\n newDate.set(Calendar.MILLISECOND,0);\n mDateTextView.setTextColor(Color.BLACK);\n String day = mDateFormatter.getDayName(newDate.getTime());\n String date = mDateFormatter.getOnlyDate(newDate.getTime());\n String month = mDateFormatter.getMonth(newDate.getTime());\n mDateTextView.setText(day + \" \" + date + \",\" + month);\n mChoosenSaveDate = newDate;\n }else{\n mDateTextView.setText(\"Deadline has to be at leats same as current date\");\n mDateTextView.setTextColor(Color.RED);\n Toast.makeText(view.getContext(),\"invalid choosen date\",\n Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n },newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH), newCalendar.get(Calendar.DAY_OF_MONTH));\n\n /**\n * Tampilkan DatePicker dialog\n */\n datePickerDialog.show();\n\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), enddatepicker, trigger.getEndtime().get(Calendar.YEAR), trigger.getEndtime().get(Calendar.MONTH), trigger.getEndtime().get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n if(v == bfecha){\n final Calendar c= Calendar.getInstance();\n dia = c.get(Calendar.DAY_OF_MONTH);\n mes = c.get(Calendar.MONTH);\n año = c.get(Calendar.YEAR);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n edt_fecha.setText(dayOfMonth + \"/\" + year);\n }\n }\n ,dia,mes,año);\n datePickerDialog.show();\n }\n if(v == bhora){\n final Calendar c= Calendar.getInstance();\n hora = c.get(Calendar.HOUR_OF_DAY);\n minutos = c.get(Calendar.MINUTE);\n\n TimePickerDialog timePickerDialog = new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n edt_hora.setText(hourOfDay + \":\" + minute);\n }\n }\n ,hora,minutos,false);\n timePickerDialog.show();\n }\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getContext(), date2, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n\tpublic void onDateSet(DatePicker view, int year, int monthOfYear,\n\t\t\tint dayOfMonth) {\n\t\tgetday = dayOfMonth;\n\t\tgetmonth = monthOfYear;\n\t\tgetyear = year;\n\t\tCalendar datecheck = Calendar.getInstance();\n\n\t\tdatecheck.set(getyear, getmonth, getday);\n\n\t\tLong timeinms = datecheck.getTimeInMillis(); \n/*\nswitch(view.getTag().toString())\n{\ncase \"startdialog\":\n\n\ndatevalues getdateinter = (datevalues) getActivity();\ngetdateinter.getdatefromdialog(timeinms);\n\n\t\nbreak;\n\n\n} */\n\t\n\ndatevalues getdateinter = (datevalues) getActivity();\ngetdateinter.getdatefromdialog(timeinms);\nToast checktag = Toast.makeText(getActivity(), view.getId(), Toast.LENGTH_LONG)\t;\t\nchecktag.show();\n\t\t\n}", "protected void setDatePickerListener()\n {\n final FloatingActionButton datePickerBtn = (FloatingActionButton) findViewById(R.id.datePickerBtn);\n datePickerBtn.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n DatePickerFragment datePickerFragment = new DatePickerFragment();\n datePickerFragment.setCallerActivity(instance);\n ((DialogFragment)datePickerFragment).show(getFragmentManager(),\"Change Date\");\n }\n });\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tshowDialog(DATE_DIALOG_ID);\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n new DatePickerDialog(context, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "public void onClick(DialogInterface dialog, int item) {\n switch (item) {\n case 0://Date Modifier\n LayoutInflater ld = LayoutInflater.from(GoalDisActivity.this);\n promptsDateView = ld.inflate(R.layout.date_button, null);//promptsDateView declared global for later reference to DateDialogButton\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Goal-Date\");\n build.setMessage(\"Please Enter new Goal Date\");\n build.setView(promptsDateView);\n newDate = (Button) promptsDateView.findViewById(R.id.newGoalDate);\n newDate.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n showDialog(DATE_DIALOG_ID);\n }\n });\n\n final Calendar c = Calendar.getInstance();\n currentYear = c.get(Calendar.YEAR);\n currentMonth = c.get(Calendar.MONTH);\n currentDay = c.get(Calendar.DAY_OF_MONTH);\n\n newDate.setFocusableInTouchMode(true);\n //newDate.setFocusable(true);\n //newDate.requestFocus();\n build.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \" + DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2), null);\n if (mCursor.moveToFirst()) {\n do {\n dayValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.DAY));\n } while (mCursor.moveToNext());\n }\n\n // checks if user has chosen the date or not, if chosen, executes If condition\n if (dayG != null && !dayG.isEmpty() && monthG != null && !monthG.isEmpty() && yearG != null && !yearG.isEmpty()) {\n int dayVal = Integer.valueOf(dayG), monthVal = Integer.valueOf(monthG), yearVal = Integer.valueOf(yearG);\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.DAY + \"=\" + String.valueOf(dayVal) + \", \" + DbHelperGoal.MONTH + \"=\" + String.valueOf(monthVal) + \", \" + DbHelperGoal.YEAR + \"=\" + String.valueOf(yearVal) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), dayValue.toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n\n } else {// if user has not chosen but clicked on \"Ok\", then execute 'else'\n displayData();\n Toast.makeText(getApplication(), \"Please select a date\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"New Date Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n break;\n case 1://Payment\n LayoutInflater li = LayoutInflater.from(GoalDisActivity.this);\n View promptsPaymentView = li.inflate(R.layout.payment_layout, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Payment\");\n build.setMessage(\"Please Enter payment amount\");\n build.setView(promptsPaymentView);\n PayValue = (EditText) promptsPaymentView.findViewById(R.id.PaymentEnter1);\n //PayValue.isFocused();\n PayValue.setFocusableInTouchMode(true);\n PayValue.setFocusable(true);\n PayValue.requestFocus();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.showSoftInput(PayValue, InputMethodManager.SHOW_IMPLICIT);\n build.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n check = 0;\n val = 0;\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \" + DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2), null);\n if (mCursor.moveToFirst()) {\n do {\n moneyValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.ALT_PAYMENT));\n dbExpAmount = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.AMOUNT));\n check = mCursor.getFloat(mCursor.getColumnIndex(DbHelperGoal.ALT_EXPENSE));\n } while (mCursor.moveToNext());\n }\n val = Float.valueOf(PayValue.getText().toString()) + Float.valueOf(moneyValue);\n if (val - check <= Float.valueOf(dbExpAmount) && val - check >= 0) {// within the Target Amount\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n } else if (val - check > Float.valueOf(dbExpAmount) && val - check >= 0) {// if client collects extra amount for that goal, the Target amount extends\n build2 = new AlertDialog.Builder(GoalDisActivity.this);\n build2.setTitle(\"Confirmation\");\n build2.setMessage(\"The Payment Amount is exceeding the Target Amount. Do you want to increment the Target amount to the new value?\");\n build2.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.AMOUNT + \"=\" + String.valueOf(val - check) + \",\" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n build2.setNeutralButton(\"No, Only Savings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n build2.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n alert2 = build2.create();\n alert2.show();\n alert2.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n } else {\n Toast.makeText(getApplication(), \"Sorry, the amount is beyond the Target Amount\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n break;\n case 2://Expense\n //Toast.makeText(getApplication(), \"Expense\", Toast.LENGTH_SHORT).show();\n LayoutInflater le = LayoutInflater.from(GoalDisActivity.this);\n View promptsExpenseView = le.inflate(R.layout.payment_layout, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Expense\");\n build.setMessage(\"Please Enter withdrawl amount\");\n build.setView(promptsExpenseView);\n ExpValue = (EditText) promptsExpenseView.findViewById(R.id.PaymentEnter1);\n //PayValue.isFocused();\n build.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n check = 0;\n val = 0;\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \" + DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2), null);\n if (mCursor.moveToFirst()) {\n do {\n moneyValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.ALT_EXPENSE));\n dbExpAmount = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.AMOUNT));\n check = mCursor.getFloat(mCursor.getColumnIndex(DbHelperGoal.ALT_PAYMENT));\n } while (mCursor.moveToNext());\n }\n\n val = Float.valueOf(ExpValue.getText().toString()) + Float.valueOf(moneyValue);// TextBox + db value\n if (check - val <= Float.valueOf(dbExpAmount) && check - val >= 0) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_EXPENSE + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n ExpValue.setText(\"\");\n displayData();\n dialog.cancel();\n } else {\n Toast.makeText(getApplication(), \"Exceeding the Target amount limit.\", Toast.LENGTH_LONG).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Expense Cancelled\", Toast.LENGTH_SHORT).show();\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n break;\n case 3://Delete Data\n //Toast.makeText(getApplication(),\"Delete\",Toast.LENGTH_SHORT).show();\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Delete \" + goalTitle.get(arg2) + \" \" + date.get(arg2) + \" \" + amount.get(arg2));\n build.setMessage(\"Do you want to delete ?\");\n build.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), goalTitle.get(arg2) + \" \" + date.get(arg2) + \" \" + amount.get(arg2) + \" is deleted.\", Toast.LENGTH_LONG).show();\n dataBase.delete(DbHelperGoal.TABLE_NAME, DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2), null);\n displayData();\n dialog.cancel();\n }\n });\n build.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n //AlertDialog alert = build.create();\n alert = build.create();\n alert.show();\n break;\n default:\n Toast.makeText(getApplication(), \"default\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onUpdate(final String updateId) {\n LayoutInflater ld = LayoutInflater.from(GoalDisActivity.this);\n View promptsDateView = ld.inflate(R.layout.date_button, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Goal-Date\");\n build.setMessage(\"Please Enter new Goal Date\");\n build.setView(promptsDateView);\n newDate = (Button) promptsDateView.findViewById(R.id.newGoalDate);\n newDate.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n showDialog(DATE_DIALOG_ID);\n }\n });\n\n final Calendar c = Calendar.getInstance();\n currentYear = c.get(Calendar.YEAR);\n currentMonth = c.get(Calendar.MONTH);\n currentDay = c.get(Calendar.DAY_OF_MONTH);\n\n newDate.setFocusableInTouchMode(true);\n //newDate.setFocusable(true);\n //newDate.requestFocus();\n build.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"+ DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + updateId, null);\n if (mCursor.moveToFirst()) {\n do {\n dayValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.DAY));\n } while (mCursor.moveToNext());\n }\n\n if (dayG != null && !dayG.isEmpty() && monthG != null && !monthG.isEmpty() && yearG != null && !yearG.isEmpty()) {\n int dayVal = Integer.valueOf(dayG), monthVal = Integer.valueOf(monthG), yearVal = Integer.valueOf(yearG);\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.DAY + \"=\" + String.valueOf(dayVal) + \", \" + DbHelperGoal.MONTH + \"=\" + String.valueOf(monthVal) + \", \" + DbHelperGoal.YEAR + \"=\" + String.valueOf(yearVal) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + updateId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), dayValue.toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }else{\n Toast.makeText(getApplication(), \"Please choose a date\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"New Date Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getContext(), date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getContext(), date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(Edit_Profile.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(Edit_Profile.this, dateannier, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n \tToast.makeText(TaskActivity.this, \"Setting dates!\", Toast.LENGTH_SHORT).show();\n \tshowDatePickerDialog(mSelectedYear, mSelectedMonth, mSelectedDay, mOnDateSetListener);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n startYear = year;\n startMonth = monthOfYear + 1;\n startDay = dayOfMonth;\n try {\n dateChoisie = df.parse(String.valueOf(startYear + \"-\" + startMonth + \"-\" + startDay));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Log.e(\"DATE CHOISIE\",df.format(dateChoisie));\n switch (v.getId()){\n case R.id.buttonDateDebut:\n editDateDebut.setText(df.format(dateChoisie));\n break;\n case R.id.buttonDateFin:\n editDateFin.setText(df.format(dateChoisie));\n break;\n }\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(select_time_date.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n\n new DatePickerDialog(CompoffActivity.this, date, currentDate\n .get(Calendar.YEAR), currentDate.get(Calendar.MONTH),\n currentDate.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tString fcraDate = (String) btnFcraDate.getText();\n\t\t\t\t\tString dateParts[] = fcraDate.split(\"-\");\n\t\t\t\t\tsetfromday1 = dateParts[0];\n\t\t\t\t\tsetfrommonth1 = dateParts[1];\n\t\t\t\t\tsetfromyear1 = dateParts[2];\n\t \n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromday1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfrommonth1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromyear1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+fcraDate);\n\t\t\t\t\tshowDialog(FCRA_DATE_DIALOG_ID);\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\nDatePickerDialog dialog=new DatePickerDialog(Update_Activity.this,new OnDateSetListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onDateSet(DatePicker view, int year, int monthOfYear,\n\t\t\t\t\t\t\tint dayOfMonth) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t//把用户设置的时间存储\n\t\t\t\t\t\tcalendar.set(Calendar.YEAR,year);\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH,monthOfYear);\n\t\t\t\t\t\tcalendar.set(Calendar.DAY_OF_MONTH,dayOfMonth);\n\t\t\t\t\t\tdate=year+\"/\"+monthOfYear+\"/\"+dayOfMonth;\n\t\t\t\t\t\tTimePickerDialog time_dialog=new TimePickerDialog(Update_Activity.this,new OnTimeSetListener() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.HOUR_OF_DAY,hourOfDay);\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.MINUTE,minute);\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.SECOND,0);\n\t\t\t\t\t\t\t\tdate=new SimpleDateFormat(\"yyyy/MM/dd hh:mm\").format(calendar.getTimeInMillis());\n\t\t\t\t\t\t\t\ttv_tiem.setText(date);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},c.get(Calendar.HOUR_OF_DAY),c.get(Calendar.MINUTE),true);\n\t\t\t\t\t\ttime_dialog.show();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, c.get(Calendar.YEAR),c.get(Calendar.MONTH),c.get(Calendar.DATE));\n\t\t\t\tdialog.show();\n\t\t\t\t\n\t\t\t\n\t\t\t}", "@Override\n public void onClick(View v) {\n new DatePickerDialog(MainActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(AddVehicleActivity.this, date2, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(merchantHome, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(MainActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "private void event() {\n\n iv_back.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onBackPressed();\n }\n });\n\n edt_std_leave_sDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n mYear = c.get(Calendar.YEAR);\n mMonth = c.get(Calendar.MONTH);\n mDay = c.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(LeaveAddActivity.this,\n new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n// currentDate = dayOfMonth + \"-\" + (monthOfYear + 1) + \"-\" + year;\n// edt_std_leave_sDate.setText(currentDate);\n\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_sDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }\n });\n\n edt_std_leave_eDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n mYear = c.get(Calendar.YEAR);\n mMonth = c.get(Calendar.MONTH);\n mDay = c.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(LeaveAddActivity.this,\n new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n// currentDate = dayOfMonth + \"-\" + (monthOfYear + 1) + \"-\" + year;\n// edt_std_leave_eDate.setText(currentDate);\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_eDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }\n });\n\n ll_std_leave.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ll_std_leave.requestFocus();\n Const.openKeyBord(LeaveAddActivity.this);\n }\n });\n\n btn_std_leave.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (buttonClick) {\n btn_std_leave.setClickable(false);\n } else {\n validation();\n }\n }\n });\n }", "@Override\n public void onClick(View view) {\n dateDialog.show(getFragmentManager(), \"datePicker\");\n }", "@Override\n public void onClick(View v) {\n \t\tString text = textField.getText().toString();\n \t\t//String priority = priorityField.getText().toString();\n\t\t\t\tCalendar newDate = Calendar.getInstance();\n\t\t\t\tnewDate.set(datePicker.getYear(),\n\t\t\t\t\tdatePicker.getMonth(), datePicker.getDayOfMonth());\n \t\tlistener.onAddDialogDone(text, newDate);\n \t\tgetDialog().dismiss();\n }", "private DatePickerDialog.OnDateSetListener dateSetListener() {\n return new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n date = year + \".\" + month + \".\" + dayOfMonth;\n setDateB.setText(date);\n }\n };\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tnew DatePickerDialog(getActivity(), date, myCalendar\n\t\t\t\t\t\t.get( Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n\t\t\t\t\t\tmyCalendar.get(Calendar.DAY_OF_MONTH)).show();\n\t\t\t}", "@Override\n public void onClick(View v) {\n DatePickerDialog dialogoFecha = new DatePickerDialog(CreacionPerfiles.this, (view, year, month, dayOfMonth) ->\n edtFechaNaciento.setText(fechaHora.formatoFecha(dayOfMonth, month, year)), anio, mes, dia);\n dialogoFecha.show();\n }", "public void showDateDialog(View v) {\n Calendar newCalendar = Calendar.getInstance();\n\n /**\n * Initiate DatePicker dialog\n */\n datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n /**\n * Method ini dipanggil saat kita selesai memilih tanggal di DatePicker\n */\n\n /**\n * Set Calendar untuk menampung tanggal yang dipilih\n */\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateMasuk)\n mTglMasuk.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateLulus)\n mTglLulus.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnMasukKerja)\n mTglMasukKerja.setText(dateFormatter.format(newDate.getTime()));\n\n }\n }, newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH), newCalendar.get(Calendar.DAY_OF_MONTH));\n\n /**\n * Tampilkan DatePicker dialog\n */\n datePickerDialog.show();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n Button button = (Button) findViewById(R.id.dateBtn);\n button.setText(\"Selected Date: \" + month + \"/\" + day + \"/\" + year);\n calendarSelected.set(year, month, day);\n userSelectedDate = true;\n\n if (!userSelectedTime) {\n int hour = calendarSelected.get(Calendar.HOUR_OF_DAY);\n int minute = calendarSelected.get(Calendar.MINUTE);\n\n button = (Button) findViewById(R.id.timeBtn);\n button.setText(\"Selected Time: \" + hour + \":\" + String.format(\"%02d\",minute));\n }\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(AddVehicleActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "private void DateSelection(final TextView tv_inv_date) {\n try {\r\n AlertDialog.Builder dlgReportDate = new AlertDialog.Builder(myContext);\r\n final DatePicker dateReportDate = new DatePicker(myContext);\r\n String date_str = tvDate.getText().toString();\r\n String dd = date_str.substring(6,10)+\"-\"+date_str.substring(3,5)+\"-\"+date_str.substring(0,2);\r\n DateTime objDate = new DateTime(dd);\r\n dateReportDate.updateDate(objDate.getYear(), objDate.getMonth(), objDate.getDay());\r\n String strMessage = \"\";\r\n\r\n\r\n\r\n dlgReportDate\r\n .setIcon(R.drawable.ic_launcher)\r\n .setTitle(\"Date Selection\")\r\n .setMessage(strMessage)\r\n .setView(dateReportDate)\r\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\r\n String strDd = \"\";\r\n public void onClick(DialogInterface dialog, int which) {\r\n if (dateReportDate.getDayOfMonth() < 10) {\r\n strDd = \"0\" + String.valueOf(dateReportDate.getDayOfMonth())+\"-\";\r\n } else {\r\n strDd = String.valueOf(dateReportDate.getDayOfMonth())+\"-\";\r\n }\r\n if (dateReportDate.getMonth() < 9) {\r\n strDd += \"0\" + String.valueOf(dateReportDate.getMonth() + 1) + \"-\";\r\n } else {\r\n strDd += String.valueOf(dateReportDate.getMonth() + 1) + \"-\";\r\n }\r\n\r\n strDd += String.valueOf(dateReportDate.getYear());\r\n tv_inv_date.setText(strDd);\r\n Log.d(\"ReprintDate\", \"Selected Date:\" + strDd);\r\n }\r\n })\r\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\r\n\r\n public void onClick(DialogInterface dialog, int which) {\r\n // TODO Auto-generated method stub\r\n\r\n }\r\n })\r\n .show();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void showDateDialog(View v) {\n Calendar newCalendar = Calendar.getInstance();\n\n /**\n * Initiate DatePicker dialog\n */\n datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n /**\n * Method ini dipanggil saat kita selesai memilih tanggal di DatePicker\n */\n\n /**\n * Set Calendar untuk menampung tanggal yang dipilih\n */\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateAnak)\n mTglLahirAnak.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateTanggungan)\n mTglLahirTanggungan.setText(dateFormatter.format(newDate.getTime()));\n }\n }, newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH), newCalendar.get(Calendar.DAY_OF_MONTH));\n\n /**\n * Tampilkan DatePicker dialog\n */\n datePickerDialog.show();\n }", "private void initPopupDate() {\n editDate = findViewById(R.id.date_depense);\n date = new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n // TODO Auto-generated method stub\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDate();\n }\n\n };\n\n // onclick - popup datepicker\n editDate.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n new DatePickerDialog(context, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }", "@Override\n public void onDateSet(DatePickerDialog view, int year, int month, int date)\n {\n String dateSet = \"\" + year + \"-\" + (++month) + \"-\" + date;\n selectDateTextView.setText(dateSet);\n\n\n\n\n// _device_id = \"2345\";\n// _expiry_date = T.parseDate(dateSet);\n// _document_type = \"Driving Licence\";\n//\n// uploadDocumentImage();\n }", "@Override\n public void onClick(View view) {\n new DatePickerDialog(AddEventActivity.this, end_Journey_Date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n int mYear = c.get(Calendar.YEAR); // current year\n int mMonth = c.get(Calendar.MONTH); // current month\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\n // date picker dialog\n datePickerDialog = new DatePickerDialog(ChangeProfileActivity.this,\n new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n // set day of month , month and year value in the edit text\n txtdate.setText(dayOfMonth + \"/\"\n + (monthOfYear + 1) + \"/\" + year);\n\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.DAY_OF_MONTH, month, day, 0, 0);\n calendar.set(Calendar.YEAR, year);\n\n String formatedDate = sdf.format(calendar.getTime());\n if (calendar.getTime().before(Calendar.getInstance().getTime())) {\n diffInMilis = Calendar.getInstance().getTimeInMillis() - calendar.getTimeInMillis();\n diffInDays = diffInMilis / (24 * 60 * 60 * 1000);\n if (diffInDays > 21) {\n String promptMessage = \"Cannot fetch call logs for \" + diffInDays\n + \" days right now. Please wait for \"\n + String.valueOf(diffInDays - 21) + \"days\";\n Toast.makeText(getContext(), promptMessage, Toast.LENGTH_SHORT).show();\n }\n\n else {\n Toast.makeText(getContext(), \"Day before\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getActivity().getBaseContext(), UserLogsTabs.class);\n intent.putExtra(\"date\", calendar.getTime());\n intent.putExtra(\"whenItHappened\", \"before\");\n startActivity(intent);\n\n }\n }\n\n else if (calendar.getTime().equals(Calendar.getInstance().getTime()))\n {\n Toast.makeText(getContext(), \"Please select a date before the current date\",\n Toast.LENGTH_SHORT).show();\n }\n\n else {\n Toast.makeText(getContext(), \"Cannot fetch call logs from future\", Toast.LENGTH_SHORT).show();\n /*Intent intent = new Intent(getActivity(), CallLogStats.class);\n intent.putExtra(\"date\", calendar.getTime());\n intent.putExtra(\"whenItHappened\", \"after\");\n startActivity(intent);*/\n }\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n date.setText(year+\"/\"+(month+1)+ \"/\"+ day);\n hDate = year+\"/\"+(month+1)+ \"/\"+ day;\n check(hDate, status);\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(DatePickerActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n\t\t\tendDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t\n\t\t\ttry {\n\t\t\t\tDatePicker startDatePicker = dpdS.getDatePicker();\n\t\t\t\tDate endDate = (Date) formatter.parse( getFormattedDate(year, month, day) );\n\t\t\t\tDate startDate = (Date) formatter.parse( getFormattedDate(startDatePicker) );\n\t\t\t\tdpdS.getDatePicker().setMinDate(endDate.getTime());\n\t\t\t\tif ( endDate.getTime() < startDate.getTime() ) {\n\t\t\t\t\tdpdS.updateDate(year, month, day);\n\t\t\t\t\tstartDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t\t}\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}", "public void onDateSet(DatePicker view, int year, int month, int day) {\n\t\t\tstartDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t// change end date\n\t\t\t\n\t\t\ttry {\n\t\t\t\tDatePicker endDatePicker = dpdE.getDatePicker();\n\t\t\t\tDate startDate = (Date) formatter.parse( getFormattedDate(year, month, day) );\n\t\t\t\tDate endDate = (Date) formatter.parse( getFormattedDate(endDatePicker) );\n\t\t\t\tdpdE.getDatePicker().setMinDate(startDate.getTime());\n\t\t\t\tif ( endDate.getTime() < startDate.getTime() ) {\n\t\t\t\t\tdpdE.updateDate(year, month, day);\n\t\t\t\t\tendDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t\t}\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}", "public interface DatepickerListener {\n void dialogValueReturn(String year, String week, String month, String day);\n}", "private void DateSelection(final TextView tv_inv_date ) {\n try {\n AlertDialog.Builder dlgReportDate = new AlertDialog.Builder(this);\n final DatePicker dateReportDate = new DatePicker(this);\n String date_str = tvDate.getText().toString();\n String dd = date_str.substring(6,10)+\"-\"+date_str.substring(3,5)+\"-\"+date_str.substring(0,2);\n DateTime objDate = new DateTime(dd);\n dateReportDate.updateDate(objDate.getYear(), objDate.getMonth(), objDate.getDay());\n String strMessage = \"\";\n\n\n dlgReportDate\n .setIcon(R.drawable.ic_launcher)\n .setTitle(\"Date Selection\")\n .setMessage(strMessage)\n .setView(dateReportDate)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n String strDd = \"\";\n public void onClick(DialogInterface dialog, int which) {\n if (dateReportDate.getDayOfMonth() < 10) {\n strDd = \"0\" + String.valueOf(dateReportDate.getDayOfMonth())+\"-\";\n } else {\n strDd = String.valueOf(dateReportDate.getDayOfMonth())+\"-\";\n }\n if (dateReportDate.getMonth() < 9) {\n strDd += \"0\" + String.valueOf(dateReportDate.getMonth() + 1) + \"-\";\n } else {\n strDd += String.valueOf(dateReportDate.getMonth() + 1) + \"-\";\n }\n\n strDd += String.valueOf(dateReportDate.getYear());\n tv_inv_date.setText(strDd);\n Log.d(\"ReprintDate\", \"Selected Date:\" + strDd);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n }\n })\n .show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void onClick(View v) {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) final Calendar mcurrentDate = Calendar.getInstance();\n int mYear = mcurrentDate.get(Calendar.YEAR);\n int mMonth = mcurrentDate.get(Calendar.MONTH);\n int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog mDatePicker = new DatePickerDialog(Addnewuser.this, new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n mybirthday = new GregorianCalendar(selectedyear, selectedmonth, selectedday).getTime();\n birthday = \"\" + selectedday + \"/\" + (selectedmonth + 1) + \"/\" + selectedyear + \"\";\n dob.setText(birthday);\n // Toast.makeText(Addnewuser.this, \"\"+birthday+\"\\n\" +\n // \"\"+date.toString(), Toast.LENGTH_SHORT).show();\n\n\n }\n }, mYear, mMonth, mDay);\n mDatePicker.setTitle(\"Select date\");\n mDatePicker.show();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t DatePickerDialog mDatePicker=new DatePickerDialog(contextyeild, new OnDateSetListener() { \n\t\t\t\t\t public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n\t\t\t\t\t // TODO Auto-generated method stub \n\t\t\t\t\t /* Your code to get date and time */\n\t\t\t\t\t \t//final Calendar c = Calendar.getInstance();\n\t\t\t\t\t \t\t//\tc.set(selectedyear, selectedmonth, selectedday);\n\t\t\t\t\t \t\t\tstart_day = selectedday;\n\t\t\t\t\t \t\t\tstart_month = selectedmonth;\n\t\t\t\t\t \t\t\tstart_year = selectedyear;\n\t\t\t\t\t \t\t\t//final Date date = new Date(c.getTimeInMillis());\n\t\t\t\t\t \t\t\t//final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t \t\t\t//harvestdate1.setText(dateFormat.format(date));\n\t\t\t\t\t harvestdate1.setText(new StringBuilder().append(start_day).append(\"-\").append(start_month+1)\n\t\t\t\t .append(\"-\").append(start_year)\n\t\t\t\t .append(\" \")); \t\n\t\t\t\t\t // set selected date into Date Picker\n\t\t\t\t\t datepicker.init(start_year, start_month, start_day, null);\n\n\t\t\t\t\t }\n\t\t\t\t\t },start_year, start_month, start_day);\n\t\t\t\t\t mDatePicker.setTitle(\"Select date\"); \n\t\t\t\t\t mDatePicker.show(); \n\t\t\t\t\t\t\t}", "public void calendarDates()\n {\n textViewStartDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Calendar cal = Calendar.getInstance();\n int year = cal.get( Calendar.YEAR);\n int month = cal.get( Calendar.MONTH);\n int day = cal.get( Calendar.DAY_OF_MONTH);\n\n DatePickerDialog dialog = new DatePickerDialog (\n PlanProfile.this,\n mDateSetListener,\n year,month,day);\n dialog.show();\n }\n });\n mDateSetListener = new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n month = month + 1;\n Log.d(TAG, \"onDateSet: mm/dd/yyy: \" + month + \"/\" + day + \"/\" + year);\n\n String date = month + \"/\" + day + \"/\" + year;\n textViewStartDate.setText(date);\n }\n };\n\n\n textViewEndDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Calendar cal = Calendar.getInstance();\n int year = cal.get( Calendar.YEAR);\n int month = cal.get( Calendar.MONTH);\n int day = cal.get( Calendar.DAY_OF_MONTH);\n\n DatePickerDialog dialog = new DatePickerDialog (\n PlanProfile.this,\n mDateSetListener2,\n year,month,day);\n dialog.show();\n }\n });\n mDateSetListener2 = new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n month = month + 1;\n Log.d(TAG, \"onDateSet: mm/dd/yyy: \" + month + \"/\" + day + \"/\" + year);\n\n String date = month + \"/\" + day + \"/\" + year;\n textViewEndDate.setText(date);\n }\n };\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(AddTripActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n showDatePickerDialog();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n }", "@Override\t\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tString regDate = (String) btnRegDate.getText();\n\t\t\t\t\tString dateParts[] = regDate.split(\"-\");\n\t\t\t\t\tsetfromday = dateParts[0];\n\t\t\t\t\tsetfrommonth = dateParts[1];\n\t\t\t\t\tsetfromyear = dateParts[2];\n\t\t \n\t\t\t\t\tSystem.out.println(\"regdate is:\"+regDate);\n\t\t\t\t\tshowDialog(REG_DATE_DIALOG_ID);\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n new DatePickerDialog(AddEventActivity.this, start_Journey_Date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n int mYear = year;\n int mMonth = monthOfYear;\n int mDay = dayOfMonth;\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n String formatedDate = sdf.format(new Date(year-1900, mMonth, mDay));\n\n SimpleDateFormat sdf2 = new SimpleDateFormat(\"yyyyMMdd\");\n formatedDateMYSQL = sdf2.format(new Date(year-1900, mMonth, mDay));\n\n buttonDate.setText(\"\"+formatedDate+\"\");\n buttonDate.setTag(formatedDateMYSQL);\n\n mAuthTask = new getTaskDetail(useremail,\"\");\n\n mAuthTask.execute((Void) null);\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateMasuk)\n mTglMasuk.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateLulus)\n mTglLulus.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnMasukKerja)\n mTglMasukKerja.setText(dateFormatter.format(newDate.getTime()));\n\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(RegistrationActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n month=month+1;\n String currentInfo=\"\";\n Cursor cursor=myDb.getRow(mId1);// finding selected row item to store the selected date\n if(cursor.moveToFirst()){\n do{\n currentInfo=cursor.getString(cursor.getColumnIndex(myDb.KEY_DATE));\n\n }while (cursor.moveToNext());\n cursor.close();\n }\n currentInfo =year+\"-\"+month+\"-\"+day;\n //Storing the date at selected row\n myDb.updateRow(mId1, currentInfo);\n\n populateListViewFromDB();\n }", "@Override\n public void onClick(View v) {\n MmxDate dateTime = new MmxDate(getPaymentDate());\n\n CalendarDatePickerDialogFragment datePicker = new CalendarDatePickerDialogFragment()\n .setFirstDayOfWeek(dateUtils.getFirstDayOfWeek())\n .setOnDateSetListener(listener)\n .setPreselectedDate(dateTime.getYear(), dateTime.getMonth() - 1, dateTime.getDayOfMonth());\n if (new UIHelper(RecurringTransactionEditActivity.this).isUsingDarkTheme()) {\n datePicker.setThemeDark();\n }\n datePicker.show(getSupportFragmentManager(), TAG_DATEPICKER);\n }", "private void setOnClickListener(){\n Calendar = Calendar.getInstance();\n year = Calendar.get(Calendar.YEAR);\n month = Calendar.get(Calendar.MONTH);\n day = Calendar.get(Calendar.DAY_OF_MONTH);\n\n //Purpose: ingin membuat datepicker untuk checkin\n TextViewCheckIn.setOnClickListener(new View.OnClickListener() {\n //getActivity() = memperoleh activity yang ada di fragment ini\n @Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckIn.setText(date);\n\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n datePickerDialog.show();\n }\n });\n\n //Purpose: ingin membuat datepicker untuk checkout\n TextViewCheckOut.setOnClickListener(new View.OnClickListener() {\n //getActivity() = memperoleh activity yang ada di fragment ini\n @Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckOut.setText(date);\n long today = Calendar.getTimeInMillis();\n view.setMinDate(today);\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n //memunculkan pilihan pada UI\n datePickerDialog.show();\n }\n });\n //nantinya mungkin diperlukan supaya pada saat user menekan submit, dropdown yang dipilih akan tersave\n ButtonSearch.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n boolean isValid = true;\n\n //Step 1: Check Position Term dipilih atau tidak\n\n //1 artinya Long Term\n //2 artinya Short Term\n if(PositionTerm == 0)\n isValid = false;\n else if(PositionTerm == 1){\n //Step 2: Validasi Check Date dulu\n boolean isDate = false;\n String checkin = TextViewCheckIn.getText().toString().trim();\n String checkout = TextViewCheckOut.getText().toString().trim();\n isDate = CheckDate(checkin, checkout);\n if(!isDate){\n isValid = false;\n }\n }\n\n //cek kosong buat posisi saat ini\n if(PositionLocation.equals(\"None\")){\n isValid = false;\n }\n\n\n if(isValid == true){\n //Disini baru input semua data ke dalam intent selanjutnya\n HeaderBooking headerBooking = new HeaderBooking();\n String checkin, checkout, location;\n checkin = TextViewCheckIn.getText().toString().trim();\n checkout = TextViewCheckOut.getText().toString().trim();\n location = PositionLocation;\n\n headerBookingRepository = new HeaderBookingRepository(getActivity());\n\n //kalau 1 masukin CheckOut juga, kalau 2 masukin Checkin aja\n if(PositionTerm == 1){\n headerBooking.setCheckIn(checkin);\n headerBooking.setCheckOut(checkout);\n headerBooking.setHotelID(LocationIndex);\n headerBooking.setPeriod(\"Long Term\");\n\n }else if(PositionTerm == 2){\n headerBooking.setCheckIn(checkin);\n headerBooking.setHotelID(LocationIndex);\n headerBooking.setPeriod(\"Short Term\");\n }\n\n\n //perpindahan screen ke BookActivity\n //Kalau bisa, bawa atribut dari sini yang sudah masuk nanti, untuk dipakai memasukkan data\n Intent intent = new Intent(getActivity(), PethouseProfileActivity.class);\n intent.putExtra(\"HeaderBooking\", headerBooking);\n //bisa menambahkan putExtra, syarat, class ini harus impelements atau extends Serializable\n startActivity(intent);\n }\n }\n });\n ImageViewCard.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getActivity(), PromoActivity.class));\n }\n });\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n int mMonth = month + 1;\n String bydate = year + \"-\" + mMonth + \"-\" + day;\n mIdTvMoonatCenterShortLine.setText(bydate);\n\n List<SleepDataInfo> all = manager.findAllSleep();\n SleepDataInfo sleepDataInfo_total = manager.findSleepDataInfo(SPUtil.getUserName(getApplication()), bydate);\n RefreshView(sleepDataInfo_total); /*选择日期后刷新ui*/\n }", "public void onDateSet(DatePicker view, int year, int month, int day){\n TextView tv = getActivity().findViewById(R.id.textBornAdult);\n\n // Create a Date variable/object with user chosen date\n Calendar cal = Calendar.getInstance(SBFApplication.config.locale);\n cal.setTimeInMillis(0);\n cal.set(year, month, day, 0, 0, 0);\n Date chosenDate = cal.getTime();\n\n // Format the date using style and locale\n // DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, BaseActivity.getInstance().config.locale);\n String formattedDateShow = formatterBornShow.format(chosenDate);\n String formattedDate = formatterTrain.format(chosenDate);\n // formatter.format(date.getDate()\n\n\n // Display the chosen date to app interface\n tv.setText(formattedDateShow);\n dateBorn=formattedDate;\n // MemoryStore.set(getActivity(), \"adultBorn\", formattedDate);\n // MemoryStore.set(getActivity(), \"adultBornShow\", formattedDateShow);\n }", "@Override\n\t\t\t\t\t\tpublic void onDateSet(DatePicker view,\n\t\t\t\t\t\t\t\tint selectedyear, int monthOfYear,\n\t\t\t\t\t\t\t\tint dayOfMonth) {\n\n\t\t\t\t\t\t\tyear = selectedyear;\n\t\t\t\t\t\t\tmonth = monthOfYear;\n\t\t\t\t\t\t\tday = dayOfMonth;\n\t\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t\tDate date = new SimpleDateFormat(\"yyyy-MM-dd\")\n\t\t\t\t\t\t\t\t\t\t.parse(year + \"-\" + (month + 1) + \"-\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ day);\n\n\t\t\t\t\t\t\t\tDateFormat outputFormatter = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\"yyyy-MM-dd\");\n\t\t\t\t\t\t\t\tString selectedDate = outputFormatter\n\t\t\t\t\t\t\t\t\t\t.format(date); // Output : 01/20/2012\n\n\t\t\t\t\t\t\t\tSystem.out.println(\"!!!!!!selectedDate...\"\n\t\t\t\t\t\t\t\t\t\t+ selectedDate);\n\n\t\t\t\t\t\t\t\t// Date currDate=new Date();\n\n\t\t\t\t\t\t\t\tSystem.out.println(\"!!!!!!!!!currDate.\"\n\t\t\t\t\t\t\t\t\t\t+ currDate);\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"output.compareTo(currDate)..\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ selectedDate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.compareTo(currDate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString()));\n\n\t\t\t\t\t\t\t\tif (selectedDate.compareTo(currDate.toString()) >= 0\n\t\t\t\t\t\t\t\t\t\t&& selectedDate.compareTo(output\n\t\t\t\t\t\t\t\t\t\t\t\t.toString()) <= 0) {\n\t\t\t\t\t\t\t\t\t// then do your work\n\t\t\t\t\t\t\t\t\t// Display Selected date in textbox\n\n\t\t\t\t\t\t\t\t\tDateFormat outputFormatter1 = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\"yyyy-MM-dd\");\n\t\t\t\t\t\t\t\t\tString date_formating = outputFormatter1\n\t\t\t\t\t\t\t\t\t\t\t.format(date);\n\n\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!after_formating..\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ outputFormatter1\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"!!!!!\" + date_formating);\n\n\t\t\t\t\t\t\t\t\trf_booking_date_box.setText(selectedDate);\n\t\t\t\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_date_header.setText(selectedDate);\n\n\t\t\t\t\t\t\t\t\t// rf_booking_date_box.setText(year + \"-\" +\n\t\t\t\t\t\t\t\t\t// (month + 1)\n\t\t\t\t\t\t\t\t\t// + \"-\" + day);\n\n\t\t\t\t\t\t\t\t\tGlobal_variable.str_Date = date_formating;\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// show message\n\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_invalid_date),\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}\n\n\t\t\t\t\t\t\t} catch (java.text.ParseException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}", "private void tanggalAkhirPembalikanDatepicker(){\n tanggalAkhirPembalikanEditText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n c= Calendar.getInstance();\n int day = c.get(Calendar.DAY_OF_MONTH);\n int month = c.get(Calendar.MONTH);\n int year = c.get(Calendar.YEAR);\n\n dpd = new DatePickerDialog(IncubationForm.this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n int m =month+1;\n tanggalAkhirPembalikanEditText.setText(dayOfMonth + \"/\"+m+\"/\"+year);\n tanggalPembalikan[1][0]= dayOfMonth;\n tanggalPembalikan[1][1]= month+1;\n tanggalPembalikan[1][2]= year;\n }\n }, year, month, day);\n dpd.show();\n }\n });\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(AddActivity.this, date, myCalendar.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onReceiveDateFromDialog(Date date) {\n // Attempt to mark currently opened event as done\n databaseHandler.markEventDone(selectedEvent, date);\n prepareData();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateAnak)\n mTglLahirAnak.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateTanggungan)\n mTglLahirTanggungan.setText(dateFormatter.format(newDate.getTime()));\n }", "public void onClick(View v) {\n\t\t\t\tshowDialog(DATE_DIALOG_ID);\r\n\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t DatePickerDialog mDatePicker=new DatePickerDialog(contextyeild, new OnDateSetListener() { \n\t\t\t\t\t\t public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n\t\t\t\t\t\t // TODO Auto-generated method stub \n\t\t\t\t\t\t /* Your code to get date and time */\n\t\t\t\t\t\t \t//final Calendar c = Calendar.getInstance();\n\t\t\t\t\t\t \t\t//\tc.set(selectedyear, selectedmonth, selectedday);\n\t\t\t\t\t\t \t\t\tstart_day = selectedday;\n\t\t\t\t\t\t \t\t\tstart_month = selectedmonth;\n\t\t\t\t\t\t \t\t\tstart_year = selectedyear;\n\t\t\t\t\t\t \t\t\t//final Date date = new Date(c.getTimeInMillis());\n\t\t\t\t\t\t \t\t\t//final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t\t \t\t\t//harvestdate1.setText(dateFormat.format(date));\n\t\t\t\t\t\t harvestdate1.setText(new StringBuilder().append(start_day).append(\"-\").append(start_month+1)\n\t\t\t\t\t .append(\"-\").append(start_year)\n\t\t\t\t\t .append(\" \")); \t\n\t\t\t\t\t\t // set selected date into Date Picker\n\t\t\t\t\t\t datepicker.init(start_year, start_month, start_day, null);\n\n\t\t\t\t\t\t }\n\t\t\t\t\t\t },start_year, start_month, start_day);\n\t\t\t\t\t\t mDatePicker.setTitle(\"Select date\"); \n\t\t\t\t\t\t mDatePicker.show(); \n\t\t\t\t\t\t\t}", "@Override\n\t\tpublic void onClick(final View v) {\n\t\t\t\n\t\t\tint y,m,d;\n\t\t\t\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\t\n\t\t\ty=c.get(Calendar.YEAR);\n\t\t\tm=c.get(Calendar.MONTH);\n\t\t\td=c.get(Calendar.DAY_OF_MONTH);\n\t\t\t\n\t\t\tDatePickerDialog dpd = new DatePickerDialog(ADD2Activity.this, new OnDateSetListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tEditText et = (EditText) v;\n\t\t\t\t\t\n\t\t\t\t\tet.setText(\"\" + dayOfMonth +\"-\" + monthOfYear + \"-\" + (year%100));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}, y, m, d); \n\t\t\t\n\t\t\tdpd.show();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n public void onClick(View v) {\n new DatePickerDialog(RegisterActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "public void onDateSelected(String dateStr){\n\t\t\n\t\tNewExpenseFragment newExpenseFrag = (NewExpenseFragment) getFragmentManager().findFragmentById(R.id.fragmentContainer);\n\t\t\n\t\tif(newExpenseFrag != null){\n\t\t\tnewExpenseFrag.updateDateTextView(dateStr);\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n\n year = selectedYear;\n month = selectedMonth;\n day = selectedDay;\n\n showDialog(AppUtils.TIME_DIALOG_ID);\n\n }", "private void tanggalAwalPembalikanDatepicker(){\n tanggalAwalPembalikanEditText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n c= Calendar.getInstance();\n int day = c.get(Calendar.DAY_OF_MONTH);\n int month = c.get(Calendar.MONTH);\n int year = c.get(Calendar.YEAR);\n\n dpd = new DatePickerDialog(IncubationForm.this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n int m =month+1;\n tanggalAwalPembalikanEditText.setText(dayOfMonth + \"/\"+m+\"/\"+year);\n tanggalPembalikan[0][0]= dayOfMonth;\n tanggalPembalikan[0][1]= month+1;\n tanggalPembalikan[0][2]= year;\n }\n }, year, month, day);\n dpd.show();\n }\n });\n }", "public interface OnDateSelectedListner {\n\n void onDateSet(TimeSectionDialog timeSectionDialog, long startMillseconds,long endMillSeconds);\n}", "public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n Calendar calendarNow = Calendar.getInstance();\n calendarNow.set(selectedYear, selectedMonth, selectedDay);\n if (calendarNow.getTimeInMillis() < view.getMinDate()) {\n begdaShowDatePickerDialog();\n Toast.makeText(getActivity(), getResources().getString(R.string.createOrder_datePicker_selectFutureDate), Toast.LENGTH_SHORT).show();\n view.updateDate(begCalendar.get(Calendar.YEAR), begCalendar.get(Calendar.MONTH), begCalendar.get(Calendar.DAY_OF_MONTH));\n }\n\n begYear = selectedYear;\n begMonth = selectedMonth;\n begDay = selectedDay;\n begCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvBegda.setText(new StringBuilder().append(char2(begDay))\n .append(\".\").append(char2(begMonth + 1)).append(\".\").append(begYear));\n if (tvEndda.getText().toString().equals(getResources().getString(R.string.leave_dmy))) {\n endYear = selectedYear;\n endMonth = selectedMonth;\n endDay = selectedDay;\n endCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvEndda.setText(new StringBuilder().append(char2(endDay))\n .append(\".\").append(char2(endMonth + 1)).append(\".\").append(endYear));\n }\n }", "@Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckIn.setText(date);\n\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n datePickerDialog.show();\n }", "@Override\n public void onDayLongPress(Date date) {\n FragmentManager manager = getFragmentManager();\n Fragment frag = manager.findFragmentByTag(\"fragment_edit_id\");\n if (frag != null) {\n manager.beginTransaction().remove(frag).commit();\n }\n\n FragDailyLog newLog = new FragDailyLog();\n //Pass date into dialog\n Bundle dateBundle = new Bundle();\n dateBundle.putLong(\"date\", date.getTime());\n newLog.setArguments(dateBundle);\n newLog.show(manager, \"fragment_edit_id\");\n }", "@Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckOut.setText(date);\n long today = Calendar.getTimeInMillis();\n view.setMinDate(today);\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n //memunculkan pilihan pada UI\n datePickerDialog.show();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n\n if(!newDate.before(newCalendar)){\n /**\n * Update TextView with choosen date\n */\n newDate.set(Calendar.HOUR_OF_DAY, 0);\n newDate.set(Calendar.MINUTE, 0);\n newDate.set(Calendar.SECOND, 0);\n newDate.set(Calendar.MILLISECOND,0);\n mDateTextView.setTextColor(Color.BLACK);\n String day = mDateFormatter.getDayName(newDate.getTime());\n String date = mDateFormatter.getOnlyDate(newDate.getTime());\n String month = mDateFormatter.getMonth(newDate.getTime());\n mDateTextView.setText(day + \" \" + date + \",\" + month);\n mChoosenSaveDate = newDate;\n }else{\n mDateTextView.setText(\"Deadline has to be at leats same as current date\");\n mDateTextView.setTextColor(Color.RED);\n Toast.makeText(view.getContext(),\"invalid choosen date\",\n Toast.LENGTH_LONG).show();\n }\n\n\n }", "public void addListenerOnAddDateBtn() {\n\n addButton = (Button) findViewById(R.id.addButton);\n\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n new DatePickerDialog(AddTodoActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }", "private void assignClickHandlers()\n {\n btnNext.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View v)\n {\n currentDate.add(Calendar.MONTH, 1);\n updateAttendanceDetails();\n }\n });\n\n // subtract one month and refresh UI\n btnPrev.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View v)\n {\n currentDate.add(Calendar.MONTH, -1);\n updateAttendanceDetails();\n }\n });\n\n\n\n\n txtDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n new DatePickerDialog(AttendanceDetailsActivity.this, date, currentDate\n .get(Calendar.YEAR), currentDate.get(Calendar.MONTH),\n currentDate.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(SearchTripActivity.this, dated, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "public void setDate() {\n DatePickerDialog dateDialog = new DatePickerDialog(this, myDateListener,\n calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE));\n //set the date limits so user cannot pick a date outside of game scope\n dateDialog.getDatePicker().setMinDate(System.currentTimeMillis() + MILLIS_IN_DAY);\n dateDialog.getDatePicker().setMaxDate(System.currentTimeMillis() + (MILLIS_IN_DAY * MAX_END_DAY_COUNT));\n dateDialog.show();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tShowDatePickerDialog();\r\n\r\n\t\t\t}", "public interface OnDateSetListener {\n /**\n * @param view the picker associated with the dialog\n * @param year the selected year\n * @param month the selected month (0-11 for compatibility with\n * {@link Calendar#MONTH})\n * @param dayOfMonth the selected day of the month (1-31, depending on\n * month)\n */\n void onDateSet(DatePicker view, int year, int month, int dayOfMonth);\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentDate = Calendar.getInstance();\n int mYear = mcurrentDate.get(Calendar.YEAR);\n int mMonth = mcurrentDate.get(Calendar.MONTH);\n int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog mDatePicker;\n mDatePicker = new DatePickerDialog(SingleEventActivity.this, new DatePickerDialog.OnDateSetListener() {\n public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n // TODO Auto-generated method stub\n /* Your code to get date and time */\n// selectedmonth = selectedmonth + 1;\n\n try{\n Date date = new Date(selectedyear-1900, selectedmonth,selectedday);\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM-dd-yyyy\");\n cDate = formatter.format(date);\n// DateFormat aoriginalFormat = new SimpleDateFormat(\"dd MMM yyyy\", Locale.getDefault());\n DateFormat atargetFormat = new SimpleDateFormat(\"dd MMM,yyyy\");\n Date date2 = formatter.parse(cDate);\n formattedDate = atargetFormat.format(date2);\n }catch (ParseException e1){\n e1.printStackTrace(); }\n catch (java.text.ParseException e) {\n e.printStackTrace();\n }\n\n e1.setText(formattedDate);\n// if(String.valueOf(selectedday).length()== 1 )\n// {\n//\n// if(String.valueOf(selectedmonth).length()== 1)\n// {\n// e1.setText(\"0\"+selectedday + \"-0\" + selectedmonth + \"-\" + selectedyear);\n// }\n//\n// e1.setText(\"0\"+selectedday + selectedmonth + \"-\" + selectedyear);\n//\n// }\n//\n// else{\n// e1.setText(selectedday + \"-\" + selectedmonth + \"-\" + selectedyear);\n// }\n//\n// e1.setText(\"0\"+selectedday + \"-0\" + selectedmonth + \"-\" + selectedyear);\n\n }\n }, mYear, mMonth, mDay);\n mDatePicker.setTitle(\"Select Date\");\n mDatePicker.show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(SearchTripActivity.this, datea, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }" ]
[ "0.7669591", "0.7542045", "0.7486444", "0.7484146", "0.74798566", "0.7478639", "0.74455446", "0.7438528", "0.741665", "0.7416265", "0.7403802", "0.7396214", "0.7396214", "0.7393759", "0.7388233", "0.73879397", "0.7378133", "0.7374126", "0.73546034", "0.7349326", "0.73425525", "0.73349327", "0.73268443", "0.73268443", "0.73202986", "0.730201", "0.7300122", "0.72871107", "0.7269473", "0.7268664", "0.72668207", "0.7264364", "0.72611684", "0.7252444", "0.72480446", "0.7232662", "0.7228134", "0.72234386", "0.7211923", "0.72098", "0.72056544", "0.7204117", "0.71830577", "0.7162882", "0.71597606", "0.7153885", "0.7149799", "0.7144813", "0.71362346", "0.7130158", "0.71268", "0.7117011", "0.71150184", "0.71099824", "0.71084875", "0.7107972", "0.71039706", "0.7103843", "0.7101394", "0.70922935", "0.70896107", "0.70717907", "0.706718", "0.7057693", "0.70497406", "0.70478356", "0.70468533", "0.7031168", "0.70311344", "0.7030504", "0.70254695", "0.7023592", "0.70183593", "0.70176333", "0.70172423", "0.70153636", "0.7014823", "0.70115423", "0.70114267", "0.70097136", "0.69937336", "0.6977936", "0.6970516", "0.6965066", "0.6964234", "0.69617176", "0.6956255", "0.6949053", "0.69487005", "0.69481575", "0.69450426", "0.69412273", "0.69380325", "0.69352764", "0.69221", "0.69166756", "0.69161505", "0.6910593", "0.6907596", "0.69039965", "0.6903971" ]
0.0
-1
this interface is a listener between the Date Dialog fragment and the activity to update the buttons date
public void updateChangedTime(int hour, int minute);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n new DatePickerDialog(UserUpdate.this, date, cal\n .get(Calendar.YEAR), cal.get(Calendar.MONTH), cal\n .get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\r\n\tpublic void dateDialogCallBack(String date) {\n\t\tnoteGlobal.dateString=date;\r\n\t\tnoteGlobal.getPlan(date);\r\n\t\tdateTextView.setText(date);\r\n\t\tdateString = date;\r\n\t\taddPlan_View();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tshowDialog(SET_DATE_DIALOG);\n\n\t\t\t}", "@Override\n public void onClick(Date date) {\n Event_dialog(date);\n }", "@OnClick(R.id.fragApod_btnSelectDate)\n public void onClickBtnSelectDate(){\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(),\n android.R.style.Theme_DeviceDefault_Light_Panel,\n new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n //Le damos el formato requerido a la fecha seleccionada\n date = new StringBuilder();\n date.append(year).append(\"-\");\n if((monthOfYear+1) < 10) date.append(\"0\");\n date.append(monthOfYear+1).append(\"-\");\n if(dayOfMonth < 10) date.append(\"0\");\n date.append(dayOfMonth);\n\n //LLamamos al método que establece su callback\n apodServiceEnqueue(apodService);\n }\n }, iYear, iMonth, iDay);\n datePickerDialog.show();\n //datePickerDialog.setTitle(getString(R.string.fragApod_msgSelectDate));\n //Sólo puede seleccionar hasta la fecha actual\n datePickerDialog.getDatePicker().setMaxDate(calendar.getTimeInMillis());\n\n //Le restamos 16 años a la fecha actual para ponerla como fecha mínima de selección\n Calendar calendarTemp = Calendar.getInstance();\n calendarTemp.add(calendar.YEAR,-16);\n datePickerDialog.getDatePicker().setMinDate(calendarTemp.getTimeInMillis());\n }", "@Override\r\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\r\n int mYear = c.get(Calendar.YEAR); // current year\r\n int mMonth = c.get(Calendar.MONTH); // current month\r\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\r\n\r\n\r\n // date picker dialog\r\n datePickerDialog = new DatePickerDialog(task_setting.this,\r\n new DatePickerDialog.OnDateSetListener() {\r\n\r\n\r\n @Override\r\n public void onDateSet(DatePicker view, int year,\r\n int monthOfYear, int dayOfMonth) {\r\n // set day of month , month and year value in the edit text\r\n\r\n final String[] MONTHS = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\r\n String mon = MONTHS[monthOfYear];\r\n date.setText(mon + \" \" + dayOfMonth + \", \" + year);\r\n }\r\n }, mYear, mMonth, mDay);\r\n datePickerDialog.getDatePicker().setMinDate(System.currentTimeMillis() - 1000);\r\n datePickerDialog.show();\r\n }", "public void onPickDateButtonClick(View v){\n\t\tDialogFragment newFragment = new DatePickerFragment();\n\t\t\n\t\tlong milis = -1;\t\t\n\t\tif (mGameSettings.contains(Constants.GAME_PREFERENCES_DOB)) {\n\t\t\tmilis = mGameSettings.getLong(Constants.GAME_PREFERENCES_DOB, 0);\n\t\t}\n\t\t\n\t\tBundle parametros = new Bundle();\n\t\tparametros.putLong(\"date\", milis); \n\t\t\n\t\tnewFragment.setArguments(parametros);\t\n\t\t\n\t\t\n\t\tnewFragment.show(getSupportFragmentManager(), \"datePicker\");\n\t}", "@Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n\n autoD8.setText(dayOfMonth + \" \" + monthString(monthOfYear + 1) + \" \" + year);\n\n dialogueCal.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n dialogueCal.set(Calendar.YEAR, year);\n dialogueCal.set(Calendar.MONTH, monthOfYear);\n timeAndDate = dialogueCal.getTimeInMillis();\n\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), startdatepicker, trigger.getStarttime().get(Calendar.YEAR), trigger.getStarttime().get(Calendar.MONTH), trigger.getStarttime().get(Calendar.DAY_OF_MONTH)).show();\n }", "public void updateDate()\n\t{\n\t\t// Translate year, month and day into a Date object.\n\t\tmDate = new GregorianCalendar(mYear, mMonth, mDay, mHour, mMin).getTime();\n\t\t\n\t\t// Update arguments to preserve selected value on rotation.\n\t\tgetArguments().putSerializable(CrimeFragment.EXTRA_DATE, mDate);\n\t}", "private void showDateDialog(){\n final Calendar newCalendar = Calendar.getInstance();\n\n /**\n * Initiate DatePicker dialog\n */\n datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n /**\n * Method ini dipanggil saat kita selesai memilih tanggal di DatePicker\n */\n\n /**\n * Set Calendar untuk menampung tanggal yang dipilih\n */\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n\n if(!newDate.before(newCalendar)){\n /**\n * Update TextView with choosen date\n */\n newDate.set(Calendar.HOUR_OF_DAY, 0);\n newDate.set(Calendar.MINUTE, 0);\n newDate.set(Calendar.SECOND, 0);\n newDate.set(Calendar.MILLISECOND,0);\n mDateTextView.setTextColor(Color.BLACK);\n String day = mDateFormatter.getDayName(newDate.getTime());\n String date = mDateFormatter.getOnlyDate(newDate.getTime());\n String month = mDateFormatter.getMonth(newDate.getTime());\n mDateTextView.setText(day + \" \" + date + \",\" + month);\n mChoosenSaveDate = newDate;\n }else{\n mDateTextView.setText(\"Deadline has to be at leats same as current date\");\n mDateTextView.setTextColor(Color.RED);\n Toast.makeText(view.getContext(),\"invalid choosen date\",\n Toast.LENGTH_LONG).show();\n }\n\n\n }\n\n },newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH), newCalendar.get(Calendar.DAY_OF_MONTH));\n\n /**\n * Tampilkan DatePicker dialog\n */\n datePickerDialog.show();\n\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getActivity(), enddatepicker, trigger.getEndtime().get(Calendar.YEAR), trigger.getEndtime().get(Calendar.MONTH), trigger.getEndtime().get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n if(v == bfecha){\n final Calendar c= Calendar.getInstance();\n dia = c.get(Calendar.DAY_OF_MONTH);\n mes = c.get(Calendar.MONTH);\n año = c.get(Calendar.YEAR);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n edt_fecha.setText(dayOfMonth + \"/\" + year);\n }\n }\n ,dia,mes,año);\n datePickerDialog.show();\n }\n if(v == bhora){\n final Calendar c= Calendar.getInstance();\n hora = c.get(Calendar.HOUR_OF_DAY);\n minutos = c.get(Calendar.MINUTE);\n\n TimePickerDialog timePickerDialog = new TimePickerDialog(this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n edt_hora.setText(hourOfDay + \":\" + minute);\n }\n }\n ,hora,minutos,false);\n timePickerDialog.show();\n }\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getContext(), date2, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n\tpublic void onDateSet(DatePicker view, int year, int monthOfYear,\n\t\t\tint dayOfMonth) {\n\t\tgetday = dayOfMonth;\n\t\tgetmonth = monthOfYear;\n\t\tgetyear = year;\n\t\tCalendar datecheck = Calendar.getInstance();\n\n\t\tdatecheck.set(getyear, getmonth, getday);\n\n\t\tLong timeinms = datecheck.getTimeInMillis(); \n/*\nswitch(view.getTag().toString())\n{\ncase \"startdialog\":\n\n\ndatevalues getdateinter = (datevalues) getActivity();\ngetdateinter.getdatefromdialog(timeinms);\n\n\t\nbreak;\n\n\n} */\n\t\n\ndatevalues getdateinter = (datevalues) getActivity();\ngetdateinter.getdatefromdialog(timeinms);\nToast checktag = Toast.makeText(getActivity(), view.getId(), Toast.LENGTH_LONG)\t;\t\nchecktag.show();\n\t\t\n}", "protected void setDatePickerListener()\n {\n final FloatingActionButton datePickerBtn = (FloatingActionButton) findViewById(R.id.datePickerBtn);\n datePickerBtn.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n DatePickerFragment datePickerFragment = new DatePickerFragment();\n datePickerFragment.setCallerActivity(instance);\n ((DialogFragment)datePickerFragment).show(getFragmentManager(),\"Change Date\");\n }\n });\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tshowDialog(DATE_DIALOG_ID);\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n new DatePickerDialog(context, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "public void onClick(DialogInterface dialog, int item) {\n switch (item) {\n case 0://Date Modifier\n LayoutInflater ld = LayoutInflater.from(GoalDisActivity.this);\n promptsDateView = ld.inflate(R.layout.date_button, null);//promptsDateView declared global for later reference to DateDialogButton\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Goal-Date\");\n build.setMessage(\"Please Enter new Goal Date\");\n build.setView(promptsDateView);\n newDate = (Button) promptsDateView.findViewById(R.id.newGoalDate);\n newDate.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n showDialog(DATE_DIALOG_ID);\n }\n });\n\n final Calendar c = Calendar.getInstance();\n currentYear = c.get(Calendar.YEAR);\n currentMonth = c.get(Calendar.MONTH);\n currentDay = c.get(Calendar.DAY_OF_MONTH);\n\n newDate.setFocusableInTouchMode(true);\n //newDate.setFocusable(true);\n //newDate.requestFocus();\n build.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \" + DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2), null);\n if (mCursor.moveToFirst()) {\n do {\n dayValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.DAY));\n } while (mCursor.moveToNext());\n }\n\n // checks if user has chosen the date or not, if chosen, executes If condition\n if (dayG != null && !dayG.isEmpty() && monthG != null && !monthG.isEmpty() && yearG != null && !yearG.isEmpty()) {\n int dayVal = Integer.valueOf(dayG), monthVal = Integer.valueOf(monthG), yearVal = Integer.valueOf(yearG);\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.DAY + \"=\" + String.valueOf(dayVal) + \", \" + DbHelperGoal.MONTH + \"=\" + String.valueOf(monthVal) + \", \" + DbHelperGoal.YEAR + \"=\" + String.valueOf(yearVal) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), dayValue.toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n\n } else {// if user has not chosen but clicked on \"Ok\", then execute 'else'\n displayData();\n Toast.makeText(getApplication(), \"Please select a date\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"New Date Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n break;\n case 1://Payment\n LayoutInflater li = LayoutInflater.from(GoalDisActivity.this);\n View promptsPaymentView = li.inflate(R.layout.payment_layout, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Payment\");\n build.setMessage(\"Please Enter payment amount\");\n build.setView(promptsPaymentView);\n PayValue = (EditText) promptsPaymentView.findViewById(R.id.PaymentEnter1);\n //PayValue.isFocused();\n PayValue.setFocusableInTouchMode(true);\n PayValue.setFocusable(true);\n PayValue.requestFocus();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.showSoftInput(PayValue, InputMethodManager.SHOW_IMPLICIT);\n build.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n check = 0;\n val = 0;\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \" + DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2), null);\n if (mCursor.moveToFirst()) {\n do {\n moneyValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.ALT_PAYMENT));\n dbExpAmount = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.AMOUNT));\n check = mCursor.getFloat(mCursor.getColumnIndex(DbHelperGoal.ALT_EXPENSE));\n } while (mCursor.moveToNext());\n }\n val = Float.valueOf(PayValue.getText().toString()) + Float.valueOf(moneyValue);\n if (val - check <= Float.valueOf(dbExpAmount) && val - check >= 0) {// within the Target Amount\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n } else if (val - check > Float.valueOf(dbExpAmount) && val - check >= 0) {// if client collects extra amount for that goal, the Target amount extends\n build2 = new AlertDialog.Builder(GoalDisActivity.this);\n build2.setTitle(\"Confirmation\");\n build2.setMessage(\"The Payment Amount is exceeding the Target Amount. Do you want to increment the Target amount to the new value?\");\n build2.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.AMOUNT + \"=\" + String.valueOf(val - check) + \",\" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n build2.setNeutralButton(\"No, Only Savings\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n\n\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_PAYMENT + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), PayValue.getText().toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n build2.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n\n alert2 = build2.create();\n alert2.show();\n alert2.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n\n } else {\n Toast.makeText(getApplication(), \"Sorry, the amount is beyond the Target Amount\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Payment Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n break;\n case 2://Expense\n //Toast.makeText(getApplication(), \"Expense\", Toast.LENGTH_SHORT).show();\n LayoutInflater le = LayoutInflater.from(GoalDisActivity.this);\n View promptsExpenseView = le.inflate(R.layout.payment_layout, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Expense\");\n build.setMessage(\"Please Enter withdrawl amount\");\n build.setView(promptsExpenseView);\n ExpValue = (EditText) promptsExpenseView.findViewById(R.id.PaymentEnter1);\n //PayValue.isFocused();\n build.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n check = 0;\n val = 0;\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \" + DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2), null);\n if (mCursor.moveToFirst()) {\n do {\n moneyValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.ALT_EXPENSE));\n dbExpAmount = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.AMOUNT));\n check = mCursor.getFloat(mCursor.getColumnIndex(DbHelperGoal.ALT_PAYMENT));\n } while (mCursor.moveToNext());\n }\n\n val = Float.valueOf(ExpValue.getText().toString()) + Float.valueOf(moneyValue);// TextBox + db value\n if (check - val <= Float.valueOf(dbExpAmount) && check - val >= 0) {\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.ALT_EXPENSE + \"=\" + String.valueOf(val) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2);\n dataBase.execSQL(strSQL);\n ExpValue.setText(\"\");\n displayData();\n dialog.cancel();\n } else {\n Toast.makeText(getApplication(), \"Exceeding the Target amount limit.\", Toast.LENGTH_LONG).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"Expense Cancelled\", Toast.LENGTH_SHORT).show();\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n break;\n case 3://Delete Data\n //Toast.makeText(getApplication(),\"Delete\",Toast.LENGTH_SHORT).show();\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Delete \" + goalTitle.get(arg2) + \" \" + date.get(arg2) + \" \" + amount.get(arg2));\n build.setMessage(\"Do you want to delete ?\");\n build.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplicationContext(), goalTitle.get(arg2) + \" \" + date.get(arg2) + \" \" + amount.get(arg2) + \" is deleted.\", Toast.LENGTH_LONG).show();\n dataBase.delete(DbHelperGoal.TABLE_NAME, DbHelperGoal.KEY_ID + \"=\" + keyId.get(arg2), null);\n displayData();\n dialog.cancel();\n }\n });\n build.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n //AlertDialog alert = build.create();\n alert = build.create();\n alert.show();\n break;\n default:\n Toast.makeText(getApplication(), \"default\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onUpdate(final String updateId) {\n LayoutInflater ld = LayoutInflater.from(GoalDisActivity.this);\n View promptsDateView = ld.inflate(R.layout.date_button, null);\n build = new AlertDialog.Builder(GoalDisActivity.this);\n build.setTitle(\"Goal-Date\");\n build.setMessage(\"Please Enter new Goal Date\");\n build.setView(promptsDateView);\n newDate = (Button) promptsDateView.findViewById(R.id.newGoalDate);\n newDate.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View view) {\n showDialog(DATE_DIALOG_ID);\n }\n });\n\n final Calendar c = Calendar.getInstance();\n currentYear = c.get(Calendar.YEAR);\n currentMonth = c.get(Calendar.MONTH);\n currentDay = c.get(Calendar.DAY_OF_MONTH);\n\n newDate.setFocusableInTouchMode(true);\n //newDate.setFocusable(true);\n //newDate.requestFocus();\n build.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dataBase = gHelper.getWritableDatabase();\n Cursor mCursor = dataBase.rawQuery(\"SELECT * FROM \"+ DbHelperGoal.TABLE_NAME + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + updateId, null);\n if (mCursor.moveToFirst()) {\n do {\n dayValue = mCursor.getString(mCursor.getColumnIndex(DbHelperGoal.DAY));\n } while (mCursor.moveToNext());\n }\n\n if (dayG != null && !dayG.isEmpty() && monthG != null && !monthG.isEmpty() && yearG != null && !yearG.isEmpty()) {\n int dayVal = Integer.valueOf(dayG), monthVal = Integer.valueOf(monthG), yearVal = Integer.valueOf(yearG);\n String strSQL = \"UPDATE \" + DbHelperGoal.TABLE_NAME + \" SET \" + DbHelperGoal.DAY + \"=\" + String.valueOf(dayVal) + \", \" + DbHelperGoal.MONTH + \"=\" + String.valueOf(monthVal) + \", \" + DbHelperGoal.YEAR + \"=\" + String.valueOf(yearVal) + \" WHERE \" + DbHelperGoal.KEY_ID + \"=\" + updateId;\n dataBase.execSQL(strSQL);\n Toast.makeText(getApplication(), dayValue.toString(), Toast.LENGTH_SHORT).show();\n //PayValue.setText(\"\");\n displayData();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }else{\n Toast.makeText(getApplication(), \"Please choose a date\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n build.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getApplication(), \"New Date Cancelled\", Toast.LENGTH_SHORT).show();\n //InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);\n //imm.hideSoftInputFromWindow(PayValue.getWindowToken(), 0);\n dialog.cancel();\n }\n });\n alert = build.create();\n alert.show();\n alert.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getContext(), date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(getContext(), date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(Edit_Profile.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(Edit_Profile.this, dateannier, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n \tToast.makeText(TaskActivity.this, \"Setting dates!\", Toast.LENGTH_SHORT).show();\n \tshowDatePickerDialog(mSelectedYear, mSelectedMonth, mSelectedDay, mOnDateSetListener);\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n startYear = year;\n startMonth = monthOfYear + 1;\n startDay = dayOfMonth;\n try {\n dateChoisie = df.parse(String.valueOf(startYear + \"-\" + startMonth + \"-\" + startDay));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Log.e(\"DATE CHOISIE\",df.format(dateChoisie));\n switch (v.getId()){\n case R.id.buttonDateDebut:\n editDateDebut.setText(df.format(dateChoisie));\n break;\n case R.id.buttonDateFin:\n editDateFin.setText(df.format(dateChoisie));\n break;\n }\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(select_time_date.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n\n new DatePickerDialog(CompoffActivity.this, date, currentDate\n .get(Calendar.YEAR), currentDate.get(Calendar.MONTH),\n currentDate.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tString fcraDate = (String) btnFcraDate.getText();\n\t\t\t\t\tString dateParts[] = fcraDate.split(\"-\");\n\t\t\t\t\tsetfromday1 = dateParts[0];\n\t\t\t\t\tsetfrommonth1 = dateParts[1];\n\t\t\t\t\tsetfromyear1 = dateParts[2];\n\t \n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromday1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfrommonth1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+setfromyear1);\n\t\t\t\t\t//System.out.println(\"fcradate is:\"+fcraDate);\n\t\t\t\t\tshowDialog(FCRA_DATE_DIALOG_ID);\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\nDatePickerDialog dialog=new DatePickerDialog(Update_Activity.this,new OnDateSetListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onDateSet(DatePicker view, int year, int monthOfYear,\n\t\t\t\t\t\t\tint dayOfMonth) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t//把用户设置的时间存储\n\t\t\t\t\t\tcalendar.set(Calendar.YEAR,year);\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH,monthOfYear);\n\t\t\t\t\t\tcalendar.set(Calendar.DAY_OF_MONTH,dayOfMonth);\n\t\t\t\t\t\tdate=year+\"/\"+monthOfYear+\"/\"+dayOfMonth;\n\t\t\t\t\t\tTimePickerDialog time_dialog=new TimePickerDialog(Update_Activity.this,new OnTimeSetListener() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.HOUR_OF_DAY,hourOfDay);\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.MINUTE,minute);\n\t\t\t\t\t\t\t\tcalendar.set(Calendar.SECOND,0);\n\t\t\t\t\t\t\t\tdate=new SimpleDateFormat(\"yyyy/MM/dd hh:mm\").format(calendar.getTimeInMillis());\n\t\t\t\t\t\t\t\ttv_tiem.setText(date);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},c.get(Calendar.HOUR_OF_DAY),c.get(Calendar.MINUTE),true);\n\t\t\t\t\t\ttime_dialog.show();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}, c.get(Calendar.YEAR),c.get(Calendar.MONTH),c.get(Calendar.DATE));\n\t\t\t\tdialog.show();\n\t\t\t\t\n\t\t\t\n\t\t\t}", "@Override\n public void onClick(View v) {\n new DatePickerDialog(MainActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(AddVehicleActivity.this, date2, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(merchantHome, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(MainActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "private void event() {\n\n iv_back.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onBackPressed();\n }\n });\n\n edt_std_leave_sDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n mYear = c.get(Calendar.YEAR);\n mMonth = c.get(Calendar.MONTH);\n mDay = c.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(LeaveAddActivity.this,\n new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n// currentDate = dayOfMonth + \"-\" + (monthOfYear + 1) + \"-\" + year;\n// edt_std_leave_sDate.setText(currentDate);\n\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_sDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }\n });\n\n edt_std_leave_eDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n mYear = c.get(Calendar.YEAR);\n mMonth = c.get(Calendar.MONTH);\n mDay = c.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(LeaveAddActivity.this,\n new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n// currentDate = dayOfMonth + \"-\" + (monthOfYear + 1) + \"-\" + year;\n// edt_std_leave_eDate.setText(currentDate);\n CharSequence strDate = null;\n Time chosenDate = new Time();\n chosenDate.set(dayOfMonth, monthOfYear, year);\n\n long dateAttendance = chosenDate.toMillis(true);\n strDate = DateFormat.format(\"dd-MM-yyyy\", dateAttendance);\n\n edt_std_leave_eDate.setText(strDate);\n currentDate = String.valueOf(strDate);\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }\n });\n\n ll_std_leave.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ll_std_leave.requestFocus();\n Const.openKeyBord(LeaveAddActivity.this);\n }\n });\n\n btn_std_leave.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (buttonClick) {\n btn_std_leave.setClickable(false);\n } else {\n validation();\n }\n }\n });\n }", "@Override\n public void onClick(View view) {\n dateDialog.show(getFragmentManager(), \"datePicker\");\n }", "@Override\n public void onClick(View v) {\n \t\tString text = textField.getText().toString();\n \t\t//String priority = priorityField.getText().toString();\n\t\t\t\tCalendar newDate = Calendar.getInstance();\n\t\t\t\tnewDate.set(datePicker.getYear(),\n\t\t\t\t\tdatePicker.getMonth(), datePicker.getDayOfMonth());\n \t\tlistener.onAddDialogDone(text, newDate);\n \t\tgetDialog().dismiss();\n }", "private DatePickerDialog.OnDateSetListener dateSetListener() {\n return new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n date = year + \".\" + month + \".\" + dayOfMonth;\n setDateB.setText(date);\n }\n };\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tnew DatePickerDialog(getActivity(), date, myCalendar\n\t\t\t\t\t\t.get( Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n\t\t\t\t\t\tmyCalendar.get(Calendar.DAY_OF_MONTH)).show();\n\t\t\t}", "@Override\n public void onClick(View v) {\n DatePickerDialog dialogoFecha = new DatePickerDialog(CreacionPerfiles.this, (view, year, month, dayOfMonth) ->\n edtFechaNaciento.setText(fechaHora.formatoFecha(dayOfMonth, month, year)), anio, mes, dia);\n dialogoFecha.show();\n }", "public void showDateDialog(View v) {\n Calendar newCalendar = Calendar.getInstance();\n\n /**\n * Initiate DatePicker dialog\n */\n datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n /**\n * Method ini dipanggil saat kita selesai memilih tanggal di DatePicker\n */\n\n /**\n * Set Calendar untuk menampung tanggal yang dipilih\n */\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateMasuk)\n mTglMasuk.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateLulus)\n mTglLulus.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnMasukKerja)\n mTglMasukKerja.setText(dateFormatter.format(newDate.getTime()));\n\n }\n }, newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH), newCalendar.get(Calendar.DAY_OF_MONTH));\n\n /**\n * Tampilkan DatePicker dialog\n */\n datePickerDialog.show();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n Button button = (Button) findViewById(R.id.dateBtn);\n button.setText(\"Selected Date: \" + month + \"/\" + day + \"/\" + year);\n calendarSelected.set(year, month, day);\n userSelectedDate = true;\n\n if (!userSelectedTime) {\n int hour = calendarSelected.get(Calendar.HOUR_OF_DAY);\n int minute = calendarSelected.get(Calendar.MINUTE);\n\n button = (Button) findViewById(R.id.timeBtn);\n button.setText(\"Selected Time: \" + hour + \":\" + String.format(\"%02d\",minute));\n }\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(AddVehicleActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "private void DateSelection(final TextView tv_inv_date) {\n try {\r\n AlertDialog.Builder dlgReportDate = new AlertDialog.Builder(myContext);\r\n final DatePicker dateReportDate = new DatePicker(myContext);\r\n String date_str = tvDate.getText().toString();\r\n String dd = date_str.substring(6,10)+\"-\"+date_str.substring(3,5)+\"-\"+date_str.substring(0,2);\r\n DateTime objDate = new DateTime(dd);\r\n dateReportDate.updateDate(objDate.getYear(), objDate.getMonth(), objDate.getDay());\r\n String strMessage = \"\";\r\n\r\n\r\n\r\n dlgReportDate\r\n .setIcon(R.drawable.ic_launcher)\r\n .setTitle(\"Date Selection\")\r\n .setMessage(strMessage)\r\n .setView(dateReportDate)\r\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\r\n String strDd = \"\";\r\n public void onClick(DialogInterface dialog, int which) {\r\n if (dateReportDate.getDayOfMonth() < 10) {\r\n strDd = \"0\" + String.valueOf(dateReportDate.getDayOfMonth())+\"-\";\r\n } else {\r\n strDd = String.valueOf(dateReportDate.getDayOfMonth())+\"-\";\r\n }\r\n if (dateReportDate.getMonth() < 9) {\r\n strDd += \"0\" + String.valueOf(dateReportDate.getMonth() + 1) + \"-\";\r\n } else {\r\n strDd += String.valueOf(dateReportDate.getMonth() + 1) + \"-\";\r\n }\r\n\r\n strDd += String.valueOf(dateReportDate.getYear());\r\n tv_inv_date.setText(strDd);\r\n Log.d(\"ReprintDate\", \"Selected Date:\" + strDd);\r\n }\r\n })\r\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\r\n\r\n public void onClick(DialogInterface dialog, int which) {\r\n // TODO Auto-generated method stub\r\n\r\n }\r\n })\r\n .show();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void showDateDialog(View v) {\n Calendar newCalendar = Calendar.getInstance();\n\n /**\n * Initiate DatePicker dialog\n */\n datePickerDialog = new DatePickerDialog(this, new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\n /**\n * Method ini dipanggil saat kita selesai memilih tanggal di DatePicker\n */\n\n /**\n * Set Calendar untuk menampung tanggal yang dipilih\n */\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateAnak)\n mTglLahirAnak.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateTanggungan)\n mTglLahirTanggungan.setText(dateFormatter.format(newDate.getTime()));\n }\n }, newCalendar.get(Calendar.YEAR), newCalendar.get(Calendar.MONTH), newCalendar.get(Calendar.DAY_OF_MONTH));\n\n /**\n * Tampilkan DatePicker dialog\n */\n datePickerDialog.show();\n }", "private void initPopupDate() {\n editDate = findViewById(R.id.date_depense);\n date = new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n // TODO Auto-generated method stub\n myCalendar.set(Calendar.YEAR, year);\n myCalendar.set(Calendar.MONTH, monthOfYear);\n myCalendar.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n updateDate();\n }\n\n };\n\n // onclick - popup datepicker\n editDate.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n new DatePickerDialog(context, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }", "@Override\n public void onDateSet(DatePickerDialog view, int year, int month, int date)\n {\n String dateSet = \"\" + year + \"-\" + (++month) + \"-\" + date;\n selectDateTextView.setText(dateSet);\n\n\n\n\n// _device_id = \"2345\";\n// _expiry_date = T.parseDate(dateSet);\n// _document_type = \"Driving Licence\";\n//\n// uploadDocumentImage();\n }", "@Override\n public void onClick(View view) {\n new DatePickerDialog(AddEventActivity.this, end_Journey_Date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n final Calendar c = Calendar.getInstance();\n int mYear = c.get(Calendar.YEAR); // current year\n int mMonth = c.get(Calendar.MONTH); // current month\n int mDay = c.get(Calendar.DAY_OF_MONTH); // current day\n // date picker dialog\n datePickerDialog = new DatePickerDialog(ChangeProfileActivity.this,\n new DatePickerDialog.OnDateSetListener() {\n\n @Override\n public void onDateSet(DatePicker view, int year,\n int monthOfYear, int dayOfMonth) {\n // set day of month , month and year value in the edit text\n txtdate.setText(dayOfMonth + \"/\"\n + (monthOfYear + 1) + \"/\" + year);\n\n }\n }, mYear, mMonth, mDay);\n datePickerDialog.show();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.DAY_OF_MONTH, month, day, 0, 0);\n calendar.set(Calendar.YEAR, year);\n\n String formatedDate = sdf.format(calendar.getTime());\n if (calendar.getTime().before(Calendar.getInstance().getTime())) {\n diffInMilis = Calendar.getInstance().getTimeInMillis() - calendar.getTimeInMillis();\n diffInDays = diffInMilis / (24 * 60 * 60 * 1000);\n if (diffInDays > 21) {\n String promptMessage = \"Cannot fetch call logs for \" + diffInDays\n + \" days right now. Please wait for \"\n + String.valueOf(diffInDays - 21) + \"days\";\n Toast.makeText(getContext(), promptMessage, Toast.LENGTH_SHORT).show();\n }\n\n else {\n Toast.makeText(getContext(), \"Day before\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getActivity().getBaseContext(), UserLogsTabs.class);\n intent.putExtra(\"date\", calendar.getTime());\n intent.putExtra(\"whenItHappened\", \"before\");\n startActivity(intent);\n\n }\n }\n\n else if (calendar.getTime().equals(Calendar.getInstance().getTime()))\n {\n Toast.makeText(getContext(), \"Please select a date before the current date\",\n Toast.LENGTH_SHORT).show();\n }\n\n else {\n Toast.makeText(getContext(), \"Cannot fetch call logs from future\", Toast.LENGTH_SHORT).show();\n /*Intent intent = new Intent(getActivity(), CallLogStats.class);\n intent.putExtra(\"date\", calendar.getTime());\n intent.putExtra(\"whenItHappened\", \"after\");\n startActivity(intent);*/\n }\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n date.setText(year+\"/\"+(month+1)+ \"/\"+ day);\n hDate = year+\"/\"+(month+1)+ \"/\"+ day;\n check(hDate, status);\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(DatePickerActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n\t\t\tendDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t\n\t\t\ttry {\n\t\t\t\tDatePicker startDatePicker = dpdS.getDatePicker();\n\t\t\t\tDate endDate = (Date) formatter.parse( getFormattedDate(year, month, day) );\n\t\t\t\tDate startDate = (Date) formatter.parse( getFormattedDate(startDatePicker) );\n\t\t\t\tdpdS.getDatePicker().setMinDate(endDate.getTime());\n\t\t\t\tif ( endDate.getTime() < startDate.getTime() ) {\n\t\t\t\t\tdpdS.updateDate(year, month, day);\n\t\t\t\t\tstartDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t\t}\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}", "public void onDateSet(DatePicker view, int year, int month, int day) {\n\t\t\tstartDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t// change end date\n\t\t\t\n\t\t\ttry {\n\t\t\t\tDatePicker endDatePicker = dpdE.getDatePicker();\n\t\t\t\tDate startDate = (Date) formatter.parse( getFormattedDate(year, month, day) );\n\t\t\t\tDate endDate = (Date) formatter.parse( getFormattedDate(endDatePicker) );\n\t\t\t\tdpdE.getDatePicker().setMinDate(startDate.getTime());\n\t\t\t\tif ( endDate.getTime() < startDate.getTime() ) {\n\t\t\t\t\tdpdE.updateDate(year, month, day);\n\t\t\t\t\tendDateBtn.setText( getFormattedDate(year, month, day) );\n\t\t\t\t}\n\t\t\t} catch (ParseException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t}", "public interface DatepickerListener {\n void dialogValueReturn(String year, String week, String month, String day);\n}", "private void DateSelection(final TextView tv_inv_date ) {\n try {\n AlertDialog.Builder dlgReportDate = new AlertDialog.Builder(this);\n final DatePicker dateReportDate = new DatePicker(this);\n String date_str = tvDate.getText().toString();\n String dd = date_str.substring(6,10)+\"-\"+date_str.substring(3,5)+\"-\"+date_str.substring(0,2);\n DateTime objDate = new DateTime(dd);\n dateReportDate.updateDate(objDate.getYear(), objDate.getMonth(), objDate.getDay());\n String strMessage = \"\";\n\n\n dlgReportDate\n .setIcon(R.drawable.ic_launcher)\n .setTitle(\"Date Selection\")\n .setMessage(strMessage)\n .setView(dateReportDate)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n String strDd = \"\";\n public void onClick(DialogInterface dialog, int which) {\n if (dateReportDate.getDayOfMonth() < 10) {\n strDd = \"0\" + String.valueOf(dateReportDate.getDayOfMonth())+\"-\";\n } else {\n strDd = String.valueOf(dateReportDate.getDayOfMonth())+\"-\";\n }\n if (dateReportDate.getMonth() < 9) {\n strDd += \"0\" + String.valueOf(dateReportDate.getMonth() + 1) + \"-\";\n } else {\n strDd += String.valueOf(dateReportDate.getMonth() + 1) + \"-\";\n }\n\n strDd += String.valueOf(dateReportDate.getYear());\n tv_inv_date.setText(strDd);\n Log.d(\"ReprintDate\", \"Selected Date:\" + strDd);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n\n }\n })\n .show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n }", "@SuppressLint(\"InlinedApi\")\n @Override\n public void onClick(View v) {\n @SuppressLint({\"NewApi\", \"LocalSuppress\"}) final Calendar mcurrentDate = Calendar.getInstance();\n int mYear = mcurrentDate.get(Calendar.YEAR);\n int mMonth = mcurrentDate.get(Calendar.MONTH);\n int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog mDatePicker = new DatePickerDialog(Addnewuser.this, new DatePickerDialog.OnDateSetListener() {\n\n public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n mybirthday = new GregorianCalendar(selectedyear, selectedmonth, selectedday).getTime();\n birthday = \"\" + selectedday + \"/\" + (selectedmonth + 1) + \"/\" + selectedyear + \"\";\n dob.setText(birthday);\n // Toast.makeText(Addnewuser.this, \"\"+birthday+\"\\n\" +\n // \"\"+date.toString(), Toast.LENGTH_SHORT).show();\n\n\n }\n }, mYear, mMonth, mDay);\n mDatePicker.setTitle(\"Select date\");\n mDatePicker.show();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t DatePickerDialog mDatePicker=new DatePickerDialog(contextyeild, new OnDateSetListener() { \n\t\t\t\t\t public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n\t\t\t\t\t // TODO Auto-generated method stub \n\t\t\t\t\t /* Your code to get date and time */\n\t\t\t\t\t \t//final Calendar c = Calendar.getInstance();\n\t\t\t\t\t \t\t//\tc.set(selectedyear, selectedmonth, selectedday);\n\t\t\t\t\t \t\t\tstart_day = selectedday;\n\t\t\t\t\t \t\t\tstart_month = selectedmonth;\n\t\t\t\t\t \t\t\tstart_year = selectedyear;\n\t\t\t\t\t \t\t\t//final Date date = new Date(c.getTimeInMillis());\n\t\t\t\t\t \t\t\t//final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t \t\t\t//harvestdate1.setText(dateFormat.format(date));\n\t\t\t\t\t harvestdate1.setText(new StringBuilder().append(start_day).append(\"-\").append(start_month+1)\n\t\t\t\t .append(\"-\").append(start_year)\n\t\t\t\t .append(\" \")); \t\n\t\t\t\t\t // set selected date into Date Picker\n\t\t\t\t\t datepicker.init(start_year, start_month, start_day, null);\n\n\t\t\t\t\t }\n\t\t\t\t\t },start_year, start_month, start_day);\n\t\t\t\t\t mDatePicker.setTitle(\"Select date\"); \n\t\t\t\t\t mDatePicker.show(); \n\t\t\t\t\t\t\t}", "public void calendarDates()\n {\n textViewStartDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Calendar cal = Calendar.getInstance();\n int year = cal.get( Calendar.YEAR);\n int month = cal.get( Calendar.MONTH);\n int day = cal.get( Calendar.DAY_OF_MONTH);\n\n DatePickerDialog dialog = new DatePickerDialog (\n PlanProfile.this,\n mDateSetListener,\n year,month,day);\n dialog.show();\n }\n });\n mDateSetListener = new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n month = month + 1;\n Log.d(TAG, \"onDateSet: mm/dd/yyy: \" + month + \"/\" + day + \"/\" + year);\n\n String date = month + \"/\" + day + \"/\" + year;\n textViewStartDate.setText(date);\n }\n };\n\n\n textViewEndDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Calendar cal = Calendar.getInstance();\n int year = cal.get( Calendar.YEAR);\n int month = cal.get( Calendar.MONTH);\n int day = cal.get( Calendar.DAY_OF_MONTH);\n\n DatePickerDialog dialog = new DatePickerDialog (\n PlanProfile.this,\n mDateSetListener2,\n year,month,day);\n dialog.show();\n }\n });\n mDateSetListener2 = new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker datePicker, int year, int month, int day) {\n month = month + 1;\n Log.d(TAG, \"onDateSet: mm/dd/yyy: \" + month + \"/\" + day + \"/\" + year);\n\n String date = month + \"/\" + day + \"/\" + year;\n textViewEndDate.setText(date);\n }\n };\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(AddTripActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onClick(View v) {\n showDatePickerDialog();\n }", "public void onDateSet(DatePicker view, int year, int month, int day) {\n }", "@Override\t\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tString regDate = (String) btnRegDate.getText();\n\t\t\t\t\tString dateParts[] = regDate.split(\"-\");\n\t\t\t\t\tsetfromday = dateParts[0];\n\t\t\t\t\tsetfrommonth = dateParts[1];\n\t\t\t\t\tsetfromyear = dateParts[2];\n\t\t \n\t\t\t\t\tSystem.out.println(\"regdate is:\"+regDate);\n\t\t\t\t\tshowDialog(REG_DATE_DIALOG_ID);\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n new DatePickerDialog(AddEventActivity.this, start_Journey_Date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear,\n int dayOfMonth) {\n int mYear = year;\n int mMonth = monthOfYear;\n int mDay = dayOfMonth;\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yyyy\");\n String formatedDate = sdf.format(new Date(year-1900, mMonth, mDay));\n\n SimpleDateFormat sdf2 = new SimpleDateFormat(\"yyyyMMdd\");\n formatedDateMYSQL = sdf2.format(new Date(year-1900, mMonth, mDay));\n\n buttonDate.setText(\"\"+formatedDate+\"\");\n buttonDate.setTag(formatedDateMYSQL);\n\n mAuthTask = new getTaskDetail(useremail,\"\");\n\n mAuthTask.execute((Void) null);\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateMasuk)\n mTglMasuk.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateLulus)\n mTglLulus.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnMasukKerja)\n mTglMasukKerja.setText(dateFormatter.format(newDate.getTime()));\n\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(RegistrationActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n month=month+1;\n String currentInfo=\"\";\n Cursor cursor=myDb.getRow(mId1);// finding selected row item to store the selected date\n if(cursor.moveToFirst()){\n do{\n currentInfo=cursor.getString(cursor.getColumnIndex(myDb.KEY_DATE));\n\n }while (cursor.moveToNext());\n cursor.close();\n }\n currentInfo =year+\"-\"+month+\"-\"+day;\n //Storing the date at selected row\n myDb.updateRow(mId1, currentInfo);\n\n populateListViewFromDB();\n }", "@Override\n public void onClick(View v) {\n MmxDate dateTime = new MmxDate(getPaymentDate());\n\n CalendarDatePickerDialogFragment datePicker = new CalendarDatePickerDialogFragment()\n .setFirstDayOfWeek(dateUtils.getFirstDayOfWeek())\n .setOnDateSetListener(listener)\n .setPreselectedDate(dateTime.getYear(), dateTime.getMonth() - 1, dateTime.getDayOfMonth());\n if (new UIHelper(RecurringTransactionEditActivity.this).isUsingDarkTheme()) {\n datePicker.setThemeDark();\n }\n datePicker.show(getSupportFragmentManager(), TAG_DATEPICKER);\n }", "private void setOnClickListener(){\n Calendar = Calendar.getInstance();\n year = Calendar.get(Calendar.YEAR);\n month = Calendar.get(Calendar.MONTH);\n day = Calendar.get(Calendar.DAY_OF_MONTH);\n\n //Purpose: ingin membuat datepicker untuk checkin\n TextViewCheckIn.setOnClickListener(new View.OnClickListener() {\n //getActivity() = memperoleh activity yang ada di fragment ini\n @Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckIn.setText(date);\n\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n datePickerDialog.show();\n }\n });\n\n //Purpose: ingin membuat datepicker untuk checkout\n TextViewCheckOut.setOnClickListener(new View.OnClickListener() {\n //getActivity() = memperoleh activity yang ada di fragment ini\n @Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckOut.setText(date);\n long today = Calendar.getTimeInMillis();\n view.setMinDate(today);\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n //memunculkan pilihan pada UI\n datePickerDialog.show();\n }\n });\n //nantinya mungkin diperlukan supaya pada saat user menekan submit, dropdown yang dipilih akan tersave\n ButtonSearch.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n boolean isValid = true;\n\n //Step 1: Check Position Term dipilih atau tidak\n\n //1 artinya Long Term\n //2 artinya Short Term\n if(PositionTerm == 0)\n isValid = false;\n else if(PositionTerm == 1){\n //Step 2: Validasi Check Date dulu\n boolean isDate = false;\n String checkin = TextViewCheckIn.getText().toString().trim();\n String checkout = TextViewCheckOut.getText().toString().trim();\n isDate = CheckDate(checkin, checkout);\n if(!isDate){\n isValid = false;\n }\n }\n\n //cek kosong buat posisi saat ini\n if(PositionLocation.equals(\"None\")){\n isValid = false;\n }\n\n\n if(isValid == true){\n //Disini baru input semua data ke dalam intent selanjutnya\n HeaderBooking headerBooking = new HeaderBooking();\n String checkin, checkout, location;\n checkin = TextViewCheckIn.getText().toString().trim();\n checkout = TextViewCheckOut.getText().toString().trim();\n location = PositionLocation;\n\n headerBookingRepository = new HeaderBookingRepository(getActivity());\n\n //kalau 1 masukin CheckOut juga, kalau 2 masukin Checkin aja\n if(PositionTerm == 1){\n headerBooking.setCheckIn(checkin);\n headerBooking.setCheckOut(checkout);\n headerBooking.setHotelID(LocationIndex);\n headerBooking.setPeriod(\"Long Term\");\n\n }else if(PositionTerm == 2){\n headerBooking.setCheckIn(checkin);\n headerBooking.setHotelID(LocationIndex);\n headerBooking.setPeriod(\"Short Term\");\n }\n\n\n //perpindahan screen ke BookActivity\n //Kalau bisa, bawa atribut dari sini yang sudah masuk nanti, untuk dipakai memasukkan data\n Intent intent = new Intent(getActivity(), PethouseProfileActivity.class);\n intent.putExtra(\"HeaderBooking\", headerBooking);\n //bisa menambahkan putExtra, syarat, class ini harus impelements atau extends Serializable\n startActivity(intent);\n }\n }\n });\n ImageViewCard.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startActivity(new Intent(getActivity(), PromoActivity.class));\n }\n });\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int day) {\n int mMonth = month + 1;\n String bydate = year + \"-\" + mMonth + \"-\" + day;\n mIdTvMoonatCenterShortLine.setText(bydate);\n\n List<SleepDataInfo> all = manager.findAllSleep();\n SleepDataInfo sleepDataInfo_total = manager.findSleepDataInfo(SPUtil.getUserName(getApplication()), bydate);\n RefreshView(sleepDataInfo_total); /*选择日期后刷新ui*/\n }", "public void onDateSet(DatePicker view, int year, int month, int day){\n TextView tv = getActivity().findViewById(R.id.textBornAdult);\n\n // Create a Date variable/object with user chosen date\n Calendar cal = Calendar.getInstance(SBFApplication.config.locale);\n cal.setTimeInMillis(0);\n cal.set(year, month, day, 0, 0, 0);\n Date chosenDate = cal.getTime();\n\n // Format the date using style and locale\n // DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, BaseActivity.getInstance().config.locale);\n String formattedDateShow = formatterBornShow.format(chosenDate);\n String formattedDate = formatterTrain.format(chosenDate);\n // formatter.format(date.getDate()\n\n\n // Display the chosen date to app interface\n tv.setText(formattedDateShow);\n dateBorn=formattedDate;\n // MemoryStore.set(getActivity(), \"adultBorn\", formattedDate);\n // MemoryStore.set(getActivity(), \"adultBornShow\", formattedDateShow);\n }", "@Override\n\t\t\t\t\t\tpublic void onDateSet(DatePicker view,\n\t\t\t\t\t\t\t\tint selectedyear, int monthOfYear,\n\t\t\t\t\t\t\t\tint dayOfMonth) {\n\n\t\t\t\t\t\t\tyear = selectedyear;\n\t\t\t\t\t\t\tmonth = monthOfYear;\n\t\t\t\t\t\t\tday = dayOfMonth;\n\t\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t\tDate date = new SimpleDateFormat(\"yyyy-MM-dd\")\n\t\t\t\t\t\t\t\t\t\t.parse(year + \"-\" + (month + 1) + \"-\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ day);\n\n\t\t\t\t\t\t\t\tDateFormat outputFormatter = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\"yyyy-MM-dd\");\n\t\t\t\t\t\t\t\tString selectedDate = outputFormatter\n\t\t\t\t\t\t\t\t\t\t.format(date); // Output : 01/20/2012\n\n\t\t\t\t\t\t\t\tSystem.out.println(\"!!!!!!selectedDate...\"\n\t\t\t\t\t\t\t\t\t\t+ selectedDate);\n\n\t\t\t\t\t\t\t\t// Date currDate=new Date();\n\n\t\t\t\t\t\t\t\tSystem.out.println(\"!!!!!!!!!currDate.\"\n\t\t\t\t\t\t\t\t\t\t+ currDate);\n\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t.println(\"output.compareTo(currDate)..\"\n\t\t\t\t\t\t\t\t\t\t\t\t+ selectedDate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.compareTo(currDate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString()));\n\n\t\t\t\t\t\t\t\tif (selectedDate.compareTo(currDate.toString()) >= 0\n\t\t\t\t\t\t\t\t\t\t&& selectedDate.compareTo(output\n\t\t\t\t\t\t\t\t\t\t\t\t.toString()) <= 0) {\n\t\t\t\t\t\t\t\t\t// then do your work\n\t\t\t\t\t\t\t\t\t// Display Selected date in textbox\n\n\t\t\t\t\t\t\t\t\tDateFormat outputFormatter1 = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\t\t\t\"yyyy-MM-dd\");\n\t\t\t\t\t\t\t\t\tString date_formating = outputFormatter1\n\t\t\t\t\t\t\t\t\t\t\t.format(date);\n\n\t\t\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t\t\t.println(\"!!!!!!!!!after_formating..\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ outputFormatter1\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"!!!!!\" + date_formating);\n\n\t\t\t\t\t\t\t\t\trf_booking_date_box.setText(selectedDate);\n\t\t\t\t\t\t\t\t\tBooking_Screen_TabLayout.rf_booking_date_header.setText(selectedDate);\n\n\t\t\t\t\t\t\t\t\t// rf_booking_date_box.setText(year + \"-\" +\n\t\t\t\t\t\t\t\t\t// (month + 1)\n\t\t\t\t\t\t\t\t\t// + \"-\" + day);\n\n\t\t\t\t\t\t\t\t\tGlobal_variable.str_Date = date_formating;\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// show message\n\n\t\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\t\t\t\t\tgetString(R.string.str_invalid_date),\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}\n\n\t\t\t\t\t\t\t} catch (java.text.ParseException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}", "private void tanggalAkhirPembalikanDatepicker(){\n tanggalAkhirPembalikanEditText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n c= Calendar.getInstance();\n int day = c.get(Calendar.DAY_OF_MONTH);\n int month = c.get(Calendar.MONTH);\n int year = c.get(Calendar.YEAR);\n\n dpd = new DatePickerDialog(IncubationForm.this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n int m =month+1;\n tanggalAkhirPembalikanEditText.setText(dayOfMonth + \"/\"+m+\"/\"+year);\n tanggalPembalikan[1][0]= dayOfMonth;\n tanggalPembalikan[1][1]= month+1;\n tanggalPembalikan[1][2]= year;\n }\n }, year, month, day);\n dpd.show();\n }\n });\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(AddActivity.this, date, myCalendar.get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "@Override\n public void onReceiveDateFromDialog(Date date) {\n // Attempt to mark currently opened event as done\n databaseHandler.markEventDone(selectedEvent, date);\n prepareData();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n /**\n * Update TextView dengan tanggal yang kita pilih\n */\n if (v == mBtnDate)\n mTglLahir.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateAnak)\n mTglLahirAnak.setText(dateFormatter.format(newDate.getTime()));\n else if (v == mBtnDateTanggungan)\n mTglLahirTanggungan.setText(dateFormatter.format(newDate.getTime()));\n }", "public void onClick(View v) {\n\t\t\t\tshowDialog(DATE_DIALOG_ID);\r\n\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t DatePickerDialog mDatePicker=new DatePickerDialog(contextyeild, new OnDateSetListener() { \n\t\t\t\t\t\t public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n\t\t\t\t\t\t // TODO Auto-generated method stub \n\t\t\t\t\t\t /* Your code to get date and time */\n\t\t\t\t\t\t \t//final Calendar c = Calendar.getInstance();\n\t\t\t\t\t\t \t\t//\tc.set(selectedyear, selectedmonth, selectedday);\n\t\t\t\t\t\t \t\t\tstart_day = selectedday;\n\t\t\t\t\t\t \t\t\tstart_month = selectedmonth;\n\t\t\t\t\t\t \t\t\tstart_year = selectedyear;\n\t\t\t\t\t\t \t\t\t//final Date date = new Date(c.getTimeInMillis());\n\t\t\t\t\t\t \t\t\t//final SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t\t \t\t\t//harvestdate1.setText(dateFormat.format(date));\n\t\t\t\t\t\t harvestdate1.setText(new StringBuilder().append(start_day).append(\"-\").append(start_month+1)\n\t\t\t\t\t .append(\"-\").append(start_year)\n\t\t\t\t\t .append(\" \")); \t\n\t\t\t\t\t\t // set selected date into Date Picker\n\t\t\t\t\t\t datepicker.init(start_year, start_month, start_day, null);\n\n\t\t\t\t\t\t }\n\t\t\t\t\t\t },start_year, start_month, start_day);\n\t\t\t\t\t\t mDatePicker.setTitle(\"Select date\"); \n\t\t\t\t\t\t mDatePicker.show(); \n\t\t\t\t\t\t\t}", "@Override\n\t\tpublic void onClick(final View v) {\n\t\t\t\n\t\t\tint y,m,d;\n\t\t\t\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\t\n\t\t\ty=c.get(Calendar.YEAR);\n\t\t\tm=c.get(Calendar.MONTH);\n\t\t\td=c.get(Calendar.DAY_OF_MONTH);\n\t\t\t\n\t\t\tDatePickerDialog dpd = new DatePickerDialog(ADD2Activity.this, new OnDateSetListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tEditText et = (EditText) v;\n\t\t\t\t\t\n\t\t\t\t\tet.setText(\"\" + dayOfMonth +\"-\" + monthOfYear + \"-\" + (year%100));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}, y, m, d); \n\t\t\t\n\t\t\tdpd.show();\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n public void onClick(View v) {\n new DatePickerDialog(RegisterActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "public void onDateSelected(String dateStr){\n\t\t\n\t\tNewExpenseFragment newExpenseFrag = (NewExpenseFragment) getFragmentManager().findFragmentById(R.id.fragmentContainer);\n\t\t\n\t\tif(newExpenseFrag != null){\n\t\t\tnewExpenseFrag.updateDateTextView(dateStr);\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n\n year = selectedYear;\n month = selectedMonth;\n day = selectedDay;\n\n showDialog(AppUtils.TIME_DIALOG_ID);\n\n }", "private void tanggalAwalPembalikanDatepicker(){\n tanggalAwalPembalikanEditText.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n c= Calendar.getInstance();\n int day = c.get(Calendar.DAY_OF_MONTH);\n int month = c.get(Calendar.MONTH);\n int year = c.get(Calendar.YEAR);\n\n dpd = new DatePickerDialog(IncubationForm.this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n int m =month+1;\n tanggalAwalPembalikanEditText.setText(dayOfMonth + \"/\"+m+\"/\"+year);\n tanggalPembalikan[0][0]= dayOfMonth;\n tanggalPembalikan[0][1]= month+1;\n tanggalPembalikan[0][2]= year;\n }\n }, year, month, day);\n dpd.show();\n }\n });\n }", "public interface OnDateSelectedListner {\n\n void onDateSet(TimeSectionDialog timeSectionDialog, long startMillseconds,long endMillSeconds);\n}", "public void onDateSet(DatePicker view, int selectedYear,\n int selectedMonth, int selectedDay) {\n Calendar calendarNow = Calendar.getInstance();\n calendarNow.set(selectedYear, selectedMonth, selectedDay);\n if (calendarNow.getTimeInMillis() < view.getMinDate()) {\n begdaShowDatePickerDialog();\n Toast.makeText(getActivity(), getResources().getString(R.string.createOrder_datePicker_selectFutureDate), Toast.LENGTH_SHORT).show();\n view.updateDate(begCalendar.get(Calendar.YEAR), begCalendar.get(Calendar.MONTH), begCalendar.get(Calendar.DAY_OF_MONTH));\n }\n\n begYear = selectedYear;\n begMonth = selectedMonth;\n begDay = selectedDay;\n begCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvBegda.setText(new StringBuilder().append(char2(begDay))\n .append(\".\").append(char2(begMonth + 1)).append(\".\").append(begYear));\n if (tvEndda.getText().toString().equals(getResources().getString(R.string.leave_dmy))) {\n endYear = selectedYear;\n endMonth = selectedMonth;\n endDay = selectedDay;\n endCalendar.set(selectedYear, selectedMonth, selectedDay);\n tvEndda.setText(new StringBuilder().append(char2(endDay))\n .append(\".\").append(char2(endMonth + 1)).append(\".\").append(endYear));\n }\n }", "@Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckIn.setText(date);\n\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n datePickerDialog.show();\n }", "@Override\n public void onDayLongPress(Date date) {\n FragmentManager manager = getFragmentManager();\n Fragment frag = manager.findFragmentByTag(\"fragment_edit_id\");\n if (frag != null) {\n manager.beginTransaction().remove(frag).commit();\n }\n\n FragDailyLog newLog = new FragDailyLog();\n //Pass date into dialog\n Bundle dateBundle = new Bundle();\n dateBundle.putLong(\"date\", date.getTime());\n newLog.setArguments(dateBundle);\n newLog.show(manager, \"fragment_edit_id\");\n }", "@Override\n public void onClick(View v) {\n DatePickerDialog datePickerDialog = new DatePickerDialog(getActivity(), new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(android.widget.DatePicker view, int year, int month, int dayOfMonth) {\n month = month + 1;\n String date =String.format(\"%02d/%02d/%d\", dayOfMonth,month, year);\n TextViewCheckOut.setText(date);\n long today = Calendar.getTimeInMillis();\n view.setMinDate(today);\n }\n },year,month,day);\n long today = Calendar.getTimeInMillis();\n datePickerDialog.getDatePicker().setMinDate(today);\n //memunculkan pilihan pada UI\n datePickerDialog.show();\n }", "@Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n Calendar newDate = Calendar.getInstance();\n newDate.set(year, monthOfYear, dayOfMonth);\n\n\n if(!newDate.before(newCalendar)){\n /**\n * Update TextView with choosen date\n */\n newDate.set(Calendar.HOUR_OF_DAY, 0);\n newDate.set(Calendar.MINUTE, 0);\n newDate.set(Calendar.SECOND, 0);\n newDate.set(Calendar.MILLISECOND,0);\n mDateTextView.setTextColor(Color.BLACK);\n String day = mDateFormatter.getDayName(newDate.getTime());\n String date = mDateFormatter.getOnlyDate(newDate.getTime());\n String month = mDateFormatter.getMonth(newDate.getTime());\n mDateTextView.setText(day + \" \" + date + \",\" + month);\n mChoosenSaveDate = newDate;\n }else{\n mDateTextView.setText(\"Deadline has to be at leats same as current date\");\n mDateTextView.setTextColor(Color.RED);\n Toast.makeText(view.getContext(),\"invalid choosen date\",\n Toast.LENGTH_LONG).show();\n }\n\n\n }", "public void addListenerOnAddDateBtn() {\n\n addButton = (Button) findViewById(R.id.addButton);\n\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n new DatePickerDialog(AddTodoActivity.this, date, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }", "private void assignClickHandlers()\n {\n btnNext.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View v)\n {\n currentDate.add(Calendar.MONTH, 1);\n updateAttendanceDetails();\n }\n });\n\n // subtract one month and refresh UI\n btnPrev.setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View v)\n {\n currentDate.add(Calendar.MONTH, -1);\n updateAttendanceDetails();\n }\n });\n\n\n\n\n txtDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n new DatePickerDialog(AttendanceDetailsActivity.this, date, currentDate\n .get(Calendar.YEAR), currentDate.get(Calendar.MONTH),\n currentDate.get(Calendar.DAY_OF_MONTH)).show();\n }\n });\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(SearchTripActivity.this, dated, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }", "public void setDate() {\n DatePickerDialog dateDialog = new DatePickerDialog(this, myDateListener,\n calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE));\n //set the date limits so user cannot pick a date outside of game scope\n dateDialog.getDatePicker().setMinDate(System.currentTimeMillis() + MILLIS_IN_DAY);\n dateDialog.getDatePicker().setMaxDate(System.currentTimeMillis() + (MILLIS_IN_DAY * MAX_END_DAY_COUNT));\n dateDialog.show();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tShowDatePickerDialog();\r\n\r\n\t\t\t}", "public interface OnDateSetListener {\n /**\n * @param view the picker associated with the dialog\n * @param year the selected year\n * @param month the selected month (0-11 for compatibility with\n * {@link Calendar#MONTH})\n * @param dayOfMonth the selected day of the month (1-31, depending on\n * month)\n */\n void onDateSet(DatePicker view, int year, int month, int dayOfMonth);\n }", "@Override\n public void onClick(View v) {\n Calendar mcurrentDate = Calendar.getInstance();\n int mYear = mcurrentDate.get(Calendar.YEAR);\n int mMonth = mcurrentDate.get(Calendar.MONTH);\n int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog mDatePicker;\n mDatePicker = new DatePickerDialog(SingleEventActivity.this, new DatePickerDialog.OnDateSetListener() {\n public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) {\n // TODO Auto-generated method stub\n /* Your code to get date and time */\n// selectedmonth = selectedmonth + 1;\n\n try{\n Date date = new Date(selectedyear-1900, selectedmonth,selectedday);\n SimpleDateFormat formatter = new SimpleDateFormat(\"MM-dd-yyyy\");\n cDate = formatter.format(date);\n// DateFormat aoriginalFormat = new SimpleDateFormat(\"dd MMM yyyy\", Locale.getDefault());\n DateFormat atargetFormat = new SimpleDateFormat(\"dd MMM,yyyy\");\n Date date2 = formatter.parse(cDate);\n formattedDate = atargetFormat.format(date2);\n }catch (ParseException e1){\n e1.printStackTrace(); }\n catch (java.text.ParseException e) {\n e.printStackTrace();\n }\n\n e1.setText(formattedDate);\n// if(String.valueOf(selectedday).length()== 1 )\n// {\n//\n// if(String.valueOf(selectedmonth).length()== 1)\n// {\n// e1.setText(\"0\"+selectedday + \"-0\" + selectedmonth + \"-\" + selectedyear);\n// }\n//\n// e1.setText(\"0\"+selectedday + selectedmonth + \"-\" + selectedyear);\n//\n// }\n//\n// else{\n// e1.setText(selectedday + \"-\" + selectedmonth + \"-\" + selectedyear);\n// }\n//\n// e1.setText(\"0\"+selectedday + \"-0\" + selectedmonth + \"-\" + selectedyear);\n\n }\n }, mYear, mMonth, mDay);\n mDatePicker.setTitle(\"Select Date\");\n mDatePicker.show();\n }", "@Override\n public void onClick(View v) {\n new DatePickerDialog(SearchTripActivity.this, datea, myCalendar\n .get(Calendar.YEAR), myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)).show();\n }" ]
[ "0.7669591", "0.7542045", "0.7486444", "0.7484146", "0.74798566", "0.7478639", "0.74455446", "0.7438528", "0.741665", "0.7416265", "0.7403802", "0.7396214", "0.7396214", "0.7393759", "0.7388233", "0.73879397", "0.7378133", "0.7374126", "0.73546034", "0.7349326", "0.73425525", "0.73349327", "0.73268443", "0.73268443", "0.73202986", "0.730201", "0.7300122", "0.72871107", "0.7269473", "0.7268664", "0.72668207", "0.7264364", "0.72611684", "0.7252444", "0.72480446", "0.7232662", "0.7228134", "0.72234386", "0.7211923", "0.72098", "0.72056544", "0.7204117", "0.71830577", "0.7162882", "0.71597606", "0.7153885", "0.7149799", "0.7144813", "0.71362346", "0.7130158", "0.71268", "0.7117011", "0.71150184", "0.71099824", "0.71084875", "0.7107972", "0.71039706", "0.7103843", "0.7101394", "0.70922935", "0.70896107", "0.70717907", "0.706718", "0.7057693", "0.70497406", "0.70478356", "0.70468533", "0.7031168", "0.70311344", "0.7030504", "0.70254695", "0.7023592", "0.70183593", "0.70176333", "0.70172423", "0.70153636", "0.7014823", "0.70115423", "0.70114267", "0.70097136", "0.69937336", "0.6977936", "0.6970516", "0.6965066", "0.6964234", "0.69617176", "0.6956255", "0.6949053", "0.69487005", "0.69481575", "0.69450426", "0.69412273", "0.69380325", "0.69352764", "0.69221", "0.69166756", "0.69161505", "0.6910593", "0.6907596", "0.69039965", "0.6903971" ]
0.0
-1
Create a compatible helper that will manipulate the action bar if available.
private ActionBarHelper createActionBarHelper() { return new ActionBarHelper(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Toolbar provideSupportActionbar();", "void requestActionBar();", "@TargetApi(14)\r\n private void initActionBar()\r\n {\r\n try\r\n {\r\n ActionBar bar = getActionBar();\r\n bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_HOME);\r\n\r\n if (DisplayUtils.hasCentralPane(this))\r\n {\r\n bar.setDisplayOptions(ActionBar.DISPLAY_USE_LOGO, ActionBar.DISPLAY_USE_LOGO);\r\n }\r\n else\r\n {\r\n bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_USE_LOGO);\r\n }\r\n\r\n if (AndroidVersion.isICSOrAbove())\r\n {\r\n bar.setHomeButtonEnabled(true);\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n Log.e(TAG, Log.getStackTraceString(e));\r\n }\r\n }", "protected abstract PopupMenuHelper createActionMenuHelper();", "@SuppressLint(\"NewApi\")\r\n @TargetApi(Build.VERSION_CODES.HONEYCOMB)\r\n public void setupActionBar() {\r\n\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\r\n // Show the Up button in the action bar.\r\n ActionBar actionBar = getActionBar();\r\n actionBar.setDisplayHomeAsUpEnabled(true);\r\n\r\n }\r\n }", "public static ActionBar setupActionBar(ActionBar actionBar, String title, String subtitle) {\n\n /*\n Setup a new action bar\n */\n assert actionBar != null;\n actionBar.setLogo(R.mipmap.ic_launcher);\n actionBar.setTitle(\" \" + title);\n actionBar.setSubtitle(\" \" + subtitle);\n actionBar.setDisplayUseLogoEnabled(true);\n actionBar.setHomeButtonEnabled(true);\n actionBar.setDisplayShowHomeEnabled(true);\n return actionBar;\n\n }", "private void customizeComlogActionBar() {\r\n\r\n ActionBar actionBar = getActionBar();\r\n\r\n actionBar.setBackgroundDrawable(getResources().getDrawable(R.drawable.action_bar_background));\r\n actionBar.setDisplayHomeAsUpEnabled(true);\r\n\r\n //disable application icon from ActionBar\r\n actionBar.setIcon(R.drawable.conversation_action_bar_custom_icon);\r\n\r\n //disable application name from ActionBar\r\n actionBar.setDisplayShowTitleEnabled(false);\r\n\r\n // Set custom view for the action bar to display contact icon as circle.\r\n LayoutInflater mInflater = LayoutInflater.from(this);\r\n View customView = mInflater.inflate(R.layout.conversation_custom_action_bar, null);\r\n\r\n contactNameTextView = (TextView) customView.findViewById(R.id.conversation_contact_name);\r\n contactNameTextView.setOnClickListener(this);\r\n\r\n lastMessageSentDateTextView = (TextView) customView.findViewById(R.id.conversation_last_message_sent_date);\r\n typingStatusTextView = (TextView) customView.findViewById(R.id.conversation_typing_status);\r\n\r\n contactImageView = (ImageView) customView.findViewById(R.id.conversation_contact_image);\r\n contactImageView.setOnClickListener(this);\r\n\r\n actionBar.setCustomView(customView);\r\n actionBar.setDisplayShowCustomEnabled(true);\r\n\r\n UIUtils.showActionbar(this);\r\n }", "private void updateActionBar() {\n\t\tif (!(getContext() instanceof AppCompatActivity)) {\n\t\t\treturn;\n\t\t}\n\n\t\ttoolbar.setSubtitle(R.string.cvv_enter_security_code);\n\t}", "public interface IActionBarController {\n\n void setTitle(String title);\n\n void hideBackButton(boolean isBack);\n}", "private void configureActionBar() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.setDisplayHomeAsUpEnabled(true);\n }\n }", "protected void registerSpecialToolbarActions(IActionBars actionBars) {\n\t}", "protected DisplayRequest actionBarDisplay() {\n return DisplayRequest.NO_ACTION_BAR;\n }", "public interface IActionBar {\n /**\n * Callback when {@link Activity#onCreateOptionsMenu(Menu)} && current view is single image\n * view.\n * @param actionBar\n * ActionBar of current Activity\n * @param menu\n * Options menu of current Activity\n */\n public void onCreateOptionsMenu(ActionBar actionBar, Menu menu);\n\n /**\n * Callback when {@link Activity#onPrepareOptionsMenu(Menu)} && current view is single image\n * view.\n * @param menu\n * Options menu of current Activity\n * @param data\n * Current image data\n */\n public void onPrepareOptionsMenu(Menu menu, MediaData data);\n\n /**\n * Callback when {@link Activity#onOptionsItemSelected(MenuItem)} && current view is single\n * image view.\n * @param item\n * The selected menu item\n * @param data\n * Current image data\n * @return Return false to allow other menu processing to proceed, true to consume it here\n */\n public boolean onOptionsItemSelected(MenuItem item, MediaData data);\n\n}", "private void setupActionBar() {\n\n setTitle(getString(R.string.new_pub_activity_title));\n\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n final ActionBar actionBar = getSupportActionBar();\n if (actionBar != null)\n actionBar.setDisplayHomeAsUpEnabled(true);\n }", "public void setupActionBar(CharSequence title) {\r\n\t\tfinal ViewGroup actionBarCompat = getActionBarCompat();\r\n\t\tif (actionBarCompat == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tLinearLayout.LayoutParams springLayoutParams = new LinearLayout.LayoutParams(\r\n\t\t\t\t0, ViewGroup.LayoutParams.FILL_PARENT);\r\n\t\tspringLayoutParams.weight = 1;\r\n\r\n\t\tView.OnClickListener homeClickListener = new View.OnClickListener() {\r\n\t\t\tpublic void onClick(View view) {\r\n\t\t\t\tgoHome();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif (title != null) {\r\n\t\t\t// Add Home button\r\n\t\t\taddActionButtonCompat(R.drawable.ic_action_home,\r\n\t\t\t\t\tR.string.description_home_icon, homeClickListener, true);\r\n\r\n\t\t\t// Add title text\r\n\t\t\tTextView titleText = new TextView(mActivity, null,\r\n\t\t\t\t\tR.attr.actionbarCompatTextStyle);\r\n\t\t\ttitleText.setLayoutParams(springLayoutParams);\r\n\t\t\ttitleText.setText(title);\r\n\t\t\tactionBarCompat.addView(titleText);\r\n\r\n\t\t} else {\r\n\t\t\tImageButton logo = new ImageButton(mActivity, null,\r\n\t\t\t\t\tR.attr.actionbarCompatLogoStyle);\r\n\t\t\tlogo.setOnClickListener(homeClickListener);\r\n\t\t\tactionBarCompat.addView(logo);\r\n\r\n\t\t\tView spring = new View(mActivity);\r\n\t\t\tspring.setLayoutParams(springLayoutParams);\r\n\t\t\tactionBarCompat.addView(spring);\r\n\t\t}\r\n\r\n\t}", "protected void setupActionBar()\r\n\t{\r\n\t\tfinal ActionBar actionBar = getActionBar();\r\n\t\tif (actionBar == null)\r\n\t\t\treturn;\r\n\t\tactionBar.setDisplayShowTitleEnabled(true);\r\n\t\tactionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);\r\n\t\tactionBar.setDisplayUseLogoEnabled(true);\r\n\t\tactionBar.setLogo(R.drawable.itiffin);\r\n\t\tactionBar.setBackgroundDrawable(getResources().getDrawable(\r\n\t\t\t\tR.drawable.black_semi_trans_strip));\r\n\t\tactionBar.setDisplayHomeAsUpEnabled(true);\r\n\t\tactionBar.setHomeButtonEnabled(true);\r\n\t\tactionBar.setTitle(R.string.app_name);\r\n\r\n\r\n\t}", "private void layoutActionBar() {\n ActionBar ab = getSupportActionBar();\n if(ab != null) {\n if (mode == 2) {\n ab.setTitle(\"Route Record\");\n } else {\n ab.setTitle(\"Recommend Route\");\n }\n ab.setDisplayHomeAsUpEnabled(true);\n }\n }", "private void setupActionBar() {\n\t\tgetActionBar().setDisplayHomeAsUpEnabled(true);\n\t}", "protected void initActionBar() {\n\t\tActionBar actionBar = this.getActionBar();\r\n\t\tactionBar.setDisplayHomeAsUpEnabled(IsCanBack());\r\n\t\tactionBar.setTitle(getActionBarTitle());\r\n\t}", "boolean hasActionBar();", "public void showActionBar(){\n getSupportActionBar().show();\n yell(\"Showing action bar\");\n }", "private void contributeToActionBars() {\n\t\tIActionBars bars = getViewSite().getActionBars();\n\t\tfillLocalPullDown(bars.getMenuManager());\n\t\tfillLocalToolBar(bars.getToolBarManager());\n\t}", "private PSContentTypeActionMenuHelper(){}", "private void actionBarManager() {\n MaterialToolbar toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n }", "public int onCustomizeActionBar(ActionBar actionBar) {\n return 0;\n }", "public abstract String getBarTitle();", "private void placeActions() {\n IActionBars actionBars = getViewSite().getActionBars();\n\n // first in the menu\n IMenuManager menuManager = actionBars.getMenuManager();\n menuManager.add(mCreateFilterAction);\n menuManager.add(mEditFilterAction);\n menuManager.add(mDeleteFilterAction);\n menuManager.add(new Separator());\n menuManager.add(mClearAction);\n menuManager.add(new Separator());\n menuManager.add(mExportAction);\n\n // and then in the toolbar\n IToolBarManager toolBarManager = actionBars.getToolBarManager();\n for (CommonAction a : mLogLevelActions) {\n toolBarManager.add(a);\n }\n toolBarManager.add(new Separator());\n toolBarManager.add(mCreateFilterAction);\n toolBarManager.add(mEditFilterAction);\n toolBarManager.add(mDeleteFilterAction);\n toolBarManager.add(new Separator());\n toolBarManager.add(mClearAction);\n }", "protected ActionBar getActionBarToolbar() {\n if (actionBarToolbar == null) {\n actionBarToolbar = (Toolbar) findViewById(R.id.toolbar);\n if (actionBarToolbar != null) {\n //actionBarToolbar.setLogo(R.drawable.logo);\n actionBarToolbar.setTitle(\"Apartment\");\n setSupportActionBar(actionBarToolbar);\n }\n }\n return getSupportActionBar();\n }", "private void hideActionBar(){\n try {getSupportActionBar().hide();}\n catch (NullPointerException e){ Log.e(\"Exception\",\"null\");}\n }", "private void setActionBar() {\n headView.setText(\"消息中心\");\n headView.setGobackVisible();\n headView.setRightGone();\n // headView.setRightResource();\n }", "public View getActionBarView(Activity activity) {\n Window window = activity.getWindow();\n View view = window.getDecorView();\n int resId = activity.getResources().getIdentifier(\"action_bar_container\", \"id\", \"android\");\n\n return view.findViewById(resId);\n }", "private void setUpActionBar() {\n //Uses superclass method to instantiate ActionBar\n mActionBarToolbar = getActionBarToolbar();\n mActionBarToolbar.setTitle(getResources().getString(R.string.title_activity_settings_languajes));\n setSupportActionBar(mActionBarToolbar);\n }", "private void initializeActionbar() {\n toolbar = binding.toolbar;\n Objects.requireNonNull(toolbar).setTitle(R.string.navigation_my_pets);\n setSupportActionBar(toolbar);\n ActionBar actionBar = getSupportActionBar();\n Objects.requireNonNull(actionBar).setDisplayHomeAsUpEnabled(true);\n }", "private void setUpActionBar() {\n\t\tUtil.setFragmentActionBarTitle((BaseActivity)getActivity(), getResources().getString(R.string.navigation_menu_faq_question));\n\t}", "protected void setupActionBar() {\n setTitle();\n setSutTitle();\n setIcon();\n setHomeAsUp(mCallback.getHomeButtonStyle() == HomeButtonStyle.SHOW_HOME_AS_UP);\n }", "public interface BaseDisplay {\n\n void finish();\n\n void showUpNavigation(boolean show);\n\n void setActionBarTitle(String title);\n\n void setSupportActionBar(Object toolbar);\n\n}", "@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n }", "protected void setContents() {\n\tactionBar.setHomeAction(homeAction);\r\n\tactionBar.setDisplayHomeAsUpEnabled(true);\r\n\tactionBar.addAction(shareAction);\r\n\tactionBar.addAction(otherAction);\r\n }", "@Override\n public void run() {\n ActionBar actionBar = getActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n }", "@SuppressLint(\"NewApi\")\n\tprivate void changeActionBarBackground() {\n\t\tif (AppStartupManager.getTopbarStylingInfoBean() != null) {\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\tActionBarStylingInfoBean stylingInfoBean = AppStartupManager.getTopbarStylingInfoBean();\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// Only the background of the Action bar needs to be set\n\t\t\t\t\t// using\n\t\t\t\t\t// the information in the topbar styling info bean\n\t\t\t\t\tif (stylingInfoBean.getTopbarBgType().equalsIgnoreCase(SmartConstants.TOPBAR_BG_TYPE_COLOR)) {\n\t\t\t\t\t\tactionbar.setBackgroundDrawable(new ColorDrawable(Color.parseColor(stylingInfoBean.getTopbarBgColor())));\n\t\t\t\t\t} else if (stylingInfoBean.getTopbarBgType().equalsIgnoreCase(SmartConstants.TOPBAR_BG_TYPE_IMAGE)) {\n\t\t\t\t\t\t// set the background image for action bar\n\t\t\t\t\t\tactionbar.setBackgroundDrawable(AppUtility.getDrawableForId(AppUtility.getResourseIdByName(getApplicationContext().getPackageName(), \"drawable\",\n\t\t\t\t\t\t\t\tstylingInfoBean.getTopbarBgImage())));\n\t\t\t\t\t} else if (stylingInfoBean.getTopbarBgType().equalsIgnoreCase(SmartConstants.TOPBAR_BG_TYPE_GRADIENT)) {\n\t\t\t\t\t\tactionbar.setBackgroundDrawable(AppUtility.createBgGradient(stylingInfoBean.getTopbarBgGradientType(), stylingInfoBean.getTopbarBgGradient()));\n\t\t\t\t\t}\n\n\t\t\t\t\tLog.d(SmartConstants.APP_NAME, \"SmartViewActivity->changeActionBarBackground->topbar text color:\" + Color.parseColor(stylingInfoBean.getTopbarTextColor()));\n\t\t\t\t\ttopbarTextColor = stylingInfoBean.getTopbarTextColor();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void hideActionBar(){\n getSupportActionBar().hide();\n yell(\"Hiding action bar\");\n }", "public static boolean hasActionBar() {\n\t\treturn Build.VERSION.SDK_INT >= 11;\n\t}", "public void onCustomizeActionBar(ActionBar actionBar) {\n actionBar.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pc_main_activity_background_color)));\n actionBar.setDisplayOptions(28);\n ImageView imageView = new ImageView(this);\n imageView.setBackgroundResource(R.drawable.v_setting_icon);\n imageView.setContentDescription(getString(R.string.activity_title_settings));\n imageView.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n g.startWithFragment(NetworkDiagnosticsActivity.this.mActivity, NetworkDiagnosticsSettingFragment.class);\n }\n });\n actionBar.setEndView(imageView);\n }", "@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n\n }", "public void addMenuActionToCoolBar(MenuAction action) {\n\t\t_coolBar.addMenuAction(action);\n\t}", "private void HideActionBar(){\n if(getSupportActionBar() != null){\n getSupportActionBar().hide();\n }\n }", "private void hideActionBar() {\n View decorView = getWindow().getDecorView();\n // Hide the status bar.\n int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;\n decorView.setSystemUiVisibility(uiOptions);\n // Hide the action bar\n getSupportActionBar().hide();\n }", "private void setActionBar(int action_backColor) {\n ActionBar actionBar = getSupportActionBar();\n if(actionBar != null) {\n actionBar.setDisplayShowTitleEnabled(true);\n actionBar.setHomeButtonEnabled(true);\n actionBar.setDisplayUseLogoEnabled(true);\n actionBar.setLogo(R.mipmap.ic_launcher_round);\n actionBar.setDisplayShowHomeEnabled(true);\n actionBar.setBackgroundDrawable(new ColorDrawable(action_backColor));\n actionBar.setTitle(getResources().getString(R.string.app_name));\n }\n }", "private ActionToolbar createActionsToolbar() {\n DefaultActionGroup actions = new DefaultActionGroup();\n\n actions.add(EditorActionsFactory.create(BOLD));\n actions.add(EditorActionsFactory.create(ITALIC));\n actions.add(EditorActionsFactory.create(UNDERLINE));\n actions.addSeparator();\n actions.add(EditorActionsFactory.create(ALIGN_LEFT));\n actions.add(EditorActionsFactory.create(ALIGN_CENTER));\n actions.add(EditorActionsFactory.create(ALIGN_RIGHT));\n\n final ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.EDITOR_TAB, actions, true);\n actionToolbar.setMinimumButtonSize(ActionToolbar.NAVBAR_MINIMUM_BUTTON_SIZE);\n return actionToolbar;\n }", "private void create_toolbar() {\n setSupportActionBar(toolbar);\n getSupportActionBar().setTitle(\"Event Planner\");//this will set the title of our application\n\n }", "private void initializeActionModeHelper() {\n mActionModeHelper = new ActionModeHelper(mAdapter, R.menu.menu_action_header, this) {\n // Override to customize the title\n @Override\n public void updateContextTitle(int count) {\n // You can use the internal mActionMode instance\n if (mActionMode != null) {\n int position = mAdapter.getSelectedPositions().get(0);\n AbstractFlexibleItem item = mAdapter.getItem(position);\n mActionMode.setTitle(fontifyString(getActivity(), getString(R.string.action_edit_category, item)));\n }\n }\n }.withDefaultMode(SelectableAdapter.Mode.SINGLE);\n mActionModeHelper.withDefaultMode(SelectableAdapter.Mode.SINGLE);\n mAdapter.setMode(SelectableAdapter.Mode.SINGLE);\n }", "public void initializeActionbar() {\n toolbar = (Toolbar) findViewById(R.id.toolbar);\n\n //setting the toolbar as layout actionbar\n if (toolbar != null)\n setSupportActionBar(toolbar);\n }", "private void initializeAppBar() {\n Toolbar toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n ActionBar actionbar = getSupportActionBar();\n actionbar.setDisplayHomeAsUpEnabled(true);\n actionbar.setHomeAsUpIndicator(R.drawable.ic_menu_black_24dp);\n }", "private void setupActionBar(String title) {\n Button openDrawer = findViewById(R.id.open_drawer);\n TextView activityTitle = findViewById(R.id.activity_title);\n\n Display display = getWindowManager().getDefaultDisplay();\n Point size = new Point();\n display.getSize(size);\n\n openDrawer.setBackgroundDrawable(new IconicsDrawable(this).icon(GoogleMaterial.Icon.gmd_menu).sizeDp(30).color(getResources().getColor(R.color.colorPrimary)));\n openDrawer.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mainDrawer.openDrawer();\n }\n });\n\n activityTitle.setText(title); //sets the TextViews text\n }", "private void loadAppBar()\n\t{\n\t\tLayoutInflater inflator=(LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView v = inflator.inflate(R.layout.search_page_header, null);\n\t\t\t\n\t\tActionBar mActionBar = getActionBar();\n\t\tmActionBar.setDisplayShowHomeEnabled(false);\n\t\tmActionBar.setDisplayShowTitleEnabled(false);\n\t\tmActionBar.setDisplayUseLogoEnabled(false);\n\t\tmActionBar.setDisplayShowCustomEnabled(true);\n\t\tmActionBar.setCustomView(v);\n\t\tif (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\n\t\t\ttry{\n\t\t\t\tToolbar parent = (Toolbar) v.getParent(); \n\t\t\t\tparent.setContentInsetsAbsolute(0, 0);\n\t\t\t} catch(ClassCastException e) {\n\t\t\t\te.printStackTrace(); \n\t\t\t}\n\t\t}\n\t\t\n\t\tImageView menuBtn \t= (ImageView) v.findViewById(R.id.iv_menu_btn);\n\t\tImageView ivLogo\t\t= (ImageView) v.findViewById(R.id.iv_logo);\n\t\tImageButton ibHome = (ImageButton) v.findViewById(R.id.ib_home);\n\t\t\n\t\tibHome.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tfinish();\n\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tstartActivity(home);\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tivLogo.setOnClickListener(new OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t});\n\t\t\n\t\tmenuBtn.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void showEditBar() {\n\t\tfinal LayoutInflater inflater = (LayoutInflater) getSupportActionBar().getThemedContext()\n\t\t\t\t.getSystemService(LAYOUT_INFLATER_SERVICE);\n\t\tfinal View customActionBarView = inflater.inflate(\n\t\t\t\tR.layout.actionbar_custom_view_done_cancel, null);\n\t\tcustomActionBarView.findViewById(R.id.actionbar_done).setOnClickListener(saveListener);\n\t\tcustomActionBarView.findViewById(R.id.actionbar_cancel).setOnClickListener(new View.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\n\t\t// Show the custom action bar view and hide the normal Home icon and title.\n\t\tfinal ActionBar actionBar = getSupportActionBar();\n\t\tactionBar.setDisplayOptions(\n\t\t\t\tActionBar.DISPLAY_SHOW_CUSTOM,\n\t\t\t\tActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME\n\t\t\t\t\t\t| ActionBar.DISPLAY_SHOW_TITLE);\n\t\tactionBar.setCustomView(customActionBarView,\n\t\t\t\tnew ActionBar.LayoutParams(\n\t\t\t\t\t\tViewGroup.LayoutParams.MATCH_PARENT,\n\t\t\t\t\t\tViewGroup.LayoutParams.MATCH_PARENT));\n\t\t// END_INCLUDE (inflate_set_custom_view)\n\t}", "private void setupToolbar() {\n Toolbar toolbar = (Toolbar) findViewById(R.id.activity_menubar_toolbar);\n setSupportActionBar(toolbar);\n final ActionBar actionBar = getSupportActionBar();\n\n TextView mTitle = (TextView) toolbar.findViewById(R.id.actionbar_tvTitle);\n ImageView ivSave = (ImageView) toolbar.findViewById(R.id.activity_base_actionbar_ivNext);\n mTitle.setTypeface(typeface);\n mTitle.setVisibility(View.VISIBLE);\n ivSave.setVisibility(View.VISIBLE);\n ivSave.setImageResource(R.drawable.ic_save);\n ivSave.setOnClickListener(this);\n mTitle.setText(\"Share Pics\");\n\n if (actionBar != null) {\n\n actionBar.setTitle(\"\");\n actionBar.setDisplayHomeAsUpEnabled(true);\n actionBar.setDisplayShowTitleEnabled(true);\n }\n\n\n }", "protected ActionListener createHelpActionListener() {\r\n return null;\r\n }", "protected void fillCoolBar(ICoolBarManager coolBar) {\n\t\tIWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();\n\t\tIToolBarManager toolbar = new ToolBarManager(SWT.LEFT);\n\t\tcoolBar.add(new ToolBarContributionItem(toolbar, Messages.getString(\"IU.Strings.15\"))); //$NON-NLS-1$\n\t\ttoolbar.add(new GroupMarker(Messages.getString(\"IU.Strings.16\"))); //$NON-NLS-1$\n\n\n\t\t/*IWorkbenchAction open = ActionFactory..create(window);\n\t\topen.setImageDescriptor(Activator.getImageDescriptor(\"icons/charger.png\"));\n\t\ttoolbar.add(open);*/\n\n\t\tIWorkbenchAction save = ActionFactory.SAVE.create(window);\n\t\tsave.setImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.17\"))); //$NON-NLS-1$\n\t\tsave.setDisabledImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.18\"))); //$NON-NLS-1$\n\t\tsave.setHoverImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.19\"))); //$NON-NLS-1$\n\t\tsave.setText(Messages.getString(\"IU.Strings.20\")); //$NON-NLS-1$\n\t\tsave.setToolTipText(Messages.getString(\"IU.Strings.21\")); //$NON-NLS-1$\n\t\ttoolbar.add(save);\n\n\t\tIWorkbenchAction print = ActionFactory.PRINT.create(window);\n\t\tprint.setImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.22\"))); //$NON-NLS-1$\n\t\tprint.setDisabledImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.23\"))); //$NON-NLS-1$\n\t\tprint.setHoverImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.24\"))); //$NON-NLS-1$\n\t\tprint.setText(Messages.getString(\"IU.Strings.25\")); //$NON-NLS-1$\n\t\tprint.setToolTipText(Messages.getString(\"IU.Strings.26\")); //$NON-NLS-1$\n\t\ttoolbar.add(print);\n\n\n\t\ttoolbar.add(new GroupMarker(Messages.getString(\"IU.Strings.27\"))); //$NON-NLS-1$\n\t\ttoolbar.add(new Separator());\n\t\tIWorkbenchAction find = ActionFactory.FIND.create(window);\n\t\tfind.setImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.28\"))); //$NON-NLS-1$\n\t\t//find.setDisabledImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.29\"))); //$NON-NLS-1$\n\t\t//find.setHoverImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.30\"))); //$NON-NLS-1$\n\t\tfind.setText(Messages.getString(\"IU.Strings.31\")); //$NON-NLS-1$\n\t\tfind.setToolTipText(Messages.getString(\"IU.Strings.32\")); //$NON-NLS-1$\n\t\ttoolbar.add(find);\n\n\t\t/*toolbar.add(ActionFactory.COPY.create(window));\n\t\ttoolbar.add(ActionFactory.CUT.create(window));\n\t\ttoolbar.add(ActionFactory.PASTE.create(window));\n\t\ttoolbar.add(new Separator());*/\n\n\t\t//TODO Rrgler le bug d'icon non charger undo / redo entre l'editeur et la console\n\t\t/*IWorkbenchAction undo = ActionFactory.UNDO.create(window);\n\t\tundo.setImageDescriptor(Activator.getImageDescriptor(\"icons/undo.gif\"));\n\t\tundo.setDisabledImageDescriptor(Activator.getImageDescriptor(\"icons/undo.gif\"));\n\t\tundo.setHoverImageDescriptor(Activator.getImageDescriptor(\"icons/undo.gif\"));\n\t\ttoolbar.add(undo);\n\n\t\tIWorkbenchAction redo = ActionFactory.REDO.create(window);\n\t\tredo.setImageDescriptor(Activator.getImageDescriptor(\"icons/redo.gif\"));\n\t\tredo.setDisabledImageDescriptor(Activator.getImageDescriptor(\"icons/redo.gif\"));\n\t\tredo.setHoverImageDescriptor(Activator.getImageDescriptor(\"icons/redo.gif\"));\n\t\ttoolbar.add(redo);*/\n\n\t\t\n\t\t//toolbar.add(ActionFactory.REDO.create(window));*/\n\n\t\t//toolbox2.png\n\t\tToolsBoxAction toolBox = new ToolsBoxAction(window);\n\t\ttoolBox.setImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.33\"))); //$NON-NLS-1$\n\t\ttoolBox.setDisabledImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.34\"))); //$NON-NLS-1$\n\t\ttoolBox.setHoverImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.35\"))); //$NON-NLS-1$\n\t\ttoolbar.add(toolBox);\n\t\t\n\t\t\n\t\t//action_toolsBox.setMenuCreator(new IMenuCreator(){});\n\t\n\t\t//coolBar.add(new ToolBarContributionItem(toolbar2, \"main2\"));\n\t\t//toolbar2.add(ActionFactory.SHOW_VIEW_MENU.create(window));\n\n\t\t\n\t\tIToolBarManager toolbar2 = new ToolBarManager(SWT.RIGHT | SWT.FLAT | SWT.HORIZONTAL);\n\t\t\n\t\tcoolBar.add(new ToolBarContributionItem(toolbar2, Messages.getString(\"IU.Strings.36\")));\t //$NON-NLS-1$\n\t\ttoolbar2.add(new GroupMarker(Messages.getString(\"IU.Strings.37\"))); //$NON-NLS-1$\n\t\ttoolbar2.add(new GroupMarker(Messages.getString(\"IU.Strings.38\"))); //$NON-NLS-1$\n\t}", "protected void getActionBarToolbar() {\n back_cover = (FrameLayout) findViewById(R.id.back_cover);\n \tif(back_cover != null){\n \tback_cover.setOnClickListener(this);\n }\n \ttitleTv = (TextView) findViewById(R.id.title);\n if(titleTv != null){\n \tif(!TextUtils.isEmpty(title)){\n \t\ttitleTv.setText(title);\n \t}\n }\n }", "private void setActionBar() {\n ActionBar mActionBar = getSupportActionBar();\n mActionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);\n mActionBar.setCustomView(R.layout.actionbar_design);\n\n\n View mCustomView = mActionBar.getCustomView();\n ImageView image_drawer = (ImageView) mCustomView.findViewById(R.id.image_drawer);\n ImageView img_btllogo = (ImageView) mCustomView.findViewById(R.id.img_btllogo);\n ImageView img_home = (ImageView) mCustomView.findViewById(R.id.img_home);\n ImageView img_virtualRoom = (ImageView) mCustomView.findViewById(R.id.img_virtualRoom);\n ImageView img_search=(ImageView)mCustomView.findViewById(R.id.img_search);\n ImageView img_fav=(ImageView)mCustomView.findViewById(R.id.img_fav);\n\n img_search.setVisibility(View.VISIBLE);\n img_fav.setVisibility(View.VISIBLE);\n img_virtualRoom.setVisibility(View.VISIBLE);\n\n img_virtualRoom.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent=new Intent(getApplicationContext(),VirtualRoomActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n }\n });\n\n img_fav.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent i = new Intent(getApplicationContext(), FavouriteList.class);\n app = new AppPrefs(getApplicationContext());\n app.setfav(\"list\");\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n }\n });\n\n img_search.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent i = new Intent(getApplicationContext(), Search.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n }\n });\n\n image_drawer.setImageResource(R.drawable.back);\n image_drawer.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onBackPressed();\n }\n });\n\n img_home.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n app = new AppPrefs(LaminateList.this);\n app.setCategoryid(\"\");\n Intent i = new Intent(LaminateList.this, MainActivity.class);\n i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(i);\n finish();\n }\n });\n\n mActionBar.setCustomView(mCustomView);\n mActionBar.setDisplayShowCustomEnabled(true);\n }", "private void wireActionBar() {\n final BottomSheetBehavior behavior = BottomSheetBehavior.from(actionBar);\n behavior.setHideable(true);\n landmarkRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrolled(RecyclerView recyclerView, int dx, int dy) {\n if (dy > 0) {\n if (behavior.getState() == BottomSheetBehavior.STATE_EXPANDED) {\n behavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n }\n\n } else {\n if (behavior.getState() == BottomSheetBehavior.STATE_COLLAPSED) {\n behavior.setState(BottomSheetBehavior.STATE_EXPANDED);\n }\n }\n super.onScrolled(recyclerView, dx, dy);\n }\n });\n\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String s) {\n ScreenKeyboardUtil.hideScreenKeyboard(getActivity());\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String s) {\n dataFragment.onSearch(s.trim());\n return false;\n }\n });\n\n updateMapViewAction();\n }", "private void setupToolBar(){\n Toolbar toolbar = (Toolbar)findViewById(R.id.my_toolbar);\n setSupportActionBar(toolbar);\n\n getSupportActionBar().setHomeButtonEnabled(true);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }", "protected Class<? extends ActionStd<S>> getActionClassHook() {\n\t\treturn null;\r\n\t}", "private void setActionBar() {\n\t\tString text=\"\";\n\t\tif(isBindEmail){\n\t\t\ttext=\"修改邮箱\";\n\t\t\tvalidateUser();\n\t\t}else{\n\t\t\ttext=\"绑定邮箱\";\n\t\t\tbindPhone(AppContext.getInstance().getLocalUserInfo(mContext).id);\n\t\t}\n\t\theadView.setText(text);\n\t\theadView.setGobackVisible();\n\t\theadView.setRightGone();\n\t}", "boolean setActionBarVisible(boolean visible);", "public interface ActionBarClickListener {\n\n void onLeftClick();\n\n void onRightClick();\n\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "public interface TitleBarView {\n\n public Activity getOutActivity();\n\n public void initBackBtnWithBackgroundImage(int res);\n\n public void initTitleText(String titleText);\n\n public void initTitleBarWithBackgroundImage(int resImg);\n\n public void initTitleBarWithBackgroundColor(int resColor);\n\n public void initRightText(String rightText);\n\n public void initRightImage(int resImg);\n\n}", "public final void invalidateActionBar() {\n if (mActionMode != null) {\n mActionMode.updateActionBar(getSupportActionBar());\n } else {\n updateActionBar(getSupportActionBar());\n }\n }", "private void initialize(){\n toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayShowTitleEnabled(true);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n\n\n }", "private void createToolBarActions() {\r\n\t\t// create the action\r\n\t\tGetMessage<Transport> getMessage = new GetMessage<Transport>(new Transport());\r\n\t\tgetMessage.addParameter(IFilterTypes.TRANSPORT_TODO_FILTER, \"\");\r\n\r\n\t\t// add to the toolbar\r\n\t\tform.getToolBarManager().add(new RefreshViewAction<Transport>(getMessage));\r\n\t\tform.getToolBarManager().update(true);\r\n\t}", "private void actionbarInit() \n\t{\n\t\tactionbar_ll_left.setVisibility(View.VISIBLE);\n\t\tactionbar_tv_back_name_left.setVisibility(View.GONE);\t\t\n\t\t\n\t\tactionbar_btn_right_left.setVisibility(View.GONE);\n\t\tactionbar_imgbtn_right.setVisibility(View.GONE);\n\n\t\tactionbar_tv_back_name_left.setText(\"\");\n\t\tactionbar_tv_name_center.setText(getString(R.string.set));\n\t\tactionbar_btn_right_left.setText(getString(R.string.rule));\n\n\t\tactionbar_ll_left.setOnClickListener(clickListener_actionbar);\n//\t\tactionbar_imgbtn_right.setOnClickListener(clickListener_actionbar);\n\t}", "private JMenuBar createMenuBar(){\n\n MenuBarHandler menuBarHandler = new MenuBarHandler();\n JMenuBar menuBar = new JMenuBar();\n JMenu application = new JMenu(\"Application\");\n application.setMnemonic(KeyEvent.VK_A);\n JMenu view = new JMenu(\"View\");\n view.setMnemonic(KeyEvent.VK_V);\n JMenu help = new JMenu(\"Help\");\n help.setMnemonic(KeyEvent.VK_H);\n menuBar.add(application);\n menuBar.add(view);\n menuBar.add(help);\n JMenuItem options = new JMenuItem(\"Options\", KeyEvent.VK_O);\n JMenuItem exit = new JMenuItem(\"Exit\", KeyEvent.VK_E);\n application.add(options);\n options.addActionListener(menuBarHandler);\n application.add(exit);\n exit.addActionListener(menuBarHandler);\n JMenuItem toggleFullScreen = new JMenuItem(\"Toggle Full Screen\", KeyEvent.VK_T);\n JMenuItem toggleSideBar = new JMenuItem(\"Toggle Sidebar\", KeyEvent.VK_O);\n view.add(toggleFullScreen);\n toggleFullScreen.addActionListener(menuBarHandler);\n view.add(toggleSideBar);\n toggleSideBar.addActionListener(menuBarHandler);\n JMenuItem about = new JMenuItem(\"About\", KeyEvent.VK_A);\n JMenuItem helpItem = new JMenuItem(\"Help\", KeyEvent.VK_H);\n KeyStroke ctrlS = KeyStroke.getKeyStroke(\"control S\");\n toggleSideBar.setAccelerator(ctrlS);\n help.add(about);\n about.addActionListener(menuBarHandler);\n help.add(helpItem);\n helpItem.addActionListener(menuBarHandler);\n return menuBar;\n }", "public interface ActionResolver {\n void showToast(CharSequence text);\n void showDialog();\n void showDialogWithBestScore();\n void showDialogLogin(MenuScreen menuScreen);\n void showDialogSetting(MenuScreen menuScreen);\n}", "protected void refreshActionBar() {\n if (mActionBarController != null) {\n mActionBarController.refresh();\n }\n mActivity.invalidateOptionsMenu();\n }", "@java.lang.Deprecated\n public A withNewAction(java.lang.String arg0);", "@Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n ActionBar actionBar = ((AppCompatActivity)activity).getSupportActionBar();\n actionBar.setTitle(\"Home\");\n }", "public static void patchIdeaActionButton() throws NoSuchFieldException, IllegalAccessException {\n if (MTConfig.getInstance().isMaterialDesign()) {\n StaticPatcher.setFinalStatic(ActionButtonLook.class, \"SYSTEM_LOOK\", new MTActionButtonLook());\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "private static void setStatus(CharSequence subTitle, Activity activity) {\n\n if (null == activity) {\n return;\n }\n final ActionBar actionBar = activity.getActionBar();\n if (null == actionBar) {\n return;\n }\n actionBar.setSubtitle(subTitle);\n }", "public void changeActionBarTitle(int position_product) {\n\n Resources r = getResources();\n if (position_product == r.getInteger(R.integer.WIRE_CLIP_POSITION) ) {\n getSupportActionBar().setTitle(\"WIRE CLIPS\");\n } if (position_product == r.getInteger(R.integer.CONCEAL_BOX_POSITION) ) {\n getSupportActionBar().setTitle(\"CONCEAL BOARDS\");\n } if (position_product == r.getInteger(R.integer.MCB_BOXES_POSITION) ) {\n getSupportActionBar().setTitle(\"MCBS\");\n } if(position_product == r.getInteger(R.integer.CASING_CAPING_ACCESSORIES_POSITION)){\n getSupportActionBar().setTitle(\"CASING ACCESSORIES\");\n } if(position_product == r.getInteger(R.integer.MULTICORE_CABLE_POSITION)){\n getSupportActionBar().setTitle(\"MULTICORE CABLE\");\n } if(position_product == r.getInteger(R.integer.EXHAUST_FAN_POSITION)){\n getSupportActionBar().setTitle(\"EXHAUST FANS\");\n } if(position_product == r.getInteger(R.integer.CASING_POSITION)){\n getSupportActionBar().setTitle(\"CASING CAPING\");\n } if(position_product == r.getInteger(R.integer.GANG_BOX_POSITION)){\n getSupportActionBar().setTitle(\"GANG BOXES\");\n }\n }", "private static void setStatus(int resId, Activity activity) {\n\n\n if (null == activity) {\n return;\n }\n final ActionBar actionBar = activity.getActionBar();\n if (null == actionBar) {\n return;\n }\n actionBar.setSubtitle(resId);\n }", "private void setToolBar() {\r\n toolbar.setTitle(R.string.photo_details);\r\n ActionBar ab = getSupportActionBar();\r\n if (ab != null) {\r\n ab.setDisplayHomeAsUpEnabled(true);\r\n }\r\n toolbar.setNavigationIcon(R.drawable.ic_back);\r\n }", "public void initToolbar(){\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n if(getSupportActionBar()!=null) {\n getSupportActionBar().setTitle(\"\");\n }\n getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_launcher_white);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Window window = getWindow();\n window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);\n window.setStatusBarColor(ContextCompat.getColor(this, R.color.colorPrimaryDarkest));\n }\n }", "private static ToolBar header(Stage stage) {\n\t\t// Main menu button on the right\n\t\tButton mainMenu = new Button(\"Main menu\");\n\t\tmainMenu.setOnAction(actionEvent -> mainMenu(stage));\n\t\t\n\t\t// Username on the left\n\t\tLabel usernameLabel = new Label(UserInterfaceLogic.getUsernameLabel());\n\t\t\n\t\tToolBar toolBar = new ToolBar();\n\t\ttoolBar.getItems().addAll(usernameLabel, new Separator(), mainMenu);\n\t\t\n\t\treturn toolBar;\n\t}", "public static PSContentTypeActionMenuHelper getInstance(){\n if(instance == null){\n synchronized(PSContentTypeActionMenuHelper.class){\n if(instance == null){\n instance = new PSContentTypeActionMenuHelper();\n }\n }\n }\n return instance;\n }", "private void initialiseToolbar() {\n getSupportActionBar().setTitle(\"Custom Interval\");\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }", "public interface BaseView {\n\n void setToolbarTitle(String title);\n\n Context context();\n\n}", "protected abstract JToolBar getNorthToolbar();", "public void establecerIcono(){\n ActionBar actionBar = getSupportActionBar();\n\n //Establecemos el icono en la ActionBar\n actionBar.setIcon(R.mipmap.ic_be_score);\n actionBar.setDisplayShowHomeEnabled(true);\n\n // Activar flecha ir atrás (ir a la Parent Activity declarada en el manifest)\n //actionBar.setDisplayHomeAsUpEnabled(true);\n }", "@Override\n protected boolean isActionBarBlurred() {\n return true;\n }", "@Override\n public void run() {\n ActionBar actionBar = getSupportActionBar();\n if (actionBar != null) {\n actionBar.show();\n }\n // mControlsView.setVisibility(View.VISIBLE);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //getMenuInflater().inflate(R.menu.activity_main, menu);\n \tsuper.onCreateOptionsMenu(menu);\n getSupportMenuInflater().inflate(R.menu.actionbar, menu);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n BatteryIcon = (MenuItem)menu.findItem(R.id.acb_battery);\n setActBarBatteryIcon(Callbacksplit.getsavedBatteryStateIcon());\n ConnectIcon = (MenuItem)menu.findItem(R.id.acb_connect);\n setActBarConnectIcon();\n \n ((MenuItem)menu.findItem(R.id.acb_m_5)).setVisible(false);\n\n return true;\n }", "private void configureToolbar(){\n Toolbar toolbar = (Toolbar) findViewById(R.id.mento_toolbar);\n //Set the toolbar\n setSupportActionBar(toolbar);\n // Get a support ActionBar corresponding to this toolbar\n ActionBar ab = getSupportActionBar();\n\n }", "@Override\n\tprotected ToolBarManager createToolBarManager(int style) {\n\t\treturn null;\n\t}", "private Component createToolBar()\n {\n Component toolbarPanel = null;\n\n mainToolBar = new MainToolBar(this);\n\n boolean chatToolbarVisible\n = ConfigurationUtils.isChatToolbarVisible();\n\n if (OSUtils.IS_MAC)\n {\n UnifiedToolBar macToolbarPanel = new UnifiedToolBar();\n\n MacUtils.makeWindowLeopardStyle(getRootPane());\n\n macToolbarPanel.addComponentToLeft(mainToolBar);\n macToolbarPanel.addComponentToRight(contactPhotoPanel);\n macToolbarPanel.disableBackgroundPainter();\n macToolbarPanel.installWindowDraggerOnWindow(this);\n macToolbarPanel.getComponent()\n .setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));\n macToolbarPanel.getComponent().setVisible(chatToolbarVisible);\n\n toolbarPanel = macToolbarPanel.getComponent();\n }\n else\n {\n ToolbarPanel panel = new ToolbarPanel(new BorderLayout());\n\n panel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 0));\n panel.add(mainToolBar, BorderLayout.CENTER);\n panel.add(contactPhotoPanel, BorderLayout.EAST);\n panel.setVisible(chatToolbarVisible);\n\n toolbarPanel = panel;\n }\n\n return toolbarPanel;\n }", "private void setupToolbar() {\n Toolbar toolbar = (Toolbar) findViewById(R.id.edit_task_toolbar);\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n }", "protected void addActivePathToolbarButton ()\n {\n\n }", "public void Rt_Click_AstCreation_Buttom_AppBar() {\r\n\t\tActions ac = new Actions(driver);\r\n\t\tac.contextClick().build().perform();\r\n\t}" ]
[ "0.7002824", "0.66833633", "0.6357701", "0.6220935", "0.62188137", "0.62075526", "0.6199962", "0.6126136", "0.6101111", "0.6056352", "0.60244477", "0.6015714", "0.60136765", "0.60115886", "0.59979624", "0.59845823", "0.59741837", "0.59454733", "0.59079283", "0.5890438", "0.5890015", "0.5847827", "0.5794112", "0.5750869", "0.57490534", "0.57471895", "0.57046616", "0.5690383", "0.5646813", "0.5600516", "0.5571561", "0.55678827", "0.5564469", "0.55427134", "0.55279833", "0.55209327", "0.5504876", "0.54395777", "0.5432252", "0.5430357", "0.5427546", "0.54234296", "0.54219896", "0.54219484", "0.5360811", "0.5359325", "0.5346304", "0.5330374", "0.53152454", "0.53151125", "0.5310027", "0.52976066", "0.5291863", "0.5290278", "0.528716", "0.52823234", "0.52793735", "0.52631694", "0.52418", "0.5219645", "0.5198152", "0.5135865", "0.51356506", "0.51294655", "0.5114377", "0.510907", "0.50981414", "0.50804704", "0.50770205", "0.507243", "0.5066348", "0.5065478", "0.50652754", "0.50631714", "0.5060596", "0.50564575", "0.50465727", "0.5042533", "0.5029421", "0.5026522", "0.5020133", "0.49826306", "0.49556053", "0.49468708", "0.49451038", "0.4934895", "0.4924627", "0.49240333", "0.49152657", "0.4902984", "0.48987317", "0.4895123", "0.48874027", "0.488513", "0.4884052", "0.48714224", "0.48684883", "0.4860508", "0.4853223", "0.48532012" ]
0.7731979
0
CharSequence text = "selectItem: " + listView_items[position]; Toast.makeText(this, text, Toast.LENGTH_SHORT).show(); update selected item and title, then close the drawer
public void selectItem(int position) { mDrawerListView.setItemChecked(position, true); setTitle(listView_items[position]); switch (position) { case 0: Toast.makeText(this, "All fields are cleared", Toast.LENGTH_SHORT).show(); this.clearAllFields(); pager.setCurrentItem(0); mDrawerLayout.closeDrawer(mDrawerListView); break; case 1: // Toast.makeText(this, "Sorry, Will be implemented later", // Toast.LENGTH_SHORT).show(); pager.setCurrentItem(1); mDrawerLayout.closeDrawer(mDrawerListView); break; case 2: Intent intent = new Intent(this, ConsentForm.class); startActivity(intent); break; case 3: intent = new Intent(this, ParticipantInfo.class); startActivity(intent); // mDrawerLayout.closeDrawer(mDrawerListView); break; case 4: this.runOnUiThread(new Runnable() { @Override public void run() { Intent intent3 = new Intent(MainActivity.this, SettingsPreferences.class); startActivity(intent3); // mDrawerLayout.closeDrawer(mDrawerListView); } }); break; case 5: Toast.makeText(this, "This is Version " + this.getString(R.string.version_name), Toast.LENGTH_SHORT).show(); mDrawerLayout.closeDrawer(mDrawerListView); break; case 6: intent = new Intent(this, HelpActivity.class); startActivity(intent); break; case 7: // Intent intent = new Intent(Intent.ACTION_MAIN); // intent.addCategory(Intent.CATEGORY_HOME); // intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // startActivity(intent); // mDrawerLayout.closeDrawer(mDrawerListView); this.exitApplication(); break; default: mDrawerLayout.closeDrawer(mDrawerListView); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void selectItem(int position) {\n mDrawerList.setItemChecked(position, true);\n // setTitle(mPlanetTitles[position]);\n setTitle(getResources().getStringArray(R.array.planets_array)[position]);\n mDrawerLayout.closeDrawer(mDrawerList);\n // simpleTV.setText(position + \"\");\n\n\n }", "private void selectItem(int position) {\n if(position==0){\n Intent myIntent= new Intent(this, ConnectActivity.class);\n startActivity(myIntent);}\n if(position==1){\n Intent myIntent= new Intent(this, ShowActivity.class);\n startActivity(myIntent);}\n if(position==2){\n Intent myIntent= new Intent(this, DiagnosisActivity.class);\n startActivity(myIntent);}\n if(position==3){\n Intent myIntent= new Intent(this, RemoteActivity.class);\n startActivity(myIntent);}\n if(position==4){\n Intent myIntent= new Intent(this, CommandActivity.class);\n startActivity(myIntent);}\n\n // update selected item and title, then close the drawer\n mDrawerList.setItemChecked(position, true);\n setTitle(mPlanetTitles[position]);\n mDrawerLayout.closeDrawer(mDrawerList);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\tString text = listview.getItemAtPosition(position)+\"\";\n\t\t\n\t\tToast.makeText(context, \"position=\"+position+\" text=\"+text, Toast.LENGTH_SHORT).show();\n\t}", "@Override\n protected void onListItemClick(ListView l, View v, int position, long id)\n {\n String selection = l.getItemAtPosition(position).toString();\n Toast.makeText(this, selection, Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\tmMenuListView.setItemChecked(position, true);\n\t // setTitle(mMenuTitles[position]);\n mDrawerLayout.closeDrawer(mMenuListView);\n drawerlayout=0;\n selectItem(position);\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Bundle args = new Bundle();\n args.putString(\"text\", menuLists.get(position).getContent());\n// contenFragment.setArguments(args);\n // FragmentManager fm = getFragmentManager();\n // fm.beginTransaction().replace(R.id.ly_content, contenFragment).commit();\n drawerLayout.closeDrawer(list_left_drawer);\n }", "@Override\n public boolean onContextItemSelected(MenuItem item) {\n \tToast.makeText(this, item.getTitle(), Toast.LENGTH_LONG).show();\n \treturn true;\n }", "private void selectItem(int position) {\n Fragment fragment = new MenuFragment();\n Bundle args = new Bundle();\n args.putInt(MenuFragment.ARG_MENU_NUMBER, position);\n fragment.setArguments(args);\n\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();\n\n // update selected item and title, then close the drawer\n mDrawerList.setItemChecked(position, true);\n setTitle(mMenuTitles[position]);\n mDrawerLayout.closeDrawer(mDrawerList);\n }", "private void selectItem(int position) {\n mDrawerLeftList.setItemChecked(position, true);\n setTitle(mPlanetTitles[position]);\n mDrawerLayout.closeDrawer(mDrawerLeftList);\n }", "@Override\n public void onListItemClick(ListView l, View v, int position, long id) {\n \tsuper.onListItemClick(l, v, position, id);\n \tLog.i(TAG, \"Position: \" + position);\n \t/*String item = (String) getListAdapter().getItem(position);\n \tnew AlertDialog.Builder(this)\n \t .setTitle(\"Test\")\n \t .setMessage(item)\n \t .setPositiveButton(\"OK\",\n \t new DialogInterface.OnClickListener() {\n \t public void onClick(DialogInterface dialog, int which) {}}\n \t )\n \t .show();\n \t\n Toast.makeText(this, item + \" selected\", Toast.LENGTH_LONG).show();*/\n }", "private void itemSelected(int position) {\n\t\tmessageToPasteFromTheListView=arrayAdapter.getItem(position).getMessage();\n\t\tgetActivity().showDialog(((MainActivity)getActivity()).dialogID);\n\t}", "private void selectItem(int position) {\n if (position == 0) // search\n showSearchFragment(true);\n if (position == 1) // Заточка\n ;//showSearchFragment(true);\n if (position == 2) // Вещи ☆\n showStarItemDetails(1);\n if (position == 3) // Вещи ☆☆\n showStarItemDetails(2);\n if (position == 4) // Вещи ☆☆☆\n showStarItemDetails(3);\n if (position == 5) // pwcats.info\n intentPwcatsInfo();\n\n\n// mDrawerLeftLayout.setItemChecked(position, true);\n mDrawerLayout.closeDrawer(mDrawerLeftLayout);\n }", "private void selectItem(int position) \n {\n \tFragment fragment = null;\n Bundle args = new Bundle();\n switch(position){\n \n case 0:\n \tDrawerTest.this.getActionBar().hide();\n \tfragment = new StaticViewer();\n args.putInt(\"static_viewer\", position);\n break;\n case 1:\n \tDrawerTest.this.getActionBar().hide();\n \tfragment = new DoctorPanel();\n args.putInt(\"doctor_panel\", position);\n break;\n case 2:\n \tDrawerTest.this.getActionBar().hide();\n \tfragment = new Panel();\n \targs.putInt(\"panel\", position);\n \tbreak;\n case 3:\n \tfragment = new Help();\n \targs.putInt(\"help\", position);\n case 4:\n \tfragment = new About();\n \targs.putInt(\"about\", position);\n default:\n \tDrawerTest.this.getActionBar().show();\n \tbreak;\n }\n //args.putInt(PlanetFragment.ARG_PLANET_NUMBER, position);\n fragment.setArguments(args);\n\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();\n\n // update selected item and title, then close the drawer\n mDrawerList.setItemChecked(position, true);\n setTitle(mPlanetTitles[position]);\n mDrawerLayout.closeDrawer(mDrawerList);\n }", "@Override\n\tprotected void onListItemClick(ListView l, View v, int position, long id) {\n\t\tString selection = l.getItemAtPosition(position).toString();\n\t\tToast.makeText(this, selection, Toast.LENGTH_LONG).show();\n\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n sqLiteHelper.DeleteItemDetails(String.valueOf(itemDetails.get(getAdapterPosition()).getID()));\n itemDetails.remove(getAdapterPosition());\n if (itemDetails.isEmpty()) {\n DisplayMenuItemsFragment displayMenuItemsFragment = new DisplayMenuItemsFragment();\n //do something to change the text of DefineMenuItem textview\n }\n notifyDataSetChanged();\n\n\n\n }", "@Override\n public void onItemClick(View view, int position) {\n try {\n\n getItemInfo(view, position);\n\n } catch (Exception e) {\n\n }\n// String details=menuItems.get(position).getF1();\n// if(details!= null)\n// updateItemsDetails(details,view,position);\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n selectedMenuItemAtPosition(position);\n\n //Close the drawer.\n mDrawerLayout.closeDrawer(mDrawerList);\n }", "private void selectItem(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();\n //mDrawerList.setItemChecked(position, true);\n //setTitle(mActionTitles[position]);\n //mDrawerLayout.closeDrawer(mDrawerList);\n }", "@Override\n public boolean onContextItemSelected(MenuItem item) {\n switch (item.getItemId()){\n\n case R.id.item_1:\n Toast.makeText(this, \"Item 1 Clicked\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.item_2:\n Toast.makeText(this, \"Item 2 clicked\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.item_3:\n Toast.makeText(this, \"Item 3 clicked\", Toast.LENGTH_SHORT).show();\n }\n return true;\n }", "private void selectItemFromDrawer(int position) {\n Fragment fragment = new PreferencesFragment();\n\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.mainContent, fragment)\n .commit();\n\n mDrawerList.setItemChecked(position, true);\n setTitle(mNavItems.get(position).mTitle);\n\n // Close the drawer\n mDrawerLayout.closeDrawer(mDrawerPane);\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\tString text=listview.getItemAtPosition(position)+\"\";\n\t\tToast tipsToast=Toast.makeText(this, \"position+\"+position+\"text=\"+text, Toast.LENGTH_SHORT);\n\t\ttipsToast.show();\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(Cardio.this,cardios.get(position).getTitle(), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Toast.makeText(getActivity(), \"You Clicked \"+position+\" item. Wait For Coming Functions\",\n Toast.LENGTH_LONG).show();\n }", "private void drawerListViewListener() {\n // Handle click\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n currentPos = position;\n if (position == 0) {\n isMainShown = true;\n setTitle(\"\");\n } else {\n isMainShown = false;\n //setTitle(itemList.get(position).getTitle());\n }\n drawerLayout.closeDrawer(listView);\n // Set item to selected\n listView.setItemChecked(position, true);\n\n // Delay to avoid lag between navigation drawer items\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.rLayoutMain,\n fragmentList.get(currentPos)).commit();\n }\n }, 270);\n }\n });\n }", "@Override\n public void onItemClick(AdapterView arg0, View arg1, int arg2,\n long arg3) {\n ListView listView = (ListView) arg0;\n getAlertDialog(\"Word\",listView.getItemAtPosition(arg2).toString()).show();\n\n }", "@Override\n public boolean onContextItemSelected(MenuItem item) {\n if(item.getTitle()==\"Usuń wpis\") {\n AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();\n assert info != null;\n int index = info.position;\n bazaDanych.usunWydatki(lista.get(index));\n lista.remove(index);\n adapter.notifyDataSetChanged();\n }\n else if(item.getTitle()==\"Edytuj wpis\"){\n AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();\n assert info != null;\n int index = info.position;\n Toast.makeText(this, String.valueOf(index), Toast.LENGTH_SHORT).show();\n }\n else {return false;}\n return true;\n }", "@Override\n public void onItemClick(AdapterView<?> parent,\n View view, int position, long id) {\n Intent i = new Intent(MainActivity.this, FragmentEditDialog.class);\n\n String itemText = items.get(position).taskName;\n\n i.putExtra(\"editPos\", position);\n i.putExtra(\"editItem\", itemText);\n\n startActivityForResult(i, REQUEST_CODE); // brings up the edit\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Selected Text Is...\"+names[arg2]+\":\"+phones[arg2], 5000).show();\n\t\t\t}", "@Override\n public boolean onContextItemSelected(MenuItem item) {\n\n try {\n title = ((MyRecyclerViewAdapter) mRecyclerView.getAdapter()).getTitle();\n notes = ((MyRecyclerViewAdapter) mRecyclerView.getAdapter()).getNotes();\n position = ((MyRecyclerViewAdapter) mRecyclerView.getAdapter()).getPosition();\n Log.i(TAG, \"title: \" + title);\n Log.i(TAG, \"note: \" + notes);\n Log.i(TAG, \"position: \" + position);\n } catch (Exception e) {\n Log.d(TAG, e.getLocalizedMessage());\n return super.onContextItemSelected(item);\n }\n if (item.getTitle() == \"Edit\") {\n editItem(title, notes);\n } else if (item.getTitle() == \"Delete\") {\n removeItem(title, position);\n } else if (item.getTitle() == \"Share via\") {\n shareItem(title, notes);\n } else if (item.getTitle() == \"Share via Facebook\") {\n shareItemFacebook(title, notes);\n } else {\n item.collapseActionView();\n }\n return super.onContextItemSelected(item);\n }", "public void selectItem(int position) {\n Log.d(\"Debug-\", \"Click on item\" + position);\n Intent intent = new Intent(DisplayActivity.this, DisplayActivity.class);\n intent.putExtra(\"airportCode\", position);\n mDrawerList.setItemChecked(position, true);\n mDrawerList.setSelection(position);\n //setTitle(mNavigationDrawerItemIDs[position]);\n mDrawerLayout.closeDrawer(drawerContainer);\n //To prevent endless previous activities of display and instead return directly to homeActivity\n finish();\n startActivity(intent);\n }", "private void selectItem(int position)\n {\n Fragment fragment = null;\n Bundle args = new Bundle();\n\n switch (position)\n {\n case 0:\n fragment = new server_settings_Fragment();\n break;\n case 1:\n fragment = new client_settings_Fragment();\n args.putStringArray(\"netInfo\", getNetworkInformation(this));\n fragment.setArguments(args);\n break;\n }\n // update the main content by replacing fragments\n args.putInt(MENU_ITEM, position);\n fragment.setArguments(args);\n\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.container, fragment).commit();\n\n // update selected item and title, then close the drawer\n mDrawerList.setItemChecked(position, true);\n setTitle(mSettingTitles[position]);\n mDrawerLayout.closeDrawer(mDrawerList);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n ((TextView) levelDialog.findViewById(R.id.evaluation_title)).setText(st_place[position][0]);\n current_position = position;\n levelDialog.show();\n }", "@Override\n\t\tpublic void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\t\t\tListView listView = (ListView) parent;\n\t\t\tString item = (String) listView.getSelectedItem();\n//\t\t\tToast.makeText(SearchGroupActivity.this, \"onItemSelected = \" + item, Toast.LENGTH_LONG).show();\n\t\t}", "@Override\n public void onClick(View v) {\n \tSystem.out.println(\"ss1ss\");\n //Toast.makeText(ListViewActivity.this, title[mPosition], Toast.LENGTH_SHORT).show();\n }", "@Override public void onItemClick(View view, int position) {\n final Dialog dialog = new Dialog(Informal.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_informal);\n Button btn = (Button) dialog.findViewById(R.id.dialog_btn);\n TextView mTextView = (TextView)dialog.findViewById(R.id.dialog_event_name);\n TextView description = (TextView)dialog.findViewById(R.id.dialog_description_text);\n mTextView.setText(Constants.mEvents_Informal[position]);\n description.setText(getString(Constants.mEvents_Informal_description[position]));\n dialog.show();\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n }", "@Override\n public void onItemClick(AdapterView<?> a, View v, int position, long id) {\n Toast.makeText(getApplicationContext(), \"Selected :\" + \" \" + listData.get(position), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(context, \"You Clicked \" + titles.get(position), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n int itemPosition = position;\n\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n\n // Show Alert\n Toast.makeText(getApplicationContext(),\n \"Position :\" + itemPosition + \" ListItem : \" + itemValue, Toast.LENGTH_LONG)\n .show();\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String SlectedCountry = countryNameThree[+position];\n Toast.makeText(getApplicationContext(), SlectedCountry, Toast.LENGTH_SHORT).show();\n\n }", "@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n\t\tToast.makeText(this, \"Selected=\"+data[position], Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onClick(View v) {\n lastSelectedSpotIndex=position;\n Toast.makeText(context, \"You Clicked \"+categoryNames[position], Toast.LENGTH_LONG).show();\n }", "private void selectMainItem(int position) {\n\t\tBundle args = new Bundle();\n\t\tFragment fragment = null;\n\t\tswitch (position) {\n\t\tcase 0:\n\t\t\tfragment = new UserFragment();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (mCoursesTitles.length <= 1) {\n\t\t\t\tToast.makeText(this, \"获取课程列表发生错误!\\n请检查连接或联系管理员\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tmDrawerList.setAdapter(new ItemsAdapter(this, 0, mCoursesTitles));\n\t\t\tmDrawerList\n\t\t\t\t\t.setOnItemClickListener(new DrawerCoursesItemClickListener());\n\t\t\treturn;\n\t\tcase 2:\n\t\t\tfragment = new ContactUsFragment();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tfragment = new AboutFragment();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t\tfragment.setArguments(args);\n\t\tFragmentManager fragmentManager = getFragmentManager();\n\t\tfragmentManager.beginTransaction()\n\t\t\t\t.replace(R.id.content_frame, fragment).commit();\n\n\t\t// update selected item and title, then close the drawer\n\t\tsetTitle(mTitles[position]);\n\t\tmDrawerLayout.closeDrawer(mDrawerList);\n\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String SlectedCountry = countryName[+position];\n Toast.makeText(getApplicationContext(), SlectedCountry, Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n int itemPosition = position;\n\n // ListView Clicked item value\n String itemValue = (String) listView.getItemAtPosition(position);\n\n // Show Alert\n Toast.makeText(getApplicationContext(), \"Position :\" + itemPosition + \" ListItem : \" + itemValue , Toast.LENGTH_LONG).show();\n }", "@Override\n public void onItemClick(View view, int position) {\n Toast.makeText(getContext(), \"You clicked \" + adapter.getItem(position) + \" on row number \" + position, Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n int itemPosition = position;\r\n\r\n // ListView Clicked item value\r\n String itemValue = (String) listView.getItemAtPosition(position);\r\n\r\n // Show Alert\r\n Toast.makeText(getApplicationContext(),\r\n \"Position :\"+itemPosition+\" ListItem : \" +itemValue , Toast.LENGTH_LONG)\r\n .show();\r\n\r\n }", "@Override\n\tprotected void onListItemClick(ListView l, View v, int position, long id) {\n\t\tToast.makeText(this, String.format(\"Clicked on item #%d with text %s\",\n\t\t\tposition, mAdapter.getItem(position)), Toast.LENGTH_SHORT).show();\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n TextView channelTitle = (TextView) view.findViewById(R.id.channel_name);\n Toast.makeText(getActivity(), getString(R.string.click_on_channel_message)\n + \" \" + channelTitle.getText() + \"! :-)\", Toast.LENGTH_LONG).show();\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n int itemPosition = position;\r\n\r\n // ListView Clicked item value\r\n String itemValue = (String) listView.getItemAtPosition(position);\r\n\r\n // Show Alert\r\n Toast.makeText(getApplicationContext(),\r\n \"Position :\"+itemPosition+\" ListItem : \" +itemValue , Toast.LENGTH_LONG)\r\n .show();\r\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n itemname = parent.getItemAtPosition(position).toString();\n }", "@Override\n\tpublic boolean onContextItemSelected(MenuItem item) {\n\t\t\n\t\tif(item.getTitle()==\"Ahmedabad\")\n\t\t{\n\t\t\tToast.makeText(MainActivity.this, \"Ahmedabad\", Toast.LENGTH_SHORT)\n\t\t\t.show();\n\t\t\t\n\t\t}\n\t\t\n\t\tif(item.getTitle()==\"Baroda\")\n\t\t{\n\t\t\tToast.makeText(MainActivity.this, \"Baroda\", Toast.LENGTH_SHORT)\n\t\t\t.show();\n\t\t\t\n\t\t}\n\t\t\n\t\tif(item.getTitle()==\"Rajkot\")\n\t\t{\n\t\t\tToast.makeText(MainActivity.this, \"Rajkot\", Toast.LENGTH_SHORT)\n\t\t\t.show();\n\t\t\t\n\t\t}\n\t\tif(item.getTitle()==\"Bhavnagar\")\n\t\t{\n\t\t\tToast.makeText(MainActivity.this, \"Bhavnagar\", Toast.LENGTH_SHORT)\n\t\t\t.show();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn super.onContextItemSelected(item);\n\t}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n String selectedItems = \"\";\n for(Integer i : mSelectedItems){\n selectedItems += items[i] + \",\";\n Log.d(\"selectedIndex = \",items[i].toString());\n }\n\n recipeText.setText(selectedItems);\n //showToast(\"Selected index: \" + selectedIndex);\n\n }", "@Override\n public void onClick(DialogInterface dialog, int position) {\n tv.setText(String.valueOf(items[position]));\n\n String tag = tv.getTag().toString();\n\n switch (tag) {\n\n case \"district\":\n districtStr = String.valueOf(items[position]);\n break;\n\n case \"village\":\n villageStr = String.valueOf(items[position]);\n break;\n\n case \"ward\":\n wardStr = String.valueOf(items[position]);\n break;\n\n case \"category\":\n categoryStr = String.valueOf(items[position]);\n break;\n\n }\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n if (isChecked) {\n Toast.makeText(MainActivity.this, item[which], Toast.LENGTH_SHORT).show();\n }\n }", "private void selectItem(int position) {\n if (position == 0) {\n //joj\n Toast.makeText(this, \" clicked on planner \", Toast.LENGTH_SHORT).show();\n //Call the method, actions to take place when clicked on planner\n }\n //add code if clicked on Recipes\n else if (position == 1) {\n Toast.makeText(this, \"clicked on recipes\", Toast.LENGTH_SHORT).show();\n //Call the method, actions to take place when clicked on recipes\n Intent intent = new Intent(FrontPage.this, Recipepage.class);\n startActivity(intent);\n\n } else if (position == 2) {\n\n Toast.makeText(this, \"clicked on Grocery\", Toast.LENGTH_SHORT).show();\n //Call the method, actions to take place when clicked on grocery\n } else if (position == 3)\n\n {\n Toast.makeText(this, \"clicked on groups\", Toast.LENGTH_SHORT).show();\n\n }\n\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n mPostion = i;\n Cursor cursor = mForecastAdapter.getCursor();\n if (cursor != null && cursor.moveToPosition(i)) {\n String dateString = cursor.getString(COL_WEATHER_DATE);\n ((Callback) getActivity()).onItemSelected(dateString);\n\n\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n\n }", "public void onItemSelected(AdapterView<?> parent, View view, int position, long id) \r\n\t{\n\t\tString food = parent.getItemAtPosition(position).toString();\r\n\t\t\r\n // Showing selected spinner item\r\n Toast.makeText(parent.getContext(), \"You selected: \" + food,\r\n Toast.LENGTH_LONG).show();\r\n\t\t\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long l) {\n Object object = mList.getItemAtPosition(position);\n String element = \"\";\n // check if list item object is really a hash map\n if (object instanceof StringStringHashMap) {\n // extract the title from the hash map\n element = ((StringStringHashMap) object).get(ITEM_TITLE);\n }\n // show selected item\n Toast.makeText(PDEListPlainIconMultiLineActivity.this, \"Selected : \" + element,\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n\n //System.out.println(position);\n }", "private void selectItem(int i) {\n Fragment fragment = null;\n switch(i)\n {\n case 0:\n fragment = new Panic();\n break;\n case 1:\n fragment = new Helpline();\n break;\n case 2:\n fragment = new TrustedContacts();\n break;\n\n }\n FragmentManager fm = getFragmentManager();\n //TODO: try this with add\n if(fragment!=null)\n fm.beginTransaction().replace(R.id.content_frame,fragment).commit();\n\n drawerLayout.closeDrawer(mListView);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {\n AlertDialog.Builder alert = new AlertDialog.Builder(StressReportsActivity.this);\n alert.setMessage(\"Confirm delete?\");\n alert.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n userDb.deleteStressSession(stressList.get(position-1));\n //Toast to let user know meal was deleted\n Context context = StressReportsActivity.this;\n CharSequence text = \"Session deleted\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n //refresh list\n displayStressList(getCurrentFocus());\n }\n });\n alert.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int whichButton) {}\n });\n alert.show();\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n if (dialog.isShowing()) {\n\n dialog.dismiss();\n }\n res_gender.setText(str_gender[position]);\n res_gender.setTextColor(Color.parseColor(\"#000000\"));\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n searchTxtView.setText(adapter.getItem(position));\n\n // Dismiss dialog\n dialog.dismiss();\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(this, \"ITEM CLICKED\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public boolean onContextItemSelected(MenuItem item) {\n AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) item.getMenuInfo();\n try {\n // condition for edit\n if (item.getItemId() == R.id.edit) {\n Toast.makeText(this, \"Edit \" + name[info.position], Toast.LENGTH_SHORT).show(); // show toast when context item selected\n }\n // condition for call\n else if (item.getItemId() == R.id.call) {\n Toast.makeText(this, \"Call to \" + name[info.position], Toast.LENGTH_SHORT).show(); // show toast when context item selected\n }\n // condition for sms\n else if (item.getItemId() == R.id.sms) {\n Toast.makeText(this, \"SMS to \" + name[info.position], Toast.LENGTH_SHORT).show(); // show toast when context item selected\n }\n return true;\n } catch (Exception e) {//if false catch exception\n return true;\n }\n\n }", "@Override\n\t public void onItemClick(AdapterView<?> listView, View view, int position, long id) {\n\t // Get the cursor, positioned to the corresponding row in the result set\n\t Cursor cursor = (Cursor) listView.getItemAtPosition(position);\n\t \n\t // Get the Item Number from this row in the database.\n\t String itemNumber = cursor.getString(cursor.getColumnIndexOrThrow(ItemsDbAdapter.COL_DEFINITION));\n\t \n\t // Update the parent class's TextView\n//\t itemView.setText(itemNumber);\n\t t.setText(itemNumber);\n\t Log.w(\"Quantity:\", String.valueOf(itemNumber));\n\t autoCompleteView.setText(cursor.getString(cursor.getColumnIndexOrThrow(ItemsDbAdapter.COL_WORD)));\n\t }", "void deleteItem(int positionSelected) {\n \t//Pass position to Final var -1 to account for 0 based\n \tfinal int deleteItemPosition = positionSelected - 1;\n \t//Create dialog to confirm delete\n \tAlertDialog.Builder deleteDialog = new AlertDialog.Builder(MainActivity.this);\n \tdeleteDialog.setTitle(\"Delete Item?\");\n \tdeleteDialog.setMessage(\"Are you sure you want to delete this item?\");\n \tdeleteDialog.setPositiveButton(\"YES\", new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t//Query parse for item\n\t\t\t\tParseQuery<ParseObject> deleteQuery = ParseQuery.getQuery(\"newItem\");\n\t\t\t\t//Remove item from listview\n\t\t\t\tdeleteQuery.findInBackground(new FindCallback<ParseObject>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void done(List<ParseObject> itemsList, ParseException e) {\n\t\t\t\t\t\tif (e == null) {\n\t\t\t\t\t\t\t//Delete item from parse\n\t\t\t\t\t\t\titemsList.get(deleteItemPosition).deleteInBackground(new DeleteCallback() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void done(ParseException arg0) {\n\t\t\t\t\t\t\t\t\tif (arg0 == null) {\n\t\t\t\t\t\t\t\t\t\tToast.makeText(getBaseContext(),\"Item Successfully Deleted!\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\t\t\t//Clear item arraylist and repop listview\n\t\t\t\t\t\t\t\t\t\tparseArrayList.clear();\n\t\t\t\t\t\t\t\t\t\tqueryParseForItems();\n\t\t\t\t\t\t\t\t\t\tlistAdapter.notifyDataSetChanged();\n\t\t\t\t\t\t\t\t\t\t//itemListView.setEnabled(true);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tToast.makeText(getBaseContext(),\"An error occured, please try again.\", Toast.LENGTH_LONG).show();\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}); //deleteInBackground close\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}); //findInBackground close\n\t\t\t}\n\t\t});\n \tdeleteDialog.setNegativeButton(\"NO\", new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tLog.i(TAG, \"Delete Canceled\");\n\t\t\t}\n\t\t}); \n \t\n \tdeleteDialog.show();\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tToast.makeText(getApplicationContext(), \"Selected Text Is...\"+names[arg2]+\":\"+phones[arg2], 5000).show();\n\t\t\t}", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n int position, long arg3) {\n Toast.makeText(getApplicationContext(), strs[location][position], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(Resume_create_employee.this);\n builder.setTitle(\"Select\");\n ListView list = new ListView(Resume_create_employee.this);\n\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(Resume_create_employee.this, R.layout.shortlistitem,\n R.id.textView1, str_exp);\n\n list.setAdapter(adapter);\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n // TODO Auto-generated method stub\n if (dialog.isShowing()) {\n\n dialog.dismiss();\n\n\n }\n res_exp.setText(str_exp[position]+ \" years\");\n res_exp.setTextColor(Color.parseColor(\"#000000\"));\n }\n });\n builder.setView(list);\n dialog = builder.create();\n dialog.show();\n }", "private void selectItem(int position) {\n // Create a new fragment and specify the planet to show based on position\n Fragment fragment = PullToRefreshFragment.newInstance();\n\n // Insert the fragment by replacing any existing fragment\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.content_frame, fragment).commit();\n setTitle(mPlanetTitles[position]);\n mDrawerLayout.closeDrawer(mDrawerList);\n }", "public void onClick(DialogInterface dialog, int item) {\n Log.i(\"DIALOG\", \"Escolha: \" + items[item]);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n this.obSession = sessionList.get(position); //get the session from the listview position in the array\n // Toast.makeText(this, \"Workout Selected\", Toast.LENGTH_SHORT).show(); //inform the user that the workout has been clicked\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setCancelable(true);\n builder.setTitle(\"Workout Selected\");\n builder.setMessage(\"Would you like to delete this workout?\");\n builder.setPositiveButton(\"Delete\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n confirmDelete();\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }", "public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\t\t\tTextView myTextView =(TextView)findViewById(R.id.textview_help);\r\n\t\t\t\r\n\t\t\tswitch (position){\r\n\t\t\tcase 0:\r\n\t\t\t\tmyTextView.setText(startseite);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tmyTextView.setText(neuesSpiel);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tmyTextView.setText(spielBeitreten);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tmyTextView.setText(spielVerlassen);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tmyTextView.setText(spielAnleitung);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\tmyTextView.setText(spielRegeln);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tmyTextView.setText(powerUps);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tmyTextView.setText(startseite);\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n String SlectedCountry = countryNameTwo[+position];\n Toast.makeText(getApplicationContext(), SlectedCountry, Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n String AlertTxt = \"\\\"\" + productList.get(position).getTitle() + \"\\\"\\n\" + getResources().getString(R.string.freeques);\n\n FreeShopDialog alert = new FreeShopDialog.Builder()\n .setMessage(AlertTxt)\n .setImage(productList.get(position).getImageId())\n .setYesButton(R.string.yes)\n .setNoButton(R.string.no)\n .setLayout(R.layout.shop_box)\n .setPosition(position)\n .build();\n alert.setActivity(activity);\n alert.show(getFragmentManager(), \"FREESHIT\");\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n diagTreat.setVisibility(View.VISIBLE);\n diagnosis.setVisibility(View.GONE);\n treatment.setVisibility(View.GONE);\n diag_edit.setVisibility(View.GONE);\n treat_edit.setVisibility(View.GONE);\n\n ItemIndex = Integer.toString(position);\n switch (ItemIndex) {\n case \"0\":\n diagTreat.setText(severe_pneumonia);\n break;\n case \"1\":\n diagTreat.setText(many_day_disease);\n break;\n case \"2\":\n diagTreat.setText(pneumonia);\n break;\n case \"3\":\n diagTreat.setText(wheezing);\n break;\n case \"4\":\n diagTreat.setText(fever);\n break;\n case \"5\":\n diagTreat.setText(dehydration);\n break;\n case \"6\":\n diagTreat.setText(cold_cough);\n break;\n case \"7\":\n diagTreat.setText(\"\");\n diagTreat.setVisibility(View.GONE);\n diagnosis.setVisibility(View.VISIBLE);\n treatment.setVisibility(View.VISIBLE);\n diag_edit.setVisibility(View.VISIBLE);\n treat_edit.setVisibility(View.VISIBLE);\n break;\n }\n }", "private void giveFeedbackonitemClick() {\n ListView list = (ListView)findViewById(R.id.listView_data);\n //setting onclick listener to listen if any row is clicked\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {\n TextView tv = (TextView) view;\n String message = \"You clicked \"+ position + \"which is \" + tv.getText().toString();\n Toast.makeText(MainActivity.this,message, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id)\n {\n \t Toast.makeText(getApplicationContext(),\n \t\t\t ((TextView) view).getText(), Toast.LENGTH_SHORT).show();\n \t Intent intent = new Intent(getApplicationContext(), RoomActivity.class);\n \t Bundle b = new Bundle();\n \t b.putString(\"title\", ((TextView) view).getText().toString());\n \t intent.putExtras(b);\n \t view.getContext().startActivity(intent);\n }", "public void onPopupMenuItemSelected(String title, final int index){\n if(title == \"Open\"){\n \tnew ConnectToWallet(index, getApplicationContext()).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); \n }\n else if(title == \"Delete\"){\n \tdataClass data = (dataClass)lv1.getItemAtPosition(index);\n \ttry {\n\t\t\t\tmarkPendingRequestAsSeen(data.getReqID());\n\t\t\t\tadapter.removePendigRequestAt(index);\n\t\t\t} catch (JSONException e) { e.printStackTrace(); }\n \t\n }\n }", "@Override\r\n public void onItemClick(AdapterView<?> parent, View view,\r\n int position, long id) {\n String Slecteditem = itemname[+position];\r\n Toast.makeText(getApplicationContext(), Slecteditem, Toast.LENGTH_SHORT).show();\r\n startActivity(new Intent(unlogin.this, product.class));\r\n }", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\tfood.setText(null);\n\t\t\t\tautotext_fill();\n\t\t\t\t\n\t\t\t}", "@Override\n public boolean onContextItemSelected (MenuItem item){\n AdapterView.AdapterContextMenuInfo menuinfo = (AdapterView.AdapterContextMenuInfo)item.getMenuInfo();\n long selectid = menuinfo.id; //_id from database in this case\n int selectpos = menuinfo.position; //position in the adapter\n switch (item.getItemId()) {\n case 1: {\n Intent i = new Intent(MainActivity.this,EditActivity.class);\n int id = taskArrayList.get(selectpos).getId();\n String name = taskArrayList.get(selectpos).getName();\n String content = taskArrayList.get(selectpos).getDescription();\n Task target = new Task(id,name,content);\n i.putExtra(\"data\", target);\n startActivityForResult(i,8);\n }\n break;\n case 2: {\n DBHelper dbh = new DBHelper(MainActivity.this);\n dbh.deleteTask(selectid);\n taskArrayList.remove(selectpos);\n dbh.close();\n aa.notifyDataSetChanged();\n }\n break;\n }\n\n return super.onContextItemSelected(item);\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n int position, long arg3) {\n Toast.makeText(getApplicationContext(), strs[location][position], Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onListItemClicked(int position) {\n\n }", "@Override\n public boolean onContextItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n\n case R.id.context_menu_edit:\n Toast.makeText(this,\"Edit\" ,Toast.LENGTH_SHORT ).show();\n return true;\n\n case R.id.context_menu_share:\n Toast.makeText(this,\"Share\" ,Toast.LENGTH_SHORT ).show();\n return true;\n\n case R.id.context_menu_delete:\n Toast.makeText(this,\"Delete\" ,Toast.LENGTH_SHORT ).show();\n\n }\n\n return super.onContextItemSelected(item);\n }", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position,\n long arg3) {\n final int location=position;\n myAdapter.setSelectedPosition(position);\n myAdapter.notifyDataSetInvalidated();\n subAdapter=new DepartmentSubAdapter(getApplicationContext(), strs, position);\n msubListView.setAdapter(subAdapter);\n msubListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1,\n int position, long arg3) {\n // TODO Auto-generated method stub\n Toast.makeText(getApplicationContext(), strs[location][position], Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void onCreateDialogSingleChoice(List<String> list, final String title, int pos) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n//Source of the data in the DIalog\n String[] array = list.toArray(new String[list.size()]);\n for (int i = 0; i < list.size(); i++) {\n array[i] = list.get(i);\n }\n// Set the dialog title\n builder.setTitle(title)\n\n// Specify the list array, the items to be selected by default (null for none),\n// and the listener through which to receive callbacks when items are selected\n .setSingleChoiceItems(array, pos, (dialog, which) -> {\n// TODO Auto-generated method stub\n\n\n })\n\n// Set the action buttons\n .setPositiveButton(\"Ok\", (dialog, id) -> {\n// User clicked OK, so save the result somewhere\n// or return them to the component that opened the dialog\n\n ListView lw = ((AlertDialog) dialog).getListView();\n Object checkedItem = lw.getAdapter().getItem(lw.getCheckedItemPosition());\n\n if (title.equalsIgnoreCase(\"Title\")) {\n vEdtTxtTitle.setText(checkedItem.toString());\n mSelectPosi = lw.getCheckedItemPosition();\n } else if (title.equalsIgnoreCase(\"Security Question\")) {\n vEdtTxtSecurityQsn.setText(checkedItem.toString());\n mSelectPosiSecurity = lw.getCheckedItemPosition();\n }\n\n Log.d(getLocalClassName(), \" Selected Item \" + checkedItem.toString());\n// ad.dismiss();\n dialog.dismiss();\n\n })\n .setNegativeButton(\"Cancel\", (dialog, id) -> {\n// ad.dismiss();\n dialog.dismiss();\n });\n builder.show();\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n txtVwMostrar.setText(asDatos[i]);\n\n new AlertDialog.Builder(this).setTitle(\"Selección de la lista\").setMessage(asDatos[i]).setIcon(R.drawable.ic_launcher_background)\n //Botones\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(getApplicationContext(),\"Pues OK\", Toast.LENGTH_SHORT).show();\n\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(getApplicationContext(),\"Cancelar :p\", Toast.LENGTH_SHORT).show();\n }\n })\n .setNeutralButton(\"que haces\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(getApplicationContext(),\"neutral\",Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onItemClick(AdapterView<?> parent, final View view,\n int position, long id) {\n Categoria item = (Categoria) parent.getItemAtPosition(position);\n Toast.makeText(getApplicationContext(), \"SELECIONADO \" + item.getDescricao(), Toast.LENGTH_LONG).show();\n }", "public void onItemClick(int position) {\n showDialog(position);\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tint itemPosition = position;\n\n\t\t\t\t// ListView Clicked item value\n\t\t\t\tString itemValue = (String) listView\n\t\t\t\t\t\t.getItemAtPosition(position);\n\t\t\t\t\n\t\t\t\ttestando(itemValue);\n\n\t\t\t\t// Show Alert\n\t\t\t\t/*Toast.makeText(\n\t\t\t\t\t\tgetApplicationContext(),\n\t\t\t\t\t\t\"Position :\" + itemPosition + \" ListItem : \"\n\t\t\t\t\t\t\t\t+ itemValue, Toast.LENGTH_LONG).show();*/\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t}", "public void onItemClick(View view, int position);", "public void onItemClick(View view, int position) {\n\n }", "@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\tToast.makeText(getBaseContext(), list.get(arg2),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t}", "@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n expertise_selected = adapterView.getItemAtPosition(i).toString();\n }", "public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n AlertDialog.Builder builder = new AlertDialog.Builder(parent.getContext());\n\n String productName= MainActivity.datastores.get(itemPos).productList.get(position).getName();\n int salePrice= MainActivity.datastores.get(itemPos).productList.get(position).getSale_price();\n\n // 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(String.format(getResources().getString(R.string.dialog_message), productName, salePrice))\n .setTitle(R.string.dialog_title)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });;\n\n // 3. Get the AlertDialog from create()\n AlertDialog dialog = builder.create();\n dialog.show();\n\n Toast.makeText(getBaseContext(),Integer.toString(position), Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n item = parent.getItemAtPosition(position).toString();\n\n // Showing selected spinner item\n //Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n /*Intent people_intent= new Intent();\n people_intent.putExtra(\"people\",item);\n setResult(RESULT_OK,people_intent);\n finish();*/\n }", "@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\r\n\t\t\t\tMLvData data = (MLvData) mDrawerList.getItemAtPosition(position);\r\n\t\t\t\tswitch (position) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\ttoolbar.setTitle(\"账户\");\r\n\t\t\t\t\tswitchContent(accountFragment);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\ttoolbar.setTitle(\"聊天\");\r\n\t\t\t\t\tswitchContent(contactsFragment);\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\ttoolbar.setTitle(\"WiFi\");\r\n\t\t\t\t\tswitchContent(wifilistFragment);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\ttoolbar.setTitle(\"局域网\");\r\n\t\t\t\t\tswitchContent(netFragment);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:// 阅读\r\n\t\t\t\t\ttoolbar.setTitle(\"书架\");\r\n\t\t\t\t\tswitchContent(deskFragment);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tshoutoash(data.getName() + \"被点击\");\r\n\t\t\t\tmDrawerLayout.closeDrawers();\r\n\t\t\t}" ]
[ "0.7702986", "0.7696829", "0.7217816", "0.7206059", "0.7126521", "0.7112698", "0.71075517", "0.7093791", "0.7082592", "0.7049467", "0.7015288", "0.6996164", "0.6995017", "0.69846773", "0.69771695", "0.6937161", "0.6913344", "0.6909748", "0.6892276", "0.68855685", "0.68732226", "0.6870232", "0.6823187", "0.6821978", "0.6817305", "0.68023276", "0.68004227", "0.679129", "0.67891806", "0.67877847", "0.67865235", "0.6764142", "0.67635936", "0.6756468", "0.67415994", "0.670352", "0.669214", "0.6675059", "0.6673063", "0.6659234", "0.66496146", "0.6647261", "0.6613088", "0.66073394", "0.66059226", "0.660279", "0.66013634", "0.6599794", "0.6599355", "0.65844434", "0.6580166", "0.65740776", "0.6567097", "0.6565042", "0.6561137", "0.6552942", "0.655283", "0.6551839", "0.6543788", "0.65313965", "0.6530082", "0.65261126", "0.6520092", "0.6512771", "0.6510047", "0.64967334", "0.64963126", "0.6486282", "0.64831746", "0.6482081", "0.64779776", "0.6474771", "0.6472469", "0.64656466", "0.6463599", "0.64598185", "0.6456637", "0.64542615", "0.6451004", "0.64494747", "0.64485145", "0.64364564", "0.6430656", "0.64276046", "0.6426414", "0.6414577", "0.6410181", "0.64066994", "0.6405466", "0.63991594", "0.63974494", "0.6395233", "0.63945645", "0.63837343", "0.63775784", "0.637741", "0.6376186", "0.6370482", "0.6362222", "0.6354113" ]
0.7378159
2
MediaAttachmentDialogFragment dialog = new MediaAttachmentDialogFragment();
public void showAttachmentPickerDialog(View v) { MediaAttachmentDialogFragment dialog = MediaAttachmentDialogFragment.newInstance(media_listener); dialog.show(getSupportFragmentManager(), "Attchment Picker"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showAudioFilebrowserDialog() {\n\t\tFragmentTransaction ft = getFragmentManager().beginTransaction();\n\t\tFilebrowserDialogFragment fbdf = new FilebrowserDialogFragment();\n\t\tfbdf.show(ft, \"dialog\");\n\t}", "public void onDialogPositiveClick(DialogFragment dialog);", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Delete?\");\n\n builder.setPositiveButton(\"Okay\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Song currentSong = (Song) SetManager.getInstance().getCurrentSet().getCurrentlyModifying();\n int currentAttachmentPosition = currentSong.getCurrentAttachmentPosition();\n currentSong.getAttachments().remove(currentAttachmentPosition);\n GridView attachmentsGridView = (GridView) getActivity().findViewById(R.id.attachmentsGridView);\n AttachmentsAdapter attachmentsAdapter = (AttachmentsAdapter) attachmentsGridView.getAdapter();\n attachmentsAdapter.notifyDataSetChanged();\n }\n });\n\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n DeleteAttachmentDialog.this.getDialog().cancel();\n }\n });\n\n final AlertDialog deleteAttachmentDialog = builder.show();\n\n int buttonTextColor = ContextCompat.getColor(getActivity(), R.color.colorAccent);\n\n Button positiveButton = deleteAttachmentDialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(buttonTextColor);\n\n Button negativeButton = deleteAttachmentDialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(buttonTextColor);\n deleteAttachmentDialog.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);\n\n DisplayMetrics displayMetrics = new DisplayMetrics();\n getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n int width = displayMetrics.widthPixels;\n int widthDialog = (int) Math.floor(width*0.85);\n\n deleteAttachmentDialog.getWindow().setLayout(widthDialog, WindowManager.LayoutParams.WRAP_CONTENT);\n\n return deleteAttachmentDialog;\n }", "public void openFileChooser(ValueCallback<Uri> uploadMsg) {\n Main3Activity.this.showAttachmentDialog(uploadMsg);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n LayoutInflater inflater = getActivity().getLayoutInflater();\n // Pass null as the parent view because its going in the dialog layout.\n View view = inflater.inflate(R.layout.dialog_image_chooser, null);\n\n View cameraView = view.findViewById(R.id.action_camera);\n View galleryView = view.findViewById(R.id.action_gallery);\n\n cameraView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Send the camera click event back to the host activity.\n mListener.onDialogCameraClick(ImageChooserDialogFragment.this);\n // Dismiss the dialog fragment.\n dismiss();\n }\n });\n\n galleryView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // Send the gallery click event back to the host activity.\n mListener.onDialogGalleryClick(ImageChooserDialogFragment.this);\n // Dismiss the dialog fragment.\n dismiss();\n }\n });\n\n // Create an AlertDialog.Builder and set the layout.\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setView(view);\n\n return builder.create();\n }", "public void openDialog(){\n DialogforTheboysHeroImage dialogforTheboysHeroImage = new DialogforTheboysHeroImage();\n dialogforTheboysHeroImage.show(getSupportFragmentManager(), \"Heros info\");\n }", "private void showDialog(String tag) {\n \t\tFragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n \t\tFragment prev = getSupportFragmentManager().findFragmentByTag(tag);\n \t\tif (prev != null) {\n \t\t\tft.remove(prev);\n \t\t}\n \n \t\tDialogFragment newFragment = null;\n \n \t\t// Create and show the dialog.\n \t\tnewFragment = DownloadScannerDialog.newInstance();\n \n \t\tft.add(0, newFragment, tag);\n \t\tft.commit();\n \t}", "@Override\n public void onClick(View v) {\n View viewVideo = LayoutInflater.from(mContext).inflate(R.layout.dialog_video,null);\n AlertDialog.Builder layoutDialogVideo = new AlertDialog.Builder(mContext);\n\n VideoView vvVideoView = viewVideo.findViewById(R.id.vv_dialogVideo_video);\n vvVideoView.setVideoPath(item.getVideo());\n vvVideoView.seekTo(0);\n vvVideoView.start();\n MediaController mediaController = new MediaController(mContext);\n vvVideoView.setMediaController(mediaController);\n mediaController.setMediaPlayer(vvVideoView);\n\n layoutDialogVideo.setView(viewVideo);\n Dialog dialogVideo = layoutDialogVideo.create();\n\n dialogVideo.show();\n }", "@Override\n public void onClick(View v) {\n DialogFragment fragment = ExpandedImageDialogFragment.newInstance(note);\n fragment.show(mActivity.getFragmentManager(), \"expandedimagefragment\");\n }", "public void showMessageDialog(int id, String caption, String message)\n{\n MessageDialog.newInstance(id, caption, message, this)\n .show(getFragmentManager(), \"\");\n}", "@Override\n\t\t\t\t\t\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tDialogImage dialog = DialogImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.newInstance(place.gallery\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.get(index_id_dialog)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString());\n\t\t\t\t\t\t\t\t\t\t\t\t\tdialog.show(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetFragmentManager(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTools.TAG_DIALOG_IMAGE);\n\t\t\t\t\t\t\t\t\t\t\t\t}", "public DialogFragment() {\n Log.d(TAG,\"Construction\");\n // Required empty public constructor\n }", "@Override\n @NonNull\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.title_video_dialog);\n\n Bundle bundle = getArguments();\n videos_name = bundle.getStringArrayList(\"name\");\n videos_key = bundle.getStringArrayList(\"key\");\n\n\n CharSequence[] cs = videos_name.toArray(new CharSequence[videos_name.size()]);\n\n builder.setItems(cs, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Uri video_uri = UtilityMovieData.buildUriForTheVideo(videos_key.get(which));\n Intent intent = new Intent(Intent.ACTION_VIEW, video_uri);\n startActivity(intent);\n\n }\n });\n\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "void showDialog() {\n DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title);\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "public void showDialog(View v){\n FragmentManager fm = getFragmentManager();\n PaymentMethodDialog paymentDialog = new PaymentMethodDialog();\n paymentDialog.show(fm, \"PaymentDialog\");\n Bundle data = new Bundle();\n// data.putString(\"receiver\", receiver);\n paymentDialog.setArguments(data);\n paymentDialog.setArguments(data);\n }", "public PhotoGalleryFragment() {\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(mContext);\n\n builder.setMessage(R.string.dialog_delete_lesson_part)\n .setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User confirm the dialog\n mListener.onDialogDeletePartPositiveClick(DeletePartDialogFragment.this, lesson_part_id);\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n mListener.onDialogDeletePartNegativeClick(DeletePartDialogFragment.this);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public DialogoPersonalizadoFragment() {\n\n }", "public interface ProcessDocUploadDialogNavigator extends BaseView {\n public void dismissSuccessResult();\n public Context getAttachedcontext();\n public void galleryIntent();\n public void cameraIntent();\n public void openDatePicker();\n}", "private void filepickerDialog(){\n View view = LayoutInflater.from(getContext()).inflate(R.layout.filepicker_dailog, null);\n filePicker = (ImageView) view.findViewById(R.id.file_picker);\n cameraPicker = (ImageView) view.findViewById(R.id.camera_picker);\n final MaterialDialog.Builder builder = new MaterialDialog.Builder(getContext());\n builder.title(\"Upload\");\n builder.negativeText(android.R.string.cancel);\n builder.positiveText(android.R.string.ok);\n builder.onNegative(new MaterialDialog.SingleButtonCallback() {\n @Override\n public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {\n builder.autoDismiss(true);\n }\n });\n builder.customView(view,false);\n builder.show();\n cameraPicker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (cameraIntent.resolveActivity(getContext().getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = Helper.createImageFile();\n // Continue only if the File was successfully created\n if (photoFile != null) {\n cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoFile));\n startActivityForResult(cameraIntent, ReqCodeImage);\n builder.dismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n dialogInterface.dismiss();\n }\n });\n }\n }\n }\n });\n filePicker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Helper.filePicker(ReqCode, NoticeFragment.this);\n builder.dismissListener(new DialogInterface.OnDismissListener() {\n @Override\n public void onDismiss(DialogInterface dialogInterface) {\n dialogInterface.dismiss();\n }\n });\n }\n });\n }", "void showDialog() {\n\t\tDFTimePicker dtf = DFTimePicker.newInstance();\n DialogFragment newFragment = dtf;\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "@Override\n\tpublic Fragment createFragment() {\n\t\treturn new SelectDialogFragment();\n\t}", "public void showNoticeDialog() {\n DialogFragment dialog = new MyDialog();\n dialog.show(getSupportFragmentManager(), \"NoticeDialogFragment\");\n }", "public Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tView dialogView = inflater.inflate(R.layout.posted, null);\r\n\r\n\t\tbuilder.setTitle(\"Posted Message to:\");\r\n\t\tbuilder.setView(dialogView);\r\n\t\tfinal AlertDialog dialog = builder.show();\r\n\t\t//dialog.getWindow().setLayout(520, 525);\r\n\t\t\r\n\t\tTextView message = (TextView) dialog.findViewById(R.id.sites_posted);\r\n\t\tmessage.setText(sites);\r\n\r\n\t\tButton done = (Button) dialog.findViewById(R.id.done);\r\n\t\tdone.setOnClickListener(new OnClickListener(){\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO open social media options\r\n\t\t\t\tdialog.cancel();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\treturn dialog;\r\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }", "public interface OnFragmentInteractionListener {\n\n public void openDialog(MotionEvent event);\n\n public void closeDialog();\n\n}", "public DocumentPickerFragment()\n {\n }", "void showDialog() {\n\t\tDialogFragment newFragment = MyAlertDialogFragment\n\t\t\t\t.newInstance(R.string.not_enoughth_information);\n\t\tnewFragment.show(getFragmentManager(), \"dialog\");\n\t}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(getArguments().getString(\"title\"))\n .setMessage(getArguments().getString(\"message\"))\n .setCancelable(false)\n .setPositiveButton(R.string.OK, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n // call callback method\n // mListener.onInfoDialogOKClick(InfoDialog.this);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"They decliened your invitation\";\n if(getArguments().getBoolean(\"hostDeclined\"))\n {\n mess = \"They canceled their invitation\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public ErrorDialogFragment() {\r\n\t super();\r\n\t mDialog = null;\r\n\t }", "private Fragment getLessonFragment() {\n\t\treturn MediaPlayerFragmentFactory.getMediaPlayerFragment(lesson);\n\t}", "@Override\n public void onFragmentAttached() {\n }", "public interface DialogFragmentClickListener {\n public void onClick(DialogFragment dialogFragment);\n}", "public static Fragment newInstance(String media)\n\t{\n\t\tFragment fragment = new NacRingtoneFragment();\n\t\tBundle bundle = NacBundle.toBundle(media);\n\n\t\tfragment.setArguments(bundle);\n\n\t\treturn fragment;\n\t}", "public ErrorDialogFragment() {\n super();\n mDialog = null;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n //return super.onCreateDialog(savedInstanceState); // TODO: should we call it?\n final String title = getArguments().getString(\"TITLE\");\n final String msg = getArguments().getString(\"MESSAGE\");\n final String pos = getArguments().getString(\"POS\");\n final String neg = getArguments().getString(\"NEG\");\n final String neu = getArguments().getString(\"NEU\");\n // TODO - this is just an int... what about other ... Parcelable\n final int idx = getArguments().getInt(\"IDX\");\n final int iconid = getArguments().getInt(\"ICON_ID\");\n final float textsize = getArguments().getFloat(\"MSGSIZE\");\n\n if (savedInstanceState != null) {\n tag = savedInstanceState.getString(\"TAG\");\n }\n\n final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialogInterface, int clickedButton) {\n ConfirmListener act = (ConfirmListener) getActivity();\n act.processConfirmation(clickedButton, tag, idx);\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(title)\n .setMessage(msg);\n if (iconid != 0 && getResources().getResourceTypeName(iconid).equals(\"drawable\")) {\n // this must be a R.drawable.id, otherwise crash!\n // android.content.res.Resources$NotFoundException:\n builder.setIcon(iconid);\n }\n if (pos != null) {\n builder.setPositiveButton(pos, listener);\n }\n if (neg != null) {\n builder.setNegativeButton(neg, listener);\n }\n if (neu != null) {\n builder.setNeutralButton(neu, listener);\n }\n\n dialog = builder.create();\n if (textsize != 0) {\n dialog.show(); // need to call this to be able to get the TextView as non-null pointer\n TextView tv = (TextView) dialog.findViewById(android.R.id.message);\n if (tv != null) {\n tv.setTextSize(textsize);\n }\n }\n return dialog;\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_main_requisition, container, false);\r\n\r\n saveDrafts=view.findViewById(R.id.tvSaveDrafts);\r\n saveDrafts.setPaintFlags(saveDrafts.getPaintFlags()| Paint.UNDERLINE_TEXT_FLAG);\r\n attachmentIcon = view.findViewById(R.id.ivAttachmentIcon);\r\n attachmentIcon.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n AttachmentFragment attachmentFragment = new AttachmentFragment();\r\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\r\n transaction.replace(R.id.mainlayout, attachmentFragment);\r\n transaction.addToBackStack(null);\r\n transaction.commit();\r\n }\r\n });\r\n return view;\r\n }", "@Override\n public void onClick(View v) {\n FragmentManager manager = getSupportFragmentManager();\n Fragment frag = manager.findFragmentByTag(\"fragment_camera\");\n if (frag != null) {\n manager.beginTransaction().remove(frag).commit();\n }\n CreateGistDialogFragment alertDialogFragment = new CreateGistDialogFragment();\n alertDialogFragment.show(manager, \"fragment_camera\");\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Limite mensal excedido! Na versão gratuita, o limite máximo de publicação de caronas mensais é 4 (quatro), atualize para a versão Pro e tenha publicações ilimitadas...\")\n .setPositiveButton(\"Ir\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String url = \"https://play.google.com/store/apps/details?id=com.xetelas.nova\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getContext().startActivity(i);\n }\n })\n .setNegativeButton(\"Voltar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "public abstract AttachmentPart createAttachmentPart();", "private void createDialog() {\r\n final AlertDialog dialog = new AlertDialog.Builder(getActivity()).setView(R.layout.dialog_recorder_details)\r\n .setTitle(\"Recorder Info\").setPositiveButton(\"Start\", (dialog1, which) -> {\r\n EditText width = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_width);\r\n EditText height = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_resolution_height);\r\n CheckBox audio = (CheckBox) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_audio_checkbox);\r\n EditText fileName = (EditText) ((AlertDialog) dialog1).findViewById(R.id.dialog_recorder_filename_name);\r\n mServiceHandle.start(new RecordingInfo(Integer.parseInt(width.getText().toString()), Integer.parseInt(height.getText().toString()),\r\n audio.isChecked(), fileName.getText().toString()));\r\n dialog1.dismiss();\r\n }).setNegativeButton(\"Cancel\", (dialog1, which) -> {\r\n dialog1.dismiss();\r\n }).show();\r\n Point size = new Point();\r\n getActivity().getWindowManager().getDefaultDisplay().getRealSize(size);\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_width)).setText(Integer.toString(size.x));\r\n ((EditText) dialog.findViewById(R.id.dialog_recorder_resolution_height)).setText(Integer.toString(size.y));\r\n }", "private void showDialog(){\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = this.getLayoutInflater();\n View dialogView= inflater.inflate(R.layout.dialog_after_share, null);\n dialogBuilder.setView(dialogView);\n\n //Show the dialog\n final AlertDialog alert = dialogBuilder.show();\n alert.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n alert.getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);\n alert.setCancelable(false);\n TextView okTV = dialogView.findViewById(R.id.ok1);\n\n okTV.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n alert.hide();\n }\n });\n }", "public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType, String capture) {\n Main3Activity.this.showAttachmentDialog(uploadMsg);\n }", "public void openFileChooser(ValueCallback<Uri> uploadMsg, String acceptType) {\n Main3Activity.this.showAttachmentDialog(uploadMsg);\n }", "@Override\n\t\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\t\treturn mDialog;\n\t\t}", "private void findDialogView() {\n dialog = new BottomSheetDialog(getActivity(), R.style.BottomSharingSheet);\n View dialogView = LayoutInflater.from(getContext()).inflate(R.layout.sharing_bottom_sheet, null);\n dialog.setContentView(dialogView);\n closeNavigation = dialogView.findViewById(R.id.imgClose);\n llFacebook = dialogView.findViewById(R.id.llFacebook);\n llTwitter = dialogView.findViewById(R.id.llemail);\n llInstagram = dialogView.findViewById(R.id.lltalk);\n llStories = dialogView.findViewById(R.id.llGoogle);\n llBand = dialogView.findViewById(R.id.llBand);\n llMore = dialogView.findViewById(R.id.llMore);\n llVideoReport = dialogView.findViewById(R.id.llVideoReport);\n closeNavigation.setOnClickListener(this);\n llFacebook.setOnClickListener(this);\n llTwitter.setOnClickListener(this);\n llInstagram.setOnClickListener(this);\n llStories.setOnClickListener(this);\n llBand.setOnClickListener(this);\n llMore.setOnClickListener(this);\n llVideoReport.setOnClickListener(this);\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setItems(items, new DialogInterface.OnClickListener(){\n @Override\n public void onClick(DialogInterface dialog, int which) {\n mListener.onPinOptionsItemSelected(PinOptionsDialogFragment.this, items[which].toString());\n }\n });\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n filename = getArguments().getString(\"filename\");\n username = getArguments().getString(\"username\");\n workingDIR = getArguments().getString(\"workingDIR\");\n builder.setTitle(R.string.copy_move_file_select_options_title)\n .setItems(R.array.file__move_copy_dialog_options, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n onSelect(which);\n }\n });\n return builder.create();\n }", "public ErrorDialogFragment() {\n\t\t\tsuper();\n\t\t\tmDialog = null;\n\t\t}", "public ErrorDialogFragment() {\n\t\t\tsuper();\n\t\t\tmDialog = null;\n\t\t}", "protected void alertBuilder(){\n SettingsDialogFragment settingsDialogFragment = new SettingsDialogFragment();\n settingsDialogFragment.show(getSupportFragmentManager(), \"Settings\");\n }", "public GalleryActivityFragment() { //Constructor which has no function, but is required\n }", "public abstract Dialog createDialog(DialogDescriptor descriptor);", "private void loadDialog(String message){\n\t\tloadingDialog = LoadingDialogFragment.newInstance(message);\n\t\tloadingDialog.show(getFragmentManager(), getString(R.string.loading_dialog));\n\t}", "private void addAttachment() {\n Intent intentFromGallery = new Intent();\n if (Build.VERSION.SDK_INT < 19) {\n intentFromGallery = new Intent(Intent.ACTION_GET_CONTENT);\n intentFromGallery.setType(\"image/*\");\n } else {\n intentFromGallery = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n }\n\n try {\n startActivityForResult(Intent.createChooser(intentFromGallery, \"请选择要上传的图片\"), ADD_ATTACHMENT);\n// 这个是进行裁剪\n// startActivityForResult(intentFromGallery, IMAGE_REQUEST_CODE);\n } catch (android.content.ActivityNotFoundException ex) {\n Toast.makeText(this, \"无法选择文件,请先安装文件管理器\", Toast.LENGTH_SHORT).show();\n }\n }", "private void MoodRatingAddNoteDialog() {\n FragmentManager manager = getFragmentManager();\n Fragment frag = manager.findFragmentByTag(\"fragment_add_note\");\n if (frag != null) {\n manager.beginTransaction().remove(frag).commit();\n }\n fragmentAddNote fraAddNoteDialog = new fragmentAddNote();\n fraAddNoteDialog.setTargetFragment(this, DIALOG_ADDNOTE);\n\n fraAddNoteDialog.show(getFragmentManager().beginTransaction(), \"fragment_add_note\");\n }", "public static DeleteFileDialogFragment newInstance(String deleteFile) {\n DeleteFileDialogFragment frag = new DeleteFileDialogFragment();\n Bundle args = new Bundle();\n \n args.putString(ARG_DELETE_FILE, deleteFile);\n \n frag.setArguments(args);\n \n return frag;\n }", "private void initDialogLayout(){\r\n\t\tsetContentView(R.layout.media);\r\n\t\tsetTitle(\"Media Option...\");\r\n\r\n\t\t//Assign the controls\r\n\t\tbtn_txt = (Button)findViewById(R.id.btn_txt);\r\n\t\t//Set text\r\n\t\tbtn_image = (Button)findViewById(R.id.btn_image);\r\n\r\n\t\tbtn_audio = (Button)findViewById(R.id.btn_audio);\r\n\t\t//btn_vedio = (Button)findViewById(R.id.btn_video);\r\n\t\tbtn_cancel = (Button)findViewById(R.id.btn_cancel);\r\n\r\n\t\tbtn_txt.setOnClickListener(this);\r\n\t\tbtn_image.setOnClickListener(this);\r\n\t\tbtn_audio.setOnClickListener(this);\r\n\t\t//btn_vedio.setOnClickListener(this);\r\n\t\tbtn_cancel.setOnClickListener(this);\r\n\t\t \r\n\t\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"Règle du jeu\");\n builder.setMessage(\"Je sais que tu as toujours voulu être un pêcheur ! Voici ta chance. Ton objectif est de pêcher 5 poissons.\\n\\n Comment pêcher :\\n\\n1- Place ton téléphone à l'horizontal, ton écran vers la gauche.\\n\\n2- Attend le poisson.\\n\\n3- Quand ton téléphone vibre, un poisson a mordu à l'hammeçon ! Passe rapidement ton téléphone à la verticale avec ton écran toujours sur la gauche.\\n\\n4-Recommence jusqu'à devenir le roi de la pêche !\\n\\nTips : On ne devient pas pêcheur en jouant à un jeu de pêche.\" );\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // rien à faire\n }\n });\n\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\r\n\t\tAlertDialog.Builder builder = new Builder(this.getActivity());\r\n\t\tView view = LayoutInflater.from(getActivity()).inflate(\r\n\t\t\t\tR.layout.load_dialog, null);\r\n\r\n\t\tbuilder.setView(view);\r\n\t\tbuilder.setCancelable(false);\r\n\t\tdialog=builder.create();\r\n\t\treturn dialog;\r\n\t}", "public void showPatientMediaDialog(PDFContainer container) {\n\t\tdialogHandlerAction.getMediaDialog().initBean(globalEditViewHandler.getSelectedPatient(),\r\n\t\t\t\tnew HasDataList[] { globalEditViewHandler.getSelectedPatient() }, container, false);\r\n\r\n\t\t// enabeling upload to task\r\n\t\tdialogHandlerAction.getMediaDialog().enableUpload(\r\n\t\t\t\tnew HasDataList[] { globalEditViewHandler.getSelectedPatient() },\r\n\t\t\t\tnew DocumentType[] { DocumentType.U_REPORT, DocumentType.COUNCIL_REPLY,\r\n\t\t\t\t\t\tDocumentType.BIOBANK_INFORMED_CONSENT, DocumentType.OTHER });\r\n\r\n\t\t// setting info text\r\n\t\tdialogHandlerAction.getMediaDialog()\r\n\t\t\t\t.setActionDescription(resourceBundle.get(\"dialog.media.headline.info.patient\",\r\n\t\t\t\t\t\tglobalEditViewHandler.getSelectedPatient().getPerson().getFullName()));\r\n\r\n\t\t// show dialog\r\n\t\tdialogHandlerAction.getMediaDialog().prepareDialog();\r\n\t}", "@Override\n\tprotected Dialog onCreateDialog(int id) {\n\t\treturn buildDialog(MainActivity.this);\n\t\t\n\t}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n return mDialog;\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"The user your trying to connect to does not have a name set\";\n if(getArguments().getBoolean(\"me\"))\n {\n mess = \"Someone tried to connect to you for a game but you dont have a name set\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n\n fragment=this;\n View dialogView = inflater.inflate(R.layout.travel_search_dialog,null);\n builder.setView(dialogView);\n\n dialog = builder.create();\n //finding edittext box for user to enter travel search term\n searchTerm = (EditText) dialogView.findViewById(R.id.travel_search_term);\n\n //set up search button\n searchButton= (Button) dialogView.findViewById(R.id.search_button);\n searchButton.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n //ensure user has entered text into field\n if (searchTerm.getText().length() > 0) {\n String searchWord =searchTerm.getText().toString().replace(\" \", \"%20\");\n MainActivity.searchTerm = searchWord;\n new PhotoSearch(fragment).execute(MainActivity.searchTerm);\n\n } else\n Toast.makeText(getContext(), \"Enter a travel search term.\", Toast.LENGTH_SHORT).show();\n }\n });\n\n return dialog;\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View vi = inflater.inflate(R.layout.fragment_fees, container, false);\n\n\n infobtn = (ImageView)vi.findViewById(R.id.infobtn);\n\n infobtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n new MaterialDialog.Builder(getActivity())\n .title(\"Consultation fees\")\n .content(\"This fees is indicative and might vary. \\n NOTE:Fees is payable at clinic. There are NO charges for booking an appointment.\")\n .positiveText(\"DISMISS\")\n .negativeText(\"\")\n .show();\n }\n });\n\n\n return vi;\n }", "public VideoFragment() {\n }", "void showDialog2(int i) {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n Fragment prev = getSupportFragmentManager().findFragmentByTag(\"dialog\");\n if (prev != null) {\n Log.d(TAG, \"dialog is already showing!!!\");\n// DialogFragment df = (DialogFragment) prev;\n// df.dismiss();\n ft.remove(prev);\n }\n\n // Create and show the dialog.\n DialogFragment newFragment = MyDialogFragment.newInstance(i);\n newFragment.show(ft, \"dialog\");\n }", "@Override\n\tprotected Dialog onCreateDialog(int id)\n\t{\n\t\tsuper.onCreateDialog(id);\n\t\treturn visitor.instantiateDialog(id);\n\t}", "public void abrirDialogoEspecie() {\n ModalDialogoEspecie modalDialogoEspecie = new ModalDialogoEspecie();\n modalDialogoEspecie.show(getSupportFragmentManager(), \"especie dialog\");\n }", "private void makeMessageDialogue(String message){\n MessageFragment messageFragment = new MessageFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"message\", message);\n messageFragment.setArguments(bundle);\n messageFragment.show(getFragmentManager(), \"message dialogue\");\n }", "public void showDialog(Context context) {\n \n }", "public interface AttachmentContainer {\n\n /* compiled from: overflow_menu_button */\n public interface Callback {\n void mo142a(MediaResource mediaResource);\n\n void mo143b(MediaResource mediaResource);\n }\n\n void mo208a();\n\n void mo209a(Intent intent);\n\n void mo210a(MediaResource mediaResource);\n\n void mo211b(MediaResource mediaResource);\n\n void setAttachmentContainerCallback(Callback callback);\n}", "private void openAddDialog(){\n DialogFragment dialog = new AddLocationDialog();\n dialog.show(getFragmentManager(), getText(R.string.map_ask_add).toString());\n }", "public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }", "@Override\r\n\t protected Dialog onCreateDialog(int id) {\n\t \r\n\t screenDialog = null;\r\n\t switch(id){\r\n\t case(ID_SCREENDIALOG):\r\n\t screenDialog = new Dialog(this);\r\n\t screenDialog.setContentView(R.layout.message);\r\n\t messageText=(EditText)screenDialog.findViewById(R.id.messagetext1);\r\n\t send=(Button)screenDialog.findViewById(R.id.button1);\r\n\t send.setOnClickListener(sendmessage);\r\n\t cancel=(Button)screenDialog.findViewById(R.id.button2);\r\n\t cancel.setOnClickListener(cancelmessage);\r\n\t }\r\n\t return screenDialog;\r\n\t }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n //setting the message and the title of dialog\n builder.setTitle(R.string.dialog_title)\n .setMessage(R.string.dialog_message)\n .setPositiveButton(android.R.string.yes, (dialog, which) -> {\n getActivity().finish();\n })\n .setOnCancelListener(dialog -> getActivity().finish());\n\n //creating and returning the dialog\n return builder.create();\n }", "public Dialog onCreateDialog(Bundle savedInstanceState) {\r\n\t return mDialog;\r\n\t }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(device.getName())\n \t\t.setTitle(R.string.bt_exchange_dialog_title)\n .setPositiveButton(R.string.bt_exchange_dialog_positive_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n \t //Add BT Device Activity\n \t performBTKeyExchange(device);\n }\n })\n .setNegativeButton(R.string.bt_exchange_dialog_negative_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n \t dismiss();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\r\n public void onClick(View view) {\n\r\n\r\n\r\n final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\r\n\r\n dialog.setContentView(R.layout.full_screenimage_bottomsheeed);\r\n\r\n PhotoView photoView = dialog.findViewById(R.id.PhotoView);\r\n Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView);\r\n dialog.show();\r\n }", "@Override\r\n public void onClick(View view) {\n\r\n\r\n\r\n final Dialog dialog = new Dialog(holder.context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\r\n\r\n dialog.setContentView(R.layout.full_screenimage_bottomsheeed);\r\n\r\n PhotoView photoView = dialog.findViewById(R.id.PhotoView);\r\n Picasso.with(holder.context).load(MessageModalList.getMessage()).into(photoView);\r\n dialog.show();\r\n }", "@Override\n public void onMediaClicked(int position) {\n }", "@Override\n public void onFragmentInteraction(Uri uri){\n }", "@Override\n public void onFragmentInteraction(Uri uri){\n }", "@Override\n public void onClick(View v) {\n mListener.onDialogGalleryClick(ImageChooserDialogFragment.this);\n // Dismiss the dialog fragment.\n dismiss();\n }", "static ManageDialogFragment newInstance(int position) {\n ManageDialogFragment deviceDialog = new ManageDialogFragment();\n\n // Supply num input as an argument.\n Bundle args = new Bundle();\n args.putInt(\"position\", position);\n\n deviceDialog.setArguments(args);\n\n return deviceDialog;\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n playVideo(mActivity, itemDrm);\n }", "public RecipeVideoFragment() {\n }", "public DialogManager() {\n }", "void setDialogueManager(IDialogueManager dialogueManager);", "public static void setCustomDialogFragment(ZeTargetInAppNotification customDialogFrag){\n customDialogFragment = customDialogFrag;\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tImageLoaderManager.getInstance().initialize(true, true, Bitmap.Config.RGB_565);\n\t\toptions = ImageLoaderManager.getInstance().getDisplayImageOptions();\n\n\t\tdialog = new MessageDialogFragment();\n\t\tdialog.setOnSimpleMessageListener(new SimpleMessageListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onMessageRead() {\n\t\t\t\tmData.isRead = 1;\n\t\t\t\tdescView.setText(mData.text);\t\t\t\t\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void onMessageReadFail(int statusCode) {\n\t\t\t\tmData.isRead = 0;\n\t\t\t\tgetActivity().getSupportFragmentManager().popBackStack();\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tBundle bundle = getArguments();\n\t\tif (bundle != null) {\n\t\t\tdialog.setArguments(bundle);\n\t\t\tmData = bundle.getParcelable(MessageInboxFragment.MESSAGE_OBJECT_KEY);\t\n\t\t\tisRecevie = bundle.getBoolean(MESSAGE_RECEVIE_MODE);\n\t\t\tboolean isRead = mData.isRead == 1 ? true : false;\n\t\t\tif (!isRead) {\n\t\t\t\tdialog.show(getChildFragmentManager(), MessageDialogFragment.MESSAGE_READ);\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\n\t}", "private void showRewardDialog() {\n\t\tFragmentManager fm = getSupportFragmentManager();\n\t\taddRewardDialogue = RewardsDialogFragment.newInstance(\"Some Title\");\n\t\taddRewardDialogue.show(fm, \"fragment_edit_task\");\n\t}", "private void attachFragment(String tag){\n floatingActionButton.hide();\n if (tag == null){\n return;\n }\n\n cache.setFragmentTAG(tag);\n fragmentTAG = tag;\n fragment = SelectDataTypeFragment.newInstance(tag);\n\n makeFragmentAttach();\n\n pageTitle = getString(utils.getPageTitleID(fragmentTAG));\n setPageTitle();\n }" ]
[ "0.659118", "0.6282716", "0.6262377", "0.626064", "0.62081826", "0.61474466", "0.6115508", "0.60994476", "0.6062648", "0.59964025", "0.5985089", "0.5964575", "0.5957767", "0.59472597", "0.5946326", "0.59348476", "0.5928441", "0.5920223", "0.5909903", "0.5888403", "0.5877207", "0.5875887", "0.58711034", "0.58439577", "0.5840563", "0.583473", "0.58145714", "0.57801604", "0.57699925", "0.57577455", "0.57548517", "0.5752156", "0.5748369", "0.57435644", "0.57377595", "0.5720212", "0.5719342", "0.5711852", "0.56986636", "0.5696333", "0.5695361", "0.5694837", "0.5684416", "0.5654876", "0.56470454", "0.5639214", "0.5630539", "0.562859", "0.5615103", "0.5614348", "0.56122106", "0.56115997", "0.5590137", "0.5585858", "0.5585858", "0.5580306", "0.5572278", "0.55714965", "0.556241", "0.5561555", "0.5560757", "0.5558471", "0.555564", "0.5541265", "0.5533575", "0.55315554", "0.55295193", "0.55188936", "0.55070925", "0.55003065", "0.54969126", "0.54862636", "0.5485728", "0.5479142", "0.54782826", "0.547819", "0.54722625", "0.5469724", "0.5466804", "0.5462056", "0.54602325", "0.54550713", "0.5445701", "0.54412967", "0.5431015", "0.54261714", "0.54261714", "0.5423171", "0.5422798", "0.5422798", "0.54215264", "0.54198617", "0.54131407", "0.5410573", "0.54104364", "0.5401876", "0.5393044", "0.5387393", "0.53871524", "0.53817207" ]
0.7442552
0
mProgressBar_location = (ProgressBar) findViewById(R.id.progressBar_loc);
private void obtainCurrentLocation(boolean add_current_location_on) { if (add_current_location_on) { // If Google Play Services is available if (servicesConnected()) { // mProgressBar_location.setVisibility(View.VISIBLE); // Get the current location Location currentLocation = mLocationClient.getLastLocation(); link_to_global_report.setReporter_geopoint(new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude())); // mProgressBar_location.setVisibility(View.GONE); Log.e(DEBUG, "current_location_add:" + currentLocation); } } else { Toast.makeText(this, DEBUG + "off ... supposed to delete loc!", Toast.LENGTH_SHORT).show(); // mProgressBar_location.setVisibility(View.GONE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n \n mButton1 =(Button) findViewById(R.id.myButton1);\n mTextView1 = (TextView) findViewById(R.id.myTextView1);\n mButton1.setOnClickListener(myShowProgressBar);\n }", "protected View getProgressBar(View parentView) {\n return parentView.findViewById(R.id.progress);\n }", "@Override\n protected void onPreExecute() {\n mProgressBar.setVisibility(View.VISIBLE);\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n mMainActivity.showProgressBar();\n }", "private void initProgressBar(ProgressBar progressBar) {\n this.itemDownloadPB = progressBar;\n progressBar.setProgress(Variable.getVariable().getMapFinishedPercentage());\n progressBar.setMax(100);\n progressBar.setIndeterminate(false);\n progressBar.setVisibility(View.VISIBLE);\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n pb = (ProgressBar)findViewById(R.id.progressBar);\n progress_status = 50;\n\n // show the ProgressBar\n pb.setVisibility(View.VISIBLE);\n\n // set progress\n pb.setProgress(progress_status);\n }", "@Override\n public void showProgressBar() {\n MainActivity.sInstance.showProgressBar();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v= inflater.inflate(R.layout.fragment_apple, container, false);\n circularProgressBar = v.findViewById(R.id.circularProgressBarNO2);\n text = v.findViewById(R.id.textViewNO2);\n// Intent k = getIntent();\n// double value = getIntent().getDoubleExtra(\"NO2\",0);\n// text.setText(String.valueOf(value));\n ////for(int i=0;i<5;i++){\n circularProgressBar.setProgressWithAnimation(20f, Long.valueOf(2000)); // =1s\n\n // }\n\n\n// Set Progress Max\n circularProgressBar.setProgressMax(100f);\n\n// Set ProgressBar Color\n circularProgressBar.setProgressBarColor(Color.BLACK);\n// or with gradient\n // circularProgressBar.setProgressBarColorStart(Color.GREEN);\n // circularProgressBar.setProgressBarColorEnd(Color.RED);\n // circularProgressBar.setProgressBarColorDirection(CircularProgressBar.GradientDirection.TOP_TO_BOTTOM);\n\n// Set background ProgressBar Color\n circularProgressBar.setBackgroundProgressBarColor(Color.GRAY);\n// or with gradient\n// circularProgressBar.setBackgroundProgressBarColorStart(Color.WHITE);\n// circularProgressBar.setBackgroundProgressBarColorEnd(Color.WHITE);\n// circularProgressBar.setBackgroundProgressBarColorDirection(CircularProgressBar.GradientDirection.TOP_TO_BOTTOM);\n\n// Set Width\n circularProgressBar.setProgressBarWidth(7f); // in DP\n circularProgressBar.setBackgroundProgressBarWidth(3f); // in DP\n\n// Other\n circularProgressBar.setRoundBorder(true);\n circularProgressBar.setStartAngle(180f);\n circularProgressBar.setProgressDirection(CircularProgressBar.ProgressDirection.TO_RIGHT);\n return v;\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n setContentView(R.layout.progressbar);\n rectangleProgressBar=(ProgressBar)findViewById(R.id.rectangleprobar);\n CircleProgressBar=(ProgressBar)findViewById(R.id.circleProgressBar);\n mButton=(Button)findViewById(R.id.probutton);\n \n rectangleProgressBar.setIndeterminate(false); \n CircleProgressBar.setIndeterminate(false); \n \n mButton.setOnClickListener(new Button.OnClickListener()\n {\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t rectangleProgressBar.setVisibility(View.VISIBLE); \n\t\t\t\t CircleProgressBar.setVisibility(View.VISIBLE); \n\t \n\t rectangleProgressBar.setMax(100); \n\t rectangleProgressBar.setProgress(0); \n\t CircleProgressBar.setProgress(0); \n\t \n\t //创建一个线程,每秒步长为增加,到100%时停止 \n\t Thread mThread = new Thread(new Runnable() { \n\t \n\t\t\t\t\t\tpublic void run() { \n\t \n\t for(int i=0 ; i < 20; i++){ \n\t try{ \n\t \tcount = (i + 1) * 5 ; \n\t Thread.sleep(1000); \n\t if(i == 19){ \n\t Message msg = new Message(); \n\t msg.what = STOP; \n\t mHandler.sendMessage(msg); \n\t break; \n\t }else{ \n\t Message msg = new Message(); \n\t msg.what = NEXT; \n\t mHandler.sendMessage(msg); \n\t } \n\t }catch (Exception e) { \n\t e.printStackTrace(); \n\t } \n\t } \n\t \n\t } \n\t }); \n\t mThread.start(); \n\t \n\t }});\n \n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n list = new ArrayList<>();\n adapter = new ArrayAdapter<String>(getApplicationContext(),\n R.layout.list_item_content, list);\n\n ListView listView = (ListView) findViewById(R.id.list_view);\n listView.setAdapter(adapter);\n\n progressBar = (ProgressBar) findViewById(R.id.progress_bar);\n\n }", "@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\t//Initialize the ViewSwitcher object\n\t viewSwitcher = new ViewSwitcher(LoadingScreenActivity.this);\n\t \n\t\t\tviewSwitcher.addView(ViewSwitcher.inflate(LoadingScreenActivity.this, R.layout.loadingscreen, null));\n\n\t\t\tpb_progressBar = (ProgressBar) viewSwitcher.findViewById(R.id.progressBar1);\n\t\t\t\n\t\t\tpb_progressBar.setMax(100);\n\n\t\t\tsetContentView(viewSwitcher);\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_looked, container, false);\n\n SharedPreferences myPrefs = this.getActivity().getSharedPreferences(LOGIN_SETTING, Context.MODE_PRIVATE);\n userID=myPrefs.getInt(SAVED_ID,1);\n\n\n\n progressBar = (ProgressBar) rootView.findViewById(R.id.progressBar3);\n\n new LoadLookTask().execute();\n\n return rootView;\n }", "public void setProgressDialog(Progress pb)\n {\n progressBar = pb;\n }", "@Override\n protected void onPreExecute() {\n mProgress = new ProgressDialog(ctx);\n mProgress.setMessage(\"Finding current location\");\n mProgress.show();\n super.onPreExecute();\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n showProgressDialog(R.string.please_wait);\n //showDialog(progress_bar_type);\n }", "private void setupLoadingBar()\n {\n ImageView loadingImgView = findViewById(R.id.loadingImgView);\n loadingText = findViewById(R.id.loadingTextView);\n loadingBar = findViewById(R.id.loadingBar);\n\n Glide.with(this)\n .load(R.drawable.loading_spinner)\n .centerCrop()\n .transition(withCrossFade())\n .into(loadingImgView);\n }", "public void seekBarListener() {\n seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n int progressChangedValue = 0;\n\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n progressChangedValue = progress;\n }\n\n public void onStartTrackingTouch(SeekBar seekBar) {\n // TODO Auto-generated method stub\n }\n\n public void onStopTrackingTouch(SeekBar seekBar) {\n progressTextView.setText(\"Your current progress is \" + progressChangedValue);\n Toast.makeText(MainActivity.this, \"Seek bar progress is :\" + progressChangedValue,\n Toast.LENGTH_SHORT).show();\n }\n });\n }", "@NotNull\n ProgressIndicator getProgressIndicator();", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//progreso.setVisibility(View.VISIBLE);\n\t\t\tsetProgressBarIndeterminateVisibility(true);\n\t\t}", "public static ProgressView getProgress(){\n\n progress = new ProgressView();\n\n return progress;\n }", "@Override\n\t protected void onPreExecute() {\n\t super.onPreExecute();\n\t //this method will be running on UI thread\n\t mProgressBar.setVisibility(View.VISIBLE);\n\t }", "private void showProgressDialog(){\n progressDialog=ProgressDialog.show(context,\"\",\"Loading...Please wait...\");\n\n\n }", "private void progressStuff() {\n cd = new ConnectionDetector(getActivity());\n parser = new JSONParser();\n progress = new ProgressDialog(getActivity());\n progress.setMessage(getResources().getString(R.string.loading));\n progress.setIndeterminate(false);\n progress.setCancelable(true);\n // progress.show();\n }", "private void scanningBlurScoreValueBarInit() {\n LayoutParams layoutParams = (LayoutParams) scanningBlurScoreProgressBarContainer.getLayoutParams();\n layoutParams.setMargins(0, dp2Px(context, px2Dp(context, cornerPositions.leftTop.y) - 70), 0, 0);\n scanningBlurScoreProgressBarContainer.setLayoutParams(layoutParams);\n\n scanningBlurValueBar = (ProgressBar) findViewById(R.id.scanning_seekbar);\n scanningBlurValueBar.setProgress(0);\n scanningBlurValueBar.setInterpolator(new BounceInterpolator());\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n ProgressBar pbFileIO = (ProgressBar)findViewById(R.id.pbFileIO);\n pbFileIO.setProgress(progress[0]);\n }", "public void onLoadResource (WebView view, String url) {\n if (progressDialog == null) {\n // in standard case YourActivity.this\n progressDialog = new ProgressDialog(SearchActivity.this);\n progressDialog.setMessage(\"Loading...\");\n progressDialog.show();\n }\n }", "void onShowProgress();", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tprogressDialog = ProgressDialog.show(MainActivity.this, \"\",\n\t\t\t\t\t\"Loading...\");\n\t\t}", "@Override\r\n\t protected void onPreExecute() {\n\t super.onPreExecute();\r\n\t progressDialog = new ProgressDialog(UDMap.this);\r\n\t progressDialog.setMessage(\"Loading the best way...\");\r\n\t progressDialog.setIndeterminate(true);\r\n\t progressDialog.show();\r\n\t }", "public ProgressIndicator getProgressIndicator() {\n return progressIndicator;\n }", "@Override\n protected void onPreExecute() {\n mProgressbar.setVisibility(View.VISIBLE);\n }", "@Override\n\tprotected void onPreExecute() {\n\t\tprogressBar.setVisibility(View.VISIBLE);\n\t\ttv.setVisibility(View.VISIBLE);\n\t\tsuper.onPreExecute();\n\t}", "public void onPreExecute() {\n progressDialog.show();\n }", "public void setBar(JProgressBar bar){\n prog = bar;\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\tshowDialog(progress_bar_type);\n\t\t}", "@Override\n protected void onPreExecute(){\n super.onPreExecute();\n count++;\n //pg = new progressDialog(MainActivity.this);\n //pg.show();\n }", "private JProgressBar getJProgressBar() {\n\t\tif (jProgressBar == null) {\n\t\t\tjProgressBar = new JProgressBar();\n\t\t\tjProgressBar.setBounds(new Rectangle(40, 492, 381, 19));\n\t\t\tjProgressBar.setStringPainted(false);\n\t\t\tjProgressBar.setBackground(Color.white);\n\t\t}\n\t\treturn jProgressBar;\n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progress.setVisibility(ProgressBar.VISIBLE);\n }", "private void findViewById(){\n\t mDeleteBtn = (Button) findViewById(R.id.poster_delete_btn);\n\t mClearBtn = (Button) findViewById(R.id.poster_clear_btn);\n\t posterGridView = (GridView) findViewById(R.id.file_list_view);\n\t noPoster = (TextView)findViewById(R.id.no_poster);\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n progressBar.setVisibility(View.VISIBLE);\n\n // updating progress bar value\n progressBar.setProgress(progress[0]);\n\n // updating percentage value\n txtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n }", "public void onPreExecute() {\n super.onPreExecute();\n UploadLocationDataActivity.this.progressDialog = new ProgressDialog(UploadLocationDataActivity.this);\n UploadLocationDataActivity.this.progressDialog.setMessage(\"Loading...\");\n UploadLocationDataActivity.this.progressDialog.show();\n }", "public void onPreExecute() {\n super.onPreExecute();\n UploadLocationDataActivity.this.progressDialog = new ProgressDialog(UploadLocationDataActivity.this);\n UploadLocationDataActivity.this.progressDialog.setMessage(\"Loading...\");\n UploadLocationDataActivity.this.progressDialog.show();\n }", "@Override\n\t\t \tprotected void onPreExecute() {\n\t\t try {\n\t\t\t \tpd=new ProgressDialog(Styles_Dialog.this);\n\t\t\t \tpd.setMessage(\"Loading\");\n\t\t\t \tpd.show();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\t\t \t\n\t\t \t}", "private void initElements() {\n uploadingProgressBar = (ProgressBar) findViewById(R.id.scanning_result_uploading_bar);\n scanningBlurScoreProgressBarContainer = (RelativeLayout) findViewById(R.id.scanning_blur_score_progress_container);\n resultImgAndLoadingLayout = (RelativeLayout) findViewById(R.id.scaning_result_img_and_loading);\n fpResultImg = (ImageView) resultImgAndLoadingLayout.findViewById(R.id.scanning_result_img);\n scanningThumb = (ImageView) findViewById(R.id.scanning_progressbar_thumb);\n jumpMsg = (TextView) findViewById(R.id.scanning_status_msg);\n }", "@Override\n\t protected void onPreExecute() {\n\t super.onPreExecute();\n\t \n\t progressDialog= new Dialog(ListKotaActivity.this);\n\t progressDialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);\n\t progressDialog.setContentView(R.layout.progress);\n\t progressDialog.setCancelable(false);\n\t progressDialog.show();\t \n\t }", "@Override\n\t\tprotected void onPreExecute() {\n\n\t\t\tsuper.onPreExecute();\n\t\t\td = new ProgressDialog(SensorActivity.this);\n\t\t\td.setTitle(\"Loading\");\n\t\t\td.show();\n\t\t}", "@Override\n protected void onPreExecute()\n {\n // Create a new progress dialog\n progressDialog = new ProgressDialog(MainActivity.this);\n // Set the progress dialog spinner progress bar\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n // Set the dialog title to 'Loading...'\n progressDialog.setTitle(\"Loading...\");\n // Set the dialog message to 'Loading application View, please wait...'\n progressDialog.setMessage(\"Loading application, please wait...\");\n // This dialog can't be canceled by pressing the back key\n progressDialog.setCancelable(false);\n // This dialog isn't indeterminate\n progressDialog.setIndeterminate(false);\n // The maximum number of items is 100\n progressDialog.setMax(100);\n // Set the current progress to zero\n progressDialog.setProgress(0);\n // Display the progress dialog\n progressDialog.show();\n }", "@Override\n\t\t\tprotected void onPreExecute() {\n\t \t\tprogressBar = new ProgressDialog(SiQuoiaLeaderboardActivity.this);\n\t\t\t\tprogressBar.setIndeterminate(true);\n\t\t\t\tprogressBar.setCancelable(false);\n\t\t\t\tprogressBar.setMessage(\"Getting Leaderboard.\");\n\t\t\t\tprogressBar.show();\t\t\t\n\t\t\t}", "private void startProgressBar() {\n\t b_buscar.setVisibility(View.GONE);\n\t // wi_progreso.setVisibility(View.VISIBLE);\n\t ly_progreso.setVisibility(View.VISIBLE);\n\t}", "private void setOnClickListeners() {\n progressBar = (ProgressBar) findViewById(R.id.progressBar);\n progressBar.setMax(100);\n progressBar.setIndeterminate(false);\n\n }", "public ProgressBar getProgressBar() {\n\t\treturn this.progressBar;\n\t}", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pDialog = new ProgressDialog(MainActivity.this);\n pDialog.setMessage(\"Getting Trees...\");\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "@Override\n protected void onPreExecute() {\n\n myProgress = 0;\n }", "public void setProgressBar(JProgressBar bar) {\n matchProgressBar = bar;\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n pDialog = new ProgressDialog(Activity_List.this);\n pDialog.setMessage(\"Loading spots. Please wait...\");\n\n pDialog.setIndeterminate(false);\n pDialog.setCancelable(false);\n pDialog.show();\n }", "@Override\n protected void onPreExecute() {\n progressDialog= new ProgressDialog(getActivity());\n progressDialog.setMessage(\"loading..\");\n progressDialog.setIndeterminate(false);\n progressDialog.show();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_roads, container, false);\n\n mRecyclerView = (RecyclerView) view.findViewById(R.id.RecyclerView);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n progressBar = (ProgressBar) view.findViewById(R.id.progress_bar);\n\n\n\n return view;\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n progress = new ProgressDialog(activity);\n progress.setMessage(\"registering..... \");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.setIndeterminate(true);\n progress.setCancelable(false);\n progress.show();\n\n }", "@Override\n\t\tprotected void onPreExecute()\n\t\t{\n\t\t\tsuper.onPreExecute();\n\t\t\tpDialog = new ProgressDialog(MainActivity.this);\n\t\t\tpDialog.setMessage(\"Loading....\");\n\t\t\tpDialog.setCancelable(true);\n\t\t\tpDialog.show();\n\t\t}", "public void onLoadResource (WebView view, String url) {\n if (progressDialog == null) {\n // in standard case YourActivity.this\n progressDialog = new ProgressDialog(WebViewActivity.this);\n progressDialog.setMessage(\"Loading...\");\n progressDialog.show();\n }\n }", "private void setUpProgressBar() {\n DatabaseHelper database = new DatabaseHelper(this);\n Cursor cursor = database.getAllDataForScavengerHunt();\n\n int totalLocationCount = 0;\n double visitedCount = 0;\n\n while (cursor.moveToNext()) {\n totalLocationCount++;\n int visited = cursor.getInt(cursor.getColumnIndex(database.COL_VISITED));\n if (visited == 1) visitedCount++;\n }\n\n int progress = (int) (visitedCount / totalLocationCount * 100);\n ProgressBar progressBar = findViewById(R.id.progress);\n TextView progressText = findViewById(R.id.progress_text);\n progressBar.setProgress(progress);\n progressText.setText(\" \" + progress + \"%\");\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n this.presenterGasolineras = new PresenterGasolineras();\n\n // Barra de progreso\n // https://materialdoc.com/components/progress/\n progressBar = new ProgressBar(MainActivity.this, null, android.R.attr.progressBarStyleLarge);\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(100, 100);\n params.addRule(RelativeLayout.CENTER_IN_PARENT);\n RelativeLayout layout = findViewById(R.id.activity_precio_gasolina);\n layout.addView(progressBar, params);\n\n // Muestra el logo en el actionBar\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n getSupportActionBar().setIcon(R.drawable.por_defecto_mod);\n\n // Swipe and refresh\n // Al hacer swipe en la lista, lanza la tarea asíncrona de carga de datos\n mSwipeRefreshLayout = findViewById(R.id.swiperefresh);\n mSwipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n new CargaDatosGasolinerasTask(MainActivity.this).execute();\n }\n });\n\n // Al terminar de inicializar todas las variables\n // se lanza una tarea para cargar los datos de las gasolineras\n // Esto se ha de hacer en segundo plano definiendo una tarea asíncrona\n new CargaDatosGasolinerasTask(this).execute();\n\n //Cogemos el spinner\n Spinner spin = (Spinner) findViewById(R.id.idSpinnerCombustible);\n spin.setOnItemSelectedListener(this);\n\n //Creamos el arrayAdapter con la lista del spinner\n ArrayAdapter<String> aa = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, combustibles);\n aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n //Colocamos los datos en el spinner\n spin.setAdapter(aa);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tsetContentView(R.layout.activity_new_app_progressmanager);\r\n\r\n\t\tinitUI();\r\n\t}", "@Override\n protected void onPreExecute() {\n pDialog = new ProgressDialog(getActivity());\n pDialog.setMessage(\"Please wait...\");\n pDialog.setCancelable(false);\n pDialog.setIndeterminate(false);\n pDialog.setMax(100);\n pDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n pDialog.show();\n// progressBar.setVisibility(View.VISIBLE);\n// progressBar.setProgress(0);\n super.onPreExecute();\n }", "@Override\n \tpublic void onCreate(Bundle savedInstanceState) {\n \t\tsuper.onCreate(savedInstanceState);\n \t\tsetContentView(R.layout.main);\n \t\tprogress = (ProgressBar) findViewById(R.id.progressBar1);\n \t\thandler = new Handler();\n \n \t\tfinal ArrayList<String> al = new ArrayList<String>();\n \n \t\tal.add(\"penile\");\n \t\tal.add(\"vagenda\");\n \n \t\tlv = (ListView)\tfindViewById(R.id.listView1);\n \t\tads = new ArrayAdapter<String>(this, R.layout.rowlayout, R.id.labelo, al);\n \t\tlv.setAdapter(ads);\n \n \t}", "@Override\n protected void onPreExecute() {\n myProgress = 0;\n }", "@Override\n public void hideProgressBar() {\n MainActivity.sInstance.hideProgressBar();\n }", "@Override\n \t\tprotected void onPreExecute() \n \t\t{\n \t\t\t//Create a new progress dialog\n \t\t\tprogressDialog = new ProgressDialog(MainActivity.this);\n \t\t\t//Set the progress dialog to display a horizontal progress bar \n \t\t\tprogressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n \t\t\t//Set the dialog title to 'Loading...'\n \t\t\tprogressDialog.setTitle(\"Loading Game...\");\n \t\t\t//Set the dialog message to 'Loading application View, please wait...'\n \t\t\tprogressDialog.setMessage(\"Please wait...\");\n \t\t\t//This dialog can't be canceled by pressing the back key\n \t\t\tprogressDialog.setCancelable(false);\n \t\t\t//This dialog isn't indeterminate\n \t\t\tprogressDialog.setIndeterminate(false);\n \t\t\t//The maximum number of items is 100\n \t\t\tprogressDialog.setMax(100);\n \t\t\t//Set the current progress to zero\n \t\t\tprogressDialog.setProgress(0);\n \t\t\t//Display the progress dialog\n \t\t\tprogressDialog.show();\n \t\t}", "public void onLoadResource (WebView view, String url) {\n if (progressDialog == null) {\n // in standard case YourActivity.this\n progressDialog = Utils.showProgressDialog(getActivity());\n }\n }", "@Override\n public void onProgressUpdate(Integer... progress)\n {\n _dialog.setProgress(progress[0]);\n }", "@Override\n\tpublic void staticFindViewByActivity() {\n\t\tsb=(SeekBar) activity.findViewById(R.id.sb_vol);\n\t\ttv_vol_pro=(TextView) activity.findViewById(R.id.tv_cur_percent);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n mProgressDialog = new ProgressDialog(getActivity());\n mProgressDialog.setMessage(getString(R.string.loading_text));\n mProgressDialog.setCancelable(false);\n }", "protected void onPreExecute(){\n // Display the progress dialog on async task start\n // mProgressDialog.show();\n }", "@Override\n protected void onPreExecute() {\n\n\n dialog = new ProgressDialog(MainArea.this);\n dialog.setTitle(\"Loading Results\");\n dialog.setMessage(\"Please Wait Results Are Loading For You....\");\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n super.onPreExecute();\n }", "@Override\n public View onCreateView(\n @NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_radius, container, false);\n Log.d(LOG_TAG, \"onCreateView\");\n // Snippet from \"Navigate to the next Fragment\" section goes here.\n setUpToolbar(view);\n final TextView radiusTextView=(TextView) view.findViewById(R.id.textViewRadius);\n radiusTextView.setText(\"\" + current);\n SeekBar radiusSeekbar=(SeekBar) view.findViewById(R.id.radiusSeekBar);\n //radiusSeekbar.setMin(min);\n radiusSeekbar.setMax(max);\n radiusSeekbar.setProgress(current);\n radiusSeekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n current=progress;\n radiusTextView.setText(\"\"+progress);\n }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) {\n\n }\n });\n\n return view;\n\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n progress = new ProgressDialog(activity);\n progress.setMessage(\"please wait.. \");\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.setIndeterminate(true);\n progress.setCancelable(false);\n progress.show();\n\n }", "protected void onPreExecute() {\r\n \tdialog = new ProgressDialog(context);\r\n \t\tdialog.setMessage(\"Loading...\");\r\n \t\tdialog.show();\r\n }", "protected void dismissLoading()\n {\n progressBar.dismiss();\n }", "protected void disposeProgressBar() {\r\n\r\n if (progressBar != null) {\r\n progressBar.dispose();\r\n }\r\n }", "protected void onPreExecute() {\n fabProgressCircle.show();\n\n\n\n }", "@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n miBarraDeProgreso = (ProgressBar) findViewById(R.id.pbar);\n miBarraDeProgreso.setMax(100);\n contador =1;\n miBarraDeProgreso.setVisibility(View.VISIBLE);\n miBarraDeProgreso.setProgress(0);\n\n img = (ImageView) findViewById(R.id.loadingView);\n img.setBackgroundResource(R.drawable.loading);\n btAdapter = BluetoothAdapter.getDefaultAdapter();\n if(btAdapter == null){\n Toast.makeText(this,\"No dispone de una conexion Bluethooth\",Toast.LENGTH_SHORT).show();\n finish();\n }\n if(btAdapter.isEnabled()){\n new Load().execute(100);\n }else{\n Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);\n startActivityForResult(intent, PICK_CONTACT_REQUEST);\n }\n\n AnimationDrawable animationDrawable = (AnimationDrawable) img.getBackground();\n animationDrawable.start();\n\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n pd = new ProgressDialog(activity);\n pd.setMessage(\"Loading, Please Wait.....\");\n pd.setCancelable(false);\n pd.show();\n }", "public void run() {\n\t\t\t\t\tmHandler.post(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tprogressbar.setProgress(Integer\r\n\t\t\t\t\t\t\t\t\t.parseInt(tvsp.progress));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}", "private void uploadingProgressBarInit() {\n uploadingProgressBar.setVisibility(VISIBLE);\n uploadingProgressBar.setProgress(0);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.bienvenida_activity);\n\n\t\tbarraProgreso = (ProgressBar) findViewById(R.id.progressbar1);\n\t\tlineaAyuda = (TextView) findViewById(R.id.bienvenida1);\n\t}", "@Override\n\t\tprotected void onPreExecute() \n\t\t{\n\t\t\t\n\t\t\tdialog = new ProgressDialog(AddFoodAdvActivity.this);\n\t\t\tdialog.setMessage(\"Loading...\");\n\t\t\tdialog.show();\n\t\t\tsuper.onPreExecute();\n\t\t}", "@Override\n protected void onProgressUpdate(Integer... progress) {\n if (mProgressDialog != null) {\n mProgressDialog.setProgress(progress[0]);\n }\n }", "public void showProgress2(){\n// if (mHandler==null){\n// mHandler = new Handler(Looper.getMainLooper());\n// }\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n loadingDialog = new Dialog(BaseActivity.this);\n loadingDialog.setTitle(\"Loading data..\");\n loadingDialog.setContentView(R.layout.loading);\n loadingDialog.show();\n\n }\n });\n// mHandler.post(new Runnable() {\n// @Override\n// public void run() {\n// loadingDialog = new Dialog(BaseActivity.this);\n// loadingDialog.setTitle(\"Loading data..\");\n// loadingDialog.setContentView(R.layout.loading);\n// loadingDialog.show();\n//\n// }\n// });\n }", "public void initLoadingPage(Context c) {\n\n LayoutInflater inflater = (LayoutInflater) c.getSystemService( c.LAYOUT_INFLATER_SERVICE);\n final AlertDialog.Builder nameBuilder = new AlertDialog.Builder(c);\n View alertDiaView = inflater.inflate(R.layout.activity_loading_page,null);\n nameBuilder.setView(alertDiaView);\n\n avi = (AVLoadingIndicatorView) alertDiaView.findViewById(R.id.avi);\n avi.smoothToShow();\n\n\n int val= (int) (130 * Resources.getSystem().getDisplayMetrics().density);//dp to px\n alertDialog= nameBuilder.show();\n alertDialog.getWindow().setLayout(val ,val);\n\n\n }", "public ProgressBar getSpinner() {\n return mSpinner;\n }", "@Override\n protected void onPreExecute() {\n\n super.onPreExecute();\n // Show progress overlay (with animation):\n// AndroidUtils.animateView(progressOverlay, View.VISIBLE, 0.4f, 200);\n\n }", "public static void updateProgressBar() {\r\n mHandler.postDelayed(mUpdateTime, 100);\r\n }", "@Override\n protected void onPreExecute() {\n progressDialog.setProgress(0);\n //progressBar.setProgress(0);\n super.onPreExecute();\n }", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\r\n\t\t\tprogressDialog = ProgressDialog.show(getActivity(), \"\", StaticVariables.progressBarText, false);\r\n\t\t\tprogressDialog.setCancelable(false);\r\n\t\t}", "@Override\r\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\r\n\r\n\t\t\tprogressDialog = ProgressDialog.show(getActivity(), \"\", StaticVariables.progressBarText, false);\r\n\t\t\tprogressDialog.setCancelable(false);\r\n\t\t}", "private void spinnerStart() {\n this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6 */\n\n public void run() {\n String string;\n SplashScreen.this.spinnerStop();\n ProgressDialog unused = SplashScreen.spinnerDialog = new ProgressDialog(SplashScreen.this.webView.getContext());\n SplashScreen.spinnerDialog.setOnCancelListener(new DialogInterface.OnCancelListener() {\n /* class org.apache.cordova.splashscreen.SplashScreen.AnonymousClass6.AnonymousClass1 */\n\n public void onCancel(DialogInterface dialogInterface) {\n ProgressDialog unused = SplashScreen.spinnerDialog = null;\n }\n });\n SplashScreen.spinnerDialog.setCancelable(false);\n SplashScreen.spinnerDialog.setIndeterminate(true);\n RelativeLayout relativeLayout = new RelativeLayout(SplashScreen.this.cordova.getActivity());\n relativeLayout.setGravity(17);\n relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-2, -2));\n ProgressBar progressBar = new ProgressBar(SplashScreen.this.webView.getContext());\n RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-2, -2);\n layoutParams.addRule(13, -1);\n progressBar.setLayoutParams(layoutParams);\n if (Build.VERSION.SDK_INT >= 21 && (string = SplashScreen.this.preferences.getString(\"SplashScreenSpinnerColor\", null)) != null) {\n int parseColor = Color.parseColor(string);\n progressBar.setIndeterminateTintList(new ColorStateList(new int[][]{new int[]{16842910}, new int[]{-16842910}, new int[]{-16842912}, new int[]{16842919}}, new int[]{parseColor, parseColor, parseColor, parseColor}));\n }\n relativeLayout.addView(progressBar);\n SplashScreen.spinnerDialog.getWindow().clearFlags(2);\n SplashScreen.spinnerDialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));\n SplashScreen.spinnerDialog.show();\n SplashScreen.spinnerDialog.setContentView(relativeLayout);\n }\n });\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n progressDialog = new ProgressDialog(AiutaGliAltri.this);\n progressDialog.setMessage(\"Sto Cercando!\");\n progressDialog.setIndeterminate(true);\n progressDialog.setCanceledOnTouchOutside(false);\n progressDialog.show();\n }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tsuper.onPreExecute();\n\t\t\t//\t\t\tmProgress.setVisibility(View.VISIBLE);\n\t\t}", "@Override\n public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) {\n TextView txtV_graduacao = inf.findViewById(R.id.textView11);\n txtV_graduacao.setText(\"\"+progress+\" %\");\n }", "@Override\n protected void onPreExecute() {\n\n dialog = new ProgressDialog(AddFoodAdvActivity.this);\n dialog.setMessage(\"Please Wait...!\");\n dialog.show();\n super.onPreExecute();\n }" ]
[ "0.6764536", "0.6491161", "0.6340295", "0.63096756", "0.62882304", "0.6287448", "0.61655873", "0.61641884", "0.61493385", "0.6113449", "0.6074194", "0.6069327", "0.60393673", "0.6034116", "0.60230094", "0.60226005", "0.6015403", "0.60044605", "0.60039186", "0.5994362", "0.59908444", "0.59884435", "0.59485674", "0.5948259", "0.5944734", "0.5943052", "0.59356713", "0.5933127", "0.59322625", "0.58982384", "0.5896696", "0.5896538", "0.58829904", "0.58785635", "0.587113", "0.587113", "0.58666295", "0.58575314", "0.58563983", "0.5850797", "0.58494794", "0.5840291", "0.5840291", "0.58270854", "0.58171964", "0.58152694", "0.58113354", "0.5800481", "0.5791721", "0.57798105", "0.5767707", "0.57665896", "0.57608443", "0.576071", "0.5757675", "0.57463026", "0.5745325", "0.57389843", "0.57278806", "0.5727873", "0.57182574", "0.57164216", "0.57109183", "0.57030845", "0.56976116", "0.5692833", "0.5691269", "0.5689597", "0.5685079", "0.5684231", "0.5682134", "0.568056", "0.56762385", "0.5675384", "0.56727326", "0.5672323", "0.56688654", "0.56646734", "0.5661307", "0.5659906", "0.5651576", "0.56483305", "0.56475616", "0.5646709", "0.5646142", "0.5623241", "0.56225693", "0.5620136", "0.56129223", "0.5611191", "0.56097776", "0.5608555", "0.5608276", "0.56062436", "0.5601888", "0.5601888", "0.5595757", "0.558047", "0.5580037", "0.55786014", "0.55704135" ]
0.0
-1
Verify that Google Play services is available before making a request.
public boolean servicesConnected() { // Check that Google Play services is available int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); // If Google Play services is available if (ConnectionResult.SUCCESS == resultCode) { // In debug mode, log the status Log.d(LocationUtils.APPTAG, getString(R.string.play_services_available)); // Continue return true; // Google Play services was not available for some reason } else { // Display an error dialog Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0); if (dialog != null) { ErrorDialogFragment errorFragment = new ErrorDialogFragment(); errorFragment.setDialog(dialog); errorFragment.show(getSupportFragmentManager(), LocationUtils.APPTAG); } return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkGooglePlayServices() {\n\t\tint status = GooglePlayServicesUtil\n\t\t\t\t.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (D) {\n\t\t\tif (status == ConnectionResult.SUCCESS) {\n\t\t\t\t// Success! Do what you want\n\t\t\t\tLog.i(TAG, \"Google Play Services all good\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_MISSING) {\n\t\t\t\tLog.e(TAG, \"Google Play Services not in place\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED) {\n\t\t\t\tLog.e(TAG, \"Google Play Serivices outdated\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_DISABLED) {\n\t\t\t\tLog.e(TAG, \"Google Plauy Services disabled\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"Google Play Serivices invalid but wtf does that mean?\");\n\t\t\t} else {\n\t\t\t\tLog.e(TAG, \"No way this is gonna happen\");\n\t\t\t}\n\t\t}\n\t}", "private void checkGooglePlayServiceSDK() {\n //To change body of created methods use File | Settings | File Templates.\n final int googlePlayServicesAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n Log.i(TAG, \"googlePlayServicesAvailable:\" + googlePlayServicesAvailable);\n\n switch (googlePlayServicesAvailable) {\n case ConnectionResult.SERVICE_MISSING:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n break;\n case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_SERVICE_UPDATE_REQUIRED);\n break;\n case ConnectionResult.SERVICE_DISABLED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_DISABLED);\n break;\n case ConnectionResult.SERVICE_INVALID:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_INVALID);\n break;\n }\n }", "private void acquireGooglePlayServices() {\r\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n final int connectionStatusCode = apiAvailability.isGooglePlayServicesAvailable(getActivity());\r\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\r\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\r\n }\r\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(getActivity());\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(mActivity);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n Log.d(Util.TAG_GOOGLE, \"\" + connectionStatusCode);\n // showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "private boolean checkGooglePlayServices() {\n int code = GooglePlayServicesUtil.isGooglePlayServicesAvailable(mActivity);\n if (code != ConnectionResult.SUCCESS) {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(code, mActivity, Constants.RequestCode.HANDLE_GMS,\n new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialogInterface) {\n mActivity.finish();\n }\n });\n if (dialog != null) {\n dialog.show();\n }\n\n return false;\n }\n\n return true;\n }", "private boolean CheckGooglePlayServices() {\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n int available = googleApiAvailability.isGooglePlayServicesAvailable(this);\n if (available != ConnectionResult.SUCCESS) {\n if (googleApiAvailability.isUserResolvableError(available)) {\n googleApiAvailability.getErrorDialog(this, available,0).show();\n }\n return false;\n }\n return true;\n }", "public boolean checkGooglePlayServices() {\r\n // Retrieve an instance of the GoogleApiAvailability object\r\n GoogleApiAvailability api = GoogleApiAvailability.getInstance();\r\n\r\n // Check whether the device includes GooglePlayServices\r\n int resultCode = api.isGooglePlayServicesAvailable(this);\r\n if (resultCode == ConnectionResult.SUCCESS) {\r\n // If it does, return true\r\n return true;\r\n } else if (api.isUserResolvableError(resultCode)) {\r\n // If Google Play Services are available to download to the user, show the error Dialog\r\n api.showErrorDialogFragment(this, resultCode, 9000);\r\n return false;\r\n } else {\r\n return false;\r\n }\r\n }", "private boolean isGooglePlayServicesAvailable() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (ConnectionResult.SUCCESS == status) {\n return true;\n } else {\n GooglePlayServicesUtil.getErrorDialog(status, this, 0).show();\n return false;\n }\n }", "private boolean checkPlayServices() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(getActivity());\n if (resultCode != ConnectionResult.SUCCESS) {\n if (apiAvailability.isUserResolvableError(resultCode)) {\n apiAvailability.getErrorDialog(getActivity(), resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n Toast.makeText(getActivity(), \"This device is not supported by Google Play Services.\", Toast.LENGTH_SHORT).show();\n getActivity().finish();\n }\n return false;\n }\n return true;\n }", "private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n\n return connectionStatusCode == ConnectionResult.SUCCESS;\n\n }", "private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil\n .isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }", "private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }", "private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }", "private boolean checkPlayServices() {\r\n\t\tGoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n\t\tint resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\r\n\t\tif (resultCode != ConnectionResult.SUCCESS) {\r\n\t\t\tif (apiAvailability.isUserResolvableError(resultCode)) {\r\n\t\t\t\tapiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\r\n\t\t\t\t\t\t.show();\r\n\t\t\t} else {\r\n\t\t\t\tLog.i(TAG, \"This device is not supported.\");\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean isGooglePlayServicesAvailable() {\r\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n final int connectionStatusCode = apiAvailability.isGooglePlayServicesAvailable(getActivity());\r\n return connectionStatusCode == ConnectionResult.SUCCESS;\r\n }", "private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil\n .isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Toast.makeText(getApplicationContext(), \"This device is not supported.\", Toast.LENGTH_LONG).show();\n finish();\n }\n return false;\n }\n return true;\n }", "private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil\n .isGooglePlayServicesAvailable(getContext());\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, getActivity(),\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Toast.makeText(getContext(),\n \"This device is not supported.\", Toast.LENGTH_LONG)\n .show();\n getActivity().finish();\n }\n return false;\n }\n return true;\n }", "private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n return connectionStatusCode == ConnectionResult.SUCCESS;\n }", "private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n return connectionStatusCode == ConnectionResult.SUCCESS;\n }", "private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(mActivity);\n return connectionStatusCode == ConnectionResult.SUCCESS;\n }", "private boolean checkPlayServices() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\n Log.i(TAG, \"checkPlayServices \" + resultCode);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (apiAvailability.isUserResolvableError(resultCode)) {\n apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }", "public boolean checkPlayServices() {\n\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n\n int resultCode = googleApiAvailability.isGooglePlayServicesAvailable(context);\n\n if (resultCode != ConnectionResult.SUCCESS) {\n if (googleApiAvailability.isUserResolvableError(resultCode)) {\n googleApiAvailability.getErrorDialog(context, resultCode,\n PLAY_SERVICES_REQUEST).show();\n PrintLog.e(TAG, \"checkPlayServices yes hai\");\n } else {\n PrintLog.e(TAG, \"checkPlayServices No hai\");\n Toast.makeText(context, \"This device is not supported.\", Toast.LENGTH_LONG).show();\n }\n return false;\n }\n return true;\n }", "private boolean checkPlayServices() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (apiAvailability.isUserResolvableError(resultCode)) {\n apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n Log.i(TAG, \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }", "private boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(getActivity());\n return connectionStatusCode == ConnectionResult.SUCCESS;\n }", "private boolean isGooglePlayServicesAvailable() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\r\n // If Google Play services is available\r\n if (ConnectionResult.SUCCESS == resultCode) {\r\n // In debug mode, log the status\r\n Log.d(\"Location Updates\", \"Google Play services is available.\");\r\n return true;\r\n } else {\r\n // Get the error dialog from Google Play services\r\n Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog( resultCode,\r\n this,\r\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\r\n\r\n // If Google Play services can provide an error dialog\r\n if (errorDialog != null) {\r\n // Create a new DialogFragment for the error dialog\r\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\r\n errorFragment.setDialog(errorDialog);\r\n errorFragment.show(getFragmentManager(), \"Location Updates\");\r\n }\r\n\r\n return false;\r\n }\r\n }", "private boolean checkPlayServices() {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n int resultCode = apiAvailability.isGooglePlayServicesAvailable(this);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (apiAvailability.isUserResolvableError(resultCode)) {\n apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n Log.i(\"LoginActivity\", \"This device is not supported.\");\n finish();\n }\n return false;\n }\n return true;\n }", "public static boolean hasGooglePlayServices() {\n\t\tboolean isAvailable = false;\n\t\tint statusCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(mContext);\n\t\tif (statusCode == ConnectionResult.SUCCESS) {\n\t\t\tisAvailable = true;\n\t\t} else {\n\t\t\tisAvailable = false;\n\t\t}\n\t\treturn isAvailable;\n\t}", "private boolean servicesAvailable() {\n int resultCode = GooglePlayServicesUtil.\n isGooglePlayServicesAvailable(this);\n if (ConnectionResult.SUCCESS == resultCode) {\n log(\"Google Play services is available\");\n return true;\n } else {\n log(\"Google Play services is not available\");\n showErrorDialog(resultCode);\n return false;\n }\n }", "private boolean checkPlayServices() {\n int resultCode = GooglePlayServicesUtil\n .isGooglePlayServicesAvailable(mContext);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, (Activity)mContext,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n } else {\n Toast.makeText(mContext,\n \"This device is not supported.\", Toast.LENGTH_LONG)\n .show();\n }\n return false;\n }\n return true;\n }", "private boolean checkPlayServices()\n {\n\tint resultCode=-5000;\n\ttry {\n\t\tresultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\tif (resultCode != ConnectionResult.SUCCESS)\n\t{\n\t if (GooglePlayServicesUtil.isUserRecoverableError(resultCode))\n\t {\n\t \tLog.i(Globals.TAG, \"dialog gorunecek\");\n\t \tGooglePlayServicesUtil.getErrorDialog(resultCode, this, PLAY_SERVICES_RESOLUTION_REQUEST).show();\n\t \tLog.i(Globals.TAG, \"dialog kapandi\");\n\t }\n\t else\n\t {\n\t\t\tLog.i(Globals.TAG, \"This device is not supported.\");\n\t\t\tint RQS_GooglePlayServices = 1;\n\t\t\t GooglePlayServicesUtil.getErrorDialog(resultCode, this, RQS_GooglePlayServices);\n\t\t\tfinish();\n\t }\n\t return false;\n\t}\n\treturn true;\n }", "private boolean checkPlayServices() {\n\t\tint resultCode = GooglePlayServicesUtil\n\t\t\t\t.isGooglePlayServicesAvailable(context);\n\t\tif (resultCode != ConnectionResult.SUCCESS) {\n\t\t\tif (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n\t\t\t\tGooglePlayServicesUtil.getErrorDialog(resultCode, context,\n\t\t\t\t\t\tPLAY_SERVICES_RESOLUTION_REQUEST).show();\n\t\t\t} else {\n\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\"This device is not supported.\", Toast.LENGTH_LONG)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean isGooglePlayServicesAvailable() {\n\t\tint resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\t\t// If Google Play services is available\n\t\tif (ConnectionResult.SUCCESS == resultCode) {\n\t\t\t// In debug mode, log the status\n\t\t\tLog.d(\"Location Updates\", \"Google Play services is available.\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// Get the error dialog from Google Play services\n\t\t\tDialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n\t\t\t\t\tCONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t\t// If Google Play services can provide an error dialog\n\t\t\tif (errorDialog != null) {\n\t\t\t\t// Create a new DialogFragment for the error dialog\n\t\t\t\tErrorDialogFragment errorFragment = new ErrorDialogFragment();\n\t\t\t\terrorFragment.setDialog(errorDialog);\n\t\t\t\terrorFragment.show(getSupportFragmentManager(), \"Location Updates\");\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean checkPlayServices() {\n\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n\n int resultCode = googleApiAvailability.isGooglePlayServicesAvailable(context);\n\n if (resultCode != ConnectionResult.SUCCESS) {\n if (googleApiAvailability.isUserResolvableError(resultCode)) {\n googleApiAvailability.getErrorDialog(map_actvity,resultCode,\n PLAY_SERVICES_REQUEST).show();\n } else {\n showToast(\"This device is not supported.\");\n }\n return false;\n }\n return true;\n }", "private boolean servicesOK() {\n GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();\n int result = googleAPI.isGooglePlayServicesAvailable(this);\n if (result != ConnectionResult.SUCCESS) {\n if (googleAPI.isUserResolvableError(result)) {\n }\n return false;\n }\n return true;\n }", "public boolean isGooglePlayServicesAvailable() {\n final int connectionStatusCode =\n GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n if (GooglePlayServicesUtil.isUserRecoverableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n return false;\n } else if (connectionStatusCode != ConnectionResult.SUCCESS ) {\n return false;\n }\n return true;\n }", "public boolean googleServicesAvailable() {\n GoogleApiAvailability api = GoogleApiAvailability.getInstance();\n int isAvailable = api.isGooglePlayServicesAvailable(this);\n\n if (isAvailable == ConnectionResult.SUCCESS) {\n return true;\n } else if (api.isUserResolvableError(isAvailable)) {\n Dialog dialog = api.getErrorDialog(this, isAvailable, 0);\n dialog.show();\n } else {\n Toast.makeText(this, \"Can't connect to play services\", Toast.LENGTH_LONG).show();\n }\n return false;\n }", "public boolean isGooglePlayAvailable() {\n GoogleApiAvailability api= GoogleApiAvailability.getInstance();\n int isAvailable= api.isGooglePlayServicesAvailable(this);\n\n if (isAvailable == ConnectionResult.SUCCESS) {\n return true;\n }else if (api.isUserResolvableError(isAvailable)){\n Dialog dialog= api.getErrorDialog(this, isAvailable, 0);\n dialog.show();\n }else {\n Toast.makeText(this,\"Can't connect to Play Services\",Toast.LENGTH_LONG).show();\n }\n return false;\n }", "public boolean isGooglePlayServicesAvailable() {\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n int status = googleApiAvailability.isGooglePlayServicesAvailable(this);\n if (status != ConnectionResult.SUCCESS) {\n if (googleApiAvailability.isUserResolvableError(status)) {\n googleApiAvailability.getErrorDialog(this, status, 2404).show();\n }\n return false;\n }\n return true;\n }", "public static boolean checkPlayServices(Context context) {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, (Activity) context, resultCode);\n } else {\n Log.i(TAG, \"This device is not supported.\");\n }\n return false;\n }\n return true;\n }", "public boolean checkPlayServices(Activity a) {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(a);\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n GooglePlayServicesUtil.getErrorDialog(resultCode, a,\n PLAY_SERVICES_RESOLUTION_REQUEST).show();\n }\n return false;\n }\n return true;\n }", "public boolean googleServiceCheck() {\n int isServiceAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (isServiceAvailable == ConnectionResult.SUCCESS) {\n return true;\n } else if (GooglePlayServicesUtil.isUserRecoverableError(isServiceAvailable)) {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isServiceAvailable, this, GPS_ERROR_DIALOG_REQUEST);\n dialog.show();\n } else {\n Toast.makeText(this, \"Can't connect to Google Play Service\", Toast.LENGTH_SHORT).show();\n }\n return false;\n }", "int isPlayServicesAvailable() {\n if (mGoogleApiAvailability_class != null) {\n String errorMsg;\n Throwable throwable;\n try {\n Method getInstance_method = mGoogleApiAvailability_class.getDeclaredMethod(\"getInstance\");\n Object googleApiAvailabilityInstance = getInstance_method.invoke(null);\n\n Method isPlayServicesAvailable_method = mGoogleApiAvailability_class.getDeclaredMethod(\n \"isGooglePlayServicesAvailable\", Context.class);\n Integer result = (Integer) isPlayServicesAvailable_method.invoke(googleApiAvailabilityInstance, mContext);\n Log.d(TAG, \"isPlayServicesAvailable(): isGooglePlayServicesAvailable returned: \" + result);\n switch (result) {\n case 0:\n //success\n return PLAY_SERVICES_AVAILABLE;\n case 2:\n //version update required\n return PLAY_SERVICES_SERVICE_VERSION_UPDATE_REQUIRED;\n default:\n //everything else\n return PLAY_SERVICES_UNAVAILABLE;\n }\n } catch (NoSuchMethodException e) {\n // in this case,\n errorMsg = \"isPlayServicesAvailable(): Unable to find method. This is an \" +\n \"incompatibility between Google Play Services and Magnet.\";\n throwable = e;\n } catch (InvocationTargetException e) {\n errorMsg = \"isPlayServicesAvailable(): Unable to invoke method. This is an \" +\n \"incompatibility between Google Play Services and Magnet.\";\n throwable = e;\n } catch (IllegalAccessException e) {\n errorMsg = \"isPlayServicesAvailable(): Unable to access method. This is an \" +\n \"incompatibility between Google Play Services and Magnet.\";\n throwable = e;\n } catch (Exception e) {\n errorMsg = \"isPlayServicesAvailable(): Unknown error occurred.\";\n throwable = e;\n }\n Log.e(TAG, errorMsg, throwable);\n return PLAY_SERVICES_MAGNET_VERSION_INCOMPATIBILITY;\n } else {\n return PLAY_SERVICES_UNAVAILABLE;\n }\n }", "public void checkGplayServices(){\n Log.d(TAG, \"checkGplayServices: To check for token!\");\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());\n\n if (resultCode != ConnectionResult.SUCCESS) {\n if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {\n Toast.makeText(getApplicationContext(), \"Google Play Service is not install/enabled in this device!\", Toast.LENGTH_LONG).show();\n GooglePlayServicesUtil.showErrorNotification(resultCode, getApplicationContext());\n\n } else {\n Toast.makeText(getApplicationContext(), \"This device does not support for Google Play Service!\", Toast.LENGTH_LONG).show();\n }\n } else {\n Intent intent1;\n if(SharedPreferencesManage.getInstance().getToken()==null) {\n intent1 = new Intent(this, GCMRegistrationIntentService.class);\n startService(intent1);\n Log.d(TAG, \"user to be registered start service\");\n }else\n Log.d(TAG, \"already registered user with token: \"+SharedPreferencesManage.getInstance().getToken());\n\n }\n }", "private boolean supportsGooglePlayServices() {\n return GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) ==\n ConnectionResult.SUCCESS;\n }", "private boolean supportsGooglePlayServices() {\n return GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) ==\n ConnectionResult.SUCCESS;\n }", "private boolean servicesConnected(Activity activity) {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(activity);\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n return true;\n // Google Play services was not available for some reason.\n // resultCode holds the error code.\n } else {\n // Get the error dialog from Google Play services\n Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, activity, LocationFailureHandler.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n // If Google Play services can provide an error dialog\n if (errorDialog != null) {\n \terrorDialog.show();\n } else {\n }\n return false;\n }\n }", "private boolean servicesConnected() {\n int resultCode =\n GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n return true;\n // Google Play services was not available for some reason\n } else {\n return false;\n }\n }", "private boolean servicesConnected() {\n int resultCode =\n GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n\n // In debug mode, log the status\n Log.d(GeofenceUtils.APPTAG, getString(R.string.play_services_available));\n\n // Continue\n return true;\n\n // Google Play services was not available for some reason\n } else {\n\n // Display an error dialog\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n if (dialog != null) {\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n errorFragment.setDialog(dialog);\n errorFragment.show(getSupportFragmentManager(), GeofenceUtils.APPTAG);\n }\n return false;\n }\n }", "private boolean servicesConnected() {\n int resultCode =\n GooglePlayServicesUtil.\n isGooglePlayServicesAvailable(this);\n // If Google Play services is available\n if (ConnectionResult.SUCCESS == resultCode) {\n // In debug mode, log the status\n Log.d(\"Location Updates\",\n \"Google Play services is available.\");\n // Continue\n return true;\n // Google Play services was not available for some reason.\n // resultCode holds the error code.\n } else {\n return false;\n }\n }", "private boolean servicesConnected() {\n\t\tint resultCode =\n\t\t\t\tGooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n\t\t// If Google Play services is available\n\t\tif (ConnectionResult.SUCCESS == resultCode) {\n\t\t\t// In debug mode, log the status\n\t\t\tLog.d(LocationUtils.APPTAG, getString(R.string.play_services_available));\n\n\t\t\t// Continue\n\t\t\treturn true;\n\t\t\t// Google Play services was not available for some reason\n\t\t} else {\n\t\t\t// Display an error dialog\n\t\t\tDialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n\t\t\tif (dialog != null) {\n\t\t\t\tErrorDialogFragment errorFragment = new ErrorDialogFragment();\n\t\t\t\terrorFragment.setDialog(dialog);\n\t\t\t\terrorFragment.show(getSupportFragmentManager(), LocationUtils.APPTAG);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean servicesConnected() {\n\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (ConnectionResult.SUCCESS == resultCode) {\n // In debug mode, log the status\n Log.d(ClientSideUtils.APPTAG, getString(R.string.play_services_available));\n return true;\n \n } else {\n // Display an error dialog\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n if (dialog != null) {\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n errorFragment.setDialog(dialog);\n errorFragment.show(getSupportFragmentManager(), ClientSideUtils.APPTAG);\n }\n return false;\n }\n }", "public boolean isGoogleServicesWorking() {\n int available = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this);\n if (available == ConnectionResult.SUCCESS) {\n return true;\n } else if (GoogleApiAvailability.getInstance().isUserResolvableError(available)) {\n Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(this, available, ERROR_DIALOG_REQ);\n dialog.show();\n } else {\n Toast.makeText(this, \"You can't make map requests\", Toast.LENGTH_SHORT).show();\n }\n return false;\n }", "private boolean servicesConnected() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (ConnectionResult.SUCCESS == resultCode) {\n return true;\n }\n else {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);\n if (dialog != null) {\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\n errorFragment.setDialog(dialog);\n errorFragment.show(getSupportFragmentManager(), Constants.APPTAG);\n }\n return false;\n }\n }", "@Override\n protected void onStart() {\n super.onStart();\n\n\n GoogleApiAvailability GMS_Availability = GoogleApiAvailability.getInstance();\n int GMS_CheckResult = GMS_Availability.isGooglePlayServicesAvailable(this);\n\n if (GMS_CheckResult != ConnectionResult.SUCCESS) {\n\n // Would show a dialog to suggest user download GMS through Google Play\n GMS_Availability.getErrorDialog(this, GMS_CheckResult, 1).show();\n }else{\n mGoogleApiClient.connect();\n }\n }", "private boolean isServiceOk(){\n Log.d(TAG, \"isServiceOk: checking google service version\");\n\n int available = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(FormularioCurso.this);\n\n if (available == ConnectionResult.SUCCESS){\n //Everything is fine and the user can make map request\n return true;\n } else if(GoogleApiAvailability.getInstance().isUserResolvableError(available)){\n //an error ocured but we can resolt it\n Log.d(TAG, \"isServiceOk: an error occures but we can fix it\");\n Dialog dialog = GoogleApiAvailability.getInstance().getErrorDialog(FormularioCurso.this, available, ERROR_DIALOG_REQUEST);\n dialog.show();\n }else{\n Toast.makeText(this, \"You can't make map request\", Toast.LENGTH_SHORT).show();\n }\n return false;\n }", "private boolean servicesConnected() {\n\t\tint resultCode = GooglePlayServicesUtil\n\t\t\t\t.isGooglePlayServicesAvailable(this);\n\t\tif (resultCode == ConnectionResult.SUCCESS) {\n\t\t\t// In debug mode, log the status\n\t\t\tLog.d(TAG, \"Google Play services is available.\");\n\t\t\tmGooglePlayServicesAvailable = true;\n\t\t} else {\n\t\t\tLog.e(TAG, \"could not connect to Google Play services, error \"\n\t\t\t\t\t+ String.valueOf(resultCode));\n\t\t\tmGooglePlayServicesAvailable = false;\n\t\t}\n\t\treturn mGooglePlayServicesAvailable;\n\t}", "private boolean isEnablePlayService() {\n GoogleApiAvailability mGoogleAPI = GoogleApiAvailability.getInstance();\n int mResultCodeAPI = mGoogleAPI.isGooglePlayServicesAvailable(this);\n if(mResultCodeAPI!= ConnectionResult.SUCCESS) {\n if (mGoogleAPI.isUserResolvableError(mResultCodeAPI)) {\n mGoogleAPI.getErrorDialog(this, mResultCodeAPI, PLAY_SERVICES_RESOLUTION_REQUEST)\n .show();\n } else {\n // device not support Google Play Services\n finish();\n }\n return false;\n }\n\n return true;\n }", "@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t\tint resCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (resCode != ConnectionResult.SUCCESS)\n\t\t{\n\t\t\tGooglePlayServicesUtil.getErrorDialog(resCode, this, 1);\n\t\t}\n\t}", "@Override\n protected void notifyUserOnPlayServicesUnavailable() {\n final View rootView = findViewById(R.id.root_layout);\n if (rootView == null) return;\n Snackbar.make(rootView, R.string.google_play_services_error, Snackbar.LENGTH_LONG)\n .show();\n }", "@java.lang.Override\n public boolean hasGoogleService() {\n return stepInfoCase_ == 24;\n }", "protected void SetupGoogleServices()\n {\n if (mGoogleApiClient == null)\n {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }", "@java.lang.Override\n public boolean hasGoogleService() {\n return stepInfoCase_ == 24;\n }", "boolean hasIsGoogleCn();", "int isGcmAvailable() {\n if (mGoogleCloudMessaging_class != null) {\n return PLAY_SERVICES_AVAILABLE;\n }\n return PLAY_SERVICES_UNAVAILABLE;\n }", "public void check() {\n String provider = Settings.Secure.getString(context.getContentResolver(),\n Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n if (!provider.equals(\"\")) {\n checkConnectivity();\n } else {\n showDialog();\n }\n }", "private void getResultsFromApi() {\r\n if (!isGooglePlayServicesAvailable()) {\r\n acquireGooglePlayServices();\r\n } else if (mCredential.getSelectedAccountName() == null) {\r\n chooseAccount();\r\n } else if (!isDeviceOnline()) {\r\n Toast.makeText(getActivity(), \"No network connection available.\", Toast.LENGTH_LONG).show();\r\n } else {\r\n new MakeRequestTask(mCredential).execute();\r\n }\r\n }", "boolean hasGoogleAds();", "private void getResultsFromApi() {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else if (! isDeviceOnline()) {\n\n Toast.makeText(getApplicationContext(), \"No Network Connection\",\n Toast.LENGTH_SHORT).show();\n mOutputText.setText(\"No network connection available.\");\n } else {\n new MakeRequestTask(mCredential).execute();\n }\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n\n /** Getting Google Play availability status **/\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n if(status!= ConnectionResult.SUCCESS){ // Google Play Services are not available\n\n int requestCode = 10;\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(status, MainActivity.this, requestCode);\n dialog.show();\n\n }\n else { /** Google Play Services are available **/\n\n pb = (ProgressBar)findViewById(R.id.progressBar);\n progress_status = 0;\n\n // show the ProgressBar\n pb.setVisibility(View.VISIBLE);\n\n // update progress\n pb.setProgress(progress_status);\n tvResult.setText(\"downloading 0%\");\n }\n }", "private void requestConnection() {\n getGoogleApiClient().connect();\n }", "private void checkForCarServiceConnection() {\r\n synchronized (mLock) {\r\n if (mCarService != null) {\r\n return;\r\n }\r\n }\r\n IBinder iBinder = ServiceManager.checkService(\"car_service\");\r\n if (iBinder != null) {\r\n if (DBG) {\r\n Slog.d(TAG, \"Car service found through ServiceManager:\" + iBinder);\r\n }\r\n handleCarServiceConnection(iBinder);\r\n }\r\n }", "private void initializeAndConnectGoogleApi() {\n if (googleApiClient != null) {\n googleApiClient.stopAutoManage(this);\n googleApiClient.disconnect();\n }\n googleApiClient = new GoogleApiClient\n .Builder(this)\n .enableAutoManage(this, 0, this)\n .addApi(Places.GEO_DATA_API)\n .addApi(Places.PLACE_DETECTION_API)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n // Connect if it's not\n if (!googleApiClient.isConnected()) {\n googleApiClient.connect();\n }\n }", "public static void openGooglePlayServicesInGooglePlay(final Context context) {\n\t Uri uri = Uri.parse(\"market://details?id=com.google.android.gms\");\n\t Intent myAppLinkToMarket = new Intent(Intent.ACTION_VIEW, uri);\n\t try {\n\t \tcontext.startActivity(myAppLinkToMarket);\n\t } catch (ActivityNotFoundException e) {\n\t Toast.makeText(context, \"Unable to find app in Google Play\", Toast.LENGTH_SHORT).show();\n\t }\n\t}", "private void startStep1() {\n\n //Check whether this user has installed Google play service which is being used by Location updates.\n if (isGooglePlayServicesAvailable()) {\n\n //Passing null to indicate that it is executing for the first time.\n startStep2(null);\n\n } else {\n Toast.makeText(getApplicationContext(), R.string.no_google_playservice_available, Toast.LENGTH_LONG).show();\n }\n }", "boolean getIsGoogleCn();", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(getActivity())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n createLocationRequest();\n LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder()\n .addLocationRequest(mLocationRequest);\n PendingResult<LocationSettingsResult> result =\n LocationServices.SettingsApi.checkLocationSettings(mGoogleApiClient, builder.build());\n result.setResultCallback(this);\n }", "private void setUpMapIfNeeded() {\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n mMap = mMapFragment.getMap();\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n Log.i(TAG, \"Yes, we have a google map...\");\n setUpMap();\n } else {\n // means that Google Service is not available\n form.dispatchErrorOccurredEvent(this, \"setUpMapIfNeeded\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n }\n\n }\n }", "private void initializeGoogleApiClient() {\n\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(getContext())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n\n }", "public void getResultsFromApi() {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n mFragment.chooseAccount();\n } else if (! isDeviceOnline()) {\n // mOutputText.setText(\"No network connection available.\");\n } else if (mService == null){\n Log.d(Util.TAG_GOOGLE, mCredential.getSelectedAccountName());\n HttpTransport transport = AndroidHttp.newCompatibleTransport();\n JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();\n mService = new com.google.api.services.gmail.Gmail.Builder(\n transport, jsonFactory, mCredential)\n .setApplicationName(\"Gmail API Android Quickstart\")\n .build();\n mFragment.readEmails();\n }\n }", "private void checkIntentHelperInitializedAndReliabilityTrackingEnabled() {\n mFakeIntentHelper.assertInitialized(UPDATE_APP_PACKAGE_NAME, DATA_APP_PACKAGE_NAME);\n\n // Assert that reliability tracking is always enabled after initialization.\n mFakeIntentHelper.assertReliabilityTriggerScheduled();\n }", "protected void getResultsFromApi(SheetsTaskListener listener) {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else if (! isDeviceOnline()) {\n Toast.makeText(getApplicationContext(), R.string.str_no_network, Toast.LENGTH_LONG).show();\n finish();\n } else {\n new MakeRequestTask(mCredential, listener).execute();\n }\n }", "public boolean isGoogleMapsInstalled()\n {\n try\n {\n ApplicationInfo info = getPackageManager().getApplicationInfo(\"com.google.android.apps.maps\", 0 );\n return true;\n }\n catch(PackageManager.NameNotFoundException e)\n {\n return false;\n }\n }", "@Override\n public void onCreate() {\n super.onCreate();\n\n Integer response = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (response != ConnectionResult.SUCCESS) {\n Log.d(\"LocationUpdateService\", \"Google Play services unavailable\");\n stopSelf();\n return;\n }\n\n locationClient = new LocationClient(this, this, this);\n }", "void showGooglePlayServicesAvailabilityErrorDialog(\n final int connectionStatusCode) {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(\n connectionStatusCode,\n context,\n REQUEST_GOOGLE_PLAY_SERVICES);\n dialog.show();\n }", "boolean hasThirdPartyAppAnalytics();", "public void getResultsFromApi() {\n// if (! isGooglePlayServicesAvailable()) {\n// acquireGooglePlayServices();\n// } else if (mCredential.getSelectedAccountName() == null) {\n// chooseAccount();\n// } else if (! isDeviceOnline()) {\n//// mOutputText.setText(\"No network connection available.\");\n// } else {\n MakeRequestTask req = new MakeRequestTask(mCredential);\n AsyncTaskCompat.executeParallel(req);\n// }\n }", "public interface IGoogleServices {\n void signIn();\n void signOut();\n void changeUser();\n boolean isConnected();\n boolean isConnecting();\n}", "protected synchronized void buildGoogleApiClient() {\n //Confirms no instance of GoogleApiClient has been instantiated\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }", "void showGooglePlayServicesAvailabilityErrorDialog(\n final int connectionStatusCode) {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n Dialog dialog = apiAvailability.getErrorDialog(\n MainActivity.this,\n connectionStatusCode,\n REQUEST_GOOGLE_PLAY_SERVICES);\n dialog.show();\n }", "void showGooglePlayServicesAvailabilityErrorDialog(\r\n final int connectionStatusCode) {\r\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n Dialog dialog = apiAvailability.getErrorDialog(getActivity(), connectionStatusCode,\r\n REQUEST_GOOGLE_PLAY_SERVICES);\r\n dialog.show();\r\n }", "public boolean isGooglePageLoaded() throws Exception {\n\n\t\tWebElement icoGoogleSearch = driver.findElement(By\n\t\t\t\t.cssSelector(\"#hplogo\"));\n\t\tWebElement txtGoogleSearchField = driver.findElement(By\n\t\t\t\t.cssSelector(\"#lst-ib\"));\n\t\tWebElement btnGoogleSearch = driver.findElement(By\n\t\t\t\t.cssSelector(\"[value~=Google]\"));\n\t\tWebElement btnGoogleImFeelingLucky = driver.findElement(By\n\t\t\t\t.cssSelector(\"[value~=Feeling]\"));\n\t\tint count = 0;\n\n\t\twhile (!icoGoogleSearch.isDisplayed() || count == 5) {\n\t\t\tThread.sleep(1000);\n\t\t\tcount++;\n\t\t}\n\n\t\tif (!icoGoogleSearch.isDisplayed())\n\t\t\tthrow new NoSuchElementException(\n\t\t\t\t\t\"Google Search Logo is not displayed\");\n\t\tif (!txtGoogleSearchField.isDisplayed())\n\t\t\tthrow new NoSuchElementException(\n\t\t\t\t\t\"Google Search Text Field is not displayed\");\n\t\tif (!btnGoogleSearch.isDisplayed())\n\t\t\tthrow new NoSuchElementException(\n\t\t\t\t\t\"Google Search Button is not displayed\");\n\t\tif (!btnGoogleImFeelingLucky.isDisplayed())\n\t\t\tthrow new NoSuchElementException(\n\t\t\t\t\t\"I'm Feeling Lucky button is not displayed\");\n\n\t\treturn true;\n\t}", "private void checkLocationConnection() {\n LocationManager locationManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);\n String message = \"\";\n\n // prepare output message to indicate whether location services are enabled\n try {\n message = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) ?\n \"Location Services are enabled!\" :\n \"Location Services are not enabled!\";\n } catch(Exception e) { e.printStackTrace(); }\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void onActivityResult(\r\n int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n switch (requestCode) {\r\n case REQUEST_GOOGLE_PLAY_SERVICES:\r\n if (resultCode != RESULT_OK) {\r\n Log.i(TAG,\"This app requires Google Play Services. Please install \" +\r\n \"Google Play Services on your device and relaunch this app.\");\r\n Toast.makeText(getActivity(),\r\n \"This app requires Google Play Services. Please install \" +\r\n \"Google Play Services on your device and relaunch this app.\", Toast.LENGTH_LONG).show();\r\n } else {\r\n getResultsFromApi();\r\n }\r\n break;\r\n case REQUEST_ACCOUNT_PICKER:\r\n if (resultCode == RESULT_OK && data != null &&\r\n data.getExtras() != null) {\r\n String accountName =\r\n data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);\r\n if (accountName != null) {\r\n SharedPreferences settings =\r\n getActivity().getPreferences(Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = settings.edit();\r\n editor.putString(PREF_ACCOUNT_NAME, accountName);\r\n editor.apply();\r\n mCredential.setSelectedAccountName(accountName);\r\n getResultsFromApi();\r\n }\r\n }\r\n break;\r\n case REQUEST_AUTHORIZATION:\r\n if (resultCode == RESULT_OK) {\r\n getResultsFromApi();\r\n }\r\n break;\r\n }\r\n }", "void showGooglePlayServicesAvailabilityErrorDialog(\n final int connectionStatusCode) {\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\n Dialog dialog = apiAvailability.getErrorDialog(\n getActivity(),\n connectionStatusCode,\n REQUEST_GOOGLE_PLAY_SERVICES);\n dialog.show();\n }", "void checkForAccServices();", "@Override\n protected void onStart() {\n super.onStart();\n idsession = MyModel.getInstance().getIdsession();\n\n //Check if GooglePlayServices are available\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n int status = googleApiAvailability.isGooglePlayServicesAvailable(this);\n if(status == ConnectionResult.SUCCESS) {\n Log.d(\"GeoPost Location\", \"GooglePlayServices available\");\n } else {\n Log.d(\"GeoPost Location\", \"GooglePlayServices UNAVAILABLE\");\n if(googleApiAvailability.isUserResolvableError(status)) {\n Log.d(\"GeoPost Location\", \"Ask the user to fix the problem\");\n //If the user accepts to install the google play services,\n //a new app will open. When the user gets back to this activity,\n //the onStart method is invoked again.\n googleApiAvailability.getErrorDialog(this, status, 2404).show();\n } else {\n Log.d(\"GeoPost Location\", \"The problem cannot be fixed\");\n }\n }\n\n // Instantiate and connect GoogleAPIClient.\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n mGoogleApiClient.connect();\n }" ]
[ "0.83058625", "0.7986371", "0.78489023", "0.7820222", "0.7820222", "0.7820222", "0.7813137", "0.7810634", "0.78045356", "0.7762056", "0.769395", "0.7686338", "0.75719917", "0.7515432", "0.75133353", "0.7502103", "0.7502103", "0.7501713", "0.7501223", "0.7500175", "0.7499079", "0.7492239", "0.7492239", "0.7473054", "0.7461332", "0.74593747", "0.74533325", "0.74505043", "0.74171937", "0.74022716", "0.73987335", "0.7398007", "0.7396384", "0.7377637", "0.73629445", "0.7357351", "0.7349977", "0.734755", "0.73465145", "0.7334884", "0.73150855", "0.7304192", "0.7289819", "0.7285777", "0.726144", "0.7250927", "0.7185427", "0.7054111", "0.7054111", "0.6958212", "0.6818295", "0.6800778", "0.6798275", "0.67528594", "0.67111576", "0.6689804", "0.66885406", "0.6556875", "0.65546143", "0.65464854", "0.6477428", "0.6272167", "0.6264082", "0.62316865", "0.617404", "0.6166552", "0.6127228", "0.60843873", "0.60308385", "0.6008806", "0.6003299", "0.5901952", "0.57799435", "0.57350856", "0.5717935", "0.5636939", "0.5599806", "0.5447612", "0.5434888", "0.54267436", "0.542347", "0.53886104", "0.53378224", "0.53372186", "0.53371185", "0.5332654", "0.53210455", "0.5320409", "0.5319735", "0.5313278", "0.53104246", "0.53030735", "0.5299964", "0.5281742", "0.52659774", "0.52598375", "0.52526265", "0.5249301", "0.52397317", "0.5238145" ]
0.6631782
57
Get the current order NOTE: This bean should be request scoped, however time ran out and this temporal (and not completely working) solution had to make due
public Order getOrder() { return order; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Order getOrder()\n {\n return orderController.getOrder(getOrderNumber());\n }", "public int getCurrentOrderNumber() {\n return this.currentOrderNumber;\n }", "public String getCurrentOrderId() {\n return currentOrderId;\n }", "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 getOrder()\n\t{\n\t\treturn getOrder( getSession().getSessionContext() );\n\t}", "Order getOrder();", "public Order getOrder() {\n return this.order;\n }", "public CustomerOrder getOrder() {\n return (CustomerOrder) get(\"order\");\n }", "public Order getOrder(final SessionContext ctx)\n\t{\n\t\treturn (Order)getProperty( ctx, ORDER);\n\t}", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public String showCurrentOrder(){\n stringBuilder = new StringBuilder();\n for (int i = 0; i < OrderManager.getInstance().getOrder().size(); i++) {\n stringBuilder.append((i + 1) + \". \" + OrderManager.getInstance().getOrder().get(i).toString() + \"\\n\");\n }\n return stringBuilder.toString();\n }", "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}", "public Integer getOrder() {\n return order;\n }", "public Integer getOrder() {\n return order;\n }", "public Integer getOrder() {\n return order;\n }", "public void readOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n Object orderIdParam = session.getAttribute(\"orderId\");\n orderId = null;\n if(orderIdParam != null) {\n orderId = Integer.parseInt(orderIdParam.toString().trim());\n }\n }", "public long getOrderNumber()\n {\n return _orderNumber;\n }", "public List<Order> getOrder() {\n return order;\n }", "public String getOrder() {\n return this.Order;\n }", "@Override\r\n\tpublic Order getOrder() {\n\t\treturn null;\r\n\t}", "public int getOrder() {\n return order;\n }", "public int getOrder() {\n return order;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Integer getOrder() {\n\t\treturn order;\n\t}", "public String getOrderReference() {\n return orderReference;\n }", "int getOrder(){\r\n\t\t\treturn this.order;\r\n\t\t}", "@Override\n\tpublic Order getOrder() {\n\t\treturn null;\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}", "public int getOrderId() {\n return orderId;\n }", "public String getServiceOrderNumber() {\n return serviceOrderNumber.get();\n }", "@VTID(10)\r\n int getOrder();", "public Integer getOrder();", "public final Integer getOrder() {\n return this.order;\n }", "public org.datacontract.schemas._2004._07.cdiscount_service_marketplace_api_external_contract_data_order.ExternalOrder getOrder()\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().find_element_user(ORDER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "String getOrderId();", "public Integer getOrderId() {\n return orderId;\n }", "public int getOrderNumber() {\n return orderNumber;\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 DateOrder getDateOrder()\r\n {\r\n return (m_dateOrder);\r\n }", "public Integer getOrderNumber()\n {\n return orderNum;\n }", "public Date getOrderTime() {\n return orderTime;\n }", "public int getOrder() {\r\n\t\treturn order;\r\n\t}", "public int getOrder();", "public Long getOrderNo () {\r\n\t\treturn orderNo;\r\n\t}", "public int getOrder() {\n\t\treturn order;\n\t}", "public void queryCurrent() {\n if (this.bizOrderIds != null && this.currentID >= 0 && this.currentID < this.bizOrderIds.size()) {\n BusinessRequest.getBusinessRequest().requestOrderDetail(Long.valueOf(Long.parseLong(this.bizOrderIds.get(this.currentID))), new BizRequestListener<OrderDetailMO>(new WeakReference((BaseActivity) this.mActivityContext)) {\n public boolean onError(int resultCode, String msg) {\n QRDialog.this.queryAgain();\n return true;\n }\n\n public void onSuccess(OrderDetailMO data) {\n QRDialog.this.results[QRDialog.this.currentID] = data;\n if ((!\"BUYER_PAYED_DEPOSIT\".equals(data.getOrderInfo().getOrderStatusCode()) || QRDialog.this.prePay) && !\"WAIT_BUYER_PAY\".equals(data.getOrderInfo().getOrderStatusCode())) {\n QRDialog.this.queryNext();\n } else {\n QRDialog.this.queryAgain();\n }\n }\n\n public boolean ifFinishWhenCloseErrorDialog() {\n return false;\n }\n });\n }\n }", "public Integer getOrderIndex() {\n return orderIndex;\n }", "public int getOrder() {\n return mOrder;\n }", "public Date getOrderDate() {\n return orderDate;\n }", "public Date getOrderDate() {\n return orderDate;\n }", "static orders getOrder(String uid) {\n return null;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public Date getOrdertime() {\n return ordertime;\n }", "public ShoppingCart getOrderInSession(HttpServletRequest request) {\n\t\tShoppingCart cart = (ShoppingCart) request.getSession().getAttribute(\"shoppingCart\");\n\t\treturn cart;\n\t\t\n\t}", "public Order getOrderById(long orderId);", "@Override\r\n public int getOrder() {\r\n return this.order;\r\n }", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "public java.lang.String getOrderStatus(){\n return localOrderStatus;\n }", "Order getOrderStatus(OrderStatusRequest orderStatusRequest);", "public Date getDate() {\n return order.getDate();\n }", "public int getId() {\n return orderID;\n }", "public String getOrderNo() {\n return orderNo;\n }", "public OrderStatus getStatus() {\n return this.status;\n }", "public int getOrderID() {\n return orderID;\n }", "public Long getOrdermoney() {\n return ordermoney;\n }", "public Long getOrderid() {\r\n return orderid;\r\n }", "public java.util.List<ResourceReferenceDt> getOrderElement() { \n\t\tif (myOrder == null) {\n\t\t\tmyOrder = new java.util.ArrayList<ResourceReferenceDt>();\n\t\t}\n\t\treturn myOrder;\n\t}", "public String processOrder() {\n notifyAllObservers();\n\n return getOrderReport();\n }", "public String getOrderID() {return orderID;}", "public int getQuantity() { \n return myOrderQuantity;\n }", "public BigDecimal getOrderMoney() {\n return orderMoney;\n }", "public String getOrderNumber() {\n return orderNumber;\n }", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "@Bean\n public DirectExchange orderExchange(){\n return new DirectExchange(orderExchange);\n }", "Order getOrder(int id) throws ServiceException;", "public int getOrderID() {\r\n return emporderID;\r\n }", "public String getServicingOrderServicingSessionReference() {\n return servicingOrderServicingSessionReference;\n }", "@JsonGetter(\"orderId\")\r\n public int getOrderId ( ) { \r\n return this.orderId;\r\n }", "public String getOrderID() {\n\t\treturn this.token.get(\"orderID\").toString();\n\t}", "OrderType getOrderType();", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "public OrderRecord getRunningOrder(int iID){\n\t\treturn hmRunningOrder.get(iID);\n\t}", "public Short getOrderNo() {\n return orderNo;\n }", "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 }", "public List<Order> getPending() {\n\t\treturn orderDao.getPendingToOrder();\n\t}", "public List<Order> getOrders(){\n return this.orders;\n }", "public ArrayList<Order> getCurrentSelection(){\n\t\t return this.currentSelection;\n\t }", "ReadOnlyOrderManager getOrderManager();", "String getOrderDate(){\n\t\treturn this.orderDate;\n\t}", "public Date getOrderTime();", "public PaginationDataSelector<Order> getOrderPaginationDataSelector() {\n return orderPaginationDataSelector;\n }", "public String getOrderNum() {\n return orderNum;\n }", "public String getOrderID() {\n return this.orderID;\n }", "java.lang.String getOrderDate();" ]
[ "0.75004363", "0.7134794", "0.7052668", "0.70153385", "0.69666785", "0.6795389", "0.669561", "0.66814345", "0.646723", "0.62680703", "0.62680703", "0.6230564", "0.6168387", "0.61599684", "0.61599684", "0.6134936", "0.6126152", "0.6115552", "0.61106706", "0.6109312", "0.60503143", "0.60165036", "0.60165036", "0.60016614", "0.60016614", "0.5995787", "0.5978219", "0.59745604", "0.5967999", "0.5964765", "0.5960487", "0.59336007", "0.59311306", "0.5926841", "0.5924376", "0.5906872", "0.5893636", "0.588361", "0.58700943", "0.58614045", "0.5857595", "0.58544886", "0.5841412", "0.5839488", "0.5811505", "0.58066434", "0.5803724", "0.5800182", "0.57925713", "0.57826585", "0.5756272", "0.5756272", "0.574534", "0.57326543", "0.57326543", "0.57326543", "0.5722354", "0.57035434", "0.5698432", "0.56751186", "0.5672902", "0.5668432", "0.5643296", "0.5632641", "0.5626637", "0.56235254", "0.56226546", "0.56191534", "0.5612095", "0.55983526", "0.5597777", "0.5595659", "0.5577848", "0.5577235", "0.5571487", "0.5562403", "0.5553164", "0.5553164", "0.5546845", "0.5545508", "0.55453074", "0.5519241", "0.5515705", "0.5497241", "0.5482227", "0.5480076", "0.5479408", "0.54727215", "0.5467362", "0.54561543", "0.5454051", "0.5442169", "0.5441407", "0.5441386", "0.54355484", "0.5431444", "0.5430899", "0.54242164", "0.540931", "0.53926885" ]
0.67709076
6
Get the date of the order
public Date getDate() { return order.getDate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getOrderDate();", "public String getOrderDate() {\r\n\t\treturn orderDate;\r\n\t}", "public Date getOrderDate() {\n return orderDate;\n }", "public Date getOrderDate() {\n return orderDate;\n }", "public String getOrderDate() {\n\t\treturn orderDate;\n\t}", "String getOrderDate(){\n\t\treturn this.orderDate;\n\t}", "public java.lang.String getOrderDate() {\n java.lang.Object ref = orderDate_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n orderDate_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getOrderDate() {\n java.lang.Object ref = orderDate_;\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 orderDate_ = s;\n }\n return s;\n }\n }", "public LocalDate getOrderDate() {\n return new LocalDate(this.orderDate.getMonth(), this.orderDate.getDay(), this.orderDate.getYear());\n\n }", "public Date getOrderTime();", "com.google.protobuf.ByteString\n getOrderDateBytes();", "public com.google.protobuf.ByteString\n getOrderDateBytes() {\n java.lang.Object ref = orderDate_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n orderDate_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Date getOrdertime() {\n return ordertime;\n }", "public com.google.protobuf.ByteString\n getOrderDateBytes() {\n java.lang.Object ref = orderDate_;\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 orderDate_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public DateOrder getDateOrder()\r\n {\r\n return (m_dateOrder);\r\n }", "public Date getOrderTime() {\n return orderTime;\n }", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "public Timestamp getDateOrdered() {\n\t\treturn (Timestamp) get_Value(\"DateOrdered\");\n\t}", "public Date getCheckoutDate() {\n return checkoutDate;\n }", "public Date getPAYMENT_DATE() {\r\n return PAYMENT_DATE;\r\n }", "public Date getPAYMENT_DATE() {\r\n return PAYMENT_DATE;\r\n }", "public String Get_date() \n {\n \n return date;\n }", "long getTradeDate();", "public String getSalesOrderDate() {\n\t\treturn salesOrderDate;\n\t}", "Date getDueDate();", "Date getDueDate();", "@Override\n\tpublic Date getCreated_date() {\n\t\treturn _buySellProducts.getCreated_date();\n\t}", "java.lang.String getDate();", "public Date getDateOfPurchase() {\n return dateOfPurchase;\n }", "public Timestamp getDateOrdered();", "public String getReturnDate();", "public Date getCommencDate() {\n return commencDate;\n }", "public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}", "public void setOrderDate(Date orderDate) {\n this.orderDate = orderDate;\n }", "public String getDate() {\r\n return date;\r\n }", "@Override\n public java.util.Date getCreateDate() {\n return _partido.getCreateDate();\n }", "public String getDate() {\n return date;\n }", "public Date getDueDate() {\n\t\treturn date; //changed DaTe to date\r\n\t}", "public String getPurchaseDate()\n {\n return purchaseDate;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate() {\n return date;\n }", "public String getDate(){\n\t\treturn toString();\n\t}", "Date getInvoicedDate();", "public void setOrderDate(String orderDate) {\r\n\t\tthis.orderDate = orderDate;\r\n\t}", "public int getDate() {\n return date ;\n }", "public int getDate() {\n return date;\n }", "public int getDate() {\n return date;\n }", "public Date getDeliveryDate() {\n return (Date)getAttributeInternal(DELIVERYDATE);\n }", "public String getDate()\n\t\t{\n\t\t\treturn date;\n\t\t}", "public String getDate() {\r\n\t\treturn date;\r\n\t}", "public String getDate() {\r\n\t\treturn this.date;\r\n\t}", "public String getDate() {\n return this.date;\n }", "public String getDate() {\n return this.date;\n }", "public Date getDeliveryDate() {\n return (Date) getAttributeInternal(DELIVERYDATE);\n }", "public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}", "public String getPurchaseDate() {\n return purchaseDate;\n }", "public Date getDeliveryDate() {\n return deliveryDate;\n }", "public String getDate() {\n\t\treturn date;\n\t}", "public String getDate() {\n\t\treturn date;\n\t}", "public String getDate() {\n\t\treturn this.date;\n\t}", "public long getDate() {\n return date_;\n }", "Date getCreateDate();", "Date getCreateDate();", "public String getDate(){\n\n return this.date;\n }", "public Date getDateInvoice() {\n return dateInvoice;\n }", "Date getDate();", "Date getDate();", "Date getDate();", "public long getDate() {\n return date_;\n }", "public Timestamp getPurchaseDate() {\n return purchaseDate;\n }", "public long getDate() {\n return date;\n }", "public String getOpdate() {\n return opdate;\n }", "public int getDate() {\n\t\treturn date;\n\t}", "public String getLastPaymentDate() {\n\t\treturn stateEqualMasterDao.getElementValueList(\"PAYMENT_DATE\").get(0);\n\t}", "public Date getCreateDate();", "public Date getCreateDate();", "public Date getCreateDate();", "public long getDate() {\n return date;\n }", "Date getEDate();", "public Date getBuyDate() {\n return DateUtils.copy(buyDate);\n }", "public LocalDate getDateOfPurchase() {\n return dateOfPurchase;\n }", "public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }", "@Override\n public Date getDate() {\n return date;\n }", "@Override\n\tpublic java.util.Date getPaymentDate() {\n\t\treturn _esfShooterAffiliationChrono.getPaymentDate();\n\t}", "public Date getAgcProCertiObtDate() {\n\t\treturn agcProCertiObtDate;\n\t}", "public String getDeliveryDate() {\r\n\t\treturn deliveryDate;\r\n\t}", "public java.lang.String getDate() {\n return date;\n }", "public String getdate() {\n\t\treturn date;\n\t}", "String getDate();", "String getDate();", "@Override\n\tpublic Date getDate() {\n\t\treturn this.description.getDate();\n\t}", "public String getEventDate() {\n\t\treturn date;\n\t}", "boolean hasOrderDate();", "public Date date()\n\t{\n\t\treturn this.date;\n\t}", "public String getDate(){\n return date;\n }" ]
[ "0.9013295", "0.79906946", "0.79529655", "0.79529655", "0.79378396", "0.78720474", "0.77179027", "0.76813066", "0.7460419", "0.74375296", "0.7435099", "0.7334643", "0.728327", "0.7263895", "0.7175259", "0.7084682", "0.6765448", "0.66920596", "0.66803634", "0.660618", "0.660618", "0.6605518", "0.658565", "0.65528864", "0.6521821", "0.6521821", "0.6519158", "0.645926", "0.6457489", "0.6434206", "0.64321995", "0.64271325", "0.6419214", "0.641524", "0.641524", "0.6413008", "0.6400846", "0.639334", "0.63895565", "0.6384569", "0.6363177", "0.63582903", "0.63582903", "0.63582903", "0.63582903", "0.63582903", "0.6357464", "0.63516223", "0.6350447", "0.63500834", "0.63494515", "0.63494515", "0.63444144", "0.6339794", "0.6339595", "0.633706", "0.6335509", "0.6335509", "0.6333772", "0.6325922", "0.6325443", "0.63118017", "0.63107294", "0.63107294", "0.6302419", "0.62966865", "0.62931085", "0.62931085", "0.6292167", "0.6273372", "0.62604076", "0.62604076", "0.62604076", "0.62426966", "0.62358195", "0.62330145", "0.62319416", "0.6230066", "0.6228352", "0.6217413", "0.6217413", "0.6217413", "0.6214503", "0.6214252", "0.62097573", "0.6208714", "0.62064415", "0.61934274", "0.6188551", "0.6178358", "0.61764055", "0.6167599", "0.61612415", "0.61582154", "0.61582154", "0.6152521", "0.61519194", "0.6151169", "0.61489433", "0.614256" ]
0.8318956
1
Get the user of the order
public String getUserName() { return order.getUser().getUsername(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User getUser(){\n return User.getUser(this.event.getAuthor());\n }", "public UserID getActorID\r\n \t\t(final OrderID orderID)\r\n \t\tthrows PersistenceException;", "public Long getUser() {\n return user;\n }", "@Override\n\tpublic OrderBean getUser(String email) {\n\t\treturn null;\n\t}", "List<Order> getByUser(User user);", "public String getUser() {\r\n return user;\r\n }", "User getPassedUser();", "public String getUser()\n {\n return this.user;\n }", "public String getUser()\n {\n return this.user;\n }", "public String getUser()\n {\n return this.user;\n }", "@Override\n\tpublic Long getUserId() {\n\t\treturn user.getKey().getId();\n\t}", "java.lang.String getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "public String getUser() {\n return user;\n }", "public String getUser() {\n return user;\n }", "public String getUser() {\n return user;\n }", "public String getUser() {\n return this.user;\n }", "public String getUser() {\r\n\t\treturn user;\r\n\t}", "public String getUser() {\r\n\t\treturn user;\r\n\t}", "public String getUser() {\n\t\treturn user;\n\t}", "@Override\n\tpublic IUser getUser() {\n\t\treturn getInnerObject().getUser();\n\t}", "public java.lang.String getUser() {\n return user;\n }", "private AuthenticatedUser getUser(AuthenticationContext context) {\n StepConfig stepConfig = context.getSequenceConfig().getStepMap().get(context.getCurrentStep() - 1);\n return stepConfig.getAuthenticatedUser();\n }", "@Override\n public long getUserId() {\n return _partido.getUserId();\n }", "public User getUser(){\n\t\treturn this.user;\n\t}", "public User getUser(){\r\n\t\treturn this.user;\r\n\t}", "public String getUser() {\n\t\t\treturn user;\n\t\t}", "public static String getUser() {\r\n return user;\r\n }", "public final User getUser() {\t\r\n\t\treturn this.user;\r\n\t}", "public static String getUser() {\n return user;\n }", "public String getUser(){\n \treturn user;\n }", "public String getUser()\n {\n return _user;\n }", "public User getUser() {\r\n return user;\r\n }", "public MetaUser getMetaUser(int iUser);", "java.lang.String getUserIdOne();", "public User getUser() {\n\treturn user;\n }", "public User getSpecificUser(String username);", "public User getUser(){\n\t\treturn user;\n\t}", "public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}", "public User getUser() {\r\n\t\treturn user;\r\n\t}", "public User getUser() {\r\n\t\treturn user;\r\n\t}", "public User getUser() {\r\n\t\treturn user;\r\n\t}", "public User getLoggedUser();", "User getOwner();", "public Motile getUser() {\n return user;\n }", "public User getUser() {\n\t\treturn this.user;\n\t}", "public User getUser() {\n\t\treturn this.user;\n\t}", "public User getUser() { return this.user; }", "java.lang.String getUser();", "@Override\n public User getUser() {\n return user;\n }", "@Override\n public User getUser() {\n return user;\n }", "public User getUser() {\n return user;\n }", "public User getUser() {\n return user;\n }", "public User getUser() {\n return user;\n }", "public User getUser() {\n return user;\n }", "public java.lang.String getUserId() {\n return instance.getUserId();\n }", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "public User getUser() {\n\t\treturn user;\n\t}", "String getUserId();", "String getUserId();", "private User getUser() {\r\n\t\tUserService userService = UserServiceFactory.getUserService();\r\n\t\treturn userService.getCurrentUser();\r\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.User getCallingUser();", "public User getUser(){\n return this.getAccountController().getUser();\n }", "public String getUser() {\r\n\t\treturn _userName;\r\n\t}", "User getUser();", "User getUser();", "public int getOwnUserId()\n {\n return this.ownUserId;\n }", "@Override\n\tpublic long getUserId() {\n\t\treturn model.getUserId();\n\t}", "@Override\n\tpublic long getUserId() {\n\t\treturn model.getUserId();\n\t}", "@Override\n\tpublic long getUserId() {\n\t\treturn model.getUserId();\n\t}", "com.lxd.protobuf.msg.result.user.User.User_ getUser();", "public Long getUserId() {\n return this.user.getId();\n }", "synchronized public String getUser()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getUserID();\n\t\t\t\n\t\treturn null;\n\t}", "User getUserInformation(Long user_id);", "User getUser(User user) ;", "public OrderUser findUnfinishedOrder() {\r\n\t\tAssert.isTrue(this.actorService.checkAuthority(Authority.USER));\r\n\r\n\t\tList<OrderUser> orders;\r\n\t\tOrderUser res;\r\n\t\tUser principal;\r\n\r\n\t\tprincipal = this.userService.findByPrincipal();\r\n\t\torders = new LinkedList<>(this.orderUserRepository.findUnfinishedOrder(principal.getId()));\r\n\r\n\t\tif (orders.isEmpty())\r\n\t\t\tres = this.create();\r\n\t\telse\r\n\t\t\tres = orders.get(0);\r\n\r\n\t\treturn res;\r\n\t}", "public SimpleUser getUser() {\n return user;\n }", "@Override\n\tpublic long getUserId() {\n\t\treturn _second.getUserId();\n\t}", "public UserCompact getUserOwnedBy()\n {\n return userOwnedBy;\n }", "public int getUserId() {\n return instance.getUserId();\n }", "@Override\n\tpublic ReturnedUser getrUser() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic List<UserOrderInfo> getUserOrderInfo(int userId) {\n\t\treturn odi.getUserOrderInfo(userId);\r\n\t}", "public ScrumzuUser getUser() {\n\t\treturn user;\n\t}", "public UserModel getUser() {\n return sender;\n }", "public String getUserId() {\n return userIdEditText.getText().toString();\n }", "User getCurrentLoggedInUser();", "private String getLoggedInUser() {\r\n\t\tOptional<Authentication> authentication = Optional\r\n\t\t\t\t.ofNullable(SecurityContextHolder.getContext().getAuthentication());\r\n\t\treturn authentication.map(Authentication::getPrincipal).map(obj -> (UserDetails) obj)\r\n\t\t\t\t.map(UserDetails::getUsername).orElse(null);\r\n\t}", "@Override\n public String getUserId() {\n return email;\n }", "public UserEntity getUser() {\n return user;\n }", "TrackingOrderDetails trackingOrderDetails(String username, int order_id, String role);", "private String getLoggedUser() {\n\t\torg.springframework.security.core.userdetails.User user2 = \n\t\t\t\t(org.springframework.security.core.userdetails.User) \n\t\t\t\tSecurityContextHolder.getContext().getAuthentication().getPrincipal();\n\t\tString name = user2.getUsername();\n\t\treturn name;\n\t}", "public User getUser() {\n\t\treturn mUser;\n\t}", "public String getFromUser(){\r\n\t\treturn fromUser;\r\n\t}", "@Override\n\tpublic String getUserId() {\n\t\treturn super.getUserId();\n\t}", "public String getUserAccount() {\n return sessionData.getUserAccount();\n }" ]
[ "0.6661626", "0.65591323", "0.65062743", "0.64976203", "0.64765716", "0.64634454", "0.64452225", "0.64219695", "0.64219695", "0.64219695", "0.6419443", "0.64098", "0.64098", "0.64098", "0.6405421", "0.6405421", "0.6405421", "0.63834417", "0.63593936", "0.63593936", "0.6341418", "0.6338578", "0.62967193", "0.6296399", "0.62884337", "0.6277925", "0.62750137", "0.62692803", "0.6268555", "0.6254793", "0.6237102", "0.6220481", "0.6219505", "0.6214166", "0.6201624", "0.61968374", "0.61916864", "0.618438", "0.618002", "0.61770904", "0.61731327", "0.61731327", "0.61731327", "0.6163726", "0.6159481", "0.6158588", "0.6155488", "0.6155488", "0.61534727", "0.6152162", "0.6141327", "0.6141327", "0.61351955", "0.61351955", "0.61351955", "0.61351955", "0.6128502", "0.61264455", "0.61264455", "0.61264455", "0.61264455", "0.61264455", "0.61264455", "0.6125553", "0.6125553", "0.61129606", "0.6101821", "0.60960615", "0.60926896", "0.60864896", "0.60864896", "0.60820067", "0.6075874", "0.6075874", "0.6075874", "0.6074415", "0.6071374", "0.60682136", "0.6059913", "0.6054849", "0.6054224", "0.60534173", "0.6046426", "0.6043662", "0.6038259", "0.6034063", "0.6030585", "0.60269654", "0.6018609", "0.60063356", "0.5992027", "0.5990693", "0.5990111", "0.59893024", "0.59888023", "0.59792995", "0.59789413", "0.5975915", "0.5966999", "0.5966605" ]
0.7205645
0
Get the total cost of the order
public double getTotal() { double total = 0.0; for (OrderItem i : getOrderItems()) { total += i.getOrderQuantity() * i.getPrice(); } return total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getTotalCostOfOrder() {\n double total = 0;\n for (AbstractProduct item :\n this.itemsReceived) {\n total += item.getPrice();\n }\n return total;\n }", "public void calculateOrderCost(){\n int tmpCost=0;\n for (Vehicle v : vehicleList){\n tmpCost+=v.getCost();\n }\n totalCost=tmpCost;\n }", "private double getOrderTotal() {\n double d = 0;\n\n for (Pizza p : pizzas) {\n d += p.calcTotalCost();\n }\n\n return d;\n }", "public java.math.BigDecimal getTotalCost () {\n\t\treturn totalCost;\n\t}", "public float totalCost() {\r\n float total = 0;\r\n for (int i=0; i<numItems; i++) {\r\n total += cart[i].getPrice();\r\n }\r\n return total;\r\n }", "public float totalCost() {\n\t\tttCost = 0;\n\t\tfor (int i = 0; i < itemsOrdered.size(); i++) {\n\t\t\tttCost += itemsOrdered.get(i).getCost();\n\t\t}\n\t\treturn ttCost;\n\t}", "public double getTotalCost() {\r\n return totalCost;\r\n }", "public double getTotal() {\n return totalCost;\n }", "public double getTotalCost() {\r\n\t\treturn cost;\r\n\t}", "double getTotalCost();", "public float getTotalCost() {\n return this.totalCost;\n }", "String getTotalCost() {\n return Double.toString(totalCost);\n }", "public double getTotalCost() {\n cost = spr.calculateCost();\n return cost;\n }", "@Override\r\n\tpublic double getCost() {\r\n\t\tdouble total = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\ttotal += p.getCost();\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}", "public String getTotalCost() {\n return this.TotalCost;\n }", "BigDecimal calculateTotalPrice(Order order);", "private double calculateTotal(){\r\n double total = 0;\r\n for(int i = 0; i < orderList.size(); i++){\r\n total += orderList.getOrder(i).calculatePrice();\r\n }\r\n return total;\r\n }", "public double getTotalCost(){\r\n\t\t//return the totalCost to the App\r\n\t\treturn totalCost;\r\n\t}", "public BigDecimal getCost() {\r\n return cost;\r\n }", "@Transient\n public Double getTotalOrderPrice() {\n double sum = 0;\n for (OrderItem oi : getOrderItems()) {\n sum += oi.getTotalPrice();\n }\n return sum;\n }", "double getCost();", "double getCost();", "double calculateDeliveryCost(Cart cart);", "public double calculateTotalCost() {\n finalTotal = (saleAmount + taxSubtotal + SHIPPINGCOST);\n\n return finalTotal;\n }", "public BigDecimal getCost() {\n return this.cost;\n }", "public double getCost() {\t\t \n\t\treturn cost;\n\t}", "public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }", "@Pure\n\tdouble getCost();", "public int getCost() {\n\t\treturn (int) Math.round(weight*price_per_pound);\n\t\t\n\t}", "public double calculateCost(Purchase purchase);", "public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}", "@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }", "public double getCost() {\n\n\t\treturn cost;\n\t}", "public double getcost() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn room.getcost() + cost;\r\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public double getCost() {\n\t\treturn this.cost;\n\t}", "public double getCost() {\r\n\t\treturn cost;\r\n\t}", "public double getCost() {\r\n return cost;\r\n }", "@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}", "public double getCost() {\n\t\treturn cost;\n\t}", "double ComputeCost(double order, double tipPercent, double serviceRating, double foodRating)\r\n {\r\n // kazda gwiazdka to 2 procent od sumy zamówienia\r\n return order + order * (tipPercent/100) + (serviceRating * 0.02) * order + (foodRating * 0.02) * order;\r\n }", "public double getCost() {\n return cost;\n }", "public double getCost() {\n return cost;\n }", "public int getCost() {\n \t\treturn cost;\n \t}", "public BigDecimal calculateTotal() {\r\n BigDecimal orderTotal = BigDecimal.ZERO;\r\n \r\n final Iterator<Item> iterator = myShoppingCart.keySet().iterator();\r\n \r\n while (iterator.hasNext()) {\r\n final BigDecimal currentOrderPrice = myShoppingCart.get(iterator.next());\r\n \r\n orderTotal = orderTotal.add(currentOrderPrice);\r\n }\r\n \r\n //if membership take %10 off the total cost\r\n if (myMembership) {\r\n if (orderTotal.compareTo(new BigDecimal(\"25.00\")) == 1) { //myOrderTotal > $25\r\n final BigDecimal discount = DISCOUNT_RATE.multiply(orderTotal); \r\n orderTotal = orderTotal.subtract(discount);\r\n }\r\n }\r\n \r\n return orderTotal.setScale(2, RoundingMode.HALF_EVEN);\r\n }", "public Integer calcularCosto() {\n return componente.getPrecio() + tipoDeEnvio.calcularCosto(this.componente.getPeso(), cliente.getUbicacion());\n }", "@Override\n public int getCost() {\n int price = (int) Math.round(this.weight * this.pricePerLbs); //get the price of the cookies in the form of an int\n return price; //return the price\n\n }", "public double getCost() {\r\n\t \treturn(cost);\r\n\t}", "@Override\n public double calcCost() {\n return calcSalesFee()+calcTaxes();\n }", "public int getCost(){\r\n\t\treturn this.cost;\r\n\t}", "public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}", "@Pure\n\tdouble getEstimatedCost();", "@Override\n public double getCost() {\n return cost;\n }", "public int getCost() {\n return cost;\n }", "public double getCost()\r\n\t{\treturn this.cost;\t}", "@Override\n public double cost()\n {\n return this.price * this.number;\n }", "public String getCost() {\n\t\tString t = doc.get(\"cost\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public int getCost() {\n return cost;\n }", "public int getCost() {\n return cost;\n }", "public double getCost() {\n return price;\n }", "@Override\r\n public int getCost() {\r\n return cost;\r\n }", "public double calcCost() {\n if (pizzaSize.equals(\"small\")) {\n return 10.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n\n }\n else if (pizzaSize.equals(\"medium\")) {\n return 12.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n else {\n return 14.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n }", "@NotNull\n public BigDecimal getCost() {\n return cost;\n }", "public double cost() {\n return roomType.cost() + COST;\n }", "public float calcOrderTotal()\r\n\t{\r\n\t\tOrderItem temp;\r\n\t\tfloat total = 0;\r\n\t\t\r\n\t\t//iterate through list and get quantity and unit price of each item\r\n\t\t//then multiply together and add to running total\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++)\r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttotal = total + (temp.getProductQuant() * temp.getProductPrice());\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}", "int getCost();", "int getCost();", "int getCost();", "public int getCost() {\n\t\treturn cost;\n\t}", "public double cost()\n\t{\n\t\treturn (price * weight);\n\t}", "@Override\n public int getCost() {\n return iceCreamPrice + topPrice;\n }", "public Integer getCost() {\r\n\t\treturn cost;\r\n\t}", "public BigDecimal getOrderTotal()\r\n\t{\r\n\t\tSystem.out.println(\"Order Total is: \" + subtotal);\r\n\t\treturn subtotal;\r\n\t}", "public abstract double getCost();", "public double getProductCost() {\r\n\t\treturn (this.getPricePerUnit() * this.getNumUnits());\r\n\t}", "public Integer getCost() {\n return cost;\n }", "public double cost()\n\t{\n\t\treturn _dblCost;\n\t}", "@Override\n\tpublic double getSumOfCost() {\n\t String sql=\"SELECT SUM(cost) FROM supplier_product\";\n\t double total=this.getJdbcTemplate().queryForObject(sql, double.class);\n\t\treturn total;\n\t}", "public String getCost() {\n // Formats the cost amount into money format.\n NumberFormat n = NumberFormat.getCurrencyInstance(Locale.US);\n String s = n.format(Double.parseDouble(_cost));\n return s;\n }", "public Number getCost()\r\n {\r\n return (m_cost);\r\n }", "public int getCost()\n {\n return cost;\n }", "public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}", "public void calculateCost(Order currentOrder) {\n\n BigDecimal area = currentOrder.getArea();\n BigDecimal materialCost = (area.multiply(currentOrder.getProduct().getCostPerSqFt())).setScale(2);\n BigDecimal laborCost = (area.multiply(currentOrder.getProduct().getLaborCostPerSqFt()));\n BigDecimal tax = laborCost.add(materialCost).multiply(currentOrder.getState().getTaxRate().movePointLeft(2));\n BigDecimal total = materialCost.add(laborCost).add(tax);\n\n //using half_up for rounding to get the (nearest neighbor)\n //Setting each price to the object\n currentOrder.setMaterialCost(materialCost.setScale(2, RoundingMode.HALF_UP));\n currentOrder.setLaborCost(laborCost.setScale(2, RoundingMode.HALF_UP));\n currentOrder.setTax(tax.setScale(2, RoundingMode.HALF_UP));\n currentOrder.setTotal(total.setScale(2, RoundingMode.HALF_UP));\n }", "public BigDecimal getTotalPrice() {\n\t\t// the current total cost which the customer owes in the transaction\n\t\tBigDecimal total = new BigDecimal(0);\n\n\t\tArrayList<Item> currentPurchases = purchaseList.getCurrentPurchases(); \n\n\t\tfor (Item item : currentPurchases) {\n\t\t\ttotal = total.add(this.getItemPrice(item));\n\t\t}\n\n\t\treturn total;\n\t}", "public String getRealTotalCost() {\n return this.RealTotalCost;\n }", "public String getCost() {\n return cost;\n }", "@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}", "public double getCost()\n\t{\n\t\treturn 0.9;\n\t}", "public CP getProductServiceUnitCost() { \r\n\t\tCP retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }", "public int getCost()\n\t{\n\t\treturn m_nTravelCost;\n\t}", "@Override\n public double getCost() {\n\t return 13;\n }", "@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}", "public double getCost() {\n return quantity*ppu;\n\n }", "public double calcular_costo() {\n\t\t return 1.3*peso+30 ;\n\t}", "public BigDecimal getCostPrice() {\n return costPrice;\n }", "public double getCost(){\n return cost;\n }", "public double getCost() {\n double price = 0;\n price += this.numPizzas * this.pizzaType.getCost();\n if(this.numPizzas >= 20) // Discount if >=20 pizzas\n return price * 0.9;\n else if(this.numPizzas >= 10) // Discount if between 10 and 20 pizzas\n return price * 0.95;\n return price; // No discount\n }", "@Override\n public double getTotalCommission() {\n double cost = 0.0;\n //increase cost for each report in the order\n for (Report report : reports.keySet()) {\n //report cost depends on the WorkType\n //audits are not capped by max employee count\n //regular orders are limited by max employee count\n int employeeCount = reports.get(report);\n cost += workType.calculateReportCost(report, employeeCount);\n }\n //increase cost of order based on priority\n //critical orders increase based on their critical loading\n //regular orders don't have an effect\n cost = priorityType.loadCost(cost);\n return cost;\n }", "public int totalCost()\n {\n int cost = 0;\n for (DessertItem item : dessertList) {\n cost += item.getCost();\n }\n return cost;\n }", "public double getCost() {\n\t\treturn 1.25;\n\t}" ]
[ "0.81771857", "0.80614483", "0.8027494", "0.7841177", "0.78409195", "0.7799919", "0.7734652", "0.77301496", "0.76972574", "0.76544267", "0.7564697", "0.7497106", "0.7491616", "0.7466302", "0.7455173", "0.74406", "0.7393649", "0.73892844", "0.7367706", "0.73416734", "0.73403883", "0.73403883", "0.7329939", "0.7324721", "0.73227936", "0.72802114", "0.7278928", "0.72747976", "0.7238456", "0.7229082", "0.7215981", "0.7212416", "0.7201597", "0.71986127", "0.719532", "0.719532", "0.7194457", "0.7184961", "0.7170907", "0.7166473", "0.71588415", "0.7156869", "0.7156869", "0.7138782", "0.7105694", "0.7102012", "0.7086438", "0.70785296", "0.70698225", "0.7067833", "0.7066162", "0.7064041", "0.7048369", "0.70451623", "0.7043243", "0.7039393", "0.7025564", "0.70228904", "0.70228904", "0.70160544", "0.7014614", "0.7012235", "0.7005384", "0.7003703", "0.69997966", "0.69995916", "0.69995916", "0.69995916", "0.6997525", "0.69914985", "0.6969604", "0.6966673", "0.6956408", "0.69533354", "0.69517326", "0.69505244", "0.69441193", "0.69413", "0.6930551", "0.69286066", "0.6926217", "0.69145995", "0.69004095", "0.6893866", "0.68905073", "0.6884201", "0.68773526", "0.6876753", "0.6847067", "0.6838434", "0.6830456", "0.6822239", "0.68200374", "0.6799752", "0.6794975", "0.6793447", "0.6789216", "0.6777986", "0.6777676", "0.675995" ]
0.6935163
78
Get the order items of the order
public List<OrderItem> getOrderItems() { List<OrderItem> actual = new ArrayList<>(); for (OrderItem i : orderItems) { if (i.getOrderQuantity() != 0.0) { actual.add(i); } } return actual; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "public ArrayList getOrderItems() \r\n\t{\r\n\t\treturn orderItemList;\r\n\t}", "public FCOrderManagerOrderItemList GetOrderItems()\n\t{\n\t\treturn m_OrderItems;\n\t}", "public List<OrderItem> findAllOrderItems()\n\t{\n\t\tList<OrderItem> list=orderItemDAO.findAll();\n\t\treturn list;\n\t}", "public ArrayList<OrderItem> getOrderArray(){return orderInfo;}", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "@Override\r\n\tpublic List<Top5OrderItems> allorderItems() {\n\t\tList<Object[]> list=null;\r\n\t\tList<Top5OrderItems> top5OrderItems=null;\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlist=boardDao.allorderItems();\r\n\t\t\ttop5OrderItems=new ArrayList<Top5OrderItems>();\r\n\t\t\tIterator<Object[]> iterator=list.iterator();\r\n\t\t\twhile(iterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\tObject[] objects=(Object[])iterator.next();\r\n\t\t\t\tTop5OrderItems orderItems=new Top5OrderItems();\r\n\t\t\t\torderItems.setMaterial((String)objects[0]);\r\n\t\t\t\torderItems.setQuantity(Float.valueOf((String)objects[1]));\r\n\t\t\t\ttop5OrderItems.add(orderItems);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\t\treturn top5OrderItems;\r\n\t}", "public List<Map<String, Object>> getOrder(String id);", "public List<String> getElements() {\r\n List<String> result = new ArrayList<String>();\r\n if (order == null) {\r\n return result;\r\n }\r\n result.addAll(order.keySet());\r\n Collections.sort(result, new Comparator<String>(){\r\n @Override public int compare(String arg0, String arg1) {\r\n return order.get(arg0).compareTo(order.get(arg1));\r\n }\r\n });\r\n return result;\r\n }", "List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;", "ObservableList<OrderItem> getObservableOrderItemList();", "void getOrders();", "public List<Order> getOrder() {\n return order;\n }", "public List<RLOrder> getItems() {\n\t\treturn _orders.getPage(_currentPage);\n\t}", "public int getOrder();", "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 }", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "public List getOrderByItems() {\n if (orderByItems == null) {\n setOrderByItems(new Vector());\n }\n return orderByItems;\n }", "public Integer getOrder();", "private ArrayList<String> GetOrderContent() {\n ArrayList<String> order_content = new ArrayList<>();\n boolean added = false;\n for (String line : receipt_lines) {\n if (IsReceiptHeader(line) || IsReceiptFooter(line) || ColesReceiptItem.Is_So_On_Keyword(line) || ColesReceiptItem.Is_Empty(line))\n continue;\n if (ColesReceiptItem.Is_Total_Line(line)) break;\n if (ColesReceiptItem.Is_Order_Summary_Keyword(line))\n added = true;\n else if (added) order_content.add(line);\n }\n return order_content;\n }", "Collection<Order> getAll();", "List<Product> getProducts(Order order);", "public String listOfOrders() {\r\n\t\t StringBuilder sb = new StringBuilder();\r\n for (Iterator<Order> it = orders.iterator(); it.hasNext();){\r\n\t\t\t Order o = (Order) it.next();\r\n \t sb.append(o.toString() + NL);\r\n }\r\n return sb.toString();\r\n }", "public java.util.Set<com.jspgou.cms.entity.OrderItem> getItems () {\r\n\t\treturn items;\r\n\t}", "public List<MainItemOrdered> findAll();", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "Order getOrder();", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public List<OrderItems> getAllOrderItemsByOrderId(int orderId){\n\t\tSystem.out.println(\"service\");\n\t\tList<OrderItems> orderItemsRecords = orderItemsRepo.getAllOrderItemsByOrderId(orderId);\n\t\tList<OrderItems> orderItems= new ArrayList();\n\t\tfor(OrderItems items: orderItemsRecords) \n\t\t\tif(items.getOrders().getOrderId() == orderId)\n\t\t\t\torderItems.add(items);\t\t\n\t\tSystem.out.println(orderItems);\n\t\treturn orderItems;\t\n\t}", "com.google.protobuf.ByteString getOrderByDataItemBytes();", "public List<Order> getOrders(){\n return this.orders;\n }", "List<List<Order>> getOrdersByQuantity(Integer quantity) throws \n OrderBookOrderException;", "java.lang.String getOrderByDataItem();", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "public List<TaskOrder> getLineItems() {\n if (lineItems == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n TaskOrderDao targetDao = daoSession.getTaskOrderDao();\n List<TaskOrder> lineItemsNew = targetDao._queryTask_LineItems(uuid);\n synchronized (this) {\n if(lineItems == null) {\n lineItems = lineItemsNew;\n }\n }\n }\n return lineItems;\n }", "List<Order> getAll();", "@Override\r\n\tpublic List<Top5OrderItems> getTop5orderItems() {\n\t\tList<Object[]> list=null;\r\n\t\tList<Top5OrderItems> top5OrderItems=null;\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlist=boardDao.getTop5orderItems();\r\n\t\t\ttop5OrderItems=new ArrayList<Top5OrderItems>();\r\n\t\t\tIterator<Object[]> iterator=list.iterator();\r\n\t\t\twhile(iterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\tObject[] objects=(Object[])iterator.next();\r\n\t\t\t\tTop5OrderItems orderItems=new Top5OrderItems();\r\n\t\t\t\torderItems.setMaterial((String)objects[0]);\r\n\t\t\t\torderItems.setQuantity(Float.valueOf((String)objects[1]));\r\n\t\t\t\ttop5OrderItems.add(orderItems);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\t\treturn top5OrderItems;\r\n\t}", "public ArrayList<Order> getOrders() {\n return this.listOrder;\n }", "public Integer getOrder() {\n return order;\n }", "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}", "public List<Order> getOrders() {\n return _orders;\n }", "@Override\r\n\tpublic List<Order> readAll() {\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\tList<Order> orders = new ArrayList<>();\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\torders.add(modelFromResultSet(resultSet));\r\n\t\t\t}\r\n\t\t\treturn orders;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn new ArrayList<>();\r\n\t}", "public Order getOrder() {\n return order;\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}", "public List<Order> getOrderHistory();", "java.util.List<? extends io.opencannabis.schema.commerce.OrderItem.ItemOrBuilder> \n getItemOrBuilderList();", "public int getOrder() {\n return order;\n }", "public int getOrder() {\n return order;\n }", "public Integer getOrder() {\n return order;\n }", "public Integer getOrder() {\n return order;\n }", "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}", "public com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> getOrdersProductss()\n {\n return getOrdersProductss(false,false);\n }", "void getMarketOrders();", "public String getOrderDetails(ArrayList<Item> items){\n String detailsToString=\"\";\n\n Set<Item> setOrderItems = new HashSet<>();\n for(Item each: items){ //remove duplicates and increase quanity of item instead.\n if(!setOrderItems.add(each)){\n setOrderItems.remove(each);\n each.incQuantity();\n setOrderItems.add(each);\n }\n }\n\n for(Item each: setOrderItems){\n detailsToString = \"x\"+each.getQuantity()+\" \"+each.getName()+\"\\n\"+detailsToString;\n }\n\n return detailsToString;\n }", "public ComplexOrderEntryTO[] getStockItems(long storeID, ProductTO[] requiredProductTOs) throws NotImplementedException;", "public java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> getItemList() {\n return item_;\n }", "public static List<IOrder> getOrders() throws JFException {\r\n\t\treturn JForexContext.getEngine().getOrders();\r\n\t}", "@RequestMapping(\"/{orderId}/items\")\n public Flux<Item> getItemsOfOrder(@PathVariable(\"orderId\") int orderId)\n throws JsonProcessingException {\n Order order = orderRepository.getOrderById(orderId);\n\n // Get every item in order\n return HystrixCommands.from(itemInfo.getItemsFromOrderCall(order))\n .fallback(itemInfo.getItemsFromOrderFallback())\n .commandName(\"getItemsFromOrderCall\")\n .toFlux();\n }", "List<OrderDto> getOrders();", "@Override\n\tpublic List<WxOrder> queryOrderByExpressList() {\n\t\treturn orderMapper.queryOrderByExpressList();\n\t}", "@Override\r\npublic List<Order> getallorders() {\n\treturn productdao.getalloderds();\r\n}", "public Order getOrder() {\n return this.order;\n }", "public List<Bouquet> getAllBouquetsInOrder() {\n readOrderId();\n if (orderId != null) {\n return orderDAO.get(orderId).getBouquets();\n }\n return new LinkedList<>();\n }", "@Override\r\n public int getOrder() {\r\n return this.order;\r\n }", "@Override\r\n\tpublic List<Order> ListOrder() {\n\t\treturn null;\r\n\t}", "@Override\n public List<PurchaseOrderLine> getOrderlines() {\n return orderLines;\n }", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "public ArrayList<T> getOrderedElements() {\n\t\tArrayList<T> ordered = new ArrayList<T>(itemProbs_.keySet());\n\t\tCollections.sort(ordered, new ProbabilityComparator<T>());\n\n\t\treturn ordered;\n\t}", "public int getOrder() {\r\n\t\treturn order;\r\n\t}", "@Override\r\n\tpublic List<Warehouse_itemInformation> selectWarehouseOrder_itemInformation() {\n\t\treturn who_iif.selectWarehouse_itemInformation();\r\n\t}", "java.util.List<com.rpg.framework.database.Protocol.Item> \n getItemsList();", "public JSONArray getOrders() throws Exception;", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "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}", "private Order getOrder()\n {\n return orderController.getOrder(getOrderNumber());\n }", "public Integer getOrder() {\n\t\treturn order;\n\t}", "@Override\n public ArrayList<Order> getAllAvailableOrders() throws PersistenceException{ //list is the interface\n return new ArrayList<Order>(orders.values()); //ArrayList is the class that implements the List\n }", "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 List getOrderDetails(OrderDetail orderDetail);", "public List<Order> getOrders() {\n\t\treturn new ArrayList<Order>(mOrders);\n\t}", "private Vector getGroupItems() {\n return protocol.getGroupItems();\n }", "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 }", "@Override\r\n\tpublic List<Order> getOrder(ParamCondition paramCondition) {\n\t\tList<Order> orders = new ArrayList<Order>();\r\n\t\treturn orders;\r\n\t}", "@Override\r\n\tpublic List<Order> getOrder(ParamCondition paramCondition) {\n\t\tList<Order> orders = new ArrayList<Order>();\r\n\t\treturn orders;\r\n\t}", "public final Integer getOrder() {\n return this.order;\n }", "@Override\n public int getItemCount() {\n return orders.size();\n }", "public int getOrder() {\n\t\treturn order;\n\t}", "int getOrder(){\r\n\t\t\treturn this.order;\r\n\t\t}", "com.rpg.framework.database.Protocol.Item getItems(int index);", "public List<OrderLine> getOrderLineList() {\n\t\tHttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance()\n\t\t\t\t.getExternalContext().getRequest();\n\t\tHttpSession session = ((HttpServletRequest) request).getSession(false);\n\t\t\n\t\t//recuperation du login\n\t\tlogin = (session != null) ? (LoginMB) session.getAttribute(\"loginMB\") : null;\n\t\t//recuperation du user\n\t\tSystem.out.println(\"login user from session : \"+login.getUser().getIdPerson());\n\t\torderList = orderBu.getLastOrder(login.getUser().getIdPerson());\n\t\t\n\t\tSet<OrderLine> set = new HashSet<OrderLine>();\n\t\tset = orderList.get(orderList.size()-1).getOrderLines();\n\t\torderLineList = new ArrayList<OrderLine>(set);\n\t\tsetTotal(orderList.get(orderList.size()-1).getTotalAmount());\n\t\t\n\t\t\n\t\treturn orderLineList;\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 String getOrder() {\n return this.Order;\n }", "@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 }", "public List<Order> getOrders() {\n\t\treturn repo.findAll();\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 }", "@VTID(10)\r\n int getOrder();", "public List<Item> getAllItems() {\r\n \t\tList<Item> items = persistenceManager.getAllItems();\r\n \t\tCollections.sort(items, Comparators.ITEM_COMPARATOR);\r\n \t\treturn items;\r\n \t}", "public String[] listItems() {\n \n\t\tif (itemCount==0) {\n\t\t\tSystem.out.println(\"\\tNo items available.\\n\");\n\t\t}\n\t\telse {\n\t\t\tfor(int index = 1; index<=itemCount; index++) {\n VendItem s = stock[index-1];\n itemList[index-1]=(s.getName());\n\t\t\t}\n System.out.println();\n \n }\n return itemList;\n\n }", "List<Order> getByUser(User user);" ]
[ "0.7585431", "0.7441835", "0.7315924", "0.71571624", "0.709668", "0.7095096", "0.6806133", "0.67798436", "0.67349905", "0.671656", "0.6696219", "0.6687593", "0.66697747", "0.65250677", "0.6518825", "0.65106916", "0.6504005", "0.6504005", "0.6493331", "0.6491799", "0.6489746", "0.64710146", "0.6462554", "0.64173967", "0.6407736", "0.63941324", "0.6367687", "0.6363742", "0.6341168", "0.6339586", "0.6331571", "0.63291603", "0.63233024", "0.63174045", "0.63123316", "0.6300891", "0.62946415", "0.6246832", "0.6202842", "0.61967874", "0.61963356", "0.61949843", "0.6181017", "0.61767006", "0.6174766", "0.6163624", "0.6146598", "0.614204", "0.614204", "0.6141054", "0.6141054", "0.61378443", "0.6131549", "0.6123726", "0.6103104", "0.6100514", "0.6072683", "0.60587573", "0.6052007", "0.60340524", "0.6025747", "0.60244834", "0.60104656", "0.60064113", "0.60022753", "0.5999793", "0.5996692", "0.5979987", "0.5974971", "0.597073", "0.59558904", "0.5953274", "0.59323657", "0.5926432", "0.5925857", "0.59251255", "0.59231085", "0.5917443", "0.59169275", "0.5916291", "0.5915452", "0.5907307", "0.5901182", "0.5901102", "0.5901102", "0.58906615", "0.58905977", "0.5878603", "0.5869167", "0.5866969", "0.58539355", "0.58490855", "0.5844092", "0.5843326", "0.58404046", "0.5836255", "0.5828483", "0.58161205", "0.58137953", "0.5805618" ]
0.7206627
3
/ Add order information and logo to top of PDF
public void preProcessPDF(Object document) throws IOException, BadElementException, DocumentException { Document pdf = (Document) document; pdf.open(); pdf.setPageSize(PageSize.A4); ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); String header = servletContext.getRealPath("") + File.separator + "resources" + File.separator + "img" + File.separator + "header.png"; pdf.add(Image.getInstance(header)); pdf.add(new Paragraph("\n\n Order placed by: " + getUserName())); pdf.add(new Paragraph(" Order placed at: " + getDate().toString())); pdf.add(new Paragraph("\n\n")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<OmOrderHeaders> printPDF(IRequest requestCtx, @StdWho List<OmOrderHeaders> States) {\n PDFReport pdfPrint = new PDFReport();\n\n OmOrderHeaders notice=null;\n //List<OmOrderHeaders> trade=new ArrayList<OmOrderHeaders>();\n\n for (OmOrderHeaders state : States) {\n if (state.getHeaderId() != null) {\n notice=state;\n }\n }\n\n File file = new File(\"C:\\\\Users\\\\PB\\\\Desktop\\\\\"+notice.getOrderNumber()+\".pdf\");\n List<OmOrderLines> omOrderLines = omOrderLinesMapper.selectSumPrice(notice);\n\n\n try {\n\n BaseFont bfChinese=PDFReport.bfChinese;\n Font headfont =PDFReport.headfont;\n Font keyfont=PDFReport.keyfont;\n Font textfont=PDFReport.textfont;\n\n file.createNewFile();\n Document document = new Document();\n\n document.setPageSize(PageSize.A4);\n PdfWriter.getInstance(document, new FileOutputStream(file));\n document.open();\n PdfPTable table= pdfPrint.createTable(6);\n\n table.addCell(pdfPrint.createCell(\".订单打印:\", headfont, Element.ALIGN_LEFT,6,false));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n\n\n table.addCell(pdfPrint.createCell(\"订单编号:\", keyfont, Element.ALIGN_RIGHT,0,false));\n //table.addCell(pdfPrint.createCell(notice.getOrderNumber(), textfont, Element.ALIGN_CENTER));\n table.addCell(pdfPrint.createCell(notice.getOrderNumber(), textfont,Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\"公司名称:\", keyfont, Element.ALIGN_RIGHT,0,false));\n OrgCompanys orgCompanys = orgCompanysMapper.selectByPrimaryKey(notice.getCompanyId());\n table.addCell(pdfPrint.createCell(orgCompanys.getCompanyName(), textfont, Element.ALIGN_LEFT));\n ArCustomers arCustomers = arCustomersMapper.selectByPrimaryKey(notice.getCustomerId());\n table.addCell(pdfPrint.createCell(\"客户名称:\", keyfont, Element.ALIGN_RIGHT,0,false));\n table.addCell(pdfPrint.createCell(arCustomers.getCustomerName(), textfont, Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n\n\n table.addCell(pdfPrint.createCell(\"订单日期:\", keyfont, Element.ALIGN_RIGHT,0,false));\n table.addCell(pdfPrint.createCell(new SimpleDateFormat(\"yyyy/MM/dd\").format(notice.getOrderDate()), textfont, Element.ALIGN_LEFT));\n long sum = 0;\n for(int i=0;i<omOrderLines.size();i++) {\n OmOrderLines ot = new OmOrderLines();\n ot = omOrderLines.get(i);\n sum = sum + ot.getOrderdQuantity()*ot.getUnitSellingPrice();\n\n }\n\n\n table.addCell(pdfPrint.createCell(\"订单总金额:\", keyfont, Element.ALIGN_RIGHT,0,false));\n table.addCell(pdfPrint.createCell(String.valueOf(sum), textfont, Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\"订单状态:\", keyfont, Element.ALIGN_RIGHT,0,false));\n String s=\"\";\n if(notice.getOrderStatus().equals(\"NEW\")){\n s=\"新建\";\n }else if(notice.getOrderStatus().equals(\"SUBMITED\")){\n s=\"已提交\";\n }else if(notice.getOrderStatus().equals(\"APPROVED\")){\n s=\"已审批\";\n }else if(notice.getOrderStatus().equals(\"REJECTED\")){\n s=\"已拒绝\";\n }\n table.addCell(pdfPrint.createCell(s, textfont, Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n\n table.addCell(pdfPrint.createCell(\"主要:\", headfont, Element.ALIGN_LEFT,6,false));\n\t\ttable.addCell(pdfPrint.createCell(\"物料编码\", textfont, Element.ALIGN_CENTER));\n\t\ttable.addCell(pdfPrint.createCell(\"物料描述\", textfont, Element.ALIGN_CENTER));\n\t\ttable.addCell(pdfPrint.createCell(\"产品单位\", textfont, Element.ALIGN_CENTER));\n\t\ttable.addCell(pdfPrint.createCell(\"数量\", textfont, Element.ALIGN_CENTER));\n table.addCell(pdfPrint.createCell(\"销售单价\", textfont, Element.ALIGN_CENTER));\n table.addCell(pdfPrint.createCell(\"金额\", textfont, Element.ALIGN_CENTER));\n\n\t\tfor(int i=0;i<omOrderLines.size();i++){\n OmOrderLines ot = new OmOrderLines ();\n ot = omOrderLines.get(i);\n InvInventoryItems invInventoryItems = invInventoryItemsMapper.selectByPrimaryKey(ot.getInventoryItemId());\n\t\t\ttable.addCell(pdfPrint.createCell(invInventoryItems.getItemCode(), textfont));\n\t\t\ttable.addCell(pdfPrint.createCell(invInventoryItems.getItemDescription(), textfont));\n\t\t\ttable.addCell(pdfPrint.createCell(ot.getOrderQuantityUom(), textfont));\n\t\t\ttable.addCell(pdfPrint.createCell(String.valueOf(ot.getOrderdQuantity()), textfont));\n table.addCell(pdfPrint.createCell(String.valueOf(ot.getUnitSellingPrice()), textfont));\n table.addCell(pdfPrint.createCell(String.valueOf(ot.getOrderdQuantity()*ot.getUnitSellingPrice()), textfont));\n\t\t}\n\t\ttry {\n\t\t\tdocument.add(table);\n\n\t\t}catch(Exception e){e.printStackTrace(); }\n\n\t\tdocument.close();\n }catch(Exception e){e.printStackTrace();}\n\n\n return States;\n }", "public void createPdf(String savePath,String filename,int orderNumber, Customer customer, Owner owner,List<Product> productSet) throws DocumentException, MalformedURLException, IOException {\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tDocument document = new Document(PageSize.A4, 40, 20, 0, 0);\r\n\t\t\t\tPdfWriter.getInstance(document, new FileOutputStream(savePath + \"/\" + filename + orderNumber + \".pdf\"));\r\n\t\t\t\tdocument.open();\r\n\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\tImage img = Image.getInstance(\r\n\t\t\t\t\t\t\"C:/Users/svens/eclipse-workspace/GetIt/src/main/resources/images/GetItLogo_Redux.png\");\r\n\t\t\t\timg.setAlignment(Element.ALIGN_BASELINE);\r\n\r\n\t\t\t\tPdfPTable table = new PdfPTable(3);\r\n\t\t\t\ttable.setWidthPercentage(100);\r\n\t\t\t\ttable.setSpacingBefore(150f);\r\n\t\t\t\ttable.setWidths(new int[] { 2, 1, 2 });\r\n\t\t\t\tPdfPCell cell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(owner.getCompanyName() + \"\\n\" + owner.getFirstName() +\"\\n\"+ owner.getLastname() + \r\n\t\t\t\t\t\t\t\t\"\\n\"+ owner.getAddress() , font1));\r\n\t\t\t\tcell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\ttable.addCell(cell);\r\n\r\n\t\t\t\tPdfPCell cellrg = new PdfPCell(new Phrase(\"Rechnung\" + orderNumber, font2));\r\n\t\t\t\tcellrg.setBorder(0);\r\n\t\t\t\tcellrg.setVerticalAlignment(PdfPCell.ALIGN_BOTTOM);\r\n\t\t\t\tcellrg.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);\r\n\t\t\t\ttable.addCell(cellrg);\r\n\r\n\t\t\t\tPdfPCell cell2 = new PdfPCell();\r\n\t\t\t\tcell2.setBorder(0);\r\n\t\t\t\tcell2.setHorizontalAlignment(PdfPCell.RIGHT);\r\n\t\t\t\ttable.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n\t\t\t\ttable.addCell(cell2);\r\n\t\t\t\tdocument.add(table);\r\n\r\n\t\t\t\tDate date = new Date();\r\n\t\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\");\r\n\t\t\t\tStringBuilder dateBuilder = new StringBuilder(dateFormat.format(date));\r\n\t\t\t\tParagraph leftDate = new Paragraph();\r\n\t\t\t\tleftDate.setAlignment(Element.ALIGN_RIGHT);\r\n\t\t\t\tleftDate.setFont(font1);\r\n\t\t\t\tleftDate.add(\"\" + dateBuilder);\r\n\r\n\t\t\t\tdocument.add(new LineSeparator());\r\n\r\n\t\t\t\tdocument.add(leftDate);\r\n\t\t\t\tdocument.add(new Paragraph(\"\"));\r\n\r\n\t\t\t\t// Adress\r\n\t\t\t\tPdfPTable adressTable = new PdfPTable(2);\r\n\t\t\t\tadressTable.setHorizontalAlignment(PdfPTable.ALIGN_RIGHT);\r\n\t\t\t\tadressTable.setSpacingBefore(40f);\r\n\t\t\t\tadressTable.setWidthPercentage(96f);\r\n\t\t\t\tcell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(\"Herr\\n\"+ customer.getName() + \" \" + customer.getLastname()+\"\\n\" + customer.getAddress(), font2));\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tadressTable.addCell(cell);\r\n\t\t\t\tChunk chunk = new Chunk(\"Rechnungsnummer: \"+ orderNumber + \"\\nKundennummer: \" +\r\n\t\t\t\tcustomer.getCustomer_id() + \"\\nRechnungsdatum: \" + dateBuilder, font1);\r\n\t\t\t\tcell = new PdfPCell(new Phrase(chunk));\r\n\t\t\t\tcell.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT);\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tadressTable.addCell(cell);\r\n\r\n\t\t\t\tdocument.add(adressTable);\r\n\r\n\t\t\t\t// Products\r\n\t\t\t\tPdfPTable productTable = new PdfPTable(4);\r\n\t\t\t\tproductTable.setPaddingTop(200);\r\n\t\t\t\tproductTable.setSpacingBefore(50);\r\n\t\t\t\tproductTable.addCell(\"QTY\");\r\n\t\t\t\tproductTable.addCell(\"Name\");\r\n\t\t\t\tproductTable.addCell(\"Price\");\r\n\t\t\t\tproductTable.addCell(\"Amount\");\r\n\r\n\t\t\t\tdouble total = 0;\r\n\t\t\t\tint tax = 20;\r\n\r\n\t\t\t\t// Iterate over Set to display different Products\r\n\t\t\t\tfor (int i = 0; i < productSet.size(); i++) {\r\n\r\n\t\t\t\t\tproductTable.addCell(productSet.get(i).intToString(productSet.get(i).getQuantity()));\r\n\t\t\t\t\tproductTable.addCell(productSet.get(i).getName());\r\n\t\t\t\t\tproductTable.addCell(productSet.get(i).doubleToString(productSet.get(i).getPrice()));\r\n\t\t\t\t\tproductTable.addCell(\r\n\t\t\t\t\t\t\tproductSet.get(i).doubleToString(productSet.get(i).getPrice() * productSet.get(i).getQuantity()));\r\n\r\n\t\t\t\t\ttotal = total + productSet.get(i).getPrice() * productSet.get(i).getQuantity();\r\n\r\n\t\t\t\t}\r\n\t\t\t\tdouble subTotal = total / 100 * (100 - tax);\r\n\r\n\t\t\t\tcell = new PdfPCell(new Phrase(\" \"));\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\r\n\t\t\t\t\r\n\t\t\t\tfont3.setColor(255, 255, 255);\r\n\t\t\t\tPdfPCell cellSubtotal = new PdfPCell(new Phrase(\"Subtotal\",font3));\r\n\t\t\t\tcellSubtotal.setBackgroundColor(color);\r\n\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cellSubtotal);\r\n\t\t\t\tproductTable.addCell(\"Tax 20%\");\r\n\t\t\t\tproductTable.addCell(\"Total\");\r\n\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(Double.toString(subTotal));\r\n\t\t\t\tproductTable.addCell(Double.toString(total - total / 100 * (100 - tax)));\r\n\t\t\t\tproductTable.addCell(Double.toString(total));\r\n\t\t\t\t\r\n\t\t\t\tproductTable.setSpacingAfter(500);\r\n\t\t\t\tdocument.add(productTable);\r\n\r\n\t\t\t\t//BUSINESS OWNER INFORMATION\r\n\t\t\t\tPdfPTable businessTable = new PdfPTable(2);\r\n\r\n\t\t\t\tcell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(owner.getBankName() +\"\\nBLZ: \" + owner.getBankCode() + \" \" + owner.getAccountNumber(), font1));\r\n\t\t\t\tcell.setVerticalAlignment(PdfPCell.BOTTOM);\r\n\t\t\t\tcell.setBorder(0);\r\n\r\n\t\t\t\tbusinessTable.addCell(cell);\r\n\r\n\t\t\t\tcell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(\"\\n BIC: \" + owner.getBic() + \"\\n UID: \" + owner.getUid(),font1));\r\n\t\t\t\tcell.setVerticalAlignment(PdfPCell.BOTTOM);\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tbusinessTable.addCell(cell);\r\n\t\t\t\t\r\n\t\t\t\tdocument.add(businessTable);\r\n\r\n\r\n\t\t\t\tdocument.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}", "protected void addTitlePage(Document doc) throws Exception {\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\\n\\n\"));\r\t\t\t\n // data dictionary\n Font font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 22);\n \t\tParagraph prg = new Paragraph(\"Data Dictionary\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // full definition\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 14);\n prg = new Paragraph(\"Definition of\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n // dataset name\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 26);\n prg = new Paragraph(dsName, font);\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// dataset word\n font = FontFactory.getFont(FontFactory.HELVETICA, 14);\n \t\tprg = new Paragraph(\"dataset\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\"));\n \t\t\n \t\t// version\n \t\tprg = new Paragraph();\n \t\tprg.add(new Chunk(\"Version: \", font));\n \t\tprg.add(new Chunk(dsVersion, font));\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// date\n \t\t//prg = new Paragraph(getTitlePageDate());\n \t\t//prg.setAlignment(Element.ALIGN_CENTER);\n \t\t//doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // European Environment Agency\n font = FontFactory.getFont(FontFactory.TIMES_BOLD, 12);\n prg = new Paragraph(\"European Environment Agency\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n \n if (!Util.voidStr(logo)){\n Image img = Image.getInstance(logo);\n img.setAlignment(Image.LEFT);\n \n prg.add(new Chunk(img, 0, 0));\n }\n \n doc.add(prg);\n }", "private void createPdf(CartReceiptResponse receiptResponse, HttpServletResponse response, Locale localeObj)\n throws DocumentException, IOException {\n /* Get the output stream for writing PDF object */\n final OutputStream out = response.getOutputStream();\n Document document = new Document();\n PdfWriter writer = PdfWriter.getInstance(document, out);\n document.open();\n\n\t\t/* Start Add Image */ \n /* add Logo image based on application id Getting Image path from Resource bundle*/\n final String logoFileClasspath = getMessage(localeObj, \"pdf.receipt.logoImageUrl\");\n URL path = PdfServlet.class.getClassLoader().getResource(logoFileClasspath);\n if (null == path) {\n throw new FileNotFoundException(\"unable to find logoImage in classpath: \" + logoFileClasspath);\n }\n Image logoImage = Image.getInstance(path);\n\n\t\t/* Start of Bill Submit Section */\n PdfPTable logoImageTable = new PdfPTable(1);/* Table for the Logo Image */\n /* Logo added to PDF cell constructor */\n PdfPCell logoImageCell = new PdfPCell(logoImage);\n PdfPCell logoBlankSpaceCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n cellAlignment(logoImageCell, Element.ALIGN_CENTER, \"\", 0);\n cellAddingToTable(logoImageTable, logoImageCell, Rectangle.LEFT | Rectangle.TOP | Rectangle.RIGHT, 0, 0);\n\n cellAlignment(logoImageCell, Element.ALIGN_LEFT, \"\", 0);\n cellAddingToTable(logoImageTable, logoBlankSpaceCell, Rectangle.LEFT | Rectangle.RIGHT, 0, 0);\n document.add(logoImageTable);\n /* End Add Logo Image */ \n\n\t\t/* create PDF header section */\n pdfReceiptIdSection(receiptResponse, document, localeObj);\n /* Designing bill transaction information to show biller name and amount*/\n designBillTransactionInfo(receiptResponse, document, localeObj);\n /* create payment method section */\n pdfPaymentMethod(receiptResponse, document, localeObj);\n /* Appending line below the document */\n pdfInfoMessage(document, localeObj);\n /* New page creating for merging existing PdF page in to current PDF */\n document.newPage();\n try {\n getPdfFromAwsLink(writer, localeObj);/* Call to merge existing PDF to current PDf */\n } catch (final Exception e) {\n LOGGER.error(\"trouble while merging PDF disclosure\", e);\n }\n document.close();\n LOGGER.debug(\"End PDF Created \");\n }", "public void PDFOrder() throws FileNotFoundException, DocumentException {\n\t\t\n\t\tOrdersBLL orderBLL = new OrdersBLL();\n\t\t\n\t\tDocument document = new Document();\n\t\t\n\t\tString fileName = \"Orders-report\" + countOrdersReports + \".pdf\";\n\t\tcountOrdersReports++;\n\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\n\t\tdocument.open();//open document\n\n\t\t//create paragraph\n\t\tParagraph intro = new Paragraph(\"Order Report\");\n\t\tParagraph space = new Paragraph(\" \");\n\t\tPdfPTable table = new PdfPTable(4);\n\n\t\t//create a cell\n\t\tPdfPCell c1 = new PdfPCell(new Paragraph(\"Id\"));\n\t\tPdfPCell c2 = new PdfPCell(new Paragraph(\"Customer Name\"));\n\t\tPdfPCell c3 = new PdfPCell(new Paragraph(\"Product Name\"));\n\t\tPdfPCell c4 = new PdfPCell(new Paragraph(\"Quantity\"));\n\n\t\t//add the cells to the table\n\t\ttable.addCell(c1);\n\t\ttable.addCell(c2);\n\t\ttable.addCell(c3);\n\t\ttable.addCell(c4);\n\t\t\n\t\t\n\n\t\tfor(String[] str: orderBLL.display()) {\n\t\t\tc1 = new PdfPCell(new Paragraph(str[0]));\n\t\t\tc2 = new PdfPCell(new Paragraph(str[1]));\n\t\t\tc3 = new PdfPCell(new Paragraph(str[2]));\n\t\t\tc4 = new PdfPCell(new Paragraph(str[3]));\n\n\t\t\ttable.addCell(c1);\n\t\t\ttable.addCell(c2);\n\t\t\ttable.addCell(c3);\n\t\t\ttable.addCell(c4);\n\n\t\t}\n\n\t\t//add the objects to the document\n\t\tdocument.add(intro);\n\t\tdocument.add(space);\n\t\tdocument.add(space);\n\t\tdocument.add(space);\n\t\tdocument.add(table);\n\n\t\tdocument.close();\n\t}", "public void preProcessPDF(final Object document) throws IOException, BadElementException, DocumentException {\n\t\tDocument pdf = (Document) document;\n\t\tpdf.open();\n\t\tpdf.setPageSize(PageSize.A4);\n\t\tServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();\n\t\ttry {\n\t\t\tString logo = servletContext.getRealPath(\"\") + File.separator + \"images\" + File.separator + \"school_logo.png\";\n\t\t\tpdf.add(Image.getInstance(logo));\n\t\t} catch (IOException e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\tpdf.addTitle(this.sessionBean.getCurrentBranch().getName());\n\t\tpdf.addHeader(\"Header\", \"Fee collected\");\n\t}", "private void prnHEADER()\n\t{ \n\t try\n\t {\n\t\t\tcl_dat.M_PAGENO +=1;\n\t\t\tcl_dat.M_intLINNO_pbst=0;\n\t\t\t\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(\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC1+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC2+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC3+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',cl_dat.M_strCMPNM_pbst ,100));\n\t\t\tdosREPORT.writeBytes(\"Report Date:\"+ cl_dat.M_strLOGDT_pbst + \"\\n\");\t\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Stock Statement as on \"+(rdbDYOPN.isSelected() ? strREFDT+\" at 07:00 Hrs\" : cl_dat.M_txtCLKDT_pbst.getText()+\" \"+cl_dat.M_txtCLKTM_pbst.getText()+\" Hrs\"),100));\t\t\t\n\t\t\tdosREPORT.writeBytes(\"Page No. :\" + String.valueOf(cl_dat.M_PAGENO) + \"\\n\");\t\t\t\t\t\t\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\" \",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Product & Size\",28));\n\t\t\t//System.out.println(\"LM_COUNT = \"+LM_COUNT);\n\t\t\tfor(i=0;i<LM_COUNT;i++)\n\t\t\t\tdosREPORT.writeBytes(padSTRING('L',staMNLDS[i],12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Tot.Sq.Mts\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"S/Rtn\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Res.Qty\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Q/Hold\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Cub.Mtrs\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"M.Tons\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Pcs\",10));\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\t//crtLINE(136);\n\t\t\t//dosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\t\t\n\t\t\t\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\tcl_dat.M_intLINNO_pbst += 11;\n\t }\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnHEADER\",'E');\n\t\t}\n\t}", "private void addMetaData() {\r\n\t\tdocument.open();\r\n\t\tdocument.addTitle(\"My first PDF\");\r\n\t\tdocument.addSubject(\"Using iText\");\r\n\t\tdocument.addKeywords(\"Java, PDF, iText\");\r\n\t\tdocument.addAuthor(\"Lars Vogel\");\r\n\t\tdocument.addCreator(\"Lars Vogel\");\r\n\t\tdocument.close();\r\n\t}", "private void addHeader(Section catPart) throws BadElementException, IOException{\r\n PdfPTable header = new PdfPTable(1);\r\n PdfPCell c = new PdfPCell(Image.getInstance(\"res/brandogredninglogo.png\"));\r\n c.setBackgroundColor(COLOR_BLUE);\r\n //c.setBorderColor(BaseColor.RED);\r\n header.setHeaderRows(0);\r\n header.addCell(c);\r\n header.setWidthPercentage(100.0f);\r\n \r\n catPart.add(header);\r\n }", "public void nuevoReporteProductos(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteProductos.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE PRODUCTOS\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "public void createPdf(String dest) throws IOException, DocumentException, XMPException {\n Document document = new Document(PageSize.A4.rotate());\n //PDF/A-3b\n //Create PdfAWriter with the required conformance level\n PdfAWriter writer = PdfAWriter.getInstance(document, new FileOutputStream(dest), PdfAConformanceLevel.ZUGFeRD);\n writer.setPdfVersion(PdfWriter.VERSION_1_7);\n //Create XMP metadata\n writer.createXmpMetadata();\n writer.getXmpWriter().setProperty(PdfAXmpWriter.zugferdSchemaNS, PdfAXmpWriter.zugferdDocumentFileName, \"invoice.xml\");\n //====================\n document.open();\n //PDF/A-3b\n //Set output intents\n ICC_Profile icc = ICC_Profile.getInstance(new FileInputStream(ICC));\n writer.setOutputIntents(\"Custom\", \"\", \"http://www.color.org\", \"sRGB IEC61966-2.1\", icc);\n //===================\n\n Paragraph p = new Paragraph();\n //PDF/A-3b\n //Embed font\n p.setFont(FontFactory.getFont(FONT, BaseFont.WINANSI, BaseFont.EMBEDDED, 20));\n //=============\n Chunk c = new Chunk(\"The quick brown \");\n p.add(c);\n Image i = Image.getInstance(FOX);\n c = new Chunk(i, 0, -24);\n p.add(c);\n c = new Chunk(\" jumps over the lazy \");\n p.add(c);\n i = Image.getInstance(DOG);\n c = new Chunk(i, 0, -24);\n p.add(c);\n document.add(p);\n\n PdfDictionary parameters = new PdfDictionary();\n parameters.put(PdfName.MODDATE, new PdfDate());\n PdfFileSpecification fileSpec = writer.addFileAttachment(\n \"ZUGFeRD invoice\", null, XML,\n \"invoice.xml\", \"application/xml\",\n AFRelationshipValue.Alternative, parameters);\n PdfArray array = new PdfArray();\n array.add(fileSpec.getReference());\n writer.getExtraCatalog().put(PdfName.AF, array);\n\n document.close();\n }", "private void generateInvoice(String clientID, String selectedMovieTheater, String selectedMovieOriginalName, String selectedScreeningId, int seatListSize) {\n\n AdministratorSQLiteOpenHelper administratorSQLiteOpenHelper = new AdministratorSQLiteOpenHelper(this, \"CineTEC\", null, 1);\n SQLiteDatabase sqLiteDatabase = administratorSQLiteOpenHelper.getWritableDatabase();\n\n PdfDocument pdfDocument = new PdfDocument();\n\n PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo.Builder(1200, 2010, 1).create();\n PdfDocument.Page page = pdfDocument.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint titlePaint = new Paint();\n\n Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.logo);\n Bitmap bitmapLogo = Bitmap.createScaledBitmap(bitmap, 580, 300, false);\n\n canvas.drawBitmap(bitmapLogo, -100, 120, titlePaint);\n\n titlePaint.setTextAlign(Paint.Align.RIGHT);\n titlePaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n titlePaint.setTextSize(70);\n canvas.drawText(\"CineTEC\", 1150, 150, titlePaint);\n\n titlePaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));\n titlePaint.setTextSize(35);\n canvas.drawText(\"Barrio Escalante, Avenida 7, San José, Costa Rica\", 1150, 250, titlePaint);\n canvas.drawText(\"(+506) 2555 5555\", 1150, 300, titlePaint);\n canvas.drawText(\"costumer_service@cinetec.com\", 1150, 350, titlePaint);\n canvas.drawText(\"www.cinetec.cr\", 1150, 450, titlePaint);\n\n canvas.drawLine(50, 500, 1150, 500, titlePaint);\n\n Paint paint = new Paint();\n\n // Getting client by id\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM CLIENT WHERE ID=\" + clientID, null);\n\n String firstName = \"\";\n String lastName = \"\";\n String secLastName = \"\";\n String phoneNumber = \"\";\n\n while(cursor.moveToNext()) {\n\n firstName = cursor.getString(1);\n lastName = cursor.getString(2);\n secLastName = cursor.getString(3);\n phoneNumber = cursor.getString(6);\n\n }\n\n paint.setTextAlign(Paint.Align.LEFT);\n paint.setTextSize(35);\n canvas.drawText(\"Invoice issued for:\", 50, 550, paint);\n\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n paint.setTextSize(50);\n canvas.drawText(firstName + \" \" + lastName + \" \" + secLastName, 50, 600, paint);\n\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));\n paint.setTextSize(35);\n canvas.drawText(\"(+506) \" + phoneNumber, 50, 700, paint);\n\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n DateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\n paint.setTextAlign(Paint.Align.RIGHT);\n canvas.drawText(\"Payment Date: \" + dateFormat.format(date) + \" \" + timeFormat.format(date), 1150, 700, paint);\n canvas.drawText(\"Invoice Date: \" + dateFormat.format(date) + \" \" + timeFormat.format(date), 1150, 750, paint);\n\n paint.setStyle(Paint.Style.FILL);\n paint.setTextAlign(Paint.Align.LEFT);\n canvas.drawText(\"Movie\", 50, 850, paint);\n canvas.drawText(\"Screening\", 300, 850, paint);\n canvas.drawText(\"Theater\", 500, 850, paint);\n canvas.drawText(\"Price\", 700, 850, paint);\n canvas.drawText(\"Quantity\", 850, 850, paint);\n canvas.drawText(\"Total\", 1050, 850, paint);\n\n canvas.drawLine(50, 870, 1150, 870, paint);\n\n // Getting seats by screening id\n cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM SCREENING WHERE ID=\" + selectedScreeningId, null);\n\n String hour = \"\";\n\n while(cursor.moveToNext()) {\n\n hour = cursor.getString(3);\n\n }\n\n String subTotal = Integer.toString(3097 * seatListSize);\n\n canvas.drawText(selectedMovieOriginalName, 50, 920, paint);\n canvas.drawText(hour + \":00\", 330, 920, paint);\n canvas.drawText(selectedMovieTheater, 500, 920, paint);\n canvas.drawText(\"₡ 3097\", 680, 920, paint);\n canvas.drawText(Integer.toString(seatListSize), 910, 920, paint);\n canvas.drawText(\"₡ \" + subTotal, 1040, 920, paint);\n\n canvas.drawLine(690, 1000, 1150, 1000, paint);\n\n String total = Integer.toString(3500 * seatListSize);\n\n paint.setTextAlign(Paint.Align.RIGHT);\n canvas.drawText(\"Subtotal:\", 830, 1050, paint);\n canvas.drawText(\"₡ \" + subTotal, 1150, 1050, paint);\n\n canvas.drawText(\"IVA:\", 830, 1100, paint);\n canvas.drawText(\"13 %\", 1150, 1100, paint);\n\n canvas.drawText(\"Total:\", 830, 1150, paint);\n canvas.drawText(\"₡ \" + total, 1150, 1150, paint);\n\n pdfDocument.finishPage(page);\n\n String pathFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString();\n\n File file = new File(pathFile, \"/CineTEC_Invoice.pdf\");\n\n try {\n\n pdfDocument.writeTo(new FileOutputStream(file));\n\n } catch (FileNotFoundException e) {\n\n e.printStackTrace();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n\n pdfDocument.close();\n\n }", "public void nuevoReporteVentasMueble(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasMueble.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR MUEBLE\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "public void postProcessPDF(Object document) throws IOException, BadElementException, DocumentException {\n Document pdf = (Document) document;\n\n pdf.add(new Paragraph(\"\\n Total cost: $\" + getTotal()));\n\n ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();\n String theguy = servletContext.getRealPath(\"\") + File.separator + \"resources\" + File.separator + \"img\" + File.separator + \"theguy.png\";\n\n pdf.add(Image.getInstance(theguy));\n\n pdf.close();\n }", "public void nuevoReporteVentasFecha(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasFecha.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR FECHA\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\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 }", "private void createPdf(String name, String date, String address, String price) {\r\n Calendar calanderInstance = Calendar.getInstance();\r\n SimpleDateFormat currentDate = new SimpleDateFormat(\"MM dd,yyyy\");\r\n String mdate = currentDate.format(calanderInstance.getTime());\r\n String html = \"<!doctype html>\\n\" +\r\n \"<html lang=\\\"en\\\">\\n\" +\r\n \" <head>\\n\" +\r\n \" <title>Title</title>\\n\" +\r\n \" <!-- Required meta tags -->\\n\" +\r\n \" <meta charset=\\\"utf-8\\\">\\n\" +\r\n \" <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1, shrink-to-fit=no\\\">\\n\" +\r\n \"\\n\" +\r\n \" <!-- Bootstrap CSS -->\\n\" +\r\n \" <link rel=\\\"stylesheet\\\" href=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css\\\" integrity=\\\"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T\\\" crossorigin=\\\"anonymous\\\">\\n\" +\r\n \" </head>\\n\" +\r\n \" <body>\\n\" +\r\n \" <div class=\\\"container\\\">\\n\" +\r\n \" <h2 class=\\\" text-center\\\">Invoice</h2>\\n\" +\r\n \" <h5 class=\\\"text-center\\\">Designer Club Order History </h5>\\n\" +\r\n \" <h3 >\" + name + \"</h3>\\n\" +\r\n \" <P>Service Details and shipped status</p>\\n\" +\r\n \" <div class=\\\"container row\\\">\\n\" +\r\n \" <p style=\\\"font-weight:bold; margin-right:10px;\\\">Date:</p><p>\" + mdate + \"</p>\\n\" +\r\n \" </div>\\n\" +\r\n \" <table class=\\\"table table-bordered table-sm table-striped m-10px\\\">\\n\" +\r\n \" <thead class=\\\"thead-inverse\\\">\\n\" +\r\n \" <tr>\\n\" +\r\n \" <th>Order Date</th>\\n\" +\r\n \" <th>Address</th>\\n\" +\r\n \" <th>Shipped Status</th>\\n\" +\r\n \" <th>Shipped Date</th>\\n\" +\r\n \" <th>Payment</th>\\n\" +\r\n \" </tr>\\n\" +\r\n \" </thead>\\n\" +\r\n \" <tbody>\\n\" +\r\n \" <tr>\\n\" +\r\n \" <td>\" + date + \"</td>\\n\" +\r\n \" <td>\" + address + \"</td>\\n\" +\r\n \" <td>\" + shippedStatus + \"</td>\\n\" +\r\n \" <td>\" + shippedDate + \"</td>\\n\" +\r\n \" <td>Cash On delevary</td>\\n\" +\r\n \" </tr>\\n\" +\r\n \" </tbody>\\n\" +\r\n \" </table>\\n\" +\r\n \" \\n\" +\r\n \" <h4 class=\\\"text-right\\\" style=\\\"font-weight:bold;\\\">Total</h4>\\n\" +\r\n \" <h4 class=\\\"text-right\\\">\" + price + \"</h4>\\n\" +\r\n \" \\n\" +\r\n \" </div>\\n\" +\r\n \" <!-- Optional JavaScript -->\\n\" +\r\n \" <!-- jQuery first, then Popper.js, then Bootstrap JS -->\\n\" +\r\n \" <script src=\\\"https://code.jquery.com/jquery-3.3.1.slim.min.js\\\" integrity=\\\"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo\\\" crossorigin=\\\"anonymous\\\"></script>\\n\" +\r\n \" <script src=\\\"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js\\\" integrity=\\\"sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1\\\" crossorigin=\\\"anonymous\\\"></script>\\n\" +\r\n \" <script src=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js\\\" integrity=\\\"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM\\\" crossorigin=\\\"anonymous\\\"></script>\\n\" +\r\n \" </body>\\n\" +\r\n \"</html>\";\r\n webView.loadDataWithBaseURL(null, html, \"text/html\", \"utf-8\", null);\r\n }", "public static void createPrescriptionLabel(String headerTitle, String pName, String orderDate,String orderNo) throws FileNotFoundException, DocumentException, SQLException\n {\n String sqlGetDrugPresc = \"\";\n \n Rectangle customRec = new Rectangle(238f, 138f);\n Document document = new Document(customRec,1,1,2,3);\n PdfWriter.getInstance(document,new FileOutputStream(headerTitle));\n document.open();\n \n \n \n try{\n sqlGetDrugPresc = \"Select * from pis_order_detail where order_no = '\"+ orderNo +\"'\"; \n \n String a[] = {};\n ArrayList<ArrayList<String>> fromRmi = DBConnection.getImpl().getQuery(sqlGetDrugPresc, 17, a); \n for(int i = 0 ; i < fromRmi.size() ; i++)\n {\n Paragraph mainContent = new Paragraph();\n\n Paragraph clinicName = new Paragraph(\"Klinik Utem Induk\",labelTitle);\n //clinicName.setFont(labelTitle);\n clinicName.setAlignment(Element.ALIGN_CENTER);\n\n mainContent.add(clinicName);\n //addEmptyLine(mainContent,1);\n Paragraph ptnName = new Paragraph(\"Name :\"+pName,labelFont);\n ptnName.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(ptnName);\n\n Paragraph oDate = new Paragraph(\"Date :\"+orderDate.substring(0,10),labelFont);\n oDate.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(oDate);\n \n Paragraph descrp1 = new Paragraph(fromRmi.get(i).get(2),labelFont);\n descrp1.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descrp1);\n\n Paragraph descrp2 = new Paragraph(fromRmi.get(i).get(4),labelFont);\n descrp2.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descrp2);\n\n Paragraph descOrderOUM = new Paragraph(fromRmi.get(i).get(8),labelFont);\n descOrderOUM.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descOrderOUM);\n\n Paragraph descDrugStrength = new Paragraph(fromRmi.get(i).get(6),labelFont);\n descDrugStrength.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descDrugStrength);\n\n document.add(mainContent);\n if(i != fromRmi.size()- 1)\n document.newPage();\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n \n try \n {\n sqlGetDrugPresc = \"Select * from pis_order_detail where order_no = ?\";\n PreparedStatement ps = Session.getCon_x(1000).prepareStatement(sqlGetDrugPresc);\n ps.setString(1, orderNo);\n ResultSet rs = ps.executeQuery(); \n\n for(int i=0;rs.next();i++)\n { \n Paragraph mainContent = new Paragraph();\n\n Paragraph clinicName = new Paragraph(\"Klinik Utem Induk\",labelTitle);\n //clinicName.setFont(labelTitle);\n clinicName.setAlignment(Element.ALIGN_CENTER);\n\n mainContent.add(clinicName);\n //addEmptyLine(mainContent,1);\n Paragraph ptnName = new Paragraph(\"Name :\"+pName,labelFont);\n ptnName.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(ptnName);\n\n Paragraph oDate = new Paragraph(\"Date :\"+orderDate.substring(0,10),labelFont);\n oDate.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(oDate);\n \n Paragraph descrp1 = new Paragraph(rs.getString(\"DRUG_ITEM_DESC\"),labelFont);\n descrp1.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descrp1);\n \n Paragraph descrp2 = new Paragraph(rs.getString(\"DRUG_FREQUENCY\"),labelFont);\n descrp2.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descrp2);\n \n Paragraph descOrderOUM = new Paragraph(rs.getString(\"ORDER_OUM\"),labelFont);\n descOrderOUM.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descOrderOUM);\n \n Paragraph descDrugStrength = new Paragraph(rs.getString(\"DRUG_STRENGTH\"),labelFont);\n descDrugStrength.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descDrugStrength);\n \n document.add(mainContent);\n if(!rs.isLast())\n document.newPage();\n } \n } catch (DocumentException exx) {\n exx.printStackTrace();\n }\n }\n document.close();\n PrintTest2.print3(headerTitle);\n }", "public void nuevoReporteVentasCiudad(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasCiudad.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR CIUDAD\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "public static void printLogo() {\n System.out.println(LOGO1);\n System.out.println(LOGO2);\n System.out.println(LOGO3);\n System.out.println(LOGO4);\n System.out.println(LOGO5);\n System.out.println(\"\");\n }", "public static void main(String args[]) throws IOException {\n File file = new File(\"Savoy House_2019_Price List_precios.pdf\");\n PDDocument document = PDDocument.load(file);\n\n //Instantiate PDFTextStripper class\n PDFTextStripper striper = new PDFTextStripper();\n\n //Retrieving text from PDF document\n striper.setStartPage(1);\n\n String documentText = striper.getText(document);\n //System.out.println(documentText);\n\n String[] tablica = documentText.split(\"\\n\");\n String header = \"Referencia,colección,Catalogo,Distributor Price EXW-Valencia,Distributor Price EXW-Valencia,\" +\n \"uds por caja,Peso bruto,imap price\\n\" +\n \"sku #,Family,Catalogue,CE 2019 [€] (Ready pickup 50~65 days),CE 2019 [€] (Ready pickup 20~30 days),\" +\n \"Pkg size,Packed weight [kg],online (Valid until June 30th 2019)\\n\";\n\n StringBuilder sb = new StringBuilder(header);\n\n for (int i = 0; i < tablica.length; i++) {\n if (tablica[i].trim().endsWith(\"€\")) {\n int lineLength = tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \").length;\n\n // check if 'Pkg size' is 1 (is not empty)\n if (tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[lineLength - 3].equals(\"1\")) {\n\n // join collection name into one record in the row\n if (lineLength == 8) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").replaceAll(\" \", \",\") + \"\\n\");\n } else if (lineLength > 8) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[0] + \",\");\n for (int j = 1; j < lineLength - 6; j++) {\n if (j < lineLength - 7) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j] + \" \");\n } else {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j]);\n }\n }\n sb.append(\",\");\n\n // append other records into the row\n for (int j = lineLength - 6; j < lineLength; j++) {\n if (j < lineLength - 1) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j] + \",\");\n } else {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j]);\n }\n }\n sb.append(\"\\n\");\n }\n } else {\n sb.append(\"Data missing\\n\");\n }\n }\n }\n System.out.println(sb);\n\n // write sb string as csv file\n try {\n FileWriter writer = new FileWriter(\"savoy2019.csv\", true);\n writer.write(sb.toString());\n writer.close();\n System.out.println(\"'savoy2019.csv' file created successfully\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Closing the document\n document.close();\n }", "public void PDF() {\n try {\r\n /* try {\r\n ImageIO.write(Imagen, \"png\", new File(Path + \"1\" + \".png\"));\r\n } catch (IOException ex) {\r\n Logger.getLogger(panelprincipal.getName()).log(Level.SEVERE, null, ex);\r\n }*/\r\n Image imagen = Image.getInstance(jfc.getSelectedFile().getPath() + \"#\" + \".png\");\r\n imagen.scaleAbsolute(500, 400);\r\n imagen.setAlignment(Element.ALIGN_CENTER);\r\n FileOutputStream archivo = new FileOutputStream(jfc.getSelectedFile().getPath() + \".PDF\");\r\n Document d = new Document();\r\n PdfWriter.getInstance(d, archivo);\r\n PDF creacion = new PDF();\r\n d.open();\r\n d.setPageSize(PageSize.LETTER);\r\n d.add(creacion.setTitulo(nombrediagrama));\r\n //doc.add(new Paragraph(\" Carlos Wilfredo Romero Maradiaga \\n\"));\r\n d.add(imagen);\r\n // doc.add(pdf.getCuerpo(\"\\nCódigo Generado:\\n\"));\r\n /* if (codigo.length()<2) {\r\n doc.add(pdf.getCuerpo(\"Para poder visualizar el código, primero debe generarlo desde el Sistema y vuelva a guardar el archivo.\"));\r\n } else {\r\n doc.add(pdf.getCuerpo(codigo));\r\n */\r\n d.close();\r\n JOptionPane.showMessageDialog(null, \"El PDF se genero excelente\", \"Excelente\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (Exception e) {\r\n }\r\n }", "private void createCoverTable(Document document, Image img) throws IOException, DocumentException {\n\n //PEI NAME IN BLUE\n Table table = new Table(1);\n table.setBorder(Table.NO_BORDER);\n table.setWidth(100);\n Font font = getFontBig();\n font.setColor(Color.BLUE);\n font.setStyle(Font.BOLD);\n font.setSize(34);\n Cell cell = new Cell(new Paragraph(peiName, font));\n cell.setHorizontalAlignment(Cell.ALIGN_CENTER);\n cell.setVerticalAlignment(Cell.ALIGN_TOP);\n cell.setBorder(Cell.NO_BORDER);\n table.addCell(cell);\n document.add(table);\n\n //PEI ATTRS\n table = new Table(2);\n table.setCellsFitPage(true);\n table.setBorder(Table.NO_BORDER);\n table.setAlignment(Table.ALIGN_LEFT);\n table.setWidth(100);\n table.setWidths(new float[]{150, 300});\n\n font = getFontSmall();\n font.setStyle(Font.BOLD);\n Paragraph p1 = new Paragraph(getMessage(\"pei.version\") + \":\", font);\n p1.setAlignment(Paragraph.ALIGN_LEFT);\n cell = new Cell(p1);\n Paragraph p2 = new Paragraph(version != null ? version : \"\", getFontSmall());\n p2.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p2);\n Paragraph p3 = new Paragraph(getMessage(\"pei.versionDate\") + \":\", font);\n p3.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p3);\n Paragraph p4 = new Paragraph(versionDate != null ? dateFormat.format(versionDate) : \"\", getFontSmall());\n p4.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p4);\n Paragraph p5 = new Paragraph(simulationDate != null ? getMessage(\"pei.simulationDate\") + \":\" : \"\", font);\n p5.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p5);\n Paragraph p6 = new Paragraph(simulationDate != null ? dateFormat.format(simulationDate) : \"\", getFontSmall());\n p6.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p6);\n Paragraph p7 = new Paragraph(getMessage(\"pei.authorName\") + \":\", font);\n p7.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p7);\n Paragraph p8 = new Paragraph(authorName != null ? authorName : \"\", getFontSmall());\n p8.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p8);\n\n cell.setBackgroundColor(Color.LIGHT_GRAY);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT);\n cell.setVerticalAlignment(Element.ALIGN_BOTTOM);\n table.addCell(cell);\n\n if (img != null) {\n if (img.getWidth() > 295) {\n img.scaleAbsoluteWidth(295);\n img.scaleAbsoluteHeight(img.getHeight() / img.getWidth() * 295);\n }\n img.setAlignment(Image.ALIGN_RIGHT);\n Paragraph p = new Paragraph(\" \");\n p.setAlignment(Paragraph.ALIGN_RIGHT);\n cell = new Cell(p);\n cell.setHorizontalAlignment(Cell.ALIGN_RIGHT);\n cell.addElement(img);\n } else {\n cell = new Cell(\" \");\n }\n cell.setBorder(Cell.NO_BORDER);\n\n table.addCell(cell);\n\n document.add(table);\n }", "public static void createReportICD10(String title, String date) {\n try {\n Document document = new Document(PageSize.A5.rotate());\n PdfWriter.getInstance(document, new FileOutputStream(title));\n document.open();\n addMetaDataICD10(document);\n addTitleICD10(document, date);\n addDataICD10(document, date);\n addFooterICD10(document);\n document.close();\n\n PrintTest2.print3(title);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void PDFBill(Orders o) throws FileNotFoundException, DocumentException {\n\n\t\tOrdersBLL orderBLL = new OrdersBLL();\n\t\t\n\t\tDate d = new Date();\n\t\t\n\t\tDocument document = new Document();\n\t\t\n\t\tString fileName = \"Bill-report\" + countBills + \".pdf\";\n\t\tcountBills++;\n\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\n\t\tdocument.open();//open document\n\n\t\t//create paragraph\n\t\tParagraph intro = new Paragraph(\"Bill\");\n\t\tParagraph space = new Paragraph(\" \");\n\t\tParagraph date = new Paragraph(d.toString());\n\t\tPdfPTable table = new PdfPTable(5);\n\n\t\t//create a cell\n\t\tPdfPCell c1 = new PdfPCell(new Paragraph(\"Id\"));\n\t\tPdfPCell c2 = new PdfPCell(new Paragraph(\"Customer Name\"));\n\t\tPdfPCell c3 = new PdfPCell(new Paragraph(\"Product Name\"));\n\t\tPdfPCell c4 = new PdfPCell(new Paragraph(\"Quantity\"));\n\t\tPdfPCell c5 = new PdfPCell(new Paragraph(\"Total price\"));\n\n\n\t\t//add the cells to the table\n\t\ttable.addCell(c1);\n\t\ttable.addCell(c2);\n\t\ttable.addCell(c3);\n\t\ttable.addCell(c4);\n\t\ttable.addCell(c5);\n\n\t\tString[] arr = orderBLL.printBill(o);\n\t\tc1 = new PdfPCell(new Paragraph(arr[0]));\n\t\tc2 = new PdfPCell(new Paragraph(arr[1]));\n\t\tc3 = new PdfPCell(new Paragraph(arr[2]));\n\t\tc4 = new PdfPCell(new Paragraph(arr[3]));\n\t\tc5 = new PdfPCell(new Paragraph(arr[4]));\n\n\n\t\ttable.addCell(c1);\n\t\ttable.addCell(c2);\n\t\ttable.addCell(c3);\n\t\ttable.addCell(c4);\n\t\ttable.addCell(c5);\n\n\n\t\t//add the objects to the document\n\t\tdocument.add(space);\n\t\tdocument.add(intro);\n\t\tdocument.add(space);\n\t\tdocument.add(date);\n\t\tdocument.add(space);\n\t\tdocument.add(table);\n\n\t\tdocument.close();\n\t}", "public static void main( String[] args ) throws Exception\n {\n if( args.length != 2 )\n {\n System.out.println(\"Usage: <input pdf> <output file>\");\n }\n else\n {\n \tFile file = new File(\"./\"+args[0]);\n \tPDDocument document = PDDocument.load(file);\n\n \t List<PDPage> documentPages = document.getDocumentCatalog().getAllPages();\n\n \t\n try\n {\n \tPDPage page = documentPages.get(0);\n //document.addPage(page);\n List annotations = page.getAnnotations();\n\n // Setup some basic reusable objects/constants\n // Annotations themselves can only be used once!\n\n float inch = 72;\n PDGamma colourGreen = new PDGamma();\n colourGreen.setG(1);\n PDGamma colourBlue = new PDGamma();\n colourBlue.setB(1);\n\n PDBorderStyleDictionary borderThick = new PDBorderStyleDictionary();\n borderThick.setWidth(inch/12); // 12th inch\n PDBorderStyleDictionary borderThin = new PDBorderStyleDictionary();\n borderThin.setWidth(inch/72); // 1 point\n PDBorderStyleDictionary borderULine = new PDBorderStyleDictionary();\n borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE);\n borderULine.setWidth(inch/72); // 1 point\n\n float pw = page.getMediaBox().getUpperRightX();\n float ph = page.getMediaBox().getUpperRightY();\n\n // Add the markup annotation, a highlight to PDFBox text\n PDFont font = PDType1Font.HELVETICA_BOLD;\n PDAnnotationTextMarkup txtMark = new PDAnnotationTextMarkup(PDAnnotationTextMarkup.SUB_TYPE_HIGHLIGHT);\n txtMark.setColour(colourBlue);\n txtMark.setConstantOpacity((float)0.1); // Make the highlight 20% transparent\n\n // Set the rectangle containing the markup\n\n float textWidth = (font.getStringWidth( \"PDFBox\" )/1000) * 18;\n PDRectangle position = new PDRectangle();\n position.setLowerLeftX(inch);\n position.setLowerLeftY( ph-inch-18 );\n position.setUpperRightX(72 + textWidth);\n position.setUpperRightY(ph-inch);\n txtMark.setRectangle(position);\n\n // work out the points forming the four corners of the annotations\n // set out in anti clockwise form (Completely wraps the text)\n // OK, the below doesn't match that description.\n // It's what acrobat 7 does and displays properly!\n float[] quads = new float[8];\n\n quads[0] = position.getLowerLeftX(); // x1\n quads[1] = position.getUpperRightY()-2; // y1\n quads[2] = position.getUpperRightX(); // x2\n quads[3] = quads[1]; // y2\n quads[4] = quads[0]; // x3\n quads[5] = position.getLowerLeftY()-2; // y3\n quads[6] = quads[2]; // x4\n quads[7] = quads[5]; // y5\n\n txtMark.setQuadPoints(quads);\n txtMark.setContents(\"Highlighted since it's important\");\n\n annotations.add(txtMark);\n\n\n \n\n // Now a square annotation\n\n PDAnnotationSquareCircle aSquare =\n new PDAnnotationSquareCircle( PDAnnotationSquareCircle.SUB_TYPE_SQUARE);\n aSquare.setContents(\"Square Annotation\");\n aSquare.setColour(colourGreen); // Outline in red, not setting a fill\n aSquare.setBorderStyle(borderThick);\n aSquare.setConstantOpacity((float)0.1);\n\n // Place the annotation on the page, we'll make this 1\" (72points) square\n // 3.5\" down, 1\" in from the right on the page\n\n position = new PDRectangle(); // Reuse the variable, but note it's a new object!\n position.setLowerLeftX(pw-(2*inch)); // 1\" in from right, 1\" wide\n position.setLowerLeftY(ph-(float)(3.5*inch) - inch); // 1\" height, 3.5\" down\n position.setUpperRightX(pw-inch); // 1\" in from right\n position.setUpperRightY(ph-(float)(3.5*inch)); // 3.5\" down\n aSquare.setRectangle(position);\n\n // add to the annotations on the page\n annotations.add(aSquare);\n\n\n\n document.save(args[1]);\n }\n finally\n {\n document.close();\n }\n }\n }", "private void generarDocP(){\n generarPdf(this.getNombre());\n }", "public static void main(String[] args) throws DocumentException, IOException {\n \t\n// // step 1\n// Document document = new Document();\n \n // step 1: creation of the document with a certain size and certain margins\n Document document = new Document(PageSize.A4, 50, 50, 50, 50);\n \n // step 2: create a writer (we have many type of writer, eg HtmlWriter, PdfWriter)\n PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(RESULT));\n \n /* step 3: BEFORE open the document we add some meta information to the document (that properties can be viewed with adobe reader or right click-properties)\n * they don't appear in the document view\n */\n document.addAuthor(\"Author Test\"); \n document.addSubject(\"This is the result of a Test.\"); \n \n // step 4\n document.open();\n \n //The com.itextpdf.text.Image is used to add images to IText PDF documents\n Image image1 = Image.getInstance(\"src/main/resources/sms.png\");\n document.add(image1);\n \n // step 5\n /*\n access at the content under the new pdf document just created (ie the writer object that i can control/move)\n PdfContentByte is the object that contains the text to write and the content of a page (it offer the methods to add content to a page)\n */\n PdfContentByte canvas = writer.getDirectContentUnder();\n \n //Sets the compression level to be used for streams written by the writer.\n writer.setCompressionLevel(0);\n canvas.saveState(); \n canvas.beginText(); \n //move the writer to tha X,Y position\n canvas.moveText(360, 788); \n canvas.setFontAndSize(BaseFont.createFont(), 12);\n \n Rectangle rectangle = new Rectangle(400, 300);\n rectangle.setBorder(2);\n document.add(rectangle);\n \n /* \n Writes something to the direct content using a convenience method\n A Phrase is a series of Chunks (A Chunk is the smallest significant part of text that can be added to a document)\n \n Conclusion: A chunk is a String with a certain Font ---> A Phrase is a series of Chunk\n Both Chunck and Font has a Font field (but if a Chunk haven't a Font uses the one of the Phrase that own it)\n */\n \n //------- Two modes to set a Phrase: --------\n \n //mode 1) set the phrase directly without a separate chunk object\n Phrase hello = new Phrase(\"Hello World3\");\n document.add(hello);\n \n //mode 2) create before a chunk, adjust it and after assign it to a Phrase(s) \n Chunk chunk2 = new Chunk(\"Setting the Font\", FontFactory.getFont(\"dar-black\"));\n chunk2.setUnderline(0.5f, -1.5f);\n \n Phrase p1 = new Phrase(chunk2);\n document.add(p1); \n \n canvas.showText(\"Hello sms\"); \n canvas.endText(); \n canvas.restoreState(); \n \n document.add(Chunk.NEWLINE);\n \n //i chunk posso aggiungerli solo tramite l'oggetto Document ?\n Chunk chunk = new Chunk(\"I'm a chunk\");\n chunk.setBackground(BaseColor.GRAY, 1f, 0.5f, 1f, 1.5f);\n document.add(chunk);\n \n /*\n * A Paragraph is a series of Chunks and/or Phrases, has the same qualities of a Phrase, but also some additional layout-parameters\n * A paragraph is a sub-section in the document. After each Paragraph a CRLF is added\n */\n Paragraph paragraph = new Paragraph(\"A:\\u00a0\");\n Chunk chunk1 = new Chunk(\"I'm a chunk1\");\n paragraph.add(chunk1);\n paragraph.setAlignment(Element.ALIGN_JUSTIFIED);\n document.add(paragraph);\n \n \n //----- Add a table to the document ------\n \n //A cell in a PdfPTable\n PdfPCell cell;\n \n PdfPTable table = new PdfPTable(2); //in argument vis the number of column\n table.setWidths(new int[]{ 1, 2 }); //the width of the first and second cell. The number of element in the array must be equal at the number of column\n \n table.addCell(\"Name:\");\n cell = new PdfPCell();\n //We can attach event at the cell\n //cell.setCellEvent(new TextFields(1));\n table.addCell(cell);\n \n table.addCell(\"Loginname:\");\n cell = new PdfPCell();\n //cell.setCellEvent(new TextFields(2));\n table.addCell(cell);\n \n table.addCell(\"Password:\");\n cell = new PdfPCell(); \n table.addCell(cell);\n \n table.addCell(\"Reason:\");\n cell = new PdfPCell(); \n cell.setFixedHeight(60);\n table.addCell(cell);\n \n document.add(table);\n \n //add an horizontal line\n LineSeparator ls = new LineSeparator(); \n ls.setLineWidth(0);\n document.add(new Chunk(ls));\n \n Anchor pdfRef = new Anchor(\"http://www.java2s.com\");\n document.add(pdfRef);\n \n // step 5\n document.close();\n }", "public void nuevoReporteClientes(ArrayList<Cliente> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteClientes.pdf\");\r\n documento = new Document(); // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento.\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE CLIENTES\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(9);\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"algo\", font));\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\panle\\\\Documents\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"NOMBRE COMLETO\");\r\n tabla.addCell(\"USUARIO\");\r\n tabla.addCell(\"NIT\");\r\n tabla.addCell(\"NO DOCUMENTO\");\r\n tabla.addCell(\"PROFESION\");\r\n tabla.addCell(\"TELÉFONO CELULAR\");\r\n tabla.addCell(\"TELÉFONO RESIDENCIA\");\r\n tabla.addCell(\"DIRECCIÓN\");\r\n tabla.addCell(\"CIUDAD\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getNOMBRE() + \" \" + Datos.get(conta).getAPELLIDO());\r\n tabla.addCell(Datos.get(conta).getUSUARIO());\r\n tabla.addCell(Datos.get(conta).getNIT());\r\n tabla.addCell(Datos.get(conta).getNUMERO_DOC());\r\n tabla.addCell(Datos.get(conta).getPROFESION());\r\n tabla.addCell(Datos.get(conta).getTEL_CEL());\r\n tabla.addCell(Datos.get(conta).getTEL_RESIDENCIA());\r\n tabla.addCell(Datos.get(conta).getDIRECCION());\r\n tabla.addCell(Datos.get(conta).getCIUDAD());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Clientes, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "private static void addMetaData(Document document) {\n document.addTitle(\"Report\");\n //document.addSubject(\"Using iText\");\n //document.addKeywords(\"Java, PDF, iText\");\n document.addAuthor(\"Illya Barziy\");\n //document.addCreator(\"Lars Vogel\");\n }", "stockFilePT102.StockHeaderDocument.StockHeader addNewStockHeader();", "public static void main(String[] args) throws IOException {\n\t PDDocument document = new PDDocument();\n\n\t //Creating a blank page\n\t PDPage blankPage = new PDPage();\n\t \n\t //Adding the blank page to the document\n\t document.addPage( blankPage );\n\n\t //Creating the PDDocumentInformation object \n\t PDDocumentInformation pdd = document.getDocumentInformation();\n\n\t //Setting the author of the document\n\t pdd.setAuthor(\"Tutorialspoint\");\n\t \n\t // Setting the title of the document\n\t pdd.setTitle(\"Sample document\"); \n\t \n\t //Setting the creator of the document \n\t pdd.setCreator(\"PDF Examples\"); \n\t \n\t //Setting the subject of the document \n\t pdd.setSubject(\"Example document\"); \n\t \n\t //Setting the created date of the document \n\t Calendar date = new GregorianCalendar();\n\t date.set(2015, 11, 5); \n\t pdd.setCreationDate(date);\n\t //Setting the modified date of the document \n\t date.set(2016, 6, 5); \n\t pdd.setModificationDate(date); \n\t \n\t //Setting keywords for the document \n\t pdd.setKeywords(\"sample, first example, my pdf\"); \n\t \n\t \n\t PDPageContentStream contentStream = new PDPageContentStream(document, blankPage);\n\t \n\t //Begin the Content stream \n\t contentStream.beginText(); \n\t \n\t //Setting the font to the Content stream \n\t contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n\n\t //Setting the position for the line \n\t contentStream.newLineAtOffset(25, 500);\n\n\t String text = \"This is the sample document and we are adding content to it.\";\n\n\t //Adding text in the form of string \n\t contentStream.showText(text); \n\n\t //Ending the content stream\n\t contentStream.endText();\n\n\t System.out.println(\"Content added\");\n\n\t //Closing the content stream\n\t contentStream.close();\n\t \n\t //Saving the document \n\t document.save(\"doc_attributes.pdf\");\n\n\t System.out.println(\"Properties added successfully \");\n\t \n\t //Closing the document\n\t document.close();\n\t}", "public void manipulatePdf(String dest) throws IOException, SQLException {\n DatabaseConnection connection = new HsqldbConnection(\"filmfestival\");\n\n PdfDocument pdfDoc = new PdfDocument(new PdfWriter(DEST));\n Document doc = new Document(pdfDoc);\n doc.setMargins(54, 36, 36, 36);\n\n HeaderHandler headerHandler = new HeaderHandler();\n pdfDoc.addEventHandler(PdfDocumentEvent.START_PAGE, headerHandler);\n\n WatermarkHandler watermarkHandler = new WatermarkHandler();\n pdfDoc.addEventHandler(PdfDocumentEvent.END_PAGE, watermarkHandler);\n\n template = new PdfFormXObject(new Rectangle(550, 803, 30, 30));\n PdfCanvas canvas = new PdfCanvas(template, pdfDoc);\n\n\n bold = PdfFontFactory.createFont(StandardFonts.HELVETICA_BOLD);\n italic = PdfFontFactory.createFont(StandardFonts.HELVETICA_OBLIQUE);\n normal = PdfFontFactory.createFont(StandardFonts.HELVETICA);\n\n Statement stm = connection.createStatement();\n ResultSet rs = stm.executeQuery(\n \"SELECT country, id FROM film_country ORDER BY country\");\n int d = 1;\n while (rs.next()) {\n headerHandler.setHeader(rs.getString(\"country\"));\n if (1 != d) {\n doc.add(new AreaBreak());\n }\n Set<Movie> movies =\n new TreeSet<>(new MovieComparator(MovieComparator.BY_YEAR));\n movies.addAll(PojoFactory.getMovies(connection, rs.getString(\"id\")));\n for (Movie movie : movies) {\n doc.add(new Paragraph(movie.getMovieTitle()).setFont(bold));\n if (movie.getOriginalTitle() != null)\n doc.add(new Paragraph(movie.getOriginalTitle()).setFont(italic));\n doc.add(new Paragraph(String.format(\"Year: %d; run length: %d minutes\",\n movie.getYear(), movie.getDuration())).setFont(normal));\n doc.add(PojoToElementFactory.getDirectorList(movie));\n }\n d++;\n }\n\n canvas.beginText();\n try {\n canvas.setFontAndSize(PdfFontFactory.createFont(StandardFonts.HELVETICA), 12);\n } catch (IOException e) {\n e.printStackTrace();\n }\n canvas.moveText(550, 803);\n canvas.showText(Integer.toString(pdfDoc.getNumberOfPages()));\n canvas.endText();\n canvas.stroke();\n\n doc.close();\n connection.close();\n }", "private void addCotationAndComment(){\n contentTable = new PdfPTable(1);\n table = new PdfPTable(5);\n\n //*** cotation ***\n Vector items = new Vector();\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_LEFT\");\n\n if(verifyList(items)){\n\n // title\n table.addCell(createItemNameCell(getTran(\"leprosy\",\"cotationdesinfirmites\"),2));\n\n // dedicated table\n PdfPTable cotationTable = new PdfPTable(8);\n\n // header\n cotationTable.addCell(emptyCell(2));\n cotationTable.addCell(createHeaderCell(getTran(\"web\",\"right\"),3));\n cotationTable.addCell(createHeaderCell(getTran(\"web\",\"left\"),3));\n\n //***** row 1 : Oeil *****\n cell = createHeaderCell(getTran(\"leprosy\",\"oeil\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_RIGHT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"oeil_\"+itemValue).toLowerCase():\"\"),3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_LEFT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"oeil_\"+itemValue).toLowerCase():\"\"),3));\n\n //***** row 2 : Main *****\n cell = createHeaderCell(getTran(\"leprosy\",\"main\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_RIGHT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"main_\"+itemValue).toLowerCase():\"\"),3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_LEFT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"main_\"+itemValue).toLowerCase():\"\"),3));\n\n //***** row 3 : Pied *****\n cell = createHeaderCell(getTran(\"leprosy\",\"pied\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_RIGHT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"pied_\"+itemValue).toLowerCase():\"\"),3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_LEFT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"pied_\"+itemValue).toLowerCase():\"\"),3));\n\n //***** row 4 : Totals *****\n cell = createHeaderCell(getTran(\"web\",\"total\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_RIGHT\");\n cotationTable.addCell(createValueCell(itemValue,3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_LEFT\");\n cotationTable.addCell(createValueCell(itemValue,3));\n\n // add cotationTable\n cell = createCell(new PdfPCell(cotationTable),3,PdfPCell.ALIGN_CENTER,PdfPCell.BOX);\n cell.setColspan(5);\n cell.setPadding(3);\n table.addCell(cell);\n }\n\n //*** commet ***\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COMMENT\");\n if(itemValue.length() > 0){\n addItemRow(table,getTran(\"Web\",\"comment\"),itemValue);\n }\n\n // add table to transaction\n if(table.size() > 0){\n if(contentTable.size() > 0) contentTable.addCell(emptyCell());\n contentTable.addCell(createCell(new PdfPCell(table),1,PdfPCell.ALIGN_CENTER,PdfPCell.NO_BORDER));\n tranTable.addCell(new PdfPCell(contentTable));\n addTransactionToDoc();\n }\n }", "public void gerarRelatorioMedico() {\n Document documento = new Document(PageSize.A4.rotate());\n \n //Defina as margens\n documento.setMargins(40f, 40f, 150f, 40f);\n \n try {\n CabecalhoRodapeEvento inserircabecalho = new CabecalhoRodapeEvento();\n \n //Cria um arquivo relatorio.pdf com o documento\n PdfWriter.getInstance(documento, new FileOutputStream(\"relatorioMedico.pdf\")).setPageEvent(inserircabecalho);\n \n documento.open();\n \n Paragraph tituloDoRelatorio = new Paragraph(new Phrase(20F, \"RELATÓRIO DOS MÉDICOS CADASTRADOS\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 15F)));\n tituloDoRelatorio.setAlignment(Element.ALIGN_CENTER);\n\n documento.add(tituloDoRelatorio);\n \n Table tabelaMedicos = new Table(6);\n tabelaMedicos.setBorder(10);\n tabelaMedicos.setBorderWidth(2);\n tabelaMedicos.setBorderColor(Color.black);\n tabelaMedicos.setPadding(2);\n //tabelaMedicos.setSpacing(0);\n tabelaMedicos.setWidth(100f);\n tabelaMedicos.setWidths(new float[]{10f, 30f, 20f, 10f, 15f, 15f});\n \n Paragraph paragrafoCrm = new Paragraph(new Phrase(12F, \"CRM\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoCrm.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoNome = new Paragraph(new Phrase(12F, \"NOME\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoEspecialidade = new Paragraph(new Phrase(12F, \"ESPECIALIDADE\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoEspecialidade.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoSexo = new Paragraph(new Phrase(12F, \"SEXO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoSalario = new Paragraph(new Phrase(12F, \"SALARIO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoSalario.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoDataNascimento = new Paragraph(new Phrase(12F, \"DATA NASCIMENTO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n \n Cell celulaMedicoCrm = new Cell(paragrafoCrm);\n Cell celulaMedicoNome = new Cell(paragrafoNome);\n Cell celulaMedicoEspecialidade = new Cell(paragrafoEspecialidade);\n Cell celulaMedicoSexo = new Cell(paragrafoSexo);\n Cell celulaMedicoSalario = new Cell(paragrafoSalario);\n Cell celulaMedicoDataNascimento = new Cell(paragrafoDataNascimento);\n \n celulaMedicoCrm.setHeader(true);\n tabelaMedicos.addCell(celulaMedicoCrm);\n tabelaMedicos.addCell(celulaMedicoNome);\n tabelaMedicos.addCell(celulaMedicoEspecialidade);\n tabelaMedicos.addCell(celulaMedicoSexo);\n tabelaMedicos.addCell(celulaMedicoSalario);\n tabelaMedicos.addCell(celulaMedicoDataNascimento);\n \n //definindo alinhamento, cores do cabeçalho da tabela\n for (int i = 0; i < tabelaMedicos.getColumns(); i++) {\n\n Cell celula = (Cell) tabelaMedicos.getElement(0, i);\n celula.setHorizontalAlignment(Element.ALIGN_CENTER);\n celula.setBackgroundColor(Color.yellow);\n celula.setBorderColor(Color.black);\n\n }\n \n for(Medico medico : listarTodosMedicos()) {\n paragrafoCrm = new Paragraph(new Phrase(15F, \"\"+ medico.getCRM(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoCrm.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoCrm = new Cell(paragrafoCrm);\n celulaMedicoCrm.setBorderColor(Color.black);\n celulaMedicoCrm.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoCrm);\n \n paragrafoNome = new Paragraph(new Phrase(15F, \"\"+ medico.getNome(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoNome = new Cell(paragrafoNome);\n celulaMedicoNome.setBorderColor(Color.black);\n celulaMedicoNome.setHorizontalAlignment(Element.ALIGN_LEFT);\n tabelaMedicos.addCell(celulaMedicoNome);\n \n paragrafoEspecialidade = new Paragraph(new Phrase(15F, \"\"+ medico.getEspecialidade(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoEspecialidade.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoEspecialidade = new Cell(paragrafoEspecialidade);\n celulaMedicoEspecialidade.setBorderColor(Color.black);\n celulaMedicoEspecialidade.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoEspecialidade);\n \n paragrafoSexo = new Paragraph(new Phrase(15F, \"\"+ medico.getSexo(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoSexo = new Cell(paragrafoSexo);\n celulaMedicoSexo.setBorderColor(Color.black);\n celulaMedicoSexo.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoSexo);\n \n paragrafoSalario = new Paragraph(new Phrase(15F, \"R$ \"+ medico.getSalario(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoSalario.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoSalario = new Cell(paragrafoSalario);\n celulaMedicoSalario.setBorderColor(Color.black);\n celulaMedicoSalario.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoSalario);\n \n paragrafoDataNascimento = new Paragraph(new Phrase(15F, \"\"+ sdf.format(medico.getDataDeNascimento()),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoDataNascimento = new Cell(paragrafoDataNascimento);\n celulaMedicoDataNascimento.setBorderColor(Color.black);\n celulaMedicoDataNascimento.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoDataNascimento);\n \n } \n \n documento.add(tabelaMedicos);\n \n Runtime.getRuntime().exec(new String[]{\"cmd.exe\", \"/c\", \"start\", \"relatorioMedico.pdf\"});\n \n documento.close();\n \n } catch (DocumentException ex) {\n System.out.println(ex);\n } catch (FileNotFoundException ex) {\n System.out.println(ex);\n } catch (IOException ex) {\n System.out.println(ex);\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n }", "public void buildSectionOne(Document document) throws DocumentException, IOException, JSONException {\n PdfPTable titleTable = new PdfPTable ( 1 );\n titleTable.setWidthPercentage ( 100 );\n\n // Strategy\n titleTable.addCell ( ReportTemplate.getSectionHeaderCell ( \"Featured Strategy: \" + selectedStrategy ) );\n\n /**\n * @changed - Abhishek\n * @date - 11-02-2016\n * @desc - Applied format of $xxx,xxx\n */\n // Estimate Income\n titleTable.addCell ( ReportTemplate.getSectionSubHeaderCellWithBoxBorder ( \"Estimated Income: $\" + estimatedIncome ) );\n\n document.add ( titleTable );\n\n // Add Charts Now\n PdfPTable contentTable = new PdfPTable ( 2 );\n contentTable.setWidthPercentage ( 100 );\n\n // Create 3d Pie Chart Section\n PdfPCell pieChartSectionCell = ReportTemplate.getBoxBorderCell ();\n pieChartSectionCell.addElement ( getPieChartSection () );\n contentTable.addCell ( pieChartSectionCell );\n\n // Create Bar Chart Section\n PdfPCell barChartSectionCell = ReportTemplate.getBoxBorderCell ();\n barChartSectionCell.addElement ( getResourceManagementTable () );\n contentTable.addCell ( barChartSectionCell );\n document.add ( contentTable );\n //document.newPage();\n\n PdfPTable contentTable2 = new PdfPTable ( 2 );\n contentTable2.setWidthPercentage ( 100 );\n\n // Add Risk Management Section\n PdfPCell riskManagementSectionCell = ReportTemplate.getBoxBorderWithoutLeftPaddingCell ();\n riskManagementSectionCell.addElement ( getRiskManagementTable () );\n contentTable2.addCell ( riskManagementSectionCell );\n\n // Add Conservation Management Section\n\n Paragraph conservationParagraph = new Paragraph ();\n\n conservationParagraph.add ( new Chunk ( \"Conservation Management\\n\\n\", ReportTemplate.TIMESROMAN_12_BOLD ) );\n conservationParagraph.add ( new Chunk ( \"Conservation Goals\\n\", ReportTemplate.TIMESROMAN_10_NORMAL) );\n /**\n * @changed - Abhishek\n * @date - 12-12-2015\n * @updated - 11-01-2016\n */\n ReportDataPage1.ConservationPracticeBean conservationBean = reportDataPage1.getLandUnderConservationPractice ();\n\n /**\n * @changed - Abhishek\n * @updated - 11-01-2016\n */\n conservationParagraph.add ( new Chunk ( AgricultureStandardUtils.doubleWithOneDecimal( Double.parseDouble (conservationBean.getProfitFromConservation () ) ) + \" % Est. Income under conservation practices\\n\" +\n AgricultureStandardUtils.doubleWithOneDecimal( Double.parseDouble (conservationBean.getLandUnderConservation () ) ) + \" % Acreage under conservation practices\", ReportTemplate.TIMESROMAN_10_NORMAL ) );\n\n PdfPCell conservationManagementSectionCell = ReportTemplate.getBoxBorderWithoutLeftPaddingCell ();\n conservationManagementSectionCell.addElement ( conservationParagraph );\n contentTable2.addCell ( conservationManagementSectionCell );\n\n contentTable2.setKeepTogether(true);\n document.add ( contentTable2 );\n\n\n /*getIncomeUnderConservationPractice(farmInfoView);*/\n\n }", "public void gerarRelatorioPaciente() {\n Document documento = new Document(PageSize.A4.rotate());\n \n //Defina as margens\n documento.setMargins(40f, 40f, 150f, 40f);\n \n try {\n CabecalhoRodapeEvento inserircabecalho = new CabecalhoRodapeEvento();\n \n //Cria um arquivo relatorio.pdf com o documento\n PdfWriter.getInstance(documento, new FileOutputStream(\"relatorioPaciente.pdf\")).setPageEvent(inserircabecalho);\n \n documento.open();\n \n Paragraph tituloDoRelatorio = new Paragraph(new Phrase(20F, \"RELATÓRIO DOS PACIENTES CADASTRADOS\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 15F)));\n tituloDoRelatorio.setAlignment(Element.ALIGN_CENTER);\n\n documento.add(tituloDoRelatorio);\n \n Table tabelaPacientes = new Table(7);\n tabelaPacientes.setBorder(10);\n tabelaPacientes.setBorderWidth(2);\n tabelaPacientes.setBorderColor(Color.black);\n tabelaPacientes.setPadding(2);\n //tabelaPacientes.setSpacing(0);\n tabelaPacientes.setWidth(100f);\n tabelaPacientes.setWidths(new float[]{5f, 10f, 25f, 7f, 13f, 28f, 12f});\n \n Paragraph paragrafoId = new Paragraph(new Phrase(12F, \"ID\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoId.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoCpf = new Paragraph(new Phrase(12F, \"CPF\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoCpf.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoNome = new Paragraph(new Phrase(12F, \"NOME\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoSexo = new Paragraph(new Phrase(12F, \"SEXO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoTelefone = new Paragraph(new Phrase(12F, \"TELEFONE\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoTelefone.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoEndereco = new Paragraph(new Phrase(12F, \"ENDEREÇO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoEndereco.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoDataNascimento = new Paragraph(new Phrase(12F, \"DATA NASCIMENTO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n \n Cell celulaPacienteId = new Cell(paragrafoId);\n Cell celulaPacienteCpf = new Cell(paragrafoCpf);\n Cell celulaPacienteNome = new Cell(paragrafoNome);\n Cell celulaPacienteSexo = new Cell(paragrafoSexo);\n Cell celulaPacienteTelefone = new Cell(paragrafoTelefone);\n Cell celulaPacienteEndereco = new Cell(paragrafoEndereco);\n Cell celulaPacienteDataNascimento = new Cell(paragrafoDataNascimento);\n \n celulaPacienteId.setHeader(true);\n tabelaPacientes.addCell(celulaPacienteId);\n tabelaPacientes.addCell(celulaPacienteCpf);\n tabelaPacientes.addCell(celulaPacienteNome);\n tabelaPacientes.addCell(celulaPacienteSexo);\n tabelaPacientes.addCell(celulaPacienteTelefone);\n tabelaPacientes.addCell(celulaPacienteEndereco);\n tabelaPacientes.addCell(celulaPacienteDataNascimento);\n \n //definindo alinhamento, cores do cabeçalho da tabela\n for (int i = 0; i < tabelaPacientes.getColumns(); i++) {\n\n Cell celula = (Cell) tabelaPacientes.getElement(0, i);\n celula.setHorizontalAlignment(Element.ALIGN_CENTER);\n celula.setBackgroundColor(Color.yellow);\n celula.setBorderColor(Color.black);\n\n }\n \n for(Paciente paciente : listarTodosPacientes()) {\n paragrafoId = new Paragraph(new Phrase(15F, \"\"+ paciente.getId(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoId.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteId = new Cell(paragrafoId);\n celulaPacienteId.setBorderColor(Color.black);\n celulaPacienteId.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteId);\n \n paragrafoCpf = new Paragraph(new Phrase(15F, \"\"+ paciente.getCpf(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoCpf.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteCpf = new Cell(paragrafoCpf);\n celulaPacienteCpf.setBorderColor(Color.black);\n celulaPacienteCpf.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteCpf);\n \n paragrafoNome = new Paragraph(new Phrase(15F, \"\"+ paciente.getNome(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteNome = new Cell(paragrafoNome);\n celulaPacienteNome.setBorderColor(Color.black);\n celulaPacienteNome.setHorizontalAlignment(Element.ALIGN_LEFT);\n tabelaPacientes.addCell(celulaPacienteNome);\n \n paragrafoSexo = new Paragraph(new Phrase(15F, \"\"+ paciente.getSexo(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteSexo = new Cell(paragrafoSexo);\n celulaPacienteSexo.setBorderColor(Color.black);\n celulaPacienteSexo.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteSexo);\n \n paragrafoTelefone = new Paragraph(new Phrase(15F, paciente.getTelefone(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoTelefone.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteTelefone = new Cell(paragrafoTelefone);\n celulaPacienteTelefone.setBorderColor(Color.black);\n celulaPacienteTelefone.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteTelefone);\n \n paragrafoEndereco = new Paragraph(new Phrase(15F, paciente.getEndereco(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoEndereco.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteEndereco = new Cell(paragrafoEndereco);\n celulaPacienteEndereco.setBorderColor(Color.black);\n celulaPacienteEndereco.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteEndereco);\n \n paragrafoDataNascimento = new Paragraph(new Phrase(15F, \"\"+ sdf.format(paciente.getDataDeNascimento()),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteDataNascimento = new Cell(paragrafoDataNascimento);\n celulaPacienteDataNascimento.setBorderColor(Color.black);\n celulaPacienteDataNascimento.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteDataNascimento);\n \n } \n \n documento.add(tabelaPacientes);\n \n Runtime.getRuntime().exec(new String[]{\"cmd.exe\", \"/c\", \"start\", \"relatorioPaciente.pdf\"});\n \n documento.close();\n \n } catch (DocumentException ex) {\n System.out.println(ex);\n } catch (FileNotFoundException ex) {\n System.out.println(ex);\n } catch (IOException ex) {\n System.out.println(ex);\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n }", "private void generatePdf(){\n drawContent();\n\n itemList.clear(); //clear the temporary list of number of items\n\n // clear the form\n AddedItem = 0;\n\n EditText[] AllText = { pay1, pay2, detail1, detail2, item, qty, price, Remark };\n for (EditText e: AllText)\n e.setText(\"\");\n\n items = findViewById(R.id.itemAdded);\n items.setText(\"Item Added: \");\n }", "public void preProcessPDF(Object document) {\n Document pdf = (Document) document;\n pdf.setPageSize(PageSize.LETTER.rotate());\n pdf.open();\n }", "public void onCreatePdf(View view) {\n\n\t\t// Images used in the PDF should be JPG images, stored as Assets\n\t\tbyte[] stickerBmp = Pdf.getAssetJpgBytes(this, JPG_SRC);\n\n\t\t// Create a new PDF\n\t\tPdf pdf = new Pdf();\n\t\tStream stream = pdf.addPage();\n\n\t\t// Add some text at a specific position\n\t\t// The coordinate system is setup where the origin (0,0) is at the\n\t\t// bottom left corner\n\t\tstream.addText(\"This is a test pdf.\", PDF_HEADER_FONT_SIZE, 100, 50, RED);\n\n\t\t// Add some text with a different color\n\t\tstream.addText(userText.getText().toString(), BLUE, PDF_HEADER_FONT_SIZE);\n\n\t\t// Add a line with a color and a width\n\t\tstream.addHorizontalLine(GREEN, LINE_WIDTH);\n\n\t\t// Add an image at a specific coordinate (top right corner of the page)\n\t\tstream.addBmpImage(Pages.PAGE_WIDTH - (int) Stream.MARGIN_HORIZONTAL - JPG_WIDTH, Pages.PAGE_HEIGHT - (int) Stream.MARGIN_VERTICAL - JPG_HEIGHT,\n\t\t\t\tJPG_WIDTH, JPG_HEIGHT, stickerBmp);\n\n\t\t// Get the raw PDF bytes like this:\n\t\tbyte[] pdfBytes = pdf.getPDF();\n\n\t\t// Optionally, write the bytes out to a file:\n\t\tFile file = Pdf.writePdf(this, pdfBytes, PDF_PDFNAME);\n\n\t\t// Show the PDF in an external viewer\n\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\n\t\tUri uri = Uri.fromFile(file);\n\t\tintent.setDataAndType(uri, MIME_TYPE_PDF);\n\t\tstartActivity(intent);\n\n\t}", "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 void agregarMetadatos(UploadedFile ArticuloPDF, UploadedFile TablaContenidoPDF, UploadedFile cartaAprobacionPDF) throws IOException, GeneralSecurityException, DocumentException, PathNotFoundException, AccessDeniedException {\n MetodosPDF mpdf = new MetodosPDF();\n String codigoEst = this.pubEstIdentificador.getEstCodigo();\n String codigoFirma = mpdf.codigoFirma(codigoEst);\n codigoFirma = codigoFirma.trim();\n\n String nombreCartaAprob = \"Carta de Aprobacion-\" + codigoFirma;\n String nombrePublicacion = \"\";\n String nombreTablaC = \"Tabla de Contenido-\" + codigoFirma;\n\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"revista\")) {\n nombrePublicacion = this.revista.getRevTituloArticulo();\n\n }\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"congreso\")) {\n nombrePublicacion = this.congreso.getCongTituloPonencia();\n }\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"libro\")) {\n nombrePublicacion = this.libro.getLibTituloLibro();\n\n }\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"capitulo_libro\")) {\n\n nombrePublicacion = this.capituloLibro.getCaplibTituloCapitulo();\n }\n\n\n /*Obtiene la ruta de la ubicacion del servidor donde se almacenaran \n temporalmente los archivos ,para luego subirlos al Gestor Documental OpenKm */\n String realPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/\");\n // String destCartaAprob = realPath + \"WEB-INF\\\\temp\\\\Tabla de Contenido.pdf\";\n String destCartaAprob = realPath + \"WEB-INF\\\\temp\\\\\" + nombreCartaAprob + \".pdf\";\n String destArticulo = realPath + \"WEB-INF\\\\temp\\\\\" + nombrePublicacion + \".pdf\";\n // String destTablaC = realPath + \"WEB-INF\\\\temp\\\\Tabla de Contenido.pdf\";\n String destTablaC = realPath + \"WEB-INF\\\\temp\\\\\" + nombreTablaC + \".pdf\";\n\n\n /* Estampa de Tiempo\n Obtiene el dia y hora actual del servidor para posteriormente adicionarlo\n como Metadato en el documento PDF/A y el Gestor Documental*/\n Date date = new Date();\n DateFormat datehourFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n String estampaTiempo = \"\" + datehourFormat.format(date);\n\n this.setPubFechaRegistro(date);\n\n /* Metodo para almacenar los metadatos de la Carte de Aprobacion , Articulo y Tabla de Contenido \n para almacenarlo en formato PDFA */\n ArrayList<tipoPDF_cargar> subidaArchivos = new ArrayList<>();\n\n /* tipoPDF_cargar cartaAprobacion = new tipoPDF_cargar();\n cartaAprobacion.setNombreArchivo(nombreCartaAprob);\n cartaAprobacion.setRutaArchivo(destCartaAprob);\n cartaAprobacion.setTipoPDF(\"cartaAprobacion\");\n cartaAprobacion.setArchivoIS(cartaAprobacionPDF.getInputstream());\n subidaArchivos.add(cartaAprobacion); */\n if (!cartaAprobacionPDF.getFileName().equalsIgnoreCase(\"\")) {\n tipoPDF_cargar cartaAprobacion = new tipoPDF_cargar();\n cartaAprobacion.setNombreArchivo(nombreCartaAprob);\n cartaAprobacion.setRutaArchivo(destCartaAprob);\n cartaAprobacion.setTipoPDF(\"cartaAprobacion\");\n cartaAprobacion.setArchivoIS(cartaAprobacionPDF.getInputstream());\n subidaArchivos.add(cartaAprobacion);;\n }\n\n if (!ArticuloPDF.getFileName().equalsIgnoreCase(\"\")) {\n tipoPDF_cargar articulo = new tipoPDF_cargar();\n articulo.setNombreArchivo(nombrePublicacion);\n articulo.setRutaArchivo(destArticulo);\n articulo.setTipoPDF(\"tipoPublicacion\");\n articulo.setArchivoIS(ArticuloPDF.getInputstream());\n subidaArchivos.add(articulo);\n }\n if (!TablaContenidoPDF.getFileName().equalsIgnoreCase(\"\")) {\n tipoPDF_cargar tablaContenido = new tipoPDF_cargar();\n tablaContenido.setNombreArchivo(nombreTablaC);\n tablaContenido.setRutaArchivo(destTablaC);\n tablaContenido.setTipoPDF(\"tablaContenido\");\n tablaContenido.setArchivoIS(TablaContenidoPDF.getInputstream());\n subidaArchivos.add(tablaContenido);\n }\n\n CrearPDFA_Metadata(subidaArchivos, estampaTiempo);\n\n String hash = mpdf.obtenerHash(destArticulo);\n\n /* Metodo para almacenar en el Gestor Documental(OPENKM), carta de aprobacion,\n el articulo en formato PDFA y la Tabla de Contenido del Articulo (formato PDFA) */\n // SubirOpenKM(rutasArchivos, nombreArchivos, estampaTiempo, codigoFirma, hash);\n SubirOpenKM(subidaArchivos, estampaTiempo, codigoFirma, hash);\n }", "public static void main(String args[]) throws IOException {\n\t File file = new File(\"fdpModification.pdf\");\n\t PDDocument document = PDDocument.load(file);\n\n\t //Retrieving the pages of the document\n\t PDPage page = document.getPage(1);\n\t PDPageContentStream contentStream = new PDPageContentStream(document, page);\n\n\t //Begin the Content stream\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 105);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12);\n\t contentStream.drawString(\"bold text\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.setFont(PDType1Font.HELVETICA_OBLIQUE, 12);\n\t contentStream.drawString(\"Italic text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD_OBLIQUE, 12);\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.endText();\n\n\t contentStream.setLineWidth(.5f);\n\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 55);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"artificially bold text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.appendRawCommands(\"1 Tr\\n\");\n\t contentStream.drawString(\"Artificially outlined text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.setTextMatrix(1, 0, .2f, 1, 7, 5);\n\t contentStream.drawString(\"Artificially italic text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t //Setting the font to the Content streamt\n\t contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n\n\t //Setting the position for the line\n\t contentStream.newLineAtOffset(0, 0);\n\n //Setting the leading\n contentStream.setLeading(14.5f);\n\n //Setting the position for the line\n contentStream.newLineAtOffset(25, 725);\n\n String text1 = \"This is an example of adding text to a page in the pdf document. we can add as many lines\";\n String text2 = \"as we want like this using the ShowText() method of the ContentStream class\";\n\n //Adding text in the form of string\n contentStream. showText(text1);\n contentStream.newLine();\n contentStream. showText(text2);\n //Ending the content stream\n contentStream.endText();\n\n System.out.println(\"Content added\");\n\n //Closing the content stream\n contentStream.close();\n\n //Saving the document\n document.save(new File(\"newtou.pdf\"));\n\n //Closing the document\n document.close();\n }", "public void onStartPage(PdfWriter writer, Document document) {\r\n\t\tpagenumber++;\r\n\r\n\t\tImage image;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\timage = Image.getInstance(ResourceUtils.getFile(\"classpath:images\"+File.separator+\"cpmis-submission-pdf-hrader.png\").getAbsolutePath());\r\n\t\t\tint indentation = 0;\r\n\t\t\tfloat scaler = ((document.getPageSize().getWidth() - indentation) / image.getWidth()) * 100;\r\n\t\t\timage.scalePercent(scaler);\r\n\t\t\timage.setAbsolutePosition(0, document.getPageSize().getHeight() + document.topMargin() - image.getHeight());\r\n\t\t\tdocument.add(image);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tprotected void createCompHeader() {\n\t\tString headerTxt = \"Add a New Pharmacy\";\n\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\tbuildCompHeader(headerTxt, icoImage);\n\t}", "public void houseDetailing(PdfContentByte canvas, AstroBean astrobean,ColorElement mycolor, PdfWriter writer ,boolean houseDetail,boolean aspectChartWidoutHouse,boolean aspectScore) {\n\t float width1 = 220;\n float height1 = 110; //old110\n float xCoordinate1 = 80;\n float yCoordinate1 = 160; //old 160\n\t//\tlogger.info(\"aspectChartWidoutHouse>> \"+aspectChartWidoutHouse+\" houseDetail>> \"+houseDetail+\" aspectScore>> \"+aspectScore);\n\t\t try {\n\t\t\tLinkedHashMap<String,HouseDetailBean> signList = astrobean.getHouseSignDetailHashTable();\n\t\t\tLinkedHashMap<String,HouseDetailBean> starList = astrobean.getHouseStarDetailHashTable();\n\t\t\tLinkedHashMap<String,HouseDetailBean> subLordList = astrobean.getHouseSubLordHashTable();\n\t\t\tLinkedHashMap<String,HashSet<String>> aspectList = astrobean.getHouseAspectHashTable();\n\t\t\tLinkedHashMap<String, HashMap<String,HashSet<String>>> occAspList = astrobean.getHouseOccAspectHashTable();\n\t\t\tLinkedHashMap<String,ArrayList<HouseDetailBean>> occupantList = astrobean.getHouseOccupantHashTable();\n\t \t\tLinkedHashMap<String, HashMap<String,String>> cuspHouseAspectDetails= astrobean.getCuspHouseAspectDetails();\n\t\t\tLinkedHashMap<String, HashMap<String,String>> planetHouseAspectDetails= astrobean.getPlanetHouseAspectDetails();\n\t\t\t//By Bharti (version 4.4)\n\t\t\tHashMap<String, Integer> scoreMap = new HashMap<String, Integer>();\n\t\t\tif(aspectScore)\n\t\t\t\tfillAspectScoringMap(scoreMap);\n\t\t\t//ENDS(version 4.4)\n\t\t\tFont font2 = new Font();\n\t\t\tFont font1 = new Font();\n\t\t\tPdfPTable table=null;\n \tFont font=new Font();\n\t\t\tFont fontData=new Font();\n\t//\tfloat width[]=null;\n\t\t\tif(houseDetail || aspectChartWidoutHouse){\n\t\t \t\tthis.document.newPage();\n //bharti canvas.saveState();\n canvas.setLineWidth(3);\n canvas.setRGBColorFill(0xFF, 0xFF, 0xFF);\n\n canvas.rectangle(35, 842 - 750, 530, 690);\n canvas.fillStroke();\n canvas.closePath();\n //by bharti canvas.restoreState();\n\n canvas.setLineWidth(1f);\n\t\t\t//bharti\t canvas.saveState();\n\n // Font font1 = new Font();\n font1.setSize(getHeadingfont());\n\t\t\t\t\tfont1.setColor(mycolor.fillColor(this.getTableDataColor()));\n\n // Font font2 = new Font();\n font2.setSize(getTableHeadingfont());\n font2.setColor(mycolor.fillColor(getTableHeadingColor()));\n\t\t\t\t\tfont2.setSize(12);\n\n\t\tColumnText.showTextAligned(canvas, Element.ALIGN_LEFT,\n new Phrase(astrobean.getName().replaceAll(\"%20\",\" \" ).replaceAll(\"\\\"\",\"\"), font2), 35, 842 - 55, 0);\n\n ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,new Phrase(\"Aspects on Houses\", font1), 290, 842 - 90, 0);\n // PdfPTable table=new PdfPTable(13);\n table=new PdfPTable(13);\n // Font font=new Font();\n // Font fontData=new Font();\n float width[]={30,10,10,10,10,10,10,10,10,10,10,10,10};\n //width[]={30,10,10,10,10,10,10,10,10,10,10,10,10};\n table.setWidths(width);\n\t\tfont.setSize(this.getTableHeadingfont());\n font.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n fontData.setSize(this.getTableDatafont());\n fontData.setColor(mycolor.fillColor(this.getTableDataColor()));\n\t\t table.addCell(new Phrase(new Chunk(\"Planets\",font)));\n\nfor(int i=1;i<=12;i++)\n{\n\ttable.addCell(new Phrase(new Chunk(\"\"+i,font)));\n}\nHashMap<String,String> cuspMap= null;\nfor(int j=0;j<planets.length;j++)\n{\n\tif(!planets[j].equals(\"Ketu\") && !planets[j].equals(\"Rahu\")){\n\t\ttable.addCell(new Phrase(new Chunk(planets[j],font)));\n\t\tfor(int count=1;count<=12;count++)\n\t\t{\n\t\t\tcuspMap=cuspHouseAspectDetails.get(count+\"\");\n\t\t\tif(cuspMap.get(planets[j])!=null){\n\t\t\t\tif(aspectScore){\n\t\t\t\t\tif(scoreMap.get(cuspMap.get(planets[j]))!=null){\n\t\t\t\t\t\tif(scoreMap.get(cuspMap.get(planets[j]))>0)\n\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(+\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttable.addCell(new Phrase(new Chunk(\"\",fontData)));\n\t\t\t}\n\t\t}\n\t}\n}\n//version 4.4\n\tint totalScore=0;\nif(aspectScore){\n\ttable.addCell(new Phrase(new Chunk(\"\",fontData)));\t\n\tfor(int count=1;count<=12;count++)\n \t{\n\t\tfor (Map.Entry<String, String> entry : cuspHouseAspectDetails.get(count+\"\").entrySet())\n\t\t{\n\t\t\tif(!entry.getKey().equalsIgnoreCase(\"Ketu\") && !entry.getKey().equalsIgnoreCase(\"Rahu\")) {\n\t\t\t\ttotalScore=totalScore+scoreMap.get(entry.getValue());\n\t\t\t}\n\t\t}\n\t\tif(totalScore>0)\n \t\ttable.addCell(new Phrase(new Chunk(\"+\"+totalScore,fontData)));\n \telse if(totalScore<0) \n \ttable.addCell(new Phrase(new Chunk(\"\"+totalScore,fontData)));\n\t\telse\n\t\t\ttable.addCell(new Phrase(new Chunk(\"N\",fontData)));\n\t\ttotalScore=0;\n\t}\n}\n//ENDS HERE\t\n\ttable.setTotalWidth(510);\n \ttable.writeSelectedRows(0, -1, 50, (842 - 100), writer.getDirectContent());\n\n\n\n\n\n\n\n table=new PdfPTable(10);\n float wi[]={30,10,10,10,10,10,10,10,10,10};\n table.setWidths(wi);\n font.setSize(this.getTableHeadingfont());\n font.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n fontData.setSize(this.getTableDatafont());\n fontData.setColor(mycolor.fillColor(this.getTableDataColor()));\n ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase(\"Aspects on planets\", font1), 290, 842 - 290, 0);\n table.addCell(new Phrase(new Chunk(\"Planets\",font)));\n \n\n \t\tString proPath = Constants.PROPERTIES_PATH;\n \t\tproPath = proPath + \"/kundliHttpserverNew.properties\";\n \t\tHashtable<String, String> properties = ReadPropertyFile.readPropery(proPath);\t\t\t\n\n \t\tFont fontFooter = new Font();\n \t\tfontFooter.setSize(10);\n \t\tfontFooter.setColor(mycolor.fillColor(getTableDataColor()));\n \t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\tnew Phrase(properties.getOrDefault(\"astro.link\", \"Observation\"), fontFooter), 300,\n \t\t\t\t842 - 790, 0);\n \t\t\n \t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\tnew Phrase(properties.getOrDefault(\"astro.observation\", \"Observation\"), fontFooter), 300,\n \t\t\t\t842 - 800, 0);\n\n\n \t\tfor(int i=0;i<planets.length;i++)\n {\n \t\t\ttable.addCell(new Phrase(new Chunk(planets[i],font)));\n\t\t}\n\t\tcuspMap= null;\n\t\tfor(int j=0;j<planets.length;j++)\n\t\t{\n\n\t\t\tif(!planets[j].equals(\"Ketu\") && !planets[j].equals(\"Rahu\")){\n\t\t\t\ttable.addCell(new Phrase(new Chunk(planets[j],font)));\n\t\t\t\tfor(int count=0;count<planets.length;count++)\n\t\t\t\t{\n\t\t\t\t\tcuspMap=planetHouseAspectDetails.get(planets[count]);\n\t\t\t\t\tif(cuspMap.get(planets[j])!=null){\n\t\t\t\t\t\tif(aspectScore){\n\t\t\t\t\t\t\tif(scoreMap.get(cuspMap.get(planets[j]))!=null){\n \t \t\t\tif(scoreMap.get(cuspMap.get(planets[j]))>0)\n \t\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(+\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n \t\t\t\t\ttable.addCell(new Phrase(new Chunk(\"\",fontData)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//version 4.4 \nif(aspectScore){\n\ttotalScore=0;\n table.addCell(new Phrase(new Chunk(\"\",fontData)));\n for(int count=0;count<planets.length;count++)\n {\n for (Map.Entry<String, String> entry : planetHouseAspectDetails.get(planets[count]).entrySet())\n {\n\t\t\tif(!entry.getKey().equalsIgnoreCase(\"Ketu\") && !entry.getKey().equalsIgnoreCase(\"Rahu\")) {\n \ttotalScore=totalScore+scoreMap.get(entry.getValue());\n\t\t\t}\n }\n\t\tif(totalScore>0)\n \ttable.addCell(new Phrase(new Chunk(\"+\"+totalScore,fontData)));\n \telse if(totalScore<0)\n \ttable.addCell(new Phrase(new Chunk(\"\"+totalScore,fontData)));\n\t\telse\n table.addCell(new Phrase(new Chunk(\"N\",fontData)));\n totalScore=0;\n }\n}\n//ENDS\n table.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 300), writer.getDirectContent());\n\n\n//by bharti canvas.restoreState();\n}//end of aspect/house checking\n\n\t\tif(houseDetail){\n\t\tfor(int i=1;i<=12;i++)\n\t\t{\n \t\tthis.document.newPage();\n\t\t\t //by bharti\t canvas.saveState();\n canvas.setLineWidth(3);\n canvas.setRGBColorFill(0xFF, 0xFF, 0xFF);\n\n canvas.rectangle(35, 842 - 750, 530, 690);\n canvas.fillStroke();\n canvas.closePath();\n //by bharti canvas.restoreState();\n\n canvas.setLineWidth(1f);\n \n \t\t\tString proPath = Constants.PROPERTIES_PATH;\n \t\t\tproPath = proPath + \"/kundliHttpserverNew.properties\";\n \t\t\tHashtable<String, String> properties = ReadPropertyFile.readPropery(proPath);\t\t\t\n \t\t\t\n \t\t\tFont fontFooter = new Font();\n \t\t\tfontFooter.setSize(10);\n \t\t\tfontFooter.setColor(mycolor.fillColor(getTableDataColor()));\n \t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\t\tnew Phrase(properties.getOrDefault(\"astro.link\", \"Observation\"), fontFooter), 300,\n \t\t\t\t\t842 - 790, 0);\n \t\t\t\n \t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\t\tnew Phrase(properties.getOrDefault(\"astro.observation\", \"Observation\"), fontFooter), 300,\n \t\t\t\t\t842 - 800, 0);\n\n //bharti canvas.saveState();\n\n // font1 = new Font();\n // font1.setSize(getHeadingfont());\n\n // font2 = new Font();\n // font2.setSize(getTableHeadingfont());\n // font2.setColor(mycolor.fillColor(getTableHeadingColor()));\n ColumnText.showTextAligned(canvas, Element.ALIGN_LEFT,\n new Phrase(astrobean.getName().replaceAll(\"%20\",\" \" ).replaceAll(\"\\\"\",\"\"), font2), 35, 842 - 55, 0);\n\n\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase((i)+\" House Detailing\", font1), 290, 842 - 90, 0);\n\t\ttable=new PdfPTable(5);\n\t\t font=new Font();\n fontData=new Font();\n float wid[]={20,20,20,20,20};\n table.setWidths(wid);\n font.setSize(this.getTableHeadingfont());\n font.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n fontData.setSize(this.getTableDatafont());\n fontData.setColor(mycolor.fillColor(this.getTableDataColor()));\n\n\n // table.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n table.addCell(new Phrase(new Chunk(\"Sign\",font)));\n\n table.addCell(new Phrase(new Chunk(\"Sign Lord\",font)));\n table.addCell(new Phrase(new Chunk(\"NL\",font)));\n table.addCell(new Phrase(new Chunk(\"SL\",font)));\n table.addCell(new Phrase(new Chunk(\"NL(SL)\",font)));\n\n\t\t\ttable.addCell(new Phrase(new Chunk(signList.get(i+\"\").getSignName(),fontData)));\n\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getNLSL(),fontData)));\n\n\t\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 100), writer.getDirectContent());\n\n\t\t\t\t\t\n\t\t\t table=new PdfPTable(5);\n\t\ttable.setWidths(wid);\n\n// table.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n table.addCell(new Phrase(new Chunk(\"Star\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getNLSL(),fontData)));\n\n table.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 130), writer.getDirectContent());\n\n\n table=new PdfPTable(5);\n table.setWidths(wid);\n\n// table.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n table.addCell(new Phrase(new Chunk(\"SubLord\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getNLSL(),fontData)));\n\n table.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 160), writer.getDirectContent());\n\n/*\n\t\t canvas.restoreState();\n\t\t this.document.newPage();\n canvas.saveState();\n canvas.setLineWidth(3);\n canvas.setRGBColorFill(0xFF, 0xFF, 0xFF);\n\n canvas.rectangle(35, 842 - 750, 530, 690);\n canvas.fillStroke();\n canvas.closePath();\n canvas.restoreState();\n\n canvas.setLineWidth(1f);\n canvas.saveState();\n\n*/\n\n// ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n // new Phrase(\"Aspects on House\", font1), 290, 842 - 200, 0);\n\n\t table=new PdfPTable(6);\n //table.setWidths(wid);\n\t table.addCell(new Phrase(new Chunk(\"HOUSE\",font)));\n\n table.addCell(new Phrase(new Chunk(\"PLANET\",font)));\n table.addCell(new Phrase(new Chunk(\"HOUSE\",font)));\n table.addCell(new Phrase(new Chunk(\"SIGN\",font)));\n table.addCell(new Phrase(new Chunk(\"DEGREE\",font)));\n table.addCell(new Phrase(new Chunk(\"ASPECT\",font)));\n\t\n\n\t table.addCell(new Phrase(new Chunk(\"\"+i,font)));\n \n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n\t\t\n\n\n\t\tboolean flg=true;\n\t\tIterator iter = aspectList.get(i+\"\").iterator();\n\t\tif(aspectList.get(i+\"\").size()>0)\n\t\t{\twhile(iter.hasNext())\n\t\t\t{\n\n\t\t\t\n\t\t\tString temp[]=((String)iter.next()).split(\"_\");\t\n\n\t\t\tif(flg)\n\t\t\t{\n\t\t\ttable.addCell(new Phrase(new Chunk(temp[0],font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\tflg=false;\n\t\t\t}\n\t\t\tif(!temp[1].equalsIgnoreCase(\"Ketu\") && !temp[1].equalsIgnoreCase(\"Rahu\")){\n\t\t\t table.addCell(new Phrase(new Chunk(\"\",fontData)));\n\n table.addCell(new Phrase(new Chunk(temp[1],fontData)));\n table.addCell(new Phrase(new Chunk(temp[2],fontData)));\n table.addCell(new Phrase(new Chunk(temp[3],fontData)));\n table.addCell(new Phrase(new Chunk(temp[4],fontData)));\n table.addCell(new Phrase(new Chunk(temp[5],fontData)));\n\t\t\t}\n\n\t\t\t}\n\t\t\tflg=true;\n\t\t }\n else\n {\n table.addCell(new Phrase(new Chunk(\"NA\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\tflg=false;\n }\n\n\t\t\tif(flg){\n\t\t ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase(\"Aspects on House\", font1), 290, 842 - 210, 0);\n\n\t\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 220), writer.getDirectContent());\n\t\t\t}\n\t table=new PdfPTable(5);\n \t table.setWidths(wid);\n\t table.addCell(new Phrase(new Chunk(\"Occupant\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\titer = occupantList.get(i+\"\").iterator();\n\t\tflg=false;\n\tif(occupantList.get(i+\"\").size()>0)\n\t\t{\n while(iter.hasNext())\n {\n HouseDetailBean bean=(HouseDetailBean)iter.next();\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(bean.getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(bean.getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(bean.getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(bean.getNLSL(),fontData)));\n\t\t\t\n\n\n }\n\t\tflg=true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tflg=false;\n\t\t}\n\t\t\tif(flg)\n\t\t\t{\n\t\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 380), writer.getDirectContent());\n\t\t\t}\n\n\n\n\n\n\t\t\t table=new PdfPTable(6);\n table.addCell(new Phrase(new Chunk(\"OCUPANT\",font)));\n\n table.addCell(new Phrase(new Chunk(\"PLANET\",font)));\n table.addCell(new Phrase(new Chunk(\"HOUSE\",font)));\n table.addCell(new Phrase(new Chunk(\"SIGN\",font)));\n table.addCell(new Phrase(new Chunk(\"DEGREE\",font)));\n table.addCell(new Phrase(new Chunk(\"ASPECT\",font)));\n\n\n\nint count=0;\n\tfor (Map.Entry<String, HashSet<String>> entry : occAspList.get(i+\"\").entrySet())\n {\n\t\t\n\t\t\t\n\t\t\ttable.addCell(new Phrase(new Chunk(entry.getKey(),fontData)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\n\n\t\t\tflg=true;\n\t\t\titer = (entry.getValue()).iterator();\n\t\t\t{\n\t\t\tif((entry.getValue()).size()>0)\n\t\t\t{\n\t\t\twhile(iter.hasNext())\n\t\t\t{\t\n \t String temp[]=((String)iter.next()).split(\"_\");\n\t\t\tif(!temp[1].equalsIgnoreCase(\"Ketu\") && !temp[1].equalsIgnoreCase(\"Rahu\") ){\n\t\t\tif(flg)\n\t\t\t{\n\t\t\t\ttable.addCell(new Phrase(new Chunk(temp[0],font)));\n\t\t\t\tflg=false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\ttable.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\t}\n\t\t//\tif(!temp[1].equalsIgnoreCase(\"Ketu\") && !temp[1].equalsIgnoreCase(\"Rahu\") ){\t\n table.addCell(new Phrase(new Chunk(temp[1],fontData)));\n\n table.addCell(new Phrase(new Chunk(temp[2],fontData)));\n table.addCell(new Phrase(new Chunk(temp[3],fontData)));\n table.addCell(new Phrase(new Chunk(temp[4],fontData)));\n //table.addCell(new Phrase(new Chunk(aspectList.get(i+\"\").get(j).getNLSL(),fontData)));\n table.addCell(new Phrase(new Chunk(temp[5],fontData)));\n\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n }\n\t\t \n else\n {\n\t/* table.addCell(new Phrase(new Chunk(\"NA\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n*/\n }\n\t\t}\n\t}\n\n\t\tif(count>0)\n\t\t{\n\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase(\"Aspects on Occupants\", font1), 290, 842 - 440, 0);\n\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 450), writer.getDirectContent());\n\t\t}\n\n\n\n\n\t//by bharti\t\tcanvas.restoreState();\n\t\t}\n\n}\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\t}", "private void createPdf()\n {\n Document document = new Document();\n try {\n String path = Environment.getExternalStorageDirectory().getAbsolutePath()+\"/Meal Counter\";\n File directory = new File(path);\n if(!directory.exists())\n directory.mkdir();\n\n File file = new File(directory,sharedPreferenceData.getmyCurrentSession()+\".pdf\");\n reportPath = file.getAbsolutePath();\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n PdfWriter.getInstance(document,fileOutputStream);\n document.setPageSize(PageSize.A4);\n document.open();\n Paragraph paragraph;\n Font smallFont = new Font(Font.FontFamily.TIMES_ROMAN,22.0f,Font.NORMAL, BaseColor.BLACK);\n Font largeFont = new Font(Font.FontFamily.TIMES_ROMAN,30.0f,Font.BOLD, BaseColor.BLACK);\n paragraph = new Paragraph(\"Session : #\"+sharedPreferenceData.getmyCurrentSession()+\"\\n\\n\"+\n \"Total Taka ------ \"+monthlyTaka+\"\\n\"+\n \"Total Meal ------ \"+monthlyMeal+\"\\n\"+\n \"Total Cost ------ \"+monthlyCost+\"\\n\"+\n \"Remain ------ \"+remain+\"\\n\"+\n \"Meal rate ------ \"+mealRate+\"\\n\\n\\n\",largeFont);\n paragraph.setAlignment(Paragraph.ALIGN_CENTER);\n //document.add(paragraph);\n\n float[] columnWidth = {6f,9f,9f,9f,9f,9f};\n PdfPTable table = new PdfPTable(columnWidth);\n table.setWidthPercentage(90f);\n\n insertDataIntoTable(table,\"Serial\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Name\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Taka\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Meal\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Cost\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Status\", Element.ALIGN_CENTER,1,smallFont);\n table.setHeaderRows(1);\n\n for(int i=0;i<modelList.size();i++)\n {\n insertDataIntoTable(table,String.valueOf(i+1),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getId(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getTaka(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getName(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getDate(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getStatus(),Element.ALIGN_CENTER,1,smallFont);\n }\n\n paragraph.add(table);\n document.add(paragraph);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (DocumentException e) {\n e.printStackTrace();\n }finally {\n document.close();\n\n }\n }", "public void ReportPdf(Context context, String date, String name, String reportnum, List<EditText> goals, List<EditText> objectives, List<EditText> task,List<EditText> deadline,List<EditText> status ){\n PdfDocument document = new PdfDocument();\n\n // crate a page description\n PdfDocument.PageInfo pageInfo =\n new PdfDocument.PageInfo.Builder(500, 1500, 2).create();\n\n // start a page\n PdfDocument.Page page = document.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint paint = new Paint();\n paint.setColor(Color.BLUE);\n canvas.drawText(\"SIMBA EDUCATION\",220,140,paint);\n paint.setColor(Color.BLACK);\n canvas.drawText(\"Report\",10,160,paint);\n canvas.drawText(\"Dated\"+\" :\"+date,10,180,paint);\n canvas.drawText(\"Name\"+\" :\"+name,10,200,paint);\n\n\n //goals label section\n canvas.drawText(\"Goals\",100,240,paint);\n\n //goals Section\n int y0 = 240;\n int y = 0 ;\n\n for (int i = 0 ;i < goals.size() ; i++){\n y = y0+20;\n y0 = y;\n\n canvas.drawText(\"-> \" + goals.get(i).getText().toString(), 10, y, paint);\n\n }\n\n //objectives label section\n canvas.drawText(\"Objectives\",100,y+10,paint);\n\n //objectives Section\n for (int i = 0 ;i < objectives.size() ; i++){\n y0 = y+20;\n y = y0;\n canvas.drawText(\"* -> \" + objectives.get(i).getText().toString(), 10, y0, paint);\n\n }\n\n\n\n //new line code\n\n status.get(0).append(\"\\n\");\n //task label section\n\n\n\n\n for (int i = 0 ;i < 1; i++){\n y = y0+30;\n y0 = y;\n canvas.drawText(\"Task\", 10, y, paint);\n canvas.drawText(\"Deadline\", 150, y, paint);\n canvas.drawText(\"Status\", 280, y, paint);\n\n }\n\n //task section\n\n for (int i = 0 ;i < task.size() ; i++){\n y0 = y+50;\n y = y0;\n\n int x =y0+40;\n int z = x+20;\n z = x;\n\n int q = 20;\n\n\n // canvas.drawText(\"Tasks\",100,y0+10,paint);\n\n canvas.drawText(task.get(i).getText().toString(), 10, y0, paint);\n canvas.drawText(deadline.get(i).getText().toString(),150,y0,paint);\n canvas.drawText(status.get(i).getText().toString(),280,y0,paint);\n\n }\n\n\n\n\n paint.setColor(Color.RED);\n\n canvas.drawText(\"Designed by Kidkudzy \", 220,1460,paint);\n\n\n\n\n\n\n\n\n\n //canvas.drawCircle(50, 50, 30, paint);\n\n document.finishPage(page);\n\n // write the document content\n File folder = new File(Environment.getExternalStorageDirectory() +\n File.separator + \"REPORTit/Reports/\");\n boolean success = true;\n if (!folder.exists()) {\n success = folder.mkdirs();\n }\n if (success) {\n // Do something on success\n } else {\n // Do something else on failure\n }\n //appending cuurent timestamp to my generated file\n\n Date_Operations dateOp = new Date_Operations();\n String currenttime = dateOp.GetCurrentTimeAndDate();\n\n\n\n String targetPdf = \"/sdcard/REPORTit/Reports/Report\"+currenttime+\".pdf\";\n //String targetPdf = \"/sdcard/REPORTit/Reports/Report.pdf\";\n File filePath = new File(targetPdf);\n try {\n document.writeTo(new FileOutputStream(filePath));\n Toast.makeText(context, \"Pdf stored in \\n \" + targetPdf, Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(context, \"Something wrong: \" + e.toString(),\n Toast.LENGTH_LONG).show();\n }\n document.close();\n }", "private void getPDF(){\r\n\t\t\r\n\t\tif(request.getParameter(\"exportType\").equals(PDFGenerator.EXPORT_ADMIN)){\r\n\t\t\tgetAdministration(); // pdf uses same data\r\n\t\t} else if(request.getParameter(\"exportType\").equals(PDFGenerator.EXPORT_TEACHER)){\r\n\t\t\tgetEventRegistration(); // pdf uses same data\r\n\t\t}\r\n\t\t\r\n\t\tPDFGenerator pdfGen = new PDFGenerator();\r\n\t\tpdfGen.createDocument(request, response);\r\n\t\t\r\n\t\tString eventTitle = \"all\";\r\n\t\t\r\n\t}", "public ORDER_INFO() {\n this.setUndecorated(true);\n initComponents();\n init();\n }", "private void addHeaderItems(final List<ItemBO> itemList)\n\t{\n\t\tif (itemList != null && (!itemList.isEmpty()))\n\t\t{\n\t\t\tfinal List<Integer> lineNumbersList = new ArrayList<Integer>(itemList.size());\n\t\t\tfinal List<ItemBO> headerItemsList = new ArrayList<ItemBO>();\n\t\t\tint processOrderLineNumber = 1;\n\t\t\tfor (final ItemBO anItem : itemList)\n\t\t\t{\n\t\t\t\tlineNumbersList.add(anItem.getLineNumber());\n\t\t\t\tif (ExternalSystem.EVRST == anItem.getExternalSystem())\n\t\t\t\t{\n\t\t\t\t\t//Header ItemBO for current ECC Item\n\t\t\t\t\tfinal ItemBO anHeader = new PartBO();\n\t\t\t\t\tanHeader.setDisplayPartNumber(anItem.getDisplayPartNumber());\n\t\t\t\t\tanHeader.setPartNumber(anItem.getPartNumber());\n\t\t\t\t\tanHeader.setComment(\"This is The Header Record :: \" + anItem.getPartNumber());\n\t\t\t\t\tanHeader.setInventory(anItem.getInventory());\n\t\t\t\t\tanHeader.setRequestedInventory(anItem.getRequestedInventory());\n\t\t\t\t\tanHeader.setScacCode(anItem.getScacCode());\n\t\t\t\t\tanHeader.setCarrierCode(anItem.getCarrierCode());\n\t\t\t\t\tanHeader.setShippingMethodCode(anItem.getShippingMethodCode());\n\t\t\t\t\tanHeader.setTransportationMethodCode(anItem.getTransportationMethodCode());\n\t\t\t\t\t((PartBO) anHeader).setHeader(true);\n\t\t\t\t\t((PartBO) anHeader).setProcessOrderLineNumber(processOrderLineNumber);\n\n\t\t\t\t\tanHeader.setItemQty(anItem.getItemQty());\n\t\t\t\t\tanHeader.setExternalSystem(ExternalSystem.EVRST);\n\n\t\t\t\t\t//Make Sure Actual Item also has the same ProcessOrderLineNumber\n\t\t\t\t\tanItem.setProcessOrderLineNumber(processOrderLineNumber);\n\n\t\t\t\t\theaderItemsList.add(anHeader);\n\t\t\t\t\tprocessOrderLineNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!headerItemsList.isEmpty())\n\t\t\t{\n\t\t\t\t//Find the Highest line number\n\t\t\t\tArrays.sort(lineNumbersList.toArray());\n\t\t\t\tint itemLineNumber = lineNumbersList.get(lineNumbersList.size() - 1);\n\t\t\t\tfor (final ItemBO headerItem : headerItemsList)\n\t\t\t\t{\n\t\t\t\t\theaderItem.setLineNumber(++itemLineNumber);\n\t\t\t\t}\n\t\t\t\t//Make Sure the Header Items are inserted first - Enforced by ECC RFC\n\t\t\t\titemList.addAll(0, headerItemsList);\n\t\t\t\tlogger.debug(\"addHeaderItems(...): Added Header Items for ECC Items \" + headerItemsList.size());\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void buildPdfDocument(Map<String, Object> model, Document document, PdfWriter writer,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tSystem.out.println(\"At PDFBuilder\");\n // List<Item> itemDisplayList = (List<Item>) model.get(\"itemList\");\n \n document.add(new Paragraph(\"Items Available\"));\n \n PdfPTable table = new PdfPTable(5);\n table.setWidthPercentage(100.0f);\n table.setWidths(new float[] {3.0f, 2.0f, 2.0f, 2.0f, 1.0f});\n table.setSpacingBefore(10);\n \n \n // define font for table header row\n Font font = FontFactory.getFont(FontFactory.HELVETICA);\n font.setColor(BaseColor.WHITE);\n \n // define table header cell\n PdfPCell cell = new PdfPCell();\n cell.setBackgroundColor(BaseColor.BLUE);\n cell.setPadding(5);\n \n /* for (Item aItem : itemDisplayList) {\n \ttable.addCell(String.valueOf(aItem.getId()));\n table.addCell(aItem.getItem_name());\n }\n */\n System.out.println(\"At PDFBuilder2\");\n document.add(table);\n\t}", "public void createPdf(Context context) {\n PdfDocument document = new PdfDocument();\n\n // crate a page description\n PdfDocument.PageInfo pageInfo =\n new PdfDocument.PageInfo.Builder(500, 500, 2).create();\n\n // start a page\n PdfDocument.Page page = document.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint paint = new Paint();\n paint.setColor(Color.CYAN);\n\n //canvas.drawCircle(50, 50, 30, paint);\n\n document.finishPage(page);\n\n\n // Create Page 2\n pageInfo = new PdfDocument.PageInfo.Builder(500, 600, 1).create();\n page = document.startPage(pageInfo);\n canvas = page.getCanvas();\n paint = new Paint();\n paint.setColor(Color.BLUE);\n\n\n //print alldata to pdf\n\n\n Cursor res = myDb.GetSumOfColumns(\"Subscriptions\", \"amount\");\n Cursor result = myDb.GetSumOfColumns(\"Expenses\", \"amount\");\n Cursor cashResult = myDb.GetPayModeTotals(\"Subscriptions\", \"paymode\", \"Cash\");\n Cursor EcocashResult = myDb.GetPayModeTotals(\"Subscriptions\", \"paymode\", \"EcoCash\");\n Cursor BankcashResult = myDb.GetPayModeTotals(\"Subscriptions\", \"paymode\", \"Bank\");\n\n if (res.moveToFirst() && result.moveToFirst() && cashResult.moveToFirst() && EcocashResult.moveToFirst()\n && BankcashResult.moveToFirst()) {\n\n String alldata = res.getString(0);\n String allexpe = result.getString(0);\n String cashres = cashResult.getString(0);\n String ecores = EcocashResult.getString(0);\n String bankres = BankcashResult.getString(0);\n\n int income = 0;\n try {\n\n income = parseInt(alldata) - parseInt(allexpe);\n } catch (Exception e) {\n income = 0;\n }\n\n canvas.drawText(\"Income and Expenditure Statement for the period from ?? to ??\", 100, 160, paint);\n canvas.drawText(\"Income Received : \", 30, 210, paint);\n canvas.drawText(\" Cash : ' \" + cashres + \"' \", 30, 230, paint);\n canvas.drawText(\" Ecocash: ' \" + ecores + \"' \", 30, 250, paint);\n canvas.drawText(\" Bank : ' \" + bankres + \"' \", 30, 270, paint);\n canvas.drawText(\" Total : ' \" + alldata + \" '\", 30, 290, paint);\n canvas.drawText(\"Less Expenses : \", 30, 310, paint);\n canvas.drawText(\" Expense '( \" + allexpe + \")' \", 30, 330, paint);\n canvas.drawText(\"Net Income : \", 30, 350, paint);\n canvas.drawText(\" : Net ' \" + income + \" '\", 30, 370, paint);\n canvas.drawText(\"Compiled By: Secretary _______________ \", 30, 460, paint);\n canvas.drawText(\"Date : \", 30, 490, paint);\n\n }\n\n\n // finish the page\n document.finishPage(page);\n\n // write the document content\n File folder = new File(Environment.getExternalStorageDirectory() +\n File.separator + \"EasySecretary/Income Expenditure/\");\n boolean success = true;\n if (!folder.exists()) {\n success = folder.mkdirs();\n }\n if (success) {\n // Do something on success\n } else {\n // Do something else on failure\n }\n //appending cuurent timestamp to my generated file\n\n Date_Operations dateOp = new Date_Operations();\n String currenttime = dateOp.GetCurrentTimeAndDate();\n\n\n //String targetPdf = \"/sdcard/EasySecretary/Income and Expenditure '\"+currenttime+\"'.pdf\";\n String targetPdf = \"/sdcard/EasySecretary/Income Expenditure/Income and Expenditure \"+currenttime+\".pdf\";\n File filePath = new File(targetPdf);\n try {\n document.writeTo(new FileOutputStream(filePath));\n Toast.makeText(context, \"Pdf stored in \\n \" + targetPdf, Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(context, \"Something wrong: \" + e.toString(),\n Toast.LENGTH_LONG).show();\n }\n\n // close the document\n document.close();\n\n }", "void setHeaderInfo(float rFree, float rWork, float resolution, String title, String depositionDate, \n\t\t\tString releaseDate, String[] experimnetalMethods);", "public float writeHeader() throws IOException\n\t{\n\t\tString [] title = new String[2];\n\t\ttitle[0] = this.getSchoolName();\n\t\ttitle[1] = \"Official High School Transcript\";\n\t\t//PDFTextBox pdfTextBox = this.pdfTextBox;\n\t\tpdfTextBox.setContentStream(contentStream);\n\t\tpdfTextBox.setDocument(document);\n\t\tpdfTextBox.setBoxLeft(LEFT_MARGIN);\n\t\tpdfTextBox.setBoxWidth(RIGHT_MARGIN - LEFT_MARGIN );\n\t\tfloat boxHeight = pdfTextBox.calcBoxHeight(fontHeight, title.length );\n\t\tpdfTextBox.setBoxBottom((float) (TOP_MARGIN - boxHeight - 10) );\n\t\tfloat lastBoxBottom = pdfTextBox.getBoxBottom();\n\t\tpdfTextBox.setFont(font);\n\t\tpdfTextBox.setFontSize(fontHeight);\n\t\tpdfTextBox.setTextLeftMargin(LEFT_TEXT_MARGIN);\n\t\tpdfTextBox.setTextRightMargin(RIGHT_TEXT_MARGIN);\n\t\tpdfTextBox.setData(title);\n\t\tcontentStream = pdfTextBox.drawTextBoxCentered();\n\t\tfloat lastBoxHeight = pdfTextBox.getBoxHeight();\n\t\tSystem.out.println(\"boxHeight=\" + boxHeight);\n\t\tSystem.out.println(\"lastBoxBottom=\" + lastBoxBottom);\n\t\tSystem.out.println(\"lastBoxHeight=\" + lastBoxHeight);\n\t\tfloat lastTextPosition = pdfTextBox.getLastTextPosition();\n\t\tSystem.out.println(\"lastTextPostion=\" + lastTextPosition);\n\t\t\n\t\tthis.fontHeight -= 2;\n\n\t\tTextList textBoxListLeft = new TextList();\n\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 5 * fontHeight + 20, 0, \"Student Information\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 1, \"FULL NAME:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 1, this.getStudentInformation().get(\"name\"));\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 2, \"ADDRESS:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 2, this.getStudentInformation().get(\"address1\"));\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 3, this.getStudentInformation().get(\"address2\"));\n\t\t\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 4, \"PHONE NUMBER:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 4, this.getStudentInformation().get(\"phone\"));\n\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 5, \"EMAIL ADDRESS:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 5, this.getStudentInformation().get(\"email\"));\n\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 6, \"DATE OF BIRTH:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 6, this.getStudentInformation().get(\"dob\"));\n\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 7, \"PARENT/GUARDIAN:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight + 10, 7, this.getStudentInformation().get(\"guardian\"));\n\n\t\ttextBoxListLeft.setNumLines(8);\n\n\t\tfloat leftTextMargin = this.calcLeftTextMargin(fontHeight);\n\t\tTextList textBoxListRight = new TextList();\n\t\ttextBoxListRight.addText(leftTextMargin + 5 * fontHeight + 20, 0, \"School Information\");\n\t\ttextBoxListRight.addText(leftTextMargin, 1, \"NAME:\");\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 1, this.getSchoolInformation().get(\"name\"));\n\n\t\ttextBoxListRight.addText(leftTextMargin, 2, \"ADDRESS:\");\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 2, this.getSchoolInformation().get(\"address1\"));\n\t\t\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 3, this.getSchoolInformation().get(\"address2\"));\n\n\t\ttextBoxListRight.addText(leftTextMargin, 4, \"PHONE NUMBER:\");\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 4, this.getSchoolInformation().get(\"phone\"));\n\n\t\ttextBoxListRight.addText(leftTextMargin, 5, \"EMAIL ADDRESS:\");\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 5, this.getSchoolInformation().get(\"email\"));\n\n\t\ttextBoxListRight.setNumLines(6);\n\t\tlastBoxBottom = this.drawLeftRightTabbedTextBox(textBoxListLeft, textBoxListRight, fontHeight, lastBoxBottom);\n\t\tSystem.out.println(\"lastBoxBottom=\" + lastBoxBottom);\n\t\t\n\t\t// Draw the title box.\n\t\tString []data = new String[1];\n\t\tdata[0] = \"Academic Record\";\n\n\t\tpdfTextBox.setBoxLeft(LEFT_MARGIN);\n\t\tpdfTextBox.setBoxWidth(RIGHT_MARGIN - LEFT_MARGIN );\n\t\tboxHeight = pdfTextBox.calcBoxHeight(fontHeight, data.length);\n\t\tpdfTextBox.setBoxHeight(boxHeight + 0);\n\t\tboxHeight = pdfTextBox.getBoxHeight();\n\t\tpdfTextBox.setBoxBottom( (float) (lastBoxBottom - boxHeight) );\n\n\t\tlastBoxBottom = pdfTextBox.getBoxBottom();\n\n\t\tpdfTextBox.setTextLeftMargin(LEFT_TEXT_MARGIN);\n\t\tpdfTextBox.setTextRightMargin(RIGHT_TEXT_MARGIN);\n\t\tpdfTextBox.setData(data);\n\t\tcontentStream = pdfTextBox.drawTextBoxCentered();\n\t\tlastBoxBottom = pdfTextBox.getBoxBottom();\n\t\tlastBoxHeight = pdfTextBox.getBoxHeight();\n\t\tlastTextPosition = pdfTextBox.getLastTextPosition();\n\t\t\n\t\treturn lastBoxBottom;\n\t}", "private void addMetaData(Document document) {\n document.addTitle(\"Tasks export\");\n document.addSubject(\"From Ergon\");\n document.addKeywords(\"Java, PDF\");\n document.addAuthor(\"Ergon\");\n }", "private void IdentifyHeaderAndFooter() {\n receipt_Header = receipt_lines.length > 0 ? receipt_lines[0] : null;\n receipt_Footer = receipt_lines.length > 1 ? receipt_lines[receipt_lines.length - 1].split(\" \")[0] : null;\n }", "public void writePDF(RMPDFWriter aWriter)\n{\n List refs = new ArrayList(getPageCount());\n PDFXTable xref = aWriter.getXRefTable();\n for(int i=0, iMax=getPageCount(); i<iMax; i++)\n refs.add(xref.getRefString(getPage(i)));\n \n // \n _dict.put(\"Kids\", refs);\n _dict.put(\"Count\", getPageCount());\n \n // \n aWriter.writeXRefEntry(_dict);\n}", "public void printInvoiceInfo() {\r\n\r\n\t\tSystem.out.println(\"\\nBill Summary :\");\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\t\t\tSystem.out.println(invoiceInfo[i].toString());\r\n\t\t}\r\n\t}", "private static String header() {\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }", "private void printHeading()\n {\n System.out.println(\"==============================================\");\n System.out.println(\" Stock Management Application \");\n System.out.println(\" App05: by Haroon Sadiq \");\n System.out.println(\"==============================================\");\n }", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "public void PDFOrderError() throws FileNotFoundException, DocumentException {\n\t\t\n\t\tDate d = new Date();\n\n\t\tDocument document = new Document();\n\t\t\n\t\tString fileName = \"Order-error\" + countErrorReports + \".pdf\";\n\t\tcountErrorReports++;\n\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\n\t\tdocument.open();//open document\n\n\t\t//create paragraph\n\t\tParagraph intro = new Paragraph(\"Under Stock\");\n\t\tParagraph space = new Paragraph(\" \");\n\t\tParagraph date = new Paragraph(d.toString());\n\t\tParagraph text = new Paragraph(\"We are sorry, the products are out of stock! Please, come back later!\");\n\t\t\n\n\t\t//add the objects to the document\n\t\tdocument.add(intro);\n\t\tdocument.add(space);\n\t\tdocument.add(date);\n\t\tdocument.add(space);\n\t\tdocument.add(text);\n\n\t\tdocument.close();\n\t}", "@Override\r\n public void actionPerformed(ActionEvent slip) {\n if(slip.getSource()==b7)\r\n {\r\n String id=t1.getText();\r\n String bank_name=t3.getText();\r\n String bank_branch=t4.getText();\r\n String acc_no=t5.getText();\r\n String work_day=t6.getText();\r\n String basic=t7.getText();\r\n String home=t8.getText();\r\n String tra=t9.getText();\r\n String pro_tax=t10.getText();\r\n String gross=t11.getText();\r\n String dedu=t12.getText();\r\n String netsal=t13.getText();\r\n String path=\"E:\\\\\";\r\n com.itextpdf.text.Document doc=new com.itextpdf.text.Document();\r\n try\r\n {\r\n PdfWriter.getInstance(doc, new FileOutputStream(path+\"\"+t1.getText()+\"payslip\"+\".pdf\"));\r\n doc.open();\r\n Image img = Image.getInstance(\"D:\\\\prologos\\\\images3.png\");\r\n doc.add(img);\r\n// \r\n Paragraph paragraph1=new Paragraph(\" Pay Slip\",FontFactory.getFont(FontFactory.TIMES_ROMAN,18)); \r\n// \r\n doc.add(paragraph1);\r\n Paragraph paragraph2=new Paragraph(\"\\n ` Date & Time:\\t\"+l18.getText()+\" \"+l19.getText()+\"\\n\",FontFactory.getFont(FontFactory.TIMES_ROMAN,12)); \r\n// \r\n doc.add(paragraph2);\r\n \r\n Paragraph paragraph=new Paragraph(\"-------------------------------------------------------------------------------------------------------------------------------\"); \r\n// \r\n doc.add(paragraph);\r\n Paragraph paragraph3=new Paragraph(\"Employee Id:\\t\"+t1.getText()+\"\\nEmployee Bank Details:\\nBank Name:\\t\"+t3.getText()+\"\\nBank Branch:\\t\"+t4.getText()+\"\\nAccount Number:\\t\"+t5.getText()+\"\\n\\n\");\r\n doc.add(paragraph3);\r\n //PdfPTable ptable=new PdfPTable(2);\r\n// ptable.addCell(\"Description\");\r\n// ptable.addCell(\"Working Days:\");\r\n// ptable.addCell(\"Deductions\");\r\n// doc.add(ptable);\r\n// PdfPCell c1=new PdfPCell(new Phrase(\"Description\"));\r\n// ptable.addCell(c1); \r\n// c1=new PdfPCell(new Phrase(\"Amount\"));\r\n \r\n// Paragraph para=new Paragraph(\"-------------------------------------------------------------------------------------------------------------------------------\"); \r\n//// \r\n// doc.add(para);\r\n Paragraph paragraph4=new Paragraph(\"Salary Details:\\n\\n\",FontFactory.getFont(FontFactory.TIMES_BOLD,15));\r\n doc.add(paragraph4);\r\n// Paragraph paragraph5=new Paragraph(\"Working Days: \"+t6.getText()+\"\\n\\n\");\r\n// doc.add(paragraph5);\r\n// Paragraph paragraph6=new Paragraph(\"Basic Salary: \"+t7.getText()+\"\\n\\n\");\r\n// doc.add(paragraph6);\r\n// Paragraph paragraph7=new Paragraph(\"House Rent Allowance: \"+t8.getText()+\"\\n\\n\");\r\n// doc.add(paragraph7);\r\n// Paragraph paragraph8=new Paragraph(\"Traveling Allowance: \"+t9.getText()+\"\\n\\n\");\r\n// doc.add(paragraph8);\r\n// Paragraph paragraph9=new Paragraph(\"Professional Tax: \"+t10.getText()+\"\\n\\n\");\r\n// doc.add(paragraph9);\r\n// Paragraph paragraph10=new Paragraph(\"Gross Salary: \"+t11.getText()+\"\\n\\n\");\r\n// doc.add(paragraph10);\r\n// Paragraph paragraph11=new Paragraph(\"Deduction: \"+t12.getText()+\"\\n\\n\");\r\n// doc.add(paragraph11);\r\n// Paragraph paragraph12=new Paragraph(\"Net Salary: \"+t13.getText()+\"\\n\\n\\n\");\r\n// doc.add(paragraph12);\r\n \r\n \r\n \r\n \r\n \r\n PdfPTable ptable=new PdfPTable(2);\r\n PdfPCell pcell=new PdfPCell(new Paragraph(\"Description\"));\r\n PdfPCell pcell1=new PdfPCell(new Paragraph(\"Amount\"));\r\n pcell.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n pcell1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n pcell.setFixedHeight(30f);pcell1.setFixedHeight(30f);\r\n ptable.addCell(pcell);\r\n ptable.addCell(pcell1);\r\n \r\n PdfPCell p1=new PdfPCell(new Paragraph(\"Working Days:\"));\r\n PdfPCell p2=new PdfPCell(new Paragraph(\"Basic Salary:\"));\r\n PdfPCell p3=new PdfPCell(new Paragraph(\"House Rent Allowance:\"));\r\n PdfPCell p4=new PdfPCell(new Paragraph(\"Traveling Allowance:\"));\r\n PdfPCell p5=new PdfPCell(new Paragraph(\"Professional Tax:\"));\r\n PdfPCell p6=new PdfPCell(new Paragraph(\"Gross Salary:\"));\r\n PdfPCell p7=new PdfPCell(new Paragraph(\"Deduction:\"));\r\n PdfPCell p8=new PdfPCell(new Paragraph(\"Net Salary:\"));\r\n \r\n \r\n PdfPCell p11=new PdfPCell(new Paragraph(t6.getText()));\r\n PdfPCell p12=new PdfPCell(new Paragraph(t7.getText()));\r\n PdfPCell p13=new PdfPCell(new Paragraph(t8.getText()));\r\n PdfPCell p14=new PdfPCell(new Paragraph(t9.getText()));\r\n PdfPCell p15=new PdfPCell(new Paragraph(t10.getText()));\r\n PdfPCell p16=new PdfPCell(new Paragraph(t11.getText()));\r\n PdfPCell p17=new PdfPCell(new Paragraph(t12.getText()));\r\n PdfPCell p18=new PdfPCell(new Paragraph(t13.getText()));\r\n \r\n \r\n \r\n p1.setFixedHeight(30f);p11.setFixedHeight(30f);\r\n p2.setFixedHeight(30f);p12.setFixedHeight(30f);\r\n p3.setFixedHeight(30f);p13.setFixedHeight(30f);\r\n p4.setFixedHeight(30f);p14.setFixedHeight(30f);\r\n p5.setFixedHeight(30f);p15.setFixedHeight(30f);\r\n p6.setFixedHeight(30f);p16.setFixedHeight(30f);\r\n p7.setFixedHeight(30f);p17.setFixedHeight(30f);\r\n p8.setFixedHeight(30f);p18.setFixedHeight(30f);\r\n \r\n \r\n p11.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p12.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p13.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p14.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p15.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p16.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p17.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p18.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n \r\n \r\n \r\n \r\n \r\n// ptable.addCell(p1);ptable.addCell(p2);\r\n// pcell.addElement(p1);\r\n// pcell.addElement(p2);\r\n// pcell1.addElement(p3);\r\n// pcell1.addElement(p4);\r\n// pcell.setRowspan(8);\r\n// pcell1.setRowspan(8);\r\n ptable.addCell(p1);ptable.addCell(p11);\r\n \r\n ptable.addCell(p2);ptable.addCell(p12);\r\n ptable.addCell(p3);ptable.addCell(p13);\r\n ptable.addCell(p4);ptable.addCell(p14);\r\n ptable.addCell(p5);ptable.addCell(p15);\r\n ptable.addCell(p6);ptable.addCell(p16);\r\n ptable.addCell(p7);ptable.addCell(p17);\r\n ptable.addCell(p8);ptable.addCell(p18);\r\n \r\n doc.add(ptable);\r\n Paragraph paragraph13=new Paragraph(\"\\n\\n\"+\"Computer Generated Salary Slip.\\nSignature not Required.\",FontFactory.getFont(FontFactory.TIMES_ITALIC,12));\r\n doc.add(paragraph13);\r\n// Font.BOLD\r\n Paragraph para1=new Paragraph(\"\\n\"+\" -------------------------------------------\"); \r\n// \r\n doc.add(para1);\r\n \r\n JOptionPane.showMessageDialog(null, \"Pay Slip Generated\",\"Salary\",JOptionPane.INFORMATION_MESSAGE);\r\n b10.setVisible(true);\r\n }\r\n catch(Exception ee)\r\n {\r\n ee.printStackTrace();\r\n }\r\n doc.close();\r\n }\r\n\r\n }", "private void insertHeader(StringBuilder sb) {\n String id = \"ID\";\n String name = \"Name\";\n String objects = \"Objects collected\";\n sb.append(id);\n insertSpacing(sb, id);\n sb.append(name);\n insertSpacing(sb, name);\n sb.append(objects);\n insertSpacing(sb, objects);\n sb.append(NEWLINE);\n sb.append(\"---------------------------------------------------------------\");\n sb.append(NEWLINE);\n }", "public static void main(String[] args) {\n JFileChooser f = new JFileChooser();\n f.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n f.showSaveDialog(null);\n\n //System.out.println(f.getCurrentDirectory());\n \n \n String destinationFolder = f.getSelectedFile().toString();\n \n //check if OS is Windows, Linux or Mac and change file path\n String operatingSystem = System.getProperty(\"os.name\").toLowerCase();\n char c = operatingSystem.charAt(0);\n String FILE = \"\";\n if (c == 'w') {\n \tFILE = destinationFolder + \"\\\\FirstPdf.pdf\";\n } else {\n \tFILE = destinationFolder + \"/FirstPdf.pdf\";\n }\n \n\n\n try {\n Document document = new Document();\n PdfWriter.getInstance(document, new FileOutputStream(FILE));\n\n //create new font for the unicode symbols\n //font is in fonts folder\n BaseFont baseFont = BaseFont.createFont(\"fonts/arialuni.ttf\", BaseFont.IDENTITY_H, true);\n Font fontRed = new Font(baseFont, 18, Font.BOLD, BaseColor.RED);\n Font fontBlack = new Font(baseFont, 18, Font.BOLD, BaseColor.BLACK);\n document.open();\n\n //create table with 4 columns\n PdfPTable table = new PdfPTable(4);\n\n //create table header row\n PdfPCell c1 = new PdfPCell(new Phrase(\"Hearts\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n\n c1 = new PdfPCell(new Phrase(\"Diamonds\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n\n c1 = new PdfPCell(new Phrase(\"Clubs\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n\n c1 = new PdfPCell(new Phrase(\"Spades\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n table.setHeaderRows(1);\n\n\n //cards symbols and suites\n String[] cards = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\", \"A\"};\n String[] symbols = {\"\\u2665\", \"\\u2666\", \"\\u2663\", \"\\u2660\"};\n\n for (int i = 0; i < 13; i++) {\n for (int j = 0; j < 4; j++) {\n //fill cards, first two cards - red, other two - black\n if ( j < 2) {\n c1 = new PdfPCell(new Phrase(cards[i] + symbols[j], fontRed));\n } else {\n c1 = new PdfPCell(new Phrase(cards[i] + symbols[j], fontBlack));\n }\n c1.setVerticalAlignment(Element.ALIGN_MIDDLE);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n c1.setBackgroundColor(BaseColor.LIGHT_GRAY);\n c1.setBorderColor(BaseColor.WHITE);\n c1.setFixedHeight(150);\n\n c1.setBorderWidth(20);\n table.addCell(c1);\n table.setHorizontalAlignment(Element.ALIGN_CENTER);\n }\n }\n\n document.add(table);\n\n document.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n System.out.println(\"You can find your file at: \" + FILE);\n }", "public static void printLogo() {\n System.out.println( \" ____ ____ \" + System.lineSeparator()\n + \" | __| | _ \\\\ \" + System.lineSeparator()\n + \" | |__ | | | | \" + System.lineSeparator()\n + \" | __| | | | | \" + System.lineSeparator()\n + \" | |__ | |_| | \" + System.lineSeparator()\n + \" |____| |____/ \");\n }", "public static void main(String[] args) throws IOException, FileNotFoundException {\n\t\t\n\t\t\n\t\tString regex = \"[0-9]+\";\n\t\tString data = \"1313\";\n\t\tSystem.out.println(data.matches(regex));\n\t\tString regex1 = \"[0-9]+\";\n\t\tString data1 = \" 112121 sdf \";\n\t\tSystem.out.println(data1.matches(regex1));\n\t\tString []arr = data1.split(\"\\\\s\"); \n\t\tSystem.out.println(arr.length);\n\t\tSystem.out.println(data1.replaceAll(\"\\\\s+\", \" \").trim());\n\t\t\n\t\t\n\t\t/*\n\t\tFile f=new File(\"D:\\\\april.pdf\");\n\t FileInputStream fileIn;\n\t PdfReader reader;\n\t try {\n\t fileIn=new FileInputStream(f);\n\t reader=new PdfReader(fileIn);\n\t HashMap<String, String> merged=reader.getInfo();\n\t // ByteArrayInputStream bIn=new ByteArrayInputStream(merged);\n\t //BufferedReader bR=new BufferedReader(new InputStreamReader(bIn));\n\t //String line;\n\t //while ((line=bR.readLine()) != null) {\n\t //System.out.println(line);\n\t //}\n\t reader.close();\n\t fileIn.close();\n\t }\n\t catch ( IOException e) {\n\t System.err.println(\"Couldn't read file '\" );\n\t System.err.println(e);\n\t }*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\tfloat width = 612;\n\t\tfloat height = 792;\n\t\tfloat hX = 320, tX = 340, cX = 100;\n\t\tfloat hY = 0, tY = 580, cY = 200;\n\t\tfloat hW = width - hX, tW = width - tX, cW = 100;\n\t\tfloat hH = 80, tH = height - tY, cH = 60;\n\t\tRectangle header = new Rectangle( 150, 150);\n\t\t//\t\tRectangle totals = new Rectangle(cH, cH, cH, cH);\n\t\t//totals.setBounds(tX, tY, tW, tH);\n\t\t//Rectangle customer = new Rectangle();\n\t\t//customer.setBounds(cX, cY, cW, cH);\n\t\tPDFTextStripperByArea stripper = new PDFTextStripperByArea();\n\t\t//stripper.\n\t\t//stripper.addRegion(\"totals\", totals);\n\t\t//stripper.addRegion(\"customer\", customer);\n\t\tstripper.setSortByPosition(true);\n\t\tint j = 0;\n\t\tList pages = pd.getDocumentCatalog().getAllPages();\n\t\tfor (PDPage page : pages) {\n\t\t\tstripper.extractRegions(page);\n\t\t\tList regions = stripper.getRegions();\n\t\t\tfor (String region : regions) {\n\t\t\t\tString text = stripper.getTextForRegion(region);\n\t\t\t\tSystem.out.println(\"Region: \" + region + \" on Page \" + j);\n\t\t\t\tSystem.out.println(\"\\tText: \\n\" + text);\n\t\t\t}\n\t\t\tj++;\n\t\t}*/\n\t}", "private void writeTopOfPage(BufferedWriter bw)\n\t\t\tthrows IOException {\n\t\tbw.write(\"\\t\\t<page id=\\\"\" + this.getCpnID() + \"\\\">\\n\");\n\t\tbw.write(\"\\t\\t\\t<pageattr name=\\\"\" + CpnUtils.getCpnValidName(this.getIdentifier()) + \"\\\"/>\\n\");\n\t}", "public void PDFProduct() throws FileNotFoundException, DocumentException {\n\t\t\n\t\tProductBLL productBLL = new ProductBLL();\n\t\t\n\t\tDocument document = new Document();\n\t\t\n\t\tString fileName = \"Product-report\" + countProductReports + \".pdf\";\n\t\tcountProductReports++;\n\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\n\t\tdocument.open();//open document\n\n\t\t//create paragraph\n\t\tParagraph intro = new Paragraph(\"Product Report\");\n\t\tParagraph space = new Paragraph(\" \");\n\t\tPdfPTable table = new PdfPTable(4);\n\n\t\t//create a cell\n\t\tPdfPCell c1 = new PdfPCell(new Paragraph(\"Id\"));\n\t\tPdfPCell c2 = new PdfPCell(new Paragraph(\"Name\"));\n\t\tPdfPCell c3 = new PdfPCell(new Paragraph(\"Quantity\"));\n\t\tPdfPCell c4 = new PdfPCell(new Paragraph(\"Price\"));\n\n\t\t//add the cells to the table\n\t\ttable.addCell(c1);\n\t\ttable.addCell(c2);\n\t\ttable.addCell(c3);\n\t\ttable.addCell(c4);\n\n\t\tfor(Product p: productBLL.findAll()) {\n\t\t\tc1 = new PdfPCell(new Paragraph(String.valueOf(p.getId())));\n\t\t\tc2 = new PdfPCell(new Paragraph(p.getName()));\n\t\t\tc3 = new PdfPCell(new Paragraph(String.valueOf(p.getQuantity())));\n\t\t\tc4 = new PdfPCell(new Paragraph(String.valueOf(p.getPrice())));\n\n\t\t\ttable.addCell(c1);\n\t\t\ttable.addCell(c2);\n\t\t\ttable.addCell(c3);\n\t\t\ttable.addCell(c4);\n\n\t\t}\n\n\t\t//add the objects to the document\n\t\tdocument.add(intro);\n\t\tdocument.add(space);\n\t\tdocument.add(space);\n\t\tdocument.add(space);\n\t\tdocument.add(table);\n\n\t\tdocument.close();\n\t}", "public static void updateHeaderFooterText(IBaseSlide master)\n {\n for (IShape shape : master.getShapes())\n {\n if (shape.getPlaceholder() != null)\n {\n if (shape.getPlaceholder().getType() == PlaceholderType.Header)\n {\n ((IAutoShape) shape).getTextFrame().setText(\"HI there new header\");\n }\n }\n }\n }", "private static void outputHeaderMainPage(SimpleWriter out) {\n out.print(\"<html>\\n\" + \"<head>\\n\" + \"\\t<title>\" + \"Index\" + \"</title>\\n\"\n + \"<font size = '10' >\" + \"Glossary Homepage\" + \"</font>\"\n + \"</head>\\n\" + \"<body>\\n\" + \"<head>\\n\" + \"\\t<h1>\\n\"\n + \"<font size = '6' >\" + \"Index\" + \"</font>\" + \"\\t</h1>\\n\"\n + \"</head>\\n\" + \"</body>\\n\" + \"</html>\");\n }", "@Override\r\n\t\tpublic void preCalculation() {\r\n\t\t\tint screenWidth = getWidth();\r\n\t\t\tint screenHeight = getHeight();\r\n\r\n\t\t\tmidWidth = screenWidth / 2 ;\r\n\t\t\tscreenRectWidth = (int)(screenWidth * SCALE_WIDTH_COEFFICIENT);\r\n\t\t\t/***** Calculate screen and board positions and measurements *****/\r\n\r\n\t\t\t/***** Calculate text positions and measurements *****/\r\n\t\t\tint headerRectHeight = (int)((screenHeight * HEADER_HEIGHT_RELATIVE) * SCALE_HEIGHT_COEFFICIENT);\r\n\r\n\t\t\tint subHeaderRectHeight = (int)((screenHeight * SUB_HEADER_HEIGHT_RELATIVE) * SCALE_HEIGHT_COEFFICIENT);\r\n\r\n\t\t\ttextRectHeight = (int)((screenHeight * TEXT_HEIGHT_RELATIVE) * SCALE_HEIGHT_COEFFICIENT);\r\n\r\n\t\t\tint headerHeight = (int) (screenHeight * HEADER_HEIGHT_RELATIVE_POS);\r\n\t\t\tint subHeaderHeight = (int) (screenHeight * SUB_HEADER_HEIGHT_RELATIVE_POS);\r\n\r\n\t\t\ttextHeight = (int) (screenHeight * TEXT_HEIGHT_RELATIVE_POS);\r\n\t\t\t/***** Calculate tile positions and measurements *****/\r\n\r\n\t\t\t/***** Define Paint objects *****/\r\n\t\t\ttextPaint = new Paint();\r\n\t\t\ttextPaint.setColor(Color.RED);\r\n\r\n\t\t\theaderTextPaint = new Paint();\r\n\t\t\theaderTextPaint.setTextSize(Logic_Utils.determineMaxTextSize(currentHeaderToPrint, screenRectWidth, headerRectHeight));\r\n\r\n\t\t\tRect headerBounds = new Rect();\r\n\r\n\t\t\theaderTextPaint.getTextBounds(currentHeaderToPrint, 0, currentHeaderToPrint.length(), headerBounds);\r\n\r\n\t\t\tsubHeaderTextPaint = new Paint();\r\n\t\t\tsubHeaderTextPaint.setTextSize(Logic_Utils.determineMaxTextSize(currentSubHeaderToPrint, screenRectWidth, subHeaderRectHeight));\r\n\r\n\t\t\tRect subHeaderBounds = new Rect();\r\n\r\n\t\t\tsubHeaderTextPaint.getTextBounds(currentSubHeaderToPrint, 0, currentSubHeaderToPrint.length(), subHeaderBounds);\r\n\t\t\t/***** Define Paint objects *****/\r\n\r\n\t\t\t/***** Calculate header positions and measurements *****/\r\n\t\t\theaderTextXpos = midWidth - (headerBounds.width() / 2);\r\n\t\t\theaderTextYpos = headerHeight;\r\n\t\t\t/***** Calculate header positions and measurements *****/\r\n\r\n\t\t\t/***** Calculate sub header positions and measurements *****/\r\n\t\t\tsubHeaderTextXpos = midWidth - (subHeaderBounds.width() / 2);\r\n\t\t\tsubHeaderTextYpos = subHeaderHeight;\r\n\t\t\t/***** Calculate sub header positions and measurements *****/\r\n\r\n\t\t}", "public void createPdf() {\n\t\tDocument document = new Document();\n\t\ttry {\n\t\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\tFont header = new Font(Font.FontFamily.HELVETICA, 15, Font.BOLD);\n\t\t\tdocument.open();\n\t\t\t// set the title on the page as \"My Albums\"\n\t\t\tif (state.equals(\"a\")) {\n\t\t\t\tParagraph aHead = new Paragraph();\n\t\t\t\taHead.setFont(header);\n\t\t\t\taHead.add(\"My Albums\\n\\n\");\n\t\t\t\tdocument.add(aHead);\n\t\t\t}\n\t\t\t// or set the title on the page as \"My Publications\"\n\t\t\telse if (state.equals(\"p\")) {\n\t\t\t\tParagraph pHead = new Paragraph();\n\t\t\t\tpHead.setFont(header);\n\t\t\t\tpHead.add(\"My Publications\\n\\n\");\n\t\t\t\tdocument.add(pHead);\n\t\t\t}\n\t\t\t// create the table of albums/publications\n\t\t\tdocument.add(createTable());\n\t\t\tdocument.close();\n\t\t\tFile f = new File(fileName);\n\t\t\ttry {\n\t\t\t\tDesktop.getDesktop().browse(f.toURI());\n\t\t\t}\n\t\t\tcatch(IOException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (DocumentException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void pdfReceiptIdSection(final CartReceiptResponse receiptResponse, final Document document, Locale locale)\n throws DocumentException, IOException {\n\n LOGGER.debug(\"pdfReceiptIdSection(HttpServletRequest,HttpServletResponse,ResourceBundle)\" + receiptResponse);\n\n\t\t/* Payment Receipt Title code snippet Start */\n PdfPTable receiptHeaderTextTable = new PdfPTable(4);\n String message = getMessage(locale, \"pdf.receipt.receipt_title\");\n Font font = getFont(WHITE_COLOR, FONT_SIZE_18, Font.BOLD);\n PdfPCell receiptTextCell = new PdfPCell(new Phrase(message, font));\n cellAlignment(receiptTextCell, Element.ALIGN_CENTER, WHITE_COLOR, 0);\n cellAddingToTable(receiptHeaderTextTable, receiptTextCell, Rectangle.LEFT | Rectangle.RIGHT, 4, 0);\n document.add(receiptHeaderTextTable);\n PdfPCell headerBlankSpaceCell1 = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n\n PdfPTable receiptTable = new PdfPTable(2);\n\n cellAlignment(headerBlankSpaceCell1, 0, \"\", 0);\n cellAddingToTable(receiptTable, headerBlankSpaceCell1, Rectangle.LEFT | Rectangle.RIGHT, 2, 0);\n PdfPCell receiptNumberCell;\n String receiptNumberMessage = getMessage(locale, \"pdf.receipt.receipt_number\"\n , Long.toString(receiptResponse.getCartId()));\n Font boldFont = getFont(WHITE_COLOR, FONT_SIZE_12, Font.BOLD);\n receiptNumberCell = new PdfPCell(new Phrase(receiptNumberMessage, boldFont));\n\n\t\t/* PDF receipt Id section starts */\n cellAlignment(receiptNumberCell, Element.ALIGN_CENTER, WHITE_COLOR, 0);\n cellAddingToTable(receiptTable, receiptNumberCell, Rectangle.LEFT | Rectangle.RIGHT, 2, 0);\n /* PDF receipt Id section Ends */\n\n\t\t/* Blank Space Start */\n PdfPCell headerBlankSpaceCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n cellAlignment(headerBlankSpaceCell, 0, WHITE_COLOR, 0);\n cellAddingToTable(receiptTable, headerBlankSpaceCell, Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM, 2,\n 0);\n /* End Blank Space */\n\n\t\t/* Adding Complete structure to document */\n document.add(receiptTable);\n document.add(new Paragraph(\" \"));\n LOGGER.debug(\"End pdfReceiptIdSection(HttpServletRequest,HttpServletResponse,ResourceBundle)\");\n }", "void enableAutomaticHeaderImage();", "public static void main(String[] args) throws Exception {\n PdfDocument doc = new PdfDocument();\r\n //Set margin\r\n PdfUnitConvertor unitCvtr = new PdfUnitConvertor();\r\n PdfMargins margin = new PdfMargins();\r\n margin.setTop(unitCvtr.convertUnits(2.54f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setBottom(margin.getTop());\r\n margin.setLeft(unitCvtr.convertUnits(3.17f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setRight(margin.getLeft());\r\n\r\n drawCover(doc.getSections().add(), margin);\r\n drawContent(doc.getSections().add(), margin);\r\n drawPageNumber(doc.getSections().get(1), margin, 1, doc.getSections().get(1).getCount());\r\n\r\n //Save pdf file.\r\n doc.saveToFile(\"output/pagination.pdf\");\r\n doc.close();\r\n }", "public void onEndPage(PdfWriter writer, Document document) {\n\t\tRectangle page = document.getPageSize();\n\n\n\t\tFont HeaderStyle = new Font(); \n\t\tHeaderStyle.setSize(18);\n\t\tHeaderStyle.setStyle(Font.BOLD); \n\t\tPdfPTable headertable = new PdfPTable(1);\n\t\tPdfPCell pageNo = new PdfPCell(new Phrase(String.format(\"Page %d \", writer.getPageNumber())));\n\t\t//pageNo.setHorizontalAlignment(Element.ALIGN_RIGHT);\n\t\tpageNo.setPaddingBottom(30);\n\t\tpageNo.setBorder(Rectangle.NO_BORDER);\n\t\theadertable.addCell(pageNo);\n//\t\theadertable.setTotalWidth(page.getWidth() - document.leftMargin() \n//\t\t\t\t- document.rightMargin()); \n\n//\t\theadertable.writeSelectedRows(0, -1, document.leftMargin(), page.getHeight() - document.topMargin() + headertable.getTotalHeight(), writer \n//\t\t\t\t.getDirectContent());\n\t\tFont myContentStyledata = new Font(); \n\t\tmyContentStyledata.setSize(7);\n\t\tmyContentStyledata.setStyle(Font.NORMAL);\n\n\t\tPdfPTable foot = new PdfPTable(1);\n\t\tPdfPCell footercell = new PdfPCell(new Phrase(footer,myContentStyledata));\n\t\tfootercell.setBorder(Rectangle.TOP);\n\t\tfoot.addCell(footercell);\n\t\tfoot.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());\n\t\tfoot.writeSelectedRows(0, -1, document.leftMargin(), document.bottomMargin(),\n\t\t\t\twriter.getDirectContent());\n\t}", "public TbPdfInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "@Override\r\n\tprotected void buildPdfDocument(Map<String, Object> model, Document document, PdfWriter writer,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tresponse.addHeader(\"Content-Disposition\", \"attachment;filename=Item.pdf\");\r\n\r\n\t\t// create element\r\n\t\tParagraph p = new Paragraph(\"WELCOME TO PDF\");\r\n\r\n\t\t// add to document\r\n\t\tdocument.add(p);\r\n\r\n\t\t// read data from map\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Item> it = (List<Item>) model.get(\"item\");\r\n\r\n\t\t// create Table\r\n\t\tPdfPTable t = new PdfPTable(6);\r\n\r\n\t\t// Add to heading Column\r\n\t\tt.addCell(\"ID\");\r\n\t\tt.addCell(\"CODE\");\r\n\t\tt.addCell(\"DIMENSION\");\r\n\t\tt.addCell(\"COST\");\r\n\t\tt.addCell(\"CURRENCY\");\r\n\t\tt.addCell(\"DESCRIPTION\");\r\n\r\n\t\t// Add to DB Table\r\n\t\tfor (Item i : it) {\r\n\t\t\tt.addCell(i.getItemId().toString());\r\n\t\t\tt.addCell(i. getItemCode());\r\n\t\t\tt.addCell(i.getWidth()+\"\");\r\n\t\t\tt.addCell(i.getLength()+\"\");\r\n\t\t\tt.addCell(i.getHeight()+\"\");\r\n\t\t\tt.addCell(i.getBaseCost()+\"\");\r\n\t\t\tt.addCell(i. getBaseCurrency());\r\n\t\t\tt.addCell(i. getDcpt());\r\n\t\t}\r\n\t\tdocument.add(t);\r\n\r\n\t\tdocument.add(new Paragraph(new Date().toString()));\r\n\r\n\t}", "private void outputHeader(){\n System.out.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n pw.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n }", "public static void main(String args[]) throws Exception {\n\t String filePath = \"test.pdf\";\r\n\t \r\n\t String pdfText = FileReader.getFile(filePath, 581, 584); \r\n\t text_position.position(580, 584);\r\n\t \r\n//\t String pdfText = FileReader.getFile(filePath, 396, 407); \r\n//\t text_position.position(395, 407);\r\n\r\n\t txtCreate.creatTxtFile(\"test\");\r\n\t txtCreate.writeTxtFile(pdfText);\r\n\t xmlCreater.getXML(\"test.txt\");\r\n }", "@Override\r\n\tprotected void generateToc() {\r\n\t}", "private static void printReportHeader(String name, String domain, String license, int fiscalYear) {\r\n\r\n System.out.println();\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tCompany name: \" + name);\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tDomain: \" + domain);\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tLicense: \" + license);\r\n System.out.println(\"\\t\\t\\t\\t\\t\\tFiscal Year: \" + fiscalYear);\r\n System.out.println(\"\\n\");\r\n System.out.println(\"\\t\\t\\t\\t\\t\\t\\tProfit Report\\n\\n\");\r\n String format = \"%-15s %-15s %15s %15s %15s %15s %20s\";\r\n System.out.format(format,\"Branch ID\", \"Location\", \"Quarter 1\", \"Quarter 2\",\r\n \"Quarter 3\", \"Quarter 4\", \"Annual Profit\");\r\n printSeparatorLine();\r\n }", "public void drawUI() {\n \n stroke(0);\n textSize(titleH/3);\n textAlign(CENTER, CENTER);\n rectMode(CORNER);\n \n noFill();\n rect(titleX, titleY, titleW, titleH);\n image(logo, 0, 0);\n fill(0);\n text(\"EPBox: Ordinering\", titleX, titleY, titleW, titleH-15);\n \n if (!informationSeen) {\n uielement.informationDialog(\"EPBox: Ordinering\", \"Velkommen til EPBox: Ordinering.\\n\\nHvis det er første gang du kører programmet, bedes du gå igennem opsætning af programmet.\\nMangler du hjælp til dette, kan du gå ind på de relevante menuer, eller konsultere brugsanvisningen.\", \"information\");\n informationSeen = true;\n }\n\n uielement.infoHelpBttnSTART(\"Hvis det er første gang du kører programmet, bedes du gå igennem opsætning af programmet.\\nMangler du hjælp til dette, kan du gå ind på de relevante menuer, eller konsultere brugsanvisningen.\");\n\n }", "public void createDisplayHeader()\r\n\t{\r\n\t\tboolean isEType;\r\n\t\tint currentK, lowestJValue, highestJValue;\r\n\r\n\t\t// redundant now\r\n\t\tisEType = getIsEType();\r\n\t\tcurrentK = getCurrentK();\r\n\t\tlowestJValue = getLowestJValue();\r\n\t\thighestJValue = getHighestJValue();\r\n\r\n\t\tString symmetry;\r\n\t\tString kOutput;\r\n\r\n\t\tif (isEType) {\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput = currentK + \"\";\r\n\t\t\t\tsymmetry = \"E1\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\t\tsymmetry = \"E2\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\tsymmetry = \"A\";\r\n\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput += \"+\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput += \"-\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString ls = System.lineSeparator();\r\n\t\tmainHeader = \"================================================================\"\r\n\t\t\t\t+ ls + \"Symmetry type:\\t\\t\\t\\t\\t\" + symmetry + ls\r\n\t\t\t\t+ \"The K of the lower energy is:\\t\\t\\t\" + kOutput + ls + \"The input \"\r\n\t\t\t\t+ INPUT_BRANCH_TYPE + \" branch was flipped:\\t\\t\\t\" + inputIsFlipped + ls\r\n\t\t\t\t+ \"The input \" + INPUT_BRANCH_TYPE + \" branch used a J range of:\\t\\t\"\r\n\t\t\t\t+ lowestJValue + \" to \" + highestJValue\r\n\t\t\t\t+ ls + ls + \"Results for these selections are...\" + ls;\r\n\r\n\t\tsetHeaderDisplayState(true);\r\n\t}", "public void reportLogo(String nomRep, String nomlogoiReport, String logo, String tituloReport) {\n try {\n Connection connection = Conexion.getInstance().getConnection();\n Map parame = new HashMap();\n String rta = System.getProperties().getProperty(\"user.dir\") + \"/src/reportes/\" + nomRep + \".jasper\";\n parame.put(nomlogoiReport, this.getClass().getResourceAsStream(logo));\n JasperPrint prt = JasperFillManager.fillReport(rta, parame, connection);\n JasperViewer JsperView = new JasperViewer(prt, false);\n JsperView.setTitle(tituloReport);\n JsperView.setExtendedState(6);\n JsperView.setVisible(true);\n connection.close();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Reporte con logo\");\n }\n }", "@Override\n\tpublic void buildPdfDocument(Map<String, Object> model, Document doc, PdfWriter writer,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tExportExam exportExam = (ExportExam) model.get(\"exportExam\");\n\t\tExportExam exportExam2 = (ExportExam) model.get(\"exportExam2\");\n\t\tListExam listExam = null;\n\t\tListExam listExam2 = null;\n\t\tif(exportExam!=null){\n\t\tlistExam = exportExam.listExam;\n\t\t}\n\t if(exportExam2!=null){\n\t\tlistExam2 = exportExam2.listExam;\n\t\t}\n\t\n\t\tString url = request.getRequestURL().toString();\n\t\tString baseURL = url.substring(0, url.length() - request.getRequestURI().length()) + request.getContextPath();\n\t\tString path = baseURL + \"/resources/fonts/vuArial.ttf\";\n\t\tFontFactory.register(path);\n\t\t\n\t\t//\"C:\\\\Users\\\\HennessyVox\\\\Downloads\\\\Compressed\\\\vuArial.ttf\"\n\t\t//Font fontHeader = FontFactory.getFont(FONT, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);\n\t\tBaseFont base = BaseFont.createFont(path, BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);\n\t\t Font fontHeader = new Font(base, 10, Font.NORMAL);\n\t\t Font fontHeader2 = new Font(base, 10, Font.UNDERLINE);\n\t\t Font fontContent = new Font(base, 11, Font.NORMAL);\n\t\t Font fontAnswent = new Font(base, 11, Font.NORMAL, BaseColor.RED);\n\t\t Font fontTitle = new Font(base, 12, Font.BOLD);\n\t\t Font fontNumber = new Font(base, 11, Font.BOLD);\n\t\t//Font fontHeader = new Font(FontFamily.TIMES_ROMAN, 12, Font.NORMAL);\n\t String SchoolHeader = \"TRƯỜNG ĐẠI HỌC BÁCH KHOA TP HCM\";\n\t\t\n\t // Get faulty info.\n\t\n\t \n\t\ttry {\n\t\t\t\n\t\t\t if(listExam!=null){\n\t\t\t\t System.out.println(\"=============================================================\");\n\t\t\t\t int CoutExam = 1;\n\t\t\t String FacultyHeader = exportExam.getFaulty().toUpperCase();\n\t\t\t \t\n\t\t\t /// String FacultyHeader = \"KHOA KHOA HỌC VÀ KỸ THUẬT MÁY TÍNH\";\n\t\t\t String InfoStudentHeader1 = \"Họ Tên : ..........................\";\n\t\t\t String InfoStudentHeader2 = \"MSSV : ..........................\";\n\t\t\t PdfPTable table = new PdfPTable(new float[] { 75, 25 });\n\t\t\t table.setWidthPercentage(100);\n\t\t\t \n\t\t\t table.addCell(getCell(new Paragraph(SchoolHeader,fontHeader), PdfPCell.ALIGN_LEFT));\n\t\t\t \n\t\t\t table.addCell(getCell(new Paragraph(InfoStudentHeader1,fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t table.addCell(getCell(new Paragraph(FacultyHeader,fontHeader2), PdfPCell.ALIGN_LEFT));\n\t\t\t table.addCell(getCell(new Paragraph(InfoStudentHeader2,fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t table.setSpacingAfter(10);\n\t\t\t doc.add(table);\n\t\t\t \n\t\t\t // ADD title\n\t\t\t //Font fontTitle = FontFactory.getFont(FONT, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);\n\t\t\t //String titleExam = \"ĐỀ KIỂM TRA CUỐI KÌ 2017\";\n\t\t\t // System.out.println(exportExam.getExamName().toUpperCase());\n\t\t\t String titleExam = exportExam.getExamName().toUpperCase();\n\t\t\t \n\t\t\t Paragraph pHeader = new Paragraph(titleExam,fontTitle);\n\t\t\t pHeader.setAlignment(Paragraph.ALIGN_CENTER);\n\t\t\t doc.add(pHeader);\n\t\t\t \n\t\t\t String SubjectExam = \"Môn Thi : \" +exportExam.getSubjectName();\n\t\t\t String CodeExam = \"Mã đề : \" + exportExam.getCode();\n\t\t\t String timeExam = \"Thời gian : \" + exportExam.getTime();\n\t\t\t Font fontSubject = new Font(base, 10, Font.NORMAL);\n\t\t\t Font fontExam = new Font(base, 10, Font.NORMAL);\n\t\t\t \n\t\t\t PdfPTable table2 = new PdfPTable(2);\n\t\t\t table2.setWidthPercentage(80);\n\t\t\t //System.out.println(Charset.forName(\"UTF-8\").encode(SchoolHeader));\n\n\t\t\t table2.addCell(getCell(new Paragraph(SubjectExam,fontSubject), PdfPCell.ALIGN_LEFT));\n\t\t\t \n\t\t\t table2.addCell(getCell(new Paragraph(timeExam,fontExam), PdfPCell.ALIGN_RIGHT));\n\t\t\t table2.addCell(getCell(new Paragraph(CodeExam,fontExam), PdfPCell.ALIGN_LEFT));\n\t\t\t table2.addCell(getCell(new Paragraph(\"\",fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t table2.setSpacingBefore(5);\n\t\t\t doc.add(table2);\n\t\t\t \n\t\t\t String noteExam = exportExam.getNoteExam();\n\t\t\t Font fontNote = new Font(base, 8, Font.ITALIC);\n\t\t\t \n\t\t\t Paragraph pNote = new Paragraph(noteExam, fontNote);\n\t\t\t pNote.setAlignment(Paragraph.ALIGN_MIDDLE);\n\t\t\t doc.add(pNote);\n\t\t\t PdfPTable table3 = new PdfPTable(1);\n\t\t\t table3.setSpacingBefore(5);\n\t\t\t table3.setWidthPercentage(80);\n\t\t\t Font finalExam = new Font(base, 10, Font.NORMAL);\n\t\t\t table3.addCell(getCell(new Paragraph(\"*****\",finalExam), PdfPCell.ALIGN_CENTER));\n\t\t\t doc.add(table3);\n\t\t\t\t \n\t\t\t for(int i = 0; i < listExam.blockRootQuestion.size() ; i++){\n\t\t\t\t System.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\t\t\t \n\t\t\t\t List listBlock = new List(List.UNORDERED);\n\t\t\t\t listBlock.setAutoindent(false);\n\t\t\t\t // listBlock.setSymbolIndent(20);\t\n\t\t\t\t listBlock.add(new ListItem(new Paragraph(listExam.blockRootQuestion.get(i).rootQuestionBlock.getContent(),fontContent)));\n\t\t\t System.out.println(\"########### Block NAME \" +listExam.blockRootQuestion.get(i).rootQuestionBlock.getContent());\n\t\t\t\t \n\t\t\t\t doc.add(listBlock);\n\t\t\t \n\t\t\t \n\t\t \tSystem.out.println(\"########### SIZE QUESTION \" +listExam.blockRootQuestion.get(i).questionList.size());\n \n\t\t\t for(int j = 0 ; j < listExam.blockRootQuestion.get(i).questionList.size(); j++){\t\n\t\t\t \tSystem.out.println(\"########### QUESTION NAME \" +listExam.blockRootQuestion.get(i).questionList.get(j).question.getContent());\n\t\t\t\t\t\t\n\t\t\t \t List listQuestion = new List(List.UNORDERED);\n\t\t\t\t\t listQuestion.setListSymbol(\"\");\n\t\t\t \t\n\t\t\t \t//SingleQuestion questionPDF = null;\n\t\t\t \t//questionPDF = listExam.blockRootQuestion.get(i).questionList.get(j);\n\t\t\t \tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tsb.append(\"Câu \");\n\t\t\t\t\t\tsb.append(CoutExam);\n\t\t\t\t\t\tsb.append(\". \");\n\t\t\t\t\t\tString strI = sb.toString();\n\t\t\t \t//strI = new Paragraph(strI, fontNumber);\n\t\t\t \t//listQuestion.setPostSymbol(strI);\n\t\t\t \tSystem.out.println(strI);\n\t\t\t listQuestion.add(new ListItem(new Paragraph(strI + listExam.blockRootQuestion.get(i).questionList.get(j).question.getContent(), fontContent)));\n\t\t\t listQuestion.setIndentationLeft(10);\n\t\t\t doc.add(listQuestion);\n\t\t\t List listAnswerPDF = new List(List.ORDERED, List.ALPHABETICAL);\n\t\t\t for(int k = 0; k < listExam.blockRootQuestion.get(i).questionList.get(j).answerList.size(); k++){\n\t\t\t\t\t System.out.println(\"########### Answer NAME \" +listExam.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent());\n\t\t\t \t listAnswerPDF.add(new ListItem(new Paragraph(listExam.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent(), fontContent))); \t \n\t\t\t }\n\t\t\t listAnswerPDF.setIndentationLeft(25);\n\t\t\t doc.add(listAnswerPDF);\n\t\t\t CoutExam++;\n\t\t\t }\n\t\t\t doc.add( Chunk.NEWLINE ); \n\t\t\t }\n\t\t\t // doc.close();\n\t\t\t listExam =null;\n\t\t\t }\n\t\t\t /*\n\t\t\t * Export Answer\n\t\t\t */\n\t\t\telse if(listExam2!=null){\n\t\t\t\t int CoutExam = 1;\n\t\t\t\t System.out.println(\"#######################################################\");\n\t\t\t\t String FacultyHeader = exportExam2.getFaulty().toUpperCase();\n\t\t\t \t\n\t\t\t\t /// String FacultyHeader = \"KHOA KHOA HỌC VÀ KỸ THUẬT MÁY TÍNH\";\n\t\t\t\t String InfoStudentHeader1 = \"Họ Tên : ..........................\";\n\t\t\t\t String InfoStudentHeader2 = \"MSSV : ..........................\";\n\t\t\t\t PdfPTable table = new PdfPTable(new float[] { 75, 25 });\n\t\t\t\t table.setWidthPercentage(100);\n\t\t\t\t \n\t\t\t\t table.addCell(getCell(new Paragraph(SchoolHeader,fontHeader), PdfPCell.ALIGN_LEFT));\n\t\t\t\t \n\t\t\t\t table.addCell(getCell(new Paragraph(InfoStudentHeader1,fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t\t table.addCell(getCell(new Paragraph(FacultyHeader,fontHeader2), PdfPCell.ALIGN_LEFT));\n\t\t\t\t table.addCell(getCell(new Paragraph(InfoStudentHeader2,fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t\t table.setSpacingAfter(10);\n\t\t\t\t doc.add(table);\n\t\t\t\t \n\t\t\t\t // ADD title\n\t\t\t\t //Font fontTitle = FontFactory.getFont(FONT, BaseFont.IDENTITY_H, BaseFont.EMBEDDED);\n\t\t\t\t //String titleExam = \"ĐỀ KIỂM TRA CUỐI KÌ 2017\";\n\t\t\t\t // System.out.println(exportExam.getExamName().toUpperCase());\n\t\t\t\t String titleExam = exportExam2.getExamName().toUpperCase();\n\t\t\t\t \n\t\t\t\t Paragraph pHeader = new Paragraph(titleExam,fontTitle);\n\t\t\t\t pHeader.setAlignment(Paragraph.ALIGN_CENTER);\n\t\t\t\t doc.add(pHeader);\n\t\t\t\t \n\t\t\t\t String SubjectExam = \"Môn Thi : \" +exportExam2.getSubjectName();\n\t\t\t\t String CodeExam = \"Mã đề : \" + exportExam2.getCode();\n\t\t\t\t String timeExam = \"Thời gian : \" + exportExam2.getTime();\n\t\t\t\t Font fontSubject = new Font(base, 10, Font.NORMAL);\n\t\t\t\t Font fontExam = new Font(base, 10, Font.NORMAL);\n\t\t\t\t \n\t\t\t\t PdfPTable table2 = new PdfPTable(2);\n\t\t\t\t table2.setWidthPercentage(80);\n\t\t\t\t //System.out.println(Charset.forName(\"UTF-8\").encode(SchoolHeader));\n\n\t\t\t\t table2.addCell(getCell(new Paragraph(SubjectExam,fontSubject), PdfPCell.ALIGN_LEFT));\n\t\t\t\t \n\t\t\t\t table2.addCell(getCell(new Paragraph(timeExam,fontExam), PdfPCell.ALIGN_RIGHT));\n\t\t\t\t table2.addCell(getCell(new Paragraph(CodeExam,fontExam), PdfPCell.ALIGN_LEFT));\n\t\t\t\t table2.addCell(getCell(new Paragraph(\"\",fontHeader), PdfPCell.ALIGN_RIGHT));\n\t\t\t\t table2.setSpacingBefore(5);\n\t\t\t\t doc.add(table2);\n\t\t\t\t \n\t\t\t\t String noteExam = exportExam2.getNoteExam();\n\t\t\t\t Font fontNote = new Font(base, 8, Font.ITALIC);\n\t\t\t\t \n\t\t\t\t Paragraph pNote = new Paragraph(noteExam, fontNote);\n\t\t\t\t pNote.setAlignment(Paragraph.ALIGN_MIDDLE);\n\t\t\t\t doc.add(pNote);\n\t\t\t\t PdfPTable table3 = new PdfPTable(1);\n\t\t\t\t table3.setSpacingBefore(5);\n\t\t\t\t table3.setWidthPercentage(80);\n\t\t\t\t Font finalExam = new Font(base, 10, Font.NORMAL);\n\t\t\t\t table3.addCell(getCell(new Paragraph(\"*****\",finalExam), PdfPCell.ALIGN_CENTER));\n\t\t\t\t doc.add(table3);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t for(int i = 0; i < listExam2.blockRootQuestion.size() ; i++){\n\t\t\t\t\t System.out.println(\"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\");\n\t\t\t\t\t \n\t\t\t\t\t List listBlock = new List(List.UNORDERED);\n\t\t\t\t\t listBlock.setAutoindent(false);\n\t\t\t\t\t // listBlock.setSymbolIndent(20);\t\n\t\t\t\t\t listBlock.add(new ListItem(new Paragraph(listExam2.blockRootQuestion.get(i).rootQuestionBlock.getContent(),fontContent)));\n\t\t\t\t System.out.println(\"########### Block NAME \" +listExam2.blockRootQuestion.get(i).rootQuestionBlock.getContent());\n\t\t\t\t\t \n\t\t\t\t\t doc.add(listBlock);\n\t\t\t\t \n\t\t\t\t \n\t\t\t \tSystem.out.println(\"########### SIZE QUESTION \" +listExam2.blockRootQuestion.get(i).questionList.size());\n\t \n\t\t\t\t for(int j = 0 ; j < listExam2.blockRootQuestion.get(i).questionList.size(); j++){\t\n\t\t\t\t \tSystem.out.println(\"########### QUESTION NAME \" +listExam2.blockRootQuestion.get(i).questionList.get(j).question.getContent());\n\t\t\t\t\t\t\t\n\t\t\t\t \t List listQuestion = new List(List.UNORDERED);\n\t\t\t\t\t\t listQuestion.setListSymbol(\"\");\n\t\t\t\t \t\n\t\t\t\t \t//SingleQuestion questionPDF = null;\n\t\t\t\t \t//questionPDF = listExam.blockRootQuestion.get(i).questionList.get(j);\n\t\t\t\t \tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\t\tsb.append(\"Câu \");\n\t\t\t\t\t\t\tsb.append(CoutExam);\n\t\t\t\t\t\t\tsb.append(\". \");\n\t\t\t\t\t\t\tString strI = sb.toString();\n\t\t\t\t \t//strI = new Paragraph(strI, fontNumber);\n\t\t\t\t \t//listQuestion.setPostSymbol(strI);\n\t\t\t\t \tSystem.out.println(strI);\n\t\t\t\t listQuestion.add(new ListItem(new Paragraph(strI + listExam2.blockRootQuestion.get(i).questionList.get(j).question.getContent(), fontContent)));\n\t\t\t\t listQuestion.setIndentationLeft(10);\n\t\t\t\t doc.add(listQuestion);\n\t\t\t\t List listAnswerPDF = new List(List.ORDERED, List.ALPHABETICAL);\n\t\t\t\t for(int k = 0; k < listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.size(); k++){\n\t\t\t\t\t\t System.out.println(\"########### Answer NAME \" +listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent());\n\t\t\t\t\t\t if(listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getIssolution())\n\t\t\t\t \t listAnswerPDF.add(new ListItem(new Paragraph(listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent(), fontAnswent)));\n\t\t\t\t \t else \n\t\t\t\t\t \tlistAnswerPDF.add(new ListItem(new Paragraph(listExam2.blockRootQuestion.get(i).questionList.get(j).answerList.get(k).getContent(), fontContent)));\n\t\t\t\t }\n\t\t\t\t listAnswerPDF.setIndentationLeft(25);\n\t\t\t\t doc.add(listAnswerPDF);\n\t\t\t\t CoutExam++;\n\t\t\t\t }\n\t\t\t\t doc.add( Chunk.NEWLINE );\n\t\t\t\t }\n\t\t\t\t doc.close();\n\t\t\t\t listExam2=null;\n\t\t\t }\n\t\t\t model.clear();\n\t\t\t doc.close();\n\t\t\t exportExam = null;\n\t\t\t// exportExam2 = null;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"ERROR \"+ e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void crearPDF()\r\n\t{\r\n\t\tif (!new File(ruta).exists())\r\n\t\t\t(new File(ruta)).mkdirs();\r\n\r\n\t\tFile[] files = (new File(ruta)).listFiles();\r\n\t\tString ruta = \"\";\r\n\t\tif (files.length == 0) {\r\n\t\t\truta = this.ruta + huesped + \"0\" + \".pdf\";\r\n\t\t} else {\r\n\t\t\tString path = files[files.length - 1].getAbsolutePath();\r\n\t\t\tString num = path.substring(path.length() - 5, path.length() - 4);\r\n\r\n\t\t\truta = this.ruta + huesped + (Integer.parseInt(num) + 1) + \".pdf\";\r\n\t\t}\r\n\r\n\t\tSimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/YYYY\");\r\n\t\t\r\n\t\tcabecera = \"\\n\"+\"Resonance Home\" + \"\\n\"+ \r\n \"Armenia, Quindio\" + \"\\n\" + \r\n \"Colombia\" + \"\\n\\n\" + \r\n\t\t\t\t\"Fecha \" + reserva.getFecha().toString() + \"\\n\\n\\n\";\r\n\t\tcontenido = \"Reserva de hospedaje: \"+ reserva.getHospedaje().getId() + \"\\n\" + \r\n \t\"Titulo del Hospedaje: \" + reserva.getHospedaje().getTitulo() + \" \" + \"\\n\" +\r\n \t\"Dirección: \" + reserva.getHospedaje().getDireccion().getDireccion() + \", \" + reserva.getHospedaje().getDireccion().toString() + \"\\n\" +\r\n\t\t\t\t\"Anfitrion: \" + nombreAnfitrion + \"\\n\" + \"Correo: \" + emailAnfitrion + \"\\n\\n\\n\" + \"Huesped: \"\r\n\t\t\t\t+ nombreHuesped + \"\\n\" +\r\n \t\"Metodo de pago: \" + reserva.getTarjeta().getNumeroT() + \" Tarjeta de credito\" + \"\\n\\n\" +\r\n \tformato.format(reserva.getFechaInicial()) + \" hasta \"+ formato.format(reserva.getFechaFinal()) +\"\\n\\n\" +\r\n \t\"Descripcion\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalor\" + \"\\n\\n\" + \r\n\t\t\t\t\"Huespedes\" + \"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"\r\n\t\t\t\t+ reserva.getNumeroHuespedes() + \"\\n\" +\r\n\t\t\t\t\"Alojamiento\" + \"\t\t\t\t\t\t\t\t\t\t\t\t\t \" + precioCompleto + \"\\n\"\r\n\t\t\t\t+ \"Tarifa de limpieza\" + \"\t\t\t\t \t \" + precioLimpieza + \"\\n\" + \"Comision por servicio\"\r\n\t\t\t\t+ \"\t\t\t\t\t\" + precioComision + \"\\n\\n\";\r\n\t\tpiePagina = \"TOTAL \" + \" \" + \"$ \" + reserva.getValor() + \"\\n\" ;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFileOutputStream archivo = new FileOutputStream(ruta);\r\n\t\t\tDocument doc = new Document(PageSize.A5, 10, 10, 10, 10);\r\n\t\t\tPdfWriter.getInstance(doc, archivo);\r\n\t\t\tdoc.open();\r\n\t\t\tdoc.add(obtenerCabecera(cabecera));\r\n\t\t\tdoc.add(obtenerContenido(contenido));\r\n\t\t\tdoc.add(obtenerPiePagina(piePagina));\r\n\t\t\tdoc.close();\r\n\t\t\tthis.ruta = ruta;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"\" + e);\r\n\t\t}\r\n\r\n\t}", "private void writeHEADER() throws IOException {\n\t\tmeta.compute_checksum();\n\t\tmeta.write();\n\t\t\n\t\t// We could also generate a non-aldus metafile :\n\t\t// writeClipboardHeader(meta);\n\t\t\n\t\t// Generate the standard header common to all metafiles.\n\t\thead.write();\n\t}", "public static void main(String[] args) throws Exception {\n List<Chapter> chapterList = new ArrayList();\n BaseFont bfChinese = BaseFont.createFont(\"simhei.ttf\", BaseFont.IDENTITY_H,BaseFont.NOT_EMBEDDED);\n// BaseFont bfChinese = BaseFont.createFont(\"cjk_registry\", \"UniGB-UCS2-H\", false);\n Integer size = 28;\n \n Font font = new Font(bfChinese, size, Font.BOLD);\n for (int i = 1; i <= 10; i++) {\n Chunk chapTitle = new Chunk(\"The \" + i + \" chapter\", font);\n Chapter chapter = new Chapter(new Paragraph(chapTitle), i);\n chapTitle.setLocalDestination(chapter.getTitle().getContent());\n \n Paragraph chapterContent = new Paragraph(\"章节内容第1行\\n章节内容第2行\\n章节内容第3行\\n章节内容第4行\\n\" + i, font);\n chapterContent.setLeading(size * 1.1f);\n chapter.add(chapterContent);\n \n for (int j = 0; j < i; j++) {\n Chunk secTitle = new Chunk(\" 二级The \" + (j + 1) + \" section\");\n Section section = chapter.addSection(new Paragraph(secTitle));\n secTitle.setLocalDestination(section.getTitle().getContent());\n section.setIndentationLeft(10);\n section.add(new Paragraph(\"mangocool mangocool测试1aa1 \"\n + \"\\nmangocool mangocool 内容bb2\"\n + \"\\nmangocool mangocool 内容cc3\", font));\n \n section.add(new Paragraph(\"mangocool mangocool测试1aa1 \"\n + \"\\nmangocool mangocool 内容bb2\"\n + \"\\nmangocool mangocool 内容cc3\", font));\n }\n// content.add(chapter);\n chapterList.add(chapter);\n }\n// content.close();\n\n Document document = new Document(PageSize.A4, 50, 50, 50, 50);\n // add index page.\n String FILE_DIR = \"C:\\\\e\\\\test/\";\n String path = FILE_DIR + \"createSamplePDF.pdf\";\n FileOutputStream os = new FileOutputStream(path);\n PdfWriter writer = PdfWriter.getInstance(document, os);\n IndexEvent indexEvent = new IndexEvent();\n writer.setPageEvent(indexEvent);\n document.open();\n// Chapter indexChapter = new Chapter(\"Index:\", -1);\n// indexChapter.setNumberDepth(-1);// not show number style\n// PdfPTable table = new PdfPTable(2);\n// for (Map.Entry<String, Integer> index : event.index.entrySet()) {\n// PdfPCell left = new PdfPCell(new Phrase(index.getKey()));\n// left.setBorder(Rectangle.NO_BORDER);\n// Chunk pageno = new Chunk(index.getValue() + \"zzZZ章节\");\n// pageno.setLocalGoto(index.getKey());\n// PdfPCell right = new PdfPCell(new Phrase(pageno));\n// right.setHorizontalAlignment(Element.ALIGN_RIGHT);\n// right.setBorder(Rectangle.NO_BORDER);\n// table.addCell(left);\n// table.addCell(right);\n// }\n// indexChapter.add(table);\n// document.add(indexChapter);\n // add content chapter\n for (Chapter c : chapterList) {\n document.add(c);\n indexEvent.body = true;\n }\n document.close();\n os.close();\n }", "public static void main(String[] args) {\n PdfDocument pdf = new PdfDocument();\r\n\r\n PdfPageBase page = pdf.getPages().add();\r\n\r\n Rectangle2D rectangle2D = new Rectangle.Float();\r\n rectangle2D.setFrame(new Point2D.Double(10,10),new Dimension(100,100));\r\n\r\n PdfPopupAnnotation annotation = new PdfPopupAnnotation(rectangle2D, \"test\");\r\n annotation.setIcon(PdfPopupIcon.Help);\r\n annotation.setOpen(true);\r\n annotation.setAuthor(\"e-iceblue\");\r\n annotation.setSubject(\"subject_popup\");\r\n annotation.setColor(new PdfRGBColor(255,0,150));\r\n\r\n page.getAnnotationsWidget().add(annotation);\r\n String result = \"output/setAuthorAndSubjectForPdfPopupAnnotation.pdf\";\r\n\r\n //Save the document\r\n pdf.saveToFile(result);\r\n\t}", "public void buildSignature() throws IOException\n {\n PDFTemplateBuilder builder = new PDVisibleSigBuilder();\n PDFTemplateCreator creator = new PDFTemplateCreator(builder);\n setVisibleSignature(creator.buildPDF(getPdVisibleSignature()));\n }", "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 }", "protected DownloadAction.StreamInfo getStreamInfo(ActionMapping mapping,\n ActionForm form,\n HttpServletRequest request,\n HttpServletResponse response)\n throws Exception {\n String contentType = \"application/pdf\";\n System.out.println(\"\");\n\n String fileDir=\"/tratado\"; //directory where all files are created and located \n String fileName=\"/tratado.pdf\"; \n \n File file = new File(request.getRealPath(\"/WEB-INF\")+fileDir+fileName);\n\n\n FileOutputStream f = new FileOutputStream(file);\n Document document = new Document();\n\n try {\n PdfWriter writer = PdfWriter.getInstance(document, f);\n// PdfContentByte cb = writer.getDirectContent();\n Rectangle rct = new Rectangle(36, 54, 559, 788);\n //Definimos un nombre y un tamaño para el PageBox los nombres\n //posibles son: “crop”, “trim”, “art” and “bleed”.\n writer.setBoxSize(\"art\", rct);\n //HeaderFooter event = new HeaderFooter(this.getId(), this.getNumAutenticacion());\n //writer.setPageEvent(event);\n document.open();\n \n PdfContentByte cb = writer.getDirectContent();\n cb.saveState();\n cb.setColorStroke(new CMYKColor(1f, 0f, 0f, 0f));\n cb.setColorFill(new CMYKColor(1f, 0f, 0f, 0f));\n cb.rectangle(20,10,10,820);\n cb.fill();\n cb.restoreState();\n \n //Encabezado\n Font fuenteEnc = new Font(Font.getFamily(\"ARIAL\"), 10, Font.BOLD);\n Font fuenteTitulo = new Font(Font.getFamily(\"ARIAL\"), 12, Font.BOLD);\n Font fuenteText = new Font(Font.getFamily(\"ARIAL\"), 10);\n DateFormat dates = new SimpleDateFormat(\"dd/MM/yyyy\");\n Date date = new Date();\n //Logos\n //http://upload.wikimedia.org/wikipedia/commons/2/21/USB_logo.svg USB\n \n Image usblogo = Image.getInstance(request.getRealPath(\"/interfaz/imagenes/StickerIAEAL2.png\"));\n usblogo.scaleAbsolute(100f, 50f);\n usblogo.setAbsolutePosition(430f, 740f);\n document.add(usblogo);\n \n usblogo = Image.getInstance(request.getRealPath(\"/interfaz/imagenes/logoUSB.png\"));\n usblogo.scaleAbsolute(80f, 45f);\n usblogo.setAbsolutePosition(90f, 740f);\n document.add(usblogo);\n \n\n String encabezado = \"\\nSartenejas \" + dates.format(date) + \"\\n\"\n + \"República Bolivariana de Venezuela \\n\"\n + \"Universidad Simón Bolívar \\n\"\n + \"Instituto de Altos Estudios de América Latina \\n\"\n + \"Sistema de Tratados y Acuerdos Internacionales de Venezuela\\n\";\n Paragraph pa = new Paragraph(encabezado, fuenteEnc);\n pa.setSpacingBefore(50);\n pa.setSpacingAfter(50);\n pa.setIndentationLeft(50);\n document.add(pa);\n\n // Titulo del Tratado.\n\n PdfPTable cuadro = new PdfPTable(1);\n Paragraph p = new Paragraph(\"Título: \\n\\n\\n\\n\\n\", fuenteTitulo);\n cuadro.addCell(p);\n document.add(cuadro);\n\n PdfPTable cuadro1 = new PdfPTable(2);\n\n String s = \"Fecha de Firma: \";\n p = new Paragraph(s, fuenteText);\n PdfPCell cell1 = new PdfPCell(p);\n cuadro1.addCell(cell1);\n\n s = \"Lugar de Firma: \\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Fecha de Depósito: \\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Entrada en Vigor: \\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Fecha de Publicación en Gaceta Oficial: \\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Numero de Gaceta Oficial: \\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Duración: \\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Período: \\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Volúmen: \\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Página: \\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Países: \\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n s = \"Grupos: \\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\";\n cuadro1.addCell(new Paragraph(s, fuenteText));\n\n document.add(cuadro1);\n document.close();\n f.flush();\n f.close();\n } catch (Exception e) {\n //imprimimos los errores\n System.err.println(e);\n e.printStackTrace();\n }\n return new DownloadAction.FileStreamInfo(contentType, file);\n }", "public void onChapter(PdfWriter writer, Document document, float paragraphPosition, Paragraph title) {\r\n\t\theader[1] = new Phrase(title.getContent());\r\n\t\tpagenumber = 1;\r\n\r\n\t}", "private void addContent(Document document) throws DocumentException, BadElementException, IOException, SQLException {\r\n Anchor anchor = new Anchor(\"First Chapter\", catFont);\r\n anchor.setName(\"First Chapter\");\r\n Paragraph spacing = new Paragraph(\"\");\r\n addEmptyLine(spacing, 1);\r\n \r\n // Second parameter is the number of the chapter\r\n Chapter catPart = new Chapter(1);\r\n addHeader(catPart);\r\n catPart.add(spacing);\r\n \r\n addEmployeeInfo(catPart);\r\n catPart.add(spacing);\r\n\r\n createMainTable(catPart);\r\n catPart.add(spacing);\r\n \r\n createTotalHoursTable(catPart);\r\n catPart.add(spacing);\r\n Calendar date = Calendar.getInstance();\r\n String dato;\r\n dato = (date.get(Calendar.DAY_OF_MONTH))+\"/\"+(date.get(Calendar.MONTH)+1)+\"-\"+date.get(Calendar.YEAR)+\" \" + MyUtil.p0(date.get(Calendar.HOUR_OF_DAY)) + \":\" + MyUtil.p0(date.get(Calendar.MINUTE));\r\n Paragraph printedInfo = new Paragraph(\"Printet \"+ dato);\r\n printedInfo.setAlignment(Element.ALIGN_CENTER);\r\n catPart.add(printedInfo);\r\n \r\n document.add(catPart);\r\n\r\n }", "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 }", "public static void main(String[] args) throws IOException {\n\t\tPdf pdf1 = new Pdf();\n\t\t// Assign a security instance to Pdf object\n\t\tpdf1.setSecurity(new Security());\n\t\t// Restrict annotation modification\n\t\tpdf1.getSecurity().isAnnotationsModifyingAllowed(false);\n\t\t// Restrict contents modification\n\t\tpdf1.getSecurity().isContentsModifyingAllowed(false);\n\t\t// Restrict copying the data\n\t\tpdf1.getSecurity().isCopyingAllowed(false);\n\t\t// Allow to print the document\n\t\tpdf1.getSecurity().isCopyingAllowed(true);\n\t\t// Restrict form filling\n\t\tpdf1.getSecurity().isFormFillingAllowed(false);\n\t\t// Add a section in the Pdf\n\t\tSection sec1 = pdf1.getSections().add();\n\t\t// Create a text paragraph\n\t\tText text1 = new Text(sec1, \"this is text content\");\n\t\t// Set the top maring of text paragraph to 30\n\t\ttext1.getMargin().setTop(30);\n\t\t// Add the text paragraph to the section\n\t\tsec1.getParagraphs().add(text1);\n\t\t// Save the Pdf\n\t\tFileOutputStream fileOut = new FileOutputStream(new File(\"Test.pdf\"));\n\t\tpdf1.save(fileOut);\n\t}", "private static String headerSummary() {\r\n\r\n String output = \"\";\r\n output += \"\\\\documentclass[a4paper,10pt]{article}\\n\";\r\n output += \"\\\\title{Wilcoxon Signed Ranks test.}\\n\";\r\n output += \"\\\\usepackage{rotating}\\n\";\r\n output += \"\\\\usepackage{textcomp}\\n\";\r\n output += \"\\\\date{\\\\today}\\n\\\\author{KEEL non-parametric statistical module}\\n\\\\begin{document}\\n\\n\\\\pagestyle{empty}\\n\\\\maketitle\\n\\\\thispagestyle{empty}\\n\\n\";\r\n\r\n return output;\r\n\r\n }" ]
[ "0.67301494", "0.6562078", "0.6396829", "0.6239039", "0.62264264", "0.5946636", "0.591859", "0.5866996", "0.5818741", "0.58178896", "0.5787735", "0.57733226", "0.5757464", "0.5739447", "0.57139367", "0.57133687", "0.5667334", "0.5663156", "0.5659457", "0.55713385", "0.5562548", "0.55587405", "0.5554167", "0.55540824", "0.5544753", "0.5537732", "0.5515989", "0.55002177", "0.54966205", "0.5492399", "0.5460961", "0.5459871", "0.5434048", "0.5430184", "0.5424491", "0.5410887", "0.5403842", "0.5381885", "0.5380701", "0.53790903", "0.5373788", "0.53730696", "0.5361133", "0.53471047", "0.5319558", "0.5277835", "0.5272603", "0.52709913", "0.52613556", "0.5259634", "0.52547985", "0.5251731", "0.52500516", "0.5241461", "0.5237628", "0.52348006", "0.5225524", "0.52209383", "0.5218353", "0.520909", "0.52004606", "0.51870215", "0.51831186", "0.5171298", "0.51664156", "0.51524407", "0.51305914", "0.51260453", "0.5123323", "0.51221937", "0.51183784", "0.5109127", "0.5102712", "0.51020885", "0.5087073", "0.5086801", "0.508441", "0.50708", "0.50657773", "0.5059199", "0.50495744", "0.50376", "0.5036888", "0.50315917", "0.5029084", "0.50254834", "0.50064987", "0.49888408", "0.497897", "0.49754938", "0.49732986", "0.4967051", "0.49648264", "0.49609783", "0.49453694", "0.49427578", "0.49411952", "0.4936464", "0.49325714", "0.49063823" ]
0.68486375
0
/ Add order total and logo to bottom of PDF
public void postProcessPDF(Object document) throws IOException, BadElementException, DocumentException { Document pdf = (Document) document; pdf.add(new Paragraph("\n Total cost: $" + getTotal())); ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); String theguy = servletContext.getRealPath("") + File.separator + "resources" + File.separator + "img" + File.separator + "theguy.png"; pdf.add(Image.getInstance(theguy)); pdf.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public List<OmOrderHeaders> printPDF(IRequest requestCtx, @StdWho List<OmOrderHeaders> States) {\n PDFReport pdfPrint = new PDFReport();\n\n OmOrderHeaders notice=null;\n //List<OmOrderHeaders> trade=new ArrayList<OmOrderHeaders>();\n\n for (OmOrderHeaders state : States) {\n if (state.getHeaderId() != null) {\n notice=state;\n }\n }\n\n File file = new File(\"C:\\\\Users\\\\PB\\\\Desktop\\\\\"+notice.getOrderNumber()+\".pdf\");\n List<OmOrderLines> omOrderLines = omOrderLinesMapper.selectSumPrice(notice);\n\n\n try {\n\n BaseFont bfChinese=PDFReport.bfChinese;\n Font headfont =PDFReport.headfont;\n Font keyfont=PDFReport.keyfont;\n Font textfont=PDFReport.textfont;\n\n file.createNewFile();\n Document document = new Document();\n\n document.setPageSize(PageSize.A4);\n PdfWriter.getInstance(document, new FileOutputStream(file));\n document.open();\n PdfPTable table= pdfPrint.createTable(6);\n\n table.addCell(pdfPrint.createCell(\".订单打印:\", headfont, Element.ALIGN_LEFT,6,false));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n\n\n table.addCell(pdfPrint.createCell(\"订单编号:\", keyfont, Element.ALIGN_RIGHT,0,false));\n //table.addCell(pdfPrint.createCell(notice.getOrderNumber(), textfont, Element.ALIGN_CENTER));\n table.addCell(pdfPrint.createCell(notice.getOrderNumber(), textfont,Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\"公司名称:\", keyfont, Element.ALIGN_RIGHT,0,false));\n OrgCompanys orgCompanys = orgCompanysMapper.selectByPrimaryKey(notice.getCompanyId());\n table.addCell(pdfPrint.createCell(orgCompanys.getCompanyName(), textfont, Element.ALIGN_LEFT));\n ArCustomers arCustomers = arCustomersMapper.selectByPrimaryKey(notice.getCustomerId());\n table.addCell(pdfPrint.createCell(\"客户名称:\", keyfont, Element.ALIGN_RIGHT,0,false));\n table.addCell(pdfPrint.createCell(arCustomers.getCustomerName(), textfont, Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n\n\n table.addCell(pdfPrint.createCell(\"订单日期:\", keyfont, Element.ALIGN_RIGHT,0,false));\n table.addCell(pdfPrint.createCell(new SimpleDateFormat(\"yyyy/MM/dd\").format(notice.getOrderDate()), textfont, Element.ALIGN_LEFT));\n long sum = 0;\n for(int i=0;i<omOrderLines.size();i++) {\n OmOrderLines ot = new OmOrderLines();\n ot = omOrderLines.get(i);\n sum = sum + ot.getOrderdQuantity()*ot.getUnitSellingPrice();\n\n }\n\n\n table.addCell(pdfPrint.createCell(\"订单总金额:\", keyfont, Element.ALIGN_RIGHT,0,false));\n table.addCell(pdfPrint.createCell(String.valueOf(sum), textfont, Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\"订单状态:\", keyfont, Element.ALIGN_RIGHT,0,false));\n String s=\"\";\n if(notice.getOrderStatus().equals(\"NEW\")){\n s=\"新建\";\n }else if(notice.getOrderStatus().equals(\"SUBMITED\")){\n s=\"已提交\";\n }else if(notice.getOrderStatus().equals(\"APPROVED\")){\n s=\"已审批\";\n }else if(notice.getOrderStatus().equals(\"REJECTED\")){\n s=\"已拒绝\";\n }\n table.addCell(pdfPrint.createCell(s, textfont, Element.ALIGN_LEFT));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n table.addCell(pdfPrint.createCell(\" \", keyfont, Element.ALIGN_LEFT,6,false));\n\n table.addCell(pdfPrint.createCell(\"主要:\", headfont, Element.ALIGN_LEFT,6,false));\n\t\ttable.addCell(pdfPrint.createCell(\"物料编码\", textfont, Element.ALIGN_CENTER));\n\t\ttable.addCell(pdfPrint.createCell(\"物料描述\", textfont, Element.ALIGN_CENTER));\n\t\ttable.addCell(pdfPrint.createCell(\"产品单位\", textfont, Element.ALIGN_CENTER));\n\t\ttable.addCell(pdfPrint.createCell(\"数量\", textfont, Element.ALIGN_CENTER));\n table.addCell(pdfPrint.createCell(\"销售单价\", textfont, Element.ALIGN_CENTER));\n table.addCell(pdfPrint.createCell(\"金额\", textfont, Element.ALIGN_CENTER));\n\n\t\tfor(int i=0;i<omOrderLines.size();i++){\n OmOrderLines ot = new OmOrderLines ();\n ot = omOrderLines.get(i);\n InvInventoryItems invInventoryItems = invInventoryItemsMapper.selectByPrimaryKey(ot.getInventoryItemId());\n\t\t\ttable.addCell(pdfPrint.createCell(invInventoryItems.getItemCode(), textfont));\n\t\t\ttable.addCell(pdfPrint.createCell(invInventoryItems.getItemDescription(), textfont));\n\t\t\ttable.addCell(pdfPrint.createCell(ot.getOrderQuantityUom(), textfont));\n\t\t\ttable.addCell(pdfPrint.createCell(String.valueOf(ot.getOrderdQuantity()), textfont));\n table.addCell(pdfPrint.createCell(String.valueOf(ot.getUnitSellingPrice()), textfont));\n table.addCell(pdfPrint.createCell(String.valueOf(ot.getOrderdQuantity()*ot.getUnitSellingPrice()), textfont));\n\t\t}\n\t\ttry {\n\t\t\tdocument.add(table);\n\n\t\t}catch(Exception e){e.printStackTrace(); }\n\n\t\tdocument.close();\n }catch(Exception e){e.printStackTrace();}\n\n\n return States;\n }", "public void createPdf(String savePath,String filename,int orderNumber, Customer customer, Owner owner,List<Product> productSet) throws DocumentException, MalformedURLException, IOException {\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tDocument document = new Document(PageSize.A4, 40, 20, 0, 0);\r\n\t\t\t\tPdfWriter.getInstance(document, new FileOutputStream(savePath + \"/\" + filename + orderNumber + \".pdf\"));\r\n\t\t\t\tdocument.open();\r\n\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\tImage img = Image.getInstance(\r\n\t\t\t\t\t\t\"C:/Users/svens/eclipse-workspace/GetIt/src/main/resources/images/GetItLogo_Redux.png\");\r\n\t\t\t\timg.setAlignment(Element.ALIGN_BASELINE);\r\n\r\n\t\t\t\tPdfPTable table = new PdfPTable(3);\r\n\t\t\t\ttable.setWidthPercentage(100);\r\n\t\t\t\ttable.setSpacingBefore(150f);\r\n\t\t\t\ttable.setWidths(new int[] { 2, 1, 2 });\r\n\t\t\t\tPdfPCell cell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(owner.getCompanyName() + \"\\n\" + owner.getFirstName() +\"\\n\"+ owner.getLastname() + \r\n\t\t\t\t\t\t\t\t\"\\n\"+ owner.getAddress() , font1));\r\n\t\t\t\tcell.setVerticalAlignment(PdfPCell.ALIGN_MIDDLE);\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\ttable.addCell(cell);\r\n\r\n\t\t\t\tPdfPCell cellrg = new PdfPCell(new Phrase(\"Rechnung\" + orderNumber, font2));\r\n\t\t\t\tcellrg.setBorder(0);\r\n\t\t\t\tcellrg.setVerticalAlignment(PdfPCell.ALIGN_BOTTOM);\r\n\t\t\t\tcellrg.setHorizontalAlignment(PdfPCell.ALIGN_CENTER);\r\n\t\t\t\ttable.addCell(cellrg);\r\n\r\n\t\t\t\tPdfPCell cell2 = new PdfPCell();\r\n\t\t\t\tcell2.setBorder(0);\r\n\t\t\t\tcell2.setHorizontalAlignment(PdfPCell.RIGHT);\r\n\t\t\t\ttable.getDefaultCell().setVerticalAlignment(Element.ALIGN_MIDDLE);\r\n\r\n\t\t\t\ttable.addCell(cell2);\r\n\t\t\t\tdocument.add(table);\r\n\r\n\t\t\t\tDate date = new Date();\r\n\t\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\");\r\n\t\t\t\tStringBuilder dateBuilder = new StringBuilder(dateFormat.format(date));\r\n\t\t\t\tParagraph leftDate = new Paragraph();\r\n\t\t\t\tleftDate.setAlignment(Element.ALIGN_RIGHT);\r\n\t\t\t\tleftDate.setFont(font1);\r\n\t\t\t\tleftDate.add(\"\" + dateBuilder);\r\n\r\n\t\t\t\tdocument.add(new LineSeparator());\r\n\r\n\t\t\t\tdocument.add(leftDate);\r\n\t\t\t\tdocument.add(new Paragraph(\"\"));\r\n\r\n\t\t\t\t// Adress\r\n\t\t\t\tPdfPTable adressTable = new PdfPTable(2);\r\n\t\t\t\tadressTable.setHorizontalAlignment(PdfPTable.ALIGN_RIGHT);\r\n\t\t\t\tadressTable.setSpacingBefore(40f);\r\n\t\t\t\tadressTable.setWidthPercentage(96f);\r\n\t\t\t\tcell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(\"Herr\\n\"+ customer.getName() + \" \" + customer.getLastname()+\"\\n\" + customer.getAddress(), font2));\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tadressTable.addCell(cell);\r\n\t\t\t\tChunk chunk = new Chunk(\"Rechnungsnummer: \"+ orderNumber + \"\\nKundennummer: \" +\r\n\t\t\t\tcustomer.getCustomer_id() + \"\\nRechnungsdatum: \" + dateBuilder, font1);\r\n\t\t\t\tcell = new PdfPCell(new Phrase(chunk));\r\n\t\t\t\tcell.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT);\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tadressTable.addCell(cell);\r\n\r\n\t\t\t\tdocument.add(adressTable);\r\n\r\n\t\t\t\t// Products\r\n\t\t\t\tPdfPTable productTable = new PdfPTable(4);\r\n\t\t\t\tproductTable.setPaddingTop(200);\r\n\t\t\t\tproductTable.setSpacingBefore(50);\r\n\t\t\t\tproductTable.addCell(\"QTY\");\r\n\t\t\t\tproductTable.addCell(\"Name\");\r\n\t\t\t\tproductTable.addCell(\"Price\");\r\n\t\t\t\tproductTable.addCell(\"Amount\");\r\n\r\n\t\t\t\tdouble total = 0;\r\n\t\t\t\tint tax = 20;\r\n\r\n\t\t\t\t// Iterate over Set to display different Products\r\n\t\t\t\tfor (int i = 0; i < productSet.size(); i++) {\r\n\r\n\t\t\t\t\tproductTable.addCell(productSet.get(i).intToString(productSet.get(i).getQuantity()));\r\n\t\t\t\t\tproductTable.addCell(productSet.get(i).getName());\r\n\t\t\t\t\tproductTable.addCell(productSet.get(i).doubleToString(productSet.get(i).getPrice()));\r\n\t\t\t\t\tproductTable.addCell(\r\n\t\t\t\t\t\t\tproductSet.get(i).doubleToString(productSet.get(i).getPrice() * productSet.get(i).getQuantity()));\r\n\r\n\t\t\t\t\ttotal = total + productSet.get(i).getPrice() * productSet.get(i).getQuantity();\r\n\r\n\t\t\t\t}\r\n\t\t\t\tdouble subTotal = total / 100 * (100 - tax);\r\n\r\n\t\t\t\tcell = new PdfPCell(new Phrase(\" \"));\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cell);\r\n\r\n\t\t\t\t\r\n\t\t\t\tfont3.setColor(255, 255, 255);\r\n\t\t\t\tPdfPCell cellSubtotal = new PdfPCell(new Phrase(\"Subtotal\",font3));\r\n\t\t\t\tcellSubtotal.setBackgroundColor(color);\r\n\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(cellSubtotal);\r\n\t\t\t\tproductTable.addCell(\"Tax 20%\");\r\n\t\t\t\tproductTable.addCell(\"Total\");\r\n\r\n\t\t\t\tproductTable.addCell(cell);\r\n\t\t\t\tproductTable.addCell(Double.toString(subTotal));\r\n\t\t\t\tproductTable.addCell(Double.toString(total - total / 100 * (100 - tax)));\r\n\t\t\t\tproductTable.addCell(Double.toString(total));\r\n\t\t\t\t\r\n\t\t\t\tproductTable.setSpacingAfter(500);\r\n\t\t\t\tdocument.add(productTable);\r\n\r\n\t\t\t\t//BUSINESS OWNER INFORMATION\r\n\t\t\t\tPdfPTable businessTable = new PdfPTable(2);\r\n\r\n\t\t\t\tcell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(owner.getBankName() +\"\\nBLZ: \" + owner.getBankCode() + \" \" + owner.getAccountNumber(), font1));\r\n\t\t\t\tcell.setVerticalAlignment(PdfPCell.BOTTOM);\r\n\t\t\t\tcell.setBorder(0);\r\n\r\n\t\t\t\tbusinessTable.addCell(cell);\r\n\r\n\t\t\t\tcell = new PdfPCell(\r\n\t\t\t\t\t\tnew Phrase(\"\\n BIC: \" + owner.getBic() + \"\\n UID: \" + owner.getUid(),font1));\r\n\t\t\t\tcell.setVerticalAlignment(PdfPCell.BOTTOM);\r\n\t\t\t\tcell.setBorder(0);\r\n\t\t\t\tbusinessTable.addCell(cell);\r\n\t\t\t\t\r\n\t\t\t\tdocument.add(businessTable);\r\n\r\n\r\n\t\t\t\tdocument.close();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}", "private void createPdf(CartReceiptResponse receiptResponse, HttpServletResponse response, Locale localeObj)\n throws DocumentException, IOException {\n /* Get the output stream for writing PDF object */\n final OutputStream out = response.getOutputStream();\n Document document = new Document();\n PdfWriter writer = PdfWriter.getInstance(document, out);\n document.open();\n\n\t\t/* Start Add Image */ \n /* add Logo image based on application id Getting Image path from Resource bundle*/\n final String logoFileClasspath = getMessage(localeObj, \"pdf.receipt.logoImageUrl\");\n URL path = PdfServlet.class.getClassLoader().getResource(logoFileClasspath);\n if (null == path) {\n throw new FileNotFoundException(\"unable to find logoImage in classpath: \" + logoFileClasspath);\n }\n Image logoImage = Image.getInstance(path);\n\n\t\t/* Start of Bill Submit Section */\n PdfPTable logoImageTable = new PdfPTable(1);/* Table for the Logo Image */\n /* Logo added to PDF cell constructor */\n PdfPCell logoImageCell = new PdfPCell(logoImage);\n PdfPCell logoBlankSpaceCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n cellAlignment(logoImageCell, Element.ALIGN_CENTER, \"\", 0);\n cellAddingToTable(logoImageTable, logoImageCell, Rectangle.LEFT | Rectangle.TOP | Rectangle.RIGHT, 0, 0);\n\n cellAlignment(logoImageCell, Element.ALIGN_LEFT, \"\", 0);\n cellAddingToTable(logoImageTable, logoBlankSpaceCell, Rectangle.LEFT | Rectangle.RIGHT, 0, 0);\n document.add(logoImageTable);\n /* End Add Logo Image */ \n\n\t\t/* create PDF header section */\n pdfReceiptIdSection(receiptResponse, document, localeObj);\n /* Designing bill transaction information to show biller name and amount*/\n designBillTransactionInfo(receiptResponse, document, localeObj);\n /* create payment method section */\n pdfPaymentMethod(receiptResponse, document, localeObj);\n /* Appending line below the document */\n pdfInfoMessage(document, localeObj);\n /* New page creating for merging existing PdF page in to current PDF */\n document.newPage();\n try {\n getPdfFromAwsLink(writer, localeObj);/* Call to merge existing PDF to current PDf */\n } catch (final Exception e) {\n LOGGER.error(\"trouble while merging PDF disclosure\", e);\n }\n document.close();\n LOGGER.debug(\"End PDF Created \");\n }", "public void nuevoReporteVentasMueble(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasMueble.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR MUEBLE\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "public void nuevoReporteProductos(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteProductos.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE PRODUCTOS\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "private void prnHEADER()\n\t{ \n\t try\n\t {\n\t\t\tcl_dat.M_PAGENO +=1;\n\t\t\tcl_dat.M_intLINNO_pbst=0;\n\t\t\t\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(\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC1+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC2+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC3+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',cl_dat.M_strCMPNM_pbst ,100));\n\t\t\tdosREPORT.writeBytes(\"Report Date:\"+ cl_dat.M_strLOGDT_pbst + \"\\n\");\t\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Stock Statement as on \"+(rdbDYOPN.isSelected() ? strREFDT+\" at 07:00 Hrs\" : cl_dat.M_txtCLKDT_pbst.getText()+\" \"+cl_dat.M_txtCLKTM_pbst.getText()+\" Hrs\"),100));\t\t\t\n\t\t\tdosREPORT.writeBytes(\"Page No. :\" + String.valueOf(cl_dat.M_PAGENO) + \"\\n\");\t\t\t\t\t\t\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\" \",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Product & Size\",28));\n\t\t\t//System.out.println(\"LM_COUNT = \"+LM_COUNT);\n\t\t\tfor(i=0;i<LM_COUNT;i++)\n\t\t\t\tdosREPORT.writeBytes(padSTRING('L',staMNLDS[i],12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Tot.Sq.Mts\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"S/Rtn\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Res.Qty\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Q/Hold\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Cub.Mtrs\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"M.Tons\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Pcs\",10));\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\t//crtLINE(136);\n\t\t\t//dosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\t\t\n\t\t\t\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\tcl_dat.M_intLINNO_pbst += 11;\n\t }\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnHEADER\",'E');\n\t\t}\n\t}", "public void PDFOrder() throws FileNotFoundException, DocumentException {\n\t\t\n\t\tOrdersBLL orderBLL = new OrdersBLL();\n\t\t\n\t\tDocument document = new Document();\n\t\t\n\t\tString fileName = \"Orders-report\" + countOrdersReports + \".pdf\";\n\t\tcountOrdersReports++;\n\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\n\t\tdocument.open();//open document\n\n\t\t//create paragraph\n\t\tParagraph intro = new Paragraph(\"Order Report\");\n\t\tParagraph space = new Paragraph(\" \");\n\t\tPdfPTable table = new PdfPTable(4);\n\n\t\t//create a cell\n\t\tPdfPCell c1 = new PdfPCell(new Paragraph(\"Id\"));\n\t\tPdfPCell c2 = new PdfPCell(new Paragraph(\"Customer Name\"));\n\t\tPdfPCell c3 = new PdfPCell(new Paragraph(\"Product Name\"));\n\t\tPdfPCell c4 = new PdfPCell(new Paragraph(\"Quantity\"));\n\n\t\t//add the cells to the table\n\t\ttable.addCell(c1);\n\t\ttable.addCell(c2);\n\t\ttable.addCell(c3);\n\t\ttable.addCell(c4);\n\t\t\n\t\t\n\n\t\tfor(String[] str: orderBLL.display()) {\n\t\t\tc1 = new PdfPCell(new Paragraph(str[0]));\n\t\t\tc2 = new PdfPCell(new Paragraph(str[1]));\n\t\t\tc3 = new PdfPCell(new Paragraph(str[2]));\n\t\t\tc4 = new PdfPCell(new Paragraph(str[3]));\n\n\t\t\ttable.addCell(c1);\n\t\t\ttable.addCell(c2);\n\t\t\ttable.addCell(c3);\n\t\t\ttable.addCell(c4);\n\n\t\t}\n\n\t\t//add the objects to the document\n\t\tdocument.add(intro);\n\t\tdocument.add(space);\n\t\tdocument.add(space);\n\t\tdocument.add(space);\n\t\tdocument.add(table);\n\n\t\tdocument.close();\n\t}", "public void nuevoReporteVentasFecha(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasFecha.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR FECHA\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\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 void nuevoReporteVentasCiudad(ArrayList<Producto> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n //Direccion root\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteVentasCiudad.pdf\");\r\n //FileOutputStream ficheroPdf = new FileOutputStream(\"user.dir/tmp\", \"ReporteProductos.pdf\");\r\n //File tempfile = new File(\"user.dir/tmp\", \"tempfile.txt\"); \r\n documento = new Document();\r\n // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE VENTAS POR CIUDAD\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(3);//#campos(columnas) para la tabla\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"Celdas\", font));\r\n\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"DESCRIPCION\");\r\n tabla.addCell(\"REFERENCIA\");\r\n tabla.addCell(\"TIPO\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getDESCRIPCION());\r\n tabla.addCell(Datos.get(conta).getREFERENCIA());\r\n tabla.addCell(Datos.get(conta).getTIPO());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Productos, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "public void preProcessPDF(Object document) throws IOException, BadElementException, DocumentException {\n Document pdf = (Document) document;\n pdf.open();\n pdf.setPageSize(PageSize.A4);\n\n ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();\n String header = servletContext.getRealPath(\"\") + File.separator + \"resources\" + File.separator + \"img\" + File.separator + \"header.png\";\n\n pdf.add(Image.getInstance(header));\n\n pdf.add(new Paragraph(\"\\n\\n Order placed by: \" + getUserName()));\n pdf.add(new Paragraph(\" Order placed at: \" + getDate().toString()));\n pdf.add(new Paragraph(\"\\n\\n\"));\n\n }", "public void nuevoReporteClientes(ArrayList<Cliente> Datos) throws IOException {\n Document documento = null;\r\n try {\r\n FileOutputStream ficheroPdf = new FileOutputStream(\"C:\\\\Users\\\\panle\\\\Documents\\\\ReporteClientes.pdf\");\r\n documento = new Document(); // Se asocia el documento al OutputStream y se indica que el espaciado entre\r\n // lineas sera de 20. Esta llamada debe hacerse antes de abrir el documento\r\n PdfWriter.getInstance(documento, ficheroPdf).setInitialLeading(20);\r\n\r\n // Se abre el documento.\r\n documento.open();\r\n documento.add(new Paragraph(\"REPORTE CLIENTES\",\r\n FontFactory.getFont(\"ARIAL\", // fuente\r\n 16, // tamaño\r\n Font.ITALIC, // estilo\r\n BaseColor.BLACK))); // color\r\n\r\n PdfPTable tabla = new PdfPTable(9);\r\n Font font = new Font(FontFamily.COURIER, 6, Font.BOLD, BaseColor.BLACK);\r\n PdfPCell cell = new PdfPCell(new Phrase(\"algo\", font));\r\n documento.add(new Paragraph(\"\\n\"));\r\n\r\n Image img = Image.getInstance(\"C:\\\\Users\\\\panle\\\\Documents\\\\logo.png\");\r\n documento.add(img);\r\n documento.add(new Paragraph(\"\\n\"));\r\n int conta = 0;\r\n\r\n cell.setBorder(Rectangle.TITLE);\r\n tabla.addCell(\"NOMBRE COMLETO\");\r\n tabla.addCell(\"USUARIO\");\r\n tabla.addCell(\"NIT\");\r\n tabla.addCell(\"NO DOCUMENTO\");\r\n tabla.addCell(\"PROFESION\");\r\n tabla.addCell(\"TELÉFONO CELULAR\");\r\n tabla.addCell(\"TELÉFONO RESIDENCIA\");\r\n tabla.addCell(\"DIRECCIÓN\");\r\n tabla.addCell(\"CIUDAD\");\r\n\r\n while (conta < Datos.size()) {\r\n cell.setBorder(Rectangle.NO_BORDER);\r\n tabla.addCell(Datos.get(conta).getNOMBRE() + \" \" + Datos.get(conta).getAPELLIDO());\r\n tabla.addCell(Datos.get(conta).getUSUARIO());\r\n tabla.addCell(Datos.get(conta).getNIT());\r\n tabla.addCell(Datos.get(conta).getNUMERO_DOC());\r\n tabla.addCell(Datos.get(conta).getPROFESION());\r\n tabla.addCell(Datos.get(conta).getTEL_CEL());\r\n tabla.addCell(Datos.get(conta).getTEL_RESIDENCIA());\r\n tabla.addCell(Datos.get(conta).getDIRECCION());\r\n tabla.addCell(Datos.get(conta).getCIUDAD());\r\n conta++;\r\n }\r\n\r\n documento.add(tabla);\r\n documento.close();\r\n\r\n } catch (FileNotFoundException | DocumentException e) {\r\n System.out.println(\"Error al generar Reporte Clientes, por:\");\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n public void onEndPage(PdfWriter writer, Document document) {\n if (body) {\n page++;\n ColumnText.showTextAligned(writer.getDirectContent(),\n Element.ALIGN_CENTER, new Phrase(page + \"\"),\n (document.right() + document.left()) / 2, document.bottom() - 18, 0);\n }\n }", "public void onEndPage(PdfWriter writer, Document document) {\n\t\tRectangle page = document.getPageSize();\n\n\n\t\tFont HeaderStyle = new Font(); \n\t\tHeaderStyle.setSize(18);\n\t\tHeaderStyle.setStyle(Font.BOLD); \n\t\tPdfPTable headertable = new PdfPTable(1);\n\t\tPdfPCell pageNo = new PdfPCell(new Phrase(String.format(\"Page %d \", writer.getPageNumber())));\n\t\t//pageNo.setHorizontalAlignment(Element.ALIGN_RIGHT);\n\t\tpageNo.setPaddingBottom(30);\n\t\tpageNo.setBorder(Rectangle.NO_BORDER);\n\t\theadertable.addCell(pageNo);\n//\t\theadertable.setTotalWidth(page.getWidth() - document.leftMargin() \n//\t\t\t\t- document.rightMargin()); \n\n//\t\theadertable.writeSelectedRows(0, -1, document.leftMargin(), page.getHeight() - document.topMargin() + headertable.getTotalHeight(), writer \n//\t\t\t\t.getDirectContent());\n\t\tFont myContentStyledata = new Font(); \n\t\tmyContentStyledata.setSize(7);\n\t\tmyContentStyledata.setStyle(Font.NORMAL);\n\n\t\tPdfPTable foot = new PdfPTable(1);\n\t\tPdfPCell footercell = new PdfPCell(new Phrase(footer,myContentStyledata));\n\t\tfootercell.setBorder(Rectangle.TOP);\n\t\tfoot.addCell(footercell);\n\t\tfoot.setTotalWidth(page.getWidth() - document.leftMargin() - document.rightMargin());\n\t\tfoot.writeSelectedRows(0, -1, document.leftMargin(), document.bottomMargin(),\n\t\t\t\twriter.getDirectContent());\n\t}", "public void onEndPage(PdfWriter writer, Document document) {\r\n\r\n\t\tImage image;\r\n\t\tFont fontStyle = new Font();\r\n\t\tfontStyle.setColor(255, 255, 255);\r\n\t\tfontStyle.setSize(10);\r\n\t\ttry {\r\n\t\t\timage = Image.getInstance(ResourceUtils.getFile(\"classpath:images\"+File.separator+\"cpmis-submission-pdf-footer.png\").getAbsolutePath());\r\n\t\t\tint indentation = 0;\r\n\t\t\tfloat scaler = ((document.getPageSize().getWidth() - indentation) / image.getWidth()) * 100;\r\n\t\t\timage.scalePercent(scaler);\r\n\t\t\timage.setAbsolutePosition(0, 0);\r\n\t\t\tdocument.add(image);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tString date = new SimpleDateFormat(\"dd-MM-yyyy\").format(new Date());\r\n\t\tColumnText.showTextAligned(writer.getDirectContent(), Element.ALIGN_CENTER,\r\n\t\t\t\tnew Phrase(String.format(\"Page - %d, Printed on : %s %s\", pagenumber, date, domainName), fontStyle),\r\n\t\t\t\t(document.getPageSize().getWidth()) / 2, document.bottomMargin() - 25, 0);\r\n\t}", "public void createPdf(Context context) {\n PdfDocument document = new PdfDocument();\n\n // crate a page description\n PdfDocument.PageInfo pageInfo =\n new PdfDocument.PageInfo.Builder(500, 500, 2).create();\n\n // start a page\n PdfDocument.Page page = document.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint paint = new Paint();\n paint.setColor(Color.CYAN);\n\n //canvas.drawCircle(50, 50, 30, paint);\n\n document.finishPage(page);\n\n\n // Create Page 2\n pageInfo = new PdfDocument.PageInfo.Builder(500, 600, 1).create();\n page = document.startPage(pageInfo);\n canvas = page.getCanvas();\n paint = new Paint();\n paint.setColor(Color.BLUE);\n\n\n //print alldata to pdf\n\n\n Cursor res = myDb.GetSumOfColumns(\"Subscriptions\", \"amount\");\n Cursor result = myDb.GetSumOfColumns(\"Expenses\", \"amount\");\n Cursor cashResult = myDb.GetPayModeTotals(\"Subscriptions\", \"paymode\", \"Cash\");\n Cursor EcocashResult = myDb.GetPayModeTotals(\"Subscriptions\", \"paymode\", \"EcoCash\");\n Cursor BankcashResult = myDb.GetPayModeTotals(\"Subscriptions\", \"paymode\", \"Bank\");\n\n if (res.moveToFirst() && result.moveToFirst() && cashResult.moveToFirst() && EcocashResult.moveToFirst()\n && BankcashResult.moveToFirst()) {\n\n String alldata = res.getString(0);\n String allexpe = result.getString(0);\n String cashres = cashResult.getString(0);\n String ecores = EcocashResult.getString(0);\n String bankres = BankcashResult.getString(0);\n\n int income = 0;\n try {\n\n income = parseInt(alldata) - parseInt(allexpe);\n } catch (Exception e) {\n income = 0;\n }\n\n canvas.drawText(\"Income and Expenditure Statement for the period from ?? to ??\", 100, 160, paint);\n canvas.drawText(\"Income Received : \", 30, 210, paint);\n canvas.drawText(\" Cash : ' \" + cashres + \"' \", 30, 230, paint);\n canvas.drawText(\" Ecocash: ' \" + ecores + \"' \", 30, 250, paint);\n canvas.drawText(\" Bank : ' \" + bankres + \"' \", 30, 270, paint);\n canvas.drawText(\" Total : ' \" + alldata + \" '\", 30, 290, paint);\n canvas.drawText(\"Less Expenses : \", 30, 310, paint);\n canvas.drawText(\" Expense '( \" + allexpe + \")' \", 30, 330, paint);\n canvas.drawText(\"Net Income : \", 30, 350, paint);\n canvas.drawText(\" : Net ' \" + income + \" '\", 30, 370, paint);\n canvas.drawText(\"Compiled By: Secretary _______________ \", 30, 460, paint);\n canvas.drawText(\"Date : \", 30, 490, paint);\n\n }\n\n\n // finish the page\n document.finishPage(page);\n\n // write the document content\n File folder = new File(Environment.getExternalStorageDirectory() +\n File.separator + \"EasySecretary/Income Expenditure/\");\n boolean success = true;\n if (!folder.exists()) {\n success = folder.mkdirs();\n }\n if (success) {\n // Do something on success\n } else {\n // Do something else on failure\n }\n //appending cuurent timestamp to my generated file\n\n Date_Operations dateOp = new Date_Operations();\n String currenttime = dateOp.GetCurrentTimeAndDate();\n\n\n //String targetPdf = \"/sdcard/EasySecretary/Income and Expenditure '\"+currenttime+\"'.pdf\";\n String targetPdf = \"/sdcard/EasySecretary/Income Expenditure/Income and Expenditure \"+currenttime+\".pdf\";\n File filePath = new File(targetPdf);\n try {\n document.writeTo(new FileOutputStream(filePath));\n Toast.makeText(context, \"Pdf stored in \\n \" + targetPdf, Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(context, \"Something wrong: \" + e.toString(),\n Toast.LENGTH_LONG).show();\n }\n\n // close the document\n document.close();\n\n }", "public static void createPrescriptionLabel(String headerTitle, String pName, String orderDate,String orderNo) throws FileNotFoundException, DocumentException, SQLException\n {\n String sqlGetDrugPresc = \"\";\n \n Rectangle customRec = new Rectangle(238f, 138f);\n Document document = new Document(customRec,1,1,2,3);\n PdfWriter.getInstance(document,new FileOutputStream(headerTitle));\n document.open();\n \n \n \n try{\n sqlGetDrugPresc = \"Select * from pis_order_detail where order_no = '\"+ orderNo +\"'\"; \n \n String a[] = {};\n ArrayList<ArrayList<String>> fromRmi = DBConnection.getImpl().getQuery(sqlGetDrugPresc, 17, a); \n for(int i = 0 ; i < fromRmi.size() ; i++)\n {\n Paragraph mainContent = new Paragraph();\n\n Paragraph clinicName = new Paragraph(\"Klinik Utem Induk\",labelTitle);\n //clinicName.setFont(labelTitle);\n clinicName.setAlignment(Element.ALIGN_CENTER);\n\n mainContent.add(clinicName);\n //addEmptyLine(mainContent,1);\n Paragraph ptnName = new Paragraph(\"Name :\"+pName,labelFont);\n ptnName.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(ptnName);\n\n Paragraph oDate = new Paragraph(\"Date :\"+orderDate.substring(0,10),labelFont);\n oDate.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(oDate);\n \n Paragraph descrp1 = new Paragraph(fromRmi.get(i).get(2),labelFont);\n descrp1.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descrp1);\n\n Paragraph descrp2 = new Paragraph(fromRmi.get(i).get(4),labelFont);\n descrp2.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descrp2);\n\n Paragraph descOrderOUM = new Paragraph(fromRmi.get(i).get(8),labelFont);\n descOrderOUM.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descOrderOUM);\n\n Paragraph descDrugStrength = new Paragraph(fromRmi.get(i).get(6),labelFont);\n descDrugStrength.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descDrugStrength);\n\n document.add(mainContent);\n if(i != fromRmi.size()- 1)\n document.newPage();\n }\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n \n try \n {\n sqlGetDrugPresc = \"Select * from pis_order_detail where order_no = ?\";\n PreparedStatement ps = Session.getCon_x(1000).prepareStatement(sqlGetDrugPresc);\n ps.setString(1, orderNo);\n ResultSet rs = ps.executeQuery(); \n\n for(int i=0;rs.next();i++)\n { \n Paragraph mainContent = new Paragraph();\n\n Paragraph clinicName = new Paragraph(\"Klinik Utem Induk\",labelTitle);\n //clinicName.setFont(labelTitle);\n clinicName.setAlignment(Element.ALIGN_CENTER);\n\n mainContent.add(clinicName);\n //addEmptyLine(mainContent,1);\n Paragraph ptnName = new Paragraph(\"Name :\"+pName,labelFont);\n ptnName.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(ptnName);\n\n Paragraph oDate = new Paragraph(\"Date :\"+orderDate.substring(0,10),labelFont);\n oDate.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(oDate);\n \n Paragraph descrp1 = new Paragraph(rs.getString(\"DRUG_ITEM_DESC\"),labelFont);\n descrp1.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descrp1);\n \n Paragraph descrp2 = new Paragraph(rs.getString(\"DRUG_FREQUENCY\"),labelFont);\n descrp2.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descrp2);\n \n Paragraph descOrderOUM = new Paragraph(rs.getString(\"ORDER_OUM\"),labelFont);\n descOrderOUM.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descOrderOUM);\n \n Paragraph descDrugStrength = new Paragraph(rs.getString(\"DRUG_STRENGTH\"),labelFont);\n descDrugStrength.setAlignment(Element.ALIGN_LEFT);\n mainContent.add(descDrugStrength);\n \n document.add(mainContent);\n if(!rs.isLast())\n document.newPage();\n } \n } catch (DocumentException exx) {\n exx.printStackTrace();\n }\n }\n document.close();\n PrintTest2.print3(headerTitle);\n }", "public static void main(String args[]) throws IOException {\n File file = new File(\"Savoy House_2019_Price List_precios.pdf\");\n PDDocument document = PDDocument.load(file);\n\n //Instantiate PDFTextStripper class\n PDFTextStripper striper = new PDFTextStripper();\n\n //Retrieving text from PDF document\n striper.setStartPage(1);\n\n String documentText = striper.getText(document);\n //System.out.println(documentText);\n\n String[] tablica = documentText.split(\"\\n\");\n String header = \"Referencia,colección,Catalogo,Distributor Price EXW-Valencia,Distributor Price EXW-Valencia,\" +\n \"uds por caja,Peso bruto,imap price\\n\" +\n \"sku #,Family,Catalogue,CE 2019 [€] (Ready pickup 50~65 days),CE 2019 [€] (Ready pickup 20~30 days),\" +\n \"Pkg size,Packed weight [kg],online (Valid until June 30th 2019)\\n\";\n\n StringBuilder sb = new StringBuilder(header);\n\n for (int i = 0; i < tablica.length; i++) {\n if (tablica[i].trim().endsWith(\"€\")) {\n int lineLength = tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \").length;\n\n // check if 'Pkg size' is 1 (is not empty)\n if (tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[lineLength - 3].equals(\"1\")) {\n\n // join collection name into one record in the row\n if (lineLength == 8) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").replaceAll(\" \", \",\") + \"\\n\");\n } else if (lineLength > 8) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[0] + \",\");\n for (int j = 1; j < lineLength - 6; j++) {\n if (j < lineLength - 7) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j] + \" \");\n } else {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j]);\n }\n }\n sb.append(\",\");\n\n // append other records into the row\n for (int j = lineLength - 6; j < lineLength; j++) {\n if (j < lineLength - 1) {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j] + \",\");\n } else {\n sb.append(tablica[i].trim().replaceAll(\"\\\\s€|\\\\skg|,\", \"\").split(\" \")[j]);\n }\n }\n sb.append(\"\\n\");\n }\n } else {\n sb.append(\"Data missing\\n\");\n }\n }\n }\n System.out.println(sb);\n\n // write sb string as csv file\n try {\n FileWriter writer = new FileWriter(\"savoy2019.csv\", true);\n writer.write(sb.toString());\n writer.close();\n System.out.println(\"'savoy2019.csv' file created successfully\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Closing the document\n document.close();\n }", "private void generateInvoice(String clientID, String selectedMovieTheater, String selectedMovieOriginalName, String selectedScreeningId, int seatListSize) {\n\n AdministratorSQLiteOpenHelper administratorSQLiteOpenHelper = new AdministratorSQLiteOpenHelper(this, \"CineTEC\", null, 1);\n SQLiteDatabase sqLiteDatabase = administratorSQLiteOpenHelper.getWritableDatabase();\n\n PdfDocument pdfDocument = new PdfDocument();\n\n PdfDocument.PageInfo pageInfo = new PdfDocument.PageInfo.Builder(1200, 2010, 1).create();\n PdfDocument.Page page = pdfDocument.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint titlePaint = new Paint();\n\n Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.logo);\n Bitmap bitmapLogo = Bitmap.createScaledBitmap(bitmap, 580, 300, false);\n\n canvas.drawBitmap(bitmapLogo, -100, 120, titlePaint);\n\n titlePaint.setTextAlign(Paint.Align.RIGHT);\n titlePaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n titlePaint.setTextSize(70);\n canvas.drawText(\"CineTEC\", 1150, 150, titlePaint);\n\n titlePaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));\n titlePaint.setTextSize(35);\n canvas.drawText(\"Barrio Escalante, Avenida 7, San José, Costa Rica\", 1150, 250, titlePaint);\n canvas.drawText(\"(+506) 2555 5555\", 1150, 300, titlePaint);\n canvas.drawText(\"costumer_service@cinetec.com\", 1150, 350, titlePaint);\n canvas.drawText(\"www.cinetec.cr\", 1150, 450, titlePaint);\n\n canvas.drawLine(50, 500, 1150, 500, titlePaint);\n\n Paint paint = new Paint();\n\n // Getting client by id\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM CLIENT WHERE ID=\" + clientID, null);\n\n String firstName = \"\";\n String lastName = \"\";\n String secLastName = \"\";\n String phoneNumber = \"\";\n\n while(cursor.moveToNext()) {\n\n firstName = cursor.getString(1);\n lastName = cursor.getString(2);\n secLastName = cursor.getString(3);\n phoneNumber = cursor.getString(6);\n\n }\n\n paint.setTextAlign(Paint.Align.LEFT);\n paint.setTextSize(35);\n canvas.drawText(\"Invoice issued for:\", 50, 550, paint);\n\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));\n paint.setTextSize(50);\n canvas.drawText(firstName + \" \" + lastName + \" \" + secLastName, 50, 600, paint);\n\n paint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.NORMAL));\n paint.setTextSize(35);\n canvas.drawText(\"(+506) \" + phoneNumber, 50, 700, paint);\n\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n DateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n\n paint.setTextAlign(Paint.Align.RIGHT);\n canvas.drawText(\"Payment Date: \" + dateFormat.format(date) + \" \" + timeFormat.format(date), 1150, 700, paint);\n canvas.drawText(\"Invoice Date: \" + dateFormat.format(date) + \" \" + timeFormat.format(date), 1150, 750, paint);\n\n paint.setStyle(Paint.Style.FILL);\n paint.setTextAlign(Paint.Align.LEFT);\n canvas.drawText(\"Movie\", 50, 850, paint);\n canvas.drawText(\"Screening\", 300, 850, paint);\n canvas.drawText(\"Theater\", 500, 850, paint);\n canvas.drawText(\"Price\", 700, 850, paint);\n canvas.drawText(\"Quantity\", 850, 850, paint);\n canvas.drawText(\"Total\", 1050, 850, paint);\n\n canvas.drawLine(50, 870, 1150, 870, paint);\n\n // Getting seats by screening id\n cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM SCREENING WHERE ID=\" + selectedScreeningId, null);\n\n String hour = \"\";\n\n while(cursor.moveToNext()) {\n\n hour = cursor.getString(3);\n\n }\n\n String subTotal = Integer.toString(3097 * seatListSize);\n\n canvas.drawText(selectedMovieOriginalName, 50, 920, paint);\n canvas.drawText(hour + \":00\", 330, 920, paint);\n canvas.drawText(selectedMovieTheater, 500, 920, paint);\n canvas.drawText(\"₡ 3097\", 680, 920, paint);\n canvas.drawText(Integer.toString(seatListSize), 910, 920, paint);\n canvas.drawText(\"₡ \" + subTotal, 1040, 920, paint);\n\n canvas.drawLine(690, 1000, 1150, 1000, paint);\n\n String total = Integer.toString(3500 * seatListSize);\n\n paint.setTextAlign(Paint.Align.RIGHT);\n canvas.drawText(\"Subtotal:\", 830, 1050, paint);\n canvas.drawText(\"₡ \" + subTotal, 1150, 1050, paint);\n\n canvas.drawText(\"IVA:\", 830, 1100, paint);\n canvas.drawText(\"13 %\", 1150, 1100, paint);\n\n canvas.drawText(\"Total:\", 830, 1150, paint);\n canvas.drawText(\"₡ \" + total, 1150, 1150, paint);\n\n pdfDocument.finishPage(page);\n\n String pathFile = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).toString();\n\n File file = new File(pathFile, \"/CineTEC_Invoice.pdf\");\n\n try {\n\n pdfDocument.writeTo(new FileOutputStream(file));\n\n } catch (FileNotFoundException e) {\n\n e.printStackTrace();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n\n pdfDocument.close();\n\n }", "private void addCotationAndComment(){\n contentTable = new PdfPTable(1);\n table = new PdfPTable(5);\n\n //*** cotation ***\n Vector items = new Vector();\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_LEFT\");\n\n if(verifyList(items)){\n\n // title\n table.addCell(createItemNameCell(getTran(\"leprosy\",\"cotationdesinfirmites\"),2));\n\n // dedicated table\n PdfPTable cotationTable = new PdfPTable(8);\n\n // header\n cotationTable.addCell(emptyCell(2));\n cotationTable.addCell(createHeaderCell(getTran(\"web\",\"right\"),3));\n cotationTable.addCell(createHeaderCell(getTran(\"web\",\"left\"),3));\n\n //***** row 1 : Oeil *****\n cell = createHeaderCell(getTran(\"leprosy\",\"oeil\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_RIGHT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"oeil_\"+itemValue).toLowerCase():\"\"),3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_LEFT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"oeil_\"+itemValue).toLowerCase():\"\"),3));\n\n //***** row 2 : Main *****\n cell = createHeaderCell(getTran(\"leprosy\",\"main\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_RIGHT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"main_\"+itemValue).toLowerCase():\"\"),3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_LEFT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"main_\"+itemValue).toLowerCase():\"\"),3));\n\n //***** row 3 : Pied *****\n cell = createHeaderCell(getTran(\"leprosy\",\"pied\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_RIGHT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"pied_\"+itemValue).toLowerCase():\"\"),3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_LEFT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"pied_\"+itemValue).toLowerCase():\"\"),3));\n\n //***** row 4 : Totals *****\n cell = createHeaderCell(getTran(\"web\",\"total\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_RIGHT\");\n cotationTable.addCell(createValueCell(itemValue,3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_LEFT\");\n cotationTable.addCell(createValueCell(itemValue,3));\n\n // add cotationTable\n cell = createCell(new PdfPCell(cotationTable),3,PdfPCell.ALIGN_CENTER,PdfPCell.BOX);\n cell.setColspan(5);\n cell.setPadding(3);\n table.addCell(cell);\n }\n\n //*** commet ***\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COMMENT\");\n if(itemValue.length() > 0){\n addItemRow(table,getTran(\"Web\",\"comment\"),itemValue);\n }\n\n // add table to transaction\n if(table.size() > 0){\n if(contentTable.size() > 0) contentTable.addCell(emptyCell());\n contentTable.addCell(createCell(new PdfPCell(table),1,PdfPCell.ALIGN_CENTER,PdfPCell.NO_BORDER));\n tranTable.addCell(new PdfPCell(contentTable));\n addTransactionToDoc();\n }\n }", "public void PDFBill(Orders o) throws FileNotFoundException, DocumentException {\n\n\t\tOrdersBLL orderBLL = new OrdersBLL();\n\t\t\n\t\tDate d = new Date();\n\t\t\n\t\tDocument document = new Document();\n\t\t\n\t\tString fileName = \"Bill-report\" + countBills + \".pdf\";\n\t\tcountBills++;\n\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\n\t\tdocument.open();//open document\n\n\t\t//create paragraph\n\t\tParagraph intro = new Paragraph(\"Bill\");\n\t\tParagraph space = new Paragraph(\" \");\n\t\tParagraph date = new Paragraph(d.toString());\n\t\tPdfPTable table = new PdfPTable(5);\n\n\t\t//create a cell\n\t\tPdfPCell c1 = new PdfPCell(new Paragraph(\"Id\"));\n\t\tPdfPCell c2 = new PdfPCell(new Paragraph(\"Customer Name\"));\n\t\tPdfPCell c3 = new PdfPCell(new Paragraph(\"Product Name\"));\n\t\tPdfPCell c4 = new PdfPCell(new Paragraph(\"Quantity\"));\n\t\tPdfPCell c5 = new PdfPCell(new Paragraph(\"Total price\"));\n\n\n\t\t//add the cells to the table\n\t\ttable.addCell(c1);\n\t\ttable.addCell(c2);\n\t\ttable.addCell(c3);\n\t\ttable.addCell(c4);\n\t\ttable.addCell(c5);\n\n\t\tString[] arr = orderBLL.printBill(o);\n\t\tc1 = new PdfPCell(new Paragraph(arr[0]));\n\t\tc2 = new PdfPCell(new Paragraph(arr[1]));\n\t\tc3 = new PdfPCell(new Paragraph(arr[2]));\n\t\tc4 = new PdfPCell(new Paragraph(arr[3]));\n\t\tc5 = new PdfPCell(new Paragraph(arr[4]));\n\n\n\t\ttable.addCell(c1);\n\t\ttable.addCell(c2);\n\t\ttable.addCell(c3);\n\t\ttable.addCell(c4);\n\t\ttable.addCell(c5);\n\n\n\t\t//add the objects to the document\n\t\tdocument.add(space);\n\t\tdocument.add(intro);\n\t\tdocument.add(space);\n\t\tdocument.add(date);\n\t\tdocument.add(space);\n\t\tdocument.add(table);\n\n\t\tdocument.close();\n\t}", "public void PDF() {\n try {\r\n /* try {\r\n ImageIO.write(Imagen, \"png\", new File(Path + \"1\" + \".png\"));\r\n } catch (IOException ex) {\r\n Logger.getLogger(panelprincipal.getName()).log(Level.SEVERE, null, ex);\r\n }*/\r\n Image imagen = Image.getInstance(jfc.getSelectedFile().getPath() + \"#\" + \".png\");\r\n imagen.scaleAbsolute(500, 400);\r\n imagen.setAlignment(Element.ALIGN_CENTER);\r\n FileOutputStream archivo = new FileOutputStream(jfc.getSelectedFile().getPath() + \".PDF\");\r\n Document d = new Document();\r\n PdfWriter.getInstance(d, archivo);\r\n PDF creacion = new PDF();\r\n d.open();\r\n d.setPageSize(PageSize.LETTER);\r\n d.add(creacion.setTitulo(nombrediagrama));\r\n //doc.add(new Paragraph(\" Carlos Wilfredo Romero Maradiaga \\n\"));\r\n d.add(imagen);\r\n // doc.add(pdf.getCuerpo(\"\\nCódigo Generado:\\n\"));\r\n /* if (codigo.length()<2) {\r\n doc.add(pdf.getCuerpo(\"Para poder visualizar el código, primero debe generarlo desde el Sistema y vuelva a guardar el archivo.\"));\r\n } else {\r\n doc.add(pdf.getCuerpo(codigo));\r\n */\r\n d.close();\r\n JOptionPane.showMessageDialog(null, \"El PDF se genero excelente\", \"Excelente\", JOptionPane.INFORMATION_MESSAGE);\r\n } catch (Exception e) {\r\n }\r\n }", "private void generatePdf(){\n drawContent();\n\n itemList.clear(); //clear the temporary list of number of items\n\n // clear the form\n AddedItem = 0;\n\n EditText[] AllText = { pay1, pay2, detail1, detail2, item, qty, price, Remark };\n for (EditText e: AllText)\n e.setText(\"\");\n\n items = findViewById(R.id.itemAdded);\n items.setText(\"Item Added: \");\n }", "public void gerarRelatorioMedico() {\n Document documento = new Document(PageSize.A4.rotate());\n \n //Defina as margens\n documento.setMargins(40f, 40f, 150f, 40f);\n \n try {\n CabecalhoRodapeEvento inserircabecalho = new CabecalhoRodapeEvento();\n \n //Cria um arquivo relatorio.pdf com o documento\n PdfWriter.getInstance(documento, new FileOutputStream(\"relatorioMedico.pdf\")).setPageEvent(inserircabecalho);\n \n documento.open();\n \n Paragraph tituloDoRelatorio = new Paragraph(new Phrase(20F, \"RELATÓRIO DOS MÉDICOS CADASTRADOS\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 15F)));\n tituloDoRelatorio.setAlignment(Element.ALIGN_CENTER);\n\n documento.add(tituloDoRelatorio);\n \n Table tabelaMedicos = new Table(6);\n tabelaMedicos.setBorder(10);\n tabelaMedicos.setBorderWidth(2);\n tabelaMedicos.setBorderColor(Color.black);\n tabelaMedicos.setPadding(2);\n //tabelaMedicos.setSpacing(0);\n tabelaMedicos.setWidth(100f);\n tabelaMedicos.setWidths(new float[]{10f, 30f, 20f, 10f, 15f, 15f});\n \n Paragraph paragrafoCrm = new Paragraph(new Phrase(12F, \"CRM\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoCrm.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoNome = new Paragraph(new Phrase(12F, \"NOME\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoEspecialidade = new Paragraph(new Phrase(12F, \"ESPECIALIDADE\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoEspecialidade.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoSexo = new Paragraph(new Phrase(12F, \"SEXO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoSalario = new Paragraph(new Phrase(12F, \"SALARIO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoSalario.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoDataNascimento = new Paragraph(new Phrase(12F, \"DATA NASCIMENTO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n \n Cell celulaMedicoCrm = new Cell(paragrafoCrm);\n Cell celulaMedicoNome = new Cell(paragrafoNome);\n Cell celulaMedicoEspecialidade = new Cell(paragrafoEspecialidade);\n Cell celulaMedicoSexo = new Cell(paragrafoSexo);\n Cell celulaMedicoSalario = new Cell(paragrafoSalario);\n Cell celulaMedicoDataNascimento = new Cell(paragrafoDataNascimento);\n \n celulaMedicoCrm.setHeader(true);\n tabelaMedicos.addCell(celulaMedicoCrm);\n tabelaMedicos.addCell(celulaMedicoNome);\n tabelaMedicos.addCell(celulaMedicoEspecialidade);\n tabelaMedicos.addCell(celulaMedicoSexo);\n tabelaMedicos.addCell(celulaMedicoSalario);\n tabelaMedicos.addCell(celulaMedicoDataNascimento);\n \n //definindo alinhamento, cores do cabeçalho da tabela\n for (int i = 0; i < tabelaMedicos.getColumns(); i++) {\n\n Cell celula = (Cell) tabelaMedicos.getElement(0, i);\n celula.setHorizontalAlignment(Element.ALIGN_CENTER);\n celula.setBackgroundColor(Color.yellow);\n celula.setBorderColor(Color.black);\n\n }\n \n for(Medico medico : listarTodosMedicos()) {\n paragrafoCrm = new Paragraph(new Phrase(15F, \"\"+ medico.getCRM(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoCrm.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoCrm = new Cell(paragrafoCrm);\n celulaMedicoCrm.setBorderColor(Color.black);\n celulaMedicoCrm.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoCrm);\n \n paragrafoNome = new Paragraph(new Phrase(15F, \"\"+ medico.getNome(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoNome = new Cell(paragrafoNome);\n celulaMedicoNome.setBorderColor(Color.black);\n celulaMedicoNome.setHorizontalAlignment(Element.ALIGN_LEFT);\n tabelaMedicos.addCell(celulaMedicoNome);\n \n paragrafoEspecialidade = new Paragraph(new Phrase(15F, \"\"+ medico.getEspecialidade(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoEspecialidade.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoEspecialidade = new Cell(paragrafoEspecialidade);\n celulaMedicoEspecialidade.setBorderColor(Color.black);\n celulaMedicoEspecialidade.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoEspecialidade);\n \n paragrafoSexo = new Paragraph(new Phrase(15F, \"\"+ medico.getSexo(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoSexo = new Cell(paragrafoSexo);\n celulaMedicoSexo.setBorderColor(Color.black);\n celulaMedicoSexo.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoSexo);\n \n paragrafoSalario = new Paragraph(new Phrase(15F, \"R$ \"+ medico.getSalario(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoSalario.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoSalario = new Cell(paragrafoSalario);\n celulaMedicoSalario.setBorderColor(Color.black);\n celulaMedicoSalario.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoSalario);\n \n paragrafoDataNascimento = new Paragraph(new Phrase(15F, \"\"+ sdf.format(medico.getDataDeNascimento()),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n celulaMedicoDataNascimento = new Cell(paragrafoDataNascimento);\n celulaMedicoDataNascimento.setBorderColor(Color.black);\n celulaMedicoDataNascimento.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaMedicos.addCell(celulaMedicoDataNascimento);\n \n } \n \n documento.add(tabelaMedicos);\n \n Runtime.getRuntime().exec(new String[]{\"cmd.exe\", \"/c\", \"start\", \"relatorioMedico.pdf\"});\n \n documento.close();\n \n } catch (DocumentException ex) {\n System.out.println(ex);\n } catch (FileNotFoundException ex) {\n System.out.println(ex);\n } catch (IOException ex) {\n System.out.println(ex);\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n }", "protected void addTitlePage(Document doc) throws Exception {\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\\n\\n\"));\r\t\t\t\n // data dictionary\n Font font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 22);\n \t\tParagraph prg = new Paragraph(\"Data Dictionary\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // full definition\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 14);\n prg = new Paragraph(\"Definition of\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n // dataset name\n font = FontFactory.getFont(FontFactory.HELVETICA_BOLD, 26);\n prg = new Paragraph(dsName, font);\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// dataset word\n font = FontFactory.getFont(FontFactory.HELVETICA, 14);\n \t\tprg = new Paragraph(\"dataset\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n doc.add(prg);\n \n \t\tdoc.add(new Paragraph(\"\\n\\n\"));\n \t\t\n \t\t// version\n \t\tprg = new Paragraph();\n \t\tprg.add(new Chunk(\"Version: \", font));\n \t\tprg.add(new Chunk(dsVersion, font));\n \t\tprg.setAlignment(Element.ALIGN_CENTER);\n \t\tdoc.add(prg);\n \t\t\n \t\t// date\n \t\t//prg = new Paragraph(getTitlePageDate());\n \t\t//prg.setAlignment(Element.ALIGN_CENTER);\n \t\t//doc.add(prg);\n \n doc.add(new Paragraph(\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"));\n \n // European Environment Agency\n font = FontFactory.getFont(FontFactory.TIMES_BOLD, 12);\n prg = new Paragraph(\"European Environment Agency\", font);\n prg.setAlignment(Element.ALIGN_CENTER);\n \n if (!Util.voidStr(logo)){\n Image img = Image.getInstance(logo);\n img.setAlignment(Image.LEFT);\n \n prg.add(new Chunk(img, 0, 0));\n }\n \n doc.add(prg);\n }", "private void addHeader(Section catPart) throws BadElementException, IOException{\r\n PdfPTable header = new PdfPTable(1);\r\n PdfPCell c = new PdfPCell(Image.getInstance(\"res/brandogredninglogo.png\"));\r\n c.setBackgroundColor(COLOR_BLUE);\r\n //c.setBorderColor(BaseColor.RED);\r\n header.setHeaderRows(0);\r\n header.addCell(c);\r\n header.setWidthPercentage(100.0f);\r\n \r\n catPart.add(header);\r\n }", "public void ReportPdf(Context context, String date, String name, String reportnum, List<EditText> goals, List<EditText> objectives, List<EditText> task,List<EditText> deadline,List<EditText> status ){\n PdfDocument document = new PdfDocument();\n\n // crate a page description\n PdfDocument.PageInfo pageInfo =\n new PdfDocument.PageInfo.Builder(500, 1500, 2).create();\n\n // start a page\n PdfDocument.Page page = document.startPage(pageInfo);\n\n Canvas canvas = page.getCanvas();\n\n Paint paint = new Paint();\n paint.setColor(Color.BLUE);\n canvas.drawText(\"SIMBA EDUCATION\",220,140,paint);\n paint.setColor(Color.BLACK);\n canvas.drawText(\"Report\",10,160,paint);\n canvas.drawText(\"Dated\"+\" :\"+date,10,180,paint);\n canvas.drawText(\"Name\"+\" :\"+name,10,200,paint);\n\n\n //goals label section\n canvas.drawText(\"Goals\",100,240,paint);\n\n //goals Section\n int y0 = 240;\n int y = 0 ;\n\n for (int i = 0 ;i < goals.size() ; i++){\n y = y0+20;\n y0 = y;\n\n canvas.drawText(\"-> \" + goals.get(i).getText().toString(), 10, y, paint);\n\n }\n\n //objectives label section\n canvas.drawText(\"Objectives\",100,y+10,paint);\n\n //objectives Section\n for (int i = 0 ;i < objectives.size() ; i++){\n y0 = y+20;\n y = y0;\n canvas.drawText(\"* -> \" + objectives.get(i).getText().toString(), 10, y0, paint);\n\n }\n\n\n\n //new line code\n\n status.get(0).append(\"\\n\");\n //task label section\n\n\n\n\n for (int i = 0 ;i < 1; i++){\n y = y0+30;\n y0 = y;\n canvas.drawText(\"Task\", 10, y, paint);\n canvas.drawText(\"Deadline\", 150, y, paint);\n canvas.drawText(\"Status\", 280, y, paint);\n\n }\n\n //task section\n\n for (int i = 0 ;i < task.size() ; i++){\n y0 = y+50;\n y = y0;\n\n int x =y0+40;\n int z = x+20;\n z = x;\n\n int q = 20;\n\n\n // canvas.drawText(\"Tasks\",100,y0+10,paint);\n\n canvas.drawText(task.get(i).getText().toString(), 10, y0, paint);\n canvas.drawText(deadline.get(i).getText().toString(),150,y0,paint);\n canvas.drawText(status.get(i).getText().toString(),280,y0,paint);\n\n }\n\n\n\n\n paint.setColor(Color.RED);\n\n canvas.drawText(\"Designed by Kidkudzy \", 220,1460,paint);\n\n\n\n\n\n\n\n\n\n //canvas.drawCircle(50, 50, 30, paint);\n\n document.finishPage(page);\n\n // write the document content\n File folder = new File(Environment.getExternalStorageDirectory() +\n File.separator + \"REPORTit/Reports/\");\n boolean success = true;\n if (!folder.exists()) {\n success = folder.mkdirs();\n }\n if (success) {\n // Do something on success\n } else {\n // Do something else on failure\n }\n //appending cuurent timestamp to my generated file\n\n Date_Operations dateOp = new Date_Operations();\n String currenttime = dateOp.GetCurrentTimeAndDate();\n\n\n\n String targetPdf = \"/sdcard/REPORTit/Reports/Report\"+currenttime+\".pdf\";\n //String targetPdf = \"/sdcard/REPORTit/Reports/Report.pdf\";\n File filePath = new File(targetPdf);\n try {\n document.writeTo(new FileOutputStream(filePath));\n Toast.makeText(context, \"Pdf stored in \\n \" + targetPdf, Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(context, \"Something wrong: \" + e.toString(),\n Toast.LENGTH_LONG).show();\n }\n document.close();\n }", "@Override\r\n public void actionPerformed(ActionEvent slip) {\n if(slip.getSource()==b7)\r\n {\r\n String id=t1.getText();\r\n String bank_name=t3.getText();\r\n String bank_branch=t4.getText();\r\n String acc_no=t5.getText();\r\n String work_day=t6.getText();\r\n String basic=t7.getText();\r\n String home=t8.getText();\r\n String tra=t9.getText();\r\n String pro_tax=t10.getText();\r\n String gross=t11.getText();\r\n String dedu=t12.getText();\r\n String netsal=t13.getText();\r\n String path=\"E:\\\\\";\r\n com.itextpdf.text.Document doc=new com.itextpdf.text.Document();\r\n try\r\n {\r\n PdfWriter.getInstance(doc, new FileOutputStream(path+\"\"+t1.getText()+\"payslip\"+\".pdf\"));\r\n doc.open();\r\n Image img = Image.getInstance(\"D:\\\\prologos\\\\images3.png\");\r\n doc.add(img);\r\n// \r\n Paragraph paragraph1=new Paragraph(\" Pay Slip\",FontFactory.getFont(FontFactory.TIMES_ROMAN,18)); \r\n// \r\n doc.add(paragraph1);\r\n Paragraph paragraph2=new Paragraph(\"\\n ` Date & Time:\\t\"+l18.getText()+\" \"+l19.getText()+\"\\n\",FontFactory.getFont(FontFactory.TIMES_ROMAN,12)); \r\n// \r\n doc.add(paragraph2);\r\n \r\n Paragraph paragraph=new Paragraph(\"-------------------------------------------------------------------------------------------------------------------------------\"); \r\n// \r\n doc.add(paragraph);\r\n Paragraph paragraph3=new Paragraph(\"Employee Id:\\t\"+t1.getText()+\"\\nEmployee Bank Details:\\nBank Name:\\t\"+t3.getText()+\"\\nBank Branch:\\t\"+t4.getText()+\"\\nAccount Number:\\t\"+t5.getText()+\"\\n\\n\");\r\n doc.add(paragraph3);\r\n //PdfPTable ptable=new PdfPTable(2);\r\n// ptable.addCell(\"Description\");\r\n// ptable.addCell(\"Working Days:\");\r\n// ptable.addCell(\"Deductions\");\r\n// doc.add(ptable);\r\n// PdfPCell c1=new PdfPCell(new Phrase(\"Description\"));\r\n// ptable.addCell(c1); \r\n// c1=new PdfPCell(new Phrase(\"Amount\"));\r\n \r\n// Paragraph para=new Paragraph(\"-------------------------------------------------------------------------------------------------------------------------------\"); \r\n//// \r\n// doc.add(para);\r\n Paragraph paragraph4=new Paragraph(\"Salary Details:\\n\\n\",FontFactory.getFont(FontFactory.TIMES_BOLD,15));\r\n doc.add(paragraph4);\r\n// Paragraph paragraph5=new Paragraph(\"Working Days: \"+t6.getText()+\"\\n\\n\");\r\n// doc.add(paragraph5);\r\n// Paragraph paragraph6=new Paragraph(\"Basic Salary: \"+t7.getText()+\"\\n\\n\");\r\n// doc.add(paragraph6);\r\n// Paragraph paragraph7=new Paragraph(\"House Rent Allowance: \"+t8.getText()+\"\\n\\n\");\r\n// doc.add(paragraph7);\r\n// Paragraph paragraph8=new Paragraph(\"Traveling Allowance: \"+t9.getText()+\"\\n\\n\");\r\n// doc.add(paragraph8);\r\n// Paragraph paragraph9=new Paragraph(\"Professional Tax: \"+t10.getText()+\"\\n\\n\");\r\n// doc.add(paragraph9);\r\n// Paragraph paragraph10=new Paragraph(\"Gross Salary: \"+t11.getText()+\"\\n\\n\");\r\n// doc.add(paragraph10);\r\n// Paragraph paragraph11=new Paragraph(\"Deduction: \"+t12.getText()+\"\\n\\n\");\r\n// doc.add(paragraph11);\r\n// Paragraph paragraph12=new Paragraph(\"Net Salary: \"+t13.getText()+\"\\n\\n\\n\");\r\n// doc.add(paragraph12);\r\n \r\n \r\n \r\n \r\n \r\n PdfPTable ptable=new PdfPTable(2);\r\n PdfPCell pcell=new PdfPCell(new Paragraph(\"Description\"));\r\n PdfPCell pcell1=new PdfPCell(new Paragraph(\"Amount\"));\r\n pcell.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n pcell1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n pcell.setFixedHeight(30f);pcell1.setFixedHeight(30f);\r\n ptable.addCell(pcell);\r\n ptable.addCell(pcell1);\r\n \r\n PdfPCell p1=new PdfPCell(new Paragraph(\"Working Days:\"));\r\n PdfPCell p2=new PdfPCell(new Paragraph(\"Basic Salary:\"));\r\n PdfPCell p3=new PdfPCell(new Paragraph(\"House Rent Allowance:\"));\r\n PdfPCell p4=new PdfPCell(new Paragraph(\"Traveling Allowance:\"));\r\n PdfPCell p5=new PdfPCell(new Paragraph(\"Professional Tax:\"));\r\n PdfPCell p6=new PdfPCell(new Paragraph(\"Gross Salary:\"));\r\n PdfPCell p7=new PdfPCell(new Paragraph(\"Deduction:\"));\r\n PdfPCell p8=new PdfPCell(new Paragraph(\"Net Salary:\"));\r\n \r\n \r\n PdfPCell p11=new PdfPCell(new Paragraph(t6.getText()));\r\n PdfPCell p12=new PdfPCell(new Paragraph(t7.getText()));\r\n PdfPCell p13=new PdfPCell(new Paragraph(t8.getText()));\r\n PdfPCell p14=new PdfPCell(new Paragraph(t9.getText()));\r\n PdfPCell p15=new PdfPCell(new Paragraph(t10.getText()));\r\n PdfPCell p16=new PdfPCell(new Paragraph(t11.getText()));\r\n PdfPCell p17=new PdfPCell(new Paragraph(t12.getText()));\r\n PdfPCell p18=new PdfPCell(new Paragraph(t13.getText()));\r\n \r\n \r\n \r\n p1.setFixedHeight(30f);p11.setFixedHeight(30f);\r\n p2.setFixedHeight(30f);p12.setFixedHeight(30f);\r\n p3.setFixedHeight(30f);p13.setFixedHeight(30f);\r\n p4.setFixedHeight(30f);p14.setFixedHeight(30f);\r\n p5.setFixedHeight(30f);p15.setFixedHeight(30f);\r\n p6.setFixedHeight(30f);p16.setFixedHeight(30f);\r\n p7.setFixedHeight(30f);p17.setFixedHeight(30f);\r\n p8.setFixedHeight(30f);p18.setFixedHeight(30f);\r\n \r\n \r\n p11.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p12.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p13.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p14.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p15.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p16.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p17.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n p18.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n \r\n \r\n \r\n \r\n \r\n// ptable.addCell(p1);ptable.addCell(p2);\r\n// pcell.addElement(p1);\r\n// pcell.addElement(p2);\r\n// pcell1.addElement(p3);\r\n// pcell1.addElement(p4);\r\n// pcell.setRowspan(8);\r\n// pcell1.setRowspan(8);\r\n ptable.addCell(p1);ptable.addCell(p11);\r\n \r\n ptable.addCell(p2);ptable.addCell(p12);\r\n ptable.addCell(p3);ptable.addCell(p13);\r\n ptable.addCell(p4);ptable.addCell(p14);\r\n ptable.addCell(p5);ptable.addCell(p15);\r\n ptable.addCell(p6);ptable.addCell(p16);\r\n ptable.addCell(p7);ptable.addCell(p17);\r\n ptable.addCell(p8);ptable.addCell(p18);\r\n \r\n doc.add(ptable);\r\n Paragraph paragraph13=new Paragraph(\"\\n\\n\"+\"Computer Generated Salary Slip.\\nSignature not Required.\",FontFactory.getFont(FontFactory.TIMES_ITALIC,12));\r\n doc.add(paragraph13);\r\n// Font.BOLD\r\n Paragraph para1=new Paragraph(\"\\n\"+\" -------------------------------------------\"); \r\n// \r\n doc.add(para1);\r\n \r\n JOptionPane.showMessageDialog(null, \"Pay Slip Generated\",\"Salary\",JOptionPane.INFORMATION_MESSAGE);\r\n b10.setVisible(true);\r\n }\r\n catch(Exception ee)\r\n {\r\n ee.printStackTrace();\r\n }\r\n doc.close();\r\n }\r\n\r\n }", "private void createPdf()\n {\n Document document = new Document();\n try {\n String path = Environment.getExternalStorageDirectory().getAbsolutePath()+\"/Meal Counter\";\n File directory = new File(path);\n if(!directory.exists())\n directory.mkdir();\n\n File file = new File(directory,sharedPreferenceData.getmyCurrentSession()+\".pdf\");\n reportPath = file.getAbsolutePath();\n FileOutputStream fileOutputStream = new FileOutputStream(file);\n PdfWriter.getInstance(document,fileOutputStream);\n document.setPageSize(PageSize.A4);\n document.open();\n Paragraph paragraph;\n Font smallFont = new Font(Font.FontFamily.TIMES_ROMAN,22.0f,Font.NORMAL, BaseColor.BLACK);\n Font largeFont = new Font(Font.FontFamily.TIMES_ROMAN,30.0f,Font.BOLD, BaseColor.BLACK);\n paragraph = new Paragraph(\"Session : #\"+sharedPreferenceData.getmyCurrentSession()+\"\\n\\n\"+\n \"Total Taka ------ \"+monthlyTaka+\"\\n\"+\n \"Total Meal ------ \"+monthlyMeal+\"\\n\"+\n \"Total Cost ------ \"+monthlyCost+\"\\n\"+\n \"Remain ------ \"+remain+\"\\n\"+\n \"Meal rate ------ \"+mealRate+\"\\n\\n\\n\",largeFont);\n paragraph.setAlignment(Paragraph.ALIGN_CENTER);\n //document.add(paragraph);\n\n float[] columnWidth = {6f,9f,9f,9f,9f,9f};\n PdfPTable table = new PdfPTable(columnWidth);\n table.setWidthPercentage(90f);\n\n insertDataIntoTable(table,\"Serial\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Name\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Taka\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Meal\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Cost\", Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,\"Status\", Element.ALIGN_CENTER,1,smallFont);\n table.setHeaderRows(1);\n\n for(int i=0;i<modelList.size();i++)\n {\n insertDataIntoTable(table,String.valueOf(i+1),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getId(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getTaka(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getName(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getDate(),Element.ALIGN_CENTER,1,smallFont);\n insertDataIntoTable(table,modelList.get(i).getStatus(),Element.ALIGN_CENTER,1,smallFont);\n }\n\n paragraph.add(table);\n document.add(paragraph);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (DocumentException e) {\n e.printStackTrace();\n }finally {\n document.close();\n\n }\n }", "public void gerarRelatorioPaciente() {\n Document documento = new Document(PageSize.A4.rotate());\n \n //Defina as margens\n documento.setMargins(40f, 40f, 150f, 40f);\n \n try {\n CabecalhoRodapeEvento inserircabecalho = new CabecalhoRodapeEvento();\n \n //Cria um arquivo relatorio.pdf com o documento\n PdfWriter.getInstance(documento, new FileOutputStream(\"relatorioPaciente.pdf\")).setPageEvent(inserircabecalho);\n \n documento.open();\n \n Paragraph tituloDoRelatorio = new Paragraph(new Phrase(20F, \"RELATÓRIO DOS PACIENTES CADASTRADOS\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 15F)));\n tituloDoRelatorio.setAlignment(Element.ALIGN_CENTER);\n\n documento.add(tituloDoRelatorio);\n \n Table tabelaPacientes = new Table(7);\n tabelaPacientes.setBorder(10);\n tabelaPacientes.setBorderWidth(2);\n tabelaPacientes.setBorderColor(Color.black);\n tabelaPacientes.setPadding(2);\n //tabelaPacientes.setSpacing(0);\n tabelaPacientes.setWidth(100f);\n tabelaPacientes.setWidths(new float[]{5f, 10f, 25f, 7f, 13f, 28f, 12f});\n \n Paragraph paragrafoId = new Paragraph(new Phrase(12F, \"ID\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoId.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoCpf = new Paragraph(new Phrase(12F, \"CPF\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoCpf.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoNome = new Paragraph(new Phrase(12F, \"NOME\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoSexo = new Paragraph(new Phrase(12F, \"SEXO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoTelefone = new Paragraph(new Phrase(12F, \"TELEFONE\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoTelefone.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoEndereco = new Paragraph(new Phrase(12F, \"ENDEREÇO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoEndereco.setAlignment(Element.ALIGN_CENTER);\n \n Paragraph paragrafoDataNascimento = new Paragraph(new Phrase(12F, \"DATA NASCIMENTO\",\n FontFactory.getFont(FontFactory.HELVETICA_BOLD, 10F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n \n Cell celulaPacienteId = new Cell(paragrafoId);\n Cell celulaPacienteCpf = new Cell(paragrafoCpf);\n Cell celulaPacienteNome = new Cell(paragrafoNome);\n Cell celulaPacienteSexo = new Cell(paragrafoSexo);\n Cell celulaPacienteTelefone = new Cell(paragrafoTelefone);\n Cell celulaPacienteEndereco = new Cell(paragrafoEndereco);\n Cell celulaPacienteDataNascimento = new Cell(paragrafoDataNascimento);\n \n celulaPacienteId.setHeader(true);\n tabelaPacientes.addCell(celulaPacienteId);\n tabelaPacientes.addCell(celulaPacienteCpf);\n tabelaPacientes.addCell(celulaPacienteNome);\n tabelaPacientes.addCell(celulaPacienteSexo);\n tabelaPacientes.addCell(celulaPacienteTelefone);\n tabelaPacientes.addCell(celulaPacienteEndereco);\n tabelaPacientes.addCell(celulaPacienteDataNascimento);\n \n //definindo alinhamento, cores do cabeçalho da tabela\n for (int i = 0; i < tabelaPacientes.getColumns(); i++) {\n\n Cell celula = (Cell) tabelaPacientes.getElement(0, i);\n celula.setHorizontalAlignment(Element.ALIGN_CENTER);\n celula.setBackgroundColor(Color.yellow);\n celula.setBorderColor(Color.black);\n\n }\n \n for(Paciente paciente : listarTodosPacientes()) {\n paragrafoId = new Paragraph(new Phrase(15F, \"\"+ paciente.getId(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoId.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteId = new Cell(paragrafoId);\n celulaPacienteId.setBorderColor(Color.black);\n celulaPacienteId.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteId);\n \n paragrafoCpf = new Paragraph(new Phrase(15F, \"\"+ paciente.getCpf(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoCpf.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteCpf = new Cell(paragrafoCpf);\n celulaPacienteCpf.setBorderColor(Color.black);\n celulaPacienteCpf.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteCpf);\n \n paragrafoNome = new Paragraph(new Phrase(15F, \"\"+ paciente.getNome(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoNome.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteNome = new Cell(paragrafoNome);\n celulaPacienteNome.setBorderColor(Color.black);\n celulaPacienteNome.setHorizontalAlignment(Element.ALIGN_LEFT);\n tabelaPacientes.addCell(celulaPacienteNome);\n \n paragrafoSexo = new Paragraph(new Phrase(15F, \"\"+ paciente.getSexo(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoSexo.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteSexo = new Cell(paragrafoSexo);\n celulaPacienteSexo.setBorderColor(Color.black);\n celulaPacienteSexo.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteSexo);\n \n paragrafoTelefone = new Paragraph(new Phrase(15F, paciente.getTelefone(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoTelefone.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteTelefone = new Cell(paragrafoTelefone);\n celulaPacienteTelefone.setBorderColor(Color.black);\n celulaPacienteTelefone.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteTelefone);\n \n paragrafoEndereco = new Paragraph(new Phrase(15F, paciente.getEndereco(),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoEndereco.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteEndereco = new Cell(paragrafoEndereco);\n celulaPacienteEndereco.setBorderColor(Color.black);\n celulaPacienteEndereco.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteEndereco);\n \n paragrafoDataNascimento = new Paragraph(new Phrase(15F, \"\"+ sdf.format(paciente.getDataDeNascimento()),\n FontFactory.getFont(FontFactory.HELVETICA, 9F)));\n paragrafoDataNascimento.setAlignment(Element.ALIGN_CENTER);\n celulaPacienteDataNascimento = new Cell(paragrafoDataNascimento);\n celulaPacienteDataNascimento.setBorderColor(Color.black);\n celulaPacienteDataNascimento.setHorizontalAlignment(Element.ALIGN_CENTER);\n tabelaPacientes.addCell(celulaPacienteDataNascimento);\n \n } \n \n documento.add(tabelaPacientes);\n \n Runtime.getRuntime().exec(new String[]{\"cmd.exe\", \"/c\", \"start\", \"relatorioPaciente.pdf\"});\n \n documento.close();\n \n } catch (DocumentException ex) {\n System.out.println(ex);\n } catch (FileNotFoundException ex) {\n System.out.println(ex);\n } catch (IOException ex) {\n System.out.println(ex);\n } catch (SQLException ex) {\n System.out.println(ex);\n }\n }", "public static void printLogo() {\n System.out.println(LOGO1);\n System.out.println(LOGO2);\n System.out.println(LOGO3);\n System.out.println(LOGO4);\n System.out.println(LOGO5);\n System.out.println(\"\");\n }", "public static void printOrderTotals() {\r\n System.out.println(\"\");\r\n System.out.println(\"********ORDER TOTALS********\");\r\n System.out.println(\"Total Pizza Sliders Ordered: \" + pizzaOrdered);\r\n System.out.println(\"Total Roast Beef Sliders Ordered: \" + roastOrdered);\r\n System.out.println(\"***************************\");\r\n System.out.println(\"\");\r\n }", "public void manipulatePdf(String dest) throws IOException, SQLException {\n DatabaseConnection connection = new HsqldbConnection(\"filmfestival\");\n\n PdfDocument pdfDoc = new PdfDocument(new PdfWriter(DEST));\n Document doc = new Document(pdfDoc);\n doc.setMargins(54, 36, 36, 36);\n\n HeaderHandler headerHandler = new HeaderHandler();\n pdfDoc.addEventHandler(PdfDocumentEvent.START_PAGE, headerHandler);\n\n WatermarkHandler watermarkHandler = new WatermarkHandler();\n pdfDoc.addEventHandler(PdfDocumentEvent.END_PAGE, watermarkHandler);\n\n template = new PdfFormXObject(new Rectangle(550, 803, 30, 30));\n PdfCanvas canvas = new PdfCanvas(template, pdfDoc);\n\n\n bold = PdfFontFactory.createFont(StandardFonts.HELVETICA_BOLD);\n italic = PdfFontFactory.createFont(StandardFonts.HELVETICA_OBLIQUE);\n normal = PdfFontFactory.createFont(StandardFonts.HELVETICA);\n\n Statement stm = connection.createStatement();\n ResultSet rs = stm.executeQuery(\n \"SELECT country, id FROM film_country ORDER BY country\");\n int d = 1;\n while (rs.next()) {\n headerHandler.setHeader(rs.getString(\"country\"));\n if (1 != d) {\n doc.add(new AreaBreak());\n }\n Set<Movie> movies =\n new TreeSet<>(new MovieComparator(MovieComparator.BY_YEAR));\n movies.addAll(PojoFactory.getMovies(connection, rs.getString(\"id\")));\n for (Movie movie : movies) {\n doc.add(new Paragraph(movie.getMovieTitle()).setFont(bold));\n if (movie.getOriginalTitle() != null)\n doc.add(new Paragraph(movie.getOriginalTitle()).setFont(italic));\n doc.add(new Paragraph(String.format(\"Year: %d; run length: %d minutes\",\n movie.getYear(), movie.getDuration())).setFont(normal));\n doc.add(PojoToElementFactory.getDirectorList(movie));\n }\n d++;\n }\n\n canvas.beginText();\n try {\n canvas.setFontAndSize(PdfFontFactory.createFont(StandardFonts.HELVETICA), 12);\n } catch (IOException e) {\n e.printStackTrace();\n }\n canvas.moveText(550, 803);\n canvas.showText(Integer.toString(pdfDoc.getNumberOfPages()));\n canvas.endText();\n canvas.stroke();\n\n doc.close();\n connection.close();\n }", "public void writePDF(RMPDFWriter aWriter)\n{\n List refs = new ArrayList(getPageCount());\n PDFXTable xref = aWriter.getXRefTable();\n for(int i=0, iMax=getPageCount(); i<iMax; i++)\n refs.add(xref.getRefString(getPage(i)));\n \n // \n _dict.put(\"Kids\", refs);\n _dict.put(\"Count\", getPageCount());\n \n // \n aWriter.writeXRefEntry(_dict);\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 void houseDetailing(PdfContentByte canvas, AstroBean astrobean,ColorElement mycolor, PdfWriter writer ,boolean houseDetail,boolean aspectChartWidoutHouse,boolean aspectScore) {\n\t float width1 = 220;\n float height1 = 110; //old110\n float xCoordinate1 = 80;\n float yCoordinate1 = 160; //old 160\n\t//\tlogger.info(\"aspectChartWidoutHouse>> \"+aspectChartWidoutHouse+\" houseDetail>> \"+houseDetail+\" aspectScore>> \"+aspectScore);\n\t\t try {\n\t\t\tLinkedHashMap<String,HouseDetailBean> signList = astrobean.getHouseSignDetailHashTable();\n\t\t\tLinkedHashMap<String,HouseDetailBean> starList = astrobean.getHouseStarDetailHashTable();\n\t\t\tLinkedHashMap<String,HouseDetailBean> subLordList = astrobean.getHouseSubLordHashTable();\n\t\t\tLinkedHashMap<String,HashSet<String>> aspectList = astrobean.getHouseAspectHashTable();\n\t\t\tLinkedHashMap<String, HashMap<String,HashSet<String>>> occAspList = astrobean.getHouseOccAspectHashTable();\n\t\t\tLinkedHashMap<String,ArrayList<HouseDetailBean>> occupantList = astrobean.getHouseOccupantHashTable();\n\t \t\tLinkedHashMap<String, HashMap<String,String>> cuspHouseAspectDetails= astrobean.getCuspHouseAspectDetails();\n\t\t\tLinkedHashMap<String, HashMap<String,String>> planetHouseAspectDetails= astrobean.getPlanetHouseAspectDetails();\n\t\t\t//By Bharti (version 4.4)\n\t\t\tHashMap<String, Integer> scoreMap = new HashMap<String, Integer>();\n\t\t\tif(aspectScore)\n\t\t\t\tfillAspectScoringMap(scoreMap);\n\t\t\t//ENDS(version 4.4)\n\t\t\tFont font2 = new Font();\n\t\t\tFont font1 = new Font();\n\t\t\tPdfPTable table=null;\n \tFont font=new Font();\n\t\t\tFont fontData=new Font();\n\t//\tfloat width[]=null;\n\t\t\tif(houseDetail || aspectChartWidoutHouse){\n\t\t \t\tthis.document.newPage();\n //bharti canvas.saveState();\n canvas.setLineWidth(3);\n canvas.setRGBColorFill(0xFF, 0xFF, 0xFF);\n\n canvas.rectangle(35, 842 - 750, 530, 690);\n canvas.fillStroke();\n canvas.closePath();\n //by bharti canvas.restoreState();\n\n canvas.setLineWidth(1f);\n\t\t\t//bharti\t canvas.saveState();\n\n // Font font1 = new Font();\n font1.setSize(getHeadingfont());\n\t\t\t\t\tfont1.setColor(mycolor.fillColor(this.getTableDataColor()));\n\n // Font font2 = new Font();\n font2.setSize(getTableHeadingfont());\n font2.setColor(mycolor.fillColor(getTableHeadingColor()));\n\t\t\t\t\tfont2.setSize(12);\n\n\t\tColumnText.showTextAligned(canvas, Element.ALIGN_LEFT,\n new Phrase(astrobean.getName().replaceAll(\"%20\",\" \" ).replaceAll(\"\\\"\",\"\"), font2), 35, 842 - 55, 0);\n\n ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,new Phrase(\"Aspects on Houses\", font1), 290, 842 - 90, 0);\n // PdfPTable table=new PdfPTable(13);\n table=new PdfPTable(13);\n // Font font=new Font();\n // Font fontData=new Font();\n float width[]={30,10,10,10,10,10,10,10,10,10,10,10,10};\n //width[]={30,10,10,10,10,10,10,10,10,10,10,10,10};\n table.setWidths(width);\n\t\tfont.setSize(this.getTableHeadingfont());\n font.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n fontData.setSize(this.getTableDatafont());\n fontData.setColor(mycolor.fillColor(this.getTableDataColor()));\n\t\t table.addCell(new Phrase(new Chunk(\"Planets\",font)));\n\nfor(int i=1;i<=12;i++)\n{\n\ttable.addCell(new Phrase(new Chunk(\"\"+i,font)));\n}\nHashMap<String,String> cuspMap= null;\nfor(int j=0;j<planets.length;j++)\n{\n\tif(!planets[j].equals(\"Ketu\") && !planets[j].equals(\"Rahu\")){\n\t\ttable.addCell(new Phrase(new Chunk(planets[j],font)));\n\t\tfor(int count=1;count<=12;count++)\n\t\t{\n\t\t\tcuspMap=cuspHouseAspectDetails.get(count+\"\");\n\t\t\tif(cuspMap.get(planets[j])!=null){\n\t\t\t\tif(aspectScore){\n\t\t\t\t\tif(scoreMap.get(cuspMap.get(planets[j]))!=null){\n\t\t\t\t\t\tif(scoreMap.get(cuspMap.get(planets[j]))>0)\n\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(+\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\ttable.addCell(new Phrase(new Chunk(\"\",fontData)));\n\t\t\t}\n\t\t}\n\t}\n}\n//version 4.4\n\tint totalScore=0;\nif(aspectScore){\n\ttable.addCell(new Phrase(new Chunk(\"\",fontData)));\t\n\tfor(int count=1;count<=12;count++)\n \t{\n\t\tfor (Map.Entry<String, String> entry : cuspHouseAspectDetails.get(count+\"\").entrySet())\n\t\t{\n\t\t\tif(!entry.getKey().equalsIgnoreCase(\"Ketu\") && !entry.getKey().equalsIgnoreCase(\"Rahu\")) {\n\t\t\t\ttotalScore=totalScore+scoreMap.get(entry.getValue());\n\t\t\t}\n\t\t}\n\t\tif(totalScore>0)\n \t\ttable.addCell(new Phrase(new Chunk(\"+\"+totalScore,fontData)));\n \telse if(totalScore<0) \n \ttable.addCell(new Phrase(new Chunk(\"\"+totalScore,fontData)));\n\t\telse\n\t\t\ttable.addCell(new Phrase(new Chunk(\"N\",fontData)));\n\t\ttotalScore=0;\n\t}\n}\n//ENDS HERE\t\n\ttable.setTotalWidth(510);\n \ttable.writeSelectedRows(0, -1, 50, (842 - 100), writer.getDirectContent());\n\n\n\n\n\n\n\n table=new PdfPTable(10);\n float wi[]={30,10,10,10,10,10,10,10,10,10};\n table.setWidths(wi);\n font.setSize(this.getTableHeadingfont());\n font.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n fontData.setSize(this.getTableDatafont());\n fontData.setColor(mycolor.fillColor(this.getTableDataColor()));\n ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase(\"Aspects on planets\", font1), 290, 842 - 290, 0);\n table.addCell(new Phrase(new Chunk(\"Planets\",font)));\n \n\n \t\tString proPath = Constants.PROPERTIES_PATH;\n \t\tproPath = proPath + \"/kundliHttpserverNew.properties\";\n \t\tHashtable<String, String> properties = ReadPropertyFile.readPropery(proPath);\t\t\t\n\n \t\tFont fontFooter = new Font();\n \t\tfontFooter.setSize(10);\n \t\tfontFooter.setColor(mycolor.fillColor(getTableDataColor()));\n \t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\tnew Phrase(properties.getOrDefault(\"astro.link\", \"Observation\"), fontFooter), 300,\n \t\t\t\t842 - 790, 0);\n \t\t\n \t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\tnew Phrase(properties.getOrDefault(\"astro.observation\", \"Observation\"), fontFooter), 300,\n \t\t\t\t842 - 800, 0);\n\n\n \t\tfor(int i=0;i<planets.length;i++)\n {\n \t\t\ttable.addCell(new Phrase(new Chunk(planets[i],font)));\n\t\t}\n\t\tcuspMap= null;\n\t\tfor(int j=0;j<planets.length;j++)\n\t\t{\n\n\t\t\tif(!planets[j].equals(\"Ketu\") && !planets[j].equals(\"Rahu\")){\n\t\t\t\ttable.addCell(new Phrase(new Chunk(planets[j],font)));\n\t\t\t\tfor(int count=0;count<planets.length;count++)\n\t\t\t\t{\n\t\t\t\t\tcuspMap=planetHouseAspectDetails.get(planets[count]);\n\t\t\t\t\tif(cuspMap.get(planets[j])!=null){\n\t\t\t\t\t\tif(aspectScore){\n\t\t\t\t\t\t\tif(scoreMap.get(cuspMap.get(planets[j]))!=null){\n \t \t\t\tif(scoreMap.get(cuspMap.get(planets[j]))>0)\n \t\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(+\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j])+\"(\"+scoreMap.get(cuspMap.get(planets[j]))+\")\",fontData)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttable.addCell(new Phrase(new Chunk(cuspMap.get(planets[j]),fontData)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n \t\t\t\t\ttable.addCell(new Phrase(new Chunk(\"\",fontData)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//version 4.4 \nif(aspectScore){\n\ttotalScore=0;\n table.addCell(new Phrase(new Chunk(\"\",fontData)));\n for(int count=0;count<planets.length;count++)\n {\n for (Map.Entry<String, String> entry : planetHouseAspectDetails.get(planets[count]).entrySet())\n {\n\t\t\tif(!entry.getKey().equalsIgnoreCase(\"Ketu\") && !entry.getKey().equalsIgnoreCase(\"Rahu\")) {\n \ttotalScore=totalScore+scoreMap.get(entry.getValue());\n\t\t\t}\n }\n\t\tif(totalScore>0)\n \ttable.addCell(new Phrase(new Chunk(\"+\"+totalScore,fontData)));\n \telse if(totalScore<0)\n \ttable.addCell(new Phrase(new Chunk(\"\"+totalScore,fontData)));\n\t\telse\n table.addCell(new Phrase(new Chunk(\"N\",fontData)));\n totalScore=0;\n }\n}\n//ENDS\n table.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 300), writer.getDirectContent());\n\n\n//by bharti canvas.restoreState();\n}//end of aspect/house checking\n\n\t\tif(houseDetail){\n\t\tfor(int i=1;i<=12;i++)\n\t\t{\n \t\tthis.document.newPage();\n\t\t\t //by bharti\t canvas.saveState();\n canvas.setLineWidth(3);\n canvas.setRGBColorFill(0xFF, 0xFF, 0xFF);\n\n canvas.rectangle(35, 842 - 750, 530, 690);\n canvas.fillStroke();\n canvas.closePath();\n //by bharti canvas.restoreState();\n\n canvas.setLineWidth(1f);\n \n \t\t\tString proPath = Constants.PROPERTIES_PATH;\n \t\t\tproPath = proPath + \"/kundliHttpserverNew.properties\";\n \t\t\tHashtable<String, String> properties = ReadPropertyFile.readPropery(proPath);\t\t\t\n \t\t\t\n \t\t\tFont fontFooter = new Font();\n \t\t\tfontFooter.setSize(10);\n \t\t\tfontFooter.setColor(mycolor.fillColor(getTableDataColor()));\n \t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\t\tnew Phrase(properties.getOrDefault(\"astro.link\", \"Observation\"), fontFooter), 300,\n \t\t\t\t\t842 - 790, 0);\n \t\t\t\n \t\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n \t\t\t\t\tnew Phrase(properties.getOrDefault(\"astro.observation\", \"Observation\"), fontFooter), 300,\n \t\t\t\t\t842 - 800, 0);\n\n //bharti canvas.saveState();\n\n // font1 = new Font();\n // font1.setSize(getHeadingfont());\n\n // font2 = new Font();\n // font2.setSize(getTableHeadingfont());\n // font2.setColor(mycolor.fillColor(getTableHeadingColor()));\n ColumnText.showTextAligned(canvas, Element.ALIGN_LEFT,\n new Phrase(astrobean.getName().replaceAll(\"%20\",\" \" ).replaceAll(\"\\\"\",\"\"), font2), 35, 842 - 55, 0);\n\n\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase((i)+\" House Detailing\", font1), 290, 842 - 90, 0);\n\t\ttable=new PdfPTable(5);\n\t\t font=new Font();\n fontData=new Font();\n float wid[]={20,20,20,20,20};\n table.setWidths(wid);\n font.setSize(this.getTableHeadingfont());\n font.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n fontData.setSize(this.getTableDatafont());\n fontData.setColor(mycolor.fillColor(this.getTableDataColor()));\n\n\n // table.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n table.addCell(new Phrase(new Chunk(\"Sign\",font)));\n\n table.addCell(new Phrase(new Chunk(\"Sign Lord\",font)));\n table.addCell(new Phrase(new Chunk(\"NL\",font)));\n table.addCell(new Phrase(new Chunk(\"SL\",font)));\n table.addCell(new Phrase(new Chunk(\"NL(SL)\",font)));\n\n\t\t\ttable.addCell(new Phrase(new Chunk(signList.get(i+\"\").getSignName(),fontData)));\n\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(signList.get(i+\"\").getNLSL(),fontData)));\n\n\t\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 100), writer.getDirectContent());\n\n\t\t\t\t\t\n\t\t\t table=new PdfPTable(5);\n\t\ttable.setWidths(wid);\n\n// table.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n table.addCell(new Phrase(new Chunk(\"Star\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(starList.get(i+\"\").getNLSL(),fontData)));\n\n table.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 130), writer.getDirectContent());\n\n\n table=new PdfPTable(5);\n table.setWidths(wid);\n\n// table.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n table.addCell(new Phrase(new Chunk(\"SubLord\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(subLordList.get(i+\"\").getNLSL(),fontData)));\n\n table.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 160), writer.getDirectContent());\n\n/*\n\t\t canvas.restoreState();\n\t\t this.document.newPage();\n canvas.saveState();\n canvas.setLineWidth(3);\n canvas.setRGBColorFill(0xFF, 0xFF, 0xFF);\n\n canvas.rectangle(35, 842 - 750, 530, 690);\n canvas.fillStroke();\n canvas.closePath();\n canvas.restoreState();\n\n canvas.setLineWidth(1f);\n canvas.saveState();\n\n*/\n\n// ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n // new Phrase(\"Aspects on House\", font1), 290, 842 - 200, 0);\n\n\t table=new PdfPTable(6);\n //table.setWidths(wid);\n\t table.addCell(new Phrase(new Chunk(\"HOUSE\",font)));\n\n table.addCell(new Phrase(new Chunk(\"PLANET\",font)));\n table.addCell(new Phrase(new Chunk(\"HOUSE\",font)));\n table.addCell(new Phrase(new Chunk(\"SIGN\",font)));\n table.addCell(new Phrase(new Chunk(\"DEGREE\",font)));\n table.addCell(new Phrase(new Chunk(\"ASPECT\",font)));\n\t\n\n\t table.addCell(new Phrase(new Chunk(\"\"+i,font)));\n \n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n\t\t\n\n\n\t\tboolean flg=true;\n\t\tIterator iter = aspectList.get(i+\"\").iterator();\n\t\tif(aspectList.get(i+\"\").size()>0)\n\t\t{\twhile(iter.hasNext())\n\t\t\t{\n\n\t\t\t\n\t\t\tString temp[]=((String)iter.next()).split(\"_\");\t\n\n\t\t\tif(flg)\n\t\t\t{\n\t\t\ttable.addCell(new Phrase(new Chunk(temp[0],font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\tflg=false;\n\t\t\t}\n\t\t\tif(!temp[1].equalsIgnoreCase(\"Ketu\") && !temp[1].equalsIgnoreCase(\"Rahu\")){\n\t\t\t table.addCell(new Phrase(new Chunk(\"\",fontData)));\n\n table.addCell(new Phrase(new Chunk(temp[1],fontData)));\n table.addCell(new Phrase(new Chunk(temp[2],fontData)));\n table.addCell(new Phrase(new Chunk(temp[3],fontData)));\n table.addCell(new Phrase(new Chunk(temp[4],fontData)));\n table.addCell(new Phrase(new Chunk(temp[5],fontData)));\n\t\t\t}\n\n\t\t\t}\n\t\t\tflg=true;\n\t\t }\n else\n {\n table.addCell(new Phrase(new Chunk(\"NA\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\tflg=false;\n }\n\n\t\t\tif(flg){\n\t\t ColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase(\"Aspects on House\", font1), 290, 842 - 210, 0);\n\n\t\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 220), writer.getDirectContent());\n\t\t\t}\n\t table=new PdfPTable(5);\n \t table.setWidths(wid);\n\t table.addCell(new Phrase(new Chunk(\"Occupant\",font)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\titer = occupantList.get(i+\"\").iterator();\n\t\tflg=false;\n\tif(occupantList.get(i+\"\").size()>0)\n\t\t{\n while(iter.hasNext())\n {\n HouseDetailBean bean=(HouseDetailBean)iter.next();\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\n table.addCell(new Phrase(new Chunk(bean.getSS(),fontData)));\n table.addCell(new Phrase(new Chunk(bean.getNL(),fontData)));\n table.addCell(new Phrase(new Chunk(bean.getSL(),fontData)));\n table.addCell(new Phrase(new Chunk(bean.getNLSL(),fontData)));\n\t\t\t\n\n\n }\n\t\tflg=true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tflg=false;\n\t\t}\n\t\t\tif(flg)\n\t\t\t{\n\t\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 380), writer.getDirectContent());\n\t\t\t}\n\n\n\n\n\n\t\t\t table=new PdfPTable(6);\n table.addCell(new Phrase(new Chunk(\"OCUPANT\",font)));\n\n table.addCell(new Phrase(new Chunk(\"PLANET\",font)));\n table.addCell(new Phrase(new Chunk(\"HOUSE\",font)));\n table.addCell(new Phrase(new Chunk(\"SIGN\",font)));\n table.addCell(new Phrase(new Chunk(\"DEGREE\",font)));\n table.addCell(new Phrase(new Chunk(\"ASPECT\",font)));\n\n\n\nint count=0;\n\tfor (Map.Entry<String, HashSet<String>> entry : occAspList.get(i+\"\").entrySet())\n {\n\t\t\n\t\t\t\n\t\t\ttable.addCell(new Phrase(new Chunk(entry.getKey(),fontData)));\n\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\n\n\t\t\tflg=true;\n\t\t\titer = (entry.getValue()).iterator();\n\t\t\t{\n\t\t\tif((entry.getValue()).size()>0)\n\t\t\t{\n\t\t\twhile(iter.hasNext())\n\t\t\t{\t\n \t String temp[]=((String)iter.next()).split(\"_\");\n\t\t\tif(!temp[1].equalsIgnoreCase(\"Ketu\") && !temp[1].equalsIgnoreCase(\"Rahu\") ){\n\t\t\tif(flg)\n\t\t\t{\n\t\t\t\ttable.addCell(new Phrase(new Chunk(temp[0],font)));\n\t\t\t\tflg=false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\ttable.addCell(new Phrase(new Chunk(\"\",font)));\n\t\t\t}\n\t\t//\tif(!temp[1].equalsIgnoreCase(\"Ketu\") && !temp[1].equalsIgnoreCase(\"Rahu\") ){\t\n table.addCell(new Phrase(new Chunk(temp[1],fontData)));\n\n table.addCell(new Phrase(new Chunk(temp[2],fontData)));\n table.addCell(new Phrase(new Chunk(temp[3],fontData)));\n table.addCell(new Phrase(new Chunk(temp[4],fontData)));\n //table.addCell(new Phrase(new Chunk(aspectList.get(i+\"\").get(j).getNLSL(),fontData)));\n table.addCell(new Phrase(new Chunk(temp[5],fontData)));\n\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n }\n\t\t \n else\n {\n\t/* table.addCell(new Phrase(new Chunk(\"NA\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n table.addCell(new Phrase(new Chunk(\"\",font)));\n*/\n }\n\t\t}\n\t}\n\n\t\tif(count>0)\n\t\t{\n\t\tColumnText.showTextAligned(canvas, Element.ALIGN_CENTER,\n new Phrase(\"Aspects on Occupants\", font1), 290, 842 - 440, 0);\n\t\ttable.setTotalWidth(510);\n table.writeSelectedRows(0, -1, 50, (842 - 450), writer.getDirectContent());\n\t\t}\n\n\n\n\n\t//by bharti\t\tcanvas.restoreState();\n\t\t}\n\n}\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n\t}", "protected String elaboraFooter() {\n String testo = A_CAPO;\n boolean nascosta = pref.isBool(FlowCost.USA_DEBUG);\n String cat;\n\n if (usaNote) {\n testo += usaNote();\n }// end of if cycle\n\n if (usaVociCorrelate) {\n testo += usaVociCorrelate();\n }// end of if cycle\n\n testo += LibWiki.setPortale(tagHeadTemplateProgetto);\n cat = tagCategoria;\n cat = nascosta ? LibWiki.setNowiki(cat) : cat;\n testo += cat;\n\n return testo;\n }", "@Override\n\tpublic String formatFooter() {\n\t\treturn \"\\n\";\n\t}", "private void createPdf(String name, String date, String address, String price) {\r\n Calendar calanderInstance = Calendar.getInstance();\r\n SimpleDateFormat currentDate = new SimpleDateFormat(\"MM dd,yyyy\");\r\n String mdate = currentDate.format(calanderInstance.getTime());\r\n String html = \"<!doctype html>\\n\" +\r\n \"<html lang=\\\"en\\\">\\n\" +\r\n \" <head>\\n\" +\r\n \" <title>Title</title>\\n\" +\r\n \" <!-- Required meta tags -->\\n\" +\r\n \" <meta charset=\\\"utf-8\\\">\\n\" +\r\n \" <meta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1, shrink-to-fit=no\\\">\\n\" +\r\n \"\\n\" +\r\n \" <!-- Bootstrap CSS -->\\n\" +\r\n \" <link rel=\\\"stylesheet\\\" href=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css\\\" integrity=\\\"sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T\\\" crossorigin=\\\"anonymous\\\">\\n\" +\r\n \" </head>\\n\" +\r\n \" <body>\\n\" +\r\n \" <div class=\\\"container\\\">\\n\" +\r\n \" <h2 class=\\\" text-center\\\">Invoice</h2>\\n\" +\r\n \" <h5 class=\\\"text-center\\\">Designer Club Order History </h5>\\n\" +\r\n \" <h3 >\" + name + \"</h3>\\n\" +\r\n \" <P>Service Details and shipped status</p>\\n\" +\r\n \" <div class=\\\"container row\\\">\\n\" +\r\n \" <p style=\\\"font-weight:bold; margin-right:10px;\\\">Date:</p><p>\" + mdate + \"</p>\\n\" +\r\n \" </div>\\n\" +\r\n \" <table class=\\\"table table-bordered table-sm table-striped m-10px\\\">\\n\" +\r\n \" <thead class=\\\"thead-inverse\\\">\\n\" +\r\n \" <tr>\\n\" +\r\n \" <th>Order Date</th>\\n\" +\r\n \" <th>Address</th>\\n\" +\r\n \" <th>Shipped Status</th>\\n\" +\r\n \" <th>Shipped Date</th>\\n\" +\r\n \" <th>Payment</th>\\n\" +\r\n \" </tr>\\n\" +\r\n \" </thead>\\n\" +\r\n \" <tbody>\\n\" +\r\n \" <tr>\\n\" +\r\n \" <td>\" + date + \"</td>\\n\" +\r\n \" <td>\" + address + \"</td>\\n\" +\r\n \" <td>\" + shippedStatus + \"</td>\\n\" +\r\n \" <td>\" + shippedDate + \"</td>\\n\" +\r\n \" <td>Cash On delevary</td>\\n\" +\r\n \" </tr>\\n\" +\r\n \" </tbody>\\n\" +\r\n \" </table>\\n\" +\r\n \" \\n\" +\r\n \" <h4 class=\\\"text-right\\\" style=\\\"font-weight:bold;\\\">Total</h4>\\n\" +\r\n \" <h4 class=\\\"text-right\\\">\" + price + \"</h4>\\n\" +\r\n \" \\n\" +\r\n \" </div>\\n\" +\r\n \" <!-- Optional JavaScript -->\\n\" +\r\n \" <!-- jQuery first, then Popper.js, then Bootstrap JS -->\\n\" +\r\n \" <script src=\\\"https://code.jquery.com/jquery-3.3.1.slim.min.js\\\" integrity=\\\"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo\\\" crossorigin=\\\"anonymous\\\"></script>\\n\" +\r\n \" <script src=\\\"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js\\\" integrity=\\\"sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1\\\" crossorigin=\\\"anonymous\\\"></script>\\n\" +\r\n \" <script src=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js\\\" integrity=\\\"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM\\\" crossorigin=\\\"anonymous\\\"></script>\\n\" +\r\n \" </body>\\n\" +\r\n \"</html>\";\r\n webView.loadDataWithBaseURL(null, html, \"text/html\", \"utf-8\", null);\r\n }", "public void createPdf(String dest) throws IOException, DocumentException, XMPException {\n Document document = new Document(PageSize.A4.rotate());\n //PDF/A-3b\n //Create PdfAWriter with the required conformance level\n PdfAWriter writer = PdfAWriter.getInstance(document, new FileOutputStream(dest), PdfAConformanceLevel.ZUGFeRD);\n writer.setPdfVersion(PdfWriter.VERSION_1_7);\n //Create XMP metadata\n writer.createXmpMetadata();\n writer.getXmpWriter().setProperty(PdfAXmpWriter.zugferdSchemaNS, PdfAXmpWriter.zugferdDocumentFileName, \"invoice.xml\");\n //====================\n document.open();\n //PDF/A-3b\n //Set output intents\n ICC_Profile icc = ICC_Profile.getInstance(new FileInputStream(ICC));\n writer.setOutputIntents(\"Custom\", \"\", \"http://www.color.org\", \"sRGB IEC61966-2.1\", icc);\n //===================\n\n Paragraph p = new Paragraph();\n //PDF/A-3b\n //Embed font\n p.setFont(FontFactory.getFont(FONT, BaseFont.WINANSI, BaseFont.EMBEDDED, 20));\n //=============\n Chunk c = new Chunk(\"The quick brown \");\n p.add(c);\n Image i = Image.getInstance(FOX);\n c = new Chunk(i, 0, -24);\n p.add(c);\n c = new Chunk(\" jumps over the lazy \");\n p.add(c);\n i = Image.getInstance(DOG);\n c = new Chunk(i, 0, -24);\n p.add(c);\n document.add(p);\n\n PdfDictionary parameters = new PdfDictionary();\n parameters.put(PdfName.MODDATE, new PdfDate());\n PdfFileSpecification fileSpec = writer.addFileAttachment(\n \"ZUGFeRD invoice\", null, XML,\n \"invoice.xml\", \"application/xml\",\n AFRelationshipValue.Alternative, parameters);\n PdfArray array = new PdfArray();\n array.add(fileSpec.getReference());\n writer.getExtraCatalog().put(PdfName.AF, array);\n\n document.close();\n }", "private static String footer() {\r\n String output = \"\";\r\n\r\n output += \"\\n\\\\end{document}\";\r\n\r\n return output;\r\n }", "public void onEndPage(PdfWriter writer, Document document)\n\t{\n\t\tint pageN = writer.getPageNumber();\n\t\tString text = \"\"+pageN;\n\t\tString separator = \" / \";\n\t\tfloat text_len = bf.getWidthPoint(text, 8);\n\t\tfloat sep_len = bf.getWidthPoint(separator, 8);\n\t\tcb.beginText();\n\t\tcb.setFontAndSize(bf, 8);\n\t\tfloat absMiddle = (document.right()-document.left())/2+document.left();\n\t\tcb.setTextMatrix(absMiddle-text_len-(sep_len/2), 30);\n\t\tcb.showText(text);\n\t\tcb.setTextMatrix( absMiddle-(sep_len/2), 30 );\n\t\tcb.showText(separator);\n\t\tcb.endText();\n\t\tcb.addTemplate(template, absMiddle+(sep_len/2), 30);\n\n\n\t\t// write the headertable\n\t\ttHeader.setTotalWidth(document.right() - document.left());\n\t\ttHeader.writeSelectedRows(0, -1, document.left(), document.getPageSize().height() - 20, cb);\n\t}", "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 }", "public static void main(String args[]) throws IOException {\n\t File file = new File(\"fdpModification.pdf\");\n\t PDDocument document = PDDocument.load(file);\n\n\t //Retrieving the pages of the document\n\t PDPage page = document.getPage(1);\n\t PDPageContentStream contentStream = new PDPageContentStream(document, page);\n\n\t //Begin the Content stream\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 105);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD, 12);\n\t contentStream.drawString(\"bold text\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.setFont(PDType1Font.HELVETICA_OBLIQUE, 12);\n\t contentStream.drawString(\"Italic text and \");\n\t contentStream.setFont(PDType1Font.HELVETICA_BOLD_OBLIQUE, 12);\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.endText();\n\n\t contentStream.setLineWidth(.5f);\n\n\t contentStream.beginText();\n\t contentStream.moveTextPositionByAmount(7, 55);\n\t contentStream.setFont(PDType1Font.HELVETICA, 12);\n\t contentStream.drawString(\"Normal text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"artificially bold text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.moveTextPositionByAmount(0, -25);\n\t contentStream.appendRawCommands(\"1 Tr\\n\");\n\t contentStream.drawString(\"Artificially outlined text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t contentStream.setTextMatrix(1, 0, .2f, 1, 7, 5);\n\t contentStream.drawString(\"Artificially italic text and \");\n\t contentStream.appendRawCommands(\"2 Tr\\n\");\n\t contentStream.drawString(\"bold italic text\");\n\t contentStream.appendRawCommands(\"0 Tr\\n\");\n\t //Setting the font to the Content streamt\n\t contentStream.setFont(PDType1Font.TIMES_ROMAN, 12);\n\n\t //Setting the position for the line\n\t contentStream.newLineAtOffset(0, 0);\n\n //Setting the leading\n contentStream.setLeading(14.5f);\n\n //Setting the position for the line\n contentStream.newLineAtOffset(25, 725);\n\n String text1 = \"This is an example of adding text to a page in the pdf document. we can add as many lines\";\n String text2 = \"as we want like this using the ShowText() method of the ContentStream class\";\n\n //Adding text in the form of string\n contentStream. showText(text1);\n contentStream.newLine();\n contentStream. showText(text2);\n //Ending the content stream\n contentStream.endText();\n\n System.out.println(\"Content added\");\n\n //Closing the content stream\n contentStream.close();\n\n //Saving the document\n document.save(new File(\"newtou.pdf\"));\n\n //Closing the document\n document.close();\n }", "void piede() {\n try {\n\n Cell c;\n c = new Cell();\n set2(c);\n c.setColspan(4);\n datatable.addCell(c);\n c = new Cell(new Phrase(\"Totale \\u20ac \" + Db.formatValuta(totale), new Font(Font.HELVETICA, 8, Font.BOLD)));\n set2(c);\n c.setColspan(2);\n c.setHorizontalAlignment(c.ALIGN_RIGHT);\n datatable.addCell(c);\n document.add(datatable);\n } catch (Exception err) {\n err.printStackTrace();\n javax.swing.JOptionPane.showMessageDialog(null, err.toString());\n }\n }", "public static void updateHeaderFooterText(IBaseSlide master)\n {\n for (IShape shape : master.getShapes())\n {\n if (shape.getPlaceholder() != null)\n {\n if (shape.getPlaceholder().getType() == PlaceholderType.Header)\n {\n ((IAutoShape) shape).getTextFrame().setText(\"HI there new header\");\n }\n }\n }\n }", "@Override\n\tprotected void writeFooter() throws IOException {\n\t}", "public void agregarMetadatos(UploadedFile ArticuloPDF, UploadedFile TablaContenidoPDF, UploadedFile cartaAprobacionPDF) throws IOException, GeneralSecurityException, DocumentException, PathNotFoundException, AccessDeniedException {\n MetodosPDF mpdf = new MetodosPDF();\n String codigoEst = this.pubEstIdentificador.getEstCodigo();\n String codigoFirma = mpdf.codigoFirma(codigoEst);\n codigoFirma = codigoFirma.trim();\n\n String nombreCartaAprob = \"Carta de Aprobacion-\" + codigoFirma;\n String nombrePublicacion = \"\";\n String nombreTablaC = \"Tabla de Contenido-\" + codigoFirma;\n\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"revista\")) {\n nombrePublicacion = this.revista.getRevTituloArticulo();\n\n }\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"congreso\")) {\n nombrePublicacion = this.congreso.getCongTituloPonencia();\n }\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"libro\")) {\n nombrePublicacion = this.libro.getLibTituloLibro();\n\n }\n if (this.pubTipoPublicacion.equalsIgnoreCase(\"capitulo_libro\")) {\n\n nombrePublicacion = this.capituloLibro.getCaplibTituloCapitulo();\n }\n\n\n /*Obtiene la ruta de la ubicacion del servidor donde se almacenaran \n temporalmente los archivos ,para luego subirlos al Gestor Documental OpenKm */\n String realPath = FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/\");\n // String destCartaAprob = realPath + \"WEB-INF\\\\temp\\\\Tabla de Contenido.pdf\";\n String destCartaAprob = realPath + \"WEB-INF\\\\temp\\\\\" + nombreCartaAprob + \".pdf\";\n String destArticulo = realPath + \"WEB-INF\\\\temp\\\\\" + nombrePublicacion + \".pdf\";\n // String destTablaC = realPath + \"WEB-INF\\\\temp\\\\Tabla de Contenido.pdf\";\n String destTablaC = realPath + \"WEB-INF\\\\temp\\\\\" + nombreTablaC + \".pdf\";\n\n\n /* Estampa de Tiempo\n Obtiene el dia y hora actual del servidor para posteriormente adicionarlo\n como Metadato en el documento PDF/A y el Gestor Documental*/\n Date date = new Date();\n DateFormat datehourFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n String estampaTiempo = \"\" + datehourFormat.format(date);\n\n this.setPubFechaRegistro(date);\n\n /* Metodo para almacenar los metadatos de la Carte de Aprobacion , Articulo y Tabla de Contenido \n para almacenarlo en formato PDFA */\n ArrayList<tipoPDF_cargar> subidaArchivos = new ArrayList<>();\n\n /* tipoPDF_cargar cartaAprobacion = new tipoPDF_cargar();\n cartaAprobacion.setNombreArchivo(nombreCartaAprob);\n cartaAprobacion.setRutaArchivo(destCartaAprob);\n cartaAprobacion.setTipoPDF(\"cartaAprobacion\");\n cartaAprobacion.setArchivoIS(cartaAprobacionPDF.getInputstream());\n subidaArchivos.add(cartaAprobacion); */\n if (!cartaAprobacionPDF.getFileName().equalsIgnoreCase(\"\")) {\n tipoPDF_cargar cartaAprobacion = new tipoPDF_cargar();\n cartaAprobacion.setNombreArchivo(nombreCartaAprob);\n cartaAprobacion.setRutaArchivo(destCartaAprob);\n cartaAprobacion.setTipoPDF(\"cartaAprobacion\");\n cartaAprobacion.setArchivoIS(cartaAprobacionPDF.getInputstream());\n subidaArchivos.add(cartaAprobacion);;\n }\n\n if (!ArticuloPDF.getFileName().equalsIgnoreCase(\"\")) {\n tipoPDF_cargar articulo = new tipoPDF_cargar();\n articulo.setNombreArchivo(nombrePublicacion);\n articulo.setRutaArchivo(destArticulo);\n articulo.setTipoPDF(\"tipoPublicacion\");\n articulo.setArchivoIS(ArticuloPDF.getInputstream());\n subidaArchivos.add(articulo);\n }\n if (!TablaContenidoPDF.getFileName().equalsIgnoreCase(\"\")) {\n tipoPDF_cargar tablaContenido = new tipoPDF_cargar();\n tablaContenido.setNombreArchivo(nombreTablaC);\n tablaContenido.setRutaArchivo(destTablaC);\n tablaContenido.setTipoPDF(\"tablaContenido\");\n tablaContenido.setArchivoIS(TablaContenidoPDF.getInputstream());\n subidaArchivos.add(tablaContenido);\n }\n\n CrearPDFA_Metadata(subidaArchivos, estampaTiempo);\n\n String hash = mpdf.obtenerHash(destArticulo);\n\n /* Metodo para almacenar en el Gestor Documental(OPENKM), carta de aprobacion,\n el articulo en formato PDFA y la Tabla de Contenido del Articulo (formato PDFA) */\n // SubirOpenKM(rutasArchivos, nombreArchivos, estampaTiempo, codigoFirma, hash);\n SubirOpenKM(subidaArchivos, estampaTiempo, codigoFirma, hash);\n }", "public float writeHeader() throws IOException\n\t{\n\t\tString [] title = new String[2];\n\t\ttitle[0] = this.getSchoolName();\n\t\ttitle[1] = \"Official High School Transcript\";\n\t\t//PDFTextBox pdfTextBox = this.pdfTextBox;\n\t\tpdfTextBox.setContentStream(contentStream);\n\t\tpdfTextBox.setDocument(document);\n\t\tpdfTextBox.setBoxLeft(LEFT_MARGIN);\n\t\tpdfTextBox.setBoxWidth(RIGHT_MARGIN - LEFT_MARGIN );\n\t\tfloat boxHeight = pdfTextBox.calcBoxHeight(fontHeight, title.length );\n\t\tpdfTextBox.setBoxBottom((float) (TOP_MARGIN - boxHeight - 10) );\n\t\tfloat lastBoxBottom = pdfTextBox.getBoxBottom();\n\t\tpdfTextBox.setFont(font);\n\t\tpdfTextBox.setFontSize(fontHeight);\n\t\tpdfTextBox.setTextLeftMargin(LEFT_TEXT_MARGIN);\n\t\tpdfTextBox.setTextRightMargin(RIGHT_TEXT_MARGIN);\n\t\tpdfTextBox.setData(title);\n\t\tcontentStream = pdfTextBox.drawTextBoxCentered();\n\t\tfloat lastBoxHeight = pdfTextBox.getBoxHeight();\n\t\tSystem.out.println(\"boxHeight=\" + boxHeight);\n\t\tSystem.out.println(\"lastBoxBottom=\" + lastBoxBottom);\n\t\tSystem.out.println(\"lastBoxHeight=\" + lastBoxHeight);\n\t\tfloat lastTextPosition = pdfTextBox.getLastTextPosition();\n\t\tSystem.out.println(\"lastTextPostion=\" + lastTextPosition);\n\t\t\n\t\tthis.fontHeight -= 2;\n\n\t\tTextList textBoxListLeft = new TextList();\n\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 5 * fontHeight + 20, 0, \"Student Information\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 1, \"FULL NAME:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 1, this.getStudentInformation().get(\"name\"));\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 2, \"ADDRESS:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 2, this.getStudentInformation().get(\"address1\"));\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 3, this.getStudentInformation().get(\"address2\"));\n\t\t\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 4, \"PHONE NUMBER:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 4, this.getStudentInformation().get(\"phone\"));\n\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 5, \"EMAIL ADDRESS:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 5, this.getStudentInformation().get(\"email\"));\n\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 6, \"DATE OF BIRTH:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight, 6, this.getStudentInformation().get(\"dob\"));\n\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN, 7, \"PARENT/GUARDIAN:\");\n\t\ttextBoxListLeft.addText(LEFT_TEXT_MARGIN + 10 * fontHeight + 10, 7, this.getStudentInformation().get(\"guardian\"));\n\n\t\ttextBoxListLeft.setNumLines(8);\n\n\t\tfloat leftTextMargin = this.calcLeftTextMargin(fontHeight);\n\t\tTextList textBoxListRight = new TextList();\n\t\ttextBoxListRight.addText(leftTextMargin + 5 * fontHeight + 20, 0, \"School Information\");\n\t\ttextBoxListRight.addText(leftTextMargin, 1, \"NAME:\");\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 1, this.getSchoolInformation().get(\"name\"));\n\n\t\ttextBoxListRight.addText(leftTextMargin, 2, \"ADDRESS:\");\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 2, this.getSchoolInformation().get(\"address1\"));\n\t\t\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 3, this.getSchoolInformation().get(\"address2\"));\n\n\t\ttextBoxListRight.addText(leftTextMargin, 4, \"PHONE NUMBER:\");\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 4, this.getSchoolInformation().get(\"phone\"));\n\n\t\ttextBoxListRight.addText(leftTextMargin, 5, \"EMAIL ADDRESS:\");\n\t\ttextBoxListRight.addText(leftTextMargin + 10 * fontHeight, 5, this.getSchoolInformation().get(\"email\"));\n\n\t\ttextBoxListRight.setNumLines(6);\n\t\tlastBoxBottom = this.drawLeftRightTabbedTextBox(textBoxListLeft, textBoxListRight, fontHeight, lastBoxBottom);\n\t\tSystem.out.println(\"lastBoxBottom=\" + lastBoxBottom);\n\t\t\n\t\t// Draw the title box.\n\t\tString []data = new String[1];\n\t\tdata[0] = \"Academic Record\";\n\n\t\tpdfTextBox.setBoxLeft(LEFT_MARGIN);\n\t\tpdfTextBox.setBoxWidth(RIGHT_MARGIN - LEFT_MARGIN );\n\t\tboxHeight = pdfTextBox.calcBoxHeight(fontHeight, data.length);\n\t\tpdfTextBox.setBoxHeight(boxHeight + 0);\n\t\tboxHeight = pdfTextBox.getBoxHeight();\n\t\tpdfTextBox.setBoxBottom( (float) (lastBoxBottom - boxHeight) );\n\n\t\tlastBoxBottom = pdfTextBox.getBoxBottom();\n\n\t\tpdfTextBox.setTextLeftMargin(LEFT_TEXT_MARGIN);\n\t\tpdfTextBox.setTextRightMargin(RIGHT_TEXT_MARGIN);\n\t\tpdfTextBox.setData(data);\n\t\tcontentStream = pdfTextBox.drawTextBoxCentered();\n\t\tlastBoxBottom = pdfTextBox.getBoxBottom();\n\t\tlastBoxHeight = pdfTextBox.getBoxHeight();\n\t\tlastTextPosition = pdfTextBox.getLastTextPosition();\n\t\t\n\t\treturn lastBoxBottom;\n\t}", "public void printInvoiceInfo() {\r\n\r\n\t\tSystem.out.println(\"\\nBill Summary :\");\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\t\t\tSystem.out.println(invoiceInfo[i].toString());\r\n\t\t}\r\n\t}", "public void onStartPage(PdfWriter writer, Document document) {\r\n\t\tpagenumber++;\r\n\r\n\t\tImage image;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\timage = Image.getInstance(ResourceUtils.getFile(\"classpath:images\"+File.separator+\"cpmis-submission-pdf-hrader.png\").getAbsolutePath());\r\n\t\t\tint indentation = 0;\r\n\t\t\tfloat scaler = ((document.getPageSize().getWidth() - indentation) / image.getWidth()) * 100;\r\n\t\t\timage.scalePercent(scaler);\r\n\t\t\timage.setAbsolutePosition(0, document.getPageSize().getHeight() + document.topMargin() - image.getHeight());\r\n\t\t\tdocument.add(image);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t\tdocument.add(Chunk.NEWLINE);\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void main( String[] args ) throws Exception\n {\n if( args.length != 2 )\n {\n System.out.println(\"Usage: <input pdf> <output file>\");\n }\n else\n {\n \tFile file = new File(\"./\"+args[0]);\n \tPDDocument document = PDDocument.load(file);\n\n \t List<PDPage> documentPages = document.getDocumentCatalog().getAllPages();\n\n \t\n try\n {\n \tPDPage page = documentPages.get(0);\n //document.addPage(page);\n List annotations = page.getAnnotations();\n\n // Setup some basic reusable objects/constants\n // Annotations themselves can only be used once!\n\n float inch = 72;\n PDGamma colourGreen = new PDGamma();\n colourGreen.setG(1);\n PDGamma colourBlue = new PDGamma();\n colourBlue.setB(1);\n\n PDBorderStyleDictionary borderThick = new PDBorderStyleDictionary();\n borderThick.setWidth(inch/12); // 12th inch\n PDBorderStyleDictionary borderThin = new PDBorderStyleDictionary();\n borderThin.setWidth(inch/72); // 1 point\n PDBorderStyleDictionary borderULine = new PDBorderStyleDictionary();\n borderULine.setStyle(PDBorderStyleDictionary.STYLE_UNDERLINE);\n borderULine.setWidth(inch/72); // 1 point\n\n float pw = page.getMediaBox().getUpperRightX();\n float ph = page.getMediaBox().getUpperRightY();\n\n // Add the markup annotation, a highlight to PDFBox text\n PDFont font = PDType1Font.HELVETICA_BOLD;\n PDAnnotationTextMarkup txtMark = new PDAnnotationTextMarkup(PDAnnotationTextMarkup.SUB_TYPE_HIGHLIGHT);\n txtMark.setColour(colourBlue);\n txtMark.setConstantOpacity((float)0.1); // Make the highlight 20% transparent\n\n // Set the rectangle containing the markup\n\n float textWidth = (font.getStringWidth( \"PDFBox\" )/1000) * 18;\n PDRectangle position = new PDRectangle();\n position.setLowerLeftX(inch);\n position.setLowerLeftY( ph-inch-18 );\n position.setUpperRightX(72 + textWidth);\n position.setUpperRightY(ph-inch);\n txtMark.setRectangle(position);\n\n // work out the points forming the four corners of the annotations\n // set out in anti clockwise form (Completely wraps the text)\n // OK, the below doesn't match that description.\n // It's what acrobat 7 does and displays properly!\n float[] quads = new float[8];\n\n quads[0] = position.getLowerLeftX(); // x1\n quads[1] = position.getUpperRightY()-2; // y1\n quads[2] = position.getUpperRightX(); // x2\n quads[3] = quads[1]; // y2\n quads[4] = quads[0]; // x3\n quads[5] = position.getLowerLeftY()-2; // y3\n quads[6] = quads[2]; // x4\n quads[7] = quads[5]; // y5\n\n txtMark.setQuadPoints(quads);\n txtMark.setContents(\"Highlighted since it's important\");\n\n annotations.add(txtMark);\n\n\n \n\n // Now a square annotation\n\n PDAnnotationSquareCircle aSquare =\n new PDAnnotationSquareCircle( PDAnnotationSquareCircle.SUB_TYPE_SQUARE);\n aSquare.setContents(\"Square Annotation\");\n aSquare.setColour(colourGreen); // Outline in red, not setting a fill\n aSquare.setBorderStyle(borderThick);\n aSquare.setConstantOpacity((float)0.1);\n\n // Place the annotation on the page, we'll make this 1\" (72points) square\n // 3.5\" down, 1\" in from the right on the page\n\n position = new PDRectangle(); // Reuse the variable, but note it's a new object!\n position.setLowerLeftX(pw-(2*inch)); // 1\" in from right, 1\" wide\n position.setLowerLeftY(ph-(float)(3.5*inch) - inch); // 1\" height, 3.5\" down\n position.setUpperRightX(pw-inch); // 1\" in from right\n position.setUpperRightY(ph-(float)(3.5*inch)); // 3.5\" down\n aSquare.setRectangle(position);\n\n // add to the annotations on the page\n annotations.add(aSquare);\n\n\n\n document.save(args[1]);\n }\n finally\n {\n document.close();\n }\n }\n }", "private void createCoverTable(Document document, Image img) throws IOException, DocumentException {\n\n //PEI NAME IN BLUE\n Table table = new Table(1);\n table.setBorder(Table.NO_BORDER);\n table.setWidth(100);\n Font font = getFontBig();\n font.setColor(Color.BLUE);\n font.setStyle(Font.BOLD);\n font.setSize(34);\n Cell cell = new Cell(new Paragraph(peiName, font));\n cell.setHorizontalAlignment(Cell.ALIGN_CENTER);\n cell.setVerticalAlignment(Cell.ALIGN_TOP);\n cell.setBorder(Cell.NO_BORDER);\n table.addCell(cell);\n document.add(table);\n\n //PEI ATTRS\n table = new Table(2);\n table.setCellsFitPage(true);\n table.setBorder(Table.NO_BORDER);\n table.setAlignment(Table.ALIGN_LEFT);\n table.setWidth(100);\n table.setWidths(new float[]{150, 300});\n\n font = getFontSmall();\n font.setStyle(Font.BOLD);\n Paragraph p1 = new Paragraph(getMessage(\"pei.version\") + \":\", font);\n p1.setAlignment(Paragraph.ALIGN_LEFT);\n cell = new Cell(p1);\n Paragraph p2 = new Paragraph(version != null ? version : \"\", getFontSmall());\n p2.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p2);\n Paragraph p3 = new Paragraph(getMessage(\"pei.versionDate\") + \":\", font);\n p3.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p3);\n Paragraph p4 = new Paragraph(versionDate != null ? dateFormat.format(versionDate) : \"\", getFontSmall());\n p4.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p4);\n Paragraph p5 = new Paragraph(simulationDate != null ? getMessage(\"pei.simulationDate\") + \":\" : \"\", font);\n p5.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p5);\n Paragraph p6 = new Paragraph(simulationDate != null ? dateFormat.format(simulationDate) : \"\", getFontSmall());\n p6.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p6);\n Paragraph p7 = new Paragraph(getMessage(\"pei.authorName\") + \":\", font);\n p7.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p7);\n Paragraph p8 = new Paragraph(authorName != null ? authorName : \"\", getFontSmall());\n p8.setAlignment(Paragraph.ALIGN_LEFT);\n cell.addElement(p8);\n\n cell.setBackgroundColor(Color.LIGHT_GRAY);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_RIGHT);\n cell.setVerticalAlignment(Element.ALIGN_BOTTOM);\n table.addCell(cell);\n\n if (img != null) {\n if (img.getWidth() > 295) {\n img.scaleAbsoluteWidth(295);\n img.scaleAbsoluteHeight(img.getHeight() / img.getWidth() * 295);\n }\n img.setAlignment(Image.ALIGN_RIGHT);\n Paragraph p = new Paragraph(\" \");\n p.setAlignment(Paragraph.ALIGN_RIGHT);\n cell = new Cell(p);\n cell.setHorizontalAlignment(Cell.ALIGN_RIGHT);\n cell.addElement(img);\n } else {\n cell = new Cell(\" \");\n }\n cell.setBorder(Cell.NO_BORDER);\n\n table.addCell(cell);\n\n document.add(table);\n }", "private void drawReturnPayemntHeader(PdfPTable paymentSectionTable, Locale locale, SubmittedBill submittedBills) {\n PdfPCell paymentSectionBillerCell = new PdfPCell(new Phrase(getBillerName(submittedBills), getFont(RED_COLOR,\n FONT_SIZE_12,\n Font.NORMAL)));\n PdfPCell paymentSectionBillerAamountCell =\n new PdfPCell(new Phrase(getFormattedAmount(submittedBills.getAmount()),\n getFont(RED_COLOR, FONT_SIZE_12, Font.NORMAL)));\n cellAlignment(paymentSectionBillerCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentSectionTable, paymentSectionBillerCell, Rectangle.NO_BORDER, 2, 0);\n\n cellAlignment(paymentSectionBillerAamountCell, Element.ALIGN_RIGHT, GRAY_COLOR, Element.ALIGN_BOTTOM);\n cellAddingToTable(paymentSectionTable, paymentSectionBillerAamountCell, Rectangle.NO_BORDER, 0, 0);\n PdfPCell paymentSectionBillReturnedCell =\n new PdfPCell(new Phrase(getMessage(locale, \"pdf.receipt.fundsReturned\"),\n getFont(null, FONT_SIZE_10, Font.NORMAL)));\n cellAlignment(paymentSectionBillReturnedCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentSectionTable, paymentSectionBillReturnedCell, Rectangle.NO_BORDER, 3, 0);\n }", "protected String getPageFooter()\n {\n if (this.pageFooter == null) {\n String copyright = (this.privateLabel != null)? this.privateLabel.getCopyright() : \"\";\n StringBuffer sb = new StringBuffer();\n sb.append(\"<center>\");\n sb.append(\"<hr><span style='font-size:7pt;'>\" + copyright + \"</span>\");\n sb.append(\"</center>\");\n this.pageFooter = sb.toString();\n }\n return this.pageFooter;\n }", "public void printBill(){\r\n\t\tint numOfItems = ItemsList.size();\r\n\t\tfor(int i = 0;i<numOfItems;i++){\r\n\t\t\tSystem.out.println(\"1\" + ItemsList.get(i).getName() + \"at \" + ItemsList.get(i).getPrice());\r\n\t\t}\r\n\t\tSystem.out.printf(\"Sales Tax: %.2f\\n\", taxTotal);\r\n\t\tSystem.out.println(\"Total: \" + total);\r\n\t}", "private void IdentifyHeaderAndFooter() {\n receipt_Header = receipt_lines.length > 0 ? receipt_lines[0] : null;\n receipt_Footer = receipt_lines.length > 1 ? receipt_lines[receipt_lines.length - 1].split(\" \")[0] : null;\n }", "public static void main(String[] args) throws DocumentException, IOException {\n \t\n// // step 1\n// Document document = new Document();\n \n // step 1: creation of the document with a certain size and certain margins\n Document document = new Document(PageSize.A4, 50, 50, 50, 50);\n \n // step 2: create a writer (we have many type of writer, eg HtmlWriter, PdfWriter)\n PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(RESULT));\n \n /* step 3: BEFORE open the document we add some meta information to the document (that properties can be viewed with adobe reader or right click-properties)\n * they don't appear in the document view\n */\n document.addAuthor(\"Author Test\"); \n document.addSubject(\"This is the result of a Test.\"); \n \n // step 4\n document.open();\n \n //The com.itextpdf.text.Image is used to add images to IText PDF documents\n Image image1 = Image.getInstance(\"src/main/resources/sms.png\");\n document.add(image1);\n \n // step 5\n /*\n access at the content under the new pdf document just created (ie the writer object that i can control/move)\n PdfContentByte is the object that contains the text to write and the content of a page (it offer the methods to add content to a page)\n */\n PdfContentByte canvas = writer.getDirectContentUnder();\n \n //Sets the compression level to be used for streams written by the writer.\n writer.setCompressionLevel(0);\n canvas.saveState(); \n canvas.beginText(); \n //move the writer to tha X,Y position\n canvas.moveText(360, 788); \n canvas.setFontAndSize(BaseFont.createFont(), 12);\n \n Rectangle rectangle = new Rectangle(400, 300);\n rectangle.setBorder(2);\n document.add(rectangle);\n \n /* \n Writes something to the direct content using a convenience method\n A Phrase is a series of Chunks (A Chunk is the smallest significant part of text that can be added to a document)\n \n Conclusion: A chunk is a String with a certain Font ---> A Phrase is a series of Chunk\n Both Chunck and Font has a Font field (but if a Chunk haven't a Font uses the one of the Phrase that own it)\n */\n \n //------- Two modes to set a Phrase: --------\n \n //mode 1) set the phrase directly without a separate chunk object\n Phrase hello = new Phrase(\"Hello World3\");\n document.add(hello);\n \n //mode 2) create before a chunk, adjust it and after assign it to a Phrase(s) \n Chunk chunk2 = new Chunk(\"Setting the Font\", FontFactory.getFont(\"dar-black\"));\n chunk2.setUnderline(0.5f, -1.5f);\n \n Phrase p1 = new Phrase(chunk2);\n document.add(p1); \n \n canvas.showText(\"Hello sms\"); \n canvas.endText(); \n canvas.restoreState(); \n \n document.add(Chunk.NEWLINE);\n \n //i chunk posso aggiungerli solo tramite l'oggetto Document ?\n Chunk chunk = new Chunk(\"I'm a chunk\");\n chunk.setBackground(BaseColor.GRAY, 1f, 0.5f, 1f, 1.5f);\n document.add(chunk);\n \n /*\n * A Paragraph is a series of Chunks and/or Phrases, has the same qualities of a Phrase, but also some additional layout-parameters\n * A paragraph is a sub-section in the document. After each Paragraph a CRLF is added\n */\n Paragraph paragraph = new Paragraph(\"A:\\u00a0\");\n Chunk chunk1 = new Chunk(\"I'm a chunk1\");\n paragraph.add(chunk1);\n paragraph.setAlignment(Element.ALIGN_JUSTIFIED);\n document.add(paragraph);\n \n \n //----- Add a table to the document ------\n \n //A cell in a PdfPTable\n PdfPCell cell;\n \n PdfPTable table = new PdfPTable(2); //in argument vis the number of column\n table.setWidths(new int[]{ 1, 2 }); //the width of the first and second cell. The number of element in the array must be equal at the number of column\n \n table.addCell(\"Name:\");\n cell = new PdfPCell();\n //We can attach event at the cell\n //cell.setCellEvent(new TextFields(1));\n table.addCell(cell);\n \n table.addCell(\"Loginname:\");\n cell = new PdfPCell();\n //cell.setCellEvent(new TextFields(2));\n table.addCell(cell);\n \n table.addCell(\"Password:\");\n cell = new PdfPCell(); \n table.addCell(cell);\n \n table.addCell(\"Reason:\");\n cell = new PdfPCell(); \n cell.setFixedHeight(60);\n table.addCell(cell);\n \n document.add(table);\n \n //add an horizontal line\n LineSeparator ls = new LineSeparator(); \n ls.setLineWidth(0);\n document.add(new Chunk(ls));\n \n Anchor pdfRef = new Anchor(\"http://www.java2s.com\");\n document.add(pdfRef);\n \n // step 5\n document.close();\n }", "private void pdfPaymentMethod(CartReceiptResponse receiptResponse, Document document, Locale locale)\n throws DocumentException, IOException {\n\n LOGGER.debug(\"Entered in 'pdfPaymentMethod' method\");\n Double totalPaymentApplied = 0.0;\n PdfPTable paymentMethodTable = new PdfPTable(2);\n paymentMethodTable.setWidths(new int[]{200, 50});\n PdfPCell paymentMethodBlankSpaceCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n String message = getMessage(locale, \"pdf.receipt.paymentMethod\");\n Font font = getFont(BLACK_COLOR, FONT_SIZE_18, Font.BOLD);\n PdfPCell paymentMethodHeaderCell = new PdfPCell(new Phrase(message, font));\n cellAlignment(paymentMethodHeaderCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodHeaderCell, Rectangle.NO_BORDER, 0, 0);\n\n cellAlignment(paymentMethodBlankSpaceCell, 0, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n cellAlignment(paymentMethodBlankSpaceCell, 0, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n\n FundingSourceResponse[] fundingSources = receiptResponse.getFundingSources();\n\n if (fundingSources.length != 0) {\n for (final FundingSourceResponse aFundingSource1 : fundingSources) {\n if (aFundingSource1 != null) {\n if (aFundingSource1.getType().equalsIgnoreCase(PdfConstants.CREDIT)) {\n LOGGER.debug(\"Entered in to credits section : \" + aFundingSource1.getType());\n creditFundingSection(locale, paymentMethodTable,\n new BigDecimal(getUsedAmountFromFunding(aFundingSource1)));\n cellAlignment(paymentMethodBlankSpaceCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n totalPaymentApplied = totalPaymentApplied + getUsedAmountFromFunding(aFundingSource1);\n }\n }\n }\n for (final FundingSourceResponse aFundingSource : fundingSources) {\n if (aFundingSource instanceof VestaFundingSourceResponse) {\n VestaFundingSourceResponse vestaFundingSourceResponse =\n (VestaFundingSourceResponse) aFundingSource;\n String tenderType = vestaFundingSourceResponse.getTenderType();\n CardBrand cardBrand = vestaFundingSourceResponse.getCardBrand();\n if (tenderType.equalsIgnoreCase(PdfConstants.DEBIT) ||\n tenderType.equalsIgnoreCase(PdfConstants.CREDIT)) {\n PdfPCell cardNumberCell = new PdfPCell(new Phrase(getMessage(locale, \"pdf.receipt.cardPinMsg\",\n getTenderTypeForCard(tenderType,\n locale),\n getCardBrandText(cardBrand,\n locale),\n vestaFundingSourceResponse\n .getCardLast4()),\n getFont(null, FONT_SIZE_12, Font.NORMAL)));\n PdfPCell amountSectionCell = new PdfPCell(new Phrase(getFormattedAmount(new BigDecimal(\n getUsedAmountFromFunding(vestaFundingSourceResponse))),\n getFont(null, FONT_SIZE_12, Font.NORMAL)));\n cellAlignment(cardNumberCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, cardNumberCell, Rectangle.NO_BORDER, 0, 15);\n\n cellAlignment(amountSectionCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, amountSectionCell, Rectangle.NO_BORDER, 0, 0);\n chargedOnSection(locale, paymentMethodTable, paymentMethodBlankSpaceCell, receiptResponse);\n totalPaymentApplied =\n totalPaymentApplied + getUsedAmountFromFunding(vestaFundingSourceResponse);\n continue;\n }\n }\n\n if (aFundingSource != null) {\n if (getCashStatus(aFundingSource.getType())) {\n cashFundingSection(paymentMethodTable, locale, aFundingSource);\n cellAlignment(paymentMethodBlankSpaceCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n totalPaymentApplied = totalPaymentApplied + getUsedAmountFromFunding(aFundingSource);\n }\n }\n }\n } else {\n creditFundingSection(locale, paymentMethodTable, new BigDecimal(0));\n cellAlignment(paymentMethodBlankSpaceCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n totalPaymentApplied = totalPaymentApplied + 0;\n }\n\n\n calculateTotalPayment(locale, paymentMethodTable, totalPaymentApplied);\n cellAlignment(paymentMethodBlankSpaceCell, Element.ALIGN_RIGHT, GRAY_COLOR, 0);\n cellAddingToTable(paymentMethodTable, paymentMethodBlankSpaceCell, Rectangle.NO_BORDER, 2, 0);\n generatedNewCredits(locale, paymentMethodTable, receiptResponse.getCreditsGenerated());\n document.add(paymentMethodTable);\n }", "@Override\r\n\t\tpublic void preCalculation() {\r\n\t\t\tint screenWidth = getWidth();\r\n\t\t\tint screenHeight = getHeight();\r\n\r\n\t\t\tmidWidth = screenWidth / 2 ;\r\n\t\t\tscreenRectWidth = (int)(screenWidth * SCALE_WIDTH_COEFFICIENT);\r\n\t\t\t/***** Calculate screen and board positions and measurements *****/\r\n\r\n\t\t\t/***** Calculate text positions and measurements *****/\r\n\t\t\tint headerRectHeight = (int)((screenHeight * HEADER_HEIGHT_RELATIVE) * SCALE_HEIGHT_COEFFICIENT);\r\n\r\n\t\t\tint subHeaderRectHeight = (int)((screenHeight * SUB_HEADER_HEIGHT_RELATIVE) * SCALE_HEIGHT_COEFFICIENT);\r\n\r\n\t\t\ttextRectHeight = (int)((screenHeight * TEXT_HEIGHT_RELATIVE) * SCALE_HEIGHT_COEFFICIENT);\r\n\r\n\t\t\tint headerHeight = (int) (screenHeight * HEADER_HEIGHT_RELATIVE_POS);\r\n\t\t\tint subHeaderHeight = (int) (screenHeight * SUB_HEADER_HEIGHT_RELATIVE_POS);\r\n\r\n\t\t\ttextHeight = (int) (screenHeight * TEXT_HEIGHT_RELATIVE_POS);\r\n\t\t\t/***** Calculate tile positions and measurements *****/\r\n\r\n\t\t\t/***** Define Paint objects *****/\r\n\t\t\ttextPaint = new Paint();\r\n\t\t\ttextPaint.setColor(Color.RED);\r\n\r\n\t\t\theaderTextPaint = new Paint();\r\n\t\t\theaderTextPaint.setTextSize(Logic_Utils.determineMaxTextSize(currentHeaderToPrint, screenRectWidth, headerRectHeight));\r\n\r\n\t\t\tRect headerBounds = new Rect();\r\n\r\n\t\t\theaderTextPaint.getTextBounds(currentHeaderToPrint, 0, currentHeaderToPrint.length(), headerBounds);\r\n\r\n\t\t\tsubHeaderTextPaint = new Paint();\r\n\t\t\tsubHeaderTextPaint.setTextSize(Logic_Utils.determineMaxTextSize(currentSubHeaderToPrint, screenRectWidth, subHeaderRectHeight));\r\n\r\n\t\t\tRect subHeaderBounds = new Rect();\r\n\r\n\t\t\tsubHeaderTextPaint.getTextBounds(currentSubHeaderToPrint, 0, currentSubHeaderToPrint.length(), subHeaderBounds);\r\n\t\t\t/***** Define Paint objects *****/\r\n\r\n\t\t\t/***** Calculate header positions and measurements *****/\r\n\t\t\theaderTextXpos = midWidth - (headerBounds.width() / 2);\r\n\t\t\theaderTextYpos = headerHeight;\r\n\t\t\t/***** Calculate header positions and measurements *****/\r\n\r\n\t\t\t/***** Calculate sub header positions and measurements *****/\r\n\t\t\tsubHeaderTextXpos = midWidth - (subHeaderBounds.width() / 2);\r\n\t\t\tsubHeaderTextYpos = subHeaderHeight;\r\n\t\t\t/***** Calculate sub header positions and measurements *****/\r\n\r\n\t\t}", "private void addHeaderItems(final List<ItemBO> itemList)\n\t{\n\t\tif (itemList != null && (!itemList.isEmpty()))\n\t\t{\n\t\t\tfinal List<Integer> lineNumbersList = new ArrayList<Integer>(itemList.size());\n\t\t\tfinal List<ItemBO> headerItemsList = new ArrayList<ItemBO>();\n\t\t\tint processOrderLineNumber = 1;\n\t\t\tfor (final ItemBO anItem : itemList)\n\t\t\t{\n\t\t\t\tlineNumbersList.add(anItem.getLineNumber());\n\t\t\t\tif (ExternalSystem.EVRST == anItem.getExternalSystem())\n\t\t\t\t{\n\t\t\t\t\t//Header ItemBO for current ECC Item\n\t\t\t\t\tfinal ItemBO anHeader = new PartBO();\n\t\t\t\t\tanHeader.setDisplayPartNumber(anItem.getDisplayPartNumber());\n\t\t\t\t\tanHeader.setPartNumber(anItem.getPartNumber());\n\t\t\t\t\tanHeader.setComment(\"This is The Header Record :: \" + anItem.getPartNumber());\n\t\t\t\t\tanHeader.setInventory(anItem.getInventory());\n\t\t\t\t\tanHeader.setRequestedInventory(anItem.getRequestedInventory());\n\t\t\t\t\tanHeader.setScacCode(anItem.getScacCode());\n\t\t\t\t\tanHeader.setCarrierCode(anItem.getCarrierCode());\n\t\t\t\t\tanHeader.setShippingMethodCode(anItem.getShippingMethodCode());\n\t\t\t\t\tanHeader.setTransportationMethodCode(anItem.getTransportationMethodCode());\n\t\t\t\t\t((PartBO) anHeader).setHeader(true);\n\t\t\t\t\t((PartBO) anHeader).setProcessOrderLineNumber(processOrderLineNumber);\n\n\t\t\t\t\tanHeader.setItemQty(anItem.getItemQty());\n\t\t\t\t\tanHeader.setExternalSystem(ExternalSystem.EVRST);\n\n\t\t\t\t\t//Make Sure Actual Item also has the same ProcessOrderLineNumber\n\t\t\t\t\tanItem.setProcessOrderLineNumber(processOrderLineNumber);\n\n\t\t\t\t\theaderItemsList.add(anHeader);\n\t\t\t\t\tprocessOrderLineNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!headerItemsList.isEmpty())\n\t\t\t{\n\t\t\t\t//Find the Highest line number\n\t\t\t\tArrays.sort(lineNumbersList.toArray());\n\t\t\t\tint itemLineNumber = lineNumbersList.get(lineNumbersList.size() - 1);\n\t\t\t\tfor (final ItemBO headerItem : headerItemsList)\n\t\t\t\t{\n\t\t\t\t\theaderItem.setLineNumber(++itemLineNumber);\n\t\t\t\t}\n\t\t\t\t//Make Sure the Header Items are inserted first - Enforced by ECC RFC\n\t\t\t\titemList.addAll(0, headerItemsList);\n\t\t\t\tlogger.debug(\"addHeaderItems(...): Added Header Items for ECC Items \" + headerItemsList.size());\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void body() {\n\t\t\n\t\ttotalGeral = new BigDecimal(0.00);\n\t\ttotalVendivel = new BigDecimal(0.00);\n\t\tgastosCount = 0;\n\t\t\n\t\topenEl(\"table\", null, true);\n\t\t\n\t\taddHeader();\n\t\t\n\t\topenEl(\"tbody\", null, true);\n\t\t\n\t\tCursor cursor = new GastoDatabaseHandler().\n\t\t\t\tcreateCursorRelatorio(db, dataInicial, dataFinal, plataforma, apenasVendiveis, apenasPlataformasAtivas);\n\t\tif (cursor != null) {\n\t\t\ttry {\n\t\t\t\tif (cursor.moveToFirst()) {\n\t\t\t\t\t\n\t\t\t\t\taddGastos(cursor);\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\topenEl(\"tr\");\n\t\t\t\t\t\n\t\t\t\t\tMap<String, String> attrs = new HashMap<>();\n\t\t\t\t\tattrs.put(\"class\", \"center\");\n\t\t\t\t\tattrs.put(\"colspan\", \"6\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tappendEl(\"td\", getString(R.string.info_nenhum_gasto_encontrado), attrs);\n\t\t\t\t\t\n\t\t\t\t\tcloseEl(\"tr\", true);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tcursor.close();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (gastosCount > 0) {\n\t\t\taddTotais();\n\t\t}\n\t\t\n\t\tcloseEl(\"tbody\", true);\n\t\t\t\t\n\t\tcloseEl(\"table\", true);\n\t}", "public void savingsWithdrawReceipPrint(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.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 Withdrawal ***\");\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(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal 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(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).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();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "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 }", "public static void main(String[] args) throws IOException, FileNotFoundException {\n\t\t\n\t\t\n\t\tString regex = \"[0-9]+\";\n\t\tString data = \"1313\";\n\t\tSystem.out.println(data.matches(regex));\n\t\tString regex1 = \"[0-9]+\";\n\t\tString data1 = \" 112121 sdf \";\n\t\tSystem.out.println(data1.matches(regex1));\n\t\tString []arr = data1.split(\"\\\\s\"); \n\t\tSystem.out.println(arr.length);\n\t\tSystem.out.println(data1.replaceAll(\"\\\\s+\", \" \").trim());\n\t\t\n\t\t\n\t\t/*\n\t\tFile f=new File(\"D:\\\\april.pdf\");\n\t FileInputStream fileIn;\n\t PdfReader reader;\n\t try {\n\t fileIn=new FileInputStream(f);\n\t reader=new PdfReader(fileIn);\n\t HashMap<String, String> merged=reader.getInfo();\n\t // ByteArrayInputStream bIn=new ByteArrayInputStream(merged);\n\t //BufferedReader bR=new BufferedReader(new InputStreamReader(bIn));\n\t //String line;\n\t //while ((line=bR.readLine()) != null) {\n\t //System.out.println(line);\n\t //}\n\t reader.close();\n\t fileIn.close();\n\t }\n\t catch ( IOException e) {\n\t System.err.println(\"Couldn't read file '\" );\n\t System.err.println(e);\n\t }*/\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\tfloat width = 612;\n\t\tfloat height = 792;\n\t\tfloat hX = 320, tX = 340, cX = 100;\n\t\tfloat hY = 0, tY = 580, cY = 200;\n\t\tfloat hW = width - hX, tW = width - tX, cW = 100;\n\t\tfloat hH = 80, tH = height - tY, cH = 60;\n\t\tRectangle header = new Rectangle( 150, 150);\n\t\t//\t\tRectangle totals = new Rectangle(cH, cH, cH, cH);\n\t\t//totals.setBounds(tX, tY, tW, tH);\n\t\t//Rectangle customer = new Rectangle();\n\t\t//customer.setBounds(cX, cY, cW, cH);\n\t\tPDFTextStripperByArea stripper = new PDFTextStripperByArea();\n\t\t//stripper.\n\t\t//stripper.addRegion(\"totals\", totals);\n\t\t//stripper.addRegion(\"customer\", customer);\n\t\tstripper.setSortByPosition(true);\n\t\tint j = 0;\n\t\tList pages = pd.getDocumentCatalog().getAllPages();\n\t\tfor (PDPage page : pages) {\n\t\t\tstripper.extractRegions(page);\n\t\t\tList regions = stripper.getRegions();\n\t\t\tfor (String region : regions) {\n\t\t\t\tString text = stripper.getTextForRegion(region);\n\t\t\t\tSystem.out.println(\"Region: \" + region + \" on Page \" + j);\n\t\t\t\tSystem.out.println(\"\\tText: \\n\" + text);\n\t\t\t}\n\t\t\tj++;\n\t\t}*/\n\t}", "public static void main(String[] args) throws Exception {\n PdfDocument doc = new PdfDocument();\r\n //Set margin\r\n PdfUnitConvertor unitCvtr = new PdfUnitConvertor();\r\n PdfMargins margin = new PdfMargins();\r\n margin.setTop(unitCvtr.convertUnits(2.54f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setBottom(margin.getTop());\r\n margin.setLeft(unitCvtr.convertUnits(3.17f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setRight(margin.getLeft());\r\n\r\n drawCover(doc.getSections().add(), margin);\r\n drawContent(doc.getSections().add(), margin);\r\n drawPageNumber(doc.getSections().get(1), margin, 1, doc.getSections().get(1).getCount());\r\n\r\n //Save pdf file.\r\n doc.saveToFile(\"output/pagination.pdf\");\r\n doc.close();\r\n }", "@Override\n\tprotected void buildPdfDocument(Map<String, Object> model, Document document, PdfWriter writer,\n\t\t\tHttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tSystem.out.println(\"At PDFBuilder\");\n // List<Item> itemDisplayList = (List<Item>) model.get(\"itemList\");\n \n document.add(new Paragraph(\"Items Available\"));\n \n PdfPTable table = new PdfPTable(5);\n table.setWidthPercentage(100.0f);\n table.setWidths(new float[] {3.0f, 2.0f, 2.0f, 2.0f, 1.0f});\n table.setSpacingBefore(10);\n \n \n // define font for table header row\n Font font = FontFactory.getFont(FontFactory.HELVETICA);\n font.setColor(BaseColor.WHITE);\n \n // define table header cell\n PdfPCell cell = new PdfPCell();\n cell.setBackgroundColor(BaseColor.BLUE);\n cell.setPadding(5);\n \n /* for (Item aItem : itemDisplayList) {\n \ttable.addCell(String.valueOf(aItem.getId()));\n table.addCell(aItem.getItem_name());\n }\n */\n System.out.println(\"At PDFBuilder2\");\n document.add(table);\n\t}", "public void buildSectionOne(Document document) throws DocumentException, IOException, JSONException {\n PdfPTable titleTable = new PdfPTable ( 1 );\n titleTable.setWidthPercentage ( 100 );\n\n // Strategy\n titleTable.addCell ( ReportTemplate.getSectionHeaderCell ( \"Featured Strategy: \" + selectedStrategy ) );\n\n /**\n * @changed - Abhishek\n * @date - 11-02-2016\n * @desc - Applied format of $xxx,xxx\n */\n // Estimate Income\n titleTable.addCell ( ReportTemplate.getSectionSubHeaderCellWithBoxBorder ( \"Estimated Income: $\" + estimatedIncome ) );\n\n document.add ( titleTable );\n\n // Add Charts Now\n PdfPTable contentTable = new PdfPTable ( 2 );\n contentTable.setWidthPercentage ( 100 );\n\n // Create 3d Pie Chart Section\n PdfPCell pieChartSectionCell = ReportTemplate.getBoxBorderCell ();\n pieChartSectionCell.addElement ( getPieChartSection () );\n contentTable.addCell ( pieChartSectionCell );\n\n // Create Bar Chart Section\n PdfPCell barChartSectionCell = ReportTemplate.getBoxBorderCell ();\n barChartSectionCell.addElement ( getResourceManagementTable () );\n contentTable.addCell ( barChartSectionCell );\n document.add ( contentTable );\n //document.newPage();\n\n PdfPTable contentTable2 = new PdfPTable ( 2 );\n contentTable2.setWidthPercentage ( 100 );\n\n // Add Risk Management Section\n PdfPCell riskManagementSectionCell = ReportTemplate.getBoxBorderWithoutLeftPaddingCell ();\n riskManagementSectionCell.addElement ( getRiskManagementTable () );\n contentTable2.addCell ( riskManagementSectionCell );\n\n // Add Conservation Management Section\n\n Paragraph conservationParagraph = new Paragraph ();\n\n conservationParagraph.add ( new Chunk ( \"Conservation Management\\n\\n\", ReportTemplate.TIMESROMAN_12_BOLD ) );\n conservationParagraph.add ( new Chunk ( \"Conservation Goals\\n\", ReportTemplate.TIMESROMAN_10_NORMAL) );\n /**\n * @changed - Abhishek\n * @date - 12-12-2015\n * @updated - 11-01-2016\n */\n ReportDataPage1.ConservationPracticeBean conservationBean = reportDataPage1.getLandUnderConservationPractice ();\n\n /**\n * @changed - Abhishek\n * @updated - 11-01-2016\n */\n conservationParagraph.add ( new Chunk ( AgricultureStandardUtils.doubleWithOneDecimal( Double.parseDouble (conservationBean.getProfitFromConservation () ) ) + \" % Est. Income under conservation practices\\n\" +\n AgricultureStandardUtils.doubleWithOneDecimal( Double.parseDouble (conservationBean.getLandUnderConservation () ) ) + \" % Acreage under conservation practices\", ReportTemplate.TIMESROMAN_10_NORMAL ) );\n\n PdfPCell conservationManagementSectionCell = ReportTemplate.getBoxBorderWithoutLeftPaddingCell ();\n conservationManagementSectionCell.addElement ( conservationParagraph );\n contentTable2.addCell ( conservationManagementSectionCell );\n\n contentTable2.setKeepTogether(true);\n document.add ( contentTable2 );\n\n\n /*getIncomeUnderConservationPractice(farmInfoView);*/\n\n }", "public void act() \n {\n setImage(new GreenfootImage(\"== Total Pembayaran ==\",50,Color.yellow,Color.black));\n }", "private Graphics buildPage(Graphics g, double width, double height, int page) {\n \t\t\n \t\tCalendar cal = GregorianCalendar.getInstance();\n \t\tcal.setTime(d);\n \t\t\n \t\tFont bigFont = new Font(\"Monospaced\", Font.BOLD, 20);\n \t\tFont smallFont = new Font(\"Monospaced\", Font.PLAIN, 9);\n \t\tFont medFont = new Font(\"Monospaced\", Font.PLAIN, 14);\n \t\t\n \t\tGraphics2D g2d = (Graphics2D) g;\n \t\tRectangle2D.Double rect = new Rectangle2D.Double ();\n \t\tdouble startx = Constants.PRINT_MARGINX;\n \t\tdouble starty = Constants.PRINT_MARGINY;\n \t\trect.setRect (startx, starty, width, 50);\n \t\tg2d.draw(rect);\n \t\tg2d.setFont(bigFont);\n \t\tString heading;\n \t\tint month = cal.get(Calendar.MONTH);\n \t\tif (month == 0) heading = \"January \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 1) heading = \"February \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 2) heading = \"March \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 3) heading = \"April \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 4) heading = \"May \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 5) heading = \"June \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 6) heading = \"July \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 7) heading = \"August \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 8) heading = \"September \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 9) heading = \"October \" + cal.get(Calendar.YEAR);\n \t\telse if (month == 10) heading = \"November \" + cal.get(Calendar.YEAR);\n \t\telse heading = \"December \" + cal.get(Calendar.YEAR);\n \t\t\n \t\tFontMetrics f = g2d.getFontMetrics();\n \t\tint offsetx = (int)(width / 2.0 - f.charWidth(' ') * (heading.length() / 2.0));\n \t\tg2d.drawString(heading, (int)startx + offsetx, (int)starty + f.getHeight());\n \t\t\n \t\tstarty += 50;\n \t\t\n \t\tdouble blockWidth = width / 7;\n \t\tdouble blockHeight = (height-100) / 6;\n \t\tg2d.setFont(medFont);\n \t\tf = g2d.getFontMetrics();\n \t\t\n \t\tfor (int i = 0; i < 7; i++) {\n \t\t\trect = new Rectangle2D.Double ();\n \t\t\trect.setRect (startx, starty, blockWidth, 50);\n \t\t\tg2d.draw(rect);\n \t\t\tif (i == 0) heading = \"Sunday\";\n \t\t\telse if (i == 1) heading = \"Monday\";\n \t\t\telse if (i == 2) heading = \"Tuesday\";\n \t\t\telse if (i == 3) heading = \"Wednesday\";\n \t\t\telse if (i == 4) heading = \"Thursday\";\n \t\t\telse if (i == 5) heading = \"Friday\";\n \t\t\telse heading = \"Saturday\";\n \t\t\tg2d.drawString(heading, (int)startx + 5, (int)starty + f.getHeight());\n \t\t\tstartx += blockWidth;\n \t\t}\n \t\t\n \t\tstartx = Constants.PRINT_MARGINX;\n \t\tstarty += 50;\n \t\t\n \t\tg2d.setFont(smallFont);\n \t\tf = g2d.getFontMetrics();\n \t\t\n \t\t//GregorianCalendar cal = new GregorianCalendar();\n \t\t//cal.set(Calendar.DATE, 1);\n \t\t//cal.set(Calendar.MONTH, d.getMonth() - 1);\n \t\t//cal.set(Calendar.YEAR, d.getYear());\n \t\t\n \t\tint prevDays = cal.get(Calendar.DAY_OF_WEEK) - 1; \n \t\tint endDays = 42 - cal.getActualMaximum(Calendar.DAY_OF_MONTH) - prevDays;\n \t\t\n \t\tcal.roll(Calendar.MONTH, false);\n \t\t\n \t\tint rowCount = 0;\n \t\t\n \t\tfor (int i = 1; i <= prevDays; i++) {\n \t\t\t//Date date = new Date(cal.get(Calendar.MONTH) + 1, cal.getActualMaximum(Calendar.DAY_OF_MONTH) - prevDays + i, cal.get(Calendar.YEAR));\n \t\t\trect = new Rectangle2D.Double ();\n \t\t\trect.setRect (startx, starty, blockWidth, blockHeight);\n \t\t\tg2d.draw(rect);\n \t\t\t//g2d.drawString(date.toFormalString(), (int)startx + 5, (int)starty + f.getHeight());\n \t\t\tstartx += blockWidth;\n \t\t\trowCount++;\n \t\t}\n \t\t\n \t\tcal.roll(Calendar.MONTH, true);\n \t\t\n \t\t\n \t\tfor (int i = 1; i <= cal.getActualMaximum(Calendar.DAY_OF_MONTH); i++) {\n \t\t\tCalendar c = new GregorianCalendar(cal.get(Calendar.MONTH), i, cal.get(Calendar.YEAR));\n \t\t\tDate date = new Date(c.getTime().getTime());\n \t\t\t\n \t\t\t//Date date = new Date(d.getMonth(), i, d.getYear());\n \t\t\trect = new Rectangle2D.Double ();\n \t\t\trect.setRect (startx, starty, blockWidth, blockHeight);\n \t\t\tg2d.draw(rect);\n \t\t\tint offset = 1;\n \t\t\tg2d.drawString(date.toString(), (int)startx + 5, (int)starty + offset * f.getHeight());\n \t\t\toffset++;\n \t\t\t\n \t\t\tDayDto loadedDay = DataServiceImpl.GLOBAL_DATA_INSTANCE.getOrCreateDay(date);\n \t\t\tSchedulePractitionerDto scheduled = new SchedulePractitionerDto();\n \t\t\tscheduled.setField(SchedulePractitionerDto.DATE, loadedDay);\n \t\t\t\n \t\t\t\n \t\t\tif (loadedDay != null && scheduled.getAppointments() != null) {\n \t\t\t\tfor (AppointmentDto appt : scheduled.getAppointments()) {\n \t\t\t\t\t\n \t\t\t\t\t\t\n \t\t\t\t\tPractitionerDto p = DataServiceImpl.GLOBAL_DATA_INSTANCE.getPractitioner(appt.getPractSchedID());\n \t\t\t\t\tString s = p.getTypeName();\n \t\t\t\t\t//if (room.isFull()) s = \"*\" + s;\n \t\t\t\t\tg2d.drawString(formatString(s), (int)startx + 5, (int)starty + offset * f.getHeight());\n \t\t\t\t\toffset++;\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t\n \t\t\tstartx += blockWidth;\n \t\t\trowCount++;\n \t\t\tif (rowCount >= 7) {\n \t\t\t\trowCount = 0;\n \t\t\t\tstartx = Constants.PRINT_MARGINX;\n \t\t\t\tstarty += blockHeight;\n \t\t\t}\n \t\t}\n \t\t\n \t\tcal.roll(Calendar.MONTH, true);\n \t\t\n \t\tfor (int i = 1; i <= endDays; i++) {\n \t\t\t//Date date = new Date(cal.get(Calendar.MONTH) + 1, i, cal.get(Calendar.YEAR));\n \t\t\trect = new Rectangle2D.Double ();\n \t\t\trect.setRect (startx, starty, blockWidth, blockHeight);\n \t\t\tg2d.draw(rect);\n \t\t\t//g2d.drawString(date.toFormalString(), (int)startx + 5, (int)starty + f.getHeight());\n \t\t\tstartx += blockWidth;\n \t\t\trowCount++;\n \t\t\tif (rowCount >= 7) {\n \t\t\t\trowCount = 0;\n \t\t\t\tstartx = Constants.PRINT_MARGINX;\n \t\t\t\tstarty += blockHeight;\n \t\t\t}\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\treturn g;\n \t}", "public void PDFProduct() throws FileNotFoundException, DocumentException {\n\t\t\n\t\tProductBLL productBLL = new ProductBLL();\n\t\t\n\t\tDocument document = new Document();\n\t\t\n\t\tString fileName = \"Product-report\" + countProductReports + \".pdf\";\n\t\tcountProductReports++;\n\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\n\t\tdocument.open();//open document\n\n\t\t//create paragraph\n\t\tParagraph intro = new Paragraph(\"Product Report\");\n\t\tParagraph space = new Paragraph(\" \");\n\t\tPdfPTable table = new PdfPTable(4);\n\n\t\t//create a cell\n\t\tPdfPCell c1 = new PdfPCell(new Paragraph(\"Id\"));\n\t\tPdfPCell c2 = new PdfPCell(new Paragraph(\"Name\"));\n\t\tPdfPCell c3 = new PdfPCell(new Paragraph(\"Quantity\"));\n\t\tPdfPCell c4 = new PdfPCell(new Paragraph(\"Price\"));\n\n\t\t//add the cells to the table\n\t\ttable.addCell(c1);\n\t\ttable.addCell(c2);\n\t\ttable.addCell(c3);\n\t\ttable.addCell(c4);\n\n\t\tfor(Product p: productBLL.findAll()) {\n\t\t\tc1 = new PdfPCell(new Paragraph(String.valueOf(p.getId())));\n\t\t\tc2 = new PdfPCell(new Paragraph(p.getName()));\n\t\t\tc3 = new PdfPCell(new Paragraph(String.valueOf(p.getQuantity())));\n\t\t\tc4 = new PdfPCell(new Paragraph(String.valueOf(p.getPrice())));\n\n\t\t\ttable.addCell(c1);\n\t\t\ttable.addCell(c2);\n\t\t\ttable.addCell(c3);\n\t\t\ttable.addCell(c4);\n\n\t\t}\n\n\t\t//add the objects to the document\n\t\tdocument.add(intro);\n\t\tdocument.add(space);\n\t\tdocument.add(space);\n\t\tdocument.add(space);\n\t\tdocument.add(table);\n\n\t\tdocument.close();\n\t}", "@Override\n protected String elaboraFooterCategorie() {\n String text = CostBio.VUOTO;\n\n text += A_CAPO;\n text += LibWiki.setRigaCat(\"Liste di persone per cognome| \");\n text += LibWiki.setRigaCat(\"Progetto Antroponimi|Cognomi\");\n\n return text;\n }", "public void PDFOrderError() throws FileNotFoundException, DocumentException {\n\t\t\n\t\tDate d = new Date();\n\n\t\tDocument document = new Document();\n\t\t\n\t\tString fileName = \"Order-error\" + countErrorReports + \".pdf\";\n\t\tcountErrorReports++;\n\t\tPdfWriter.getInstance(document, new FileOutputStream(fileName));\n\t\t\n\t\tdocument.open();//open document\n\n\t\t//create paragraph\n\t\tParagraph intro = new Paragraph(\"Under Stock\");\n\t\tParagraph space = new Paragraph(\" \");\n\t\tParagraph date = new Paragraph(d.toString());\n\t\tParagraph text = new Paragraph(\"We are sorry, the products are out of stock! Please, come back later!\");\n\t\t\n\n\t\t//add the objects to the document\n\t\tdocument.add(intro);\n\t\tdocument.add(space);\n\t\tdocument.add(date);\n\t\tdocument.add(space);\n\t\tdocument.add(text);\n\n\t\tdocument.close();\n\t}", "public void write(List<List<String>> imageLinesList) throws IOException {\n\t\ttry (var doc = new Document(new PdfDocument(new PdfWriter(RESULT_PDF_NAME)))) {\n\t\t\tdoc.setMargins(MARGIN, MARGIN, MARGIN, MARGIN);\n\t\t\tdoc.setFont(PdfFontFactory.createFont(FONT_TYPE));\n\t\t\tdoc.setFontSize(FONT_SIZE);\n\t\t\tfor (var imageTextList : imageLinesList) {\n\t\t\t\tfor (var text : imageTextList) {\n\t\t\t\t\tdoc.add(new Paragraph(text));\n\t\t\t\t}\n\t\t\t\tif (imageLinesList.indexOf(imageTextList) < imageLinesList.size() - 1) {\n\t\t\t\t\tdoc.add(new AreaBreak());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void addRecordFooter()\n {\n addIndent();\n openEndTag(RECORD);\n closeTag();\n }", "private void pdfReceiptIdSection(final CartReceiptResponse receiptResponse, final Document document, Locale locale)\n throws DocumentException, IOException {\n\n LOGGER.debug(\"pdfReceiptIdSection(HttpServletRequest,HttpServletResponse,ResourceBundle)\" + receiptResponse);\n\n\t\t/* Payment Receipt Title code snippet Start */\n PdfPTable receiptHeaderTextTable = new PdfPTable(4);\n String message = getMessage(locale, \"pdf.receipt.receipt_title\");\n Font font = getFont(WHITE_COLOR, FONT_SIZE_18, Font.BOLD);\n PdfPCell receiptTextCell = new PdfPCell(new Phrase(message, font));\n cellAlignment(receiptTextCell, Element.ALIGN_CENTER, WHITE_COLOR, 0);\n cellAddingToTable(receiptHeaderTextTable, receiptTextCell, Rectangle.LEFT | Rectangle.RIGHT, 4, 0);\n document.add(receiptHeaderTextTable);\n PdfPCell headerBlankSpaceCell1 = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n\n PdfPTable receiptTable = new PdfPTable(2);\n\n cellAlignment(headerBlankSpaceCell1, 0, \"\", 0);\n cellAddingToTable(receiptTable, headerBlankSpaceCell1, Rectangle.LEFT | Rectangle.RIGHT, 2, 0);\n PdfPCell receiptNumberCell;\n String receiptNumberMessage = getMessage(locale, \"pdf.receipt.receipt_number\"\n , Long.toString(receiptResponse.getCartId()));\n Font boldFont = getFont(WHITE_COLOR, FONT_SIZE_12, Font.BOLD);\n receiptNumberCell = new PdfPCell(new Phrase(receiptNumberMessage, boldFont));\n\n\t\t/* PDF receipt Id section starts */\n cellAlignment(receiptNumberCell, Element.ALIGN_CENTER, WHITE_COLOR, 0);\n cellAddingToTable(receiptTable, receiptNumberCell, Rectangle.LEFT | Rectangle.RIGHT, 2, 0);\n /* PDF receipt Id section Ends */\n\n\t\t/* Blank Space Start */\n PdfPCell headerBlankSpaceCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n cellAlignment(headerBlankSpaceCell, 0, WHITE_COLOR, 0);\n cellAddingToTable(receiptTable, headerBlankSpaceCell, Rectangle.LEFT | Rectangle.RIGHT | Rectangle.BOTTOM, 2,\n 0);\n /* End Blank Space */\n\n\t\t/* Adding Complete structure to document */\n document.add(receiptTable);\n document.add(new Paragraph(\" \"));\n LOGGER.debug(\"End pdfReceiptIdSection(HttpServletRequest,HttpServletResponse,ResourceBundle)\");\n }", "public static void createReportICD10(String title, String date) {\n try {\n Document document = new Document(PageSize.A5.rotate());\n PdfWriter.getInstance(document, new FileOutputStream(title));\n document.open();\n addMetaDataICD10(document);\n addTitleICD10(document, date);\n addDataICD10(document, date);\n addFooterICD10(document);\n document.close();\n\n PrintTest2.print3(title);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n JFileChooser f = new JFileChooser();\n f.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n f.showSaveDialog(null);\n\n //System.out.println(f.getCurrentDirectory());\n \n \n String destinationFolder = f.getSelectedFile().toString();\n \n //check if OS is Windows, Linux or Mac and change file path\n String operatingSystem = System.getProperty(\"os.name\").toLowerCase();\n char c = operatingSystem.charAt(0);\n String FILE = \"\";\n if (c == 'w') {\n \tFILE = destinationFolder + \"\\\\FirstPdf.pdf\";\n } else {\n \tFILE = destinationFolder + \"/FirstPdf.pdf\";\n }\n \n\n\n try {\n Document document = new Document();\n PdfWriter.getInstance(document, new FileOutputStream(FILE));\n\n //create new font for the unicode symbols\n //font is in fonts folder\n BaseFont baseFont = BaseFont.createFont(\"fonts/arialuni.ttf\", BaseFont.IDENTITY_H, true);\n Font fontRed = new Font(baseFont, 18, Font.BOLD, BaseColor.RED);\n Font fontBlack = new Font(baseFont, 18, Font.BOLD, BaseColor.BLACK);\n document.open();\n\n //create table with 4 columns\n PdfPTable table = new PdfPTable(4);\n\n //create table header row\n PdfPCell c1 = new PdfPCell(new Phrase(\"Hearts\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n\n c1 = new PdfPCell(new Phrase(\"Diamonds\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n\n c1 = new PdfPCell(new Phrase(\"Clubs\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n\n c1 = new PdfPCell(new Phrase(\"Spades\"));\n c1.setBorder(Rectangle.NO_BORDER);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n table.addCell(c1);\n table.setHeaderRows(1);\n\n\n //cards symbols and suites\n String[] cards = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\", \"A\"};\n String[] symbols = {\"\\u2665\", \"\\u2666\", \"\\u2663\", \"\\u2660\"};\n\n for (int i = 0; i < 13; i++) {\n for (int j = 0; j < 4; j++) {\n //fill cards, first two cards - red, other two - black\n if ( j < 2) {\n c1 = new PdfPCell(new Phrase(cards[i] + symbols[j], fontRed));\n } else {\n c1 = new PdfPCell(new Phrase(cards[i] + symbols[j], fontBlack));\n }\n c1.setVerticalAlignment(Element.ALIGN_MIDDLE);\n c1.setHorizontalAlignment(Element.ALIGN_CENTER);\n c1.setBackgroundColor(BaseColor.LIGHT_GRAY);\n c1.setBorderColor(BaseColor.WHITE);\n c1.setFixedHeight(150);\n\n c1.setBorderWidth(20);\n table.addCell(c1);\n table.setHorizontalAlignment(Element.ALIGN_CENTER);\n }\n }\n\n document.add(table);\n\n document.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n System.out.println(\"You can find your file at: \" + FILE);\n }", "private void generatorder_complete (MInvoice invoice)\r\n\t {\r\n\r\n\t\t trx.commit();\r\n\r\n\t\t // Switch Tabs\r\n\t\t tabbedPane.setSelectedIndex(1);\r\n\t\t //\r\n\t\t iTextInOutGenerated = new StringBuffer();\r\n\t\t iTextInOutGenerated.append(\"<br><br>\")\r\n\t\t .append(\"<b>NOTA DE CREDITO No. \")\r\n\t\t .append(invoice.getDocumentNo())\r\n\t\t .append(\"</b><br><br>\");\r\n\t\t MInvoiceLine[] fromLines = invoice.getLines();\r\n\t\t for (int i = 0; i < fromLines.length; i++)\r\n\t\t {\r\n\t\t\t MInvoiceLine line = fromLines[i];\r\n\t\t\t iTextInOutGenerated.append(line.getQtyInvoiced().setScale(2, BigDecimal.ROUND_HALF_UP));\t\t\t\t\r\n\t\t\t iTextInOutGenerated.append(\" \");\r\n\t\t\t iTextInOutGenerated.append(MUOM.get(Env.getCtx(), line.getC_UOM_ID()).getName());\r\n\t\t\t iTextInOutGenerated.append(\" \");\r\n\t\t\t iTextInOutGenerated.append(line.getName());\r\n\t\t\t iTextInOutGenerated.append(\" \");\r\n\t\t\t iTextInOutGenerated.append(line.getLineNetAmt().setScale(2, BigDecimal.ROUND_HALF_UP));\r\n\t\t\t iTextInOutGenerated.append(\"<br>\");\r\n\t\t }\r\n\t\t info.setText(iTextInOutGenerated.toString());\r\n\r\n\t\t //\tGet results\r\n\t }", "public void generarTotal(){\n\n\t\tfloat total = 0;\n\n\t\tfor (int con = 0; con < modelo.getRowCount(); con++) {\n\n\t\t\ttotal += (float) tabla.getValueAt(con, 3);\n\t\t\t\n\t\t}\n\n\t\tcampoTotal.setText(formato.format(total));\n\n\t\tlimpiarCampos();\n\n\t}", "@Override\r\n\tpublic boolean writeDocument(Collection<IDataHandler> datas, Document document, PdfWriter writer,\r\n\t\t\tProgressBarFrame pBFrame) throws Exception {\n\t\tdocument.open();\r\n\t\t\r\n\t\t// Creation de la BaseFfont par defaut\r\n\t BaseFont basefont = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252, BaseFont.EMBEDDED);\r\n\t\t// Creation de la Font concrete\r\n\t Font baseConcreteFont = new Font (basefont, 12, Font.NORMAL);\r\n\t \r\n\t\t// On creer un Iterator pour les donnees\r\n\t\tIterator<IDataHandler> datasIterator = datas.iterator();\r\n\t\t\r\n\t\t// On obtient le progres courant de la ProgressBar\r\n\t\tint counter = pBFrame.getProgress();\r\n\t\t\r\n\t\t// On definit le nombre d'increment pour la ProgressBar en fonction du nombre de donnee et de son degre d'avancement prealable\r\n\t\tint progressIncrement = ProgressBarFrame.MY_MAXIMUM - counter / datas.size();\r\n\t\t\r\n\t\t// On itere sur les parties\r\n\t\twhile (datasIterator.hasNext()) {\r\n\t\t\t\r\n\t\t\t// La partie courante\r\n\t\t\tIDataHandler currentDataPart = datasIterator.next();\r\n\t\t\t// L'iterator sur les donnees de la partie courante\r\n\t\t\tIterator<Collection<Object>> currentPartIter = currentDataPart.getDataStorage().iterator();\r\n\t\t\t\r\n\t\t\t// L'Iterator sur les types de donnees\r\n\t\t\tIterator<Object> datasTypeIter = currentPartIter.next().iterator();\r\n\t\t\t// L'Iterator sur les donnes\r\n\t\t\tIterator<Object> datasIter = currentPartIter.next().iterator();\r\n\t\t\t\r\n\t\t\t// On creer un paragraphe\r\n\t\t\tParagraph para = new Paragraph();\r\n\t\t\t\r\n\t\t\t// On ajoute le titre du paragraphe\r\n\t\t\tpara.add(new Phrase(currentDataPart.getPartTitle(), baseConcreteFont));\r\n\t\t\t// On ajoute une nouvelle ligne\r\n\t\t\tpara.add(Chunk.NEWLINE);\r\n\t\t\t\r\n\t\t\t// Tous ce qui releve des tableaux est une tentative de mise en page a l'aide de tableau mais c'est un echec\r\n\t\t\t// On cree un tableau a 2 colonnes : titre donnee\r\n\t\t\t//PdfPTable table = new PdfPTable(2);\r\n\t\t\t// On enleve les bordures (ne fonctionne pas mais bon...)\r\n\t\t\t//table.getDefaultCell().setBorder(Rectangle.NO_BORDER);\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t// On creer des float pour determiner la largeur que doivent prendre les colonnes\r\n\t\t\tfloat[] tableCellsWidths = new float[] {0f, 0f};\r\n\t\t\t\r\n\t\t\t// On creer un tableau de cellules a ajoute a la fin\r\n\t\t\tArrayList<PdfPCell> tableCells = new ArrayList<PdfPCell>();\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\t// On itere sur le type de donne\r\n\t\t\twhile (datasTypeIter.hasNext()) {\r\n\t\t\t\r\n\t\t\t\tswitch ((IDataHandler.DataType)datasTypeIter.next()) {\r\n\t\t\t\t\t// Si c'est une String\r\n\t\t\t\t\tcase STRING:\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On obtient le titre\r\n\t\t\t\t\t\t/*String stringTitle = (String)datasIter.next();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On calcul sa largeur pour la mise en page\r\n\t\t\t\t\t\tfloat titleWidth = baseConcreteFont.getCalculatedBaseFont(true).getWidthPoint(stringTitle, baseConcreteFont.getCalculatedSize()); \r\n\t\t\t\t\t\tif (titleWidth > tableCellsWidths[0]) {\r\n\t\t\t\t\t\t\ttableCellsWidths[0] = titleWidth;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// On ajoute le titre dans la premiere colonne\r\n\t\t\t\t\t\tPdfPCell title = new PdfPCell(new Phrase (stringTitle, baseConcreteFont));\r\n\t\t\t\t\t\t// On enleve les bordures\r\n\t\t\t\t\t\ttitle.setBorder(Rectangle.NO_BORDER);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttableCells.add(title);\r\n\t\r\n\t\t\t\t\t\t// On obtient la donnee correspondante\r\n\t\t\t\t\t\tString stringData = (String)datasIter.next();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On calcul sa largeur pour la mise en page\r\n\t\t\t\t\t\tfloat dataWidth = baseConcreteFont.getCalculatedBaseFont(true).getWidthPoint(stringData, baseConcreteFont.getCalculatedSize()); \r\n\t\t\t\t\t\tif (dataWidth > tableCellsWidths[1]) {\r\n\t\t\t\t\t\t\ttableCellsWidths[1] = dataWidth;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Puis on met la valeur dans la seconde colonne\r\n\t\t\t\t\t\tPdfPCell stringDataCell = new PdfPCell(new Phrase (stringData, baseConcreteFont));\r\n\t\t\t\t\t\t// On enleve les bordures\r\n\t\t\t\t\t\tstringDataCell.setBorder(Rectangle.NO_BORDER);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttableCells.add(stringDataCell);\r\n\t\t\t\t\t\t*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On ajoute le titre de la donnee\r\n\t\t\t\t\t\tpara.add(new Phrase ((String)datasIter.next(), baseConcreteFont));\r\n\t\t\t\t\t\t// Puis on ajoute la donnee\r\n\t\t\t\t\t\tpara.add(new Phrase ((String)datasIter.next(), baseConcreteFont));\r\n\t\t\t\t\t\t// Enfin on ajoute un saut de ligne\r\n\t\t\t\t\t\tpara.add(Chunk.NEWLINE);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t// Si c'est un graphe\r\n\t\t\t\t\tcase JFREECHART :\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On obtient le PdfContentByte du PdfWriter\r\n\t\t\t\t\t\tPdfContentByte contentByte = writer.getDirectContent();\r\n\t\t\t\t\t\t// A partir de ca, on cree un PdfTemplate avec les tailles de l'instance\r\n\t\t\t PdfTemplate template = contentByte.createTemplate(chartWidth, chartHeight);\r\n\t\t\t \r\n\t\t\t // On crer l'objet Graphics2D dans le template qui en prend toute la place\r\n\t\t\t\t\t\tGraphics2D graphics2d = new PdfGraphics2D(template, chartWidth, chartHeight);\r\n\t\t\t \r\n\t\t\t\t\t\t// On crer un Rectangle2D avec la bonne taille\r\n\t\t\t java.awt.geom.Rectangle2D rectangle2d = new java.awt.geom.Rectangle2D.Double(0, 0, chartWidth,\r\n\t\t\t \t\tchartHeight);\r\n\t\t\t \r\n\t\t\t // On obtient le graphe\r\n\t\t\t JFreeChart chart = (JFreeChart) datasIter.next();\r\n\t\t\t // On le dessine dans le rectangle a l'interieur du Graphics2D\r\n\t\t\t chart.draw(graphics2d, rectangle2d);\r\n\t\t\t \r\n\t\t\t // On libere la memoire du Graphics2D\r\n\t\t\t graphics2d.dispose();\r\n\t\t\t \r\n\t\t\t // On obtient un objet Image a partir du template\r\n\t\t\t Image chartImage = Image.getInstance(template);\r\n\t\t\t \r\n\t\t\t // Que l'on peut ajouter normalement dans le Paragraphe\r\n\t\t\t para.add(chartImage);\r\n\t\t\t // Enfin on ajoute un saut de ligne\r\n\t\t\t para.add(Chunk.NEWLINE);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t// Si c'est une Image\r\n\t\t\t\t\tcase IMAGE :\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On obtient l'objet awt.Image (different de IText.Image)\r\n\t\t\t\t\t\tjava.awt.Image image = (java.awt.Image) datasIter.next();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// On le convertit en IText.Image que l'on insere dans le paragraphe\r\n\t\t\t\t\t\tpara.add(Image.getInstance(image, null));\r\n\t\t\t\t\t\tbreak;\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t// Si le type est inconnue, on lance une Exception\r\n\t\t\t\t\t\tthrow new Exception (\"data type not handled\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//para.add(Chunk.NEWLINE);\r\n\t\t\t}\r\n\t\t\t// On definit les largeurs du tableau\r\n\t\t\t/*table.setWidths(tableCellsWidths);\r\n\t\t\t\r\n\t\t\t// On ajoute toutes les cellules\r\n\t\t\tfor (PdfPCell cell : tableCells) {\r\n\t\t\t\ttable.addCell(cell);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Enfin, on ajoute le tableau au paragraphe\r\n\t\t\tpara.add(table);\r\n\t\t\t*/\r\n\t\t\t// S'il y a une suite, on ajoute une nouvelle page\r\n\t\t\tif (datasTypeIter.hasNext()) {\r\n\t\t\t\tpara.add(Chunk.NEWPAGE);\r\n\t\t\t}\r\n\t\t\t// On ajout le paragraphe au document\r\n\t\t\tdocument.add(para);\r\n\t\t\t\r\n\t\t\t// S'il y a eu un ajout de nouvelle page, on indique au Document de prevoir une nouvelle page\r\n\t\t\tif (datasTypeIter.hasNext()) {\r\n\t\t\t\tdocument.newPage();\r\n\t\t\t}\r\n\t\r\n\t\t\t// On met a jour la ProgressBar\r\n\t\t\tcounter += progressIncrement;\r\n\t\t\tpBFrame.updateBar(counter);\r\n\t\t}\r\n\t\t\r\n\t\t// A la fin, on ferme tous les flux\r\n\t\tdocument.close();\r\n\t\twriter.close();\r\n\t\r\n\t\t// Renvoie de réussite\r\n\t\treturn true;\r\n\t}", "private void drawPhotoPage(PdfDocument.Page page, int pagenumber, int nbTypesProcessed, int nbPreviousDrawPhotoPageCallForTheSameType) {\n\n if(nbTypesProcessed<photoToWriteTypes.size()){\n String currentType= photoToWriteTypes.get(nbTypesProcessed);\n\n List<SpacePhoto> allPhotosOfCurrentType= ListOfPhotosSingletonManager.getListOfPhotosByCategoryAndType(category,currentType);\n\n int nbPhotosRemainingToWrite= allPhotosOfCurrentType.size() - nbPreviousDrawPhotoPageCallForTheSameType*6; //If there are previous call of this function for the same type, each call has written 6 photos\n int nbWrittenPhotosInThisCall=0;\n\n Canvas canvas = page.getCanvas();\n\n pagenumber++; // Make sure page numbers start at 1\n\n Paint paint = new Paint();\n paint.setColor(Color.BLACK);\n //Write header of the page\n paint.setTextSize(GeneratedPDFDocumentSizes.SIZE_TEXT_HEADER.getSize());\n canvas.drawText(\n worksiteName,\n GeneratedPDFDocumentSizes.MARGIN_LEFT.getSize(),\n GeneratedPDFDocumentSizes.MARGIN_TOP_HEADER.getSize(),\n paint);\n\n canvas.drawText(\n Integer.toString(pagenumber),\n WriteImagesInPDFTools.calculateXPageNumberHeader(),\n GeneratedPDFDocumentSizes.MARGIN_TOP_HEADER.getSize(),\n paint\n );\n\n paint.setTextSize(GeneratedPDFDocumentSizes.SIZE_TYPE.getSize());\n canvas.drawText(\n currentType,\n GeneratedPDFDocumentSizes.MARGIN_LEFT.getSize(),\n WriteImagesInPDFTools.calculateYType(),\n paint\n );\n\n for (int i=0;i<nbPhotosRemainingToWrite;i++){\n if(nbWrittenPhotosInThisCall<=6){\n SpacePhoto photoWritten = allPhotosOfCurrentType.get(allPhotosOfCurrentType.size()-nbPhotosRemainingToWrite);\n int numberRow = nbWrittenPhotosInThisCall /2;\n int numberColumn = nbWrittenPhotosInThisCall %2;\n paint.setTextSize(GeneratedPDFDocumentSizes.SIZE_PHOTO_NAME.getSize());\n canvas.drawText(\n photoWritten.getTitle(),\n WriteImagesInPDFTools.calculateXColumnOfNamesAndPhotos(pageWidth,numberColumn),\n WriteImagesInPDFTools.calculateYPhotoNamesRowOnPage(pageHeight,numberRow),\n paint\n );\n\n //Define size and place of the image\n Paint p =new Paint();\n int xImage=WriteImagesInPDFTools.calculateXColumnOfNamesAndPhotos(pageWidth,numberColumn);\n int yImage= WriteImagesInPDFTools.calculateYPhotoRowOnPage(pageHeight,numberRow);\n Rect rectDest= new Rect(xImage,yImage,xImage+ WriteImagesInPDFTools.calculatedWidthPhoto(pageWidth),WriteImagesInPDFTools.calculateHeightPhoto(pageHeight));\n if(listMapKeys.contains(photoWritten)){//the photo currently written has an image to draw\n canvas.drawBitmap(bitmaps.get(photoWritten),null,rectDest,p);\n }else {// The photo isn't uploaded, replaced with black rectangle\n p.setColor(Color.BLACK);\n canvas.drawRect(rectDest,p);\n }\n\n nbWrittenPhotosInThisCall++;\n\n }else {\n break;\n }\n\n }\n nbPhotosRemainingToWrite -=nbWrittenPhotosInThisCall;\n\n if(nbPhotosRemainingToWrite==0){\n nbTypesProcessed++;// A whole type of photos is now written, we now write photos from the next category\n }else {\n\n }\n }\n\n }", "public static void printLogo() {\n System.out.println( \" ____ ____ \" + System.lineSeparator()\n + \" | __| | _ \\\\ \" + System.lineSeparator()\n + \" | |__ | | | | \" + System.lineSeparator()\n + \" | __| | | | | \" + System.lineSeparator()\n + \" | |__ | |_| | \" + System.lineSeparator()\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 void generateReceipt(){\n ArrayList<Product> productList = cart.getProductList();\n ArrayList<Float> costsList = cart.getCostsList();\n for (int i=0; i<productList.size(); i++){\n String quantity = \"\"+productList.get(i).getQuantity();\n String name = \"\"+productList.get(i).getName();\n String cost = \"\"+Math.round(costsList.get(i) * 100.0) / 100.0;\n //String cost = \"\"+costsList.get(i);\n \n reciept.addLine(quantity+\" \"+name+\": \"+cost);\n }\n \n reciept.addLine(\"Total Taxes: \"+Math.round(cart.getTotalTax() * 100.0) / 100.0);\n reciept.addLine(\"Total: \"+ Math.round((cart.getTotalTax()+cart.getTotalCost()) * 100.0) / 100.0);\n // print reciept\n }", "stockFilePT102.StockHeaderDocument.StockHeader addNewStockHeader();", "boolean addLineToPoFromBoqDetail(PurchaseOrderHeader purchaseOrderHeader, BoqDetail boqDetail);", "private void addNerves(){\n Vector items = new Vector();\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_MEDIAN_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_MEDIAN_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_CUBITAL_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_CUBITAL_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_SQIATIQUE_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_SQIATIQUE_LEFT\");\n\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_MEDIAN_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_MEDIAN_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_CUBITAL_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_CUBITAL_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_SQIATIQUE_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_SQIATIQUE_LEFT\");\n\n if(verifyList(items)){\n contentTable = new PdfPTable(1);\n table = new PdfPTable(5);\n\n // title\n table.addCell(createItemNameCell(getTran(\"leprosy\",\"nerves\"),2));\n\n // dedicated table\n PdfPTable nervesTable = new PdfPTable(8);\n\n // header\n nervesTable.addCell(emptyCell(2));\n nervesTable.addCell(createHeaderCell(getTran(\"leprosy\",\"median\"),2));\n nervesTable.addCell(createHeaderCell(getTran(\"leprosy\",\"cubital\"),2));\n nervesTable.addCell(createHeaderCell(getTran(\"leprosy\",\"sciatiquepopliteexterne\"),2));\n\n // sub header\n nervesTable.addCell(emptyCell(2));\n nervesTable.addCell(createHeaderCell(getTran(\"web\",\"right\"),1));\n nervesTable.addCell(createHeaderCell(getTran(\"web\",\"left\"),1));\n nervesTable.addCell(createHeaderCell(getTran(\"web\",\"right\"),1));\n nervesTable.addCell(createHeaderCell(getTran(\"web\",\"left\"),1));\n nervesTable.addCell(createHeaderCell(getTran(\"web\",\"right\"),1));\n nervesTable.addCell(createHeaderCell(getTran(\"web\",\"left\"),1));\n\n //***** row 1 : epaissis *****\n cell = createHeaderCell(getTran(\"leprosy\",\"epaissis\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n nervesTable.addCell(cell);\n\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_MEDIAN_RIGHT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_MEDIAN_LEFT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_CUBITAL_RIGHT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_CUBITAL_LEFT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_SQIATIQUE_RIGHT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_EPAISSIS_SQIATIQUE_LEFT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n\n //***** row 2 : douloureux *****\n cell = createHeaderCell(getTran(\"leprosy\",\"douloureux\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n nervesTable.addCell(cell);\n\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_MEDIAN_RIGHT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_MEDIAN_LEFT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_CUBITAL_RIGHT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_CUBITAL_LEFT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_SQIATIQUE_RIGHT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_NERVES_DOULOUREUX_SQIATIQUE_LEFT\");\n nervesTable.addCell(createValueCell((itemValue.length()>0?getTran(\"web\",itemValue).toLowerCase():\"\"),1));\n\n // add nervesTable\n cell = createCell(new PdfPCell(nervesTable),3,PdfPCell.ALIGN_CENTER,PdfPCell.BOX);\n cell.setColspan(5);\n cell.setPadding(3);\n table.addCell(cell);\n\n // add table to transaction\n if(table.size() > 0){\n if(contentTable.size() > 0) contentTable.addCell(emptyCell());\n contentTable.addCell(createCell(new PdfPCell(table),1,PdfPCell.ALIGN_CENTER,PdfPCell.NO_BORDER));\n tranTable.addCell(new PdfPCell(contentTable));\n addTransactionToDoc();\n }\n }\n }", "public void savingsReceipPrintStamp(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);\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\n//p.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 }", "private void generarDocP(){\n generarPdf(this.getNombre());\n }", "public void loanPaymentReceit(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();\np.emphasized(true);\np.underLine(2);\np.newLine();\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(\" *** Loan Repayment Receipt ***\");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Batch Number: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Loan ID: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(11).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(); \np.emphasized(false);\np.setText(\"Loan+Interest: \" +p.underLine(0)+p.underLine(2)+\"UGX\"+receiptDetails.get(6).toString()+\"/=\"+p.underLine(0));\np.newLine();\np.setText(\"Date Taken: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(7).toString()+p.underLine(0));\np.newLine();\np.setText(\"Loan Status: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(14).toString()+p.underLine(0));\np.newLine();\np.setText(\"Payment Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(12).toString()+p.underLine(0));\np.newLine();\np.setText(\"Payment Time: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(13).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(\"***** Payment Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\np.newLine();\np.alignLeft();\np.setText(\"Loan Paid: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(8).toString()+\"/=\"+p.underLine(0));\np.newLine(); \np.alignLeft();\np.setText(\"Loan Balance: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(9).toString()+\"/=\"+p.underLine(0));\np.newLine(); \n//p.alignLeft();\n//p.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);\np.newLine();\n\np.addLineSeperator();\np.doubleStrik(true);\n\np.underLine(2) ;\np.newLine();\np.setText(\"Officer: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(5).toString()+p.underLine(0));\n\np.addLineSeperatorX();\np.newLine();\np.addLineSeperator();\np.newLine();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\np.setText(\"Officer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n\np.addLineSeperator();\n//p.newLine();\np.doubleStrik(true);\np.newLine();\np.underLine(2) ;\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\n//p.newLine();\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\n//p.newLine();\n\n//p.addLineSeperator();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(17).toString());\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }", "private void setBottomCounter() {\n\t\tVBox bottomBox = new VBox();\n\t\tbottomBox.setAlignment(Pos.BOTTOM_CENTER);\n\t\tbottomBox.setPadding(new Insets(10, 10, 10, 10));\n\t\tbottomBox.setSpacing(5);\n\t\t\n\t\tlastProperty = new Text(\"\");\n\t\tlastProperty.setFont(Font.font(\"TimesNewRoman\", FontWeight.BOLD, 24));\n\t\tlastProperty.setFill(Color.GREEN);\n\t\t\n\t\tcounterText = new Text(\"Total number of properties listed: \" + Property.getTotalProperties());\n\t\tcounterText.setFont(Font.font(\"Bauhaus 93\", FontWeight.BOLD, 24));\n\t\tcounterText.setFill(Color.rgb(100, 0, 150));\n\t\t\n\t\t\n\t\tbottomBox.getChildren().addAll(lastProperty, counterText);\n\t\t\n\t\tmainPane.setBottom(bottomBox);\n\t\t\n\t}", "protected void injectEntryFooterXContent(final XContentBuilder builder) throws IOException {}", "private void recalculate()\n {\n this.totalPages = this.contents.size() > 54 ? this.contents.size() / 45 : 1;\n }", "private void drawTotalAmountCell(PdfPTable paymentSectionTable, PdfPCell paymentSectionBlankSpaceCell,\n Locale locale,\n BigDecimal totalBillAmount, BigDecimal totalFeeAmount) {\n PdfPCell totalPaidLabelCell =\n new PdfPCell(new Phrase(getMessage(locale, \"pdf.receipt.totalPaid\"), getFont(null, FONT_SIZE_14\n , Font.BOLD)));\n totalPaidLabelCell.setPaddingBottom(6f);\n PdfPCell totalPaidAmountCell = new PdfPCell(new Phrase(getFormattedAmount(totalBillAmount.add(totalFeeAmount)),\n getFont(null, FONT_SIZE_14, Font.BOLD)));\n totalPaidAmountCell.setPaddingBottom(6f);\n cellAlignment(totalPaidLabelCell, Element.ALIGN_LEFT, WHITE_COLOR, 0);\n cellAddingToTable(paymentSectionTable, totalPaidLabelCell, Rectangle.NO_BORDER, 2, 0);\n\n cellAlignment(totalPaidAmountCell, Element.ALIGN_RIGHT, WHITE_COLOR, 0);\n cellAddingToTable(paymentSectionTable, totalPaidAmountCell, Rectangle.NO_BORDER, 0, 0);\n\n cellAlignment(paymentSectionBlankSpaceCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentSectionTable, paymentSectionBlankSpaceCell, Rectangle.NO_BORDER, 3, 0);\n }", "public void addPage(PDFPage aPage) { _pages.add(aPage); }", "public void preProcessPDF(final Object document) throws IOException, BadElementException, DocumentException {\n\t\tDocument pdf = (Document) document;\n\t\tpdf.open();\n\t\tpdf.setPageSize(PageSize.A4);\n\t\tServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();\n\t\ttry {\n\t\t\tString logo = servletContext.getRealPath(\"\") + File.separator + \"images\" + File.separator + \"school_logo.png\";\n\t\t\tpdf.add(Image.getInstance(logo));\n\t\t} catch (IOException e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\tpdf.addTitle(this.sessionBean.getCurrentBranch().getName());\n\t\tpdf.addHeader(\"Header\", \"Fee collected\");\n\t}", "void reporte(){\n //Variable para abrir el listado automaticamente\n Desktop pc=Desktop.getDesktop();\n //Se crea el documento\n Document doc=new Document();\n try {\n //Se crea el documento PDF\n FileOutputStream pdf=new FileOutputStream(\"ListadoCursos.pdf\");\n //El documento almacena la infomación del pdf.\n PdfWriter.getInstance(doc, pdf);\n \n //Se abre el documento para que se pueda modificar\n doc.open();\n \n //Se crea el título del documento y se configura\n Paragraph titulo=new Paragraph(\"Listado de Cursos\\n\\n\",\n FontFactory.getFont(\"Serif\",22,Font.PLAIN));\n //Se agrega el titulo al documento\n doc.add(titulo);\n \n //Se crea la tabla con la información\n PdfPTable tabla=new PdfPTable(5);\n //Se agregan los titulos a la tabla\n tabla.addCell(\"Codigo\");\n tabla.addCell(\"Nombre\");\n tabla.addCell(\"Creditos\");\n tabla.addCell(\"Alumnos\");\n tabla.addCell(\"Profesor\");\n \n //Se agregan los datos del los profesores\n for (int i = 0; i < datos.cantCur; i++) {\n tabla.addCell(datos.codigoC[i]+\"\");\n tabla.addCell(datos.nombreC[i]);\n tabla.addCell(datos.creditosC[i]+\"\");\n tabla.addCell(datos.alumnosC[i]+\"\");\n //Se busca al profesor\n String profesor=\"\";\n int a=0;\n while(a<datos.cantPro){\n if (datos.codigoPC[i]==datos.codigoP[a]) {\n profesor=datos.nombreP[a]+\" \"+datos.apellidoP[a];\n break;\n }\n a++;\n }\n tabla.addCell(profesor);\n }\n \n //Se agrega la tabla\n doc.add(tabla);\n //Se cierra el documento\n doc.close();\n //El documento creado se pasa a una variable tipo FILE\n File f=new File(\"ListadoCursos.pdf\");\n //Se abre el documento PDF\n pc.open(f);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null,\"Error al crear el pdf\");\n }\n }", "public void printOrder(){\n System.out.println(count);\n \n double price=0;\n for (product object : this.pro_o) {\n System.out.println(object.getName() + \" quantity : \" + object.getQuantity()+\" price : \" + object.getPrice());\n price+=object.getQuantity()*object.getPrice();\n }\n System.out.println(\"total : \" + price );\n }", "public void savingsWithdrawReceipPrintStamp(List receiptDetails,Component c) {\n \np.resetAll();\n\np.initialize();\n\np.feedBack((byte)2);\n\np.color(0);\np.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 Withdrawal ***\");\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(\"Withdrawal Date: \" +p.underLine(0)+p.underLine(2)+receiptDetails.get(10).toString()+p.underLine(0));\np.newLine();\np.setText(\"Withdrawal 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(\"***** Withdrawal Details ***** \");\np.newLine();\np.addLineSeperator();\np.newLine();\n\np.alignLeft();\np.setText(\"Withdrawal Made: \" +p.underLine(0)+p.underLine(2)+\"UGX \"+receiptDetails.get(7).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();\np.underLine(2) ;\np.setText(\"Customer Signiture:\");\np.addLineSeperatorX();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.newLine();\np.setText(\"OFFICE NUMBER: \"+receiptDetails.get(12).toString());\n\np.newLine();\np.addLineSeperatorX();\n//p.newLine();\np.feed((byte)3);\np.finit();\n\nprint.feedPrinter(dbq.printDrivers(c),p.finalCommandSet().getBytes());\n \n\n }" ]
[ "0.6379889", "0.6215215", "0.6004438", "0.5892196", "0.58525664", "0.5833379", "0.579244", "0.5791433", "0.5781398", "0.57684475", "0.5647198", "0.5645389", "0.56175256", "0.558432", "0.55819696", "0.5568007", "0.55610245", "0.55541575", "0.55176556", "0.5503348", "0.54838884", "0.5478248", "0.5477542", "0.5468367", "0.5399678", "0.5393924", "0.5382743", "0.53503525", "0.5332265", "0.53312457", "0.53117615", "0.52885723", "0.5279596", "0.5276282", "0.52697307", "0.52651745", "0.52635974", "0.5234141", "0.5231567", "0.5229711", "0.52239656", "0.5213971", "0.5200823", "0.51867235", "0.51807714", "0.5139525", "0.51336545", "0.51194185", "0.51187086", "0.5098658", "0.50792044", "0.5076438", "0.50643975", "0.50577915", "0.50458586", "0.50388575", "0.5038314", "0.5037199", "0.50361335", "0.50348496", "0.5022658", "0.5016393", "0.50106555", "0.5010444", "0.5009157", "0.49868828", "0.4975754", "0.49695662", "0.49435523", "0.4940173", "0.493344", "0.4928314", "0.49204352", "0.49187395", "0.49153355", "0.49111497", "0.49024466", "0.48981836", "0.48868898", "0.48848626", "0.48818374", "0.48694625", "0.486538", "0.48584554", "0.48559397", "0.4854145", "0.4840667", "0.48402613", "0.48348662", "0.48312476", "0.4828956", "0.48274657", "0.48254076", "0.4824108", "0.48221388", "0.4812517", "0.48125023", "0.48098376", "0.48072383", "0.48018458" ]
0.5886951
4
/ Graphing code Convert the value to onscreen coordinate
public double to(double value) { double factor = (!this.inverse ? value - this.shift : -value + this.shift) * this.zoom; if (this.area != null) { factor += this.direction.getPosition(this.area, this.anchor); } return factor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double convertCoord(double val) {\n return val - 50;\n }", "protected int valueToMarkerPosition(double value) {\n\t\tint v;\n\t\tif (getOrientation() == HORIZONTAL) {\n\t\t\tv = getWidth();\n\t\t} else {\n\t\t\tv = getHeight();\n\t\t}\n\n\t\tint w = (int) ((v - getMarkerLength()) * (value - getScaleStart()) / (getScaleEnd() - getScaleStart()));\n\n\t\tif (w < 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif (w > v - getMarkerLength()) {\n\t\t\treturn v - getMarkerLength();\n\t\t}\n\n\t\treturn w;\n\t}", "public double getPosition(double value) {\n return getRelPosition(value) * (size - nanW - negW - posW) + (min < max ? negW : posW);\n }", "protected double markerPositionToValue(int v) {\n\t\tint w;\n\t\tif (HORIZONTAL == getOrientation()) {\n\t\t\tw = getWidth();\n\t\t} else {\n\t\t\tw = getHeight();\n\t\t}\n\n\t\tdouble pos = v / ((double) w - getMarkerLength());\n\t\treturn (1.0 - pos) * getScaleStart() + pos * getScaleEnd();\n\t}", "public float getX() { return xCoordinate;}", "protected double xPixelToPosition(double pixel) {\r\n// double axisV = xPositionToPixel(originX);\r\n// return (pixel - axisV) * (maxX - minX) / (double) getWidth();\r\n return minX + pixel * (maxX - minX) / getWidth();\r\n }", "public Point scaleToGraphCanvasCoords(int x, int y);", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "public void displayCoordsInDegrees() {\n DecimalFormat formatter = new DecimalFormat(\"0.000\");\n\n String latFormat = formatter.format(posMarker.getPosition().latitude);\n String lonFormat = formatter.format(posMarker.getPosition().longitude);\n\n TextView latitude = (TextView) findViewById(R.id.image_latitude);\n TextView longitude = (TextView) findViewById(R.id.image_longitude);\n\n latitude.setText(latFormat); //Use posMarker location as field actually reflects marker position\n longitude.setText(lonFormat); //Use posMarker location as field actually reflects marker position\n }", "public int getXCoordinate ()\n {\n return xCoordinate;\n }", "private double [] getGraphCoordinates(Virus virus){\n\t\tdouble pos = virus.getPosition();\n\t\tmxCell edge = getEdge(virus.getMicrotuble());\n\t\tmxICell src = edge.getSource();\n\t\tmxICell tar = edge.getTarget();\n\t\t//System.out.println(\"e=\" + edge.getValue() + \"\\tsrc=\" + src.getValue());\n\t\tmxGeometry srcGeo = graph.getModel().getGeometry(src);\n\t\tmxGeometry tarGeo = graph.getModel().getGeometry(tar);\n\t\t\n\t\t//where we need to go to\n\t\tdouble srcX = srcGeo.getCenterX();\n\t\tdouble srcY = srcGeo.getCenterY();\n\t\t\n\t\t//This is the start position\n\t\tdouble tarX = tarGeo.getCenterX();\n\t\tdouble tarY = tarGeo.getCenterY();\n\t\t\n\t\tdouble tan = (tarY - srcY)/(tarX - srcX) ;\n\t\tdouble angle = Math.atan(tan);\n\t\t\n\t\tdouble _y = Math.sin(angle) * pos;\n\t\tdouble _x = Math.cos(angle) * pos;\n\t\tdouble y,x;\n\t\t//determine direction\n\n\t\t\n\t\tif (tarY >= srcY && tarX >= srcX){ //ok\n\t\t\tx = tarX - _x;\n\t\t\ty = tarY - _y;\n\t\t} else if (tarY < srcY && tarX > srcX){\n\t\t\tx = tarX - _x;\n\t\t\ty = tarY - _y;\n\t\t} else if (tarY > srcY && tarX < srcX){ //ok\n\t\t\tx = tarX + _x;\n\t\t\ty = tarY + _y;\n\n\t\t} else {// if (tarY < srcY && tarX < srcX){\n\t\t\tx = tarX + _x;\n\t\t\ty = tarY + _y;\n\t\t}\n\t\t//System.out.println(\"(\" + _x + \",\" + _y + \")\\t\" + \"(\" + x + \",\" + y + \")\");\n\n\t\treturn new double[] {x,y};\n\t}", "public Point scaleToGraphCanvasCoords(double x, double y);", "private int valueToPos( final double value )\n\t{\n\t\tfinal double dmin = range.getMinBound();\n\t\tfinal double dmax = range.getMaxBound();\n\t\treturn ( int ) Math.round( ( value - dmin ) * SLIDER_LENGTH / ( dmax - dmin ) );\n\t}", "protodef.b_math.coord getCoordInfo();", "public void updatePosition() {\n\n this.x = this.temp_x;\n this.y = this.temp_y;\n this.ax = 0;\n this.ay = 0;\n\t\tthis.axplusone = 0;\n this.ayplusone = 0;\n \n }", "public String getGVCoordsForLabel() {\n StringBuilder coordsBuilder = new StringBuilder();\n\n coordsBuilder.append(\"X\");\n\n if (coords[0] < 0) {\n coordsBuilder.append(\"neg\");\n }\n\n coordsBuilder.append(Math.abs(coords[0])).append(\"Y\");\n\n if (coords[1] < 0) {\n coordsBuilder.append(\"neg\");\n }\n\n coordsBuilder.append(Math.abs(coords[1]));\n\n return coordsBuilder.toString();\n }", "public String getCoordsForLP() {\n String x = coords[0] < 0 ? \"neg\" + Math.abs(coords[0]) :\n Integer.toString(Math.abs(coords[0]));\n String y = coords[1] < 0 ? \"neg\" + Math.abs(coords[1]) :\n Integer.toString(Math.abs(coords[1]));\n return x + \"_\" + y;\n }", "public void convertToLocation() {\r\n\t\tdouble longitude = Double.MIN_VALUE;\r\n\t\tdouble latitude = Double.MIN_VALUE;\r\n\r\n\t\tdistance += 0.75;\r\n\t\tsteps = meter.getSteps();\r\n\r\n\t\tDataLogger.getInstance().setCurrDistance(distance);\r\n\r\n\t\tlatitude = 0.75 * Math.cos(orientation) * 0.000009\r\n\t\t\t\t+ DataLogger.getInstance().getPrevLatitude();\r\n\t\tlongitude = 0.75 * Math.sin(orientation) * 0.0000136\r\n\t\t\t\t+ DataLogger.getInstance().getPrevLongitude();\r\n\r\n\t\tDataLogger.getInstance().addLocation(latitude, longitude,\r\n\t\t\t\tjava.lang.System.currentTimeMillis());\r\n\r\n\t\tLog.d(TAG, \"Called convertToLocation\");\r\n\t}", "public Coordinate toLocal(Coordinate deviceGlobalPose){\n\t\tdouble x_delta_mm=x-deviceGlobalPose.x;\n\t\tdouble y_delta_mm=y-deviceGlobalPose.y;\n\t\tdouble a_lc=a-deviceGlobalPose.a;\n\t\t\n\t\tdouble cos=Math.cos(-deviceGlobalPose.a);\n\t\tdouble sin=Math.sin(-deviceGlobalPose.a);\n\t\t\n\t\tdouble x_mm=x_delta_mm*cos-y_delta_mm*sin;\n\t\tdouble y_mm=x_delta_mm*sin+y_delta_mm*cos;\n\t\t\n\t\tdouble x_lc=x_mm*Device.ppmX;\n\t\tdouble y_lc=y_mm*Device.ppmY;\n\t\t\n\t\treturn new Coordinate(x_lc,y_lc,a_lc);\n\t}", "public double getUserFriendlyXPos(){\n return xPos - myGrid.getWidth()/ HALF;\n }", "int getX_coordinate(){\n return x_coordinate;\n }", "public void mouseMoved( MouseEvent event )\n\t {\n\t \t /*\n\t \t * Change one unit into pixels sx = width/(b-a)\n\t \t * X = (x-a)*sx\n\t \t * \n\t \t * sy = height/(ymax - ymin)\n\t \t * Y1 = height - (y-ymin)*sy\n\t \t * Y2 = (ymax-y)*sy\n\t \t * Y1=Y2(same expression)\n\t \t */\n\t \t double b = InputView.getEnd();\n\t \t\t double a = InputView.getStart();\n\t \t DecimalFormat df = new DecimalFormat(\"#.##\");\n\t \t double sx = 594/(b-a);\n\t \t double sy = 572/(PlotPoints.getMax()-PlotPoints.getMin());\n\t \t coords.setText( \"(\"+ df.format((event.getX()/sx)+a-.02) + \", \" + df.format((.17 + PlotPoints.getMax()) - (event.getY()/sy)) + \")\" );\n\t }", "private Point2D getCenterLatLon(){\n Point2D.Double result = new Point2D.Double();\n Point2D.Double screenCenter = new Point2D.Double();\n screenCenter.x = getWidth()/2; //contentpane width/height\n screenCenter.y = getHeight()/2;\n try{\n transform.inverseTransform(screenCenter,result); //transform to lat/lon using the current transform\n } catch (NoninvertibleTransformException e) {\n throw new RuntimeException(e);\n }\n return result;\n }", "public position convertToPosition(){\n\t\tdouble x = r * Math.cos(theta);\n\t\tdouble y = r * Math.sin(theta);\n\t\treturn new position(x, y);\n\t}", "public Point2D getNodePositionXY () { return n.getXYPositionMap(); }", "private String getDestCoordinate(Float coord) {\r\n if (coord != null) {\r\n return String.valueOf(coord);\r\n } else {\r\n return \"\";\r\n }\r\n }", "public Vector2df guiToCoordinate(GuiPoint point) {\r\n\t\tint guiX = point.x;\r\n\t\tint guiY = point.y;\r\n\t\tfloat zoom = 1.0f / zoomFactor;\r\n\t\tint coordX = Math.round((guiX - origin.x) * zoom);\r\n\t\tint coordY = Math.round((guiY - origin.y) * zoom);\r\n\t\tVector2df pos = new Vector2df(coordX, coordY);\r\n\t\treturn pos;\r\n\t}", "private void displayWorldCoordinates() {\n int n = trackerPanel == null ? 0 : trackerPanel.getFrameNumber();\n OffsetOriginStep step = (OffsetOriginStep) getStep(n);\n if (step == null) {\n xField.setText(null);\n yField.setText(null);\n } else {\n xField.setValue(step.worldX);\n yField.setValue(step.worldY);\n }\n }", "public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }", "public int getLocationX() {\r\n\t\treturn x;\r\n\t}", "private int calcCoordinate(final boolean xAxis, final double d) {\r\n final int novalue = noValueSize();\r\n if(xAxis) {\r\n // items with value -1 lack a value for the specific attribute\r\n if(d == -1) return MARGIN[1] + novalue / 2;\r\n final int width = getWidth();\r\n final int xSpace = width - (MARGIN[1] + MARGIN[3]) - novalue;\r\n final int x = (int) (d * xSpace);\r\n return x + MARGIN[1] + novalue;\r\n } else {\r\n final int height = getHeight();\r\n if(d == -1) return height - MARGIN[2] - novalue / 2; \r\n final int ySpace = height - (MARGIN[0] + MARGIN[2]) - novalue;\r\n final int y = ySpace - (int) (d * ySpace);\r\n return y + MARGIN[0];\r\n }\r\n }", "public int getX() { return loc.x; }", "public int x (int index) { return coords[index][0]; }", "IntPoint getLocation();", "@Override\n\tpublic String toString() {\n\t\treturn \"Coord[\" + this.x0 + \",\" + this.y0 + \"]\";\n\t}", "@Override\n\tpublic void getCoordinates() {\n\t\tSystem.out.println(\"Your Coordinates: 18.1124° N, 79.0193° E \");\n\t}", "public int pointValue() {\r\n return pointValue;\r\n }", "public void updatePositionValue(){\n m_X.setSelectedSensorPosition(this.getFusedPosition());\n }", "void updateStepCoordiantes(){\n if(xIncreasing) {\n lat = lat + STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat + STEP_LENGTH*yCompMotion*degToMRatio;\n }\n else{\n lat = lat - STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat - STEP_LENGTH*yCompMotion*degToMRatio;\n }\n if(yIncreasing) {\n lon = lon + STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon + STEP_LENGTH*xCompMotion*degToMRatio;\n }\n else{\n lon = lon - STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon - STEP_LENGTH*xCompMotion*degToMRatio;\n }\n }", "double getXPosition();", "double getMapPositionX();", "long getCoordinates();", "long getCoordinates();", "public Point2D customCoordinateFormula(Point2Int in){\r\n double xn = coordinateCalculateFuntionX.apply((double)in.x);\r\n double yn = coordinateCalculateFuntionX.apply((double)in.x);\r\n return new Point2D(xn, yn);\r\n }", "public int[] computeXY() \n\t\t//POST: FCTVAL == coordinates of the node in form [x, y]\n\t\t{\n\t\t\tint myPosition = getPositionInList(this);\t//get the position of the node\n\n\t\t\t//calculate angle in the circle based on position\n\t\t\tdouble angle = (((double) myPosition) * ((2*Math.PI) / (double) length)); \n\n\t\t\t//convert from polar to cartesian coordinates with radius 0.7; x = rcos(theta)\n\t\t\tdouble x = Math.cos(angle) * 0.7;\t\t//x = rcos(theta)\n\t\t\tdouble y = Math.sin(angle) * 0.7;\t\t//y = rsin(theta)\n\t\t\t\n\t\t\treturn ScaledPoint.getRealCoordinance(x, y);\n\t\t}", "private static Vector2f toGuiCoords(float x, float y) {\r\n\t\treturn(new Vector2f((x/DisplayManager.getWidth()) - 0.5f, y/DisplayManager.getHeight()));\r\n\t}", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "String dCoord(int coord) {\n if (coord < 0)\n return (minimap.conf.netherpoints ? \"n\" : \"\") + \"-\" + Math.abs(coord + 1);\n else\n return (minimap.conf.netherpoints ? \"n\" : \"\") + \"+\" + coord;\n }", "public String coordToAddress(Coord loc);", "public int setPoint(float x, float y, int gnum);", "public VisuCoordinateTranslator() {\r\n limitedDirections = new HashMap<String, Integer>();\r\n limitedCoordinates = new HashMap<String, Shape>();\r\n limitedGroundCoordinates = new HashMap<String, Float[]>();\r\n Float c[] = {22f, 2f, 8.5f, -1.7f, 0f};\r\n limitedDirections.put(\"Status_GWP01\", 0);\r\n ArrayList a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n StraightShape ss = new StraightShape(a);\r\n limitedCoordinates.put(\"0.1.0\", ss);\r\n\r\n\r\n c = new Float[]{-0.97f, 0.88f, 0f, -0.1f, 1f};\r\n limitedDirections.put(\"Status_ETKa1\", 1);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"1.1.0\", ss);\r\n\r\n limitedDirections.put(\"Status_ETKa2\", 1);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa1\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa2\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n\r\n\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n ArrayList<ArrayList<Float>> arrayOval = new ArrayList<ArrayList<Float>>();\r\n c = new Float[]{6.3f, -2f, 7.3f, -14.38f, 0f};//straight_1\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, -4.8f, 7.3f, -14.38f, 0f};//straight_2\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.072f, 0.0695f, 2.826f, -5.424f, -17.2f, 7.3f, 1f};//circular_3\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-4.8f, -2f, 7.3f, -19.715f, 0f};//straight_4\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, 6.3f, 7.3f, -19.715f, 0f};//straight_5\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.038f, 0.1032f, 2.833f, 6.567f, -17.2f, 7.3f, 1f};//circular_6\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.1302f, 0.0114f, 2.8202f, -2.0298f, -17.2f, 7.3f, 1f};//circular_7\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n \r\n c = new Float[]{0.41f, 0.48f, 0.6f, 0.67f, 0.78f, 0.92f};//partitions\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n\r\n OvalShape os = new OvalShape(arrayOval);\r\n\r\n for (int i = 2; i < 11; i++) {\r\n for (int j = 0; j < 3; j++) {\r\n limitedCoordinates.put(\"1.\" + i + \".\" + j, os);\r\n limitedCoordinates.put(\"2.\" + i + \".\" + j, ss);\r\n }\r\n }\r\n\r\n \r\n \r\n c = new Float[]{2.0785f, -1.8972f};\r\n limitedGroundCoordinates.put(\"0.1.0\", c);\r\n c = new Float[]{-6.3859f,-0.4682f};\r\n limitedGroundCoordinates.put(\"1.1.0\", c);\r\n }", "protected static float toPoints(int unit, float value) {\n \t\tswitch (unit) {\n \t\tcase CSSPrimitiveValue.CSS_CM:\n \t\t\treturn (value * 72 / 2.54f);\n \t\tcase CSSPrimitiveValue.CSS_MM:\n \t\t\treturn (value * 72 / 25.4f);\n \t\tcase CSSPrimitiveValue.CSS_IN:\n \t\t\treturn (value * 72);\n \t\tcase CSSPrimitiveValue.CSS_PT:\n \t\t\treturn value;\n \t\tcase CSSPrimitiveValue.CSS_PC:\n \t\t\treturn (value * 12);\n \t\tdefault:\n \t\t\tthrow new DOMException(DOMException.INVALID_ACCESS_ERR, \"\");\n \t\t}\n \t}", "public void getOriginX(){\n\t\toriginX.setText(Double.toString(note.getOriginX()));\n\t}", "public void ptFromTVal(double t, Point currPt)\n/* */ {\n/* 37 */ if (this.m_cont != null) {\n/* 38 */ Dimension d = this.m_cont.size();\n/* */ \n/* 40 */ double tVal = tVal(t);\n/* 41 */ currPt.y = (d.height - 15 - new Double(tVal(t) * (d.height - 15 - 15)).intValue());\n/* */ \n/* */ \n/* */ \n/* 45 */ currPt.x = (new Double(t * (d.width - 15 - 15)).intValue() + 15);\n/* */ }\n/* */ }", "Square getCurrentPosition();", "public String getGVCoordsForPosition() {\n return \"\\\"\" + coords[0] + \",\" + coords[1] + \"!\\\"\";\n }", "public Point2D getCellCoordinates(JmtCell cell) {\r\n \t\tRectangle2D bounds = GraphConstants.getBounds(cell.getAttributes());\r\n \t\treturn new Point2D.Double(bounds.getMinX(), bounds.getMinY());\r\n \t}", "public int getXY(int x, int y);", "public int getEncPosition() {\n //System.out.println(this.EncX.getRaw() + \"raw\");\n return (int) (1000 * this.EncX.getDistance());\n //return (int)(1000 * this.EncX.getRaw() / 8.6);\n \n }", "public int getX(){ return xPosition; }", "public int getXcoord(){\n\t\treturn this.coordinates[0];\n\t}", "public int getVertexVal()\r\n\t{\r\n\t\treturn this.value;\r\n\t}", "double getX() { return pos[0]; }", "public void coFromInt(int coord) {\n int twist = 0;\n for(int j = 0; j < 7; j ++) {\n co[6 - j] = coord % 3;\n twist = (twist + coord % 3) % 3;\n coord /= 3;\n }\n co[7] = (3 - twist) % 3;\n }", "public float getPosX(){return px;}", "public float xScreen2Data(float x);", "String getPosX();", "private short computeLocationValue(short row, short column) {\n\t\treturn (short) (gridSize * row + column);\n\t}", "public void setToCoordinates(int toX, int toY);", "public int getxCoordinate() {\n return xCoordinate;\n }", "public int getxCoordinate() {\n return xCoordinate;\n }", "private int coordinateConvertFrom(int i, int j) {\n return size * (i - 1) + j;\n }", "private MsoSmartArtNodePosition(int value) { this.value = value; }", "private int convert(int x, int y) {\n\treturn (150 * y) + x;\n }", "public float getLatitudeValue (){\n return trackLat.getValue ();\n }", "public int getX()\r\n {\r\n return xCoord;\r\n }", "public static String process() {\n\n\t\tSet<Point> myPoint;\n\t\tSet<Point> oppPoint;\n\t\t\n\t\tint oppenentID = (myID == 0? 1: 0);\n\t\t\n\t\tif (map.containsKey(myID)) {\n\t\t\tmyPoint = map.get(myID);\n\t\t}else\n\t\t{\n\t\t\tmyPoint = new TreeSet<Point>();\n\t\t}\n\t\tif (map.containsKey(oppenentID)) {\n\t\t\toppPoint = map.get(oppenentID);\n\t\t}else\n\t\t{\n\t\t\toppPoint = new TreeSet<Point>();\n\t\t}\n\t\t\n\t\tPoint decdesion = strategy.choosePoint(myPoint, oppPoint, 1000, 1000);\n\t\tmyPoint.add(decdesion);\n\t\tmap.put(myID, myPoint);\n\t\t\n\t\treturn decdesion.x + \" \" + decdesion.y;\n\t\t\n\t}", "public Point getScreenCoordinate(Coord c) {\n return getScreenCoordinate(c.getLatitude(), c.getLongitude());\n }", "public final double getX() { return location.getX(); }", "private float normalizedToScreen(double normalizedCoord) {\n return (float) (padding + normalizedCoord * (getWidth() - 2 * padding));\n }", "int getHeatCode(int x, int y);", "public int getX() {\n return this.coordinate.x;\n }", "public int x() {\r\n\t\treturn xCoord;\r\n\t}", "public Coordinate toGlobal(Coordinate deviceGlobalPose){\n\t\tdouble x_mm=x/Device.ppmX;\n\t\tdouble y_mm=y/Device.ppmY;\n\t\t\n\t\tdouble cos=Math.cos(deviceGlobalPose.a);\n\t\tdouble sin=Math.sin(deviceGlobalPose.a);\n\t\t\n\t\tdouble x_gl=x_mm*cos-y_mm*sin+deviceGlobalPose.x;\n\t\tdouble y_gl=x_mm*sin+y_mm*cos+deviceGlobalPose.y;\n\t\tdouble a_gl=a+deviceGlobalPose.a;\n\t\t\n\t\treturn new Coordinate(x_gl,y_gl,a_gl);\n\t}", "@Override\n\t\t\tpublic Vector getPosition() {\n\t\t\t\treturn new Vector(-2709.487, -4281.02, 3861.564); //-4409.0, 2102.0, -4651.0);\n\t\t\t}", "public Point getCoordinate() {\n return this.coordinate;\n }", "public double getAbsPosition() {\n double distCM = ToFSerial.get() - startDist;\n //System.out.println(\"Dist in CM \" + distCM);\n\n double distIn = distCM * Constants.k_CMtoIn;\n //System.out.println(\"Dist in In \" + distIn);\n\n return (int) (1000 * distIn); \n\n }", "public void adjLocation(double l){this.PlayerLocation;}", "@Override\n protected void positionChanged () {\n\n\n valueLabel.setPosition( this.getX() + ((this.getScaleX() * this.getWidth() - valueLabel.getScaleX() * valueLabel.getWidth()) / 2),\n this.getY() + ((this.getScaleY() * this.getHeight() - valueLabel.getScaleY() * valueLabel.getHeight()) / 2) );\n }", "@Override\n public String toGraphProperty(Float value) {\n return value.toString();\n }", "public PVector getTransformedPosition(){\n\t\treturn gui.getTransform().transform(position);\n\t}", "public int getVal(){\n\t\treturn pointVal;\n\t}", "public void getCoord(MouseEvent me){\n if(mapImage.getImage()!=null) {\n double xPos = me.getX();\n double yPos = me.getY();\n Main.ps.setTitle(xPos + \" \" + yPos);\n }\n }", "double getPositionX();", "double getPositionX();", "double getPositionX();", "public int getLat();", "protected int getxCoord() {\n\t\treturn xCoord;\n\t}", "public RMPoint getXYP() { return convertPointToShape(new RMPoint(), _parent); }", "public void updateXLoc();", "private String latitudeConversion() {\n int lat = record[1];\n if (lat >= 0) {\n lat = lat & 255;\n }\n lat = (lat << 8) + (record[0] & 255);\n float flat = Float.parseFloat((\"\" + lat + \".\" + (((record[3] & 255) << 8) + (record[2] & 255))));\n int degs = (int) flat / 100;\n float min = flat - degs * 100;\n String retVal = \"\" + (degs + min / 60);\n\n if (retVal.compareTo(\"200.0\") == 0) {\n return \"\";\n } else {\n return retVal;\n }\n }" ]
[ "0.7014765", "0.6137225", "0.6076043", "0.6016265", "0.5970657", "0.59087825", "0.5870375", "0.5866928", "0.5835385", "0.5780938", "0.57706857", "0.57646334", "0.5699448", "0.5670686", "0.56658477", "0.56639224", "0.5662923", "0.56298167", "0.5596762", "0.5585656", "0.5571619", "0.5566379", "0.55648637", "0.5561538", "0.5548691", "0.5540724", "0.5533447", "0.55327636", "0.5521195", "0.550575", "0.55056554", "0.55022687", "0.5500998", "0.54897547", "0.5487387", "0.5486326", "0.5480228", "0.54785377", "0.54777086", "0.54694384", "0.54476297", "0.54464453", "0.54464453", "0.54418045", "0.54413545", "0.5439252", "0.54373753", "0.54373336", "0.5437173", "0.5434407", "0.54341054", "0.54319376", "0.54192424", "0.5411127", "0.5400004", "0.53903013", "0.53828955", "0.53825253", "0.5381429", "0.53806376", "0.5375839", "0.5372832", "0.5371972", "0.53699756", "0.53698784", "0.53657466", "0.53606284", "0.5354733", "0.5353153", "0.5349431", "0.5349431", "0.53492975", "0.53472096", "0.5343816", "0.53372157", "0.53348464", "0.5334241", "0.53178424", "0.53168994", "0.5311744", "0.53113586", "0.5305722", "0.53049105", "0.5304662", "0.53041327", "0.5297206", "0.5291834", "0.5289516", "0.5285148", "0.5273758", "0.5272508", "0.52715313", "0.52699035", "0.52694416", "0.52694416", "0.52694416", "0.52683014", "0.5258443", "0.52571124", "0.5255989", "0.5255588" ]
0.0
-1
Convert onscreen coordinate to value
public double from(double coordinate) { if (this.area != null) { coordinate -= this.direction.getPosition(this.area, this.anchor); } return this.inverse ? -(coordinate / this.zoom - this.shift) : coordinate / this.zoom + this.shift; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double convertCoord(double val) {\n return val - 50;\n }", "public Point getScreenCoordinate(Coord c) {\n return getScreenCoordinate(c.getLatitude(), c.getLongitude());\n }", "public Point getScreenCoordinate(double lat, double lon) {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getPointFromCoord(new Coord(lat, lon));\n }\n // TODO: Browser component\n return new Point(0, 0);\n }\n internalNative.calcScreenPosition(lat, lon);\n return new Point(internalNative.getScreenX(), internalNative.getScreenY());\n }", "public int[] getScreenCoordinate(long worldLat, long worldLon);", "public float xScreen2Data(float x);", "Point onScreen();", "DeviceCoordinate transformWorldToScreen(final double x, final double y);", "private Point2D getCenterLatLon(){\n Point2D.Double result = new Point2D.Double();\n Point2D.Double screenCenter = new Point2D.Double();\n screenCenter.x = getWidth()/2; //contentpane width/height\n screenCenter.y = getHeight()/2;\n try{\n transform.inverseTransform(screenCenter,result); //transform to lat/lon using the current transform\n } catch (NoninvertibleTransformException e) {\n throw new RuntimeException(e);\n }\n return result;\n }", "private float normalizedToScreen(double normalizedCoord) {\n return (float) (padding + normalizedCoord * (getWidth() - 2 * padding));\n }", "public double getUserFriendlyXPos(){\n return xPos - myGrid.getWidth()/ HALF;\n }", "private static Vector2f toScreenCoords(float x, float y) {\r\n\t\treturn(new Vector2f((x + 0.5f) * DisplayManager.getWidth(), y * DisplayManager.getHeight()));\r\n\t}", "public long[] getWorldCoordinate(int screenX, int screenY);", "public int[] getScreenCoordinateWGS84(double worldLat, double worldLon);", "IntPoint getLocation();", "public float getX() { return xCoordinate;}", "public Coordinate toLocal(Coordinate deviceGlobalPose){\n\t\tdouble x_delta_mm=x-deviceGlobalPose.x;\n\t\tdouble y_delta_mm=y-deviceGlobalPose.y;\n\t\tdouble a_lc=a-deviceGlobalPose.a;\n\t\t\n\t\tdouble cos=Math.cos(-deviceGlobalPose.a);\n\t\tdouble sin=Math.sin(-deviceGlobalPose.a);\n\t\t\n\t\tdouble x_mm=x_delta_mm*cos-y_delta_mm*sin;\n\t\tdouble y_mm=x_delta_mm*sin+y_delta_mm*cos;\n\t\t\n\t\tdouble x_lc=x_mm*Device.ppmX;\n\t\tdouble y_lc=y_mm*Device.ppmY;\n\t\t\n\t\treturn new Coordinate(x_lc,y_lc,a_lc);\n\t}", "long getCoordinates();", "long getCoordinates();", "public Vector2F getScreenLocation() {\n\t\treturn new Vector2F(xPos, yPos);\n\t}", "public Coord getCoordAtPosition(int x, int y) {\n if(internalNative == null) {\n if(internalLightweightCmp != null) {\n return internalLightweightCmp.getCoordFromPosition(x, y);\n }\n // TODO: Browser component\n return new Coord(0, 0);\n }\n internalNative.calcLatLongPosition(x, y);\n return new Coord(internalNative.getScreenLat(), internalNative.getScreenLon());\n }", "public int getXCoordinate ()\n {\n return xCoordinate;\n }", "public int getX(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(0)/ AvesAblazeHardware.mmPerInch);\n\t}", "public double getAbsPosition() {\n double distCM = ToFSerial.get() - startDist;\n //System.out.println(\"Dist in CM \" + distCM);\n\n double distIn = distCM * Constants.k_CMtoIn;\n //System.out.println(\"Dist in In \" + distIn);\n\n return (int) (1000 * distIn); \n\n }", "public Point getLocation() {\r\n return new Point((int)x,(int)y);\r\n }", "private double screenToNormalized(float screenCoord) {\n int width = getWidth();\n if (width <= 2 * padding) {\n // prevent division by zero, simply return 0.\n return 0d;\n } else {\n double result = (screenCoord - padding) / (width - 2 * padding);\n return Math.min(1d, Math.max(0d, result));\n }\n }", "public void displayCoordsInDegrees() {\n DecimalFormat formatter = new DecimalFormat(\"0.000\");\n\n String latFormat = formatter.format(posMarker.getPosition().latitude);\n String lonFormat = formatter.format(posMarker.getPosition().longitude);\n\n TextView latitude = (TextView) findViewById(R.id.image_latitude);\n TextView longitude = (TextView) findViewById(R.id.image_longitude);\n\n latitude.setText(latFormat); //Use posMarker location as field actually reflects marker position\n longitude.setText(lonFormat); //Use posMarker location as field actually reflects marker position\n }", "public double[] getWorldCoordinateWGS84(int screenX, int screenY);", "public static Vector2 touchToScreenPos()\n {\n Vector3 input = new Vector3(Gdx.input.getX(), Gdx.input.getY(), 0);\n input = GdxStart.camera.unproject(input);\n return new Vector2(input.x, input.y);\n }", "public static int locToInt(MapLocation m){\r\n\t\treturn (m.x*100 + m.y);\r\n\t}", "public int getXcoord(){\n\t\treturn this.coordinates[0];\n\t}", "public float yScreen2Data(float y);", "Square getCurrentPosition();", "protected double xPixelToPosition(double pixel) {\r\n// double axisV = xPositionToPixel(originX);\r\n// return (pixel - axisV) * (maxX - minX) / (double) getWidth();\r\n return minX + pixel * (maxX - minX) / getWidth();\r\n }", "private static Vector2f toGuiCoords(float x, float y) {\r\n\t\treturn(new Vector2f((x/DisplayManager.getWidth()) - 0.5f, y/DisplayManager.getHeight()));\r\n\t}", "private String getDestCoordinate(Float coord) {\r\n if (coord != null) {\r\n return String.valueOf(coord);\r\n } else {\r\n return \"\";\r\n }\r\n }", "public int getLocationX() {\r\n\t\treturn x;\r\n\t}", "public Point getLocationOnScreen(View v) {\r\n //DisplayMetrics dm = new DisplayMetrics();\r\n //((Activity) getContext()).getWindowManager().getDefaultDisplay().getMetrics(dm);\r\n //DisplayMetrics dm2 = getResources().getDisplayMetrics();\r\n int[] location = new int[2];\r\n v.getLocationOnScreen(location);\r\n\r\n return new Point(location[0], location[1]);\r\n }", "public Vector2df guiToCoordinate(GuiPoint point) {\r\n\t\tint guiX = point.x;\r\n\t\tint guiY = point.y;\r\n\t\tfloat zoom = 1.0f / zoomFactor;\r\n\t\tint coordX = Math.round((guiX - origin.x) * zoom);\r\n\t\tint coordY = Math.round((guiY - origin.y) * zoom);\r\n\t\tVector2df pos = new Vector2df(coordX, coordY);\r\n\t\treturn pos;\r\n\t}", "private int toScreenP(double x)\n\t\t{\n\t\tint h=getHeight();\n\t\treturn (int)(h*0.9 + x*scaleP*h);\n\t\t}", "protected double markerPositionToValue(int v) {\n\t\tint w;\n\t\tif (HORIZONTAL == getOrientation()) {\n\t\t\tw = getWidth();\n\t\t} else {\n\t\t\tw = getHeight();\n\t\t}\n\n\t\tdouble pos = v / ((double) w - getMarkerLength());\n\t\treturn (1.0 - pos) * getScaleStart() + pos * getScaleEnd();\n\t}", "public int getxOnScreen(){\n this.xOnScreen = xMaze * moverStepSizeOnScreen;\n return this.xOnScreen;\n }", "public Point getAbsPosition() {\n return Game.getMap().TFMapCoordinateToMapCenter(position);\n }", "double transformXScreenLengthToWorld(final double screen);", "private Point getMainPoint()\n {\n // Center of screen\n int x = (findViewById(R.id.the_canvas).getWidth() - ((GameBoard)findViewById(R.id.the_canvas)).getMainSpriteWidth())/2;\n // Very bottom of screen\n int y = findViewById(R.id.the_canvas).getHeight() - ((GameBoard)findViewById(R.id.the_canvas)).getMainSpriteHeight();\n\n return new Point (x,y);\n }", "public double GetPositionRaw()\n {\n double position = GetPosition();\n\n if (position == -1)\n {\n double CurrentDistance = GetDistance();\n\n // we aren't close to a position, so get the range\n for (int i = 1; i < (Positions.length); i++)\n {\n if (Utilities.isBetween(CurrentDistance, Positions[i - 1],\n Positions[i]))\n {\n // scale the position from inches to the ratio between\n // positions\n position = Utilities.scaleToRange(CurrentDistance,\n Positions[i - 1], Positions[i], i - 1, i);\n break;\n }\n\n }\n }\n\n return position;\n }", "public int getXY(int x, int y);", "int getX_coordinate(){\n return x_coordinate;\n }", "public final double getX() { return location.getX(); }", "public int getLat();", "private int scaleAbsoluteCoordinateToViewCoordinate(int coordinate) {\n float scaleFactor = (float) mPlayerManager.getView().getWidth() / (float) TEST_PAGE_WIDTH;\n return Math.round((float) coordinate * scaleFactor);\n }", "double getMapPositionX();", "public Point2D.Float getScreenToGameCoords(int screenX, int screenY) {\n\t\treturn cam.unproject((float) screenX, (float) screenY);\n\t}", "public float toWorldCoordinateX(float mouseX){\n \treturn (mouseX/zoom) - (parent.width/zoom/2) + position.x;\n }", "public Point getPos(){\n return new Point(getUserFriendlyXPos(),getUserFriendlyYPos());\n }", "protected static double getScreenPoints(int pixelsValue) {\r\n int screenResolution = Toolkit.getDefaultToolkit().getScreenResolution();\r\n double result = (pixelsValue * 72.0) / screenResolution;\r\n return result;\r\n }", "public Point2D.Float getScreenToGameCoords(double screenX, double screenY) {\n\t\treturn cam.unproject((float) screenX, (float) screenY);\n\t}", "public PVector getRawPosition(){\n\t\treturn this.leap.convert(this.arm.center());\n\t}", "public int getLon();", "public int get_X_Coordinate()\n {\n return currentBallX;\n }", "public Coordinate toGlobal(Coordinate deviceGlobalPose){\n\t\tdouble x_mm=x/Device.ppmX;\n\t\tdouble y_mm=y/Device.ppmY;\n\t\t\n\t\tdouble cos=Math.cos(deviceGlobalPose.a);\n\t\tdouble sin=Math.sin(deviceGlobalPose.a);\n\t\t\n\t\tdouble x_gl=x_mm*cos-y_mm*sin+deviceGlobalPose.x;\n\t\tdouble y_gl=x_mm*sin+y_mm*cos+deviceGlobalPose.y;\n\t\tdouble a_gl=a+deviceGlobalPose.a;\n\t\t\n\t\treturn new Coordinate(x_gl,y_gl,a_gl);\n\t}", "public int getX()\r\n {\r\n return xCoord;\r\n }", "public int getX() { return loc.x; }", "private Vec2 calculatePos() {\n\t\tNetTransformComponent transform = actor.getEntity().getNetTransform();\n\t\tif (transform != null) {\n\t\t\tVec2 screenPos = scene.getCamera()\n\t\t\t\t\t.getScreenCoordinates(Vec3.add(transform.getPosition(), new Vec3(-2.0f, 3.25f, 0.0f)));\n\t\t\tVec2 result = new Vec2(screenPos.getX(), screenPos.getY());\n\t\t\treturn result;\n\t\t}\n\n\t\treturn new Vec2(0.0f, 0.0f);\n\t}", "public float getLatitudeValue (){\n return trackLat.getValue ();\n }", "public int getX() {\n return this.coordinate.x;\n }", "public static long convertXY(Object aInCoordinate) {\n if (aInCoordinate instanceof Number) return ((Number) aInCoordinate).longValue();\n else return 0L;\n }", "public void getCoord(MouseEvent me){\n if(mapImage.getImage()!=null) {\n double xPos = me.getX();\n double yPos = me.getY();\n Main.ps.setTitle(xPos + \" \" + yPos);\n }\n }", "public int getxCoordinate() {\n return xCoordinate;\n }", "public int getxCoordinate() {\n return xCoordinate;\n }", "long getX();", "public Point getCoordinate() {\n return this.coordinate;\n }", "public final Point getCenterPointOnScreen() {\n\t\treturn Calculations.tileToScreen(getLocalRegionX(), getLocalRegionY(),\n\t\t\t\t0.5D, 0.5D, 0);\n\t}", "public int getEncPosition() {\n //System.out.println(this.EncX.getRaw() + \"raw\");\n return (int) (1000 * this.EncX.getDistance());\n //return (int)(1000 * this.EncX.getRaw() / 8.6);\n \n }", "public Vector2 getMousePosition() {\n\t\tif (camera == null)\n\t\t\treturn new Vector2(0,0);\n\t\tfloat mx = Program.mouse.getX(), my = Program.mouse.getY();\n\t\tfloat xPercent = mx/Program.DISPLAY_WIDTH, yPercent = my/Program.DISPLAY_HEIGHT;\n\t\tfloat x = camera.getX() + camera.getWidth() * xPercent,\n\t\t\t y = camera.getY() + camera.getHeight() * yPercent;\n\t\treturn new Vector2(x,y);\n\t}", "public Coordinate getLocation();", "double getXPosition();", "int getLatitude();", "public Coordinate pixelToWorld(int x, int y, Envelope map) {\n if (graphics == null) {\n LOGGER.info(\"no graphics yet deffined\");\n \n return null;\n }\n \n //set up the affine transform and calculate scale values\n AffineTransform at = setUpTransform(map, screenSize);\n \n /* If we are rendering to a component which has already set up some form\n * of transformation then we can concatenate our transformation to it.\n * An example of this is the ZoomPane component of the swinggui module.*/\n if (concatTransforms) {\n graphics.getTransform().concatenate(at);\n } else {\n graphics.setTransform(at);\n }\n \n try {\n Point2D result = at.inverseTransform(new java.awt.geom.Point2D.Double(x, y),\n new java.awt.geom.Point2D.Double());\n Coordinate c = new Coordinate(result.getX(), result.getY());\n \n return c;\n } catch (Exception e) {\n LOGGER.warning(e.toString());\n }\n \n return null;\n }", "private int getMidPoint(int cordinate)\n {\n int mid_point = ((cordinate + Player.getWidth_of_box()) / 2);\n return mid_point;\n }", "godot.wire.Wire.Rect2 getRect2Value();", "public Coordinate getCoordinate() {\n return coordinate;\n }", "public double pixelCoordnateToAimingCoordnate(double pixelCoordnate, double resolution)\n {\n \treturn (pixelCoordnate - resolution / 2.0) / (resolution / 2.0);\n }", "public float getLongitudeValue (){\n return trackLon.getValue ();\n }", "public Coordinate getCoordinate() {\n\t\treturn super.listCoordinates().get(0);\n\t}", "private int getX(int arg) {\n\n\t\targ = (arg * Width) / 1000;\n\n\t\treturn arg;\n\t}", "private int getX(int arg) {\n\n\t\targ = (arg * Width) / 1000;\n\n\t\treturn arg;\n\t}", "public Position getPositionFromPixelCoords(int y, int x){\n if (disp.rotated){\n return new Position(y / 64 + 1, (x - 640) / -64);\n } else {\n return new Position((y - 576) / -64, x / 64);\n }\n }", "public int x() {\r\n\t\treturn xCoord;\r\n\t}", "public float getPosX(){return px;}", "public Point2D getMousePosition() {\n\t\treturn Lel.coreEngine.panelPositionToWorld(input.getMousePosition());\n\t}", "public Vec2 coordPixelsToWorld(Vec2 screen) {\n return coordPixelsToWorld(screen.x, screen.y);\n }", "public int getX() {\n return xCoord;\n }", "@Generated\n @Selector(\"position\")\n @ByValue\n public native CGPoint position();", "WorldCoordinate transformScreenToWorld(final DeviceCoordinate screen);", "public final Point getCenterPointOnScreen() {\n return bot.getManagers().getCalculations().tileToScreen(localRegionX, localRegionY,\n 0.5D, 0.5D, 0);\n }", "private int visible2ScreenX(float x){\n float tmp, m, b;\n m = gamePanel.getWidth() / gameControl.visibleWidth;\n b = gamePanel.getWidth() / 2;\n tmp = m*(x - gameControl.visibleX) + b;\n return (int)tmp;\n }", "String getPosY();", "public String coordToAddress(Coord loc);", "public Coordinate getPosition();", "int getLongitude();", "double getValueAt(int x, int y);" ]
[ "0.67066026", "0.64708054", "0.6274602", "0.624169", "0.62309015", "0.62156737", "0.6131845", "0.61305904", "0.6062841", "0.6002219", "0.5984488", "0.59649813", "0.5962554", "0.59607744", "0.5958449", "0.59284586", "0.5911357", "0.5911357", "0.59033513", "0.58866876", "0.58705115", "0.58424205", "0.5809226", "0.58080995", "0.57883793", "0.5777775", "0.5763309", "0.5759406", "0.5756691", "0.5751812", "0.5748468", "0.57414836", "0.5738575", "0.5733355", "0.57329243", "0.5725085", "0.5719139", "0.5705491", "0.5701843", "0.5701159", "0.5696255", "0.5682895", "0.5675194", "0.5626028", "0.56230116", "0.56223327", "0.56195045", "0.5616991", "0.56166124", "0.56158435", "0.56091434", "0.5601459", "0.5598776", "0.5596707", "0.5596186", "0.5581353", "0.557746", "0.5573729", "0.55725753", "0.5571618", "0.5568655", "0.5562381", "0.55616415", "0.5554746", "0.5552638", "0.55420035", "0.55359495", "0.5529196", "0.5529196", "0.55181265", "0.5516453", "0.5510036", "0.55053973", "0.5499064", "0.5494217", "0.5480293", "0.54781294", "0.54769725", "0.5475196", "0.5470087", "0.54506844", "0.5431904", "0.5428378", "0.54261327", "0.5422219", "0.5422219", "0.5418799", "0.54127425", "0.54094875", "0.5406771", "0.540398", "0.54034805", "0.54006577", "0.5398437", "0.53982645", "0.5395796", "0.5395477", "0.5390633", "0.53895223", "0.5389202", "0.5383902" ]
0.0
-1
/ Viewport manipulation methods
public void view(double min, double max) { this.assertArea(); this.view(min, max, this.direction.getSide(this.area)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void glViewport(int x, int y, int width, int height);", "private void updateViewport(int width, int height)\n\t{\n\t\tviewportWidth = width;\n\t\tviewportHeight = height;\n\t}", "protected JViewport createViewport() {\n/* 927 */ return new JViewport();\n/* */ }", "public JViewport getViewport() {\n/* 938 */ return this.viewport;\n/* */ }", "static void addViewport(Viewport viewport) { viewports.add(viewport); }", "public void recalculateViewport() {\r\n glViewport(0, 0, getWidth(), getHeight());\r\n spriteBatch.recalculateViewport(getWidth(), getHeight());\r\n EventManager.getEventManager().fireEvent(new WindowResizedEvent(getWidth(), getHeight()));\r\n }", "@Override\r\n protected void redrawViewport() {\n this.viewport.scrollAccordingly(this.gaze.getGazePitch(), this.gaze.getGazeYaw());\r\n }", "public interface UserViewportMovedListener {\n\n public void viewportModified();\n\n}", "@java.lang.Override\n public int getViewportIndex() {\n return viewportIndex_;\n }", "public void setViewport(double x, double y, double width, double height) {\n xViewport = x;\n yViewport = y;\n widthViewport = width;\n heightViewport = height;\n nViewportUpdates++;\n setScaleFactor();\n }", "private void updateViewBounds() \r\n {\r\n assert !sim.getMap().isEmpty() : \"Visualiser needs simulator whose a map has at least one node\"; \r\n \r\n \r\n viewMinX = minX * zoomFactor;\r\n viewMinY = minY * zoomFactor;\r\n \r\n viewMaxX = maxX * zoomFactor;\r\n viewMaxY = maxY * zoomFactor;\r\n \r\n \r\n double marginLength = zoomFactor * maxCommRange;\r\n \r\n \r\n // Set the size of the component\r\n int prefWidth = (int)Math.ceil( (viewMaxX - viewMinX) + (marginLength * 2) );\r\n int prefHeight = (int)Math.ceil( (viewMaxY - viewMinY) + (marginLength * 2) );\r\n setPreferredSize( new Dimension( prefWidth, prefHeight ) );\r\n \r\n \r\n // Adjust for margin lengths \r\n viewMinX -= marginLength;\r\n viewMinY -= marginLength;\r\n \r\n viewMaxX += marginLength;\r\n viewMaxY += marginLength;\r\n }", "public Viewport getViewport() {\n return viewport;\n }", "public void setViewportView(Component paramComponent) {\n/* 1004 */ if (getViewport() == null) {\n/* 1005 */ setViewport(createViewport());\n/* */ }\n/* 1007 */ getViewport().setView(paramComponent);\n/* */ }", "@java.lang.Override\n public int getViewportIndex() {\n return viewportIndex_;\n }", "static void draw()\n {\n for (Viewport viewport : viewports)\n viewport.draw(renderers);\n }", "public void setViewport(final int x, final int y, final int width, final int height) {\n viewport.set(x, y, width, height);\n }", "private void previewXY() {\n Viewport tempViewport = new Viewport(chart.getMaximumViewport());\n // Make temp viewport smaller.\n float dx = tempViewport.width() / 4;\n float dy = tempViewport.height() / 4;\n tempViewport.inset(dx, dy);\n previewChart.setCurrentViewportWithAnimation(tempViewport);\n }", "private void resetViewport() {\n final Viewport v = new Viewport(chart.getMaximumViewport());\n v.bottom = viewportBottom;\n v.top = viewportTop;\n v.left = 0;\n v.right = numberOfPoints - 1;\n if (v.right < 1){\n v.right = 1;\n }\n chart.setMaximumViewport(v);\n chart.setCurrentViewport(v);\n }", "@Override\n public void resize(int width, int height) {\n viewport.update(width, height);\n }", "@Override\n public void resize(int width, int height) {\n viewport.update(width, height);\n }", "static void removeViewport(Viewport viewport) { viewports.remove(viewport); }", "@Override\n\tpublic void resize(int width, int height) {\n\t\tui.setViewport(width, height);\n\t\tcamera.setToOrtho(false);\n\t}", "@Override\n public void onSurfaceChanged(GL10 glUnused, int width, int height) {\n glViewport(0, 0, width, height);\n\n this.width = width;\n this.height = height;\n setPerspectiveView();\n \n }", "@Override\r\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\r\n }", "Point inViewPort();", "@Override\n public void onSurfaceChanged(GL10 unused, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n\n float ratio = (float) width / height;\n\n // this projection matrix is applied to object coordinates\n // in the onDrawFrame() method\n Matrix.frustumM(mProjectionMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n\n }", "public void updateOverviewCanvas() {\n\t\tif (m_mapImage.getImageHeight() == 0 || m_mapImage.getImageWidth() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// What are the extents of a visible canvas in the ScrollPane/Pane?\n\n\t\t// The bound box changes with dragging\n\t\tBounds b = m_zoomPane.getCanvas().getBoundsInParent();\n\n\t\t// The bound box doesn't change with zoom\n\t\tdouble scale = m_zoomPane.getScale();\n\t\t\n\t\t// System.out.println(b.getMinX() + \" \" + b.getMinY() + \" \" + b.getMaxX() + \" \" + b.getMaxY() + \" \" + scale);\n\t\t\n\t\t// At start, 0.0 and 0.0 is the canvas translation, scale is 1.0\n\t\t// Other bounds describe the overall dimensions.\n\t\t\n\t\t// I need to know the size of the viewport\n\t\t// Then offset that viewport with b.getMinX() and b.getMinY()\n\t\t// And consider the scale factor!\n\t\tBounds sp = scrollPane.getBoundsInLocal();\n\n\t\t// Determine a scale based on what is needed to fit vertically or horizontally into the Canvas.\n\t\tdouble widthRatio = (double) MAX_OVERVIEW_WIDTH / (double) m_mapImage.getImageWidth();\n\t\tdouble heightRatio = (double) MAX_OVERVIEW_HEIGHT / (double) m_mapImage.getImageHeight();\n\t\t\n\t\tdouble scaleFactor = widthRatio < heightRatio ? widthRatio : heightRatio;\n\t\t\n\t\t// Set the transform\n\t\tAffine mat = new Affine(new Scale (scaleFactor, scaleFactor));\n\t\t\n\t\tGraphicsContext gc = m_navigationCanvas.getGraphicsContext2D();\n\t\tgc.clearRect(0, 0, m_navigationCanvas.getWidth(), m_navigationCanvas.getHeight());\n\t\t\n\t\t// Draw image\n\t\tm_mapImage.drawImage(m_navigationCanvas, mat, false);\n\t\t\n\t\t// Draw bounding box\n\t\t// TODO: ugh, this is almost correct but its behaving oddly with the left corner X/Y.\n\t\tdouble dx = (sp.getMaxX() - sp.getMaxX() / scale) / 2;\n\t\tdouble dy = (sp.getMaxY() - sp.getMaxY() / scale) / 2;\n\t\t\n\t\t// double box_xl = - b.getMinX();\n\t\t// double box_yl = - b.getMinY();\n\t\t// double box_xr = - b.getMinX() + sp.getMaxX() / scale;\n\t\t// double box_yr = - b.getMinY() + sp.getMaxY() / scale;\n\t\t\n\t\tdouble box_xl = - b.getMinX() + dx;\n\t\tdouble box_yl = - b.getMinY() + dy;\n\t\tdouble box_xr = - b.getMinX() + sp.getMaxX() / scale + dx;\n\t\tdouble box_yr = - b.getMinY() + sp.getMaxY() / scale + dy;\n\t\t\n\t\t// Clamp to limit the min/max view boxes.\n\t\t//if (box_xl < 0) box_xl = 0;\n\t\t//if (box_yl < 0) box_yl = 0;\n\t\t//if (box_xr > m_navigationCanvas.getWidth()) box_xr = m_navigationCanvas.getWidth();\n\t\t//if (box_yr > m_navigationCanvas.getHeight()) box_yr = m_navigationCanvas.getHeight();\n\t\t\n\t\t// Let's describe how the viewport would be in the canvas.\n\t\tVector3<Float> pt1 = m_zoomPane.getActualPixelPosition(box_xl, box_yl);\n\t\tVector3<Float> pt2 = m_zoomPane.getActualPixelPosition(box_xl, box_yr);\n\t\tVector3<Float> pt3 = m_zoomPane.getActualPixelPosition(box_xr, box_yr);\n\t\tVector3<Float> pt4 = m_zoomPane.getActualPixelPosition(box_xr, box_yl);\n\t\t\n\t\t// Save the transform state\n\t\tgc.save();\n gc.setTransform(mat);\n \n\t\tColor c = Color.RED;\n // Draw some lines.\n\t\tgc.beginPath();\n\t\tgc.setStroke(c);\n\t\tgc.setFill(c);\n\t\tgc.setLineWidth(1.0 / scaleFactor);\n\t\t\n gc.moveTo(pt1.x, pt1.y);\n gc.lineTo(pt2.x, pt2.y);\n gc.moveTo(pt2.x, pt2.y);\n gc.lineTo(pt3.x, pt3.y);\n \n gc.moveTo(pt3.x, pt3.y);\n gc.lineTo(pt4.x, pt4.y);\n gc.moveTo(pt4.x, pt4.y);\n gc.lineTo(pt1.x, pt1.y);\n \n gc.stroke();\n gc.closePath();\n \n gc.restore();\n\t}", "public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {\n winW = width;\n winH = height;\n\n gl.glViewport(0, 0, width, height);\n}", "@Override public void resize (int width, int height) {\n\t\tviewport.update(width, height, true);\n\t\tstage.getViewport().update(width, height, true);\n\t}", "protected abstract void onStart(final Viewport viewport);", "protected void processViewport (LightProperties lp, boolean cameraViewport) {\n\t\tCamera camera = lp.camera;\n\t\tShadowMapRegion r = allocator.nextResult(currentLight);\n\n\t\tif (r == null) return;\n\n\t\tTextureRegion region = lp.region;\n\t\tregion.setTexture(frameBuffers[currentPass].getColorBufferTexture());\n\n\t\t// We don't use HdpiUtils\n\t\t// gl commands related to shadow map size and not to screen size\n\t\tGdx.gl.glViewport(r.x, r.y, r.width, r.height);\n\t\tGdx.gl.glScissor(r.x + 1, r.y + 1, r.width - 2, r.height - 2);\n\t\tregion.setRegion(r.x, r.y, r.width, r.height);\n\n\t\tif (cameraViewport) {\n\t\t\tcamera.viewportHeight = r.height;\n\t\t\tcamera.viewportWidth = r.width;\n\t\t\tcamera.update();\n\t\t}\n\t}", "@DISPID(1034)\n @PropPut\n void viewportElement(\n ms.html.ISVGElement rhs);", "@Override\n public void onSurfaceChanged(GL10 unused, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n \n float ratio = (float) width / height;\n /*\n mWidth = width;\n mHeight = height;\n */\n \n // this projection matrix is applied to object coordinates\n // in the onDrawFrame() method\n /*\n Near / far clipping planes, in terms of units away from the camera\n Cannot be negative or 0, should not be close to 0\n */\n //Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 0.5f, 21);\n \n }", "public void setViewportDims(float width, float height) {\n\t\tthis.viewportDims[0] = width;\n\t\tthis.viewportDims[1] = height;\n\t\tthis.viewportRatio = width / height;\n\t}", "@Override\n public void resize(int x, int y) {\n viewport.update(x, y, true);\n }", "@Override\n\tpublic void resize(int width, int height) {\n\t stage.getViewport().update(width, height, true);\n\t}", "@Override\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\n }", "public void setViewport(JViewport paramJViewport) {\n/* 968 */ JViewport jViewport = getViewport();\n/* 969 */ this.viewport = paramJViewport;\n/* 970 */ if (paramJViewport != null) {\n/* 971 */ add(paramJViewport, \"VIEWPORT\");\n/* */ }\n/* 973 */ else if (jViewport != null) {\n/* 974 */ remove(jViewport);\n/* */ } \n/* 976 */ firePropertyChange(\"viewport\", jViewport, paramJViewport);\n/* */ \n/* 978 */ if (this.accessibleContext != null) {\n/* 979 */ ((AccessibleJScrollPane)this.accessibleContext).resetViewPort();\n/* */ }\n/* */ \n/* 982 */ revalidate();\n/* 983 */ repaint();\n/* */ }", "@Override\n public void resize(int width, int height) {game.screenPort.update(width, height, true);}", "@Override\n public void onViewportTapped()\n {\n\n int currentStageNum = stageToRenderToViewport.ordinal();\n\n int nextStageNum = currentStageNum + 1;\n\n if(nextStageNum >= stages.length)\n {\n nextStageNum = 0;\n }\n\n stageToRenderToViewport = stages[nextStageNum];\n }", "public Point worldToViewport(Point dst, Affine.Point src) {\n if (dst == null) {\n dst = new Point();\n }\n dst.x = worldToViewportX(src.x);\n dst.y = worldToViewportY(src.y);\n return dst;\n }", "public int getViewportWidth() {\n return viewport.getWidth();\n }", "public Rectangle worldToViewport(Rectangle dst, Rectangle.Double src) {\n if (dst == null) {\n dst = new Rectangle();\n }\n int x = worldToViewportX(src.x);\n int y = worldToViewportY(src.y);\n int width = (int)(0.5 + src.width * xScaleFactor);\n int height = (int)(0.5 + src.height * yScaleFactor);\n dst.setFrameFromDiagonal(x, y, x + width, y + height);\n return dst;\n }", "@Override\n public void onViewportTapped() {\n\n int currentStageNum = stageToRenderToViewport.ordinal();\n\n int nextStageNum = currentStageNum + 1;\n\n if (nextStageNum >= stages.length) {\n nextStageNum = 0;\n }\n\n stageToRenderToViewport = stages[nextStageNum];\n }", "@Override\n public void resize(int width, int height) {\n bgViewPort.update(width, height, true);\n stage.getViewport().update(width, height, true);\n fonts.getFontViewport().update(width, height, true);\n }", "@Override\n \tprotected void controlRender(RenderManager rm, ViewPort vp) {\n \n \t}", "@Override\r\n\tpublic void resize(GL10 gl, int w, int h) {\n\t\t if (h == 0) \r\n\t\t\t h = 1;\r\n\r\n\t gl.glViewport(0, 0, w, h); // Reset The Current Viewport And Perspective Transformation\r\n\t gl.glMatrixMode(GL10.GL_PROJECTION); // Select The Projection Matrix\r\n\t gl.glLoadIdentity(); // Reset The Projection Matrix\r\n\t GLU.gluPerspective(gl, 45.0f, (float) w / (float) h, 0.1f, 100.0f); // Calculate The Aspect Ratio Of The Window\r\n\t GLU.gluLookAt(gl, 0, 0, -5, 0, 0, 0, 0, 1, 0);\r\n\t gl.glMatrixMode(GL10.GL_MODELVIEW); // Select The Modelview Matrix\r\n\t gl.glLoadIdentity(); // Reset The ModalView Matrix\r\n\t}", "public void setViewPort(int width, int height) {\n String res = Integer.toString(width) + \"x\" + Integer.toString(height);\n this.standardPairs.put(Parameters.VIEWPORT, res);\n }", "public Viewport4i( int leftX, int topY, int rightX, int bottomY) {\r\n\r\n if (Integer.compare(leftX, rightX) < 0) {\r\n _xLeft = leftX;\r\n _xRight = rightX;\r\n } else {\r\n _xRight = leftX;\r\n _xLeft = rightX;\r\n }\r\n\r\n if (Integer.compare(topY, bottomY) < 0) {\r\n _yTop = topY;\r\n _yBottom = bottomY;\r\n } else {\r\n _yBottom = topY;\r\n _yTop = bottomY;\r\n }\r\n\r\n }", "public int getViewportHeight() {\n return viewport.getHeight();\n }", "public void resetViewPort() {\n/* 1453 */ if (this.viewPort != null) {\n/* 1454 */ this.viewPort.removeChangeListener(this);\n/* 1455 */ this.viewPort.removePropertyChangeListener(this);\n/* */ } \n/* 1457 */ this.viewPort = JScrollPane.this.getViewport();\n/* 1458 */ if (this.viewPort != null) {\n/* 1459 */ this.viewPort.addChangeListener(this);\n/* 1460 */ this.viewPort.addPropertyChangeListener(this);\n/* */ } \n/* */ }", "@Override\n public void resize(int w, int h) {\n mainStage.getViewport().update(w, h, true);\n userInterface.getViewport().update(w, h, true);\n }", "private void pageViewport(final int newStart) {\n //save old start and end values\n int origStart = start;\n int origEnd = end;\n //Reset viewport and decide whether viewable must update its display.\n if (resetViewport(newStart) && start != origStart || end != origEnd) {\n viewable.msgViewportPaged();\n }\n }", "private void paintViewport(PM_Picture pic) {\n\n\t\tif (readThumbsThread != null) {\n\t\t\treadThumbsThread.stopIt(); // Stop the thumbsToRead queue\n\t\t\treadThumbsThread = null;\n\t\t}\n\t\tthumbsToRead.clear();\n\n\t\tint pictureSize = indexController.getPictureSize();\n\t\tif (pictureSize <= 0) {\n\t\t\tremoveAllPictureViews();\n\t\t\treturn; // nothing to paint\n\t\t}\n\t\tPoint colRowSize = getColRowSize(pictureSize);\n\t\tint colSize = colRowSize.x;\n\t\tint rowSize = colRowSize.y;\n\t\t// calculate client\n\t\tDimension pictureViewSize = getPreferredSizePictureView();\n\t\tint clientY = (pictureViewSize.height + vGap) * rowSize + vGap;\n\t\tDimension cl = client.getPreferredSize();\n\t\tif (cl.height != clientY) {\n\t\t\tcl.height = clientY;\n\t\t\tclient.setPreferredSize(cl);\n\t\t\tclient.revalidate();\n\t\t}\n\n\t\tPoint fromTo = getColRowSizeInViewPort(pictureViewSize);\n\t\tint fromRow = fromTo.x;\n\t\tint toRow = fromTo.y;\n\t\t\n\t \n\t\tint row = getRow(pic, colRowSize);\n\t \tif (row > 0) {\t\t\n\t\t\tint diff = toRow - fromRow;\n\t\t\tfromRow = row;\n\t\t\ttoRow = fromRow + diff;\nSystem.out.println(\"---- new from/to. from: \"+ fromRow + \", to: \"+ toRow);\n\n\t\t\tPoint vPos = indexViewPort.getViewPosition();\n\t\t\tvPos.y = (pictureViewSize.height + vGap) * row + vGap;\n// change view port position.\n// (the ComponentListener cause painting)\n\t\t\tindexViewPort.setViewPosition(vPos);\n\t }\n\t\t\n\t \t\n\t \t\n\t\t\n\t\t\n\t\tint fromIndex = colSize * fromRow;\n\t\tSet<PM_Picture> picturesInViewport = new HashSet<PM_Picture>();\n\n\t\t\n\t\t\n \t\t\n\t\t\n\t\t\n\t\t// System.out.println(\"............ from row: \" + fromRow\n\t\t// + \",to row \" + toRow\n\t\t// + \",from index: \" + fromIndex);\n\n\t\tclient.removeAll(); // is this necessary ?\n\t//\tclient.repaint(); // ???\n\t\tboolean firstInViewPort = true;\n\t\tfor (int i = 0; i < index.data.getPictureSize(); i++) {\n\t\t\tif (i < fromIndex) {\n\t\t\t\tcontinue; // not yet in the view port\n\t\t\t}\n\t\t\tif (i > (colSize * (toRow + 1)) - 1) {\n\t\t\t\tbreak; // at the end of the view port\n\t\t\t}\n\t\t\tif (firstInViewPort) {\n\t\t\t\tfirstInViewPort = false;\n\t\t\t\tsetNextToRead(i); // to read for import\n\t\t\t}\n\t\t\t// Now we are in the view port.\n\t\t\tPM_Picture picture = index.data.getPicture(i);\n\n\t\t\t// Get or create the pictureView\n\t\t\tPM_PictureView pictureView;\n\t\t\tif (pictureViewTable.containsKey(picture)) {\n\t\t\t\tpictureView = pictureViewTable.get(picture);\n\t\t\t} else {\n\t\t\t\tpictureView = new PM_PictureView (picture,\n\t\t\t\t\t\twindowMain, index);\n\t\t\t\tpictureViewTable.put(picture, pictureView);\n\t\t\t}\n\t\t\tclient.add(pictureView);\n\t\t\tpicturesInViewport.add(picture);\n\t\t\tpictureView.setPictureViewPreferredSize(pictureViewSize);\n\t\t\tRectangle bounds = getBounds(i, colSize, rowSize, pictureViewSize,\n\t\t\t\t\tpictureSize);\n\t\t\tpictureView.setBounds(bounds);\n\t\t\t// now check if the thumb nail is available\n\t\t\tif (picture.hasImageThumbnail() == false) {\n\t\t\t\t// it is not available. \n\t\t\t\t// It must be read in the \"ReadThumbsThread\" inner class.\n\t\t\t\tthumbsToRead.add(picture);\n\t\t\t}\n\t\t} // end for\n\n\t\t// paint now\n\t\tindexViewPort.repaint();\n\t\tindexViewPort.validate();\n\t\t// remove pictureViews not in the view port\n\t\tSet<PM_Picture> keys = pictureViewTable.keySet();\n\t\tkeys.retainAll(picturesInViewport);\n\t\t// read thumbs if not yet painted\n\t\tif (!thumbsToRead.isEmpty()) {\n\t\t\treadThumbsThread = new ReadThumbsThread(this, thumbsToRead,\n\t\t\t\t\tpictureViewTable);\n\t\t\treadThumbsThread.start();\n\t\t}\n\t}", "public void onViewportIn() {\n View child;\n AppWidgetHostView widgetView;\n AppWidgetProviderInfo widgetInfo;\n Intent intent;\n for (int i = this.getChildCount() - 1; i >= 0; i--) {\n try {\n child = this.getChildAt(i);\n if (child instanceof AppWidgetHostView) {\n widgetView = ((AppWidgetHostView) child);\n widgetInfo = widgetView.getAppWidgetInfo();\n int appWidgetId = widgetView.getAppWidgetId();\n intent = new Intent(LauncherIntent.Notification.NOTIFICATION_IN_VIEWPORT)\n .setComponent(widgetInfo.provider);\n intent.putExtra(LauncherIntent.Extra.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n getContext().sendBroadcast(intent);\n }\n } catch (Exception e) {\n // LauncherApplication.reportExceptionStack(e);\n }\n }\n\n }", "public void updateGrid(Viewport viewport) {\n Rectangle view = viewport.getShape();\n if (view.isEmpty()) return;\n\n // Compute the visible user space area from the viewport\n Point2D visibleUL = new Point2D.Double();\n Point2D visibleLR = new Point2D.Double();\n Point viewLL = new Point(view.x, view.height + view.y);\n Point viewUR = new Point(view.width + view.x, view.y);\n viewport.getInverseTransform().transform(viewLL, visibleUL);\n viewport.getInverseTransform().transform(viewUR, visibleLR);\n\n // Dynamic line interval scaling\n double visibleHeight = visibleUL.getY() - visibleLR.getY();\n if (majorInterval > 0) {\n while (visibleHeight / majorInterval > maxThreshold) {\n majorInterval *= intervalScaleFactor;\n }\n while (visibleHeight / majorInterval < minThreshold) {\n majorInterval /= intervalScaleFactor;\n }\n }\n\n if (EditorCommonSettings.getLightGrid()) {\n updateGridMinorCrosses(viewport, majorInterval * minorIntervalFactor);\n updateGridMajorCrosses(viewport, majorInterval);\n } else {\n updateGridMinorLines(viewport, majorInterval * minorIntervalFactor);\n updateGridMajorLines(viewport, majorInterval);\n }\n\n for (GridListener l : listeners) {\n l.gridChanged(this);\n }\n }", "@Before\n public void setDimension() {\n this.view.setDimension(new Dimension(WITDH, HEIGHT));\n }", "@Override\n public void onViewportChanged(Viewport newViewport) {\n chart.setCurrentViewport(newViewport);\n }", "public boolean isInViewport(ObjectWithPosition obj){\n Point viewPoint = convertToViewCoordinates(obj.xCoordinate,obj.yCoordinate);\n if(viewPoint.getX() > 0 && viewPoint.getX() < 1024){\n if(viewPoint.getY() > 0 && viewPoint.getY() < 528){\n return true;\n }\n else return false;\n }\n else return false;\n }", "@Override\n\tpublic void resize(int width, int height) {\n\t\tviewCamera.viewportWidth = width;\n\t\tviewCamera.viewportHeight = height;\n\t\tviewCamera.position.set(0, 0, 0);\n\t\tviewCamera.update();\n\n\t\tVector3 min = MIN_BOUND.cpy();\n\t\tVector3 max = new Vector3(MAX_BOUND.x - width, MAX_BOUND.y - height, 0);\n\t\tviewCamera.project(min, 0, 0, width, height);\n\t\tviewCamera.project(max, 0, 0, width, height);\n\t\tbounds = new BoundingBox(min, max);\n\t\t// do a pan to reset camera position\n\t\tpan(min);\n\t}", "public void onSurfaceChanged(GL10 na, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n }", "public static void createAndShowGUI(){\n\n //the main graph frame\n JFrame mainFrame = new JFrame(\"Graphit\");\n mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n mainFrame.setSize(CANVAS_WIDTH, CANVAS_HEIGHT);\n\n gc = new NGraphitController();\n\n p = new Point(0,0);\n\n // Viewport is to man through the graph.\n vp = new JViewport();\n vp.setSize(100, 100);\n vp.setView(gc);\n mainFrame.add(vp);\n\n mainFrame.pack();\n mainFrame.setLocationRelativeTo(null);\n mainFrame.setVisible(true);\n\n }", "@DISPID(1034)\n @PropGet\n ms.html.ISVGElement viewportElement();", "@Override\n\tpublic void onSurfaceChanged(GL10 gl, int width, int height) {\n\tgl.glViewport(0, 0, width, height);\n\t//set projection matrix as active matrix\n\tgl.glMatrixMode(GL10.GL_PROJECTION); \n\t//load identity matrix to multiply with next matrix operation\n\tgl.glLoadIdentity(); \n\t//set perspective projection(GL10,FovY,Aspect,zNear,zFar)\n\tGLU.gluPerspective(gl, 70,width/(float)height,0.1f, 10f);\n\t//set ModelView matrix as active\n\tgl.glMatrixMode(GL10.GL_MODELVIEW);\n\t}", "public interface ScrollPanel<T> {\n /**\n * Moves the viewport so that {@code location} is at the viewport top.\n *\n * @param location content-space location to appear at the top of the\n * viewport.\n */\n void moveTo(double location);\n\n /** @return the viewport extent of this scroller. */\n Extent getViewport();\n\n /** @return the content extent of this scroller. */\n Extent getContent();\n\n /** @return the extent of a view within this panel. */\n Extent extentOf(T view);\n\n}", "@Override\n protected void controlRender(RenderManager rm, ViewPort vp) {\n }", "private void refreshView(){\n\t\tMain.scroll.setViewportView(container);\n\t\t// setez scrollul jos\n\t\tMain.scroll.getVerticalScrollBar().setValue(Main.scroll.getVerticalScrollBar().getMaximum());\n\t}", "public Affine.Point viewportToWorld(Affine.Point dst, Point src) {\n if (dst == null) {\n dst = new Affine.Point();\n }\n dst.x = viewportToWorldX(src.x);\n dst.y = viewportToWorldY(src.y);\n return dst;\n }", "@Override\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\n stage.mapImg.setHeight(Gdx.graphics.getHeight());\n stage.mapImg.setWidth(Gdx.graphics.getWidth());\n stage.gameUI.show();\n }", "public abstract CDasherView.DRect VisibleRegion();", "private Camera() {\n viewport = new Rectangle();\n dirtyAreas = new ArrayList<Rectangle>();\n renderedAreas = new ArrayList<Rectangle>();\n fullUpdate = false;\n dirtyAreaCounter = 0;\n }", "boolean inViewport(final int index) {\n resetViewport(start);\n return index >= start && index <= end;\n }", "@Override\n public void onSurfaceChanged(GL10 gl, int width, int height) {\n gl.glViewport(0, 0, width, height);\n // To prevent divide by zero\n float aspect = (float)width / height;\n // Set the viewport (display area) to cover the entire window.\n gl.glViewport(0, 0, width, height);\n // Setup perspective projection, with aspect ratio matches viewport\n // Select projection matrix.\n gl.glMatrixMode(GL10.GL_PROJECTION);\n // Reset projection matrix.\n gl.glLoadIdentity();\n // Use perspective projection.\n GLU.gluPerspective(gl, 70, aspect, 0.1f, 200.f);\n // Select model-view matrix.\n gl.glMatrixMode(GL10.GL_MODELVIEW);\n // Reset.\n gl.glLoadIdentity();\n }", "@Override\n public void settings() {\n size(800, 800, P3D);\n }", "private void calculateViewportOffset (int[] xy, int visitorX, int visitorY) {\n Image mapImage = cityMap.getMapImage ();\n\n int mapWidth = mapImage.getWidth ();\n int mapHeight = mapImage.getHeight ();\n\n int vpWidth = getWidth ();\n int vpHeight = getHeight ();\n\n int x = visitorX - (vpWidth / 2);\n int y = visitorY - (vpHeight / 2);\n\n if ((x + vpWidth) > mapWidth) {\n x = mapWidth - vpWidth;\n }\n\n if ((y + vpHeight) > mapHeight) {\n y = mapHeight - vpHeight;\n }\n\n if (x < 0) {\n x = 0;\n }\n\n if (y < 0) {\n y = 0;\n }\n\n xy[X] = x;\n xy[Y] = y;\n }", "public ViewerComponent() {\n int images = layout_threads.size();\n int comp_w = 4*w, comp_h = (h*images)/4; if ((images%4) != 0) comp_h += h;\n Dimension dimension = new Dimension(comp_w, comp_h); setPreferredSize(dimension); setMinimumSize(dimension);\n addMouseListener(this); addMouseMotionListener(this);\n }", "@Override\n\tpublic void init() \n\t{\n\t\tthis.m_view.setCenter(new Vector2f(1024f,1024f));\n\t\t// initilisation de m_centerSought\n\t\tthis.m_centerSought = this.m_view.getCenter();\n\t\t// zoom\n\t\tthis.m_zoom = this.m_zoomSought = 1f;\t\t\n\t\t// size\n\t\tthis.m_sizeNormal = m_size = m_sizeSought = m_sizeBackup = m_sizeInit = this.getView().getSize();\n\t\tthis.m_sizeDown = Vector2f.mul(this.m_sizeNormal, 0.8f);\n\t\tthis.m_sizeUp = Vector2f.mul(m_sizeNormal, 1.2f);\n\t\t\n\t\t// cadre\n\t\tm_cadre = new IntRect(m_spaceScrolling,m_spaceScrolling,(int)this.getView().getSize().x - m_spaceScrolling * 2,(int) this.getView().getSize().y - m_spaceScrolling * 2);\n\t\t\n\t}", "public interface IView {\n void paint(Graphics2D g2D, int x, int y, int width, int height, JPanel jPanel);\n}", "public abstract void windowResized();", "public void settings() {\n int widthOfWindow = 900;\n int heightOfWindow = 900;\n\n //Size of the program window\n size(widthOfWindow, heightOfWindow);\n //making the movement smooth, i think, comes from processing\n smooth();\n }", "@Override\n\tprotected void controlRender(RenderManager rm, ViewPort vp) {\n\t\t\n\t}", "void updatePosition() {\n if (gameScreen.cursorIsOnLeft()) \n {\n // set the panel's rightmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 11/12 - getWidth(), \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n else // Otherwise the cursor must be on the right half of the screen\n {\n // set the panel's leftmost edge to be 1/12th from the edge\n // set the panel's bottommost edge to be 1/6th from the edge\n setLocation(\n gameScreen.getScreenWidth() * 1/12, \n gameScreen.getScreenHeight() * 5/6 - getHeight());\n }\n }", "public void resize (int width, int height) \n\t{ \n\t\tcamera.viewportWidth = (Constants.VIEWPORT_HEIGHT / height) *\n\t\t\twidth;\n\t\tcamera.update();\n\t\tcameraGUI.viewportHeight = Constants.VIEWPORT_GUI_HEIGHT;\n\t\tcameraGUI.viewportWidth = (Constants.VIEWPORT_GUI_HEIGHT\n\t\t\t\t/ (float)height) * (float)width;\n\t\tcameraGUI.position.set(cameraGUI.viewportWidth / 2,\n\t\t\t\tcameraGUI.viewportHeight / 2, 0);\n\t\tcameraGUI.update();\n\t}", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "@Override\n public void reshape(ViewPort vp, int w, int h) {\n Texture2D redTexture = new Texture2D(w, h, Format.RGBA8); // color texture\n Texture2D greenTexture = new Texture2D(w, h, Format.Luminance8); // monochrome texture\n Texture2D blueTexture = new Texture2D(w, h, Format.Luminance8); // monochrome texture\n Texture2D rgbTexture = new Texture2D(w, h, Format.RGBA8); // color texture\n\n fb = new FrameBuffer(w, h, 1);\n fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(redTexture)); // location 0\n fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(greenTexture)); // location 1\n fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(blueTexture)); // location 2\n fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(rgbTexture)); // location 3\n fb.setMultiTarget(true);\n\n display1.setTexture(assetManager, rgbTexture, false);\n display2.setTexture(assetManager, redTexture, false);\n display3.setTexture(assetManager, greenTexture, false);\n display4.setTexture(assetManager, blueTexture, false);\n\n display1.setPosition(0, 0); // lower-left quadrant\n display1.setWidth(w / 2f);\n display1.setHeight(h / 2f);\n\n display2.setPosition(0, h / 2f); // upper-left quadrant\n display2.setWidth(w / 2f);\n display2.setHeight(h / 2f);\n\n display3.setPosition(w / 2f, h / 2f); // upper-right quadrant\n display3.setWidth(w / 2f);\n display3.setHeight(h / 2f);\n\n display4.setPosition(w / 2f, 0f); // lower-right quadrant\n display4.setWidth(w / 2f);\n display4.setHeight(h / 2f);\n\n guiNode.updateGeometricState();\n initialized = true;\n }", "public Border getViewportBorder() {\n/* 571 */ return this.viewportBorder;\n/* */ }", "public void resize( int width, int height ) {\n uiViewport.update( width, height );\n uiCamera.update();\n }", "@Override\n public void resize(int width, int height) {\n camera.viewportWidth = width/25;\n camera.viewportHeight = height/25;\n camera.update();\n }", "@Override\r\n protected void controlRender(RenderManager rm, ViewPort vp) {\n }", "private void createScrollPane() {\n\n\t\t// --------------------------------------------\n\t\t// first create the client\n\t\t// --------------------------------------------\n\t\tclient = new Client(this);\n//\t\tclient.setTransferHandler(PM_TransferHandler.getInstance());\n\t\tfocusPanel = new PM_FocusPanel(null, this, this);\n\n\t\tif (config.isNurLesen()) {\n\t\t\tclient.setBackground(PM_WindowBase.COLOR_NUR_LESEN);\n\t\t} else {\n\t\t\tclient.setBackground(PM_WindowBase.COLOR_BACKGROUND);\n\t\t}\n\t\tclient.setLayout(null); // I do it myself\n\n\t\tclient.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t// System.out.println(\"Inndex View: mouseClicked: requestFocusInWindow aufrufen\");\n\t\t\t\trequestFocusInWindow();\n\t\t\t}\n\t\t});\n\n\t\t// ------------------------------------------\n\t\t// now the scrollpane\n\t\t// ------------------------------------------\n\t\tscrollPane = new JScrollPane(client);\n\t\tindexViewPort = scrollPane.getViewport();\n\n\t\tscrollPane.setWheelScrollingEnabled(false);\n\n\t\t//\t\t \n\t\tscrollPane\n\t\t\t\t.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n\t\t// Achtung: VERTICAL_SCROLLBAR_ALWAYS, da sonst unterschiedliche\n\t\t// ExtendSize und\n\t\t// damit funktioniert der stateChanged nicht mehr.\n\t\tscrollPane\n\t\t\t\t.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n\t\t// ----------------------------------------------------------------------\n\t\t// MouseWheelListener\n\t\t// ----------------------------------------------------------------------\n\t\tMouseWheelListener mwl = new MouseWheelListener() {\n\n\t\t\tpublic void mouseWheelMoved(MouseWheelEvent me) {\n\t\t\t\tmouseWheelChanged(me);\n\t\t\t}\n\t\t};\n\t\tscrollPane.addMouseWheelListener(mwl);\n\n\t\t// ----------------------------------------------------------------------\n\t\t// ChangeListener\n\t\t// ----------------------------------------------------------------------\n\t\tChangeListener cl = new ChangeListener() {\n\t\t\tpublic void stateChanged(ChangeEvent ce) {\n\t\t\t\t// viewPortSizeChanged(ce);\n\t\t\t}\n\t\t};\n\t\tscrollPane.getViewport().addChangeListener(cl);\n\n\t\t// addComponentListener\n\t\tscrollPane.getViewport().addComponentListener(new ComponentAdapter() {\n\t\t\t@Override\n\t\t\tpublic void componentResized(ComponentEvent e) {\n\t\t\t\tviewPortChanged(e);\n\t\t\t}\n\t\t});\n\n\t\t// addAdjustmentListener(AdjustmentListener l)\n\t\t// Scrollbar AdjustmentListener\n\t\tJScrollBar sb = scrollPane.getVerticalScrollBar();\n\t\tsb.addAdjustmentListener(new AdjustmentListener() {\n\n\t\t\t \n\t\t\tpublic void adjustmentValueChanged(AdjustmentEvent e) {\n\t\t\t\tverticalScrollBarChanged(e);\n\n\t\t\t}\n\n\t\t});\n\n\t\t// oldViewPortSize = indexViewPort.getExtentSize();\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "boolean adjustViewport(final int newIndex) {\n //If newIndex is below the viewport, find a start value which puts the index\n //in the viewport.\n if (newIndex > end) {\n return resetViewport(newIndex - size + 1);\n }\n return resetViewport(newIndex);\n }", "public void updateConicalView();", "public WebPlotView() {\n initWidgets();\n _scrollingRootPanel.addDomHandler(new MouseDownHandler() {\n public void onMouseDown(MouseDownEvent ev) {\n if (_mpw != null) _mpw.selectSelf();\n }\n }, MouseDownEvent.getType());\n\n _scrollingRootPanel.addDomHandler(new TouchStartHandler() {\n public void onTouchStart(TouchStartEvent event) {\n if (_mpw != null) _mpw.selectSelf();\n }\n }, TouchStartEvent.getType());\n\n }", "@Override\n public void onSurfaceChanged(GL10 glUnused, int width, int height) {\n // Set the OpenGL viewport to fill the entire surface.\n glViewport(0, 0, width, height);\n }", "public void addViewportListener(ViewportListener l) {\n viewportListeners.addElement(l);\n l.setViewport(getXOrigin(), getYOrigin(),\n\t\t panelWidth, panelHeight);\n }", "public WinScreen()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(1500, 500, 1); \r\n\r\n prepare();\r\n }", "public void onSurfaceChanged(GL10 glUnused, int width, int height)\n {\n GLES20.glViewport(0, 0, width, height);\n float ratio = (float) width / height;\n Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n }", "private void zeichneWindow(int ypos,int xpos, int size)\r\n {\r\n ypos = ypos + size/6;\r\n xpos = xpos + size/6;\r\n size = size/4;\r\n zeichneWand(\"blau\",ypos,xpos,size); \r\n }", "@Override\r\n\tpublic void onSurfaceChanged(GL10 gl, int width, int height) {\n\t\tLog.d(TAG, \"onSurfacechanged\");\r\n\t\tif (height == 0) height = 1; // To prevent divide by zero\r\n\t float aspect = (float)width / height;\r\n\t \r\n\t // Set the viewport (display area) to cover the entire window\r\n\t gl.glViewport(0, 0, width, height);\r\n\t \r\n\t // Setup perspective projection, with aspect ratio matches viewport\r\n\t gl.glMatrixMode(GL10.GL_PROJECTION); // Select projection matrix\r\n\t gl.glLoadIdentity(); // Reset projection matrix\r\n\t // Use perspective projection\r\n\t GLU.gluPerspective(gl, 45, aspect, 0.1f, 100.f);\r\n\t \r\n\t gl.glMatrixMode(GL10.GL_MODELVIEW); // Select model-view matrix\r\n\t gl.glLoadIdentity(); // Reset\r\n\t \r\n\t // You OpenGL|ES display re-sizing code here\r\n\t // ......\r\n\t}", "public float getViewportRatio() {\n\t\treturn viewportRatio;\n\t}", "public void resetView() {\n pause();\n if (spriteView != null) spriteView.setViewport(new Rectangle2D(0, 0, rect.getWidth(), rect.getHeight()));\n }" ]
[ "0.73044086", "0.72269714", "0.7111849", "0.6997713", "0.6957558", "0.6943926", "0.67421323", "0.6696954", "0.6670225", "0.6667412", "0.66588145", "0.6650958", "0.6623168", "0.6500403", "0.64315426", "0.6426424", "0.6412263", "0.63743114", "0.6292947", "0.6292947", "0.6256963", "0.62321836", "0.6207732", "0.6191638", "0.6185936", "0.6141129", "0.61366385", "0.61312824", "0.61257905", "0.6122509", "0.6117902", "0.6089836", "0.6084634", "0.6079713", "0.607267", "0.6071281", "0.600084", "0.5982521", "0.5959104", "0.59532976", "0.59450746", "0.5937166", "0.59347945", "0.5904315", "0.5898623", "0.58719397", "0.58642113", "0.58496815", "0.5832672", "0.5823989", "0.58136964", "0.58029306", "0.57956535", "0.5793024", "0.57847404", "0.57728505", "0.5756909", "0.57428247", "0.57367414", "0.57250804", "0.5721957", "0.5719867", "0.5704068", "0.5702329", "0.56973386", "0.5693683", "0.5691755", "0.56863356", "0.5679081", "0.56706935", "0.5663892", "0.5661204", "0.5660827", "0.56606907", "0.5656666", "0.564578", "0.56429684", "0.5636363", "0.5631701", "0.56207067", "0.5618009", "0.56130606", "0.56107163", "0.5607699", "0.56008303", "0.56006855", "0.5600679", "0.5598382", "0.55800056", "0.5570464", "0.5552972", "0.5550769", "0.55471194", "0.5529219", "0.55270153", "0.55151033", "0.5511301", "0.5508343", "0.5505525", "0.55020994", "0.54994106" ]
0.0
-1
TODO Autogenerated method stub
@Override public void redo() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public Handler getId() { return null; }
{ "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
Il costruttore della classe.
public Rules(ChessboardMatrix chessboard) { this.chessboard = chessboard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Classe() {\r\n }", "public Clade() {}", "public Caso_de_uso () {\n }", "public Propiedad(){\n\t}", "public Alojamiento() {\r\n\t}", "public Sistema(){\r\n\t\t\r\n\t}", "public void consulterClassement() {\n\t\t\n\t}", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "public Carrera(){\n }", "public ControladorCoche() {\n\t}", "public Troco() {\n }", "public Vehiculo() {\r\n }", "public Cgg_jur_anticipo(){}", "public Kullanici() {}", "public Exercicio(){\n \n }", "public Propuestas() {}", "public Corso() {\n\n }", "public Candidatura (){\n \n }", "private ControleurAcceuil(){ }", "public SlanjePoruke() {\n }", "protected Asignatura()\r\n\t{}", "public Datos(){\n }", "public Contato() {\n }", "public AfiliadoVista() {\r\n }", "public Doc_estado() {\n }", "public Oveja() {\r\n this.nombreOveja = \"Oveja\";\r\n }", "public Carrinho() {\n\t\tsuper();\n\t}", "public TCubico(){}", "public Veiculo() {\r\n\r\n }", "public Livro() {\n\n\t}", "public AntrianPasien() {\r\n\r\n }", "public Persona(){\n \n }", "public Persona(){\n \n }", "public Curso() {\r\n }", "public prueba()\r\n {\r\n }", "public Cohete() {\n\n\t}", "private DittaAutonoleggio(){\n \n }", "public Coche() {\n super();\n }", "public RepositorioTransacaoHBM() {\n\n\t}", "public CianetoClass() {\r\n this.cianetoMethods = new Hashtable<String, Object>();\r\n this.cianetoAttributes = new Hashtable<String, Object>();\r\n }", "public CTematicaBienestar() {\r\n\t}", "public Prova() {}", "public Propiedad() {\n bdPropiedad = new DaoPropiedad();\n bdComentario = new DaoComentario();\n }", "private BaseDatos() {\n }", "public Producto (){\n\n }", "public Transportista() {\n }", "public ControladorCatalogoEstado() {\r\n }", "public CrearQuedadaVista() {\n }", "public contrustor(){\r\n\t}", "public Sobre() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public LecturaPorEvento() \r\n {\r\n }", "public Produto() {}", "public Ctacliente() {\n\t}", "public Pasien() {\r\n }", "public ProtocoloDAO() {\n }", "public ControllerProtagonista() {\n\t}", "public Documento() {\n\n\t}", "public MorteSubita() {\n }", "public FicheConnaissance() {\r\n }", "public TipoDocumentoMB() {\n tipoDoc = new TipoDocPersona();\n }", "public Composante() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Aritmetica(){ }", "public Tabono() {\n }", "public Plato(){\n\t\t\n\t}", "public TipoPrestamo() {\n\t\tsuper();\n\t}", "public VotacaoSegundoDia() {\n\n\t}", "public TebakNusantara()\n {\n }", "public InventarioControlador() {\n }", "public Producto() {\r\n }", "Constructor() {\r\n\t\t \r\n\t }", "public paciente()\n {\n con = new bdconexion(); //instancia la clase bdconexion\n }", "public MPaciente() {\r\n\t}", "public Persona() {\n \t\n }", "public FiltroMicrorregiao() {\r\n }", "public Estado() {\r\n }", "public ControladorPrueba() {\r\n }", "public Commande() {\n }", "public ModeloMenuBase() {\n\t\tinicializar();\n\t}", "public Persona() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Controlador() {\n\t\t// m\n\t\tdatosPrueba1 = new ListaEnlazada();\n\t\t// m\n\t\tdatosPrueba2 = new ListaEnlazada();\n\t\t// add\n\t\tdatosPrueba3 = new ListaEnlazada();\n\t\tdatosPrueba4 = new ListaEnlazada();\n\t\tprueba1 = new Estadisticas(datosPrueba1);\n\t\tprueba2 = new Estadisticas(datosPrueba2);\n\t\tprueba3 = new Estadisticas(datosPrueba3);\n\t\tprueba4 = new Estadisticas(datosPrueba4);\n\t\t// finAdd\n\t}", "public Salle() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public ClasseBean() {\r\n }", "public ClasseBean() {\r\n }", "public Odontologo() {\n }", "public Persona() {\n\t}", "public Estudiante() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public Libro() {\r\n }", "public Gasto() {\r\n\t}", "public Empleado() { }", "private TMCourse() {\n\t}", "public ChoixEntreprise() {\n\n }", "public Banco(){}", "public Unidadmedida() {\r\n\t}", "public Estado() {\n }", "public Venda() {\n }", "public Casa() { \n \n /* Cuando se crea la casa, tambien se debe crear la puerta */\n \n laPuerta = new Puerta();\n \n /* se pone la letra F por que son de tipo float */\n laPuerta.setAncho(2.3F);\n laPuerta.setAlto(1.5F);\n \n }", "public GestioneApplicazione() {\n }", "public UConnecte() {\n\t\tsuper();\n\t}", "public TipoInformazioniController() {\n\n\t}", "public TdRuspHijo() { }", "public Chauffeur() {\r\n\t}" ]
[ "0.69941944", "0.6845446", "0.68403924", "0.681646", "0.67893076", "0.67629975", "0.6749197", "0.67413914", "0.67292786", "0.66998523", "0.66813666", "0.66329974", "0.66322994", "0.66182643", "0.66116554", "0.6596058", "0.6580904", "0.65736324", "0.65735376", "0.6546191", "0.6543733", "0.6534482", "0.65262043", "0.6524893", "0.651754", "0.6515699", "0.6512815", "0.6511622", "0.6496951", "0.6491609", "0.64905554", "0.6489701", "0.6489701", "0.64794046", "0.64741933", "0.64729494", "0.647228", "0.6471363", "0.64567196", "0.645636", "0.6443519", "0.6442975", "0.6442274", "0.64417696", "0.6431932", "0.64257735", "0.6425273", "0.6418049", "0.6413527", "0.641015", "0.6408605", "0.6406843", "0.640089", "0.6397874", "0.6394724", "0.6378206", "0.6372718", "0.6370485", "0.6359836", "0.6358731", "0.63571876", "0.6347476", "0.63467616", "0.6344174", "0.63307506", "0.632911", "0.6323701", "0.6322139", "0.6313125", "0.6307657", "0.6300621", "0.63004464", "0.62994576", "0.6298221", "0.62914735", "0.62897694", "0.628503", "0.6284985", "0.62671006", "0.62663263", "0.6265549", "0.62605566", "0.62605566", "0.62536603", "0.62456656", "0.6243548", "0.6243072", "0.6242324", "0.62379533", "0.62362576", "0.6233271", "0.6230376", "0.6230139", "0.6230064", "0.62295043", "0.6220156", "0.62195224", "0.6219507", "0.6218502", "0.62169737", "0.62153924" ]
0.0
-1
Ritorna l'insieme delle coordinate delle pedine che impediscono lo scacco matto.
public ArrayList<Coordinates> getSafetyPositions(Coordinates c){ if (chessboard.at(c) instanceof King) return getKingSafetyPositions(); return getHeroesPositions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}", "void imprimeValores(){\n System.out.println(\"coordenada del raton:(\"+pratonl[0][0]+\",\"+pratonl[0][1]+\")\");\n System.out.println(\"coordenada del queso:(\"+pquesol[0][0]+\",\"+pquesol[0][1]+\")\");\n imprimeCalculos();//imprime la diferencia entre las X y las Y de las coordenadas\n movimiento();\n }", "public static void main (String[] args)\r\n {\n Coordenada utm = new Coordenada(new Datum(6378388D, 6356911.94612795),\r\n\t\t\t 481742, 4770800, 700, (byte)29, true);\r\n //System.out.println(\"lon=\"+utm.getLon()+\" lat=\"+utm.getLat());\r\n //System.out.println(utm.getGrados(utm.getLon())+\"¦ \"+utm.getMinutos(utm.getLon())+\"' \"+utm.getSegundos(utm.getLon())+\"\\\" \"+utm.getGrados(utm.getLat())+\"¦ \"+utm.getMinutos(utm.getLat())+\"' \"+utm.getSegundos(utm.getLat())+\"\\\"\");\r\n @SuppressWarnings(\"unused\")\r\n Coordenada res;\r\n res = utm.CambioDeDatum(new Datum(6378137D, 6356752.31424518));\r\n\r\n //System.out.println(\"Coordenadas en Datum destino: X=\"+res.X+\" Y=\"+res.Y);\r\n //System.out.println(\"lon=\"+res.getLon()+\" lat=\"+res.getLat());\r\n //System.out.println(res.getGrados(res.getLon())+\"¦ \"+res.getMinutos(res.getLon())+\"' \"+res.getSegundos(res.getLon())+\"\\\" \"+res.getGrados(res.getLat())+\"¦ \"+res.getMinutos(res.getLat())+\"' \"+res.getSegundos(res.getLat())+\"\\\"\");\r\n\t\t\t\t \r\n }", "@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }", "@Override\r\n public void moverAyuda() {\n System.out.println(\"La reina puede mover hacia cualquier dirección en linea recta / diagonal\");\r\n }", "public void revisaColisionMapa() {\n\t\tactualCol = (int)x / tamTile;\n\t\tactualRen = (int)y / tamTile;\n\t\t\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\t\t\n\t\txtemp = x;\n\t\tytemp = y;\n\t\t\n\t\tcalcularEsquinas(x, ydest);\n\t\tif(dy < 0) {\n\t\t\tif(arribaIzq || arribaDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = actualRen * tamTile + claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\tif(dy > 0) {\n\t\t\tif(abajoIzq || abajoDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tcayendo = false;\n\t\t\t\tytemp = (actualRen + 1) * tamTile - claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcalcularEsquinas(xdest, y);\n\t\tif(dx < 0) {\n\t\t\tif(arribaIzq || abajoIzq) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = actualCol * tamTile + clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif(dx > 0) {\n\t\t\tif(arribaDer || abajoDer) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (actualCol + 1) * tamTile - clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!cayendo) {\n\t\t\tcalcularEsquinas(x, ydest + 1);\n\t\t\tif(!abajoIzq && !abajoDer) {\n\t\t\t\tcayendo = true;\n\t\t\t}\n\t\t}\n\t}", "public void setPosicion(){\n ejeX = 0;\n ejeY = 0;\n }", "public void mou(){\n\n this.setY(getY() + getVelocitatY());\n this.setX(getX() + getVelocitatX());\n\n }", "private void posicionInicial(int ancho){\r\n posicionX = ancho;\r\n Random aleatroio = new Random();\r\n int desplazamiento = aleatroio.nextInt(150)+100;\r\n \r\n \r\n cazaTie = new Rectangle2D.Double(posicionX, desplazamiento, anchoEnemigo, alturaEnemigo);\r\n }", "public void darCoordenadasIniciales() \r\n\t{\t\r\n\t\tint coordenadasX = 0;\r\n\t\tint coordenadasY = 1;\r\n\t\tint orientacion = 2;\r\n\t\t\r\n\t\tfor (int x = 0; x<palabras.size();x++) \r\n\t\t{\r\n\t\t\tpalabras.get(x).get(0).setX(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasX)));\r\n\t\t\tpalabras.get(x).get(0).setY(Integer.parseInt(manejadorArchivos.getPalabras().get(coordenadasY)));\r\n\t\t\tpalabras.get(x).get(0).setOrientacion(manejadorArchivos.getPalabras().get(orientacion));\r\n\t\t\t\r\n\t\t\t coordenadasX = coordenadasX +4;\r\n\t\t\t coordenadasY = coordenadasY + 4;\r\n\t\t\t orientacion = orientacion + 4;\r\n\t\t}\r\n\t}", "private DPoint m2833m() {\r\n IPoint iPoint = new IPoint();\r\n this.f1769m.mo353a(this.f1761e.latitude, this.f1761e.longitude, iPoint);\r\n IPoint iPoint2 = new IPoint();\r\n this.f1769m.mo353a(this.f1762f.latitude, this.f1762f.longitude, iPoint2);\r\n IPoint iPoint3 = new IPoint();\r\n this.f1769m.mo353a(this.f1763g.latitude, this.f1763g.longitude, iPoint3);\r\n double d = (double) iPoint.f3639x;\r\n double d2 = (double) iPoint.f3640y;\r\n double d3 = (double) iPoint2.f3639x;\r\n double d4 = (double) iPoint2.f3640y;\r\n double d5 = (double) iPoint3.f3639x;\r\n double d6 = (double) iPoint3.f3640y;\r\n double d7 = (((d6 - d2) * ((((d4 * d4) - (d2 * d2)) + (d3 * d3)) - (d * d))) + ((d4 - d2) * ((((d2 * d2) - (d6 * d6)) + (d * d)) - (d5 * d5)))) / (((2.0d * (d3 - d)) * (d6 - d2)) - ((2.0d * (d5 - d)) * (d4 - d2)));\r\n double d8 = (((d5 - d) * ((((d3 * d3) - (d * d)) + (d4 * d4)) - (d2 * d2))) + ((d3 - d) * ((((d * d) - (d5 * d5)) + (d2 * d2)) - (d6 * d6)))) / (((2.0d * (d4 - d2)) * (d5 - d)) - ((2.0d * (d6 - d2)) * (d3 - d)));\r\n this.f1773q = Math.sqrt(((d - d7) * (d - d7)) + ((d2 - d8) * (d2 - d8)));\r\n this.f1774r = m2830a(d7, d8, d, d2);\r\n d = m2830a(d7, d8, d3, d4);\r\n this.f1775s = m2830a(d7, d8, d5, d6);\r\n if (this.f1774r < this.f1775s) {\r\n if (d <= this.f1774r || d >= this.f1775s) {\r\n this.f1775s -= 6.283185307179586d;\r\n }\r\n } else if (d <= this.f1775s || d >= this.f1774r) {\r\n this.f1775s += 6.283185307179586d;\r\n }\r\n return new DPoint(d7, d8);\r\n }", "public void statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "private void positionMinimap(){\n\t\tif(debutX<0)//si mon debutX est negatif(ca veut dire que je suis sorti de mon terrain (ter))\n\t\t\tdebutX=0;\n\t\tif(debutX>ter.length)//si debutX est plus grand que la taille de mon terrain(ter).\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY<0)\n\t\t\tdebutY=0;\n\t\tif(debutY>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\tif(debutX+100>ter.length)\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY+100>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\t//cette fonction est appelee uniquement si le terrain est strictement Superieur a 100\n\t\t// Donc je sais que ma fin se situe 100 cases apres.\n\t\tfinX=debutX+100;\n\t\tfinY=debutY+100;\n\t}", "public void setPosicionMapa() {\n\t\txmapa = mapaTile.getx();\n\t\tymapa = mapaTile.gety();\n\t}", "long getCoordinates();", "long getCoordinates();", "public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}", "public logicaEnemigos(){\n\t\t//le damos una velocidad inicial al enemigo\n\t\tsuVelocidad = 50;\n\t\tsuDireccionActual = 0.0;\n\t\tposX = 500 ;\n\t\tposY = 10;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Unesite koordinatu prve tacke x1: \");\r\n\t\tdouble x1=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu prve tacke y1: \");\r\n\t\tdouble y1=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu druge tacke x2: \");\r\n\t\tdouble x2=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu druge tacke y2: \");\r\n\t\tdouble y2=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu trece tacke x3: \");\r\n\t\tdouble x3=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu trece tacke y3: \");\r\n\t\tdouble y3=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu cetvrte tacke x4: \");\r\n\t\tdouble x4=provjera();\r\n\t\t\r\n\t\tSystem.out.println(\"Unesite koordinatu cetvrte tacke x4: \");\r\n\t\tdouble y4=provjera();\r\n\t\t\r\n\t\t//kreiranje objekata\r\n\t\tLinearEquation linear= LinearEquation.getIntersectingPoint(x1, y1, x2, y2, x3, y3, x4, y4);\r\n\t\t\r\n\t\t//ispis rezultata\r\n\t\tif(linear.isSolvable()){\r\n\t\t\tSystem.out.print(\"Presjek dvije prave je u tacki sa koordinatama x=\" + linear.getX()+ \" i y=\" + linear.getY());\r\n\t\t}else{\r\n\t\t\tSystem.out.print(\"Prave su paralelne!!!\");\r\n\t\t}\r\n\t\t\r\n\t\tunos.close();\r\n\t}", "public void dirigirHaciaPunto(int x, int y){ \r\n\r\n\tint coordenadaXObjetivo;\r\n\tint coordenadaYObjetivo;\r\n\tint distanciaEnX;\r\n\tint distanciaEnY;\r\n\tint incrementoDesplazamiento = 1;\t\t\r\n\t\t\t\t\t\t\r\n\tcoordenadaXObjetivo = x;\t\r\n\tdistanciaEnX = coordenadaXObjetivo - this.x;\r\n\t\t\t\t\t\r\n\tcoordenadaYObjetivo = y;\t\r\n\tdistanciaEnY = coordenadaYObjetivo - this.y;\r\n\t\r\n\tif(distanciaEnX <= 0){\r\n\t\tif (distanciaEnX == 0){\r\n\t\t\tif(distanciaEnY < 0){\r\n\t\t\t\tthis.y -= incrementoDesplazamiento; \r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\tthis.y += incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse{\r\n\t\t\tif(distanciaEnY <= 0){\r\n\t\t\t\tif(distanciaEnY == 0){\r\n\t\t\t\t\tthis.x -= incrementoDesplazamiento;\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tthis.x -= incrementoDesplazamiento;\r\n\t\t\t\t\tthis.y -= incrementoDesplazamiento;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tthis.x -= incrementoDesplazamiento;\r\n\t\t\t\tthis.y += incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\telse{\r\n\t\tif(distanciaEnY <= 0){\r\n\t\t\tif(distanciaEnY == 0){\r\n\t\t\t\tthis.x +=incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse{\r\n\t\t\t\tthis.x +=incrementoDesplazamiento;\r\n\t\t\t\tthis.y -= incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse{\r\n\t\t\tthis.x +=incrementoDesplazamiento;\r\n\t\t\tthis.y += incrementoDesplazamiento;\r\n\t\t}\r\n\t}\r\n\t\r\n\tif((this.x >= x - incrementoDesplazamiento) && (this.x <= x + incrementoDesplazamiento) && \r\n\t\t\t(this.y >= y - incrementoDesplazamiento) && (this.y <= y + incrementoDesplazamiento)){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.entroAlCirculo = true;\r\n\t\t\r\n\t\t}\t\t\t\t\t\t\t\t\t\r\n\t}", "public void caminho(Scene cena) {\n\t\tPoint min = new Point((int)this.x, (int)this.y);\n\t\tPoint max = new Point((int)this.x + this.width, (int)this.y + this.height);\n\t\t\n\t\tVector<?>tiles = cena.getTilesFromPosition(min, max);\n\t\t\n\t\tfor (int i = 0; i < tiles.size(); i++){\n\t\t\tTileInfo tile = (TileInfo)tiles.elementAt(i);\n\t\t\t\n\t\t\tif(controle.colisao(this, tile)==true){\n\t\t\t\tif(colisaoVertical(this, tile)){\n\t\t\t\tif(tile.y + tile.height - 2 < this.y){\n\t\t\t\t\tthis.y = tile.y + tile.height;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(tile.y > this.y + this.height - 2){\n\t\t\t\t\tthis.y = tile.y - this.height;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\tif(colisaoHorizontal(this, tile)){\n\t\t\t\t\tif(tile.x + tile.height - 2 < this.x){\n\t\t\t\t\t\tthis.x = tile.x + tile.width;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\telse if(tile.x > this.x + this.width - 2){\n\t\t\t\t\t\tthis.x = tile.x - tile.width;\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\t\n\t}", "private static int[] ubicarPosicionCero(int[][] estado) {\n\t\tfor(int i = 0 ; i < estado.length ; i++) {\n\t\t\tfor(int j = 0 ; j < estado.length ; j++) {\n\t\t\t\tif(estado[i][j]==0) {\n\t\t\t\t\tSystem.out.println(\"La posicion del espacio cero es: \"+ i +\",\"+j);\n\t\t\t\t\treturn new int[] {i,j};\n\t\t\t\t}\n\t\t\t\t//System.out.println(\"La posicion del espacio cero es: \"+ i +\",\"+j);\n\t\t\t\t//posicion[0]= i;\n\t\t\t\t//posicion[1]=j;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "Punto(){\r\n x=0;\r\n y=0;\r\n }", "public void caminho(Scene cena) {\n\t\tPoint min = new Point((int)this.x,(int)this.y);\n\t\tPoint max = new Point((int)this.x+this.width,(int)this.y+this.height);\n\t\t\n\t\tVector<?>tiles=cena.getTilesFromPosition(min,max);\n\t\tfor (int i = 0; i < tiles.size(); i++) {\n\t\t\tTileInfo tile = (TileInfo) tiles.elementAt(i);\n\t\t\t\n\t\t\tif(controle.colisao(this, tile)==true) {\n\t\t\t\tif(colisaoVertical(this,tile)) {\n\t\t\t\tif(tile.y+tile.height-2<this.y) {\n\t\t\t\t\tthis.y=tile.y+tile.height;\n\t\t\t\t}else if(tile.y>this.y+this.height-2) {\n\t\t\t\t\tthis.y= tile.y - tile.height;\n\t\t\t\t}\n\t\t\t}\t\n\t\t\tif(colisaoHorizontal(this,tile)) {\n\t\t\t\tif(tile.x>this.x+this.width-2) {\n\t\t\t\t\tthis.x=tile.x-this.width;\n\t\t\t\t}else {\n\t\t\t\t\tthis.x =tile.x + tile.width; \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "public Coordenada (Datum _d, double x, double y, double z,\r\n\t\t byte _zona, boolean _hemisferio_N)\r\n {\r\n d = _d;\r\n X = x;\r\n Y = y;\r\n Z = z; // Altura ortometrica, sobre NMMA\r\n zona = _zona;\r\n zona_ori = _zona;\r\n hemisferio_N = _hemisferio_N;\r\n GenerarCoordenadasGeograficas();\r\n }", "public Sijainti() {\n this.x = 0;\n this.y = 0;\n }", "public void testOctaedre() {\n\t\t\t\n\t\t\tSolide i = Octaedre.octaedre();\n\t\t\t\n\t\t\t/* creation de points qui ont les memes coordonnees que ceux qui \n\t\t\t * constituent notre solide (car octaedre() n'a pas de parametres)\n\t\t\t */\n\t\t\t\n\t\t\tPoint p1 = new Point(-25, 0,-25);\n\t\t\tPoint p2 = new Point(-25, 0,25);\n\t\t\tPoint p3 = new Point(25, 0,-25);\n\t\t\tPoint p4 = new Point(25,0,25);\n\t\t\tfloat hauteur = (float) (50/Math.sqrt(2));\n\t\t\t// on se sert de la hauteur pour donnee les coordonees des sommets manquant\n\t\t\tPoint p5 = new Point(0, hauteur,0);\n\t\t\tPoint p6 = new Point(0,-hauteur,0);\n\t\t\t\n\t\t\t//On teste si les points de l'octaedre i sont bien les memes que ceux créés\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getAbscisse()==(p1.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(1).getAbscisse()==(p2.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(5).getAbscisse()==(p3.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(3).getAbscisse()==(p4.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(2).getAbscisse()==(p5.getAbscisse()));\n\t\t\tassertTrue(i.getPoint().get(0).getAbscisse()==(p6.getAbscisse()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getOrdonnee()==(p1.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(1).getOrdonnee()==(p2.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(5).getOrdonnee()==(p3.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(3).getOrdonnee()==(p4.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(2).getOrdonnee()==(p5.getOrdonnee()));\n\t\t\tassertTrue(i.getPoint().get(0).getOrdonnee()==(p6.getOrdonnee()));\n\t\t\t\n\t\t\tassertTrue(i.getPoint().get(4).getProfondeur()==(p1.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(1).getProfondeur()==(p2.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(5).getProfondeur()==(p3.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(3).getProfondeur()==(p4.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(2).getProfondeur()==(p5.getProfondeur()));\n\t\t\tassertTrue(i.getPoint().get(0).getProfondeur()==(p6.getProfondeur()));\n\t\t\t\n\t\t\t//On teste si les faces de l'octaedre contiennent bien les points créés\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(0).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(0).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(1).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(1).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(2).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(2).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(3).contient(p1));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(3).contient(p6));\n\t\t\n\t\t\tassertTrue(i.getFaces().get(4).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(4).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(5).contient(p3));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(5).contient(p6));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(6).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(6).contient(p5));\n\t\t\t\n\t\t\tassertTrue(i.getFaces().get(7).contient(p2));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p4));\n\t\t\tassertTrue(i.getFaces().get(7).contient(p6));\n\t\t\t\n\t\t\t\n\t\t\t\n\t}", "public void tetraederzeichnen(double ax,double ay,double bx,double by,double cx,double cy,double dx,double dy){\n double[][] arr_koordinaten_2d ={{ax,ay},{bx,by},{cx,cy},{dx,dy}};\n /**\n * Aufruf der Methode gestricheltodernicht\n *\n * Überprüft, welche Strecken von Punkt D sichtbar sind oder nicht.\n */\n\n boolean[] strichelnodernicht = cls_berechnen.gestricheltodernicht(arr_koordinaten_2d);\n\n /**Skaliert die Koordinaten zum Pixelformat mit Koordinatenursprung\n * ca in der Mitte der Zeichenfläche*/\n int sw=9; //skalierungswert\n ax= (sw+ax)*50;\n ay=(sw-ay)*50;\n bx= (sw+bx)*50;\n by=(sw-by)*50;\n cx= (sw+cx)*50;\n cy=(sw-cy)*50;\n dx= (sw+dx)*50;\n dy=(sw-dy)*50;\n\n /**\n * Erstellt Linienobjekte für die Kanten des Tetraeder Objekts...\n */\n Line line1 = new Line();\n Line line2 = new Line();\n Line line3 = new Line();\n Line line4 = new Line();\n Line line5 = new Line();\n Line line6 = new Line();\n\n /**\n * ... weißt ihnen die Koordinaten zu...\n */\n line1.setStartX(ax);\n line1.setStartY(ay);\n line1.setEndX(bx);\n line1.setEndY(by);\n\n line2.setStartX(ax);\n line2.setStartY(ay);\n line2.setEndX(cx);\n line2.setEndY(cy);\n\n line3.setStartX(bx);\n line3.setStartY(by);\n line3.setEndX(cx);\n line3.setEndY(cy);\n \n line4.setStartX(dx);\n line4.setStartY(dy);\n line4.setEndX(ax);\n line4.setEndY(ay);\n\n line5.setStartX(dx);\n line5.setStartY(dy);\n line5.setEndX(bx);\n line5.setEndY(by);\n\n line6.setStartX(dx);\n line6.setStartY(dy);\n line6.setEndX(cx);\n line6.setEndY(cy);\n \n if(!strichelnodernicht[0]){\n line4.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[1]){\n line5.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[2]){\n line6.getStrokeDashArray().addAll(5d,5d);}\n\n /**\n * ... und fügt die Linien Objekte der Zeichenfläche hinzu\n */\n canvaspane.getChildren().add(line1);\n canvaspane.getChildren().add(line2);\n canvaspane.getChildren().add(line3);\n canvaspane.getChildren().add(line4);\n canvaspane.getChildren().add(line5);\n canvaspane.getChildren().add(line6);\n\n //zeichnet den Koordinatenursprung neu\n canvaspane.getChildren().add(l1);\n canvaspane.getChildren().add(l2);\n }", "public Coordinate getCoordenadasActuales() ;", "void crtajKocka( Graphics g ) {\n double teta = Math.PI * a / 180.0;\n double fi = Math.PI * izvishuvanje / 180.0;\n float kosinusT = (float)Math.cos( teta ), sinusT = (float)Math.sin( teta );\n float kosinusP = (float)Math.cos( fi ), sinusP = (float)Math.sin( fi );\n float kosinusTkosinusP = kosinusT*kosinusP, kosinusTsinusP = kosinusT*sinusP,\n sinusTkosinusP = sinusT*kosinusP, sinusTsinusP = sinusT*sinusP;\n\n // project vertices onto the 2D viewport\n Point[] tocki;\n tocki = new Point[ stranaKocka.length ];\n int j;\n int merka = sirina/4;\n float blisku = 3; // distance from eye to near plane\n float bliskuDoObjekt = 1.5f; // distance from near plane to center of object\n for ( j = 0; j < stranaKocka.length; ++j ) {\n int x0 = stranaKocka[j].x;\n int y0 = stranaKocka[j].y;\n int z0 = stranaKocka[j].z;\n\n // compute an orthographic projection\n float x1 = kosinusT*x0 + sinusT*z0;\n float y1 = -sinusTsinusP*x0 + kosinusP*y0 + kosinusTsinusP*z0;\n\n // now adjust things to get a perspective projection\n float z1 = kosinusTkosinusP*z0 - sinusTkosinusP*x0 - sinusP*y0;\n x1 = x1*blisku/(z1+blisku+bliskuDoObjekt);\n y1 = y1*blisku/(z1+blisku+bliskuDoObjekt);\n\n // the 0.5 is to round off when converting to int\n tocki[j] = new Point(\n (int)(sirina/2 + merka*x1 + 0.5),\n (int)(visina/2 - merka*y1 + 0.5)\n );\n }\n\n // draw the wireframe\n g.setColor( Color.LIGHT_GRAY);\n g.fillRect( 0, 0, sirina, visina );\n g.setColor( Color.white );\n for ( j = 0; j < rabovi.length; ++j ) {\n g.drawLine(\n tocki[ rabovi[j].a ].x, tocki[ rabovi[j].a ].y,\n tocki[ rabovi[j].b ].x, tocki[ rabovi[j].b ].y\n );\n }\n }", "public void resta(){\r\n\t\tSystem.out.println(\"Esta es la :\");\r\n\t\tSystem.out.println(this.getX() - this.getY());\r\n\t}", "protected void mover(){\r\n\t\r\n\t\t\r\n\t\tint centroX;\r\n\t\tint centroY;\r\n\t\tint radioGiro1;\r\n\t\tint coordX;\r\n\t\tint incrementoY;\r\n\t\tint diferenciaEnX;\r\n\t\t\r\n\t\tif(! this.entroAlCirculo){\r\n\t\t\tdirigirHaciaPunto(this.centroGiroX, (this.centroGiroY - this.radioGiro));\r\n\t\t}\r\n\t\t\r\n\t\telse{\t\t\t\t\r\n\t\t\t\r\n\t\t\tcentroX = this.centroGiroX;\r\n\t\t\tcentroY = this.centroGiroY;\r\n\t\t\tincrementoY = 1;\r\n\t\t\tradioGiro1 = this.radioGiro;\r\n\t\t\t\r\n\t\t\tif(this.x > centroX){\t\t\t\t\t\r\n\t\t\t\tthis.regresando = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.regresando){ //chequea si el avion se sobrepasa de los limites verticales del circulo, si es el caso cambia la direccion\r\n\t\t\t\t\r\n\t\t\t\tif((this.y - incrementoY) < (centroY - radioGiro1)){\r\n\t\t\t\t\tthis.regresando = false;\r\n\t\t\t\t}\r\n\t\t\t\telse{}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\tif((this.y + incrementoY) > (centroY + radioGiro1)){\r\n\t\t\t\t\t\tthis.regresando = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse{}\r\n\t\t\t}\t\t\t\r\n\t\t\tif ((this.y <= (centroGiroY + (radioGiro - incrementoY))) || (this.y >= (centroGiroY - (radioGiro - incrementoY)))){\r\n\t\t\t\t\r\n\t\t\t\tif(this.regresando){\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**calcula la posicion de x de acuerdo al movimiento en y, \r\n\t\t\t\t\t* con la formula de una circunferencia plana\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y - 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = coordX;\r\n\t\t\t\t\tthis.y -= incrementoY;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse{\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y + 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = centroX - diferenciaEnX;\r\n\t\t\t\t\tthis.y += incrementoY;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "public VisuCoordinateTranslator() {\r\n limitedDirections = new HashMap<String, Integer>();\r\n limitedCoordinates = new HashMap<String, Shape>();\r\n limitedGroundCoordinates = new HashMap<String, Float[]>();\r\n Float c[] = {22f, 2f, 8.5f, -1.7f, 0f};\r\n limitedDirections.put(\"Status_GWP01\", 0);\r\n ArrayList a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n StraightShape ss = new StraightShape(a);\r\n limitedCoordinates.put(\"0.1.0\", ss);\r\n\r\n\r\n c = new Float[]{-0.97f, 0.88f, 0f, -0.1f, 1f};\r\n limitedDirections.put(\"Status_ETKa1\", 1);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"1.1.0\", ss);\r\n\r\n limitedDirections.put(\"Status_ETKa2\", 1);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa1\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n c = new Float[]{0.07f, -0.74f, 0f, 0f, 1f};\r\n limitedDirections.put(\"LAM_ETKa2\", 2);\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n ss = new StraightShape(a);\r\n\r\n\r\n limitedCoordinates.put(\"2.1.0\", ss);\r\n\r\n ArrayList<ArrayList<Float>> arrayOval = new ArrayList<ArrayList<Float>>();\r\n c = new Float[]{6.3f, -2f, 7.3f, -14.38f, 0f};//straight_1\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, -4.8f, 7.3f, -14.38f, 0f};//straight_2\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.072f, 0.0695f, 2.826f, -5.424f, -17.2f, 7.3f, 1f};//circular_3\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-4.8f, -2f, 7.3f, -19.715f, 0f};//straight_4\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{-2f, 6.3f, 7.3f, -19.715f, 0f};//straight_5\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.038f, 0.1032f, 2.833f, 6.567f, -17.2f, 7.3f, 1f};//circular_6\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n c = new Float[]{3.1302f, 0.0114f, 2.8202f, -2.0298f, -17.2f, 7.3f, 1f};//circular_7\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n \r\n c = new Float[]{0.41f, 0.48f, 0.6f, 0.67f, 0.78f, 0.92f};//partitions\r\n a = new ArrayList<Float>();\r\n a.addAll(Arrays.asList(c));\r\n arrayOval.add(a);\r\n\r\n\r\n OvalShape os = new OvalShape(arrayOval);\r\n\r\n for (int i = 2; i < 11; i++) {\r\n for (int j = 0; j < 3; j++) {\r\n limitedCoordinates.put(\"1.\" + i + \".\" + j, os);\r\n limitedCoordinates.put(\"2.\" + i + \".\" + j, ss);\r\n }\r\n }\r\n\r\n \r\n \r\n c = new Float[]{2.0785f, -1.8972f};\r\n limitedGroundCoordinates.put(\"0.1.0\", c);\r\n c = new Float[]{-6.3859f,-0.4682f};\r\n limitedGroundCoordinates.put(\"1.1.0\", c);\r\n }", "public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }", "public void avancaPosicio(int[] posicions) {\n\n if (Arrays.equals(posicions, Const.FINISH_CODE)) {\n //Acaba la frame del joc\n v.closeFrame();\n return;\n }\n \n jugadors[0].getCentre().setX(posicions[0]);\n jugadors[0].getCentre().setY(posicions[1]);\n jugadors[1].getCentre().setX(posicions[2]);\n jugadors[1].getCentre().setY(posicions[3]);\n\n //Afegeix les noves posicions\n if ((jugadors[0].getCentre().getX() != -1) || (jugadors[0].getCentre().getY() != -1)){\n jugadors[0].addCoordToPath(new Coord(jugadors[0].getCentre()));\n }\n if ((jugadors[1].getCentre().getX() != -1) || (jugadors[1].getCentre().getY() != -1)){\n jugadors[1].addCoordToPath(new Coord(jugadors[1].getCentre()));\n }\n //Avisa a la Vista_Client\n avisarObservadors();\n\n }", "public void moverIzquierda() {\n estado = EstadosPersonaje.IZQUIERDA;\n mover(new Vector2(-1, 0));\n }", "public void situerClick() {\n\n\tSystem.out.println(\"Allez-y, cliquez donc.\") ;\n\t\n\tif (dessin.waitClick()) {\n\t float lon = dessin.getClickLon() ;\n\t float lat = dessin.getClickLat() ;\n\t \n\t System.out.println(\"Clic aux coordonnees lon = \" + lon + \" lat = \" + lat) ;\n\n\t // On cherche le noeud le plus proche. O(n)\n\t float minDist = Float.MAX_VALUE ;\n\t Noeud noeud = null ;\n\t \n\t for(Map.Entry<Integer, Noeud> entry : noeuds.entrySet())\t{\r\n\t \tNoeud n = entry.getValue();\r\n\t \tfloat londiff = n.getLongitude() - lon;\r\n\t \tfloat latdiff = n.getLatitude() - lat;\r\n\t \tfloat dist = londiff*londiff + latdiff*latdiff ;\r\n\t \tif(dist < minDist)\t{\r\n\t \t\tnoeud = n;\r\n\t \t\tminDist = dist;\r\n\t \t}\r\n\t }\n\n\t System.out.println(\"Noeud le plus proche : \" + noeud) ;\n\t System.out.println() ;\n\t dessin.setColor(java.awt.Color.red) ;\n\t dessin.drawPoint(noeud.getLongitude(), noeud.getLatitude(), 5) ;\n\t}\n }", "public Scacchiera()\n {\n contenutoCaselle = new int[DIM_LATO][DIM_LATO];\n statoIniziale();\n }", "@Override \n public Vector getLocation() {\n return this.getR();\n }", "void updateStepCoordiantes(){\n if(xIncreasing) {\n lat = lat + STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat + STEP_LENGTH*yCompMotion*degToMRatio;\n }\n else{\n lat = lat - STEP_LENGTH * yCompMotion * degToMRatio;\n displayLat = displayLat - STEP_LENGTH*yCompMotion*degToMRatio;\n }\n if(yIncreasing) {\n lon = lon + STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon + STEP_LENGTH*xCompMotion*degToMRatio;\n }\n else{\n lon = lon - STEP_LENGTH * xCompMotion * degToMRatio;\n dispalyLon= dispalyLon - STEP_LENGTH*xCompMotion*degToMRatio;\n }\n }", "IntPoint getLocation();", "public void movimiento(Point inicio,Point llegada, String color, int nomFicha){\n \n /*if(this.tablero[inicio.x][inicio.y]==0){\n JOptionPane.showMessageDialog(null, \"no hay nada en esa posición\");\n }*/\n \n this.tablero[inicio.x][inicio.y]=0;\n this.tablero[llegada.x][llegada.y]=nomFicha;\n if (color==\"blanco\"){\n this.posiBlancas[inicio.x][inicio.y]=0;\n this.posiBlancas[llegada.x][llegada.y]=nomFicha;\n this.posiNegras[llegada.x][llegada.y]=0;\n }else{\n this.posiNegras[inicio.x][inicio.y]=0;\n this.posiNegras[llegada.x][llegada.y]=nomFicha;\n this.posiBlancas[llegada.x][llegada.y]=0;\n }\n\n }", "NavePosicao(int frame, double angulo) {\r\n\t\tthis.frame = frame;\r\n\t\tthis.angulo = angulo;\r\n }", "public Coordinate() { row = col = -1; }", "public Coordenada() {\n }", "public void actualiza(){\r\n //pregunto si se presiono una tecla de dirección\r\n if(bTecla) {\r\n int iX = basPrincipal.getX();\r\n int iY = basPrincipal.getY();\r\n if(iDir == 1) {\r\n iY -= getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 2) {\r\n iX += getWidth() / iMAXANCHO;\r\n }\r\n if(iDir == 3) {\r\n iY += getHeight() / iMAXALTO;\r\n }\r\n if(iDir == 4) {\r\n iX -= getWidth() / iMAXANCHO;\r\n }\r\n //limpio la bandera\r\n bTecla = false;\r\n \r\n //asigno posiciones en caso de no salirme\r\n if(iX >= 0 && iY >= 0 && iX + basPrincipal.getAncho() <= getWidth()\r\n && iY + basPrincipal.getAlto() <= getHeight()) {\r\n basPrincipal.setX(iX);\r\n basPrincipal.setY(iY);\r\n } \r\n }\r\n \r\n //Muevo los chimpys\r\n for(Base basChimpy : lklChimpys) {\r\n basChimpy.setX(basChimpy.getX() - iAceleracion);\r\n }\r\n \r\n //Muevo los diddys\r\n for(Base basDiddy : lklDiddys) {\r\n basDiddy.setX(basDiddy.getX() + iAceleracion);\r\n }\r\n\r\n }", "public void aggiornaPropulsori(){\n xPropulsore1=new int[]{xCord[0],xCord[0]};\n yPropulsore1=new int[]{yCord[0],yCord[0]+15}; \n xPropulsore2=new int[]{xCord[2],xCord[2]}; \n yPropulsore2=new int[]{yCord[2],yCord[2]+15};\n \n }", "public void afficher()\n\t{\n\t\tSystem.out.println(\"Centre du cercle en \" + getPosX() + \", \" + getPosY());\n\t\tSystem.out.println(\"Rayon : \" + getRayon());\n\t}", "int aDonde(int x,int y,int x1,int y1){\n \n int m;\n //revision si la posicion del queso es la misma que la del raton \n if(llegue(x,y,x1,y1)==1){\n System.out.println(\"llegue al queso\");\n // retrazo.stop();\n //GB=10; \n return 5;\n }else{\n if(x1==x){//movimiento horizontal en la misma fila \n //System.out.println(\"\");\n m=moverseY(y,y1);//si 0 a la izquierda 1 a la derecha \n \n if(m==0){\n System.out.println(\"el raton se tiene que mover hacia la Izquierda\");\n return 4;\n }else{\n System.out.println(\"el raton se tiene que mover hacia la Derecha\");\n return 2;\n }\n }else{\n if(x1<x){//movimiento hacia arriba\n System.out.println(\"el raton se tiene que mover hacia Arriba\");\n return 1;\n }else{//movimiento hacia abajo\n System.out.println(\"el raton se tiene que mover hacia Abajo\");\n return 3;\n }\n }//fin arriba y abajo\n } //fin if movimiento horizontal \n }", "public int[] annaKoordinaatit()\n\t{\n\t\tint[] koordinaatit = {this.x, this.y};\n\t\treturn koordinaatit;\n\t}", "private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }", "@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }", "private void aretes_aO(){\n\t\tthis.cube[40] = this.cube[7]; \n\t\tthis.cube[7] = this.cube[25];\n\t\tthis.cube[25] = this.cube[46];\n\t\tthis.cube[46] = this.cube[34];\n\t\tthis.cube[34] = this.cube[40];\n\t}", "public void minotaurMove(boolean[][] maze, Player p){\r\n int distRow = _curPos.getRow() - p.getPlayerPosition().getRow();\r\n int distCol = _curPos.getCol() - p.getPlayerPosition().getCol();\r\n if(_curPos.getRow()== 0 && _curPos.getCol()==14) {\r\n _curPos = new Position(0,14);\r\n }\r\n else {\r\n if(distRow > 0){\r\n if(!maze[_curPos.getRow() - 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() - 1);\r\n }\r\n else{\r\n if(distCol > 0 && !maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() + 1]){\r\n _curPos.setCol(_curPos.getCol() + 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else{\r\n _curPos.setRow(_curPos.getRow() + 1);\r\n }\r\n }\r\n }\r\n else if(distRow == 0){\r\n if(distCol > 0 && !maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() + 1]){\r\n _curPos.setCol(_curPos.getCol() + 1);\r\n }\r\n else if(!maze[_curPos.getRow() + 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() + 1);\r\n }\r\n else if(!maze[_curPos.getRow() - 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() - 1);\r\n }\r\n else{\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n }\r\n else{\r\n if(!maze[_curPos.getRow() + 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() + 1);\r\n }\r\n else{\r\n if(distCol > 0 && !maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() + 1]){\r\n _curPos.setCol(_curPos.getCol() + 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else{\r\n _curPos.setRow(_curPos.getRow() - 1);\r\n }\r\n }\r\n }\r\n }\r\n }", "public void PerspektivischeProjektion(){\n /**\n * Abrufen der Koordinaten aus den einzelnen\n * Point Objekten des Objekts Tetraeder.\n */\n double[] A = t1.getTetraeder()[0].getPoint();\n double[] B = t1.getTetraeder()[1].getPoint();\n double[] C = t1.getTetraeder()[2].getPoint();\n double[] D = t1.getTetraeder()[3].getPoint();\n\n /*\n * Aufrufen der Methode sortieren\n */\n double[][] sP = cls_berechnen.sortieren(A, B, C, D);\n\n A = sP[0];\n B = sP[1];\n C = sP[2];\n D = sP[3];\n\n /*Wenn alle z Koordinaten gleich sind, ist es kein Tetraeder. */\n if (A[2] == D[2]) {\n System.out.println(\"kein Tetraeder\");\n return;\n }\n\n //Entfernung vom 'Center of projection' zur 'Projectoin plane'\n double d=5;\n\n /*\n * Transformiert x|y|z Koordinaten in x|y Koordinaten\n * mithilfer der perspektivischen Projektion\n */\n\n A[0]=A[0]/((A[2]+d)/d);\n A[1]=A[1]/((A[2]+d)/d);\n B[0]=B[0]/((B[2]+d)/d);\n B[1]=B[1]/((B[2]+d)/d);\n C[0]=C[0]/((C[2]+d)/d);\n C[1]=C[1]/((C[2]+d)/d);\n D[0]=D[0]/((D[2]+d)/d);\n D[1]=D[1]/((D[2]+d)/d);\n\n\n double ax, ay, bx, by, cx, cy, dx, dy;\n ax=A[0];\n ay=A[1];\n bx=B[0];\n by=B[1];\n cx=C[0];\n cy=C[1];\n dx=D[0];\n dy=D[1];\n\n tetraederzeichnen(ax, ay, bx, by, cx, cy, dx, dy);\n }", "public int getLat();", "private void updateMowerCords() {\n\t\tfor (int i = 0; i < this.map.size(); i++) {\r\n\t\t\tfor (int j = 0; j < this.map.get(i).size(); j++) {\r\n\t\t\t\tif (this.map.get(i).get(j) == this.mower) {\r\n\t\t\t\t\tthis.x = j;\r\n\t\t\t\t\tthis.y = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void position(){\n\t\tpositionX=x;//coordonnees(dans la minimap) de la case ou on a clicke ou la fourmiliere(au debut).\n\t\tpositionY=y;\n\t\tboolean posX=false,posY=false;//Ces boolean me servent a savoir s'il a eu des changements sur les coordonnees.\n\t\tif(positionY-zoom/2<=0 ){//si ordonnee negative,ca veut dire qu'on est sorti de la minimap.\n\t\t\tpositionY=0;//pour pas etre hors du tableau on met l'ordonnee a 0\n\t\t\tposY=true;//et on indique qu'on a change les ordonnees.\n\t\t\t\t}\n\t\tif(positionX-zoom/2<=0){//si abscisse negative\n\t\t\tpositionX=0;\n\t\t\tposX=true;//on indique qu'on a change les abscisses.\n\t\t}\n\t\tif(positionY+zoom>=(finY-debutY)+1){//si ordonnee plus grand que la taille de la minimap.\n\t\t\tpositionY=heightCase*(finY-debutY)-zoom*heightCase;//on met donc ordonnees a la fin de la minimap (heightCase*(finY-debutY)) et on enleve la place(px) prise par le zoom. \n\t\t\tposY=true;//et on indique qu'on a change les ordonnees.\n\t\t}\n\t\tif(positionX+zoom>=(finX-debutX)+1){//si abscisse plus grand que la taille de la minimap.\n\t\t\tpositionX=widthCase*(finX-debutX)-zoom*widthCase;\n\t\t\tposX=true;\n\t\t}\n\t\tif(!posX) {//si on a pas change les abscisses\n\t\t\t\tpositionX=widthCase*positionX-zoom*widthCase/2;//pour trouver l'abscisse en px en multiplie positionX par la taille d'une case puis on enleve la place(px) prise par le zoom\n\t\t\t}\n\t\tif(!posY)//si on a pas change les ordonnees.\n\t\t\tpositionY=heightCase*positionY-zoom*heightCase/2;\n\t\t}", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }", "public int stapelPosition(Farbe farbe);", "public int contientMine(int x, int y) {\r\n\t\tif(y >= 0 && y < hauteur && x >= 0 && x < largeur)\r\n\t\t\treturn this.plateau[y][x].contientMine();\r\n\t\treturn -1;\r\n\t}", "public Coordonnees(double _latitude, double _longitude) {\r\n\t\tsuper();\r\n\t\tthis._latitude = _latitude;\r\n\t\tthis._longitude = _longitude;\r\n\t}", "public Coordinate getMoveTo();", "protected abstract void calcOrigin();", "public void setCoordenada(int linha, int coluna) {\n this.elementos[0] = linha;\n this.elementos[1] = coluna;\n }", "@Test\n\tpublic void testCuatroEnRayaDiag2() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int i = 1; i <= 12; ++i) {\n\t\t\tint sx = Math.min(i, 7);\n\t\t\tint sy = Math.min(13 - i, 6);\n\t\t\twhile ((sy - 4 >= 0) && (sx - 4 >= 0)) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = sx - l;\n\t\t\t\t\tposY[l] = sy - l;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t\tsy--; sx--;\n\t\t\t}\n\t\t}\n\t}", "public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\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}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\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}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private double [] getGraphCoordinates(Virus virus){\n\t\tdouble pos = virus.getPosition();\n\t\tmxCell edge = getEdge(virus.getMicrotuble());\n\t\tmxICell src = edge.getSource();\n\t\tmxICell tar = edge.getTarget();\n\t\t//System.out.println(\"e=\" + edge.getValue() + \"\\tsrc=\" + src.getValue());\n\t\tmxGeometry srcGeo = graph.getModel().getGeometry(src);\n\t\tmxGeometry tarGeo = graph.getModel().getGeometry(tar);\n\t\t\n\t\t//where we need to go to\n\t\tdouble srcX = srcGeo.getCenterX();\n\t\tdouble srcY = srcGeo.getCenterY();\n\t\t\n\t\t//This is the start position\n\t\tdouble tarX = tarGeo.getCenterX();\n\t\tdouble tarY = tarGeo.getCenterY();\n\t\t\n\t\tdouble tan = (tarY - srcY)/(tarX - srcX) ;\n\t\tdouble angle = Math.atan(tan);\n\t\t\n\t\tdouble _y = Math.sin(angle) * pos;\n\t\tdouble _x = Math.cos(angle) * pos;\n\t\tdouble y,x;\n\t\t//determine direction\n\n\t\t\n\t\tif (tarY >= srcY && tarX >= srcX){ //ok\n\t\t\tx = tarX - _x;\n\t\t\ty = tarY - _y;\n\t\t} else if (tarY < srcY && tarX > srcX){\n\t\t\tx = tarX - _x;\n\t\t\ty = tarY - _y;\n\t\t} else if (tarY > srcY && tarX < srcX){ //ok\n\t\t\tx = tarX + _x;\n\t\t\ty = tarY + _y;\n\n\t\t} else {// if (tarY < srcY && tarX < srcX){\n\t\t\tx = tarX + _x;\n\t\t\ty = tarY + _y;\n\t\t}\n\t\t//System.out.println(\"(\" + _x + \",\" + _y + \")\\t\" + \"(\" + x + \",\" + y + \")\");\n\n\t\treturn new double[] {x,y};\n\t}", "public Coordonnees getCoordonnees(int x, int y) {\r\n\t\tif(y >= 0 && y < hauteur && x >= 0 && x < largeur)\r\n\t\t\treturn this.plateau[y][x].getCoordonnees();\r\n\t\treturn null;\r\n\t}", "public Coordinate getLocation();", "float znajdzOstatecznaCene()\n\t{\n\t\t//getInput(\"znajdzOstatecznaCene\");\n\t\t//print (\"znajdzOstatecznaCene \"+iteracja);\n\t\t\n\t\t//debug\n\t\tBoolean debug = false;\n\t\tif (LokalneCentrum.getCurrentHour().equals(\"03:00\"))\n\t\t{\n\t\t\tprint(\"03:00 on the clock\",debug);\n\t\t\tdebug=false;\n\t\t}\n\t\t\n\t\t//wszystkie ceny jakie byly oglaszan ne na najblizszy slot w \n\t\tArrayList<Float> cenyNaNajblizszySlot =znajdzOstatecznaCeneCenaNaNajblizszeSloty();\n\t\t\n\t\t\n\t\t//Stworzenie cen w raportowaniu\n\t\tint i=0;\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\trynekHistory.kontraktDodajCene(cenyNaNajblizszySlot.get(i));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tprint(\"ceny na najblizszy slot \"+cenyNaNajblizszySlot.size());\n\n\t\t\n\t\t//do rpzerobienia problemu minimalizacji na maksymalizacje\n\t\tint inverter =-1;\n\t\t\n\t\ti=0;\n\t\tfloat cena =cenyNaNajblizszySlot.get(i);\n\t\tfloat minimuCena =cena;\t\t\n\t\tfloat minimumValue =inverter*funkcjaRynku2(cena, false,true);\n\t\ti++;\n\t\t\n\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(funkcjaRynku2(cena, false), minimuCena);\n\t\t\n\t\twhile (i<cenyNaNajblizszySlot.size())\n\t\t{\n\t\t\tcena =cenyNaNajblizszySlot.get(i);\n\t\t\tfloat value =inverter*funkcjaRynku2(cena, false,true);\t\t\t\n\n\t\t\trynekHistory.kontraktDodajWartoscFunkcjiRynku(funkcjaRynku2(cena, false), cena);\n\n\t\t\tif (value<minimumValue)\n\t\t\t{\n\t\t\t\tminimuCena =cena;\n\t\t\t\tminimumValue = value;\n\n\t\t\t}\n\t\t\t\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tif(debug)\n\t\t{\n\t\t\tgetInput(\"03:00 end\");\n\t\t}\n\t\t\n\t\t//getInput(\"znajdzOstatecznaCene - nto finished\");\n\t\treturn minimuCena;\n\t\t\n\t}", "private int getSeaLoc(int playerLoc)\r\n\t\t{\r\n\t\t\tboolean test = false;\r\n\t\t\tint mapTemp = 0;\r\n\t\t\t//sea how far the sea location is to the left\r\n\t\t\twhile(test == false)\r\n\t\t\t{\r\n\t\t\t\tint temp1 = playerLoc % mapWidth;\r\n\t\t\t\tif(temp1 == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tmapTemp = mapPieces[0][playerLoc + mapWidth - 1];\r\n\t\t\t\t\tplayerLoc = playerLoc + mapWidth;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tmapTemp = mapPieces[0][playerLoc - 1];\r\n\t\t\t\t}\r\n\t\t\t\tif(mapTemp == 0)//seaLoc\r\n\t\t\t\t\ttest = true;\r\n\t\t\t\tplayerLoc--;\r\n\t\t\t}\r\n\t\t\treturn playerLoc;\r\n\t\t}", "int getLatE6();", "int getLatE6();", "public void mo472g() throws RemoteException {\r\n int i = 0;\r\n if (this.f1761e != null && this.f1762f != null && this.f1763g != null && this.f1767k) {\r\n try {\r\n this.f1772p = false;\r\n MapProjection c = this.f1769m.mo395c();\r\n FPoint fPoint;\r\n if (m2832l()) {\r\n DPoint m = m2833m();\r\n int abs = (int) ((Math.abs(this.f1775s - this.f1774r) * 180.0d) / 3.141592653589793d);\r\n double d = (this.f1775s - this.f1774r) / ((double) abs);\r\n FPoint[] fPointArr = new FPoint[(abs + 1)];\r\n this.f1770n = new float[(fPointArr.length * 3)];\r\n for (int i2 = 0; i2 <= abs; i2++) {\r\n MapProjection mapProjection;\r\n if (i2 == abs) {\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1763g.latitude, this.f1763g.longitude, fPoint);\r\n fPointArr[i2] = fPoint;\r\n } else {\r\n mapProjection = c;\r\n fPointArr[i2] = m2831a(mapProjection, (((double) i2) * d) + this.f1774r, m.f3635x, m.f3636y);\r\n }\r\n mapProjection = c;\r\n fPointArr[i2] = m2831a(mapProjection, (((double) i2) * d) + this.f1774r, m.f3635x, m.f3636y);\r\n this.f1770n[i2 * 3] = fPointArr[i2].f3637x;\r\n this.f1770n[(i2 * 3) + 1] = fPointArr[i2].f3638y;\r\n this.f1770n[(i2 * 3) + 2] = 0.0f;\r\n }\r\n this.f1771o = fPointArr.length;\r\n return;\r\n }\r\n FPoint[] fPointArr2 = new FPoint[3];\r\n this.f1770n = new float[(fPointArr2.length * 3)];\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1761e.latitude, this.f1761e.longitude, fPoint);\r\n fPointArr2[0] = fPoint;\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1762f.latitude, this.f1762f.longitude, fPoint);\r\n fPointArr2[1] = fPoint;\r\n fPoint = new FPoint();\r\n this.f1769m.mo352a(this.f1763g.latitude, this.f1763g.longitude, fPoint);\r\n fPointArr2[2] = fPoint;\r\n while (i < 3) {\r\n this.f1770n[i * 3] = fPointArr2[i].f3637x;\r\n this.f1770n[(i * 3) + 1] = fPointArr2[i].f3638y;\r\n this.f1770n[(i * 3) + 2] = 0.0f;\r\n i++;\r\n }\r\n this.f1771o = fPointArr2.length;\r\n } catch (Throwable th) {\r\n az.m3143a(th, \"ArcDelegateImp\", \"calMapFPoint\");\r\n th.printStackTrace();\r\n }\r\n }\r\n }", "private int obliczDowoz() {\n int x=this.klient.getX();\n int y=this.klient.getY();\n double odl=Math.sqrt((Math.pow((x-189),2))+(Math.pow((y-189),2)));\n int kilometry=(int)(odl*0.5); //50 gr za kilometr\n return kilometry;\n }", "@Override\n\tpublic void getCoordinates() {\n\t\tSystem.out.println(\"Your Coordinates: 18.1124° N, 79.0193° E \");\n\t}", "public void adjLocation(double l){this.PlayerLocation;}", "private void moverFondo() {\n ActualizaPosicionesFondos();\n noAleatorio = MathUtils.random(1, 5); // crea los numeros para cambiar los mapas de manera aleatoria\n if (xFondo == -texturaFondoBase.getWidth()){\n //Cambio de fondo base\n texturaFondoBase= mapaAleatorio(noAleatorio);\n modificacionFondoBase= true; //Avisa que ya se modifico los fondos de inicio.\n }\n if (xFondo == -(texturaFondoApoyo.getWidth()+texturaFondoBase.getWidth())){\n //Cambio fondo de apoyo\n texturaFondoApoyo= mapaAleatorio(noAleatorio);\n xFondo= 0; //al pasar el segundo fondo regresa el puntero al primer fondo.\n modificacionFondoBase= true; //Avisa que ya se modifico los fondos de inicio.\n }\n }", "public int[] choisir(int[] coord)\r\n {\r\n int[] res = new int[3]; //tableau a rendre\r\n int x = coord[0];\r\n int y = coord[1]; //récupération des coordonnées\r\n int[] voisinage= new int[4]; //tableau qui regardera les cases adjacentes à la case cherchée\r\n voisinage[0] = getValHaut(x,y);\r\n voisinage[1] = getValDroite(x,y);\r\n voisinage[2] = getValBas(x,y);\r\n voisinage[3] = getValGauche(x,y);\r\n System.out.println(\"je choisis la case \"+x+\" \"+y+\"\");\r\n for(int i = 0; i<voisinage.length; i++ ) //parcours des possibilités si on joue sans créer d'opportunités adverses\r\n {\r\n if (Vision[x][y][i+1] == 0) //si il n'y a pas de trait déja tracé\r\n {\r\n if (voisinage[i] != 2) //si la case adjacente n'a pas déja deux traits dessinés\r\n {\r\n switch (i) //switch pour réagir selon la case a jouer\r\n {\r\n case 0:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n\r\n case 1:\r\n res[0]=x+1;\r\n res[1]=y;\r\n break;\r\n\r\n case 2:\r\n res[0]=x;\r\n res[1]=y+1;\r\n break;\r\n\r\n case 3:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n }\r\n //fin du switch sur i\r\n\r\n res[2]=i%2;\r\n return res;\r\n }\r\n //fin du si la case adjacente a déja 2 traits dessinés\r\n }\r\n //si il n'y a pas de trait déja tracé\r\n }\r\n //fin du for de parcours des possibilités de jouers sans créer d'opportunités adverses\r\n\r\n for(int i=0; i<voisinage.length ; i++ ) //Parcours des possibilités sans recherche d'opportunités\r\n {\r\n if (Vision[x][y][i+1] == 0) {\r\n switch (i) //switch pour réagir selon la case a jouer\r\n {\r\n case 0:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n\r\n case 1:\r\n res[0]=x+1;\r\n res[1]=y;\r\n break;\r\n\r\n case 2:\r\n res[0]=x;\r\n res[1]=y+1;\r\n break;\r\n\r\n case 3:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n }\r\n //fin du switch sur i\r\n\r\n res[2]=i%2;\r\n return res;\r\n }\r\n }\r\n //fin du parcours de possibilité sans recherche\r\n return tabVide;\r\n }", "public void avvio_gioco(){\n\n punti = 3;\n //Posizione iniziale della x\n for (short i = 0; i < punti; i++) {\n x[i] = 150 - i*10;\n y[i] = 150;\n }\n posiziona_bersaglio();\n\n //Attivazione del timer\n timer = new Timer(RITARDO, this);\n timer.start();\n }", "private void actualizarEnConsola() {\n\t\tfor(int i=0; i<elementos.size();i++){\n\t\t\tElemento e = elementos.get(i);\n\t\t\tSystem.out.println(e.getClass().getName()+\"- Posicion: , X: \"+e.getPosicion().getX()+\", Y: \"+ e.getPosicion().getY());\n\t\t}\n\t\t\n\t}", "public Vector getLocation();", "public int pegaIndicePosicaoPelaLatitudeLongitude(double latitude, double longitude) \n\t{\n\t\tfor (PosicaoMapa posicaoMapa : posicoes){\n\t\t\tif (posicaoMapa.getLatitude() == latitude && posicaoMapa.getLongitude() == longitude)\n\t\t\t\treturn posicoes.indexOf(posicaoMapa);\n\t\t}\n\t\treturn -1;\n\t}", "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 }", "public void muovi() {\n\n for (int i = punti; i > 0; i--) {\n x[i] = x[(i - 1)];\n y[i] = y[(i - 1)];\n }\n\n if (sinistra) {\n x[0] -= DIMENSIONE_PUNTO;\n }\n\n if (destra) {\n x[0] += DIMENSIONE_PUNTO;\n }\n\n if (su) {\n y[0] -= DIMENSIONE_PUNTO;\n }\n\n if (giu) {\n y[0] += DIMENSIONE_PUNTO;\n }\n }", "public static void main(String[] args) {\r\n\t\tPosition p2 = new Position(47.984393, 0.236012);\r\n\t\t/*graine*/\r\n\t\tPosition p1 = new Position(47.987444,0.253475);\r\n\t\t\r\n\t\tFourmi fourmi = new Fourmi();\r\n\t\tChemin trackAllerGraine1;\r\n\t\tChemin trackRetourGraine1;\r\n\t\t\r\n\t\tChemin c = new Chemin();\r\n\t\tChemin c1 = new Chemin();\r\n\t\ttry {\r\n\t\t\tc.calculItineraire(p2,p1);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tc.add(p1);\r\n\t\ttrackAllerGraine1 = fourmi.creerTrack(c);\r\n\t\r\n\t\t\r\n\r\n\t\tfor(int i=0;i<trackAllerGraine1.size()-1;i++) {\r\n\t\t\tSystem.out.println(\"\\np\"+i+\" : \"+trackAllerGraine1.get(i).lat+\",\"+trackAllerGraine1.get(i).lon);\r\n\t\t\tSystem.out.println(trackAllerGraine1.get(i).getTimestamp());\r\n\t\t\tSystem.out.println(\"La distance entre ces deux points est de \"+p1.longueurEnM(trackAllerGraine1.get(i),trackAllerGraine1.get(i+1))+\"m\");\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"p\"+(trackAllerGraine1.size()-1)+\" : \"+trackAllerGraine1.get(trackAllerGraine1.size()-1).lat+\",\"+trackAllerGraine1.get(trackAllerGraine1.size()-1).lon);\r\n\t\tSystem.out.println(trackAllerGraine1.get(trackAllerGraine1.size()-1).getTimestamp());\r\n\t\t\r\n\t\ttry {\r\n\t\t\tc1.calculItineraire(p1, p2);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\tc1.add(p2);\r\n\t\ttrackRetourGraine1=fourmi.creerTrack(c1);\r\n\t\t\r\n\t\tfor(int i=0;i<trackRetourGraine1.size()-1;i++) {\r\n\t\t\tSystem.out.println(\"\\np\"+i+\" : \"+trackRetourGraine1.get(i).lat+\",\"+trackRetourGraine1.get(i).lon);\r\n\t\t\tSystem.out.println(trackRetourGraine1.get(i).getTimestamp());\r\n\t\t\tSystem.out.println(\"La distance entre ces deux points est de \"+p1.longueurEnM(trackRetourGraine1.get(i),trackRetourGraine1.get(i+1))+\"m\");\r\n\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"p\"+(trackRetourGraine1.size()-1)+\" : \"+trackRetourGraine1.get(trackRetourGraine1.size()-1).lat+\",\"+trackRetourGraine1.get(trackRetourGraine1.size()-1).lon);\r\n\t\tSystem.out.println(trackRetourGraine1.get(trackRetourGraine1.size()-1).getTimestamp());\r\n\t}", "public void darCoordenadas() {\r\n\t\t\r\n\t\tfor(int x = 0; x<palabras.size(); x++) {\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"V\")) {\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaY++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (palabras.get(x).get(0).getOrientacion().equals(\"H\") ) {\r\n\t\t\t\t\r\n\t\t\t\tint coordenadaX = palabras.get(x).get(0).getX();\r\n\t\t\t\tint coordenadaY = palabras.get(x).get(0).getY();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 1; y < palabras.get(x).size(); y++) \r\n\t\t\t\t{\r\n\t\t\t\t\tcoordenadaX++;\r\n\t\t\t\t\tpalabras.get(x).get(y).setX(coordenadaX);\r\n\t\t\t\t\tpalabras.get(x).get(y).setY(coordenadaY);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private Point toInnerPoint(Point punto){\r\n \treturn punto.add(-coord.X(), -coord.Y());\r\n// return new Point(punto.getRow() - coord.getRow(), punto.getCol() - coord.getCol());\r\n }", "private void imprimir() {\n\t\ttry {\n\t\t\tPrintWriter pr = new PrintWriter(super.salida);\n\t\t\tfor (Nodo nodo : this.solucion) {\n\t\t\t\tpr.println(nodo.getPosicionX() + \" \" + nodo.getPosicionY());\n\t\t\t}\n\t\t\tpr.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public CoordenadasDTO asignarCoordenadas(){\n logger.debug(\"MensajeService::asignarCoordenadas()\");\n CoordenadasDTO coordenadas = new CoordenadasDTO();\n try {\n if(listaNave != null && !listaNave.isEmpty()){\n double posicion [][] = new double [listaNave.size()][];\n double distances[] = obtenerDistancias(listaNave);\n for(int i = 0; i<listaNave.size(); i++){\n switch (listaNave.get(i).getName()){\n case \"kenobi\":\n posicion[i] = posiciones[0];\n break;\n\n case \"skywalker\":\n posicion[i] = posiciones[1];\n break;\n\n case \"solo\":\n posicion[i] = posiciones[2];\n break;\n }\n }\n NonLinearLeastSquaresSolver trilateracion = new NonLinearLeastSquaresSolver(new TrilaterationFunction(posicion, distances), new LevenbergMarquardtOptimizer());\n LeastSquaresOptimizer.Optimum optimum = trilateracion.solve();\n double centroid[] = optimum.getPoint().toArray();\n coordenadas.setY(centroid[1]);\n coordenadas.setX(centroid[0]);\n }\n } catch (Exception e){\n\n }\n return coordenadas;\n }", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }", "public static void main(String[] args)\n\t{\n\t\tPoint point_test = new Point(2,2);\n\t\tdouble niveauContamination_test = 0;\n\t\tdouble probaTransmettre_test = 0;\n\t\tdouble risqueMortalite_test = 0;\n\t\tdouble risqueMaladie_test = 0;\n\t\tCitoyen c = new Citoyen(\"FAN\",point_test,niveauContamination_test,risqueMaladie_test,probaTransmettre_test,risqueMortalite_test);\n\t\t\n\t\tPoint coord = new Point();\n\t\tcoord = c.getCoordonnees();\n\t\tSystem.out.println(\"x = \"+coord.getLigne()+\": y = \"+coord.getColonne());\n\t\t\n\t\tpoint_test.setCoordonnees(8,8);\n\t\tc.setCoordonnees(point_test);\n\t\tcoord = c.getCoordonnees();\n\t\tSystem.out.println(\"x = \"+coord.getLigne()+\": y = \"+coord.getColonne()+\"\\n\");\n\t\tSystem.out.println(\"INFORMATIONS du citoyen\");\n\t\tSystem.out.println(c.toString());\n\t}", "public Piste(int x, int y, int ala_x, int ala_y, int yla_x, int yla_y){\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.minX=ala_x;\n\t\tthis.minY=ala_y;\n\t\tthis.maxX=yla_x;\n\t\tthis.maxY=yla_y;\n\t}", "public void moverArriba() {\n estado = EstadosPersonaje.QUIETO;\n mover(new Vector2(0, 1));\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public void setCoordinateur(Coordinateur monCoordinateur) {\n\t\t\n\t}", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "public void controlla_bersaglio() {\n\n if ((x[0] == bersaglio_x) && (y[0] == bersaglio_y)) {\n punti++;\n posiziona_bersaglio();\n }\n }" ]
[ "0.6698084", "0.6442381", "0.64217", "0.6377139", "0.62874496", "0.61546737", "0.614668", "0.60722095", "0.607173", "0.6025512", "0.60019237", "0.60012996", "0.5986475", "0.5974348", "0.59313077", "0.5927177", "0.5927177", "0.59245795", "0.59226793", "0.589601", "0.58478034", "0.58339095", "0.58198446", "0.5810687", "0.57936865", "0.5783224", "0.57651144", "0.57490873", "0.5735866", "0.5733441", "0.5730099", "0.5722265", "0.5719847", "0.5719502", "0.5717649", "0.5705961", "0.5699508", "0.5694319", "0.5688469", "0.56869423", "0.56833076", "0.56790954", "0.56541306", "0.56525606", "0.564727", "0.5630356", "0.5629024", "0.56222093", "0.561609", "0.56074625", "0.5596898", "0.55925053", "0.55906767", "0.55867356", "0.55836666", "0.55731684", "0.5569553", "0.55651265", "0.55648816", "0.55647385", "0.5556599", "0.5555961", "0.554824", "0.5544355", "0.5536891", "0.5528646", "0.55244625", "0.5523236", "0.5511668", "0.55051434", "0.54940635", "0.5491879", "0.5479851", "0.5477321", "0.54710996", "0.54710996", "0.5470246", "0.5469731", "0.5465193", "0.5452515", "0.54512703", "0.5449195", "0.544581", "0.5443322", "0.5432487", "0.5430927", "0.5424907", "0.54204386", "0.54184335", "0.5417141", "0.5414642", "0.5407489", "0.54030305", "0.54010767", "0.5399754", "0.53971356", "0.53954375", "0.53944427", "0.5392876", "0.53878295", "0.53825516" ]
0.0
-1
Ritorna l'insieme delle posizioni valide per il re in scacco.
public ArrayList<Coordinates> getKingSafetyPositions (){ ArrayList<Coordinates> result = new ArrayList<>(); Coordinates king = chessboard.getTurnKing(); for ( Coordinates c : chessboard.at(king).validPositions(king) ){ if ( checkMove(king, c) ) { Rules temp = new Rules(chessboard.move(king, c)); if (!temp.kingOnCheck()){ result.add(c); } } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }", "private void remplirPrestaraireData() {\n\t}", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "public void setPrecioc(int p){\n this.precioc=p;\n \n }", "public int recuento(String s){\n\t\tint devolucion=0;\n\t\t\n\t\tfor (int i = 0; i < almacen.length; i++) {\t\n\t\t\tif(almacen[i]!=null && s.equalsIgnoreCase(almacen[i].getEtiqueta())){\n\t\t\t\tdevolucion=existencias[i];\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn devolucion;\n\t}", "@Override\r\n\tpublic double obliczCenePoRabacie(double cena){\n\t\tcena = cena - kwotaRabatu;\r\n\t\treturn cena;\r\n\t\t\r\n\t}", "private int cantFantasmasRestantes() {\n // TODO implement here\n return 0;\n }", "protected void pretragaGledalac() {\n\t\tString Gledalac=tfPretraga.getText();\r\n\r\n\t\tObject[]redovi=new Object[9];\r\n\t\tdtm.setRowCount(0);\r\n\t\t\r\n\t\tfor(Rezervacije r:Kontroler.getInstanca().vratiRezervacije()) {\r\n\t\t\tif(r.getImePrezime().toLowerCase().contains(Gledalac.toLowerCase())) {\r\n\t\t\t\r\n\t\t\t\tredovi[0]=r.getID_Rez();\r\n\t\t\t\tredovi[1]=r.getImePrezime();\r\n\t\t\t\tredovi[2]=r.getImePozorista();\r\n\t\t\t\tredovi[3]=r.getNazivPredstave();\r\n\t\t\t\tredovi[4]=r.getDatumIzvodjenja();\r\n\t\t\t\tredovi[5]=r.getVremeIzvodjenja();\r\n\t\t\t\tredovi[6]=r.getScenaIzvodjenja();\r\n\t\t\t\tredovi[7]=r.getBrRezUl();\r\n\t\t\t\tredovi[8]=r.getCenaUlaznica();\r\n\t\t\t\tdtm.addRow(redovi);\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void testReine() {\n assertEquals(reine.getCouleur(), Piece.Couleur.NOIR); // test couleur\n assertEquals(reine.getValeur(), 9.0f);\n assertFalse(reine.estBlanc());\n assertTrue(reine.estNoir());\n reine.setPosActuelle(Echiquier.Colonne.D, 1); // Positionner en D1\n assertTrue(reine.posEstPossible(Echiquier.Colonne.D, 7)); // Peut se déplacer à D7\n assertFalse(reine.posEstPossible(Echiquier.Colonne.E, 7)); // Ne peu pas E7\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public boolean Vacia (){\n return cima==-1;\n \n }", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "@Override\r\n public void ingresarCapacidad(){\r\n double capacidad = Math.pow(alto, 3);\r\n int capacidadInt = Double.valueOf(capacidad).intValue();\r\n super.capacidad = capacidadInt;\r\n super.cantidadRestante = capacidadInt;\r\n System.out.println(capacidadInt);\r\n }", "public void rechercheEtudiantInscripEcheanceParMatricule(){\r\n try { \r\n setViewEtudiantInscripEcheance(viewEtudiantInscripEcheanceFacadeL.findByMatricule(getViewEtudiantInscripEcheance().getMatricule())); \r\n \r\n //initialisation des echeances\r\n// viewEtudiantInscripEcheance.setVers1(0); \r\n// viewEtudiantInscripEcheance.setVers2(0); \r\n// viewEtudiantInscripEcheance.setVers3(0); \r\n// viewEtudiantInscripEcheance.setVers4(0); \r\n// viewEtudiantInscripEcheance.setVers5(0); \r\n// viewEtudiantInscripEcheance.setVers6(0); \r\n } catch (Exception e) {\r\n FacesMessage message = new FacesMessage(\"Accun étudiant n'a été trouvé! \");\r\n message.setSeverity(FacesMessage.SEVERITY_WARN);\r\n FacesContext.getCurrentInstance().addMessage(null, message); \r\n \r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n } \r\n }", "public void iniciarValores(){\r\n //Numero de campos da linha, do arquivo de saida filtrado\r\n this.NUM_CAMPOS = 106;\r\n this.ID = 0; //numero da ficha\r\n this.NUM_ARQUIVOS = 2070;\r\n\r\n this.MIN_INDICE = 1; //indice do cadastro inicial\r\n this.MAX_INDICE = 90; //indice do cadastro final\r\n this.NUM_INDICES = 90; //quantidade de cadastros lidos em cada arquivo\r\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\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 }", "public void statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "public int limitesX(){\n int v=0;\n if (fila==0 && columna>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 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>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 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{v=limitesY();}\n return v;\n }", "public int puntosRestantes() {\n // TODO implement here\n return 0;\n }", "public int limitesY(){\n int v=0;\n if (columna==0 && fila>0 && fila<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 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 (columna==15 && fila>0 && fila<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 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{v=esquinas();}\n return v;\n }", "void desconto_final(){\n setDesconto_final(this.inss + this.irpf);\n System.out.println(\"desconto_total = R$ \" + arredondar(this.desconto_final));\n }", "public void cambioEstadAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAvaluo()) || \"\".equals(mBRadicacion.Radi.getEstadoAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.CambioEstRad(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"La informacion ha sido guardada correctamente\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".cambioEstadAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "@Override\n\tpublic int sacameVida(ElementoPiedra a) {\n\t\treturn 20;\n\t}", "private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}", "@Override\n\tpublic void evaluar(int resistencia, int capacidad, int velocidad) {\n\t\t\n\t}", "private void preenchePosicoes(List<Par<Integer,Integer>> posicoes, \n\t\t\tEstadoAmbiente estado) {\n\t\tfor (Par<Integer,Integer> p : posicoes) {\n\t\t\tthis.quadricula[p.primeiro()][p.segundo()] = estado;\n\t\t}\n\t}", "public void validerSaisie();", "private void calcularDistanciaRecorrer(){\r\n\t\tfloat diferenciax = siguientePunto.x - posicion.x;\r\n\t\tfloat diferenciay = siguientePunto.y - posicion.y;\r\n\t\tdistanciaRecorrer = (float) Math.sqrt(diferenciax*diferenciax+diferenciay*diferenciay);\r\n\t}", "public void reiniciar() {\r\n\t\tauxiliar = primeira;//auxiliar recebe a primeira\r\n\t}", "public void setPreco(Float preco) { this.preco = preco; }", "public void setRagione_sociale(String ragione_sociale) {\r\n this.ragione_sociale = ragione_sociale;\r\n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "Rey(){\r\n \r\n color_rey=Color.BLANCO;\r\n posicion_rey.fila=1;\r\n posicion_rey.columna='e';\r\n \r\n }", "public Scacchiera()\n {\n contenutoCaselle = new int[DIM_LATO][DIM_LATO];\n statoIniziale();\n }", "public static Pot oceni_rdec(Igra igra) {\n\t\tTocka[][] plosca = igra.getPlosca();\n\t\tint N = Igra.N;\n\t\t\n\t\t// Najbolsa pot za rdecega.\n\t\tSet<Vrednost> rdeca_pot = new HashSet<Vrednost>();\n\t\t// Tabela za dinamicno iskanje najkrajse poti, elementi so objetki razreda Vrednosti.\n\t\tVrednost[][] tabela_dolzin_rdeci = new Vrednost[N][N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\ttabela_dolzin_rdeci[i][j] = new Vrednost(new Koordinati(j, i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 1. vrstico, napolnimo rocno.\n\t\tfor (int j = 0; j < N; j++) {\n\t\t\tif (plosca[0][j].polje == Polje.Rdec) tabela_dolzin_rdeci[0][j].vrednost = 0;\n\t\t\tif (plosca[0][j].polje == Polje.PRAZNO) tabela_dolzin_rdeci[0][j].vrednost = 1;\n\t\t}\n\t\t\n\t\t// Ostalo pa dinamicno.\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\n\t\t\t\t// definiramo polja, ki nas zanimajo\n\t\t\t\tint levo_levo_zg;\n\t\t\t\tint levo_zg;\n\t\t\t\tint desno_desno_zg;\n\t\t\t\tint desno_zg;\n\t\t\t\tint zgoraj;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Dolocimo vrednosti polj, ki nas zanimajo, tu so nekatera polja od nasega oddaljena za dve polji,\n\t\t\t\t// to je glavna skrivnost argumenta, saj ce nam nasprotnik ne more prepreciti povezave dveh polj, ki nista\n\t\t\t\t// takojsnji sosedi ju smatramo kot ze povezani (tu pridejo v igro objekti razreda Skok).\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tlevo_levo_zg = tabela_dolzin_rdeci[i - 1][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse levo_levo_zg = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { levo_levo_zg = POLNO; }\n\t\t\t\t\n\t\t\t\ttry { levo_zg = tabela_dolzin_rdeci[i - 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { levo_zg = POLNO; }\n\t\t\t\ttry { desno_zg = tabela_dolzin_rdeci[i - 1][j + 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { desno_zg = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i][j + 1].polje == Polje.PRAZNO && plosca[i - 1][j + 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tdesno_desno_zg = tabela_dolzin_rdeci[i - 1][j + 2].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse desno_desno_zg = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { desno_desno_zg = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i - 1][j + 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tzgoraj = tabela_dolzin_rdeci[i - 2][j + 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse zgoraj = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { zgoraj = POLNO; }\n\t\t\t\t\n\t\t\t\t// Preverimo, katero polje je najboljse (cez katerega bomo najhitreje povezali obe strani).\n\t\t\t\tVrednost pointer = null;\n\t\t\t\tSkok skok = null;\n\t\t\t\tint vrednost_polja;\n\t\t\t\tvrednost_polja = Math.min(levo_levo_zg, Math.min(levo_zg, Math.min(desno_zg, Math.min(desno_desno_zg, zgoraj))));\n\t\t\t\t\n\t\t\t\t// Ce to polje ni v neposredni blizini, v tabelo shranimo ustrezen Skok, da vemo, da tu se nimamo povezave,\n\t\t\t\t// a nas nasprotnik ne more zapreti.\n\t\t\t\tif (vrednost_polja != POLNO) {\n\t\t\t\t\tif (vrednost_polja == levo_levo_zg) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 1][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok1;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == levo_zg) pointer = tabela_dolzin_rdeci[i - 1][j];\n\t\t\t\t\tif (vrednost_polja == desno_desno_zg) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 1][j + 2];\n\t\t\t\t\t\tskok = Skok.Skok3;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == desno_zg) pointer = tabela_dolzin_rdeci[i - 1][j + 1];\n\t\t\t\t\tif (vrednost_polja == zgoraj) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 2][j + 1];\n\t\t\t\t\t\tskok = Skok.Skok2;\n\t\t\t\t\t}\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja += 1;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = POLNO;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_rdeci[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_rdeci[i][j].pointer = pointer;\n\t\t\t\ttabela_dolzin_rdeci[i][j].skok = skok;\n\t\t\t}\n\t\t\t\n\t\t\t// Ponovni pregled. Prej smo gledali le polja nad nasim poljem, sedaj pa pogledamo se oba soseda v \n\t\t\t// smeri, ki ni neposredno smer napredovanja. Vse naredimo enako kot zgoraj, le da sedaj nimamo Skokov.\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\tint levo;\n\t\t\t\tint desno;\n\t\t\t\tint vrednost_polja = tabela_dolzin_rdeci[i][j].vrednost;\n\t\t\t\tVrednost pointer = tabela_dolzin_rdeci[i][j].pointer;\n\t\t\t\tSkok skok = tabela_dolzin_rdeci[i][j].skok;\n\t\t\t\tVrednost nov_pointer = pointer;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry { levo = tabela_dolzin_rdeci[i][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { levo = POLNO; }\n\t\t\t\ttry { desno = tabela_dolzin_rdeci[i][j + 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { desno = POLNO; }\n\t\t\t\t\n\t\t\t\tif (levo != POLNO && levo < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = levo;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = levo + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_rdeci[i][j - 1];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\tif (desno != POLNO && desno < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = desno;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = desno + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_rdeci[i][j + 1];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_rdeci[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_rdeci[i][j].pointer = nov_pointer;\n\t\t\t\ttabela_dolzin_rdeci[i][j].skok = skok;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Izracunamo dolzino najkrajse poti do zmage. \n\t\t// Ta dolzina je lahko 0, pa se nismo zmagali, saj moramo povezati se tista polja,\n\t\t// kjer imamo dve moznosti za zmago, torej Skoke, a takrat nas nasprotnik ne more vec ustaviti.\n\t\tint najmanjsa_rdeca = POLNO;\n\t\tVrednost pointer_rdeca = null;\n\t\tfor (int j = 0; j < N; j++) {\n\t\t\tint vrednost = tabela_dolzin_rdeci[N - 1][j].vrednost;\n\t\t\tif (najmanjsa_rdeca > vrednost) {\n\t\t\t\tnajmanjsa_rdeca = vrednost;\n\t\t\t\tpointer_rdeca = tabela_dolzin_rdeci[N - 1][j];\n\t\t\t}\t\n\t\t}\n\t\t\n\t\n\t\t// Izracunamo najkraso pot, to potrebujemo v Izbira potez.\n\t\tVrednost spremenljivka = pointer_rdeca;\n\t\twhile (spremenljivka != null) {\n\t\t\trdeca_pot.add(spremenljivka);\n\t\t\tspremenljivka = spremenljivka.pointer;\n\t\t}\n\t\t\n\t\treturn new Pot(najmanjsa_rdeca, rdeca_pot);\n\t}", "private int verificarRemocao(No no){\n if(no.getDireita()==null && no.getEsquerda()==null)\n return 1;\n if((no.getDireita()==null && no.getEsquerda()!=null) || (no.getDireita()!=null && no.getEsquerda()==null))\n return 2;\n if(no.getDireita() != null && no.getEsquerda() != null)\n return 3;\n else return -1;\n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "private void ufotAlemmasVasReunassa(Ufo ufo, int x) {\n if (ufo.isVisible()) {\n if (x <= RuudunVasenReuna && suunta != 1) {\n suunta = 1;\n Iterator i2 = ufot.iterator();\n while (i2.hasNext()) {\n ufo = (Ufo) i2.next();\n ufo.setY(ufo.getY() + UfotLiikkuvatRivinALas);\n }\n }\n }\n }", "public void riconnetti() {\n\t\tconnesso = true;\n\t}", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "public void filtroCedula(String pCedula){\n \n }", "public double berechnePreis(){\r\n\t\tdouble gesamtpreis = 0;\r\n\t\tfor (Titel tmp : this){\r\n\t\t\tgesamtpreis = gesamtpreis + tmp.getPreis();\r\n\t\t}\r\n\t\treturn gesamtpreis;\r\n\t}", "@Override\npublic int getPosicao() {\n\treturn posicaoBaixoEscada;\n}", "public int cuantosParrafos() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas estrofas quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "public int getPrecios()\r\n {\r\n for(int i = 0; i < motos.size(); i++)\r\n {\r\n precio_motos += motos.get(i).getCoste();\r\n }\r\n \r\n return precio_motos;\r\n }", "public void reabrirContrato() {\n int i;\n if (hospedesCadastrados.isEmpty()) {\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n } else {\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//hospede\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//verifica se o contrato já estpa aberto\n System.err.println(\"O contrado desse hospede já encontra-se aberto\");\n\n } else {//caso o contrato encontre-se fechado\n hospedesCadastrados.get(i).getContrato().setSituacao(true);\n System.err.println(\"Contrato reaberto, agora voce pode reusufruir de nossos servicos!\");\n }\n }\n }\n }\n }", "public int getConceito(int posicao)\n\t{\n\t\treturn gradeConceitos[posicao];\n\t}", "int getCedula();", "public int orientaceGrafu(){\n\t\tint poc = 0;\n\t\tfor(int i = 0 ; i < hrana.length ; i++){\n\t\t\tif(!oriNeboNeoriHrana(hrana[i].zacatek,hrana[i].konec))\n\t\t\t poc++;\n\t\t}\n\t\tif(poc == 0 )\n\t\t\treturn 0;\n\t\t\n\t\tif(poc == pocetHr)\n\t\t\treturn 1;\n\t\t\n\t\t\n\t\t\treturn 2;\n\t\t \n\t\t\n\t\t\t\t\t\n\t}", "public int contaPercorre() {\n\t\tint contaM = 0;\n\t\tCampusModel aux = inicio;\n\t\tString r = \" \";\n\t\twhile (aux != null) {\n\t\t\tr = r + \"\\n\" + aux.getNomeCampus();\n\t\t\taux = aux.getProx();\n\t\t\tcontaM++;\n\t\t}\n\t\treturn contaM;\n\t}", "private Pares(){\n\t\t\tprimero=null;\n\t\t\tsegundo=null;\n\t\t\tdistancia=0;\n\t\t}", "public boolean posicaoCompravel(int posicao) {\n // System.out.println(\"posicao\" + posicao);\n String dono = (String) this.Donos.get(posicao);\n // System.out.println(\"DONO\"+ dono);\n if (dono.equals(\"bank\")) {\n if (this.publicServices == false && posicao != 12 && posicao != 28) {\n return true;\n } else if (this.publicServices == true && (posicao == 12 || posicao == 28)) {\n return true;\n } else if (this.publicServices == false && (posicao == 12 || posicao == 28)) {\n return false;\n } else {\n return true;\n }\n } else {\n return false;\n }\n }", "public void capturarNumPreRadica() {\r\n try {\r\n if (mBRadicacion.getRadi() == null) {\r\n mbTodero.setMens(\"Debe seleccionar un registro de la tabla\");\r\n mbTodero.warn();\r\n } else {\r\n DatObser = Rad.consultaObserRadicacion(String.valueOf(mBRadicacion.getRadi().getCodAvaluo()), mBRadicacion.getRadi().getCodSeguimiento());\r\n mBRadicacion.setListObserRadicados(new ArrayList<LogRadicacion>());\r\n\r\n while (DatObser.next()) {\r\n LogRadicacion RadObs = new LogRadicacion();\r\n RadObs.setObservacionRadic(DatObser.getString(\"Obser\"));\r\n RadObs.setFechaObservacionRadic(DatObser.getString(\"Fecha\"));\r\n RadObs.setAnalistaObservacionRadic(DatObser.getString(\"empleado\"));\r\n mBRadicacion.getListObserRadicados().add(RadObs);\r\n }\r\n Conexion.Conexion.CloseCon();\r\n opcionCitaAvaluo = \"\";\r\n visitaRealizada = false;\r\n fechaNueva = null;\r\n observacionReasignaCita = \"\";\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgInfRadicacion').show()\");\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".capturarNumPreRadica()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public void regolaOrdineInMenu(int codRiga) {\n\n /** variabili e costanti locali di lavoro */\n Modulo moduloPiatto = null;\n Modulo moduloRighe = null;\n\n Campo campoOrdineRiga = null;\n\n int codPiatto = 0;\n int codiceMenu = 0;\n int codiceCategoria = 0;\n\n Filtro filtro = null;\n\n int ordineMassimo = 0;\n Integer nuovoOrdine = null;\n int valoreOrdine = 0;\n Integer valoreNuovo = null;\n\n Object valore = null;\n int[] chiavi = null;\n int chiave = 0;\n\n try { // prova ad eseguire il codice\n\n /* regolazione variabili di lavoro */\n moduloRighe = this.getModulo();\n moduloPiatto = this.getModuloPiatto();\n campoOrdineRiga = this.getModulo().getCampoOrdine();\n\n /* recupera il codice del piatto dalla riga */\n valore = moduloRighe.query().valoreCampo(RMP.CAMPO_PIATTO, codRiga);\n codPiatto = Libreria.objToInt(valore);\n\n /* recupera il codice del menu dalla riga */\n valore = moduloRighe.query().valoreCampo(RMP.CAMPO_MENU, codRiga);\n codiceMenu = Libreria.objToInt(valore);\n\n /* recupera il codice categoria dal piatto */\n valore = moduloPiatto.query().valoreCampo(Piatto.CAMPO_CATEGORIA, codPiatto);\n codiceCategoria = Libreria.objToInt(valore);\n\n /* crea un filtro per ottenere tutte le righe comandabili di\n * questa categoria esistenti nel menu */\n filtro = this.filtroRigheCategoriaComandabili(codiceMenu, codiceCategoria);\n\n /* aggiunge un filtro per escludere la riga corrente */\n filtro.add(this.filtroEscludiRiga(codRiga));\n\n /* determina il massimo numero d'ordine tra le righe selezionate dal filtro */\n ordineMassimo = this.getModulo().query().valoreMassimo(campoOrdineRiga, filtro);\n\n /* determina il nuovo numero d'ordine da assegnare alla riga */\n if (ordineMassimo != 0) {\n nuovoOrdine = new Integer(ordineMassimo + 1);\n } else {\n nuovoOrdine = new Integer(1);\n } /* fine del blocco if-else */\n\n /* apre un \"buco\" nella categoria spostando verso il basso di una\n * posizione tutte le righe di questa categoria che hanno un numero\n * d'ordine uguale o superiore al numero d'ordine della nuova riga\n * (sono le righe non comandabili) */\n\n /* crea un filtro per selezionare le righe non comandabili della categoria */\n filtro = filtroRigheCategoriaNonComandabili(codiceMenu, codiceCategoria);\n\n /* aggiunge un filtro per escludere la riga corrente */\n filtro.add(this.filtroEscludiRiga(codRiga));\n\n /* recupera le chiavi dei record selezionati dal filtro */\n chiavi = this.getModulo().query().valoriChiave(filtro);\n\n /* spazzola le chiavi */\n for (int k = 0; k < chiavi.length; k++) {\n chiave = chiavi[k];\n valore = this.getModulo().query().valoreCampo(campoOrdineRiga, chiave);\n valoreOrdine = Libreria.objToInt(valore);\n valoreNuovo = new Integer(valoreOrdine + 1);\n this.getModulo().query().registraRecordValore(chiave, campoOrdineRiga, valoreNuovo);\n } // fine del ciclo for\n\n /* assegna il nuovo ordine alla riga mettendola nel buco */\n this.getModulo().query().registraRecordValore(codRiga, campoOrdineRiga, nuovoOrdine);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }", "public static void Promedio(){\n int ISumaNotas=0;\n int IFila=0,ICol=0;\n int INota;\n float FltPromedio;\n for(IFila=0;IFila<10;IFila++)\n {\n ISumaNotas+=Integer.parseInt(StrNotas[IFila][1]);\n }\n FltPromedio=ISumaNotas/10;\n System.out.println(\"El promedio de la clase es:\"+FltPromedio);\n }", "public int AmbosHijosR() { //Hecho por mi\n return AmbosHijosR(raiz);\n }", "public Integer getCedula() {return cedula;}", "public void calcular() {\n int validar, c, d, u;\n int contrasena = 246;\n c = Integer.parseInt(spiCentenas.getValue().toString());\n d = Integer.parseInt(spiDecenas.getValue().toString());\n u = Integer.parseInt(spiUnidades.getValue().toString());\n validar = c * 100 + d * 10 + u * 1;\n //Si es igual se abre.\n if (contrasena == validar) {\n etiResultado.setText(\"Caja Abierta\");\n }\n //Si es menor nos indica que es mas grande\n if (validar < contrasena) {\n etiResultado.setText(\"El número secreto es mayor\");\n }\n //Si es mayot nos indica que es mas pequeño.\n if (validar > contrasena) {\n etiResultado.setText(\"El número secreto es menor\");\n }\n }", "@Override\r\n\tpublic double aumentarSueldo() {\n\t\treturn 0;\r\n\t}", "public int recuperar() {\r\n\t if (raiz == null)\r\n\t return -99999;\r\n\t ;\r\n\t int x = raiz.dato;\r\n\t raiz = raiz.sig;\r\n\t return x;\r\n\t }", "public void VaciarPila()\n {\n this.tope = 0;\n }", "public CouleurFeu suivant() {\r\n // on choisit ici un algo très basique (je l'avais d'abord fait\r\n // en utisant la liste des valeurs, mais ça n'est pas très lisible.\r\n switch (this) {\r\n case VERT:\r\n return ORANGE;\r\n case ORANGE:\r\n return ROUGE;\r\n case ROUGE:\r\n return VERT;\r\n default:\r\n throw new RuntimeException(\"couleur inconnue ?? (impossible normalement)\");\r\n }\r\n }", "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 permuta(String parziale,String lettere,int livello, List<String> risultato) {\r\n\t\tif(lettere.length()==0) { //caso terminale\r\n\t\t\t\r\n\t\t\t//la soluzione parziale è anche sol completa\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//if(parziale è una parola valida?){ -->bisogna dargli accesso a dizionario\r\n\t\t\trisultato.add(parziale);\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t//fai ricorsione\r\n\t\t\t//sottoproblema== una lettera(un singolo carattere) di 'lettere'\r\n\t\t\tfor(int pos=0;pos<lettere.length();pos++) {\r\n\t\t\t\tchar tentativo= lettere.charAt(pos);\r\n\t\t\t\t\r\n\t\t\t\tString nuovaParziale=parziale+tentativo;\r\n\t\t\t\tString nuovaLettere= lettere.substring(0,pos)+ lettere.substring(pos+1);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//if(nuovaParziale è un Prefisso valido di almeno una parola nel dizionario){\r\n\t\t\t\t\t//esempio aqz-->NO car-->SI\r\n\t\t\t\tpermuta(nuovaParziale, nuovaLettere, livello+1,risultato);\r\n\t\t\t\t\r\n\t\t\t\t//backtracking -->si può escludere introducendo nuove parziali senza toccare i parametri di input\r\n\t\t\t\t//rimettere a posto parziale\r\n\t\t\t\t//rimettere a posto lettere\r\n\t\t\t}\r\n\t\t}\r\n\t}", "ArrayList<Float> pierwszaPredykcja()\n\t{\n\t\tif (Stale.scenariusz<100)\n\t\t{\n\t\t\treturn pierwszaPredykcjaNormal();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//dla scenariusza testowego cnea predykcji jest ustawiana na 0.30\n\t\t\tArrayList<Float> L1 = new ArrayList<>();\n\t\t\tL1.add(0.30f);\n\t\t\treturn L1;\n\t\t}\n\t}", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - limitePlastico;\r\n\t}", "public CensoCCVnoREMExcluidos() {\n this.nombre = \"\";\n this.apellidom = \"\";\n this.apellidop = \"\";\n this.rut = \"\";\n this.edad = 0;\n this.razon_exclusion = \"\";\n }", "public void setPreco(double preco) {\n\t\tthis.preco = preco;\n\t}", "public void rodar(){\n\t\tmeuConjuntoDePneus.rodar();\r\n\t}", "public SuperRodada(){\n this.pontos_em_disputa=0;\n this.truco=false;\n this.Desafiante=null;\n this.addPontosEmDisputa(2);\n Game game = Game.getGame();\n DonoDoBaralho=(DonoDoBaralho==null)?game.getDupla(1).getJogadorA():this.proximoAJogar(DonoDoBaralho);\n \n }", "public void resetCarte(){\n\t\tnumAGRICOLI = 0;\n\t\tnumARIDI = 0;\n\t\tnumFIUMI = 0;\n\t\tnumFORESTE = 0;\n\t\tnumMONTAGNE = 0;\n\t\tnumPRATI = 0;\n\t}", "private boolean correcto() {\r\n return (casillas.size()>numCasillaCarcel); //&&tieneJuez\r\n }", "public int rekisteroi() {\n this.tunnusNro = seuraavaNro;\n Tuote.seuraavaNro++;\n return tunnusNro;\n }", "public void obtenerValorDePiezaEnDolaresADolares() {\r\n\t\tPieza pieza = new Pieza(\"\",10,Moneda.DOLAR);\t\t\r\n\t\tdouble precio = pieza.getPrecioEn(Moneda.DOLAR);\r\n\t\tAssert.assertEquals(precio, 10);\r\n\t}", "@Override\n public void movimiento_especial(){\n\n movesp=ataque/2;\n defensa+=5;\n PP= PP-4;\n }", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private double determinanteCuadrada(){\n\t\tdouble deter = 1;\n\t\tdouble [][] matriz = this.clone().getComponentes();\n\t\t\t\t\n\t\tfor(int i=0;i<this.dimensionCol;i++){\n\t\t\tif(matriz[i][i]==0){\n\t\t\t\tif(this.intercambiarConRenglonNoNuloPorDebajo(matriz, i)==true){\n\t\t\t\t\tdeter *= (-1);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.llevarACeroPosicionesPorDebajo(matriz, i);\n\t\t\tdeter*=matriz[i][i];\n\t\t}\n\t\t\t\t\n\t\treturn deter;\n\t}", "public void anulaAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAnulaAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n int CodRad = mBRadicacion.Radi.getCodAvaluo();\r\n mBRadicacion.Radi.AnulaRadicacion(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"El Avaluo N*: \" + CodRad + \" ha sido anulada\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n mbTodero.resetTable(\"FormMisAsignados:RadicadosSegTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".anulaAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "private void priorizar() {\r\n if (ini == fin) {\r\n return;\r\n }\r\n\r\n int t1 = fin, t2 = fin - 1;\r\n TDAPrioridad aux = new TDAPrioridad(0, '0');\r\n while (t1 != ini) {\r\n if (datos[t1].getPrioridad() > datos[t2].getPrioridad()) {\r\n aux.setObjeto(datos[t1]);\r\n datos[t1].setObjeto(datos[t2]);\r\n datos[t2].setObjeto(aux);\r\n t2--;\r\n t1--;\r\n } else {\r\n break;\r\n }\r\n }\r\n }", "public Repartidor(String nombre, String apellido, String direccion, String telefono, String cedula) {\n super(nombre, apellido, direccion, telefono, cedula);\n this.disponible = true; //empieza siendo disponible luego cuando lo utilicemos pasara a no estarlo y asi...\n this.salario = 50; //establecemos un salario inicial de 50 al que luego le adicionaremos segun la cantidad de envios que haya realizado con exito \n }", "public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }", "void establecerPuntoFM(int pos){\n this.emisoraFMActual = pos;\n }", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public void obtenerValorDePiezaEnDolaresAPesos() {\r\n\t\tpieza = new Pieza(\"\",10,Moneda.DOLAR);\r\n\t\tdouble precio = this.pieza.getPrecioEn(Moneda.PESO);\r\n\t\tAssert.assertEquals(precio, 40);\r\n\t}", "public void consultaRadicacionesSegumiento() {\r\n try {\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(2, mBsesion.codigoMiSesion());\r\n Conexion.Conexion.CloseCon();\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".consultaRadicacionesSegumiento()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "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: */ }", "public static Pot oceni_moder(Igra igra) {\n\t\tTocka[][] plosca = igra.getPlosca();\n\t\tint N = Igra.N;\n\n\t\t\n\t\tSet<Vrednost> modra_pot = new HashSet<Vrednost>();\n\t\tVrednost[][] tabela_dolzin_modri = new Vrednost[N][N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\ttabela_dolzin_modri[i][j] = new Vrednost(new Koordinati(j, i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 1. vrstica\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tif (plosca[i][0].polje == Polje.Moder) tabela_dolzin_modri[i][0].vrednost = 0;\n\t\t\tif (plosca[i][0].polje == Polje.PRAZNO) tabela_dolzin_modri[i][0].vrednost = 1;\n\t\t}\n\t\t\n\t\t// ostalo\n\t\tfor (int j = 1; j < N; j++) {\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\n\t\t\t\tint gor_gor_lev;\n\t\t\t\tint gor_lev;\n\t\t\t\tint dol_lev;\n\t\t\t\tint dol_dol_lev;\n\t\t\t\tint levo;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tgor_gor_lev = tabela_dolzin_modri[i - 1][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse gor_gor_lev = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { gor_gor_lev = POLNO; }\n\t\t\t\t\n\t\t\t\ttry { gor_lev = tabela_dolzin_modri[i][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { gor_lev = POLNO; }\n\t\t\t\ttry { dol_lev = tabela_dolzin_modri[i + 1][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { dol_lev = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i + 1][j - 1].polje == Polje.PRAZNO && plosca[i + 1][j].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tdol_dol_lev = tabela_dolzin_modri[i + 2][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse dol_dol_lev = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { dol_dol_lev = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i + 1][j - 1].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tlevo = tabela_dolzin_modri[i + 1][j - 2].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse levo = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { levo = POLNO; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tVrednost pointer = null;\n\t\t\t\tSkok skok = null;\n\t\t\t\tint vrednost_polja;\n\t\t\t\tvrednost_polja = Math.min(gor_gor_lev, Math.min(gor_lev, Math.min(dol_lev, Math.min(dol_dol_lev, levo))));\n\t\t\t\t\n\t\t\t\tif (vrednost_polja != POLNO) {\n\t\t\t\t\tif (vrednost_polja == gor_gor_lev) {\n\t\t\t\t\t\tpointer = tabela_dolzin_modri[i - 1][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok1;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == gor_lev) pointer = tabela_dolzin_modri[i][j - 1];\n\t\t\t\t\tif (vrednost_polja == dol_lev) pointer = tabela_dolzin_modri[i + 1][j - 1];\n\t\t\t\t\tif (vrednost_polja == dol_dol_lev) {\n\t\t\t\t\t\tpointer = tabela_dolzin_modri[i + 2][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok3;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == levo) {\n\t\t\t\t\t\tpointer = tabela_dolzin_modri[i + 1][j - 2];\n\t\t\t\t\t\tskok = Skok.Skok2;\n\t\t\t\t\t}\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja += 1;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = POLNO;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_modri[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_modri[i][j].pointer = pointer;\n\t\t\t\ttabela_dolzin_modri[i][j].skok = skok;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// Ponovni pregled\n\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\tint gor;\n\t\t\t\tint dol;\n\t\t\t\tint vrednost_polja = tabela_dolzin_modri[i][j].vrednost;\n\t\t\t\tVrednost pointer = tabela_dolzin_modri[i][j].pointer;\n\t\t\t\tSkok skok = tabela_dolzin_modri[i][j].skok;\n\t\t\t\tVrednost nov_pointer = pointer;\n\t\t\t\t\n\t\t\t\ttry { gor = tabela_dolzin_modri[i - 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { gor = POLNO; }\n\t\t\t\ttry { dol = tabela_dolzin_modri[i + 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { dol = POLNO; }\n\t\t\t\t\n\t\t\t\tif (dol != POLNO && dol < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = dol;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = dol + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_modri[i + 1][j];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\tif (gor != POLNO && gor < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = gor;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = gor + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_modri[i - 1][j];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_modri[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_modri[i][j].pointer = nov_pointer;\n\t\t\t\ttabela_dolzin_modri[i][j].skok = skok;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Koncna vrednost\n\t\tint najmanjsa_modra = POLNO;\n\t\tVrednost pointer_modra = null;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint vrednost = tabela_dolzin_modri[i][N - 1].vrednost;\n\t\t\tif (najmanjsa_modra > vrednost) {\n\t\t\t\tnajmanjsa_modra = vrednost;\n\t\t\t\tpointer_modra = tabela_dolzin_modri[i][N - 1];\n\t\t\t}\t\n\t\t}\n\t\t\n\t\n\t\t// Izracun poti\n\t\tVrednost spremenljivka = pointer_modra;\n\t\twhile (spremenljivka != null) {\n\t\t\tmodra_pot.add(spremenljivka);\n\t\t\tspremenljivka = spremenljivka.pointer;\n\t\t}\n\t\t\n\t\treturn new Pot(najmanjsa_modra, modra_pot);\n\t}", "void establecerPuntoAM(int pos){\n this.emisoraAMActual = pos;\n }", "public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }", "public void setRisultato(double risultato) {\r\n this.risultato = risultato;\r\n }", "@Override\r\n\tpublic double getPregasCutaneas() {\r\n\r\n\t\treturn 0;\r\n\t}", "private void ufotAlemmasOikeassaReunassa(Ufo ufo, int x) {\n if (ufo.isVisible()) {\n if (x >= RuudunLeveys - RuudunOikeaReuna && suunta != -1) {\n suunta = -1;\n Iterator i1 = ufot.iterator();\n while (i1.hasNext()) {\n ufo = (Ufo) i1.next();\n ufo.setY(ufo.getY() + UfotLiikkuvatRivinALas);\n }\n }\n }\n }", "private CategoriaLexica reconoceCategoria(String palabra) {\n\t\t\t\n\t\t// Comprobamos que no sea el fin de fichero\n\t\tif (palabra.equals(\"fin\"))\n\t\t\treturn CategoriaLexica.TFin;\n\t\t\n\t\t// Buscamos la categoria lexica a la que pertenece la palabra\n\t\tCategoriaLexica c = simbolo(palabra);\n\t\tif (c != null) \n\t\t\treturn c;\n\t\t\n\t\t// Miramos si es una palabra reservada\n\t\tif (palabrasReservadas.esReservada(palabra))\t\n\t\t\treturn CategoriaLexica.PalabraReservada;\n\t\t\n\t\t// Reconocer Identificadores\n\t\t// --------------------------------------------------------------\n\t\tPattern iden = Pattern.compile(\"([a-z]|á|é|í|ó|ú|ñ)([a-z]|[A-z]|[0-9]|á|é|í|ó|ú|ñ|Ñ)*\");\n\t\tMatcher m = iden.matcher(palabra);\n\t\t\n\t\tif (m.matches())\t\t\t\n\t\t\treturn CategoriaLexica.Identificador;\n\t\t\n\t\t// Reconocer Naturales o Enteros Pos \n\t\t// -------------------------------------------------------------- \n\t\tPattern natural = Pattern.compile(\"([0-9]|[1-9][0-9]*)\");\n\t\tm = natural.matcher(palabra);\t\n\t\t\n\t\tif (m.matches())\t\n\t\t\treturn CategoriaLexica.LitNatural;\n\t\t\n\t\t// Reconocer Enteros Negativos \n\t\t// -------------------------------------------------------------- \n\t\tPattern enteroNegativo = Pattern.compile(\"-[1-9][0-9]*\");\n\t\tm = enteroNegativo.matcher(palabra);\n\t\t\n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitEntero;\n\t\t \n\t\t// Reconocer Reales\n\t\t// -------------------------------------------------------------- \n\t\t// Forma Decimal \n\t\tPattern realDecimal = Pattern.compile(\"-?([0-9]|[1-9][0-9]*)\\\\.([0-9]|[0-9]*[1-9])\");\n\t\tm = realDecimal.matcher(palabra);\n\t\t \n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitDecimal;\n\n\t\t// Forma Exponencial\n\t\tPattern realExponencial = Pattern.compile(\"-?([0-9]|[1-9][0-9]*)(E|e)-?([0-9]|[1-9][0-9]*)\");\n\t\tm = realExponencial.matcher(palabra);\n\t\t\n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitDecimal;\n\t\t\n\t\t// Forma Decimal+Exp\n\t\tPattern realDecimalExponencial = Pattern.compile(\"-?([0-9]|[1-9][0-9]*)\\\\.([0-9]|[0-9]*[1-9])\" +\n\t\t\t\t\"(E|e)-?([0-9]|[1-9][0-9]*)\");\n\t\tm = realDecimalExponencial.matcher(palabra);\n\t\t\n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitDecimal;\n\t\t\n\t\t// Reconocer Caracter\n\t\t// -------------------------------------------------------------- \n\t\tPattern caracter = Pattern.compile(\"'([^\\\\\\\\]|\\\\\\\\[tnr\\\\\\\\'])'\");\n\t\tm = caracter.matcher(palabra);\n\t\t\n\t\tif (m.matches())\n\t\t\treturn CategoriaLexica.LitCaracter;\n\t\t\n\t\t// Si no ha coincidido con ninguna otra expresion, es que el tipo es erroneo\n\t\treturn CategoriaLexica.TError;\t\n\t}", "public void setPosicion(int posicion){\n _posicion = posicion;\n }", "public double dlugoscOkregu() {\n\t\treturn 2 * Math.PI * promien;\n\t}", "private void limpiarValores(){\n\t\tpcodcia = \"\";\n\t\tcedula = \"\";\n\t\tcoduser = \"\";\n\t\tcluser = \"\";\n\t\tmail = \"\";\n\t\taudit = \"\";\n\t\tnbr = \"\";\n\t\trol = \"\";\n\t}" ]
[ "0.5858847", "0.5849645", "0.5843094", "0.5834435", "0.5828737", "0.5828281", "0.5808264", "0.5793678", "0.57913136", "0.5785937", "0.5783577", "0.5751976", "0.5735632", "0.56913733", "0.5670168", "0.5649228", "0.5639494", "0.56324786", "0.5623912", "0.56223017", "0.56125647", "0.5599555", "0.55986655", "0.55966985", "0.5580789", "0.5571357", "0.555699", "0.5544138", "0.5542369", "0.54962873", "0.54954267", "0.54945064", "0.54920673", "0.5491928", "0.5484671", "0.5475675", "0.5472398", "0.5467262", "0.5465728", "0.54629254", "0.54574156", "0.5453911", "0.5447079", "0.5435477", "0.5430393", "0.54296637", "0.5428546", "0.54269356", "0.5423566", "0.54220504", "0.5421052", "0.54187435", "0.5418241", "0.541789", "0.54167545", "0.541605", "0.54156125", "0.54154176", "0.5413314", "0.5411377", "0.54053855", "0.53997827", "0.5389827", "0.53837925", "0.53836906", "0.538337", "0.5382618", "0.5382514", "0.53811014", "0.5377238", "0.5366624", "0.53600186", "0.5348007", "0.5347048", "0.53463674", "0.53440964", "0.53436315", "0.5338527", "0.5338278", "0.5336503", "0.5334471", "0.53332746", "0.5327122", "0.53254503", "0.53196347", "0.5319218", "0.53179836", "0.5314187", "0.5313482", "0.5308057", "0.5304907", "0.53013206", "0.53004444", "0.52999717", "0.5297946", "0.529502", "0.5294182", "0.5282393", "0.52785957", "0.52756315", "0.52728647" ]
0.0
-1
Ritorna l'insieme delle posizioni in cui i pezzi si possono spostare per uscire dallo stato di scacco.
public ArrayList<Coordinates> getHeroesPositions (){ ArrayList<Coordinates> path = new ArrayList<>(); ArrayList<Coordinates> coordinatePieces = chessboard.getTurnPieces(); ArrayList<Coordinates> threats = getThreats(); for ( Coordinates c : threats ){ path.add(c); //aggiungo la posizione dell'avversario if ( !(chessboard.at(c) instanceof Knight) ) path.addAll(chessboard.at(c).getPath(c, chessboard.getTurnKing())); //tutte le posizione in cui può andare } ArrayList<Coordinates> result = new ArrayList<>(); for ( Coordinates c : coordinatePieces ) for ( Coordinates to : path) if ( !(chessboard.at(c) instanceof King) && checkMove(c, to) ) result.add(to); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void soin() {\n if (!autoriseOperation()) {\n return;\n }\n if (tamagoStats.getXp() >= 2) {\n incrFatigue(-3);\n incrHumeur(3);\n incrFaim(-3);\n incrSale(-3);\n incrXp(-2);\n\n if (tamagoStats.getPoids() == 0) {\n incrPoids(3);\n } else if (tamagoStats.getPoids() == TamagoStats.POIDS_MAX) {\n incrPoids(-3);\n }\n\n setEtatPiece(Etat.NONE);\n tamagoStats.setEtatSante(Etat.NONE);\n\n setChanged();\n notifyObservers();\n }\n }", "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 statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private int obstaculos() {\n\t\treturn this.quadricula.length * this.quadricula[0].length - \n\t\t\t\tthis.ardiveis();\n\t}", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public void inativarMovimentacoes() {\n\n\t\ttry {\n\n\t\t\tif (((auxMovimentacao.getDataMovimentacao())\n\t\t\t\t\t.before(permitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao()))\n\t\t\t\t\t|| (auxMovimentacao.getDataMovimentacao()).equals(\n\t\t\t\t\t\t\tpermitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao())\n\t\t\t\t\t) {\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.MOVIMENTACOES_ANTERIORES);\n\t\t\t} else {\n\n\t\t\t\tDate dataFinal = auxMovimentacao.getDataMovimentacao();\n\t\t\t\tCalendar calendarData = Calendar.getInstance();\n\t\t\t\tcalendarData.setTime(dataFinal);\n\t\t\t\tcalendarData.add(Calendar.DATE, -1);\n\t\t\t\tDate dataInicial = calendarData.getTime();\n\n\t\t\t\tMovimentacao mov = new Movimentacao();\n\t\t\t\tmov = (Movimentacao) movimentacaoAlunoDAO.listarTodos(Movimentacao.class,\n\t\t\t\t\t\t\" a.dataMovimentacao = (select max(b.dataMovimentacao) \"\n\t\t\t\t\t\t\t\t+ \" from Movimentacao b where b.alunoTurma = a.alunoTurma) \"\n\t\t\t\t\t\t\t\t+ \" and a.status is true and a.alunoTurma.status = true and dataMovimentacaoFim = null and a.alunoTurma = \"\n\t\t\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId())\n\t\t\t\t\t\t.get(0);\n\n\t\t\t\tmov.setControle(false);\n\t\t\t\tmov.setDataMovimentacaoFim(dataInicial);\n\t\t\t\tmovimentacaoService.inserirAlterar(mov);\n\n\t\t\t\tAlunoTurma aluno = new AlunoTurma();\n\t\t\t\taluno = daoAlunoTurma.buscarPorId(AlunoTurma.class, movimentacao.getAlunoTurma().getId());\n\t\t\t\taluno.setControle(0);\n\t\t\t\t\n\n\t\t\t\tauxMovimentacao.setAlunoTurma(movimentacao.getAlunoTurma());\n\t\t\t\tauxMovimentacao.setStatus(true);\n\t\t\t\tauxMovimentacao.setControle(false);\n\n\t\t\t\tmovimentacaoService.inserirAlterar(auxMovimentacao);\n\t\t\t\t\n\t\t\t\tif(auxMovimentacao.getSituacao()==5){\n//\t\t\t\t\t\n//\t\t\t\t\tCurso cursoAluno = new Curso();\n//\t\t\t\t\tcursoAluno = daoCurso.buscarPorId(Curso.class, auxMovimentacao.getAlunoTurma().getTurma().getCurso().getId());\n\t\t\t\t\t\n\t\t\t\t\taluno.setSituacao(5);\n\t\t\t\t\taluno.setLiberado(false);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t\t\n\t\t\t\t\t//liberar para responder o questionário\n\t\t\t\t\tAluno alunoResponde = new Aluno(); \n\t\t\t\t\talunoResponde = daoAluno.buscarPorId(Aluno.class, aluno.getAluno().getId());\n\t\t\t\t\t \n\t\t\t\t // email.setCursos(auxMovimentacao.getAlunoTurma().getTurma().getCurso());\n\t\t\t\t\t//email.setTurma(auxMovimentacao.getAlunoTurma().getTurma());\n\t\t\t\t\temail.setEnviado(false);\n\t\t\t\t\temail.setStatus(true);\n\t\t\t\t\temail.setAlunoTurma(auxMovimentacao.getAlunoTurma());\n\t\t\t\t\t\n\t\t\t\t\t//email.setAluno(alunoResponde);\n\t\t\t\t\temailService.inserirAlterar(email);\n\t\t\t\t\t//enviar o email para responder \n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\taluno.setSituacao(0);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t}\n\t\t\t\taluno = new AlunoTurma();\n\t\t\t\temail = new Email();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFecharDialog.fecharDialogAlunoCursoEditar();\n\t\t\t\tFecharDialog.fecharDialogAlunoEditarCurso();\n\t\t\t\tFecharDialog.fecharDialogAlunoTrancamento();\n\t\t\t\talterar(movimentacao);\n\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\t\t\tauxMovimentacao = new Movimentacao();\n\n\t\t\t\talunoTurmaService.update(\" AlunoTurma set permiteCadastroCertificado = 2 where id = \"\n\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId());\n\n\t\t\t\n\t\t\t\tcriarNovoObjetoAluno();\n\t\t\t\tatualizarListas();\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tExibirMensagem.exibirMensagem(Mensagem.ERRO);\n\t\t}\n\n\t}", "@Override\n\tpublic void doit() {\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint i = saisie_entier();\n\t\tafficher_texte(UtilitaireChainesCommunes.demande_saisie_nombre);\n\t\tint j = saisie_entier();\n\t\t// tous deux strictements positifs ou strictement négatifs? \n\t\t// vrai => produit positif\n\t\t// faux => produit negatif ou nul\n\t\tboolean Truth = TrueIfSameTruthValue(i,j,this.estposit);\n if (Truth){afficher_texte(UtilitaireChainesCommunes.resultat_positif);}\n else{ \n \t// l un des deux est soit de signe différent soit nul.\n \t// on vire le cas \"est de signe différent\" (on aurait pu faire l autre)\n \tboolean Truth2 = ((i < 0 && j > 0) || (i > 0 && j < 0));\n \tif (Truth2){afficher_texte(UtilitaireChainesCommunes.resultat_negatif);}\n \telse {afficher_texte(UtilitaireChainesCommunes.nombre_nul);}\n }\n\n\t}", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Dati dati;\n\n try { // prova ad eseguire il codice\n\n this.setMessaggio(\"Analisi in corso\");\n this.setBreakAbilitato(true);\n\n /* recupera e registra i dati delle RMP da elaborare */\n dati = getDatiRMP();\n this.setDati(dati);\n\n /* regola il fondo scala dell'operazione */\n this.setMax(dati.getRowCount());\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "private void posButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_posButtonActionPerformed\n //ResultConclusion last = Main.mainProject.getCurrentCase().getConclusion();\n //Main.mainProject.getStatistics().addValue(last, -1);\n\n // Main.mainProject.getCurrentCase().setConclusion(ResultConclusion.PERCEPTUALLY_SAME);\n // Main.mainProject.getStatistics().addValue(ResultConclusion.PERCEPTUALLY_SAME, 1);\n Main.mainProject.getCurrentCase().setResultRecursive(ResultConclusion.PERCEPTUALLY_SAME);\n\n Main.interfaceFrame.getStatFrame().update(Main.mainProject);\n\n updateIcons();\n updateCheckBoxes(Main.mainProject.getStatistics());\n }", "public void contabilizarConMesYProfesor(ProfesorBean profesor, int mes){\r\n GestionDetallesInformesBD.deleteDetallesInforme(profesor, mes); \r\n\r\n //Preparamos todos los datos. Lista de fichas de horario.\r\n ArrayList<FichajeBean> listaFichajes = GestionFichajeBD.getListaFichajesProfesor(profesor,mes);\r\n ArrayList<FichajeRecuentoBean> listaFichajesRecuento= UtilsContabilizar.convertirFichajes(listaFichajes);\r\n\r\n /**\r\n * Contabilizar horas en eventos de día completo\r\n */\r\n \r\n int segundosEventosCompletos=contabilizarEventosCompletos(listaFichajesRecuento, profesor,mes);\r\n \r\n /**\r\n * Contabilizar horas en eventos de tiempo parcial\r\n */\r\n \r\n ArrayList<EventoBean> listaEventos=GestionEventosBD.getListaEventosProfesor(false, profesor, mes);\r\n int segundosEventosParciales=contabilizarEventosParciales(listaFichajesRecuento,listaEventos, profesor, mes, \"C\");\r\n \r\n /**\r\n * Contabilizamos las horas lectivas\r\n */\r\n ArrayList<FichaBean> listaFichasLectivas=UtilsContabilizar.getHorarioCompacto(profesor, \"L\");\r\n int segundosLectivos=contabilizaHorasLectivasOCmplementarias(listaFichajesRecuento, listaFichasLectivas, profesor,\"L\", mes);\r\n \r\n /**\r\n * Contabilizar horas complementarias\r\n */\r\n ArrayList<FichaBean> listaFichasComplementarias=UtilsContabilizar.getHorarioCompacto(profesor, \"C\");\r\n int segundosComplementarios=contabilizaHorasLectivasOCmplementarias(listaFichajesRecuento, listaFichasComplementarias, profesor,\"C\", mes);\r\n \r\n /**\r\n * Contabilizamos la horas no lectivas (el resto de lo que quede en los fichajes.\r\n */\r\n int segundosNLectivos=contabilizaHorasNoLectivas(listaFichajesRecuento, profesor, true, mes);\r\n \r\n /**\r\n * Contabilizamos las horas extra añadidas al profesor\r\n */\r\n ArrayList<HoraExtraBean> listaHorasExtra=GestionHorasExtrasBD.getHorasExtraProfesor(profesor, mes);\r\n HashMap<String, Integer> tablaHorasExtra = contabilizaHorasExtra(listaHorasExtra, profesor, mes);\r\n \r\n System.out.println(\"Segundos de horas lectivas: \"+Utils.convierteSegundos(segundosLectivos));\r\n System.out.println(\"Segundos de horas complementarias: \"+Utils.convierteSegundos(segundosComplementarios));\r\n System.out.println(\"Segundos de horas no lectivas: \"+Utils.convierteSegundos(segundosNLectivos));\r\n System.out.println(\"Segundos eventos completos: \"+Utils.convierteSegundos(segundosEventosCompletos));\r\n System.out.println(\"Segundos eventos parciales: \"+Utils.convierteSegundos(segundosEventosParciales));\r\n System.out.println(\"Total: \"+Utils.convierteSegundos((segundosComplementarios+segundosLectivos+segundosNLectivos+segundosEventosCompletos+segundosEventosParciales)));\r\n \r\n /**\r\n * Comprobacion\r\n */\r\n listaFichajes = GestionFichajeBD.getListaFichajesProfesor(profesor,mes);\r\n listaFichajesRecuento= UtilsContabilizar.convertirFichajes(listaFichajes);\r\n int segundosValidacion=contabilizaHorasNoLectivas(listaFichajesRecuento, profesor, false, mes);\r\n int segundosValidacion2=segundosComplementarios+segundosLectivos+segundosNLectivos+segundosEventosCompletos+segundosEventosParciales;\r\n System.out.println(\"Comprobacion: \"+Utils.convierteSegundos(segundosValidacion));\r\n String obser=segundosValidacion==segundosValidacion2?\"Correcto\":\"No coinciden las horas en el colegio, con las horas calculadas de cada tipo.\";\r\n \r\n segundosComplementarios+=segundosEventosCompletos;\r\n segundosComplementarios+=segundosEventosParciales;\r\n\r\n //Guardamos en la base de datos\r\n GestionInformesBD.guardaInforme(profesor, obser, segundosLectivos, segundosNLectivos, segundosComplementarios,mes);\r\n \r\n }", "@Override\r\n\tpublic void exibir() {\n\t\t\r\n\t\tSystem.out.println(\"Condicoes atuais: \" + temp + \"°C e \" + umid + \"% de umidade \" \r\n\t\t\t\t+ pressao + \" pressao\");\r\n\t\t\r\n\t}", "public int getConceito(int posicao)\n\t{\n\t\treturn gradeConceitos[posicao];\n\t}", "private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}", "public void setStatoCorrente(Stato prossimo)\r\n\t{\r\n\t\tif(!(corrente==null))\r\n\t\t\tfor(int i=0;i<corrente.getTransazioniUscenti().size();i++)\r\n\t\t\t{\r\n\t\t\t\t//System.out.println(\"Imposto NON attiva la \"+corrente.getTransazioniUscenti().get(i));\r\n\t\t\t\tcorrente.getTransazioniUscenti().get(i).setAttiva(false);\r\n\t\t\t}\r\n\t\t\r\n\t\t//System.out.println(\"Imposto lo stato corrente: \"+prossimo.toString());\r\n\t\tcorrente=prossimo;\r\n\t\tif(!(corrente==null))\r\n\t\t{\r\n\t\t\t//System.out.println(\"Attivo le transazioni \"+corrente.getTransazioniUscenti().size());\r\n\t\t\tfor(int i=0;i<corrente.getTransazioniUscenti().size();i++)\r\n\t\t\t{\r\n\t\t\t\t//System.out.println(\"Imposto ATTIVA la \"+corrente.getTransazioniUscenti().get(i));\r\n\t\t\t\tcorrente.getTransazioniUscenti().get(i).setAttiva(true);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void posicionePosicoes() {\n\t\tGroupLayout gl = new GroupLayout(this);\n\n\t\tgl.setAutoCreateContainerGaps(true);\n\t\tgl.setAutoCreateGaps(true);\n\n\t\tsetLayout(gl);\n\n\t\t// Horizontal\n\t\t{\n\t\t\tSequentialGroup sgDados = gl.createSequentialGroup();\n\t\t\tSequentialGroup sgProgresso = gl.createSequentialGroup();\n\n\t\t\tParallelGroup pg = gl.createParallelGroup(Alignment.LEADING);\n\n\t\t\tsgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tsgProgresso.addComponent(lresultado).addComponent(tfResultado);\n\t\t\tpg.addGroup(sgDados).addGroup(sgProgresso);\n\t\t\tgl.setHorizontalGroup(pg);\n\n\t\t}\n\n\t\t// Vertical\n\t\t{\n\t\t\tParallelGroup pgDados = gl.createParallelGroup(Alignment.CENTER);\n\t\t\tParallelGroup pgResultado = gl\n\t\t\t\t\t.createParallelGroup(Alignment.LEADING);\n\n\t\t\tSequentialGroup sg = gl.createSequentialGroup();\n\n\t\t\tpgDados.addComponent(lQntDados).addComponent(tfQntDados)\n\t\t\t\t\t.addComponent(btCadastrar).addComponent(barraProgresso);\n\t\t\tpgResultado.addComponent(lresultado).addComponent(tfResultado);\n\n\t\t\tsg.addGroup(pgDados).addGroup(pgResultado);\n\n\t\t\tgl.setVerticalGroup(sg);\n\n\t\t}\n\n\t}", "public void avancaPosicio(int[] posicions) {\n\n if (Arrays.equals(posicions, Const.FINISH_CODE)) {\n //Acaba la frame del joc\n v.closeFrame();\n return;\n }\n \n jugadors[0].getCentre().setX(posicions[0]);\n jugadors[0].getCentre().setY(posicions[1]);\n jugadors[1].getCentre().setX(posicions[2]);\n jugadors[1].getCentre().setY(posicions[3]);\n\n //Afegeix les noves posicions\n if ((jugadors[0].getCentre().getX() != -1) || (jugadors[0].getCentre().getY() != -1)){\n jugadors[0].addCoordToPath(new Coord(jugadors[0].getCentre()));\n }\n if ((jugadors[1].getCentre().getX() != -1) || (jugadors[1].getCentre().getY() != -1)){\n jugadors[1].addCoordToPath(new Coord(jugadors[1].getCentre()));\n }\n //Avisa a la Vista_Client\n avisarObservadors();\n\n }", "public void aumentaInSitu(){\n if(quantidade_in_situ<quantidade_disponivel)\n quantidade_in_situ++;\n else\n return;\n }", "private int contabilizaHorasNoLectivas(ArrayList<FichajeRecuentoBean> listaFichajesRecuento, ProfesorBean profesor, boolean guardar, int mes) {\r\n int segundos=0;\r\n for (FichajeRecuentoBean fichajeRecuento : listaFichajesRecuento) {\r\n// System.out.println(fichajeRecuento.getFecha()+\" \"+fichajeRecuento.getHoraEntrada()+\"->\"+fichajeRecuento.getHoraSalida()+\" => \"+UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida()));\r\n segundos+=UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida());\r\n \r\n DetalleInformeBean detalleInforme=new DetalleInformeBean();\r\n detalleInforme.setIdProfesor(profesor.getIdProfesor());\r\n detalleInforme.setTotalHoras(UtilsContabilizar.dimeDuracion(fichajeRecuento.getHoraEntrada(),fichajeRecuento.getHoraSalida()));\r\n detalleInforme.setFecha(fichajeRecuento.getFecha());\r\n detalleInforme.setHoraIni(fichajeRecuento.getHoraEntrada());\r\n detalleInforme.setHoraFin(fichajeRecuento.getHoraSalida());\r\n detalleInforme.setTipoHora(\"NL\");\r\n if(guardar && detalleInforme.getTotalHoras()>0)GestionDetallesInformesBD.guardaDetalleInforme(detalleInforme, \"contabilizaHorasNoLectivas\", mes);\r\n \r\n }\r\n return segundos;\r\n }", "public String imprime() {\r\n\t\tstatus = \"=== Central P2-CG ===\" + quebraLinha;\r\n\t\tfor (Usuario usuario : loja.getUsuarios()) {\r\n\t\t\tstatus+= usuario.getLogin()+ quebraLinha;\r\n\t\t\tstatus+= usuario.getNome() + quebraLinha;\r\n\t\t\tstatus+= \"Jogador \" + usuario.tipoJogador()\r\n\t\t\t\t\t+ \": \" + usuario.getPontos() + \" x2p\" + quebraLinha;\r\n\t\t\t\r\n\t\t\tstatus+= \"Lista de Jogos:\"+ quebraLinha;\r\n\t\t\tfor (Jogo jogo : usuario.getJogos()) {\r\n\t\t\t\tstatus+= \"+\" + jogo.getNome() + \" - \"\r\n\t\t\t\t\t\t+ jogo.getClass().getSimpleName() + \":\" + quebraLinha;\r\n\t\t\t\tstatus+= \"===> Jogou \" + jogo.getVezesjogadas()\r\n\t\t\t\t\t\t+ \" vez(es)\"+ quebraLinha;\r\n\t\t\t\tstatus+= \"===> Zerou \" + jogo.getZerajogo()\r\n\t\t\t\t\t\t+ \" vez(es)\"+ quebraLinha;\r\n\t\t\t\tstatus+= \"===> Maior Score \" + jogo.getScore()+ quebraLinha;\r\n\t\t\t\tstatus+= quebraLinha;\r\n\r\n\t\t\t}\r\n\t\t\tdesconto += usuario.getDesconto();\r\n\r\n\t\t\t\r\n\t\t}\r\n\t\tstatus+= \"Total de preco dos jogos: R$ \" + valorTotal + quebraLinha;\r\n\t\tstatus+= \"---------------------------------------------\"+quebraLinha;\r\n\t\tstatus+= \"Total arrecadado com vendas de jogos:\" + desconto + quebraLinha;\r\n\t\tstatus+= quebraLinha;\r\n\t\tdesconto = 0;\r\n\t\treturn status;\r\n\t}", "public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }", "public void calculEtatSuccesseur() { \r\n\t\tboolean haut = false,\r\n\t\t\t\tbas = false,\r\n\t\t\t\tgauche = false,\r\n\t\t\t\tdroite = false,\r\n\t\t\t\thautGauche = false,\r\n\t\t\t\tbasGauche = false,\r\n\t\t\t\thautDroit = false,\r\n\t\t\t\tbasDroit = false;\r\n\t\t\r\n\t\tString blanc = \" B \";\r\n\t\tString noir = \" N \";\r\n\t\tfor(Point p : this.jetonAdverse()) {\r\n\t\t\tString [][]plateau;\r\n\t\t\tplateau= copieEtat();\r\n\t\t\tint x = (int) p.getX();\r\n\t\t\tint y = (int) p.getY();\r\n\t\t\tif(this.joueurActuel.getCouleur() == \"noir\") { //dans le cas ou le joueur pose un pion noir\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) { //on regarde uniquement le centre du plateaau \r\n\t\t\t\t\t//on reinitialise x,y et plateau a chaque étape\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tdroite = getDroite(x,y,blanc);\r\n\t\t\t\t\thaut = getHaut(x, y, blanc);\r\n\t\t\t\t\tbas = getBas(x, y, blanc);\r\n\t\t\t\t\tgauche = getGauche(x, y, blanc);\r\n\t\t\t\t\thautDroit = getDiagHautdroite(x, y, blanc);\r\n\t\t\t\t\thautGauche = getDiagHautGauche(x, y, blanc);\r\n\t\t\t\t\tbasDroit = getDiagBasDroite(x, y, blanc);\r\n\t\t\t\t\tbasGauche = getDiagBasGauche(x, y, blanc);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y-1]==noir) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(droite) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//1\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==noir) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(bas) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==noir) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(gauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= noir;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(haut) {\r\n\t\t\t\t\t\t\t//System.out.println(\"regarde en dessous\");\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==noir) {\r\n\t\t\t\t\t\tif(hautGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(basGauche) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\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}//6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit : OK!\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==noir) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(hautDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\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}//7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==noir) {\r\n\t\t\t\t\t\tif(basDroit) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == blanc) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = noir;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=noir;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, noir, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t\t//System.out.println(\"ajouté!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse {//si le joueur actuel a les pions blanc\r\n\t\t\t\tif(p.getY()>0 && p.getY()<plateau[0].length-1 && p.getX()>0 && p.getX()<plateau.length-1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x][y-1]==blanc) {//regarder si à gauche du pion blanc il y a un pion noir\r\n\t\t\t\t\t\t//on regarde si il est possible de poser un pion noir à droite\r\n\t\t\t\t\t\tif(getDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\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}//1.1\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x-1][y]==blanc) {//regardre au dessus si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getBas(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//2.2\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(this.plateau[x][y+1]==blanc) { //regarde a droite si le pion est noir\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getGauche(x, y, noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//3.3\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\tif(this.plateau[x+1][y] == blanc) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(getHaut(x, y, noir)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//4.4\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautgauche\r\n\t\t\t\t\tif(this.plateau[x+1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]= blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//5.5\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagbasGauche\r\n\t\t\t\t\tif(this.plateau[x-1][y+1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasGauche(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty--;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//6.6\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diaghautDroit\r\n\t\t\t\t\tif(this.plateau[x+1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagHautdroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx--;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//7.7\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = (int) p.getX();\r\n\t\t\t\t\ty = (int) p.getY();\r\n\t\t\t\t\tplateau= copieEtat();\r\n\t\t\t\t\t//diagBasDroit\r\n\t\t\t\t\tif(this.plateau[x-1][y-1]==blanc) {\r\n\t\t\t\t\t\tif(getDiagBasDroite(x,y,noir)) {\r\n\t\t\t\t\t\t\twhile(plateau[x][y] == noir) {\r\n\t\t\t\t\t\t\t\tplateau[x][y] = blanc;\r\n\t\t\t\t\t\t\t\tx++;\r\n\t\t\t\t\t\t\t\ty++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tplateau[x][y]=blanc;\r\n\t\t\t\t\t\t\tplateau=pionPosé(x, y, blanc, plateau);\r\n\t\t\t\t\t\t\tthis.setSuccesseur(new EtatReversi(this, plateau));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}//8.8\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void nourrir() {\n if (!autoriseOperation()) {\n return;\n }\n\n incrFaim(-2);\n incrPoids(1);\n incrHumeur(1);\n incrXp(1);\n\n System.out.println(tamagoStats.getXp());\n setChanged();\n notifyObservers();\n\n }", "private void preenchePosicoes(List<Par<Integer,Integer>> posicoes, \n\t\t\tEstadoAmbiente estado) {\n\t\tfor (Par<Integer,Integer> p : posicoes) {\n\t\t\tthis.quadricula[p.primeiro()][p.segundo()] = estado;\n\t\t}\n\t}", "public StringBuffer evoluciona()\r\n\t{\r\n\t\tStringBuffer hechos = new StringBuffer(\"\");\r\n\t\t\r\n\t\t//Me creo una superficie de booleanos para saber si hay célula o no en una posición....\r\n\t\tboolean [][]supBool = this.supBooleana();\r\n\t\t//Recorrido de la superficie...\r\n\t\tfor(int i=0; i<this.casillas.getFila(); i++)\r\n\t\t{\r\n\t\t\tfor(int j=0; j<this.casillas.getCol(); j++)\r\n\t\t\t{\r\n\t\t\t\t//Si en esa posición hay célula...\r\n\t\t\t\tif(supBool[i][j] == true)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Ordeno ejecutarla, y la casilla a la que se ha movido, la pongo a false en la superficie booleana.\r\n\t\t\t\t\tCasilla c = this.superficie[i][j].ejecutaMovimiento(new Casilla(i,j), this, hechos);\r\n\t\t\t\t\tif(c!=null)supBool[c.getFila()][c.getCol()] = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Meto el tablero actualizado.\r\n\t\thechos.append(\"\\n\");\r\n\t\t\r\n\t\treturn hechos;\r\n\t}", "public int cuantosCursos(){\n return inscripciones.size();\n }", "private void ruotaNuovoStatoPaziente() {\r\n\t\tif(nuovoStatoPaziente==StatoPaziente.WAITING_WHITE)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_YELLOW;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_YELLOW)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_RED;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_RED)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_WHITE;\r\n\t\t\r\n\t}", "public void mostrarFatura() {\n\n int i;\n System.err.println(\"Fatura do contrato:\\n\");\n\n if (hospedesCadastrados.isEmpty()) {//caso nao existam hospedes\n System.err.println(\"Nao existe hospedes cadastrados\\n\");\n\n } else {\n System.err.println(\"Digite o cpf do hospede:\\n\");\n\n listarHospedes();\n int cpf = verifica();\n for (i = 0; i < hospedesCadastrados.size(); i++) {//roda os hospedes cadastrados\n if (hospedesCadastrados.get(i).getCpf() == cpf) {//pega o hospede pelo cpf\n if (hospedesCadastrados.get(i).getContrato().isSituacao()) {//caso a situacao do contrato ainda estaja ativa\n\n System.err.println(\"Nome do hospede:\" + hospedesCadastrados.get(i).getNome());\n System.err.println(\"CPF:\" + hospedesCadastrados.get(i).getCpf() + \"\\n\");\n System.err.println(\"Servicos pedidos:\\nCarros:\");\n if (!(hospedesCadastrados.get(i).getContrato().getCarrosCadastrados() == null)) {\n System.err.println(hospedesCadastrados.get(i).getContrato().getCarrosCadastrados().toString());\n System.err.println(\"Total do serviço de aluguel de carros R$:\" + hospedesCadastrados.get(i).getContrato().getContaFinalCarros() + \"\\n\");//;\n } else {\n System.err.println(\"\\nO hospede nao possui carros cadastrados!\\n\");\n }\n System.err.println(\"Quartos:\");\n if (!(hospedesCadastrados.get(i).getContrato().getQuartosCadastrados() == null)) {\n System.err.println(hospedesCadastrados.get(i).getContrato().getQuartosCadastrados().toString());\n System.err.println(\"Total do servico de quartos R$:\" + hospedesCadastrados.get(i).getContrato().getContaFinalQuartos() + \"\\n\");//;\n } else {\n System.err.println(\"\\nO hospede nao possui Quartos cadastrados!\\n\");\n }\n System.err.println(\"Restaurante:\");\n System.err.println(\"Total do servico de restaurante R$: \" + hospedesCadastrados.get(i).getContrato().getValorRestaurante() + \"\\n\");\n System.err.println(\"Total de horas de BabySitter contratatas:\" + hospedesCadastrados.get(i).getContrato().getHorasBaby() / 45 + \"\\n\"\n + \"Total do servico de BabySitter R$:\" + hospedesCadastrados.get(i).getContrato().getHorasBaby() + \"\\n\");\n System.err.println(\"Total Fatura final: R$\" + hospedesCadastrados.get(i).getContrato().getContaFinal());\n //para limpar as disponibilidades dos servicos\n //carros, quarto, contrato e hospede\n //é necessario remover o hospede?\n// \n\n } else {//caso o contrato esteja fechado\n System.err.println(\"O hospede encontra-se com o contrato fechado!\");\n }\n }\n\n }\n }\n }", "private void moverJogadorAPosicao(int jogador, int valorDados, boolean iguais) {\n int tentativasDeSairDaPrisao = this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao();\n //Analisando se o cara esta preso, se a prisao ta ativada e se o cara tentou um numero de vezes menos que tres\n //ou se a funcao prisao esta falsa\n //ou se o jogador nao esta preso\n if ((JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao <= 2) || this.prisao == false || (!JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && this.prisao == true)) {\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao < 2);\n {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n }\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n }\n\n //analisando se o jogador esta preso e lanca numeros diferentes nos dados\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && !iguais && this.prisao == true) {\n //analisa se estourou as tentativas\n //se estourou\n if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() == 2) {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n\n } //se nao estourou\n else if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() < 2) {\n this.listaJogadores.get(jogadorAtual()).addTentativasSairDaPrisao();\n }\n\n\n }\n\n\n }", "private void ActualizaPosicionesFondos() {\n xFondo-=10; //Es el cursor de la posición\n xFondoBase-=10; //Aqui se puede implementar metodo de modificacion de velocidad de fondo.\n xFondoApoyo-=10;\n if (xFondo == -texturaFondoBase.getWidth()){\n xFondoBase = xFondoApoyo+texturaFondoApoyo.getWidth();\n cambiosFondo++;\n }\n if (xFondo == -(texturaFondoApoyo.getWidth()+texturaFondoBase.getWidth())) {\n xFondoApoyo = xFondoBase+texturaFondoBase.getWidth();\n cambiosFondo++;\n }\n }", "public void accionAtaques(int i) throws SQLException{\r\n if(turno ==0){\r\n if(pokemon_activo1.getCongelado() == false || pokemon_activo1.getDormido() == false){\r\n if(pokemon_activo1.getConfuso() == true && (int)(Math.random()*100) > 50){\r\n// inflingirDaño(pokemon_activo1.getMovimientos()[i], pokemon_activo1, pokemon_activo1);\r\n// System.out.println(\"El pokemon se ha hecho daño a si mismo!\");\r\n// try {\r\n// creg.guardarRegistroSimulacion(\"El pokemon se ha hecho daño a si mismo\");\r\n// } catch (IOException ex) {\r\n// Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n// }\r\n }\r\n else{\r\n inflingirDaño(pokemon_activo1.getMovimientos()[i], pokemon_activo2, pokemon_activo1);\r\n if(pokemon_activo2.getVida_restante() <= 0){\r\n pokemon_activo2.setVida_restante(0);\r\n pokemon_activo2.setDebilitado(true);\r\n JOptionPane.showMessageDialog(this.vc, \"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\", \"Debilitado\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Pokemon: \"+ pokemon_activo2.getPseudonimo()+\" se ha Debilitado\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(condicionVictoria(getEquipo1(), getEquipo2()) == true){\r\n JOptionPane.showMessageDialog(this.vc, \"El Ganador de este Combate es:\"+ entrenador1.getNombre(), \"Ganador\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Ganador de este Combate es:\"+ entrenador1.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Ganador de este Combate es:\"+ entrenador1.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.dispose();\r\n vpc.dispose();\r\n combate.setGanador(entrenador1);\r\n combate.setPerdedor(entrenador2);\r\n termino = true;\r\n if(esLider == true){\r\n cmed.ganoCombate();\r\n }\r\n }\r\n else if(getEquipo2()[0].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[0]; \r\n }\r\n else if(getEquipo2()[1].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[1]; \r\n }\r\n else if(getEquipo2()[2].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[2]; \r\n }\r\n else if(getEquipo2()[3].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[3]; \r\n }\r\n else if(getEquipo2()[4].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[4]; \r\n }\r\n else if(getEquipo2()[5].getDebilitado() == false){\r\n pokemon_activo2 = getEquipo2()[5]; \r\n }\r\n vc.setjL_nombrepokemon2(pokemon_activo2.getPseudonimo());\r\n vc.setjL_especie2(pokemon_activo2.getNombre_especie());\r\n vc.setjL_Nivel2(pokemon_activo2.getNivel());\r\n \r\n }\r\n va.setVisible(false);\r\n vc.setjL_Turno_actual(entrenador2.getNombre());\r\n vc.setjL_vida_actual1(pokemon_activo1.getVida_restante(), pokemon_activo1.getVida());\r\n vc.setjL_vida_actual2(pokemon_activo2.getVida_restante(), pokemon_activo2.getVida());\r\n if(tipo_simulacion == 1){\r\n JOptionPane.showMessageDialog(this.vc, \"Turno\"+\" \"+entrenador2.getNombre(), \"Tu Turno\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"Turno\"+\" \"+entrenador2.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"Turno\"+\" \"+entrenador2.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.turnoJugador2();\r\n this.turno = 1;\r\n }\r\n else if(tipo_simulacion == 2){\r\n if(termino==false){\r\n turnoSistema();\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n System.out.println(\"El pokemon no puede atacar\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El pokemon no puede atacar\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if((int)(Math.random()*3) == 1){ //1/3 de probabilidad de desactivar el efecto\r\n pokemon_activo1.setCongelado(false);\r\n pokemon_activo1.setDormido(false);\r\n }\r\n }\r\n \r\n }\r\n else if(turno ==1){\r\n if(pokemon_activo2.getCongelado() == false || pokemon_activo2.getDormido() == false){\r\n if(pokemon_activo2.getConfuso() == true && (int)(Math.random()*100) > 50){\r\n// inflingirDaño(pokemon_activo2.getMovimientos()[i], pokemon_activo2, pokemon_activo2);\r\n// System.out.println(\"El pokemon se ha hecho daño a si mismo!\");\r\n// try {\r\n// creg.guardarRegistroSimulacion(\"El pokemon se ha hecho daño a si mismo!\");\r\n// } catch (IOException ex) {\r\n// Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n// }\r\n }\r\n else{\r\n inflingirDaño(pokemon_activo2.getMovimientos()[i], pokemon_activo1, pokemon_activo2);\r\n if(pokemon_activo1.getVida_restante() <= 0){\r\n pokemon_activo1.setVida_restante(0);\r\n pokemon_activo1.setDebilitado(true);\r\n JOptionPane.showMessageDialog(this.vc, \"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\", \"Debilitado\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Pokemon: \"+ pokemon_activo1.getPseudonimo()+\" se ha Debilitado\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if(condicionVictoria(getEquipo1(), getEquipo2()) == true){\r\n JOptionPane.showMessageDialog(this.vc, \"El Ganador de este Combate es:\"+ entrenador2.getNombre(), \"Ganador\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"El Ganador de este Combate es:\"+ entrenador2.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"El Ganador de este Combate es:\"+ entrenador2.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.dispose();\r\n vpc.dispose();\r\n combate.setGanador(entrenador2);\r\n combate.setPerdedor(entrenador1);\r\n }\r\n else if(getEquipo1()[0].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[0]; \r\n }\r\n else if(getEquipo1()[1].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[1]; \r\n }\r\n else if(getEquipo1()[2].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[2]; \r\n }\r\n else if(getEquipo1()[3].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[3]; \r\n }\r\n else if(getEquipo1()[4].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[4]; \r\n }\r\n else if(getEquipo1()[5].getDebilitado() == false){\r\n pokemon_activo1 = getEquipo1()[5]; \r\n }\r\n vc.setjL_nombrepokemon1(pokemon_activo1.getPseudonimo());\r\n vc.setjL_especie1(pokemon_activo1.getNombre_especie());\r\n vc.setjL_Nivel1(pokemon_activo1.getNivel());\r\n }\r\n va.setVisible(false);\r\n vc.setjL_Turno_actual(entrenador1.getNombre());\r\n vc.setjL_vida_actual1(pokemon_activo1.getVida_restante(), pokemon_activo1.getVida());\r\n vc.setjL_vida_actual2(pokemon_activo2.getVida_restante(), pokemon_activo2.getVida());\r\n JOptionPane.showMessageDialog(this.vc, \"Turno\"+\" \"+entrenador1.getNombre(), \"Tu Turno\", JOptionPane.INFORMATION_MESSAGE);\r\n System.out.println(\"Turno\"+\" \"+entrenador1.getNombre());\r\n try {\r\n creg.guardarRegistroSimulacion(\"Turno\"+\" \"+entrenador1.getNombre());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n vc.turnoJugador1();\r\n this.turno = 0;\r\n }\r\n }\r\n else {\r\n System.out.println(\"El pokemon no puede atacar\");\r\n try {\r\n creg.guardarRegistroSimulacion(\"El pokemon no puede atacar\");\r\n } catch (IOException ex) {\r\n Logger.getLogger(ControladorCombate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n if((int)(Math.random()*3) == 1){ //1/3 de probabilidad de desactivar el efecto\r\n pokemon_activo2.setCongelado(false);\r\n pokemon_activo2.setDormido(false);\r\n }\r\n }\r\n }\r\n setLabelEstados(1);\r\n setLabelEstados(0); \r\n \r\n }", "@Override\n\tpublic void verVehiculosDisponibles() {\n\t\tif(getCapacidad() > 0) {\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 1 \" + \" Carro disponible, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 0 \" + \" Carro disponibles, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}\n\t\t\n\t}", "private void verificarDatos(int fila) {\n try {\n colValidada = -1;\n\n float cantidad = 1;\n float descuento = 0;\n float precio = 1;\n float stock = 1;\n if (TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colCantidad) != null) {\n cantidad = Float.parseFloat(TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colCantidad).toString());\n }\n if (TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colPrecioConIGV) != null) {\n precio = Float.parseFloat(TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colPrecioConIGV).toString());\n }\n if (TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colDescuento) != null) {\n descuento = Float.parseFloat(TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colDescuento).toString());\n }\n\n if (precio < 0) {\n JOptionPane.showMessageDialog(this, \"el precio debe ser mayor a cero\");\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colPrecioConIGV);\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colImporSinDesc);\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colImporSinDescConIgv);\n colValidada = oCLOrdenCompra.colPrecioConIGV;\n return;\n }\n\n if (descuento > cantidad * precio) {\n JOptionPane.showMessageDialog(this, \"El descuento no puede ser mayor al Importe Bruto\");\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colDescuento);\n descuento = 0;\n TblOrdenCompraDetalle.setValueAt(CLRedondear.Redondear((cantidad * precio) - descuento, 2), fila, oCLOrdenCompra.colImporConDesc);//con\n oCLOrdenCompra.CalcularSubtotales();\n oCLOrdenCompra.calcularImportes();\n\n colValidada = oCLOrdenCompra.colDescuento;\n return;\n }\n\n if (descuento < 0) {\n JOptionPane.showMessageDialog(this, \"El descuento no puede ser menor a cero\");\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colDescuento);\n descuento = 0;\n TblOrdenCompraDetalle.setValueAt(CLRedondear.Redondear((cantidad * precio) - descuento, 2), fila, oCLOrdenCompra.colImporConDesc);//con\n colValidada = oCLOrdenCompra.colDescuento;\n return;\n }\n\n if (cantidad <= 0) {\n JOptionPane.showMessageDialog(this, \"La cantidad debe ser mayor a cero\");\n TblOrdenCompraDetalle.setValueAt(null, fila, oCLOrdenCompra.colCantidad);\n colValidada = oCLOrdenCompra.colCantidad;\n return;\n }\n /* if(precio<=0)\n {\n JOptionPane.showMessageDialog(null,\"El precio tiene q ser mayor a cero\");\n colValidada=oCLOrdenCompra.colPrecio;\n return;\n }*/\n if (TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colStock) != null) {\n stock = Float.parseFloat(TblOrdenCompraDetalle.getValueAt(fila, oCLOrdenCompra.colStock).toString());\n }\n if (cantidad > stock) {\n /* JOptionPane.showMessageDialog(null,\"La cantidad no debe ser mayor al stock disponible\");\n TblOrdenCompraDetalle.setValueAt(null, fila,oCLOrdenCompra.colCantidad);\n colValidada=oCLOrdenCompra.colCantidad;\n return;*/\n }\n\n int col = TblOrdenCompraDetalle.getSelectedColumn();\n if (!eventoGuardar) {\n if (col == oCLOrdenCompra.colCantidad) {\n oCLOrdenCompra.calcularPrecio(fila);\n }\n }\n\n } catch (Exception e) {\n cont++;\n System.out.println(\"dlgGestionOrdenCompra-metodo Verificar datos: \"+e);\n }\n }", "public void cambioEstadAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAvaluo()) || \"\".equals(mBRadicacion.Radi.getEstadoAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.CambioEstRad(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"La informacion ha sido guardada correctamente\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".cambioEstadAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "public Nodo espaciosJustos(Nodo nodo){\n System.out.println(\"----------------inicio heuristica espaciosJustos--------------\");\n Operadores operadores = new Operadores();\n //variables de matriz\n int numFilas,numColumnas,numColores;\n \n numColumnas = nodo.getnColumnas();\n numFilas = nodo.getnFilas();\n numColores = nodo.getnColores();\n \n String [][] matriz = new String [numFilas][numColumnas];\n matriz = operadores.clonarMatriz(nodo.getMatriz());\n //-------------------\n \n //variables de filas y columnas\n ArrayList<ArrayListColumna> columnas = new ArrayList<ArrayListColumna>();\n columnas = (ArrayList<ArrayListColumna>)nodo.getColumnas();\n \n ArrayList<ArrayListFila> filas = new ArrayList<ArrayListFila>();\n filas = (ArrayList<ArrayListFila>)nodo.getFilas();\n //---------------------------\n \n ArrayListFila auxListFila = new ArrayListFila();\n ArrayListColumna auxListColumna = new ArrayListColumna();\n \n int cambio=1;\n int changue=0;\n while(cambio!=0){\n cambio=0;\n \n nodo.setCambio(0);\n for(int i=0;i<numFilas;i++){\n auxListFila = (ArrayListFila)filas.get(i);\n for(int j=0;j<numColores;j++){\n Color auxColor = new Color();\n auxColor = auxListFila.getColor(j);\n\n if(auxColor.getNumero() > 0){\n int contador=0;\n for(int c=0;c<numColumnas;c++){\n auxListColumna=(ArrayListColumna)columnas.get(c);\n\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListColumna.getColor(j1);\n if(auxColor1.getNumero() > 0){\n if(auxColor.getColor().equals(auxColor1.getColor()) && operadores.isPosicionVaciaFila(nodo.getMatriz(), i, c)){\n contador++;\n }\n }\n }\n }\n \n if(auxColor.getNumero() == contador){\n changue=1;\n cambio=1;\n auxColor.setNumero(0);\n for(int c=0;c<numColumnas;c++){\n auxListColumna=(ArrayListColumna)columnas.get(c);\n\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListColumna.getColor(j1);\n if(auxColor1.getNumero() > 0){\n if(auxColor.getColor().equals(auxColor1.getColor()) && operadores.isPosicionVaciaFila(nodo.getMatriz(), i, c)){\n \n auxColor1.setNumero(auxColor1.getNumero()-1);\n\n matriz = operadores.pintarPosicion(matriz, i, c, auxColor.getColor());\n\n nodo.setMatriz(matriz);\n }\n }\n }\n }\n System.out.println(\"-----\");\n operadores.imprimirMatriz(nodo.getMatriz());\n System.out.println(\"-----\");\n \n \n }\n }\n }\n }\n \n }\n if(changue==1) nodo.setCambio(1);\n System.out.println(\"----------------fin heuristica espaciosJustos-------------- \");\n return (Nodo)nodo;\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 }", "public void start() {\n boolean continua = true;\n Dati datiRMP;\n int codPiatto;\n int codRiga;\n int quantiCoperti;\n int quanteComande;\n String descPiatto;\n String catPiatto;\n Modulo modRMP = RMPModulo.get();\n Modulo modPiatto = PiattoModulo.get();\n Modulo modCategoria = CategoriaModulo.get();\n ModuloRisultati modRisultati = getModuloRisultati();\n Campo chiaveRMP;\n int codRMP;\n int codMenu;\n int[] codici;\n double qtaOff;\n double qtaCom;\n double gradimento = 0.0;\n PanCoperti panCoperti;\n\n try { // prova ad eseguire il codice\n\n /* azzera il numero di coperti serviti */\n panCoperti = getPanCoperti();\n panCoperti.setNumCopertiPranzo(0);\n panCoperti.setNumCopertiCena(0);\n\n /* svuota i dati del modulo risultati */\n getModuloRisultati().query().eliminaRecords();\n\n datiRMP = this.getDati();\n chiaveRMP = modRMP.getCampoChiave();\n\n /* spazzola le RMP trovate */\n for (int k = 0; k < datiRMP.getRowCount(); k++) {\n\n this.quanti++;\n\n codRMP = datiRMP.getIntAt(k, chiaveRMP);\n codPiatto = datiRMP.getIntAt(k, modRMP.getCampo(RMP.CAMPO_PIATTO));\n descPiatto = datiRMP.getStringAt(k,\n modPiatto.getCampo(Piatto.CAMPO_NOME_ITALIANO));\n catPiatto = datiRMP.getStringAt(k,\n modCategoria.getCampo(Categoria.CAMPO_SIGLA));\n\n codRiga = addPiatto(codPiatto, descPiatto, catPiatto);\n\n if (codRiga <= 0) {\n continua = false;\n break;\n }// fine del blocco if\n\n /* incrementa di 1 il numero di volte in cui il piatto è stato proposto\n * per questa riga risultati */\n incrementaCampo(codRiga, Campi.Ris.quanteVolte, 1);\n\n /* determina il numero dei coperti presenti nel menu al\n * quale questa RMP appartiene */\n codMenu = datiRMP.getIntAt(k, modRMP.getCampo(RMP.CAMPO_MENU));\n quantiCoperti = getQuantiCoperti(codMenu);\n\n /* incrementa il numero di coperti potenziali per questa riga risultati */\n incrementaCampo(codRiga, Campi.Ris.quantiCoperti, quantiCoperti);\n\n /* determina il numero di comande effettuate\n * per questa RMP */\n quanteComande = getQuanteComande(codRMP);\n\n /* incrementa il numero di comande effettuate per questa riga risultati */\n incrementaCampo(codRiga, Campi.Ris.quanteComande, quanteComande);\n\n /* interruzione nella superclasse */\n if (super.isInterrompi()) {\n continua = false;\n break;\n }// fine del blocco if\n\n } // fine del ciclo for\n\n /* spazzola le righe dei risultati per regolare il gradimento */\n if (continua) {\n codici = modRisultati.query().valoriChiave();\n for (int k = 0; k < codici.length; k++) {\n codRiga = codici[k];\n gradimento = 0.0;\n qtaOff = modRisultati.query()\n .valoreDouble(Campi.Ris.quantiCoperti.getCampo(), codRiga);\n qtaCom = modRisultati.query()\n .valoreDouble(Campi.Ris.quanteComande.getCampo(), codRiga);\n if (qtaOff != 0) {\n gradimento = qtaCom / qtaOff;\n gradimento = Lib.Mat.arrotonda(gradimento, 4);\n }// fine del blocco if\n modRisultati.query().registraRecordValore(codRiga,\n Campi.Ris.gradimento.getCampo(),\n gradimento);\n } // fine del ciclo for\n }// fine del blocco if\n\n datiRMP.close();\n\n getNavigatore().aggiornaLista();\n\n /* aggiorna il numero di coperti serviti */\n Filtro filtro;\n Number numero;\n Modulo moduloRMT = RMTModulo.get();\n Filtro filtroMenu = getFiltroMenu();\n Filtro filtroPranzo = FiltroFactory.crea(MenuModulo.get().getCampo(Menu.Cam.pasto), Ristorante.COD_DB_PRANZO);\n Filtro filtroCena = FiltroFactory.crea(MenuModulo.get().getCampo(Menu.Cam.pasto), Ristorante.COD_DB_CENA);\n filtro = new Filtro();\n filtro.add(filtroMenu);\n filtro.add(filtroPranzo);\n numero = moduloRMT.query().somma(RMT.Cam.coperti.get(), filtro);\n panCoperti.setNumCopertiPranzo(Libreria.getInt(numero));\n filtro = new Filtro();\n filtro.add(filtroMenu);\n filtro.add(filtroCena);\n numero = moduloRMT.query().somma(RMT.Cam.coperti.get(), filtro);\n panCoperti.setNumCopertiCena(Libreria.getInt(numero));\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }", "private void revisaOtorgaPermisos(ResultSet rs) {\n try {\n if(rs.last()){\n if((Integer.parseInt(rs.getString(\"otorgaPermisosConfig\"))==(0))){\n desHabilita(jcbConf, hijos.get(0));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosSistema\"))==(0))){\n desHabilita(jcbSistema,hijos.get(1));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosModulos\"))==(0))){\n desHabilita(jcbModulos, hijos.get(2));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosCompras\"))==(0))){\n desHabilita(jcbCompras,hijos.get(3));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosProvee\"))==(0))){\n desHabilita(jcbProve, hijos.get(4));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosPrevio\"))==(0))){\n desHabilita(jcbPrevioCompra, hijos.get(5));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosInventario\"))==(0))){\n desHabilita(jcbInventario, hijos.get(6));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosClientes\"))==(0))){\n desHabilita(jcbClientes, hijos.get(7));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosVentas\"))==(0))){\n desHabilita(jcbVentas, hijos.get(8));\n }\n if((Integer.parseInt(rs.getString(\"otorgaPermisosCotiza\"))==(0))){\n desHabilita(jcbCotizaciones, hijos.get(9));\n }\n }\n } catch (SQLException ex) {\n Logger.getLogger(PermsEstacs.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void iniciarNovaPartida(Integer posicao);", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "@SuppressWarnings(\"SuspiciousMethodCalls\")\n private int houve_estouro()\n {\n int retorno = 0;\n boolean checar = false;\n for (Map.Entry i: janela.entrySet())\n {\n if (janela.get(i.getKey()).isEstouro())\n {\n janela.get(i.getKey()).setEstouro(false);\n retorno =(int) i.getKey();\n checar = true;\n break;\n }\n }\n for(Map.Entry i2: janela.entrySet()) janela.get(i2.getKey()).setEstouro(false);\n if(checar) return retorno;\n else return -69;\n }", "public void PedirSintomas() {\n\t\t\r\n\t\tSystem.out.println(\"pedir sintomas del paciente para relizar el diagnosticoa\");\r\n\t}", "private void giveScords(){\n \t//bingo 題數, seconds花費秒數\n \tint totalSec = (int)seconds;\n \t\n \tif(correct){\n \t\tif(totalSec<=5){\n \t\t\tuserPoints = userPoints + 150;\n \t\t}else if(totalSec<=10){\n \t\t\tuserPoints = userPoints + 125;\n \t\t}else if(totalSec<=15){\n \t\t\tuserPoints = userPoints + 100;\n \t\t}else if(totalSec<=20){\n \t\t\tuserPoints = userPoints + 80;\n \t\t}\n \t}\n }", "public Integer plazasDisponibles() {\n\t\treturn cupo;\n\t}", "public Sesiones() {\n\t\tentradasVendidas = 0;\n\t}", "public void checaColision() {\n //Si el proyectil colisiona con la barra entonces..\n if (objBarra.colisiona(objProyectil)) {\n //Guardo el centro x del proyectil para no facilitar su comparacion\n int iCentroProyectil = objProyectil.getX()\n + objProyectil.getAncho() / 2;\n //Si el nivel de Y del lado inferior del proyectil es el mismo que\n //el nivel de Y del lado superior de la barra...\n if (objProyectil.getY() + objProyectil.getAlto()\n >= objBarra.getY()) {\n //Dividimos el ancho de la barra en 2 secciones que otorgan \n //diferente velocidad dependiendo que seccion toque el proyectil\n //Si el centro del proyectil toca la primera parte de la \n //barra o el lado izquierdo del proyectil esta mas a la \n //izquierda que el lado izquierdo de la barra...\n if ((iCentroProyectil > objBarra.getX() && iCentroProyectil\n < objBarra.getX() + objBarra.getAncho() / 2)\n || (objProyectil.getX() < objBarra.getX())) {\n bDireccionX = false; // arriba\n bDireccionY = false; // izquierda\n } //Si el centro del proyectil toca la ultima parte de la barra o\n //el lado derecho del proyectil esta mas a la derecha que el \n //lado derecho de la barra\n else if ((iCentroProyectil > objBarra.getX()\n + (objBarra.getAncho() / 2) && iCentroProyectil\n < objBarra.getX() + (objBarra.getAncho()\n - objBarra.getAncho() / 18)) || (objProyectil.getX()\n + objProyectil.getAncho() > objBarra.getX()\n + objBarra.getAncho())) {\n bDireccionX = true; // arriba\n bDireccionY = false; // derecha\n }\n }\n\n }\n for (Object objeBloque : lnkBloques) {\n Objeto objBloque = (Objeto) objeBloque;\n //Checa si la barra choca con los bloques (Choca con el poder)\n if(objBarra.colisiona(objBloque)) {\n bPoderes[objBloque.getPoder()] = true;\n }\n // Checa si el proyectil choca contra los bloques\n if (objBloque.colisiona(objProyectil)) {\n iScore++; // Se aumenta en 1 el score\n iNumBloques--; //Se resta el numero de bloques\n //Se activa el bloque con el poder para que se mueva para abajo\n if (objBloque.getPoder() != 0) {\n URL urlImagenPoder\n = this.getClass().getResource(\"metanfeta.png\");\n objBloque.setImagen(Toolkit.getDefaultToolkit()\n .getImage(urlImagenPoder));\n objBloque.setVelocidad(2);\n bAvanzaBloque = true;\n }\n if(objProyectil.colisiona(objBloque.getX(), \n objBloque.getY()) ||\n objProyectil.colisiona(objBloque.getX(), \n objBloque.getY()+objBloque.getAlto())) {\n objBloque.setX(getWidth() + 50);\n bDireccionX = false; //va hacia arriba\n }\n if(objProyectil.colisiona(objBloque.getX()+objBloque.getAncho(), \n objBloque.getY()) ||\n objProyectil.colisiona(objBloque.getX()+objBloque.getAncho(), \n objBloque.getY()+objBloque.getAlto())) {\n objBloque.setX(getWidth() + 50);\n bDireccionX = true; //va hacia arriba\n }\n //Si la parte superior de proyectil es mayor o igual a la parte\n //inferior del bloque(esta golpeando por abajo del bloque...\n if((objProyectil.getY() <= objBloque.getY() \n + objBloque.getAlto()) && (objProyectil.getY() \n + objProyectil.getAlto() > objBloque.getY() \n + objBloque.getAlto())) {\n objBloque.setX(getWidth() + 50);\n bDireccionY = true; //va hacia abajo\n \n \n }\n //parte inferior del proyectil es menor o igual a la de la parte\n //superior del bloque(esta golpeando por arriba)...\n else if(( objProyectil.getY() + objProyectil.getAlto()\n >= objBloque.getY())&&( objProyectil.getY() \n < objBloque.getY())) {\n objBloque.setX(getWidth() + 50);\n bDireccionY = false; //va hacia arriba\n }\n //Si esta golpeando por algun otro lugar (los lados)...\n else {\n objBloque.setX(getWidth()+50);\n bDireccionX = !bDireccionX;\n }\n }\n }\n //Si la barra choca con el lado izquierdo...\n if (objBarra.getX() < 0) {\n objBarra.setX(0); //Se posiciona al principio antes de salir\n } //Si toca el lado derecho del Jframe...\n else if (objBarra.getX() + objBarra.getAncho() - objBarra.getAncho() / 18\n > getWidth()) {\n objBarra.setX(getWidth() - objBarra.getAncho() + objBarra.getAncho()\n / 18);// Se posiciciona al final antes de salir\n }\n //Si el Proyectil choca con cualquier limite de los lados...\n if (objProyectil.getX() < 0 || objProyectil.getX()\n + objProyectil.getAncho() > getWidth()) {\n //Cambias su direccion al contrario\n bDireccionX = !bDireccionX;\n } //Si el Proyectil choca con la parte superior del Jframe...\n else if (objProyectil.getY() < 0) {\n //Cambias su direccion al contrario\n bDireccionY = !bDireccionY;\n } //Si el proyectil toca el fondo del Jframe...\n else if (objProyectil.getY() + objProyectil.getAlto() > getHeight()) {\n iVidas--; //Se resta una vida.\n // se posiciona el proyectil en el centro arriba de barra\n objProyectil.reposiciona((objBarra.getX() + objBarra.getAncho() / 2\n - (objProyectil.getAncho() / 2)), (objBarra.getY()\n - objProyectil.getAlto()));\n }\n }", "@Override\npublic int getPosicao() {\n\treturn posicaoBaixoEscada;\n}", "public int limitesX(){\n int v=0;\n if (fila==0 && columna>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 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>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 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{v=limitesY();}\n return v;\n }", "@Override\n\tpublic String StatistiqueNbrRisuqe(){\n float m= accountRepository.NbrStatus(\"a risque\");\n float s=accountRepository.NbrStatus(\"Stable\");\n float res =( m / s)*100;\n return res+\"%\";\n\n\t}", "public int conta()\n\t{\n\t\treturn posicoes.size();\n\t}", "public void verEstadoAmarres() {\n System.out.println(\"****************************************************\");\n for(int posicion = 0; posicion<NUMERO_AMARRES; posicion++) {\n int i = 0;\n boolean posicionEncontrada = false;\n while(!posicionEncontrada && i<alquileres.size()) {\n if(alquileres.get(i)!=null) {\n if(alquileres.get(i).getPosicion()==posicion) {\n System.out.println(\"Amarre [\"+posicion+\"] está ocupado\");\n System.out.println(\"Precio: \" + alquileres.get(i).getCosteAlquiler());\n posicionEncontrada = true;\n }\n }\n i++;\n }\n if(!posicionEncontrada) {\n System.out.println(\"Amarre [\"+posicion+\"] No está ocupado\");\n }\n }\n System.out.println(\"****************************************************\");\n }", "public int limitesY(){\n int v=0;\n if (columna==0 && fila>0 && fila<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 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 (columna==15 && fila>0 && fila<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 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{v=esquinas();}\n return v;\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 affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }", "public void iniciarValores(){\r\n //Numero de campos da linha, do arquivo de saida filtrado\r\n this.NUM_CAMPOS = 106;\r\n this.ID = 0; //numero da ficha\r\n this.NUM_ARQUIVOS = 2070;\r\n\r\n this.MIN_INDICE = 1; //indice do cadastro inicial\r\n this.MAX_INDICE = 90; //indice do cadastro final\r\n this.NUM_INDICES = 90; //quantidade de cadastros lidos em cada arquivo\r\n }", "@Override\n\tpublic void prossimo_stato(Model_context model, ArrayList<String> dati_input) {\n\t\tswitch(dati_input.get(0)) {\n\t\t\tcase \"1\":{\n\t\t\t\tmodel.set_stato_attuale(new Stato_inserisci_descrizione_libro_ricerca(get_attore()));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"2\":{\n\t\t\t\tmodel.set_stato_attuale(new Stato_inserisci_descrizione_film_ricerca(get_attore()));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:{\n\t\t\t\tmodel.set_stato_attuale(new Stato_errore(new Stato_ricerca_visualizza(get_attore()), this, \"inserisci un valore corretto\", get_attore()));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void getSconti() {\r\n\t\tsconti = ac.getScontiDisponibili();\r\n\t\t//la tabella sara' non nulla quando sara' caricato il file VisualizzaLog.fxml\r\n\t\tif(tabellaSconti!= null) {\r\n\t\t\tvaloreScontiCol.setCellValueFactory(new PropertyValueFactory<Sconto, Integer>(\"valore\"));\r\n\t puntiRichiestiCol.setCellValueFactory(new PropertyValueFactory<Sconto, String>(\"puntiRichiesti\"));\r\n\t spesaMinimaCol.setCellValueFactory(new PropertyValueFactory<Sconto, String>(\"spesaMinima\"));\r\n\t \r\n\t Collections.sort(sconti);\r\n\t tabellaSconti.getItems().setAll(sconti);\r\n\t \r\n\t tabellaSconti.setOnMouseClicked(e -> {\r\n\t \tif(aggiungi.isDisabled() && elimina.isDisabled()) \r\n\t \t\ttotale.setText(\"\" + ac.applicaSconto(tabellaSconti.getSelectionModel().getSelectedItem()));\r\n\t });\r\n\t }\r\n\t}", "public boolean Vacia (){\n return cima==-1;\n \n }", "@Override\n public void imprimir() {\n System.out.println(\"Vehiculos ordenados por precio mayor a menor:\");\n if(a1.precio>a2.precio && a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m1.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m2.marca+\"\"+m2.modelo);\n }else{\n System.out.println(m2.marca+\"\"+m2.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\"\"+m2.modelo);\n if(m1.precio >a2.precio){\n System.out.println(m1.marca+\"\"+m1.modelo);\n System.out.println(a2.marca+\"\"+a2.modelo);\n }else{\n System.out.println(a2.marca+\"\"+a2.modelo);\n System.out.println(m1.marca+\"\"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(a2.precio>a1.precio && a2.precio >m1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n if(m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n \n }\n }else{\n if(m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }else{\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }\n }\n }\n }\n }else{\n if(m1.precio>a2.precio && m1.precio >a1.precio && m1.precio >m2.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a2.precio >a1.precio && a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m2.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m2.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m2.marca+\" \"+m2.modelo);\n }else{\n System.out.println(m2.marca+\" \"+m2.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m2.precio >a2.precio && m2.precio >a1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n }else{ \n if(m2.precio>a2.precio && m2.precio >a1.precio && m2.precio >m1.precio){\n System.out.println(m2.marca+\" \"+m2.modelo);\n if(a2.precio >a1.precio && a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n if(a1.precio >m1.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n \n }\n }else{\n if(a1.precio >a2.precio && a1.precio >m1.precio){\n System.out.println(a1.marca+\"\"+a1.modelo);\n if(a2.precio >m1.precio){\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(m1.marca+\" \"+m1.modelo);\n }else{\n System.out.println(m1.marca+\" \"+m1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n \n }\n }else{\n if(m1.precio >a2.precio && m1.precio >a1.precio){\n System.out.println(m1.marca+\" \"+m1.modelo);\n if(a1.precio >a2.precio){\n System.out.println(a1.marca+\" \"+a1.modelo);\n System.out.println(a2.marca+\" \"+a2.modelo);\n }else{\n System.out.println(a2.marca+\" \"+a2.modelo);\n System.out.println(a1.marca+\" \"+a1.modelo);\n }\n }\n }\n }\n } \n \n }\n\n }\n }\n }", "public void setPosicion(int posicion){\n _posicion = posicion;\n }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "public void mostrarTareasEnPosicionImpar(){}", "public boolean attivaPulsanteProsegui(){\n\t\tif(!model.isSonoInAggiornamentoIncasso()){\n\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getOrdinativo() && model.getGestioneOrdinativoStep1Model().getOrdinativo().isFlagCopertura() && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso()!= null && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso().size()>0){\n\t\t\t return true;\t\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "private void esegui() {\n /* variabili e costanti locali di lavoro */\n OperazioneMonitorabile operazione;\n\n try { // prova ad eseguire il codice\n\n /**\n * Lancia l'operazione di analisi dei dati in un thread asincrono\n * al termine il thread aggiorna i dati del dialogo\n */\n operazione = new OpAnalisi(this.getProgressBar());\n operazione.avvia();\n\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }", "public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }", "private void gestionPriseEnCompte() {\r\n\t\tString raison = new String(\"\");\r\n\t\tDate now = new Date();\r\n\t\tString strSql = \"\";\r\n\t\r\n if (tbAlarme.getRowCount() > 0) {\r\n \tif (tbAlarme.getSelectedRowCount() > 0) {\r\n\t\t int[] selection = tbAlarme.getSelectedRows();\r\n\t\t int indexSelection = selection[0];\r\n\t\t int idCapteur = mdlTpsReelAlarme.getIdCapteur(indexSelection); \r\n\t\t String strTypeAlarme = \"\";\r\n\t\t \r\n\t\t\t\t// Motif Prise En Compte seulement si appel Alert\r\n\t\t strTypeAlarme = (String) mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_TYPE_ALARME);\r\n\t\t if (strTypeAlarme.equals(\"Alarme\")) {\r\n\t\t\t\t\tint idPriseEnCompte = 0;\r\n\t\t \tdo {\r\n\t\t\t\t\t\tObject [] possibilites = new Object[tbPriseEnCompte.size()];\r\n\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\tpossibilites[i] = tbPriseEnCompte.get(i).getNom();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString strReponse = (String)JOptionPane.showInputDialog(this, \"Choisir un motif de prise en compte : \", \"Prise en compte\", JOptionPane.QUESTION_MESSAGE, null, possibilites, null);\r\n\t\t\t\t\t\tidPriseEnCompte = 1;\r\n\t\t\t\t\t\tif (strReponse != null) {\r\n\t\t\t\t\t\t\tfor(int i = 0; i < tbPriseEnCompte.size(); i++) {\r\n\t\t\t\t\t\t\t\tif(strReponse.equals(tbPriseEnCompte.get(i).getNom())) {\r\n\t\t\t\t\t\t\t\t\tidPriseEnCompte = (int) tbPriseEnCompte.get(i).getId();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} // fin for\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"En attente\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// idPriseEncompte == 1 (Autres)\r\n\t\t\t\t\t\tif(idPriseEnCompte == 1) {\r\n\t\t\t\t\t\t\t// Demande de commentaire\r\n\t\t\t\t\t\t\traison = AE_Fonctions.saisieTexte(\"Veuillez entrer une raison : \", \"Raison commentaire ...\");\r\n\t\t\t\t\t\t\tif (raison == null) raison = \"\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\traison = \"---\";\r\n\t\t\t\t\t\t}\r\n\t\t \t} while(raison == \"\");\r\n\t\t \t\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET idPriseEnCompte = \" + idPriseEnCompte\r\n\t\t\t\t\t\t\t + \" , idUtilisateur = \" + EFS_Client_Variable.idUtilisateur\r\n\t\t\t\t\t\t\t + \" , CommentairePriseEnCompte = '\" + raison + \"'\"\r\n\t\t\t\t\t\t\t + \" WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setMotifIdPriseEncompte(indexSelection, idPriseEnCompte);\r\n\t\t } // fin if appelAlert\r\n\r\n\t\t if(mdlTpsReelAlarme.getValueAt(indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE) == null) {\r\n\t\t\t\t\t// Date prise en compte\r\n\t\t\t\t\tstrSql = \"UPDATE V2_AlarmeEnCours SET DatePriseEnCompte = sysdate, blPriseEnCompte = 1 WHERE idCapteur = \" + idCapteur;\r\n\t\t\t\t\tctn.fonctionSql(strSql);\r\n\t\t\t\t\tmdlTpsReelAlarme.setValueAt(now, indexSelection, JTABLE_ALARME_PRISE_EN_COMPTE);\r\n\t\t } // fin if datePrsieEnCompte\r\n\t\r\n\t\t // Prevenir le programme maitre\r\n\t\t AE_Fonctions.modifierMaitreViaClient(idCapteur, VIA_API_PRISE_EN_COMPTE);\r\n\t\t \r\n\t\t\t\t// Arret klaxon et Alert\r\n//\t\t\t\tgestionKlaxon(false);\r\n//\t\t\t\tgestionAlert(false);\r\n\t\t\t\t\r\n \t} else {\r\n \t JOptionPane.showMessageDialog(this, \"Vous devez sélectionner une ligne pour prendre en compte ...\",\r\n \t \t\t \"GTC Visualize - Programme Maitre\", JOptionPane.WARNING_MESSAGE);\r\n \t}\r\n } else {\r\n//\t\t\tgestionKlaxon(false);\r\n//\t\t\tgestionAlert(false);\r\n }\r\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public boolean esPositivo() {\n\t\treturn !esNegativo();\n\t}", "public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}", "private static int puntosPOI(POI p)\n\t{\n\t\tint retorno = -1;\n\t\tif (p == null)\n\t\t{\n\t\t\treturn retorno;\n\t\t}else\n\t\t{\n\t\t\tint neg = p.getWarningcount().getClosed();\n\t\t\tint pos = p.getWarningcount().getDuplicated();\n\t\t\tretorno = pos + neg;\n\t\t\treturn retorno;\n\t\t\t\n\t\t}\n\t}", "private void priorizar() {\r\n if (ini == fin) {\r\n return;\r\n }\r\n\r\n int t1 = fin, t2 = fin - 1;\r\n TDAPrioridad aux = new TDAPrioridad(0, '0');\r\n while (t1 != ini) {\r\n if (datos[t1].getPrioridad() > datos[t2].getPrioridad()) {\r\n aux.setObjeto(datos[t1]);\r\n datos[t1].setObjeto(datos[t2]);\r\n datos[t2].setObjeto(aux);\r\n t2--;\r\n t1--;\r\n } else {\r\n break;\r\n }\r\n }\r\n }", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "private void setStatusTelaExibir () {\n setStatusTelaExibir(-1);\n }", "@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 actualizarEnConsola() {\n\t\tfor(int i=0; i<elementos.size();i++){\n\t\t\tElemento e = elementos.get(i);\n\t\t\tSystem.out.println(e.getClass().getName()+\"- Posicion: , X: \"+e.getPosicion().getX()+\", Y: \"+ e.getPosicion().getY());\n\t\t}\n\t\t\n\t}", "private static int[] ubicarPosicionCero(int[][] estado) {\n\t\tfor(int i = 0 ; i < estado.length ; i++) {\n\t\t\tfor(int j = 0 ; j < estado.length ; j++) {\n\t\t\t\tif(estado[i][j]==0) {\n\t\t\t\t\tSystem.out.println(\"La posicion del espacio cero es: \"+ i +\",\"+j);\n\t\t\t\t\treturn new int[] {i,j};\n\t\t\t\t}\n\t\t\t\t//System.out.println(\"La posicion del espacio cero es: \"+ i +\",\"+j);\n\t\t\t\t//posicion[0]= i;\n\t\t\t\t//posicion[1]=j;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public int getPrecios()\r\n {\r\n for(int i = 0; i < motos.size(); i++)\r\n {\r\n precio_motos += motos.get(i).getCoste();\r\n }\r\n \r\n return precio_motos;\r\n }", "public void consultasSeguimiento() {\r\n try {\r\n switch (opcionMostrarAnalistaSeguim) {\r\n case \"Cita\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(2, mBsesion.codigoMiSesion());\r\n break;\r\n case \"Entrega\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(3, mBsesion.codigoMiSesion());\r\n break;\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".consultasSeguimiento()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "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 CobrarImpuestosReducidos(){\n\t\tif(sueldoBruto>=BASE_MINIMA_IMPUESTOS && sueldoBruto<IMPUESTO_SUP){\n\t\t\tsueldoNeto=sueldoBruto-(sueldoBruto*PAGA_IMPUESTOS_MIN);\n\t\t\ttipoImpuesto=\"Ha pagado el 20% de impuestos\";\n\t\t}\n\t}", "public String exibirContato(int posicao) {\n\t\treturn contatos[posicao].toString();\n\t}", "public void precioFinal(){\r\n if(getConsumoEnergetico() == Letra.A){\r\n precioBase = 100+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.B)){\r\n precioBase = 80+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.C){\r\n precioBase = 60+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.D)){\r\n precioBase = 50+precioBase;\r\n }\r\n else if(getConsumoEnergetico() == Letra.E){\r\n precioBase = 30+precioBase;\r\n }\r\n else if((getConsumoEnergetico() == Letra.F)){\r\n precioBase = 10+precioBase;\r\n }\r\n else{\r\n aux=1;\r\n System.out.println(\"...No existe...\");\r\n }\r\n if (aux==0){\r\n peso();\r\n }\r\n \r\n }", "public static int BuscarPorcentajeConvenio(int pac, int idempresa, int idservicio, Session sesion) {\n String hql;\n int porc = 0;\n try{ \n //sesion = NewHibernateUtil.getSessionFactory().openSession();\n //tr = sesion.beginTransaction();\n hql = \"SELECT porcentaje FROM Convenio WHERE estado = 'Activo' AND paciente = \"+pac+\" AND empresa = \"+idempresa+\" AND servicio = \"+idservicio;\n Query query = sesion.createQuery(hql); \n Iterator it = query.iterate();\n if(it.hasNext()){\n porc = (int)it.next();\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return porc;\n }", "public String imprimeTop(){\r\n\t\tloja.ordenaPontos();\r\n\t\tstatus = \"------------Top 5 de Usuarios Com Maiores Xp------------\" + quebraLinha ;\r\n\t\tfor(int i =0; i<5; i++){\r\n\t\t\tstatus += (i+1+\"° \" +loja.getUsuarios().get(i).getNome() + \" possui \"+ loja.getUsuarios().get(i).getPontos() +\" de Xp\"+ quebraLinha);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn status;\r\n\t}", "void establecerPuntoAM(int pos){\n this.emisoraAMActual = pos;\n }", "private static boolean poserTapis(){\n\t\tSystem.out.println(\"Choisisser une premiere case pour poser la premiere partie du tapis\");\n\t\tint premiereCaseTapis = console.obtenirDirection();\n\t\tint direction = premiereCaseTapis;\n\t\tint posXTapis = 0, posYTapis = 0;\n\n\t\t//Pose du premier carre de tapis\n\t\ttry{\n\t\t\tif(premiereCaseTapis == 1){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-2][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-2;\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 2){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion();\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 3){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()-2].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-2;\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion();\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\treturn false;\n\t\t}\n\n\n\n\n\t\tconsole.afficherJeu();\n\t\tSystem.out.println(\"Choisissez la deuxieme case\");\n\n\t\t//Pose du second petit carre de tapis\n\t\twhile(true){\n\t\t\tint d = console.obtenirDirection();\n\t\t\t//pour ne pas faire de demi tour ou erreur de d\n\t\t\tif(direction == 1 && d == 2 || direction == 2 && d == 1 || direction == 3 && d == 4 || direction == 4 && d == 3 || d<1 || d>4){\n\t\t\t\tconsole.afficherImpossibleChoisirDirection();\n\t\t\t} else {\n\t\t\t\ttry{\n\t\t\t\t\tif(d == 1){\n\t\t\t\t\t\tjeu.cases[posXTapis-1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 2){\n\t\t\t\t\t\tjeu.cases[posXTapis+1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 3){\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis-1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis+1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tjeu.getJoueurs()[tour-1].useTapis();\n\t\treturn true;\n\n\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}", "public int \tqueCelulaHay(Casilla pos)\r\n\t{\r\n\t\t\r\n\t\tint queHay = ES_VACIA;\r\n\t\t\r\n\t\t//si no esta vacia miro que celula es\r\n\t\tif(superficie[pos.getFila()][pos.getCol()]!=null)\r\n\t\t{\r\n\t\t\tif(superficie[pos.getFila()][pos.getCol()].soyComestible()) queHay = ES_SIMPLE;\r\n\t\t\telse if(!superficie[pos.getFila()][pos.getCol()].soyComestible()) queHay = ES_COMPLEJA;\r\n\t\t}\r\n\t\t\r\n\t\treturn queHay;\r\n\t\r\n\t}", "public void verificaCambioEstado(int op) {\r\n try {\r\n if (Seg.getCodAvaluo() == 0) {\r\n mbTodero.setMens(\"Seleccione un numero de Radicacion\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.setCodAvaluo(Seg.getCodAvaluo());\r\n if (op == 1) {\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').show()\");\r\n } else if (op == 2) {\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').show()\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".verificaCambioEstado()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "private boolean isPosicaoEstatal(int posicao) {\n\n boolean estatal = false;\n if (posicao == 12 || posicao == 28) {\n return true;\n } else {\n return false;\n }\n }", "void establecerPuntoFM(int pos){\n this.emisoraFMActual = pos;\n }", "private void compruebaColisiones()\n {\n // Comprobamos las colisiones con los Ufo\n for (Ufo ufo : ufos) {\n // Las naves Ufo chocan con la nave Guardian\n if (ufo.colisionaCon(guardian) && ufo.getVisible()) {\n mensajeDialogo(0);\n juego = false;\n }\n // Las naves Ufo llegan abajo de la pantalla\n if ((ufo.getPosicionY() - ufo.getAlto() > altoVentana)) {\n mensajeDialogo(0);\n juego = false;\n }\n // El disparo de la nave Guardian mata a una nave Ufo\n if (ufo.colisionaCon(disparoGuardian) && ufo.getVisible()) {\n ufo.setVisible(false);\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n ufosMuertos++;\n }\n }\n\n // El disparo de las naves Ufo mata a la nave Guardian\n if (guardian.colisionaCon(disparoUfo)) {\n disparoUfo.setVisible(false);\n mensajeDialogo(0);\n juego = false;\n }\n\n // Si el disparo Guardian colisiona con el disparo de los Ufo, se\n // eliminan ambos\n if (disparoGuardian.colisionaCon(disparoUfo)) {\n disparoGuardian.setVisible(false);\n disparoGuardian.setPosicion(0, 0);\n disparoUfo.setVisible(false);\n }\n }", "public void verSesionCandidato(Candidato actualcandidat)\r\n\t{\r\n\t\tSesion sesio = new Sesion();\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tString fechasesion = calendario.get(Calendar.YEAR)+\"-\"+(calendario.get(Calendar.MONTH)+1)+\"-\"+calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString horainicial = calendario.get(Calendar.HOUR_OF_DAY)+\":\"+calendario.get(Calendar.MINUTE)+\":\"+calendario.get(Calendar.SECOND);\r\n\t\tsesio.setFechasesion(fechasesion);\r\n\t\tsesio.setHorainicial(horainicial);\r\n\t\tsesio.setHorafinal(\"NULL\");\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tSesionBD.insertar(sesio, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tSesion sesioningr = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tConector conector = new Conector();\r\n\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\tsesioningr = SesionBD.buscarFechaHora(fechasesion, horainicial, conector);\r\n\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t}\r\n\t\tif(sesioningr != null)\r\n\t\t{\r\n\t\t\tSesionCandidato nuevasesion = new SesionCandidato();\r\n\t\t\tnuevasesion.setIdsesion(sesioningr.getIdsesion());\r\n\t\t\tnuevasesion.setIdcandidato(actualcandidat.getIdcandidato());\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tConector conector = new Conector();\r\n\t\t\t\tconector.iniciarConexionBaseDatos();\r\n\t\t\t\tSesionCandidatoBD.insertar(nuevasesion, conector);\r\n\t\t\t\tconector.terminarConexionBaseDatos();\r\n\t\t\t\t\r\n\t\t\t\tsesioncandidato = new SesionCandidatoI(this, actualcandidat, sesioningr);\r\n\t\t\t\tsesioncandidato.setVisible(true);\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public int contarHojas(){\n return (super.contarHojas());\n }", "public static ArrayList IngresarInfoLista(int posarray){\n\n // Definir objeto de la clase constanste para mensajes\n Constantes constantes = new Constantes();\n\n // Definir Array del objeto de la clase BeneficiosCovid\n ArrayList <BeneficiosCovid19> arrayBeneficios = new ArrayList <BeneficiosCovid19>();\n\n System.out.println(\"Por favor ingresar Subsidios para la lista Nro: \" + posarray);\n\n // Variables de trabajo\n String tipoDato = \"\";\n String info = \"\";\n String idrandom;\n String continuar = constantes.TXT_SI;\n //iniciar Ciclo para cargar informacion\n //while (continuar.equals(\"SI\")){\n\n //Definir Objeto de la clase BeneficiosCovid\n BeneficiosCovid19 beneficios_Covid = new BeneficiosCovid19();\n\n //Ingresar Nombre Tipo Alfa\n tipoDato = \"A\";\n info = validarinfo(constantes.TXT_Inp_Nombre,tipoDato);\n beneficios_Covid.setNombre(info);\n\n //Ingresar Valor Subsidio Tipo Numerico\n tipoDato = \"N\";\n info = validarinfo(constantes.TXT_Inp_Subsidio,tipoDato);\n beneficios_Covid.setValorSubsidio(Float.parseFloat(info));\n\n //Obtener el ID de manera aleatoria\n idrandom = getIdBeneficio();\n beneficios_Covid.setId(idrandom);\n\n arrayBeneficios.add(beneficios_Covid);\n\n /**\n * Validacion para continuar o finalizar el ciclo\n * principaly finalizar Main de manera controlada\n * por consola\n **/\n\n /* tipoDato = \"A\";\n continuar = validarinfo(constantes.TXT_Msg_Continuar,tipoDato);\n // Validar valor ingrsado para continuar o finalizar aplicación\n while ( !continuar.equals(\"SI\") && !continuar.equals(\"NO\")) {\n continuar = validarinfo(constantes.TXT_Msg_Continuar, tipoDato);\n }\n\n }\n */\n return arrayBeneficios;\n }", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "private void setObservacoesHoras(\n\t\t\tint historicoAlterado, int exclusao, int inclusao,\n\t\t\tint horasAcima15m, int horasAcima30m, int horasAcima1h, int horasAcima3h, int horasAcima7h, int horasAcima12h, int horasAcima23h, \n\t\t\tint horasAbaixo15m, int horasAbaixo30m, int horasAbaixo1h, int horasAbaixo3h, int horasAbaixo5h) {\n\t\t\n\t\tString observacaoHorasInconsistencia = setObservacaoHorasInconsistentes();\n\t\t\n\t\tString observacaoInclusao = \"\";\n\t\tif (inclusao > 1) {\n\t\t\tobservacaoInclusao = (inclusao == 2 ? \"1 inclusão manual\" : ((inclusao-1) + \" inclusões manual\"));\n\t\t}\n\t\t\n\t\tString observacaoExclusao = \"\";\n\t\tif (exclusao > 1) {\n\t\t\tobservacaoExclusao = (exclusao == 2 ? \"1 apagado\" : ((exclusao-1) + \" apagados\"));\n\t\t}\n\t\t\n\t\tString historicoAlteracao = \"\";\n\t\tif (historicoAlterado > 1) {\n\t\t\thistoricoAlteracao = (historicoAlterado == 2 ? \"1 histórico alteração\" : ((historicoAlterado-1) + \" históricos de alterações\"));\n\t\t}\n\n\t\tthis.observacaoHoras = \"\";\n\t\t//this.observacaoHoras += observacaoHorasAcima == \"\" ? \"\" : \"<br>\"+observacaoHorasAcima;\n\t\t//this.observacaoHoras += observacaoHorasAbaixo == \"\" ? \"\" : \"<br>\"+observacaoHorasAbaixo;\n\t\tthis.observacaoHoras += observacaoHorasInconsistencia == \"\" ? \"\" : \"<br>\"+observacaoHorasInconsistencia; \n\t\tthis.observacaoHoras += observacaoInclusao == \"\" ? \"\" : \"<br>\"+observacaoInclusao;\n\t\tthis.observacaoHoras += observacaoExclusao == \"\" ? \"\" : \"<br>\"+observacaoExclusao;\n\t\tthis.observacaoHoras += historicoAlteracao == \"\" ? \"\" : \"<br>\"+historicoAlteracao;\n\t\t\n\t\tif (this.ausenciaSolicitacoes != null && !this.ausenciaSolicitacoes.isEmpty()) {\n\t\t\tList<AusenciaSolicitacao> ferias = this.ausenciaSolicitacoes.stream().filter(x->x.getMotivoAusencia().getNome().toLowerCase()==\"férias\").collect(Collectors.toList());\n\t\t\t\n\t\t\tList<AusenciaSolicitacao> ausencias = this.ausenciaSolicitacoes.stream().filter(x->x.getMotivoAusencia().getNome().toLowerCase()!=\"férias\").collect(Collectors.toList());\n\t\t}\n\t\t// folgas / ferias\n\t}", "private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }" ]
[ "0.6376336", "0.6337503", "0.6257168", "0.61117035", "0.606929", "0.60609984", "0.6021414", "0.5985124", "0.5982312", "0.5947356", "0.5941304", "0.59397197", "0.5907293", "0.59036374", "0.58939713", "0.58909756", "0.5863079", "0.58625185", "0.58511424", "0.58459467", "0.5806525", "0.5795805", "0.57892644", "0.5786709", "0.5783571", "0.5754049", "0.57408637", "0.57381666", "0.57362044", "0.5734196", "0.5733334", "0.57322055", "0.57276624", "0.57242864", "0.57192254", "0.5703597", "0.5700324", "0.5694403", "0.5687313", "0.5685291", "0.56733745", "0.5670918", "0.565817", "0.56517375", "0.56469655", "0.56408435", "0.5639241", "0.56332666", "0.56320167", "0.56319255", "0.56232446", "0.5605938", "0.55996335", "0.5593837", "0.55931723", "0.5591961", "0.55919254", "0.5586289", "0.5584583", "0.55827624", "0.5578399", "0.55773455", "0.55757356", "0.5573424", "0.5572862", "0.5570122", "0.55674565", "0.5566349", "0.5562899", "0.5562603", "0.55523425", "0.5550538", "0.5550147", "0.55473167", "0.5545574", "0.5544985", "0.5542533", "0.5536675", "0.5536654", "0.553463", "0.55311215", "0.5523888", "0.55222744", "0.5519348", "0.551774", "0.55144906", "0.55137", "0.5512012", "0.55088997", "0.5505795", "0.54993707", "0.54987663", "0.54952633", "0.54914874", "0.54911304", "0.54881346", "0.54811984", "0.54768515", "0.5476457", "0.5473403", "0.54700583" ]
0.0
-1
/ Funzione privata che ritorna le posizioni delle pedine dell'avversario che mettono in scacco il giocatore
private ArrayList<Coordinates> getThreats() { ArrayList<Coordinates> result = new ArrayList<>(); ArrayList<Coordinates> adversary = chessboard.getEnemyPieces(); Coordinates king = null; king = chessboard.getTurnKing(); for (Coordinates c : adversary ){ if ( checkMove(c, king) ){ result.add(c); } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }", "public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }", "@Override // Métodos que fazem a anulação\n\tpublic void vota() {\n\t\t\n\t}", "void establecerPuntoAM(int pos){\n this.emisoraAMActual = pos;\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}", "public Camion(int peso,Marcas marca,int kilometraje,int antiguedad) {\n super(peso,marca,kilometraje,antiguedad);\n if (super.getMarca().equals(\"FORD\")|| super.getMarca().equals(\"FIAT\"))\n {\n super.setArticulado();\n }\n if(super.getArticulado() && getPeso()<3000)\n {\n super.setCumpleNormativa();\n }\n if(!super.getArticulado() && getPeso()<2000)\n {\n super.setCumpleNormativa();\n }\n\n }", "private static void muta(Cromosoma c)\n\t{\n\t}", "public void moverArriba() {\n estado = EstadosPersonaje.QUIETO;\n mover(new Vector2(0, 1));\n }", "@Override\n public void movimiento_especial(){\n\n movesp=ataque/2;\n defensa+=5;\n PP= PP-4;\n }", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }", "@Override\r\n\tpublic boolean lancar(Combativel origem, Combativel alvo) {\r\n DadoVermelho dado = new DadoVermelho();\r\n int valor = dado.jogar();\r\n if(valor < origem.getInteligencia()) {\r\n alvo.defesaMagica(dano);\r\n return true;\r\n }\r\n else {\r\n \tSystem.out.println(\"Voce nao conseguiu usar a magia\");\r\n }\r\n return false;\r\n }", "protected void mover(){\r\n\t\r\n\t\t\r\n\t\tint centroX;\r\n\t\tint centroY;\r\n\t\tint radioGiro1;\r\n\t\tint coordX;\r\n\t\tint incrementoY;\r\n\t\tint diferenciaEnX;\r\n\t\t\r\n\t\tif(! this.entroAlCirculo){\r\n\t\t\tdirigirHaciaPunto(this.centroGiroX, (this.centroGiroY - this.radioGiro));\r\n\t\t}\r\n\t\t\r\n\t\telse{\t\t\t\t\r\n\t\t\t\r\n\t\t\tcentroX = this.centroGiroX;\r\n\t\t\tcentroY = this.centroGiroY;\r\n\t\t\tincrementoY = 1;\r\n\t\t\tradioGiro1 = this.radioGiro;\r\n\t\t\t\r\n\t\t\tif(this.x > centroX){\t\t\t\t\t\r\n\t\t\t\tthis.regresando = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.regresando){ //chequea si el avion se sobrepasa de los limites verticales del circulo, si es el caso cambia la direccion\r\n\t\t\t\t\r\n\t\t\t\tif((this.y - incrementoY) < (centroY - radioGiro1)){\r\n\t\t\t\t\tthis.regresando = false;\r\n\t\t\t\t}\r\n\t\t\t\telse{}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\tif((this.y + incrementoY) > (centroY + radioGiro1)){\r\n\t\t\t\t\t\tthis.regresando = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse{}\r\n\t\t\t}\t\t\t\r\n\t\t\tif ((this.y <= (centroGiroY + (radioGiro - incrementoY))) || (this.y >= (centroGiroY - (radioGiro - incrementoY)))){\r\n\t\t\t\t\r\n\t\t\t\tif(this.regresando){\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**calcula la posicion de x de acuerdo al movimiento en y, \r\n\t\t\t\t\t* con la formula de una circunferencia plana\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y - 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = coordX;\r\n\t\t\t\t\tthis.y -= incrementoY;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse{\r\n\t\t\t\t\tcoordX = (int) (Math.sqrt( (Math.pow(radioGiro1, 2)) - (Math.pow(((this.y + 1) - centroY), 2))) ) + centroX ;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tdiferenciaEnX = coordX - centroX;\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.x = centroX - diferenciaEnX;\r\n\t\t\t\t\tthis.y += incrementoY;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}", "private void _jogaEstado_mesa(Player playerMain, Player playerInimigo) {\n Carta cartaP1;\n CartaMonstro cartaMon;\n CartaMagica cartaMag;\n\n boolean cartasQueAtacaram[] = new boolean[playerMain.mesa.MESA_SIZE];\n int cartaIndex;\n\n Arrays.fill(cartasQueAtacaram, false);\n\n /* o jogador ainda quiser atacar (se possivel) ou mudar a carta para modo defesa-ataque */\n while (true) {\n System.out.println(\"Jogador \" + playerMain.nickName + \", Escolha uma carta da sua mesa que deseja usar ( -1 para finalizar o turno )\");\n for (int i = 0; i < Mesa.MESA_SIZE; i++) {\n cartaMon = playerMain.mesa.cartasMonstros[i];\n\n if (cartaMon != null) {\n System.out.print(\" \" + i + \". \" + cartaMon.getNome() + \" \" + cartaMon.getATK() + \"/\" + cartaMon.getDEF());\n if (cartaMon.getModoCarta().isAtaqueBaixo() || cartaMon.getModoCarta().isAtaqueCima()) {\n System.out.print(\" - A\");\n } else {\n System.out.print(\" - D\");\n }\n if (cartasQueAtacaram[i]) {\n System.out.print(\" - X\");\n }\n\n System.out.println(\"\");\n } else {\n System.out.println(\" \" + i + \". ...\");\n }\n }\n for (int i = 0; i < Mesa.MESA_SIZE; i++) {\n cartaMag = playerMain.mesa.cartasMagicas[i];\n if (cartaMag != null) {\n System.out.println(\" \" + (i + Mesa.MESA_SIZE) + \". \" + cartaMag.getNome() + \" \" + cartaMag.getTipoEfeitoMagico());\n } else {\n System.out.println(\" \" + (i + Mesa.MESA_SIZE) + \" . ...\");\n }\n }\n\n cartaIndex = scanner.nextInt();\n if (cartaIndex == -1) {\n break;\n }\n\n //usando as cartas magicas\n if (cartaIndex >= Mesa.MESA_SIZE) {\n cartaIndex -= Mesa.MESA_SIZE;\n cartaMag = playerMain.mesa.cartasMagicas[cartaIndex];\n if (cartaMag.getTipoEfeitoMagico() == CartaMagica.TipoEfeitoMagico.CAMPO) {\n cartaMag.aplicarEfeito(this, playerMain, -1);\n playerMain.mesa.removeMagica(cartaIndex);\n } else {\n System.out.println(\"Essa carta Magica não é ativavel manualmente!\");\n }\n continue;\n }\n\n if (cartasQueAtacaram[cartaIndex] == false) {\n cartaMon = playerMain.mesa.cartasMonstros[cartaIndex];\n System.out.println(\"Digite 1 para usa-la para atacar e 0 para mudar seu modo defesa-ataque\");\n if (scanner.nextInt() == 1) {\n if (cartaMon.getModoCarta().isAtaqueBaixo() || cartaMon.getModoCarta().isAtaqueCima()) {\n _jogaEstado_atacaMesaInimiga(playerMain, playerInimigo, cartaIndex);\n cartasQueAtacaram[cartaIndex] = true;\n if (playerMain.perdeu() || playerInimigo.perdeu()) {\n break;\n }\n } else {\n System.out.println(\"A carta deve estar em modo de ataque para atacar!\");\n }\n } else {\n giraCarta(cartaMon);\n }\n } else {\n System.out.println(\"Carta já atacou! escolha outra ou finalize o turno.\");\n }\n\n }\n\n }", "public void asignarVida();", "public void attrito(){\n yCord[0]+=4;\n yCord[1]+=4;\n yCord[2]+=4;\n //e riaggiorna i propulsori (che siano attivati o no) ricalcolandoli sulla base delle coordinate dell'astronave, cambiate\n aggiornaPropulsori();\n \n }", "public void Ordenamiento() {\n\n\t}", "private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "private void asignarCapacidades ()\n\t{\n\t\tif(tipoVehiculo.equalsIgnoreCase(TIPO_VEHICULO_ECONOMICO))\n\t\t{\n\t\t\tcapacidadKilometrosPorGalon = CAPACIDAD_60;\n\t\t}\n\t\t\n\t\telse if(tipoVehiculo.equalsIgnoreCase(TIPO_VEHICULO_MEDIO))\n\t\t{\n\t\t\tcapacidadKilometrosPorGalon = CAPACIDAD_45;\n\t\t}\n\t\t\n\t\telse capacidadKilometrosPorGalon = CAPACIDAD_30;\n\t}", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void iniciarNovaPartida(Integer posicao);", "@Override\r\n\tpublic void chocarOvos() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void chocarOvos() {\n\t\t\r\n\t}", "@Override\n\tpublic void manejoVida(int cantVida, int tipCambio) {\n\t\t\n\t}", "public void VuforiaOrientator() {\n }", "@Override\n\tpublic void concentrarse() {\n\t\tSystem.out.println(\"Se centra en sacar lo mejor del Equipo\");\n\t\t\n\t}", "void establecerPuntoFM(int pos){\n this.emisoraFMActual = pos;\n }", "private void moverJogadorAPosicao(int jogador, int valorDados, boolean iguais) {\n int tentativasDeSairDaPrisao = this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao();\n //Analisando se o cara esta preso, se a prisao ta ativada e se o cara tentou um numero de vezes menos que tres\n //ou se a funcao prisao esta falsa\n //ou se o jogador nao esta preso\n if ((JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao <= 2) || this.prisao == false || (!JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && this.prisao == true)) {\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && iguais && this.prisao == true && tentativasDeSairDaPrisao < 2);\n {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n }\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n }\n\n //analisando se o jogador esta preso e lanca numeros diferentes nos dados\n if (JogadorEstaPreso(this.listaJogadores.get(jogadorAtual()).getNome()) && !iguais && this.prisao == true) {\n //analisa se estourou as tentativas\n //se estourou\n if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() == 2) {\n this.sairdaPrisao(this.listaJogadores.get(jogadorAtual()));\n this.listaJogadores.get(jogadorAtual()).retirarDinheiro(50);\n this.listaJogadores.get(jogadorAtual()).setTentativasSairDaPrisao(0);\n this.posicoes[jogador] = (this.posicoes[jogador] + valorDados);\n if (posicoes[jogador] > 40) {\n posicoes[jogador] = posicoes[jogador] - 40;\n }\n\n } //se nao estourou\n else if (this.listaJogadores.get(jogadorAtual()).getTentativasSairDaPrisao() < 2) {\n this.listaJogadores.get(jogadorAtual()).addTentativasSairDaPrisao();\n }\n\n\n }\n\n\n }", "public void coMina(){\n espM=true;\r\n }", "@Override\n\tpublic void acomodaVista() {\n\n\t}", "public logicaEnemigos(){\n\t\t//le damos una velocidad inicial al enemigo\n\t\tsuVelocidad = 50;\n\t\tsuDireccionActual = 0.0;\n\t\tposX = 500 ;\n\t\tposY = 10;\n\t}", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "public void VaciarPila()\n {\n this.tope = 0;\n }", "@Override\n public void opcionEscogida(String app) {\n\n if(app.equals(\"camara\")){\n fotoCamara();\n eleccion=1;\n }else{\n //opcion galeria\n fotoGaleria();\n eleccion=2;\n }\n\n }", "private void mueveObjetos()\n {\n // Mueve las naves Ufo\n for (Ufo ufo : ufos) {\n ufo.moverUfo();\n }\n \n // Cambia el movimiento de los Ufos\n if (cambiaUfos) {\n for (Ufo ufo : ufos) {\n ufo.cambiaMoverUfo();\n }\n cambiaUfos = false;\n }\n\n // Mueve los disparos y los elimina los disparos de la nave Guardian\n if (disparoGuardian.getVisible()) {\n disparoGuardian.moverArriba();\n if (disparoGuardian.getPosicionY() <= 0) {\n disparoGuardian.setVisible(false);\n }\n }\n\n // Dispara, mueve y elimina los disparos de las naves Ufo\n disparaUfo();\n if (disparoUfo.getVisible()) {\n disparoUfo.moverAbajo();\n if (disparoUfo.getPosicionY() >= altoVentana) {\n disparoUfo.setVisible(false);\n }\n }\n\n // Mueve la nave Guardian hacia la izquierda\n if (moverIzquierda) {\n guardian.moverIzquierda();\n }\n // Mueve la nave Guardian hacia la derecha\n if (moverDerecha) {\n guardian.moverDerecha();\n }\n // Hace que la nave Guardian dispare\n if (disparar) {\n disparaGuardian();\n }\n }", "public void mueve( double tiempoDeMovimiento, double giro) {\n\t\tif (giro > 0){\n\t\t\tsetPosX( posX + (suVelocidad*4) * Math.sin(suDireccionActual+giro/180.0*Math.PI) * tiempoDeMovimiento );\n\t\t} else {\n\t\t\tsetPosX( posX + suVelocidad * Math.sin(suDireccionActual+giro/180.0*Math.PI) * tiempoDeMovimiento );\n\t\t}\n\t\tsetPosY( posY + suVelocidad * -Math.cos(suDireccionActual/180.0*Math.PI) * tiempoDeMovimiento );\n\n\t\t// el negativo es porque en pantalla la Y crece hacia abajo y no hacia arriba\n\t}", "private void suono(int idGioc) {\n\t\tpartita.effettoCasella(idGioc);\n\t}", "public void siguienteNivel(){ \n\t\tnivel++;\n\t\tcontador = 0;\n\t\tcontadorE = 0;\n\t\treiniciar = false;\n\t\t\n\t\tnumDisparos=0; \n\t\tpausa=false;\n\t\tdisparando=false;\n\t\t\n\t\tif(nivel<9){\n\t\t\tasteroides =new Asteroide [(2+(nivel*2)) *(int)Math.pow(astNumDivision,astNumDisparos-1)+1];\n\t\t\tnumAsteroides = 2+(nivel*2);\n\t\t}\n\t\telse{\n\t\t\tasteroides =new Asteroide [12 *(int)Math.pow(astNumDivision,astNumDisparos-1)+1];\n\t\t\tnumAsteroides = 12;\n\t\t}\n\t\t\n\t\tfor(int i=0;i<numAsteroides;i++){\n\t\t\tasteroides[i]=new Asteroide(this, Math.random()*this.getWidth(), Math.random()*this.getHeight(), \n\t\t\t\t\tastRadio,minAstVel, maxAstVel, astNumDisparos, astNumDivision, 1);\n\t\t}\n\t}", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "@Override\n public void setExperiencia(){\n experiencia1=Math.random()*50*nivel;\n experiencia=experiencia+experiencia1;\n subida();\n }", "public static void main(String[] arhg) {\n\n Conta p1 = new Conta();\n p1.setNumConta(1515);\n p1.abrirConta(\"cp\");\n p1.setDono(\"wesley\");\n p1.deposita(500);\n // p1.saca(700); -> irá gera um erro pois o valor de saque especificado é superior ao valor que tem na conta\n\n p1.estadoAtual();\n }", "public void eisagwgiGiatrou() {\n\t\t// Elegxw o arithmos twn iatrwn na mhn ypervei ton megisto dynato\n\t\tif(numOfDoctors < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tdoctor[numOfDoctors] = new Iatros();\n\t\t\tdoctor[numOfDoctors].setFname(sir.readString(\"DWSTE TO ONOMA TOU GIATROU: \")); // Pairnei apo ton xristi to onoma tou giatrou\n\t\t\tdoctor[numOfDoctors].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \")); // Pairnei apo ton xristi to epitheto tou giatrou\n\t\t\tdoctor[numOfDoctors].setAM(rnd.nextInt(1000000)); // To sistima dinei automata ton am tou giatrou\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t// Elegxos monadikotitas tou am tou giatrou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tif(doctor[i].getAM() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfDoctors++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS GIATROUS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "private void inizializzazione()\n {\n //Costruzione della Istanza display\n display = new Display(titolo,larghezza,altezza);\n \n /*Viene aggiunto il nostro gestore degli input da tastiera\n * alla nostra cornice.*/\n display.getCornice().addKeyListener(gestoreTasti);\n display.getCornice().addMouseListener(gestoreMouse);\n display.getCornice().addMouseMotionListener(gestoreMouse);\n display.getTelaGrafica().addMouseListener(gestoreMouse);\n display.getTelaGrafica().addMouseMotionListener(gestoreMouse);\n \n //Codice temporaneo per caricare la nostra immagine nel nostro programma\n /*testImmagine = CaricatoreImmagini.caricaImmagini(\"/Textures/Runner Stickman.png\");*/\n \n //Inizializzazione dell'attributo \"foglio\". Gli viene passato come parametro \n //\"testImmagine\" contenente l'immagine del nostro sprite sheet.\n /*foglio = new FoglioSprite(testImmagine);*/\n \n /*Inizializzazione della classe Risorse.*/\n Risorse.inizializzazione();\n \n maneggiatore = new Maneggiatore(this);\n /*Inizializzazione Camera di Gioco*/\n camera = new Camera(maneggiatore,0,0);\n \n /*Inizializzazione degli stati di gioco.*/\n statoMenu = new StatoMenù(maneggiatore);\n Stato.setStato(statoMenu);\n }", "public static void main(String[] args) {\n Cachorro x = new Cachorro();\n //x.emitirSom();\n \n // Programa Principal\n Cachorro c = new Cachorro();\n \n c.reagir(\"Olá\"); // Abanar e Latir\n System.out.println(\"\");\n c.reagir(\"Vai apanhar\"); // Rosnar\n System.out.println(\"\");\n c.reagir(11, 45); // Abanar\n System.out.println(\"\");\n c.reagir(21, 00); // Ignorar\n System.out.println(\"\");\n c.reagir(true); // Abanar\n System.out.println(\"\");\n c.reagir(false); // Rosnar e Latir (// emitirSom();)\n System.out.println(\"\");\n c.reagir(2, 12.5f); // Latir\n System.out.println(\"\");\n c.reagir(17, 4.5f); // Rosnar\n \n }", "@Override\npublic int mover() {\n\treturn posicaoTopoEscada;\n}", "@Override\n public void memoria() {\n \n }", "public void setObstaculo(int avenida, int calle);", "public void moverAPacman(Direccion direccion) {\n // TODO implement here\n }", "public void carroPulando() {\n\t\tpulos++;\n\t\tpulo = (int) (PULO_MAXIMO/10);\n\t\tdistanciaCorrida += pulo;\n\t\tif (distanciaCorrida > distanciaTotalCorrida) {\n\t\t\tdistanciaCorrida = distanciaTotalCorrida;\n\t\t}\n\t}", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public void principal() {\r\n int opciones = 0;\r\n do {\r\n opciones = op.capInt(\"CLINICA LA EVALUACIÓN\\n\\n\"\r\n + \"1. Gestionar Pacientes.\\n\"\r\n + \"2. Gestionar Médicos.\\n\"\r\n + \"3. Gestionar Historial Clínico.\\n\"\r\n + \"4. Salir\");\r\n switch (opciones) {\r\n case 1:\r\n gesPaciente();\r\n break;\r\n case 2:\r\n gesMedico();\r\n break;\r\n case 3:\r\n gesHistoria();\r\n break;\r\n case 4:\r\n op.mensaje(\"Hasta la proxima\");\r\n break;\r\n default:\r\n op.mensajeError(\"La opcione Ingresada no es valida\");\r\n break;\r\n }\r\n } while (opciones != 4);\r\n }", "@Override\n\tpublic int sacameVida(ElementoPiedra a) {\n\t\treturn 20;\n\t}", "private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "public void creoVehiculo() {\n\t\t\n\t\tAuto a= new Auto(false, 0);\n\t\ta.encender();\n\t\ta.setPatente(\"saraza\");\n\t\ta.setCantPuertas(123);\n\t\ta.setBaul(true);\n\t\t\n\t\tSystem.out.println(a);\n\t\t\n\t\tMoto m= new Moto();\n\t\tm.encender();\n\t\tm.frenar();\n\t\tm.setManubrio(true);\n\t\tm.setVelMax(543);\n\t\tm.setPatente(\"zas 241\");\n\t\tVehiculo a1= new Auto(true, 0);\n\t\ta1.setPatente(\"asd 423\");\n\t\t((Auto)a1).setBaul(true);\n\t\t((Auto)a1).setCantPuertas(15);\n\t\tif (a1 instanceof Auto) {\n\t\t\tAuto autito= (Auto) a1;\n\t\t\tautito.setBaul(true);\n\t\t\tautito.setCantPuertas(531);\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Moto) {\n\t\t\tMoto motito=(Moto) a1;\n\t\t\tmotito.setManubrio(false);\n\t\t\tmotito.setVelMax(15313);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif (a1 instanceof Camion) {\n\t\t\tCamion camioncito=(Camion) a1;\n\t\t\tcamioncito.setAcoplado(false);\n\t\t\tcamioncito.setPatente(\"ge\");\n\t\t\t\n\t\t\t\n\t\t}\n\t\tVehiculo a2= new Moto();\n\t\tSystem.out.println(a2);\n\t\ta1.frenar();\n\t\t\n\t\tArrayList<Vehiculo>listaVehiculo= new ArrayList<Vehiculo>();\n\t\tlistaVehiculo.add(new Auto(true, 53));\n\t\tlistaVehiculo.add(new Moto());\n\t\tlistaVehiculo.add(new Camion());\n\t\tfor (Vehiculo vehiculo : listaVehiculo) {\n\t\t\tSystem.out.println(\"clase:\" +vehiculo.getClass().getSimpleName());\n\t\t\tvehiculo.encender();\n\t\t\tvehiculo.frenar();\n\t\t\tSystem.out.println(\"=======================================\");\n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic void effetto(Giocatore giocatoreAttuale) {\n\t\tgiocatoreAttuale.vaiInPrigione();\n\t\tSystem.out.println(MESSAGGIO_IN_PRIGIONE);\n\t\t\n\t}", "public void iniciarRotina() {\n }", "void usada() {\n mazo.habilitarCartaEspecial(this);\n }", "public void moverIzquierda() {\n estado = EstadosPersonaje.IZQUIERDA;\n mover(new Vector2(-1, 0));\n }", "public void caminar(){\n if(this.robot.getOrden() == true){\n System.out.println(\"Ya tengo la orden, caminare a la cocina para empezar a prepararla.\");\n this.robot.asignarEstadoActual(this.robot.getEstadoCaminar());\n }\n }", "public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }", "public void abrirManoMaximo()\n {\n brazo.manoAbrirMaximo();\n }", "public Veiculo(String marca, String modelo, int ano, double valorParaLocacao) { // Criando os construtores\n this.marca = marca;\n this.modelo = modelo;\n this.ano = ano;\n this.valorParaLocacao = valorParaLocacao;\n\n }", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "public void act() \n {\n if(getY()>=30 && !cambia)\n {\n direccion = -1;\n }\n else\n {\n cambia = true;\n }\n if(getY() <= getWorld().getHeight()-30 && cambia)\n {\n direccion = 1;\n }\n else\n {\n cambia = false;\n }\n \n setLocation(getX(),getY()+(velocidad*direccion));\n reglas();\n ataque();\n \n \n \n }", "@Override\r\n public void moverAyuda() {\n System.out.println(\"La reina puede mover hacia cualquier dirección en linea recta / diagonal\");\r\n }", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "@Override\n\tpublic int sacameVida(ElementoAlien a) {\n\t\treturn 20;\n\t}", "public void avvia() {\n super.avvia();\n this.getNavigatore(CHIAVE_NAV).avvia();\n }", "@Override\r\n public void hallarPerimetro() {\r\n this.perimetro = this.ladoA*3;\r\n }", "public boolean Vacia (){\n return cima==-1;\n \n }", "private void esvaziaMensageiro() {\n\t\tMensageiro.arquivo=null;\n\t\tMensageiro.lingua = linguas.indexOf(lingua);\n\t\tMensageiro.linguas=linguas;\n\t\tMensageiro.nomeArquivo=null;\n\t}", "public SuperRodada(){\n this.pontos_em_disputa=0;\n this.truco=false;\n this.Desafiante=null;\n this.addPontosEmDisputa(2);\n Game game = Game.getGame();\n DonoDoBaralho=(DonoDoBaralho==null)?game.getDupla(1).getJogadorA():this.proximoAJogar(DonoDoBaralho);\n \n }", "private void Mueve() {\n\t\tpaleta1.Mueve_paletas();\n\t\tpaleta2.Mueve_paletas();\n\t\tpelota.Mueve_pelota();\n\t}", "private void moverFondo() {\n ActualizaPosicionesFondos();\n noAleatorio = MathUtils.random(1, 5); // crea los numeros para cambiar los mapas de manera aleatoria\n if (xFondo == -texturaFondoBase.getWidth()){\n //Cambio de fondo base\n texturaFondoBase= mapaAleatorio(noAleatorio);\n modificacionFondoBase= true; //Avisa que ya se modifico los fondos de inicio.\n }\n if (xFondo == -(texturaFondoApoyo.getWidth()+texturaFondoBase.getWidth())){\n //Cambio fondo de apoyo\n texturaFondoApoyo= mapaAleatorio(noAleatorio);\n xFondo= 0; //al pasar el segundo fondo regresa el puntero al primer fondo.\n modificacionFondoBase= true; //Avisa que ya se modifico los fondos de inicio.\n }\n }", "public void afegirPosicio() {\n\t\tfor(int i=0; i<cal.length; ++i){\n\t\t\tcal[i] = new Dia(false);\n\t\t\tfor(int j=0; j<3; ++j) cal[i].getTorns()[j].setPosicio(i);\n\t\t}\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public Agnello mangiaPecora() {\n\t\tint indiceCasuale = (int) (Math.random() * pecore.size());\n\t\tAgnello pecoraMangiata = pecore.get(indiceCasuale);\n\t\tprelevaAnimale(pecoraMangiata.getTipo());\n\t\treturn pecoraMangiata;\n\t}", "public void SiguienteCancion(View view){\n //Verificamos si nuestro indice esta en la posicion 0\n if(posicion < vector_mp.length -1){//-1 evita el desbordamiento de memoria\n // Si nuestro indice es menor al ancho de nuestro vector, permite que nuestro indice siga recorriendo el vector\n //Verifica que nuestro vector en tal posicion este reprodcuiendo una cancion\n if(vector_mp[posicion].isPlaying()){\n //Detiene la pista que se esta reproduciendo para poder reproducir la siguiente\n vector_mp[posicion].stop();\n //Ayudamos a nuestro indice a recorrer el vector\n posicion++;\n //La siguiente posicion/cancion debe empezar a reproducirse\n vector_mp[posicion].start();\n\n //cambio de portada\n if(posicion == 0){\n iv.setImageResource(R.drawable.portada1);;\n } else if(posicion == 1){\n iv.setImageResource(R.drawable.portada2);\n } else if(posicion == 2){\n iv.setImageResource(R.drawable.portada3);\n }\n\n } else {\n //Solo incrementa la posicion ya que al no estar reproduciendo no tiene caso detener\n posicion++;\n\n //cambio de portada\n if(posicion == 0){\n iv.setImageResource(R.drawable.portada1);;\n } else if(posicion == 1){\n iv.setImageResource(R.drawable.portada2);\n } else if(posicion == 2){\n iv.setImageResource(R.drawable.portada3);\n }\n\n }\n\n } else{\n //Si nuestro inidice posicion ya recorrio el vector indicara que no hay mas canciones y asi evitar un desbordamiento de memoria\n Toast.makeText(this, \"No hay mas canciones\", Toast.LENGTH_SHORT).show();\n }\n }", "private void attacco(int idGioc) {\n\t\tpartita.attacco(idGioc);\n\t\tStatiGioco prossimoStato=partita.nextPhase(StatiGioco.ATTACKSTATE,StatiGioco.DONTKNOW, idGioc);\n\t\tpartita.getPlayers().getGiocatore(idGioc).setStatoAttuale(prossimoStato);\n\t}", "private static void cajas() {\n\t\t\n\t}", "public int orientaceGrafu(){\n\t\tint poc = 0;\n\t\tfor(int i = 0 ; i < hrana.length ; i++){\n\t\t\tif(!oriNeboNeoriHrana(hrana[i].zacatek,hrana[i].konec))\n\t\t\t poc++;\n\t\t}\n\t\tif(poc == 0 )\n\t\t\treturn 0;\n\t\t\n\t\tif(poc == pocetHr)\n\t\t\treturn 1;\n\t\t\n\t\t\n\t\t\treturn 2;\n\t\t \n\t\t\n\t\t\t\t\t\n\t}", "public interface CausalAprobacionDevolucionCommon\n{\n\t/** Propiedad autorizar ingreso secuencias. */\n\tpublic final long AUTORIZAR_INGRESO_SECUENCIAS = 9L;\n\n\t/** Propiedad devolucion aprobador. */\n\tpublic final long DEVOLUCION_APROBADOR = 4L;\n\n\t/** Propiedad devolver al analista de restitucion de turno. */\n\tpublic final long DEVOLVER_AL_ANALISTA_DE_RESTITUCION_DE_TURNO = 11L;\n\n\t/** Propiedad devolver a analisis de desistimiento. */\n\tpublic final long DEVOLVER_A_ANALISIS_DE_DESISTIMIENTO = 8L;\n\n\t/** Propiedad devolver con observacion copias. */\n\tpublic final long DEVOLVER_CON_OBSERVACION_COPIAS = 113L;\n\n\t/** Propiedad devolver con solicitud copias. */\n\tpublic final long DEVOLVER_CON_SOLICITUD_COPIAS = 114L;\n\n\t/** Propiedad DEVOLVER_ETAPA_ANTERIOR_410. */\n\tpublic final long DEVOLVER_ETAPA_ANTERIOR_410 = 124L;\n\n\t/** Propiedad DEVOLVER_ETAPA_ANTERIOR_415. */\n\tpublic final long DEVOLVER_ETAPA_ANTERIOR_415 = 123L;\n\n\t/** Propiedad DEVOLVER_ETAPA_ANTERIOR_420. */\n\tpublic final long DEVOLVER_ETAPA_ANTERIOR_420 = 122L;\n\n\t/** Propiedad devolver grabacion del folio. */\n\tpublic final long DEVOLVER_GRABACION_DEL_FOLIO = 60L;\n\n\t/** Propiedad devolver negacion al ejecutor. */\n\tpublic final long DEVOLVER_NEGACION_AL_EJECUTOR = 63L;\n\n\t/** Propiedad devolver negacion de la solicitud. */\n\tpublic final long DEVOLVER_NEGACION_DE_LA_SOLICITUD = 58L;\n\n\t/** Propiedad devolver resolucion de grabacion. */\n\tpublic final long DEVOLVER_RESOLUCION_DE_GRABACION = 59L;\n\n\t/** Propiedad error al generar documentos. */\n\tpublic final long ERROR_AL_GENERAR_DOCUMENTOS = 6L;\n\n\t/** Propiedad error datos del turno. */\n\tpublic final long ERROR_DATOS_DEL_TURNO = 7L;\n\n\t/** Propiedad error en la generación del documento. */\n\tpublic final long ERROR_EN_LA_GENERACION_DEL_DOCUMENTO = 61L;\n\n\t/** Propiedad error en la seleccion de la plantilla. */\n\tpublic final long ERROR_EN_LA_SELECCION_DE_LA_PLANTILLA = 62L;\n\n\t/** Propiedad generar nota devolutiva. */\n\tpublic final long GENERAR_NOTA_DEVOLUTIVA = 2L;\n\n\t/** Propiedad inscripcion con observaciones. */\n\tpublic final long INSCRIPCION_CON_OBSERVACIONES = 1L;\n\n\t/** Propiedad inscripcion testamento con observaciones. */\n\tpublic final long INSCRIPCION_TESTAMENTO_CON_OBSERVACIONES = 111L;\n\n\t/** Propiedad modificar oficios o actos administrativos. */\n\tpublic final long MODIFICAR_OFICIOS_O_ACTOS_ADMINISTRATIVOS = 3L;\n\n\t/** Propiedad no autorizar ingreso secuencias. */\n\tpublic final long NO_AUTORIZAR_INGRESO_SECUENCIAS = 10L;\n\n\t/** Propiedad no generar inscripción. */\n\tpublic final long NO_GENERAR_INSCRIPCION = 112L;\n\n\t/** Propiedad reproduccion de constancia. */\n\tpublic final long REPRODUCCION_DE_CONSTANCIA = 12L;\n\n\t/** Propiedad requiere complementacion. */\n\tpublic final long REQUIERE_COMPLEMENTACION = 5L;\n\t\n\t/** Propiedad modificar resolucion. */\n\tpublic final long MODIFICAR_RESOLUCION = 140L;\n\t\n\t/** Propiedad modificar datos en el folio a crear. */\n\tpublic final long MODIFICAR_DATOS_EN_EL_FOLIO_A_CREAR = 171L;\n\t\n\t/** Propiedad negar solicitud. */\n\tpublic final long NEGAR_SOLICITUD = 172L;\n\t\n}", "public void acionarInadimplencia(CestaGarantiasDO cesta);", "private void actualizaPuntuacion() {\n if(cambiosFondo <= 10){\n puntos+= 1*0.03f;\n }\n if(cambiosFondo > 10 && cambiosFondo <= 20){\n puntos+= 1*0.04f;\n }\n if(cambiosFondo > 20 && cambiosFondo <= 30){\n puntos+= 1*0.05f;\n }\n if(cambiosFondo > 30 && cambiosFondo <= 40){\n puntos+= 1*0.07f;\n }\n if(cambiosFondo > 40 && cambiosFondo <= 50){\n puntos+= 1*0.1f;\n }\n if(cambiosFondo > 50) {\n puntos += 1 * 0.25f;\n }\n }", "public void atrapar() {\n if( una == false) {\n\t\tif ((app.mouseX > 377 && app.mouseX < 591) && (app.mouseY > 336 && app.mouseY < 382)) {\n\t\t\tint aleotoridad = (int) app.random(0, 4);\n\n\t\t\tif (aleotoridad == 3) {\n\n\t\t\t\tSystem.out.print(\"Lo atrapaste\");\n\t\t\t\tcambioEnemigo = 3;\n\t\t\t\tsuerte = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\t\t\tif (aleotoridad == 1 || aleotoridad == 2 || aleotoridad == 0) {\n\n\t\t\t\tSystem.out.print(\"Mala Suerte\");\n\t\t\t\tcambioEnemigo = 4;\n\t\t\t\tmal = true;\n\t\t\t\tuna = true;\n\t\t\t}\n\n\t\t}\n }\n\t}", "protected void calculerAire() {\r\n\t\taire = Math.PI * rayonV * rayonH;\r\n\t\t\r\n\t}", "public Gigamesh(int vel, int daño,String derecha, String izquierda,String arriba, String abajo, String ataca,String ataca2,String interact,String salta,int intervaloAtaque)\n {\n super(\"giga\",9,6,vel,daño,derecha,izquierda,arriba,abajo,ataca,ataca2,interact,salta,intervaloAtaque); \n \n }", "public void asignarPedido(Pedido pedido){\n\t\tdouble costeMin=100000;\n\t\tint pos=0;\n\t\t\n\t\tif (pedido.getPeso()<PESOMAXMOTO) {\n\t\tif(motosDisponibles.size()!=0){\n\t\t \n\t\t\tpos=0;\n\t\t\t//Damos como primer valor el de primera posición\n\t\t\t\n\t\t\tcosteMin=pedido.coste(motosDisponibles.get(0));\n\t\t\t\n\t\t\t//Ahora vamos a calcular el min yendo uno por uno\n\t\t\t\n\t\t\tfor(int i=0; i<motosDisponibles.size(); i++){\n\t\t\t\tif(costeMin>pedido.coste(motosDisponibles.get(i))){\n\t\t\t\t\tcosteMin=pedido.coste(motosDisponibles.get(i));\n\t\t\t\t\tpos=i;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Una vez hallada la moto de menor coste la asignamos\n\t\t\tpedido.setTransporte(motosDisponibles.get(pos));\n\t\t\tmotosDisponibles.removeElementAt(pos);\n\t\t\t\n\t\t \n\t\t}\n\t\telse {\n\t\t\tpedidosEsperandoMoto.add(pedidosEsperandoMoto.size(),pedido);\n\t\t}\n\t\t}\n\t\t\n\t\telse {\n\t\t\tif (furgonetasDisponibles.size()!=0){\n\t\t\tcosteMin = pedido.coste(furgonetasDisponibles.get(0));\n\t\t\tfor(int i=0; i<furgonetasDisponibles.size(); i++){\n\t\t\t\tif(costeMin>pedido.coste(furgonetasDisponibles.get(i))){\n\t\t\t\t\tcosteMin=pedido.coste(furgonetasDisponibles.get(i));\n\t\t\t\t\tpos=i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tpedido.setTransporte(furgonetasDisponibles.get(pos));\n\t\t\tfurgonetasDisponibles.removeElementAt(pos);\n\t\t}\n\t\t\telse{\n\t\t\t\tpedidosEsperandoFurgoneta.add(pedidosEsperandoFurgoneta.size(),pedido);\n\t\t\t}\n\t\t}\n\t}", "public void avancaPosicio(int[] posicions) {\n\n if (Arrays.equals(posicions, Const.FINISH_CODE)) {\n //Acaba la frame del joc\n v.closeFrame();\n return;\n }\n \n jugadors[0].getCentre().setX(posicions[0]);\n jugadors[0].getCentre().setY(posicions[1]);\n jugadors[1].getCentre().setX(posicions[2]);\n jugadors[1].getCentre().setY(posicions[3]);\n\n //Afegeix les noves posicions\n if ((jugadors[0].getCentre().getX() != -1) || (jugadors[0].getCentre().getY() != -1)){\n jugadors[0].addCoordToPath(new Coord(jugadors[0].getCentre()));\n }\n if ((jugadors[1].getCentre().getX() != -1) || (jugadors[1].getCentre().getY() != -1)){\n jugadors[1].addCoordToPath(new Coord(jugadors[1].getCentre()));\n }\n //Avisa a la Vista_Client\n avisarObservadors();\n\n }", "public static void main(String[] args) {\n\n Poupanca poupanca = new Poupanca();\n\n Corrente corrente = new Corrente();\n\n poupanca.setNome(\"maria\");\n poupanca.setNumero(123);\n poupanca.setDiaAniversario(10);\n poupanca.depositar(100);\n\n\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.println(\"nome do cliente da poupança:\" + poupanca.getNome());\n\n boolean operacao = poupanca.sacar(50);\n\n if(operacao){\n System.out.println(\"saque realizado com sucesso\");\n }else {\n System.out.println(\"saldo insuficiente\");\n }\n\n System.out.println(\"saldo de \" + poupanca.getNome() + \": \" + poupanca.getSaldo());\n\n\n // para conta corrente\n corrente.setNumero(234);\n corrente.setNome(\"rafael\");\n corrente.depositar(1000);\n corrente.setLimite(500);\n\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.println(\"nome do cliente: \" + corrente.getNome());\n System.out.println(\"saldo atual: \" + corrente.getSaldo());\n\n operacao = corrente.sacar(500);\n\n if(operacao){\n System.out.println(\"saque realizado com sucesso\");\n }else {\n System.out.println(\"saldo insuficiente\");\n }\n\n System.out.println(\"saldo atual: \" + corrente.getSaldo());\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n\n Corrente corrente1 = new Corrente();\n corrente1.setSaldo(1000);\n\n GerenciarPatrimonioBanco gp = new GerenciarPatrimonioBanco();\n gp.adicionarConta(corrente);\n gp.adicionarConta(poupanca);\n gp.adicionarConta(corrente1);\n\n System.out.println();\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.println(\"total do dinheiro dos clientes no banco: \" );\n System.out.println(gp.getTotalPatrimonio());\n\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n\n }", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "void salirDelMazo() {\n mazo.inhabilitarCartaEspecial(this);\n }", "public void CambiarCartasCastillo() {\r\n\r\n\t\tint aux;\r\n\t\t// Asignamos el escudo del rey;\r\n\t\taux = (int) (Math.random() * 12) + 1;\r\n\t\tescudoRey = new Escudo(aux, Escudo.GrupoEscudo.rey);\r\n\t\t// Asignamos el escudo de la nobleza\r\n\t\taux = (int) (Math.random() * 12) + 1;\r\n\t\tescudoNobleza = new Escudo(aux, Escudo.GrupoEscudo.nobleza);\r\n\t\t// Asignamos el escudo del pueblo\r\n\t\taux = (int) (Math.random() * 6) + 1;\r\n\t\tescudoPueblo = new Escudo(aux, Escudo.GrupoEscudo.pueblo);\r\n\r\n\t}", "private void aggiornamento()\n {\n\t gestoreTasti.aggiornamento();\n\t \n\t /*Se lo stato di gioco esiste eseguiamo il suo aggiornamento.*/\n if(Stato.getStato() != null)\n {\n \t Stato.getStato().aggiornamento();\n }\n }", "public void Caracteristicas(){\n System.out.println(\"La resbaladilla tiene las siguientes caracteristicas: \");\r\n if (escaleras==true) {\r\n System.out.println(\"Tiene escaleras\");\r\n }else System.out.println(\"No tiene escaleras\");\r\n System.out.println(\"Esta hecho de \"+material);\r\n System.out.println(\"Tiene una altura de \"+altura);\r\n }", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }", "public static void curar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int curador;\n //condicion de puntos de mana para ejecutar la curacion del jugador\n if(puntosDeMana>=1){\n //acciones de la funcion curar en el jugador\n aleatorio = (numeroAleatorio.nextInt(25-15+1)+15);\n curador= ((nivel+1)*5)+aleatorio;\n puntosDeVida= puntosDeVida+curador;\n puntosDeMana=puntosDeMana-1;\n }\n else{//imprimiendo el mensaje de curacion fallada\n System.out.println(\"no cuentas con Puntos De mana (MP) para curarte\");\n }\n }", "public Proceso atender() {\n\t\tProceso proceso = raiz.sig;\n\t\tif (proceso == this.raiz) {\n\t\t\tSystem.out.println(\"Cola Vacia\");\n\t\t\treturn null;\n\t\t}\n\t\tProceso sig = proceso.sig;\n\t\tProceso padre = raiz;\n\t\tpadre.sig = sig;\n\t\tsig.padre = padre;\n\t\tcabeza = sig;\n\t\tthis.numProcesos--;\n\t\tthis.calcularTiemposProcesos();\n\t\treturn proceso;\n\t}" ]
[ "0.6299809", "0.6295991", "0.6279807", "0.62471825", "0.6165317", "0.6159549", "0.60974234", "0.60884315", "0.60610914", "0.60456884", "0.6002958", "0.5932466", "0.592066", "0.5876909", "0.5875379", "0.58734876", "0.58681804", "0.5860268", "0.585564", "0.58525544", "0.5845145", "0.58415383", "0.58415383", "0.58408654", "0.58376974", "0.58225316", "0.5817624", "0.58076626", "0.5794591", "0.5790653", "0.57817227", "0.57743055", "0.576903", "0.57675374", "0.5757163", "0.5757095", "0.57180244", "0.57160795", "0.57152754", "0.57142353", "0.56674844", "0.5663586", "0.565898", "0.5655185", "0.5646582", "0.5641384", "0.5638205", "0.56355304", "0.56346226", "0.5632767", "0.563081", "0.5630723", "0.5629845", "0.5627172", "0.5623565", "0.56159854", "0.5611653", "0.56104434", "0.56102467", "0.5609792", "0.55953383", "0.5594598", "0.5587767", "0.55870175", "0.55868703", "0.5586381", "0.5583156", "0.5582222", "0.5582197", "0.5581945", "0.55811834", "0.5579124", "0.5576193", "0.5569879", "0.5565147", "0.5557807", "0.55489546", "0.5548354", "0.55446017", "0.5543787", "0.5542976", "0.5539103", "0.5534819", "0.552164", "0.5519558", "0.5517582", "0.5516378", "0.55162156", "0.55157006", "0.5513302", "0.55111724", "0.5509033", "0.5508167", "0.550688", "0.5506266", "0.550099", "0.5498721", "0.5488544", "0.548635", "0.548277", "0.5482213" ]
0.0
-1
controlli base validi per tutti i tipi di pedine
private boolean checkMoveBase(Pieces piece, Coordinates from, Coordinates to) { //seleziono una posizione senza pedina if ( piece == null ) return false; //se la posizione tu non è contenuta nelle soluzioni valide della pedina from if ( !piece.validPositions(from).contains(to) ) return false; //se la posizione di destinazione contiene una pedina dello stesso colore return !( chessboard.at(to) != null && chessboard.at(to).getColour().equals(piece.getColour())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isTipoValido() {\n return true;\n }", "private boolean validate(){\n return EditorUtils.editTextValidator(generalnformation,etGeneralnformation,\"Type in information\") &&\n EditorUtils.editTextValidator(symptoms,etSymptoms, \"Type in symptoms\") &&\n EditorUtils.editTextValidator(management,etManagement, \"Type in management\");\n }", "@Override\n protected void validaCampos(ArquivoLoteVO entity) {\n\n }", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "@Override\n\tpublic void validaDatos() {\n\t\t\n\t}", "public void tip(ValidationType type, String validationName, String content);", "@Override\n\tpublic void validaProdotto(ProdottoPmo prodottoPmo) {\n\t\tif (StringUtils.isEmpty(prodottoPmo.getDescrizione())) {\n\n\t\t\tMessaggiBusinessSignalUtils.aggiungiSignal(prodottoPmo,\n\t\t\t\t\tSignalDescriptor.PRODOTTO_DESCRIZIONE_OBB_EB,\n\t\t\t\t\tDefinitions.Prodotto.PMO_PROP_descrizione);\n\n\t\t}\n\n\t}", "private void validateDietTreatmentParameters()\n {\n List<IDietParameterizable> conflicts = ParameterTemplateValidator\n .getInstance().getConflictingComponents();\n for (IDietParameterizable component : conflicts)\n {\n getErrors().add(\n \"Parameterkonflikt in: \" + component.getDisplayText());\n }\n }", "@Override\n public void validate(ValidationContext vc) {\n Map<String,Property> beanProps = vc.getProperties(vc.getProperty().getBase());\n \n validateKode(vc, (String)beanProps.get(\"idKurikulum\").getValue(), (Boolean)vc.getValidatorArg(\"tambahBaru\")); \n validateDeskripsi(vc, (String)beanProps.get(\"deskripsi\").getValue()); \n }", "public void validarPostagem() {\n\t\t// validando se o nome motorista ou carona foram preenchidos\n\t\tint verif = 0;\n\t\ttry {\n\t\t\tif (txtCarona.getText() == null\n\t\t\t\t\t|| txtCarona.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (txtMotorista.getText() == null\n\t\t\t\t\t|| txtMotorista.getText().trim().equals(\"\")) {\n\n\t\t\t\tverif++;\n\n\t\t\t}\n\t\t\tif (verif == 2) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t\tif (txtDestino.getText() == null\n\t\t\t\t\t|| txtDestino.getText().trim().equals(\"\")) {\n\t\t\t\tthrow new IllegalArgumentException();\n\t\t\t}\n\n\t\t} catch (IllegalArgumentException e) {\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\"Para postar no quadro é necessário informar nome (motorista ou passageiro) \"\n\t\t\t\t\t\t\t\t\t+ \"\t\t\t\t\t\t\te local. \\n Por favor certifique se os campos foram preenchidos e tente novamente.\");\n\t\t}\n\n\t}", "public void ValidandoPerfil()\r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void validate(FacesContext context, UIComponent component, Object object) throws ValidatorException {\r\n\t\t\r\n\t\tString valor = object.toString();\r\n\t\t\t\r\n\t\tif (valor.matches(\"^\\\\s.*\"))\r\n\t\t{\r\n\t\t\tFacesMessage msg = \tnew FacesMessage(\"Validaciˇ err˛nia\", \"No pot haver espais en blanc al principi\");\r\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n\t\t\tthrow new ValidatorException(msg);\r\n\t\t}\r\n\t\t\r\n\t\tif (valor.matches(\".*\\\\s$\"))\r\n\t\t{\r\n\t\t\tFacesMessage msg = \tnew FacesMessage(\"Validaciˇ err˛nia\", \"No pot haver espais en blanc al final\");\r\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n\t\t\tthrow new ValidatorException(msg);\r\n\t\t}\r\n\t\t\r\n\t\tif (valor.matches(\".*[ ]{2,}.*\"))\r\n\t\t{\r\n\t\t\tFacesMessage msg = \tnew FacesMessage(\"Validaciˇ err˛nia\", \"No pot haver mÚs d'un espai en blanc entre paraules\");\r\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n\t\t\tthrow new ValidatorException(msg);\r\n\t\t}\r\n\t\t\r\n\t\tif (!valor.matches(\"[a-zA-Z ]+\"))\r\n\t\t{\r\n\t\t\tFacesMessage msg = \tnew FacesMessage(\"Validaciˇ err˛nia\", \"┌nicament es poden utilitzar carÓcters alfabŔtics\");\r\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\r\n\t\t\tthrow new ValidatorException(msg);\r\n\t\t}\r\n\t\t\r\n\t}", "public void validar_campos(){\r\n\t\tfor(int i=0;i<fieldNames.length-1;++i) {\r\n\t\t\tif (jtxt[i].getText().length() > 0){\r\n\t\t\t}else{\r\n\t\t\t\tpermetir_alta = 1;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\tif((CmbPar.getSelectedItem() != null) && (Cmbwp.getSelectedItem() != null) && (CmbComp.getSelectedItem() != null) && (jdc1.getDate() != null) && (textdescripcion.getText().length() > 1) && (textjustificacion.getText().length() > 1)){\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tpermetir_alta = 1;\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean isValid(String Tipo){\n\t\treturn getUnidades() > 0 && getAsignada() == null && getTipo().equals(Tipo);\n\t}", "public boolean validaCampos() {\n \n if(!this.ftCpf.getText().isEmpty()){\n \n String cpf = this.ftCpf.getText();\n Validador valida = new Validador();\n cpf = valida.tiraPontosCPF(cpf);\n\n\n if (!cpf.isEmpty() || cpf.length() == 11)\n if (!this.tfCarro.getText().isEmpty())\n if ((this.cbPlano.getSelectedItem().toString().equals(\"Diaria Simples\")) || ((this.cbPlano.getSelectedItem().toString().equals(\"Diaria Quilometrada\") && !this.tfQuilometragem.getText().isEmpty())))\n if (!this.tfValorTotal.getText().isEmpty())\n return true;\n else \n JOptionPane.showMessageDialog(null, \"O Valor não pode estar Zerado\", \"Informação\", JOptionPane.INFORMATION_MESSAGE);\n else\n JOptionPane.showMessageDialog(null, \"Insira a Quantidade de quilometros\", \"Informação\", JOptionPane.INFORMATION_MESSAGE);\n else\n JOptionPane.showMessageDialog(null, \"Escolha um carro\", \"Informação\", JOptionPane.INFORMATION_MESSAGE);\n else\n JOptionPane.showMessageDialog(null, \"Digite o CPF corretamente\", \"Informação\", JOptionPane.INFORMATION_MESSAGE);\n \n }\n else\n JOptionPane.showMessageDialog(null, \"Informe o CPF corretamente\", \"Informação\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n \n }", "public void validorolin() {\n if (roli.equals(\"Menaxher\")) {\n madministrimi.setVisible(false);\n }\n\n }", "@Override\n protected void validaRegras(ArquivoLoteVO entity) {\n\n }", "public void validarTareasDepartamento(){\r\n\t\tif ((this.equipo != null) && !(this.equipo.isEmpty()) ){\r\n\t\t\tthis.equipo = gerente.validarTareasEquipo(this.equipo);\r\n\t\t}\r\n\t}", "private void validate() {\n\t\t// just in case;\n\t\tfor (int i=0;i<NR_OF_FIELDS; i++) {\n\t\t\tvalid[i] = \"0\";\n\t\t}\n\t\t//\n\t\t// Validate name and surname:\n\t\t//\n\t\tif ( ! this.isUpperAlpha(nume)) {\n\t\t\tfields[0] = \"1\";\n\t\t}\n\t\t\n\t\tif ( ! this.isUpperAlphaWithSpace(nume)) {\n\t\t\tfields[1] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate seria\n\t\t//\n\t\tvalid[2] = \"1\";\t\t\t\t\t\t\t// presupun ca seria este invalida, si incerc sa o validez\n\t\tfor (int i=0; i<seriiBuletin.length; i++) {\n\t\t\tif (seriiBuletin[i].equals(seria)) {\n\t\t\t\tvalid[2] = \"0\";\n\t\t\t}\n\t\t}\n\t\t//\n\t\t// validate numarul\n\t\t//\n\t\ttry {\n\t\t\tvalid[3] = \"1\";\n\t\t\tint nr = Integer.valueOf(numarul);\n\t\t\tif ( nr >= 100000 && nr <= 999999 ) {\n\t\t\t\tvalid[3] = \"0\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(TAG, \"Error validating seria.\");\n\t\t}\n\n\t\t//\n\t\t// validate sex\n\t\t//\n\t\tif ( ! (sex == 'M' || sex == 'F')) {\n\t\t\tvalid[6] = \"1\";\n\t\t}\n\t\t//\n\t\t// Validate valabilitate\n\t\t//\n\t\tif ( ! isNumber(this.valabilitate)) {\n\t\t\tvalid[7] = \"1\";\n\t\t}\n\t\t//\n\t\t// validate CNP\n\t\t//\n\t\tif ( ! (isNumber(CNP) && isValidCNP(CNP))) {\n\t\t\tvalid[8] = \"1\";\n\t\t}\n\t\t\n\t}", "@Override\n public TipoBase check(TipoBase tipo) throws Exception {\n Clase c = analizadorsintactico.AnalizadorSintactico.getTs().getClase(tipo.getNombre());\n String nombreVar = id.getLexema();\n VarInstancia v;\n\n if (tipo.getNombre().equals(\"int\") || tipo.getNombre().equals(\"boolean\") || tipo.getNombre().equals(\"char\") || tipo.getNombre().equals(\"String\")) {\n throw new Exception(\"La variable \" + id.getLexema() + \" en la linea \" + id.getLineNumber() + \" no puede llamar metodos ya que es de tipo primitivo\");\n }\n if (c == null) {\n throw new Exception(\"Se trata de acceder a un metodo void en la linea \" + id.getLineNumber());\n }\n\n if (cadena == null) {\n\n if (c.getVariables().containsKey(nombreVar)) {\n v = c.getVariables().get(nombreVar);\n if (v.getVisibilidad().equals(\"private\")) {\n throw new Exception(\"No se puede acceder a la variable \" + v.getNombre() + \" de la linea \" + v.getLinea() + \" debido a que su visibilidad es privada\");\n }\n if (this.ladoIzq) {\n GenCode.gen().write(\"SWAP\");\n GenCode.gen().write(\"STOREREF \" + v.getOffset() + \" # Guardo el valor en la variable \" + v.getNombre());\n\n } else {\n GenCode.gen().write(\"LOADREF \" + v.getOffset() + \" # Cargo variable de instancia \" + v.getNombre() + \" de la clase \" + c.getNombre());\n\n }\n\n } else {\n throw new Exception(\"No se encontro la variable \" + nombreVar + \" de la linea \" + id.getLineNumber() + \" en la clase \" + c.getNombre());\n }\n\n return v.getTipoVar();\n } else { //con encadenado\n if (c.getVariables().containsKey(nombreVar)) {\n v = c.getVariables().get(nombreVar);\n if (v.getVisibilidad().equals(\"private\")) {\n throw new Exception(\"No se puede acceder a la variable \" + v.getNombre() + \" de la linea \" + v.getLinea() + \" debido a que su visibilidad es privada\");\n }\n\n GenCode.gen().write(\"LOADREF \" + v.getOffset() + \" # Cargo variable de instancia \" + v.getNombre() + \" de la clase \" + c.getNombre());\n\n Tipo aux = v.getTipoVar();\n\n return cadena.check(aux);\n } else {\n throw new Exception(\"No se encontro la variable \" + nombreVar + \" de la linea \" + id.getLineNumber() + \" en la clase \" + c.getNombre());\n }\n }\n }", "@Override\n\tpublic void initialisation_type_exercice() {\n\t\tthis.setEnnonce_exo(\"Ecrire un algorithme qui demande deux nombres à l’utilisateur et l’informe ensuite si le produit est négatif ou positif (on inclut cette fois le traitement du cas où le produit peut être nul). Attention toutefois, on ne doit pas calculer le produit !\");\n\n\t}", "private void validarCampos() {\n }", "@Override\n\tprotected boolean isValidaInserir(ContatoTipo entity) {\n\t\treturn false;\n\t}", "public boolean validarForm() throws Exception {\r\n\r\n\t\ttbxIdentificacion\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\t\tlbxTipo_disnostico\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\t\tlbxCodigo_consulta_pyp\r\n\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:white\");\r\n\r\n\t\tString mensaje = \"Los campos marcados con (*) son obligatorios\";\r\n\r\n\t\tboolean valida = true;\r\n\r\n\t\tif (tbxIdentificacion.getText().trim().equals(\"\")) {\r\n\t\t\ttbxIdentificacion\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (lbxTipo_disnostico.getSelectedIndex() == 0) {\r\n\t\t\tlbxTipo_disnostico\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (!lbxFinalidad_cons.getSelectedItem().getValue().toString()\r\n\t\t\t\t.equalsIgnoreCase(\"10\")\r\n\t\t\t\t&& lbxCodigo_consulta_pyp.getSelectedIndex() == 0) {\r\n\t\t\tlbxCodigo_consulta_pyp\r\n\t\t\t\t\t.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (tbxTipo_principal.getText().trim().equals(\"\")) {\r\n\t\t\tmensaje = \"Debe digitar la impresion diagnostica\";\r\n\t\t\tvalida = false;\r\n\t\t} else if (vaidarIgualdad(tbxTipo_principal.getText(),\r\n\t\t\t\ttbxTipo_relacionado_1.getText(),\r\n\t\t\t\ttbxTipo_relacionado_2.getText(),\r\n\t\t\t\ttbxTipo_relacionado_3.getText())) {\r\n\t\t\tmensaje = \"no se puede repetir la impresion diagnostica\";\r\n\t\t\tvalida = false;\r\n\t\t}\r\n\r\n\t\tif (!valida) {\r\n\t\t\tMessagebox.show(mensaje,\r\n\t\t\t\t\tusuarios.getNombres() + \" recuerde que...\", Messagebox.OK,\r\n\t\t\t\t\tMessagebox.EXCLAMATION);\r\n\t\t}\r\n\r\n\t\treturn valida;\r\n\t}", "private boolean validarFormulario() {\n boolean cumple=true;\n boolean mosntrarMensajeGeneral=true;\n if(!ValidacionUtil.tieneTexto(txtNombreMedicamento)){\n cumple=false;\n };\n if(!ValidacionUtil.tieneTexto(txtCantidad)){\n cumple=false;\n };\n if(cmbTipoMedicamento.getSelectedItem()==null|| cmbTipoMedicamento.getSelectedItem().equals(\"Seleccione\")){\n setSpinnerError(cmbTipoMedicamento,\"Campo Obligatorio\");\n cumple=false;\n\n }\n if(getSucursalesSeleccionadas().isEmpty()){\n\n cumple=false;\n mosntrarMensajeGeneral=false;\n Utilitario.mostrarMensaje(getApplicationContext(),\"Seleccione una sucursal para continuar.\");\n }\n if(!cumple){\n if(mosntrarMensajeGeneral) {\n Utilitario.mostrarMensaje(getApplicationContext(), \"Error, ingrese todos los campos obligatorios.\");\n }\n }\n return cumple;\n }", "private boolean validateInputs() {\n if (KEY_EMPTY.equals(tenchuxe)) {\n etTenChuXe.setError(\"Vui lòng điền Tên chủ xe\");\n etTenChuXe.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(sdt)) {\n etSDT.setError(\"Vui lòng điền Số điện thoại\");\n etSDT.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(mota)) {\n edMoTa.setError(\"Vui lòng điền Mô tả xe\");\n edMoTa.requestFocus();\n return false;\n\n }\n if (KEY_EMPTY.equals(biensoxe)) {\n etBienSoXe.setError(\"Vui lòng điền Biển số xe\");\n etBienSoXe.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(passwordtx)) {\n etPasswordtx.setError(\"Vui lòng điền Mật khẩu\");\n etPasswordtx.requestFocus();\n return false;\n }\n\n if (KEY_EMPTY.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Vui lòng điền Xác nhận mật khẩu\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (!passwordtx.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Xác nhận mật khẩu sai !\");\n etConfirmPassword.requestFocus();\n return false;\n }\n\n return true;\n }", "public static void validation() {\n\t\tif ((!textFieldName.getText().isEmpty()) && (!textField_FirstName.getText().isEmpty())\n\t\t\t\t&& (!textField_Town.getText().isEmpty()) && (!textField_Town.getText().isEmpty())) {\n\n\t\t\tif ((isValidEmailAddress(textField_Email.getText()) == true)) {\n\t\t\t\ttextField_Email.setBackground(Color.white);\n\t\t\t\tif ((force(textField_Mtp.getText()) > 82)) {\n\t\t\t\t\ttextField_Mtp.setBackground(Color.white);\n\t\t\t\t\tactionGiveServeur();\n\n\t\t\t\t} else {\n\t\t\t\t\tshowMessageDialog(null, \"Votre mot de passe est trop faible\");\n\t\t\t\t\ttextField_Mtp.setText(\"Mot de passe trop simple : changer le \");\n\t\t\t\t\ttextField_Mtp.setBackground(Color.RED);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttextField_Email.setText(\"Email invalide\");\n\t\t\t\ttextField_Email.setBackground(Color.RED);\n\t\t\t\tshowMessageDialog(null, \"Email est invalide\");\n\t\t\t}\n\t\t} else {\n\n\t\t\tshowMessageDialog(null, \"Certain champs sont vide !\");\n\t\t}\n\t}", "private boolean validate(MessageType mt) {\n if (mt.getDesignation() == null) {\n DialogUtility\n .showMessageBox(this.shell, SWT.ICON_ERROR | SWT.OK,\n \"Message Type - Designation\",\n \"Designation is a required field. Please select a Designation.\");\n return false;\n }\n\n /*\n * verify that an afos id has been set.\n */\n if (mt.getAfosid() == null || mt.getAfosid().isEmpty()) {\n DialogUtility\n .showMessageBox(this.shell, SWT.ICON_ERROR | SWT.OK,\n \"Message Type - Message Type\",\n \"Message Type is a required field. Please enter a Message Type.\");\n return false;\n }\n\n /*\n * verify that a title has been set.\n */\n if (mt.getTitle() == null || mt.getTitle().isEmpty()) {\n DialogUtility.showMessageBox(this.shell, SWT.ICON_ERROR | SWT.OK,\n \"Message Type - Title\",\n \"Title is a required field. Please enter a Title.\");\n return false;\n }\n\n /*\n * verify that the afos id is unique.\n */\n try {\n MessageType existingMessageType = this.mtdm.getMessageType(mt\n .getAfosid());\n if (existingMessageType != null) {\n DialogUtility\n .showMessageBox(\n this.shell,\n SWT.ICON_ERROR | SWT.OK,\n \"Message Type - Message Type\",\n \"Message Type \"\n + mt.getAfosid()\n + \" already exists. Please enter a unique Message Type.\");\n return false;\n }\n } catch (Exception e) {\n statusHandler.error(\n \"Failed to determine if Message Type \" + mt.getAfosid()\n + \" is unique.\", e);\n return false;\n }\n\n return true;\n }", "private boolean validatorForm() {\n\t\tboolean validazione = true;\n\t\tif (!Validator.validaDataInizio(viewInserimento.getTxtFieldDataI().getText())) {\n\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.red);\n\t\t\tvalidazione = false;\n\t\t} else {\n\t\t\tif (viewInserimento.getTxtFieldDataI().getBackground() == Color.red)\n\t\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\t}\n\t\tif (!Validator.validaImporto(viewInserimento.getTxtFieldValore().getText())) {\n\t\t\tviewInserimento.getTxtFieldValore().setBackground(Color.red);\n\t\t\tvalidazione = false;\n\t\t} else {\n\t\t\tif (viewInserimento.getTxtFieldValore().getBackground() == Color.red)\n\t\t\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t\t}\n\n\t\tif (!viewInserimento.getTxtFieldDataI().getText().equals(\"\")\n\t\t\t\t&& !viewInserimento.getTxtFieldDataIPre().getText().equals(\"\")) {\n\t\t\tif (!Date.valueOf(viewInserimento.getTxtFieldDataIPre().getText()).before(Date.valueOf(viewInserimento.getTxtFieldDataI().getText() + \"-01\"))\n\t\t\t\t\t) {\n\t\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.red);\n\t\t\t\tvalidazione = false;\n\t\t\t} else {\n\t\t\t\tif (viewInserimento.getTxtFieldDataI().getBackground() == Color.red)\n\t\t\t\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\t\t}\n\t\t}\n\t\treturn validazione;\n\t}", "private boolean verificaDados() {\n if (!txtNome.getText().equals(\"\") && !txtProprietario.getText().equals(\"\")) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"Falta campos a ser preenchido\", \"Informação\", 2);\n return false;\n }\n }", "private void validarTituloPropiedad(TituloPropiedadParcelario pTituloPropiedad) throws Exception {\n\t\t// Valido valores nulos\n\t\t// if (this.getTituloPropiedad(pTituloPropiedad) != null) {\n\t\t// throw new CatastroException(0);\n\t\t// }\n\n\t\tif(pTituloPropiedad.getParcela() == null) {\n\t\t\tthrow new CatastroException(3);\n\t\t}\n\n\t\tCriterio locCriterio = Criterio.getInstance(this.entityManager, TituloPropiedad.class).add(Restriccion.IGUAL(\"parcela\", pTituloPropiedad.getParcela()))\n\t\t\t\t.add(Restriccion.NOT(Restriccion.IGUAL(\"idTituloPropiedad\", pTituloPropiedad.getIdTituloPropiedad()))).setProyeccion(Proyeccion.COUNT());\n\n\t\tif(pTituloPropiedad.getIdTituloPropiedad() != -1) {\n\t\t\tlocCriterio.add(Restriccion.NOT(Restriccion.IGUAL(\"idTituloPropiedad\", pTituloPropiedad.getIdTituloPropiedad())));\n\t\t}\n\n\t\tif(((Long) locCriterio.uniqueResult()) > 0) {\n\t\t\tthrow new CatastroException(5);\n\t\t}\n\n\t}", "protected void validatePedidoDetalle(biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[] param){\n \n if ((param != null) && (param.length < 1)){\n throw new java.lang.RuntimeException();\n }\n \n }", "@Test\n public void nao_deve_aceitar_descricao_com_a_primeira_letra_minuscula() {\n telefone.setDescricao(\"celular empresarial.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "private boolean camposValidos() {\n boolean valido = false;\n\n if (txtInfectados.getText().equals(\"\")\n || txtFecha.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Rellene todos los campos\");\n } else {\n valido = true;\n }\n\n return valido;\n }", "@Override\n protected void validateEdit(Fornecedor post) {\n\n }", "private boolean checkFields() {\n boolean test = true;\n if (fname.isEmpty()) {\n test = false;\n }\n if (lname.isEmpty()) {\n test = false;\n }\n if (cin.isEmpty()) {\n test = false;\n }\n if (typeCompte.equals(\"Bancaire\")) {\n if (decouvertNF.isEmpty())\n test = false;\n } else if (typeCompte.equals(\"Epargne\")) {\n if (tauxInteretNF.isEmpty())\n test = false;\n }\n if (s_datePK.getValue() == null) {\n s_datePK.setStyle(\"-fx-border-color:red;-fx-border-radius:3px;-fx-border-size: 1px;\");\n test = false;\n }\n\n return test;\n }", "@Override\r\n\tprotected boolean validaSalvar() {\r\n\r\n\t\tboolean valido = true;\r\n\r\n\t\tif (!Validator.validateString(subView.getTxtNome().getValue())) {\r\n\t\t\tadicionarErroDeValidacao(subView.getTxtNome(),\r\n\t\t\t\t\t\"Não pode ficar em branco\");\r\n\t\t\tvalido = false;\r\n\t\t}\r\n\r\n\t\treturn valido;\r\n\t}", "private boolean validateInputs() {\n return !proID.getText().isEmpty() || \n !proName.getText().isEmpty() ||\n !proPrice.getText().isEmpty();\n }", "private boolean validaSituacao() {\r\n\t\treturn Validacao.validaSituacao((String) this.situacao.getSelectedItem()) != 0;\r\n\t}", "private boolean checkDesignCMT() {\n // check null\n if (jTFChungMinhThu.getText().trim().isEmpty()) {\n JOptionPane.showMessageDialog(rootPane, \"Nhập CMT và nhấn Enter để tìm kiếm\\nHoặc nhấn nút \\\"SHOW INFO\\\" để chọn nhân khẩu.\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n return false;\n }\n // check dinh dang so chung minh thu\n try {\n long d = Long.parseLong(jTFChungMinhThu.getText());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(rootPane, \"Số CMT không thể chứa các ký tự chữ cái\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n return false;\n }\n // kiem tra do dai cmt\n if (jTFChungMinhThu.getText().length() != 9 && jTFChungMinhThu.getText().length() != 12) {\n JOptionPane.showMessageDialog(rootPane, \"Số CMT có 9 hoặc 12 số\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n return false;\n }\n return true;\n }", "public String validate() {\n\t\tString msg=\"\";\n\t\t// for name..\n\t\tif(name==null||name.equals(\"\"))\n\t\t{\n\t\t\tmsg=\"Task name should not be blank or null\";\n\t\t}\n\t\tif(name.split(\" \").length>1)\n\t\t{\n\t\t\tmsg=\"multiple words are not allowed\";\n\t\t}\n\t\telse\n\t\t{\n\t\t for(int i=0;i<name.length();i++)\n\t\t {\n\t\t\t char c=name.charAt(i);\n\t\t\t\tif(!(Character.isDigit(c)||Character.isLetter(c)))\n\t\t\t\t{\n\t\t\t\t\tmsg=\"special characters are not allowed\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t }\n\t\t}\n\t\t\t\n\t\t\n\t\t\t// for Description...\n\t\t\tif(desc==null||desc.equals(\"\"))\n\t\t\t{\n\t\t\t\tmsg=\"Task descrshould not be blank or null\";\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t // for tag...\n\t\t\t \n\t\t\t if(tag==null||tag.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tmsg=\"Task tags not be blank or null\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t // for date { imp here}\n\t\t\t if(tarik!=null)\n\t\t\t {\n\t\t\t SimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t sdf.setLenient(false); // very imp here..\n\t\t\t try {\n\t\t\t\tDate d=sdf.parse(tarik);\n\t\t\t} catch (ParseException e) {\n\t\t\t\t\n\t\t\t//\tmsg=\"date should be correct foramat\";\n\t\t\t\tmsg=e.getMessage();\n\t\t\t}\n\t\t\t }\n\t\t\t// for prority..\n\t\t\t if(prio<1&&prio>10)\n\t\t\t {\n\t\t\t\t msg=\"prority range is 1 to 10 oly pa\";\n\t\t\t }\n\t\t\t\t\n\t\t\t\tif(msg.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\treturn Constant.SUCCESS;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\treturn msg;\n\t}", "@Test\n public void nao_deve_aceitar_descricao_com_caracteres_especiais() {\n telefone.setDescricao(\"celular empresarial: (11)9####-####.\");\n assertFalse(isValid(telefone, \"A descrição não pode conter acentos, caracteres especiais e números.\", Find.class));\n }", "public interface ValueRequired {\r\n\t/**\r\n\t * Richiede all'utente di inserire un valore e ne verifica la validità in base al campo\r\n\t * @param ctx il contesto su cui si deve operare\r\n\t * @param field campo su cui verificare la validità del dato\r\n\t * @param message richiesta all'utente di inserire il dato\r\n\t * @return Oggetto correttamente elaborato in base al campo\r\n\t */\r\n\tpublic default Object acceptValue(Context ctx, FieldHeading field, String message) {\r\n\t\tboolean valid = false;\r\n\t\tObject obj = null;\r\n\t\tdo {\r\n\t\t\tString value = ctx.getIOStream().read(\"\\t\" + message);\r\n\t\t\tif(!field.isBinding() && !field.isOptional() && value.isEmpty())\r\n\t\t\t\tvalid = true;\r\n\t\t\tctx.getIOStream().write(StringConstant.NEW_LINE);\r\n\t\t\tif(field.getClassType().isValidType(value)) {\r\n\t\t\t\tobj = field.getClassType().parse(value);\r\n\t\t\t\tvalid = true;\r\n\t\t\t}\r\n\t\t\tif(!valid)\r\n\t\t\t\tctx.getIOStream().writeln(\"\\tIl valore inserito non è corretto.\\n\\tInserisca qualcosa del tipo: \" + field.getClassType().getSyntax());\r\n\t\t}while(!valid);\r\n\t\treturn obj;\r\n\t}\r\n}", "@Override\r\n\tprotected boolean validateFields(String action) {\r\n\t\t// Booleano para indicar que hubo error\r\n\t\tisError = false;\r\n\t\t// IRI Concepto\r\n\t\tif (this.isBlanks(object.getDcoiricaf())) {\r\n\t\t\tisError = true;\r\n\t\t\tthis.getErrorMessages().add(\r\n\t\t\t\t\tApplicationMessages.getMessage(\"USR0008\",\r\n\t\t\t\t\t\t\tApplicationMessages.getMessage(\"se010_iriDetail\")));\r\n\t\t}\r\n\t\t// Concepto Semántico\r\n\t\tif (this.isBlanks(object.getCosccosak())) {\r\n\t\t\tisError = true;\r\n\t\t\tthis.getErrorMessages().add(\r\n\t\t\t\t\tApplicationMessages.getMessage(\"USR0008\",\r\n\t\t\t\t\t\t\tApplicationMessages\r\n\t\t\t\t\t\t\t\t\t.getMessage(\"se010_semanticConcept\")));\r\n\t\t}\r\n\t\t// Valida relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\t// Valor Relacion\r\n\t\t\tif (this.isBlanks(relco.getDrcvalraf())) {\r\n\t\t\t\tisError = true;\r\n\t\t\t\tthis.getErrorMessages().add(\r\n\t\t\t\t\t\tApplicationMessages.getMessage(\"USR0008\",\r\n\t\t\t\t\t\t\t\tApplicationMessages\r\n\t\t\t\t\t\t\t\t\t\t.getMessage(\"se010_valueRelation\")));\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Retorna\r\n\t\treturn !isError;\r\n\t}", "public boolean validarCampos() {\n\t\tboolean valid = true;\n\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getNome())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataCadastro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getSexo())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getRG())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isObjectNotNull(this.getPaciente().getRG()) && this.getPaciente().getRG() < 0) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG015\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isCPFValido(this.getPaciente().getCPF())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG006\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(Util.isCPFValido(this.getPaciente().getCPF()) && isPacienteCadastrado(this.getPaciente())) {\n\t\t\tthis.tratarMensagemErro(null, \"MSG017\");\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getEndereco())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getBairro())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getCidade())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isStringNotBlankOrNotNull(this.getPaciente().getUF())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isDateNotNull(this.getPaciente().getDataNascimento())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isObjectNotNull(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\tif(!Util.isTelefoneValido(this.getPaciente().getTelefone())) {\n\t\t\tthis.tratarMensagemErro(null);\n\t\t\tvalid = false;\n\t\t}\n\t\t\n\t\treturn valid;\n\t}", "private boolean checkSpinner(String postion, MaterialSpinner sp, String massage) {\n if(postion.equals(\"Select Task Type\") || postion.equals(\"Select Device Type\") || postion.equals(\"Select Customer\"))\n {\n\n sp.setError(massage);\n return false;\n }\n else\n {\n return true;\n }\n\n }", "private boolean validarCampos() {\n\t\t// TODO Auto-generated method stub\n\t\tif (txtCedula.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese un numero de cedula\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtNombre.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese un nombre\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtApellidos.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese los apellidos\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtCorreo.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese el correo\");\n\t\t\treturn false;\n\t\t}\n\t\tif (!Utilidades.validarEmailFuerte(txtCorreo.getText().trim())) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese un correo valido\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtDireccion.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese la direccion\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtTelefono.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese el numero de telefono\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtUsuario.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese el nombre de usuario\");\n\t\t\treturn false;\n\t\t}\n\t\tif (txtContrasenia.getText().trim().equals(\"\")) {\n\t\t\tUtilidades.mostrarMensaje(\"Complete el campo\", \"Por favor ingrese una contraseña\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean validarEntradaDeDados() {\n\t\tString errorMessage = \"\";\n\n\t\tif (textFieldProdutoNome.getText() == null || textFieldProdutoNome.getText().length() == 0) {\n\t\t\terrorMessage += \"Nome invalido!\\n\";\n\t\t}\n\t\tif (textFieldProdutoPreco.getText() == null || textFieldProdutoPreco.getText().length() == 0) {\n\t\t\terrorMessage += \"Preço invalido!\\n\";\n\t\t}\n\t\tif (textFieldProdutoQuantidade.getText() == null || textFieldProdutoQuantidade.getText().length() == 0) {\n\t\t\terrorMessage += \"Quantidade invalido!\\n\";\n\t\t}\n\t\tif (comboBoxProdutoCategoria.getSelectionModel().getSelectedItem() == null) {\n\t\t\terrorMessage += \"Categoria invalido!\\n\";\n\t\t}\n\t\tif (errorMessage.length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\n\t\t\t/** Mostrar a mensagem de erro. */\n\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t\t\talert.setTitle(\"Erro no registo\");\n\t\t\talert.setHeaderText(\"Campos invalidos, corrija...\");\n\t\t\talert.setContentText(errorMessage);\n\t\t\talert.show();\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean validate() {\n\n\t\tNoLista p = lista.validate();\n\t\tif(p==null){\n\t\t\treturn true; \n\t\t}else {\n\t\t\twhile(p!=null) {\n\t\t\t\tfor (int i = 0; i < ignore.length; i++) {\n\t\t\t\t\tif(ignore[i].equals(p.getInfo())) {\n\t\t\t\t\t\tretirar(p.getInfo());\n\t\t\t\t\t\taddList(p.getInfo());\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tp=p.getProximo();\n\t\t\t}\n\t\t\t\n\t\t\tif(this.lista.getPrimeiro()==null) {\n\t\t\t\treturn true;\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private boolean campiVuoti(){\n return nomeVarTextField.getText().equals(\"\") || tipoVarComboBox.getSelectedIndex() == -1;\n }", "public boolean validar() {\n if (foto==null){\n Toast.makeText(this, getResources().getString(R.string.error_f), Toast.LENGTH_SHORT).show();\n foto.requestFocus();\n return false;\n }\n\n if (txtID.getText().toString().isEmpty()) {\n txtID.setError(getResources().getString(R.string.error_ID));\n txtID.requestFocus();\n return false;\n }\n\n if (txtNombre.getText().toString().isEmpty()) {\n txtNombre.setError(getResources().getString(R.string.error_nombre));\n txtNombre.requestFocus();\n return false;\n }\n\n if (txtTipo.getText().toString().isEmpty()) {\n txtTipo.setError(getResources().getString(R.string.error_tipo));\n txtTipo.requestFocus();\n return false;\n }\n\n /*if (o1 == 0) {\n Toast.makeText(this, getResources().getString(R.string.error_cantidad), Toast.LENGTH_SHORT).show();\n cmbSexo.requestFocus();\n return false;\n }*/\n\n if (txtCantidad.getText().toString().isEmpty()) {\n txtCantidad.setError(getResources().getString(R.string.error_cantidad));\n txtCantidad.requestFocus();\n return false;\n }\n\n return true;\n\n }", "@Test\n\tpublic void testisValidNoNotaTTFile() {\n\t\t// Setup\n\t\tString added = \"3\";\n\t\tString removed = \"5\";\n\t\tLine line = new Line(added, removed, \"dank.java\");\n\t\tList<String> types = new ArrayList<String>();\n\t\ttypes.add(\"tt\");\n\n\t\t// Exercise\n\t\tboolean valid = line.isValid(types);\n\n\t\t// Verify\n\t\tassertFalse(valid);\n\t}", "private boolean validate() {\n if (activityAddTodoBinding.etTitle.getText().toString().trim().isEmpty())\n {\n activityAddTodoBinding.etTitle.setError(getString(R.string.enter_title));\n return false;\n }\n else if (activityAddTodoBinding.etDesc.getText().toString().trim().isEmpty())\n {\n activityAddTodoBinding.etDesc.setError(getString(R.string.enter_desc));\n return false;\n }\n return true;\n }", "private void validateEmptyElements()\n {\n // Check if something is missing\n if (_dietTreatment.getName().length() < 1)\n {\n getErrors().add(\"Kein Name angegeben.\");\n }\n\n // TODO: check that at least one user is TREATING!\n if (_dietTreatment.getSystemUsers().isEmpty())\n {\n getErrors().add(\"Kein verantwortlicher User angegeben.\");\n }\n\n if (_dietTreatment.getPatientStates().isEmpty())\n {\n getErrors().add(\"Keine Zuweisungsdiagnose angegeben.\");\n }\n }", "public TipoCaracteresException() {\n\t\tsuper(\"Los campos 'nombre' y ' apellido' solo pueden contener letras\");\n\t}", "private void initValidarTipoUsuarioChatLeidos(String tipoUsuario) {\n switch (tipoUsuario) {\n case \"especialista\": /**/\n\n Log.d(TAG, \"especialista : \"\n + \"keyUser : \" + keyUser\n + \"Propuesta ; \" + idUsuarioPropuesta);\n // initLeerMensajesTipoUsuario(idUsuarioPropuesta, idGrupoChat, paisCodigo);\n initLeerMensajesTipoUsuario(idUsuarioPropuesta, idGrupoChat, paisCodigo);\n break;\n case \"cliente\":\n Log.d(TAG, \"cliente : \"\n + \"keyUser : \" + keyUser\n + \"Propuesta ; \" + idUsuarioPropuesta);\n\n //initLeerMensajesTipoUsuario(keyUser, idGrupoChat, paisCodigo);\n initLeerMensajesTipoUsuario(idUsuarioPropuesta, idGrupoChat, paisCodigo);\n //initLeerMensajesTipoUsuario(idUsuarioPropuesta, idGrupoChat, paisCodigo);\n break;\n }\n }", "private boolean noTipoPrimitivo(String tipo) {\r\n\t\tif (tipo.equals(\"arregloBoolean\")|| tipo.equals(\"arregloChar\")|| tipo.equals(\"arregloInt\")|| tipo.equals(\"boolean\")|| \r\n\t\t\t\ttipo.equals(\"char\")|| tipo.equals(\"int\")|| tipo.equals(\"string\")|| tipo.equals(\"void\"))\r\n\t\t\t\treturn false;\r\n\t\telse\r\n\t\t\t\treturn true;\t\r\n\t}", "private void validation() {\n Pattern pattern = validationfilterStringData();\n if (pattern.matcher(txtDrug.getText().trim()).matches() && pattern.matcher(txtGenericName.getText().trim()).matches()) {\n try {\n TblTreatmentadvise treatmentadvise = new TblTreatmentadvise();\n treatmentadvise.setDrugname(txtDrug.getText());\n treatmentadvise.setGenericname(txtGenericName.getText());\n treatmentadvise.setTiming(cmbDosestiming.getSelectedItem().toString());\n cmbtiming.setSelectedItem(cmbDosestiming);\n treatmentadvise.setDoses(loadcomboDoses());\n treatmentadvise.setDuration(loadcomboDuration());\n PatientService.saveEntity(treatmentadvise);\n JOptionPane.showMessageDialog(this, \"SAVE SUCCESSFULLY\");\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, \"STARTUP THE DATABASE CONNECTION\");\n }\n } else {\n JOptionPane.showMessageDialog(this, \"WRONG DATA ENTERED.\");\n }\n }", "public void setListener(JFXTextField field, int type) {\n if (type == 1) {\n NumberValidator numValidator = new NumberValidator();\n santa_List.add(numValidator);\n field.getValidators().add(numValidator);\n numValidator.setMessage(\"Enter a number\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 2) {\n RegexValidator regexValidator = new RegexValidator();\n santa_List.add(regexValidator);\n regexValidator.setRegexPattern(\"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$\");\n field.getValidators().add(regexValidator);\n regexValidator.setMessage(\"Enter your name!\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 3) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\".+\\\\@.+\\\\..+\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid email\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 4) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^\\\\D?(\\\\d{3})\\\\D?\\\\D?(\\\\d{3})\\\\D?(\\\\d{4})$\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid phone number\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 5) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^\\\\d{2}$\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter the last two digits of the year\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 6) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^[0-9]+(\\\\.[0-9][0-9]*)?$\"); // Doesn't account for decimals\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid pH\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 7) {\n RegexValidator validRepId = new RegexValidator();\n santa_List.add(validRepId);\n validRepId.setRegexPattern(\"^[a-zA-Z0-9]{0,16}$\"); // Doesn't account for decimals\n field.getValidators().add(validRepId);\n validRepId.setMessage(\"Enter a valid rep id\");\n }\n if (type == 8) {\n RegexValidator validSerial = new RegexValidator();\n santa_List.add(validSerial);\n validSerial.setRegexPattern(\"^\\\\d{4}$\");\n field.getValidators().add(validSerial);\n validSerial.setMessage(\"The serial number must be at most four digits\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n\n field.focusedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n if (!newValue) {\n field.validate();\n\n boolean t = true;\n for (ValidatorBase vb : santa_List) {\n t = t && !vb.getHasErrors();\n// System.out.println(vb.getHasErrors());\n }\n\n if (t) {\n// System.out.println(\"Fields has no errors\");\n SendApp.setOpacity(1);\n SendApp.setDisable(false);\n } else {\n// System.out.println(\"Fields has errors\");\n SendApp.setDisable(true);\n SendApp.setOpacity(0.5);\n\n }\n }\n }\n });\n }", "private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}", "public boolean validarForm() throws Exception {\r\n\r\n tbxNro_identificacion\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n lbxNro_ingreso.setStyle(\"background-color:white\");\r\n tbxCodigo_prestador\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n tbxCodigo_diagnostico_principal\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n tbxCausa_muerte\r\n .setStyle(\"text-transform:uppercase;background-color:white\");\r\n lbxEstado_salida.setStyle(\"background-color:white\");\r\n dtbxFecha_ingreso.setStyle(\"background-color:white\");\r\n\r\n Admision admision = ((Admision) lbxNro_ingreso.getSelectedItem()\r\n .getValue());\r\n\r\n boolean valida = true;\r\n\r\n String mensaje = \"Los campos marcados con (*) son obligatorios\";\r\n\r\n if (tbxNro_identificacion.getText().trim().equals(\"\")) {\r\n tbxNro_identificacion\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (tbxCodigo_prestador.getText().trim().equals(\"\")) {\r\n tbxCodigo_prestador\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (admision == null) {\r\n lbxNro_ingreso.setStyle(\"background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n if (tbxCodigo_diagnostico_principal.getText().trim().equals(\"\")) {\r\n tbxCodigo_diagnostico_principal\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n\r\n if (lbxCausa_externa.getSelectedIndex() == 0) {\r\n lbxCausa_externa\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n valida = false;\r\n }\r\n\r\n if (valida) {\r\n if (lbxEstado_salida.getSelectedItem().getValue().equals(\"2\")\r\n && tbxCausa_muerte.getText().trim().equals(\"\")) {\r\n tbxCausa_muerte\r\n .setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\r\n mensaje = \"Usted selecciono el estado de la salida como muerto(a) \\npor lo tanto debe seleccionar la causa de muerte\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (valida) {\r\n if (!lbxEstado_salida.getSelectedItem().getValue().equals(\"2\")\r\n && !tbxCausa_muerte.getText().trim().equals(\"\")) {\r\n lbxEstado_salida.setStyle(\"background-color:#F6BBBE\");\r\n mensaje = \"Usted selecciono una casua de muerte \\npor lo tanto debe seleccionar el estado a la salida como muerto (a)\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (valida) {\r\n if (dtbxFecha_ingreso.getValue().compareTo(\r\n dtbxFecha_egreso.getValue()) > 0) {\r\n dtbxFecha_ingreso.setStyle(\"background-color:#F6BBBE\");\r\n mensaje = \"La fecha de ingreso no puede ser mayor a la fecha de egreso\";\r\n valida = false;\r\n }\r\n }\r\n\r\n if (!valida) {\r\n Messagebox.show(mensaje,\r\n usuarios.getNombres() + \" recuerde que...\", Messagebox.OK,\r\n Messagebox.EXCLAMATION);\r\n }\r\n\r\n return valida;\r\n }", "public boolean validarFichaEpidemiologia() {\n\n\t\tdtbxFecha_ficha.setStyle(\"background-color:white\");\n\t\t// tbxNombres_y_apellidos.setStyle(\"text-transform:uppercase;background-color:white\");\n\t\ttbxNro_identificacion.setStyle(\"background-color:white\");\n\n\t\tboolean valida = true;\n\n\t\tif (dtbxFecha_ficha.getText().trim().equals(\"\")) {\n\t\t\tdtbxFecha_ficha.setStyle(\"background-color:#F6BBBE\");\n\t\t\tvalida = false;\n\t\t}\n\t\t// if(tbxNombres_y_apellidos.getText().trim().equals(\"\")){\n\t\t// tbxNombres_y_apellidos.setStyle(\"text-transform:uppercase;background-color:#F6BBBE\");\n\t\t// valida = false;\n\t\t// }\n\t\tif (tbxNro_identificacion.getText().trim().equals(\"\")) {\n\t\t\ttbxNro_identificacion.setStyle(\"background-color:#F6BBBE\");\n\t\t\tvalida = false;\n\t\t}\n\n\t\tif (!valida) {\n\t\t\tMensajesUtil.mensajeAlerta(usuarios.getNombres()\n\t\t\t\t\t+ \" recuerde que...\",\n\t\t\t\t\t\"Los campos marcados con (*) son obligatorios\");\n\t\t}\n\n\t\treturn valida;\n\t}", "@Test\n public void deve_aceitar_descricao_entre_15_e_30_caracteres_valido() {\n telefone.setDescricao(random(20, true, false));\n assertTrue(isValid(telefone, telefone.getDescricao(), Find.class));\n }", "public boolean validarCampos(){\n String nome = campoNome.getText().toString();\n String descricao = campoDescricao.getText().toString();\n String valor = String.valueOf(campoValor.getRawValue());\n\n\n if(!nome.isEmpty()){\n if(!descricao.isEmpty()){\n if(!valor.isEmpty() && !valor.equals(\"0\")){\n return true;\n }else{\n exibirToast(\"Preencha o valor do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha a descrição do seu serviço\");\n return false;\n }\n }else{\n exibirToast(\"Preencha o nome do seu serviço\");\n return false;\n }\n }", "public Validacion(String descripcion) {\n super(descripcion);\n }", "public InstrutorCadastrarTela() {\n initComponents();\n //Limite de caracateres e apenas caracteres permitidos\n jTextFieldNome.setDocument(new classesBasicas.CaracterLimitePermitido(60));\n //Limitando os caracteres para (N), independende de ser numero ou letras\n jTextFieldRg.setDocument(new classesBasicas.JTextFieldLimite(20)); \n }", "@Override\r\n\tprotected void validate() {\n\t}" ]
[ "0.70356387", "0.65639675", "0.6317308", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.62339336", "0.61036325", "0.6096866", "0.60630786", "0.6060506", "0.6047318", "0.6028537", "0.59359217", "0.5913652", "0.5850886", "0.58380824", "0.58079183", "0.5807253", "0.5770799", "0.57375485", "0.5737324", "0.57369566", "0.57200557", "0.5701357", "0.568647", "0.56859094", "0.5681614", "0.56807035", "0.56791157", "0.56727195", "0.56715065", "0.56535524", "0.5631743", "0.56064945", "0.55795455", "0.5538194", "0.5537332", "0.55351055", "0.5518212", "0.55140305", "0.5510025", "0.55014265", "0.5487186", "0.54832566", "0.54781836", "0.54715294", "0.54563487", "0.54378194", "0.54373753", "0.54357195", "0.54229313", "0.5416337", "0.5411856", "0.53904635", "0.53888535", "0.5388282", "0.5386134", "0.5383362", "0.5381686", "0.5381378", "0.5380654", "0.5376474", "0.5372786", "0.5369504", "0.53608084", "0.5357031", "0.5348058", "0.5346689" ]
0.0
-1
checkMove pedine eccetto RE
private boolean checkMoveOthers(Pieces piece, Coordinates from, Coordinates to) { /* *il pedone: * -può andare dritto sse davanti a se non ha pedine * -può andare obliquo sse in quelle posizioni ha una pedina avversaria da mangiare * */ if (piece instanceof Pawn) { if (from.getY() == to.getY()) { if(chessboard.at(to) == null) return true; else return false; } else { if(chessboard.at(to) == null) { return false; } else return true; } } //il cavallo salta le pedine nel mezzo if (piece instanceof Knight) return true; //Oltre non andranno il: cavallo, il re ed il pedone. /* *Calcolo le posizioni che intercorrono tra il from ed il to escluse *ed per ogni posizione verifico se è vuota *-se in almeno una posizione c'è una pedina(non importa il colore), la mossa non è valida *-altrimenti, la strada è spianata quindi posso effettuare lo spostamento */ ArrayList<Coordinates> path = piece.getPath(from, to); for (Coordinates coordinate : path) { if ( chessboard.at(coordinate) != null ){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isValidMove(String move){\n String[] art = move.split(\" \");\n if(!art[0].equals(\"mark\")){\n return false;\n }\n int x,y;\n try {\n x=Integer.parseInt(art[1]);\n y=Integer.parseInt(art[2]);\n if(0<x && x<17 && y>0 && 17>y){\n if(board.getMark(x-1,y-1) == '-') {\n //pozitie valida si libera\n return true;\n }\n else {\n //pozitie ocupata\n return false;\n }\n }\n }catch (Exception e){\n //cazul in care nu se trimit numere ca parametri\n return false;\n }\n //daca pozitia este invalida\n return false;\n }", "public String getValidMove() {\r\n\t\tboolean isValidMove = false;\r\n\t\tString Command = \"\";\r\n\t\twhile(!isValidMove) {\r\n\t\t\ttry {\r\n\t\t\t\tCommand = FromClient.readUTF();\r\n\t\t\t\tString[] parts = Command.split(\" \");\r\n\t\t\t\tint move = Integer.parseInt(parts[1]);\r\n\t\t\t\tisValidMove = engine.ValidPosition(move, User.Iindex, User.Jindex);\r\n\t\t\t\tToClient.writeBoolean(isValidMove);\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} catch (NumberFormatException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Command;\r\n\t}", "private boolean isThereValidMove() {\n\t\treturn true;\n\t}", "boolean doMove();", "boolean isLegal(String move);", "boolean makeMove();", "boolean legalMove(Move mov) {\n if (mov == null || !validSquare(mov.toIndex())\n || !validSquare(mov.fromIndex())) {\n throw new IllegalArgumentException(\"Illegal move\");\n }\n PieceColor from = get(mov.fromIndex());\n PieceColor to = get(mov.toIndex());\n if (!mov.isJump() && jumpPossible()) {\n return false;\n }\n if (from != _whoseMove) {\n return false;\n } else if (mov.isJump()) {\n return checkJump(mov, false);\n } else if (from == BLACK && row(mov.fromIndex()) == '1') {\n return false;\n } else if (from == WHITE && row(mov.fromIndex()) == '5') {\n return false;\n } else if (mov.isLeftMove()) {\n ArrayList<String> rec = _directions.get(mov.fromIndex());\n return get(mov.toIndex()) == EMPTY\n && !rec.get(rec.size() - 1).equals(\"Right\");\n } else if (mov.isRightMove()) {\n ArrayList<String> rec = _directions.get(mov.fromIndex());\n return get(mov.toIndex()) == EMPTY\n && !rec.get(rec.size() - 1).equals(\"Left\");\n } else if (from == BLACK) {\n if (mov.fromIndex() % 2 == 0 && to == EMPTY) {\n return mov.fromIndex() - mov.toIndex() == SIDE\n || mov.fromIndex() - mov.toIndex() == SIDE - 1\n || mov.fromIndex() - mov.toIndex() == SIDE + 1;\n } else {\n return mov.fromIndex() - mov.toIndex() == SIDE && to == EMPTY;\n }\n } else if (from == WHITE) {\n if (mov.fromIndex() % 2 == 0 && to == EMPTY) {\n return mov.toIndex() - mov.fromIndex() == SIDE\n || mov.toIndex() - mov.fromIndex() == SIDE + 1\n || mov.toIndex() - mov.fromIndex() == SIDE - 1;\n } else {\n return mov.toIndex() - mov.fromIndex() == SIDE && to == EMPTY;\n }\n }\n return false;\n }", "public boolean GetMove();", "char isValidMove(Move move) {\n char isVal = 'V';\n if (move.row >= 0 && move.row < this.boardSize) {\n if (move.col >= 0 && move.col < this.boardSize) {\n if (this.board[move.row][move.col] != ' ') {\n isVal = 'O'; // returns 'O' if the position is already occupied\n }\n } else {\n isVal = 'C'; // returns 'C' if invalid column is selected\n }\n } else {\n isVal = 'R'; // returns 'R' if invalid row is selected\n }\n return isVal;\n }", "boolean canMove();", "protected boolean processIllegalMove(String moveString, String reason){return false;}", "private boolean isNextMoveEnPassentCapture(Move move)\r\n\t{\r\n\t\tif (!(move.capture instanceof Pawn)) return false;\r\n\t\tif (Math.abs(move.from.coordinate.x - move.to.coordinate.x) != 1) return false;\r\n\t\tif (Math.abs(move.from.coordinate.y - move.to.coordinate.y) != 1) return false;\r\n\t\tif (!move.to.isEmpty()) return false;\r\n\t\treturn true;\r\n\t}", "boolean isValidMove(int col);", "private boolean moveCheck(Piece p, List<Move> m, int fC, int fR, int tC, int tR) {\n if (null == p) {\n // Legal move!\n m.add(new Move(fC, fR, tC, tR));\n // Continue checking for moves.\n return false;\n }\n if (p.owner != whoseTurn) {\n // Enemy sighted!\n // Legal move!\n m.add(new Move(fC, fR, tC, tR));\n // No more moves!\n }\n return true;\n }", "public PecaXadrez moveXadrez(PosicaoXadrez origem, PosicaoXadrez destino) {\n\t\tPosicao orig = origem.paraPosicao();\n\t\tPosicao dest = destino.paraPosicao();\n\t\tvalidaPosicaoOrigem(orig);\n\t\tvalidaPosicaoDestino(orig, dest);\n\t\tPeca pecaCapturada = movePeca(orig, dest);\n\t\tif (testeCheck(jogadorAtual)) {\n\t\t\tdesfazMovi(orig, dest, pecaCapturada);\n\t\t\tthrow new XadrezException(\"Posição ilegal, voce não pode se colocar em CHECK!\");\n\t\t}\n\n\t\t// guarda a peca movimentada\n\t\tPecaXadrez pecaMovida = (PecaXadrez)tabuleiro.peca(dest);\n\t\t// Promocao\n\t\tpromocao = null;\n\t\tif (pecaMovida instanceof Peao) {\n\t\t\tif ((pecaMovida.getCor() == Cor.BRANCA && dest.getLin() == 0)\n\t\t\t|| (pecaMovida.getCor() == Cor.PRETA && dest.getLin() == 7)) {\n\t\t\t\tpromocao = ((PecaXadrez)tabuleiro.peca(dest));\n\t\t\t\tpromocao = trocaPecaPromovida(\"Q\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// verifica se o oponete ficou em check apos a jogada\n\t\tcheck = (testeCheck(oponente(jogadorAtual))) ? true : false;\n\t\t\n\t\t// verifica se e check mate\n\t\tif (testeCheckMate(oponente(jogadorAtual))) {\n\t\t\tcheckMate = true;\n\t\t}\n\t\telse {\n\t\t\tproximoTurno();\n\t\t}\n\t\t// Verfica se o Piao andou duas casas, ai ele fica vulneravel a enpassant\n\t\tif (pecaMovida instanceof Peao && (destino.getLin() == origem.getLin() - 2\n\t\t\t\t|| destino.getLin() == origem.getLin() + 2 )) {\n\t\t\tenPassant = pecaMovida;\n\t\t}\n\t\telse {\n\t\t\tenPassant = null;\n\t\t}\n\t\treturn (PecaXadrez) pecaCapturada;\n\t}", "public abstract boolean validMove(ChessBoard board, Square from, Square to);", "private boolean isLegalMove(String move) {\n\t\tString[] moveParts = move.split(\";\");\n\n\t\tint fromRow = Integer.parseInt(moveParts[0].charAt(0) + \"\");\n\t\tint fromCol = Integer.parseInt(moveParts[0].charAt(1) + \"\");\n\n\t\tint toRow = Integer.parseInt(moveParts[1].charAt(0) + \"\");\n\t\tint toCol = Integer.parseInt(moveParts[1].charAt(1) + \"\");\n\n\t\tint minRow = Math.min(fromRow, toRow);\n\t\tint minCol = Math.min(fromCol, toCol);\n\n\t\tint maxRow = Math.max(fromRow, toRow);\n\t\tint maxCol = Math.max(fromCol, toCol);\n\n\t\tint piece = board[fromRow][fromCol];//Integer.parseInt(moveParts[2]);\n\t\tint pieceType = Math.abs(piece);\n\t\tint team = Math.round(Math.signum(piece));\n\n\t\tif (team == Math.round(Math.signum(board[toRow][toCol]))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (toRow < 0 || toRow > 7 && toCol < 0 && toCol > 7) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (team > 0) { // WHITE\n\t\t\tint enpassantBackup = enpassantCol;\n\t\t\tint[][] boardBackup = deepCopyBoard();\n\t\t\tapplyConvertedMove(move);\n\t\t\tboolean check = isWhiteCheck();\n\t\t\tboard = boardBackup;\n\t\t\tenpassantCol = enpassantBackup;\n\t\t\tif (check) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else { //BLACK\n\t\t\tint enpassantBackup = enpassantCol;\n\t\t\tint[][] boardBackup = deepCopyBoard();\n\t\t\tapplyConvertedMove(move);\n\t\t\tboolean check = isBlackCheck();\n\t\t\tboard = boardBackup;\n\t\t\tenpassantCol = enpassantBackup;\n\t\t\tif (check) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (pieceType == 1) { //Pawn\n\t\t\treturn ((board[toRow][toCol] != 0 && toRow == fromRow + team && (toCol == fromCol + 1 || toCol == fromCol - 1)) || (toCol == fromCol && board[toRow][toCol] == 0 && ((toRow == fromRow + team) || (((fromRow == 1 && team == 1) || (fromRow == 6 && team == -1)) ? toRow == fromRow + 2*team && board[fromRow + team][fromCol] == 0 : false))));\n\t\t} else if (pieceType == 2) { //Rook\n\t\t\tif (toRow == fromRow) {\n\t\t\t\tfor (int i = minCol + 1; i < maxCol; i++) {\n\t\t\t\t\tif (board[toRow][i] != 0 && Math.abs(board[toRow][i]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else if (toCol == fromCol) {\n\t\t\t\tfor (int i = minRow + 1; i < maxRow; i++) {\n\t\t\t\t\tif (board[i][toCol] != 0 && Math.abs(board[i][toCol]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (pieceType == 3) { //Knight\n\t\t\tint dx = toRow - fromRow;\n\t\t\tint dy = toCol - fromCol;\n\t\t\treturn dx*dx + dy*dy == 5;\n\t\t} else if (pieceType == 4) { //Bishop\n\t\t\tint dx = toRow - fromRow;\n\t\t\tint dy = toCol - fromCol;\n\t\t\tif (dy != dx && dy != -dx) return false;\n\t\t\tint m = dy/dx;\n\t\t\tint startCol = (m < 0 ? maxCol : minCol);\n\t\t\tfor (int i = minRow + 1; i < maxRow; i++) {\n\t\t\t\tif (board[i][startCol + m*(i - minRow)] != 0 && board[i][startCol + m*(i - minRow)] != 7) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} else if (pieceType == 5) { //Queen\n\t\t\tif (toRow == fromRow) {\n\t\t\t\tfor (int i = minCol + 1; i < maxCol; i++) {\n\t\t\t\t\tif (board[toRow][i] != 0 && Math.abs(board[toRow][i]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else if (toCol == fromCol) {\n\t\t\t\tfor (int i = minRow + 1; i < maxRow; i++) {\n\t\t\t\t\tif (board[i][toCol] != 0 && Math.abs(board[i][toCol]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tint dx = toRow - fromRow;\n\t\t\t\tint dy = toCol - fromCol;\n\t\t\t\tif (dy != dx && dy != -dx) return false;\n\t\t\t\tint m = dy/dx;\n\t\t\t\tint startCol = (m < 0 ? maxCol : minCol);\n\t\t\t\tfor (int i = minRow + 1; i < maxRow; i++) {\n\t\t\t\t\tif (board[i][startCol + m*(i - minRow)] != 0 && Math.abs(board[i][startCol + m*(i - minRow)]) != 7) return false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (pieceType == 6) { //King\n\t\t\tint dx = toRow - fromRow;\n\t\t\tint dy = toCol - fromCol;\n\t\t\treturn dx*dx + dy*dy <= 2;\n\t\t}\n\n\t\treturn false;\n\t}", "public boolean isValidMove(Card card)\n {\n return false;\n }", "private boolean isNextMoveRochade(Move move)\r\n\t{\r\n\t\tif (!(move.from.piece instanceof King)) return false;\r\n\t\tint xDiffAbs = Math.abs(move.to.coordinate.x - move.from.coordinate.x); \r\n\t\treturn xDiffAbs == 2;\r\n\t}", "private boolean anyMove (int x,int y, OthelloPiece colour){\n boolean valid = false;\n if(move(x,y,VALID_MOVE_3,VALID_MOVE_2,colour)) valid=true;\n if(move(x,y,VALID_MOVE_3,VALID_MOVE_3,colour)) valid=true;\n if(move(x,y,VALID_MOVE_3,VALID_MOVE_1,colour)) valid=true;\n if(move(x,y,VALID_MOVE_2,VALID_MOVE_3,colour)) valid=true;\n if(move(x,y,VALID_MOVE_2,VALID_MOVE_1,colour)) valid=true;\n if(move(x,y,VALID_MOVE_1,VALID_MOVE_2,colour)) valid=true;\n if(move(x,y,VALID_MOVE_1,VALID_MOVE_3,colour)) valid=true;\n if(move(x,y,VALID_MOVE_1,VALID_MOVE_1,colour)) valid=true;\n return (valid);\n }", "boolean isValidMove(int move)\n\t{\n\t\treturn move >= 0 && move <= state.size() - 1 && state.get(move) == 0;\n\t}", "private boolean handleIllegalMove(String line){\n if (!(line.startsWith(\"Illegal move \") ||\n line.equals(\"It is not your move.\") ||\n line.equals(\"The clock is paused, use \\\"unpause\\\" to resume.\")))\n return false;\n \n Matcher illegalMoveMatcher = ILLEGAL_MOVE_REGEX.matcher(line);\n Matcher notYourTurnMatcher = NOT_YOUR_TURN_REGEX.matcher(line);\n Matcher movedWhenGamePausedMatcher = MOVED_WHEN_GAME_PAUSED.matcher(line);\n\n if (illegalMoveMatcher.matches()){\n String moveString = illegalMoveMatcher.group(1);\n String reason = illegalMoveMatcher.group(2);\n\n if (!processIllegalMove(moveString, reason))\n processLine(line);\n\n return true;\n }\n else if (notYourTurnMatcher.matches()){\n String moveString = null; // sigh\n String reason = notYourTurnMatcher.group(1);\n\n if (!processIllegalMove(moveString, reason))\n processLine(line);\n\n return true;\n }\n else if (movedWhenGamePausedMatcher.matches()){\n String moveString = null;\n String reason = movedWhenGamePausedMatcher.group(1);\n \n if (!processIllegalMove(moveString, reason))\n processLine(line);\n \n return true;\n }\n\n return false;\n }", "public static boolean validMove(String move, Person p, Board building )\n {\n Room[][] map = building.getMap();\n move = move.toLowerCase().trim();\n switch (move) {\n case \"n\":\n if (p.getxLoc() > 0)\n {\n map[p.getxLoc()][p.getyLoc()].leaveRoom(p);\n System.out.println(\"You are in the \"+map[p.getxLoc()-1][p.getyLoc()].getName());\n map[p.getxLoc()-1][p.getyLoc()].enterRoom(p,building);\n return true;\n }\n else\n {\n return false;\n }\n case \"e\":\n if (p.getyLoc()< map[p.getyLoc()].length -1)\n {\n map[p.getxLoc()][p.getyLoc()].leaveRoom(p);\n System.out.println(\"You are in the \"+map[p.getxLoc()][p.getyLoc() + 1].getName());\n map[p.getxLoc()][p.getyLoc() + 1].enterRoom(p, building);\n return true;\n }\n else\n {\n return false;\n }\n\n case \"s\":\n if (p.getxLoc() < map.length - 1)\n {\n map[p.getxLoc()][p.getyLoc()].leaveRoom(p);\n System.out.println(\"You are in the \"+map[p.getxLoc()+1][p.getyLoc()].getName());\n map[p.getxLoc()+1][p.getyLoc()].enterRoom(p, building);\n return true;\n }\n else\n {\n return false;\n }\n\n case \"w\":\n if (p.getyLoc() > 0)\n {\n map[p.getxLoc()][p.getyLoc()].leaveRoom(p);\n System.out.println(\"You are in the \"+map[p.getxLoc()][p.getyLoc()-1].getName());\n map[p.getxLoc()][p.getyLoc()-1].enterRoom(p, building);\n return true;\n }\n else\n {\n return false;\n }\n default:\n break;\n\n }\n return true;\n }", "private boolean isLegal(String move) {\n if (!move.matches(\"[0-9]*,[0-9]*\")) {\n return false;\n }\n\n int column = Integer.parseInt(move.substring(2)) - 1;\n int row = Integer.parseInt(move.substring(0, 1)) - 1;\n\n if (beyondBoard(column, row)) {\n return false;\n }\n\n if (isOccupied(column, row)) {\n return false;\n }\n\n return true;\n }", "public boolean checkMove(int move)\n\t{\n\t\tif (columns[move] < 6)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "boolean isMoveFinished(int tick);", "boolean chkMove(DcMotor motor, int target, int delta)\n {\n int currentPos = motor.getCurrentPosition();\n return ((currentPos >= (target - delta)) && (currentPos <= (target + delta)));\n }", "public void processMove(String s) {\n\t\tScanner sc = new Scanner(s);\r\n\t\t// Get the flag change\r\n\t\tString command = sc.next();\r\n\t\tboolean value = sc.nextBoolean();\r\n\t\tif (command.equals(\"turnL\"))\r\n\t\t\tturnL = value;\r\n\t\telse if (command.equals(\"turnR\"))\r\n\t\t\tturnR = value;\r\n\t\telse if (command.equals(\"forth\"))\r\n\t\t\tforth = value;\r\n\t\telse if (command.equals(\"fire\"))\r\n\t\t\tfire = value;\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Unexpected move: \" + command);\r\n\t\t// then unpack position update\r\n\t\tlocX = sc.nextDouble();\r\n\t\tlocY = sc.nextDouble();\r\n\t\tangle = sc.nextDouble();\r\n\t}", "public MoveResult canMovePiece(Alignment player, Coordinate from, Coordinate to);", "public boolean move();", "@Override\n public boolean isValidMove(Move move) {\n if (board[move.oldRow][move.oldColumn].isValidMove(move, board))\n return true;\n //player will not be in check\n //move will get player out of check if they are in check\n return false;\n }", "protected int checkMove(Direction d) {\n Position pos = currentPosition.nextPosition(d); \n if (!pos.inPlayArea()) return -1;\n Station nS = map.nearestStation(pos);\n if (Position.withinRange(nS.pos, pos) && !nS.isPositive) {\n return 0;\n }\n else return 1;\n }", "public boolean isValidMove(Point orig, Point dest){ \r\n Color playerColor = model.getCurrentPlayer().getColor();\r\n // Validate all point between board limits\r\n if(!isValidPosition(orig) || !isValidPosition(dest)) return false;\r\n // Check for continue move starting piece\r\n if(model.getCheckPiece() != null && !model.getCheckPiece().equals(orig)) return false;\r\n // Validate origin piece to player color\r\n if((isRed(playerColor) && !isRed(orig)) || (isBlack(playerColor) && !isBlack(orig))) return false;\r\n // Only can move to empty Black space\r\n if(!isEmpty(dest)) return false;\r\n // If current player have obligatory eats, then need to eat\r\n if(obligatoryEats(playerColor) && !moveEats(orig,dest)) return false;\r\n // Check move direction and length\r\n int moveDirection = orig.getFirst() - dest.getFirst(); // Direction in Rows\r\n int rLength = Math.abs(moveDirection); // Length in Rows\r\n int cLength = Math.abs(orig.getSecond() - dest.getSecond()); // Length in Columns\r\n int mLength;\r\n // Only acepts diagonal movements in 1 or 2 places (1 normal move, 2 eats move)\r\n if ((rLength == 1 && cLength == 1) || (rLength == 2 && cLength == 2)){\r\n mLength = rLength;\r\n } else {\r\n return false;\r\n }\r\n // 1 Place movement\r\n if (mLength == 1){ \r\n if (isRed(orig) && !isQueen(orig) && moveDirection > 0) return true;\r\n if (isBlack(orig) && !isQueen(orig) && moveDirection < 0) return true;\r\n if ((isRed(orig) && isQueen(orig)) || (isBlack(orig) && isQueen(orig))) return true;\r\n }\r\n // 2 Places movement need checks if eats rivals\r\n if (mLength == 2){\r\n // Compute mid point\r\n Point midPoint = getMidPoint(orig, dest);\r\n // Check move\r\n if ((isRed(orig) && isBlack(midPoint)) || (isBlack(orig) && isRed(midPoint))){\r\n if (isRed(orig) && !isQueen(orig) && moveDirection > 0) return true;\r\n if (isBlack(orig) && !isQueen(orig) && moveDirection < 0) return true;\r\n if ((isRed(orig) && isQueen(orig)) || (isBlack(orig) && isQueen(orig))) return true;\r\n }\r\n }\r\n return false;\r\n }", "@Override\n\tpublic boolean validMove(int xEnd, int yEnd, board b){\n\t\t//try to land one same color piece\n\t\tif(b.occupied(xEnd, yEnd)&&b.getPiece(xEnd, yEnd).getColor()==color){\n\t\t\treturn false;\n\t\t}\n\t\tif(v==0){\n\t\t\tif(!this.guard(xEnd, yEnd, b)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//normal move\n\t\tif((xEnd==x-1&&yEnd==y-1)||(xEnd==x-1&&yEnd==y)||(xEnd==x-1&&yEnd==y+1)||(xEnd==x&&yEnd==y-1)||(xEnd==x&&yEnd==y+1)||(xEnd==x+1&&yEnd==y-1)||(xEnd==x+1&&yEnd==y)||(xEnd==x+1&&yEnd==y+1)){\n\t\t\tif(b.occupied(xEnd, yEnd)){\n\t\t\t\t//set the enpass flage back\n\t\t\t\tb.setFlag(color, 100, 100);\n\t\t\t\tb.recycle(xEnd, yEnd);\n\t\t\t\tthis.setPosition(xEnd, yEnd);\n\t\t\t\tb.update();\n\t\t\t\tc=0;\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\t//set the enpass flage back\n\t\t\t\tb.setFlag(color, 100, 100);\n\t\t\t\tthis.setPosition(xEnd, yEnd);\n\t\t\t\tb.update();\n\t\t\t\tc=0;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else if((xEnd==x-2&&yEnd==y)){ //castling\n\t\t\tpiece r = b.getPiece(0, y);\n\t\t\tif(r==null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(r.getC()==0||r.getColor()!=color||r.getType()!= type.ROOK||c==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor(int i=3;i>0;i--){\n\t\t\t\tif(b.occupied(i, y)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setPosition(xEnd, yEnd);\n\t\t\tr.setPosition(3,y);\n\t\t\tc=0;\n\t\t\tr.setC(0);\n\t\t\tb.setFlag(color, 100, 100);\n\t\t\tb.update();\n\t\t\treturn true;\n\t\t}else if((xEnd==x+2&&yEnd==y)){\n\t\t\tpiece r = b.getPiece(7, y);\n\t\t\tif(r==null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(r.getC()==0||r.getColor()!=color||r.getType()!= type.ROOK||c==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor(int i=5;i<=6;i++){\n\t\t\t\tif(b.occupied(i, y)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setPosition(xEnd, yEnd);\n\t\t\tr.setPosition(5,y);\n\t\t\tc=0;\n\t\t\tr.setC(0);\n\t\t\tb.setFlag(color, 100, 100);\n\t\t\tb.update();\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public abstract boolean changeMove();", "boolean checkMove(int row, int col, int dir) {\r\n\t\tint dimRow = board.getDimRow();\r\n\t\tint dimCol = board.getDimCol();\r\n\r\n\t\tif (row == 0 && dir == Ship.UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == 0 && dir == Ship.LEFT_UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == 0 && dir == Ship.RIGHT_UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == 0 && dir == Ship.LEFT) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == 0 && dir == Ship.LEFT_UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == 0 && dir == Ship.LEFT_DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == dimRow - 1 && dir == Ship.DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == dimRow - 1 && dir == Ship.LEFT_DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (row == dimRow - 1 && dir == Ship.RIGHT_DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (col == dimCol - 1 && dir == Ship.RIGHT) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == dimCol - 1 && dir == Ship.RIGHT_UP) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (col == dimCol - 1 && dir == Ship.RIGHT_DOWN) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\r\n\t}", "boolean isLegal(String move) {\n int[][] theStatusBoard;\n if (_playerOnMove == ORANGE) {\n theStatusBoard = _orangeStatusBoard;\n } else {\n theStatusBoard = _violetStatusBoard;\n }\n Pieces thispiece = new Pieces();\n String piecename = move.substring(0, 1);\n int col = getCoordinate(move.substring(1, 2));\n int row = getCoordinate(move.substring(2, 3));\n int ori = Integer.parseInt(move.substring(3, 4));\n int[][] initialPositions = thispiece.getInitialPositions(piecename);\n int[][] finalPositions = thispiece.processPositions(initialPositions, ori);\n int depth = finalPositions.length;\n int length = finalPositions[0].length;\n\n if (row + depth - 1 > 13 || col + length - 1 > 13) {\n System.out.println(\"Your move makes your piece out of the board, try again!\");\n return false;\n }\n\n boolean has1 = false;\n boolean no2 = true;\n\n int i, j;\n for (i = 0; i < depth; i++) {\n for (j = 0; j < length; j++) {\n if (finalPositions[i][j] == 1) {\n if (theStatusBoard[15 - (row + depth - i)][col + j + 1] == 1) {\n has1 = true;\n } else if (theStatusBoard[15 - (row + depth - i)][col + j + 1] == 2) {\n return false;\n }\n }\n }\n }\n System.out.println(\"has1: \" + has1);\n return has1;\n }", "private boolean validMove(int dir) {\n return !(dir == UPKEY && direction == DOWNKEY || dir == DOWNKEY && direction == UPKEY || dir == LEFTKEY && direction == RIGHTKEY || dir == RIGHTKEY && direction == LEFTKEY);\n }", "public void InvalidMove();", "boolean prepareToMove();", "public boolean isValidMove(Move move) {\n if (this.gameStarted && isSpaceFree(move) && isPlayerTurn(move)) {\n return true; \n }\n return false; \n }", "public boolean isMove(int dir){\n\t if(0> dir && dir > 3){\n\t\tSystem.out.println(\"direction is failed\");\t \n\t\treturn false;\n\t }\n\t if(dir == 0 ){\n\t\tif(0<= (this.y-1) && (this.y-1)<=5)\n\t\t return true;\n\t }else if(dir == 1){\n\t\tif(0<= (this.y+1) && (this.y+1)<=5)\n\t\t return true;\n\t }else if(dir == 2){\n\t\tif(0<= (this.x+1) && (this.x+1)<=5)\n\t\t return true;\n\t }else if(dir == 3){\n\t\tif(0<= (this.x-1) && (this.x-1)<=5)\n\t\t return true;\n\t }\n\t return false;\n\t}", "public boolean checkAndMove() {\r\n\r\n\t\tif(position == 0)\r\n\t\t\tdirection = true;\r\n\r\n\t\tguardMove();\r\n\r\n\t\tif((position == (guardRoute.length - 1)) && direction) {\r\n\t\t\tposition = 0;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(direction)\r\n\t\t\tposition++;\r\n\t\telse\r\n\t\t\tposition--;\r\n\r\n\t\treturn false;\r\n\t}", "public boolean allowMove(Point p, int pos);", "public abstract boolean canMove();", "public void checkMoveOrPass(){\n if (this.xTokens.size() > 0) {\n this.diceRoller = false;} \n else { //if no tokens to move, pass and let player roll dice\n this.turn++;\n //System.out.println(\"next turn player \" + this.players[currentPlayer].getColor());\n }\n this.currentPlayer = this.xPlayers.get(this.turn % this.xPlayers.size());\n }", "public boolean move (int x,int y, OthelloPiece colour){\n boolean valid = false;\n if(move(x,y,VALID_MOVE_3,VALID_MOVE_2,colour)) valid=true;\n if(move(x,y,VALID_MOVE_3,VALID_MOVE_3,colour)) valid=true;\n if(move(x,y,VALID_MOVE_3,VALID_MOVE_1,colour)) valid=true;\n if(move(x,y,VALID_MOVE_2,VALID_MOVE_3,colour)) valid=true;\n if(move(x,y,VALID_MOVE_2,VALID_MOVE_1,colour)) valid=true;\n if(move(x,y,VALID_MOVE_1,VALID_MOVE_2,colour)) valid=true;\n if(move(x,y,VALID_MOVE_1,VALID_MOVE_3,colour)) valid=true;\n if(move(x,y,VALID_MOVE_1,VALID_MOVE_1,colour)) valid=true;\n setThePieces();\n if(valid){\n m_PieceCount++;\n }\n return (valid);\n }", "public boolean isValidMove(CardStack stack)\n {\n return false;\n }", "boolean isMoving();", "public void movePlayer(String nomeArq, int px, int py) {\r\n if(Main.player1.Vez()) {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)){\r\n \tMain.player1.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player1.MudaLado(false,true);\r\n } \r\n pos = Main.player1.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0.1;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false) {\r\n \tMain.player1.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player1.Size()[0],Main.player1.Size()[1])==false)\r\n {\r\n \tMain.player1.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n Main.Fase.repinta(); \r\n }\r\n else {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)) {\r\n \tMain.player2.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player2.MudaLado(false,true);\r\n } \r\n pos = Main.player2.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false) {\r\n \tMain.player2.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false)\r\n {\r\n \tMain.player2.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n }\r\n }", "private boolean validateMove(Move m, int v, Graph g, Board B) {\n\n int final_dest_R = 0, final_dest_C = 0;\n\n final_dest_R = (m.getY() + (v / B.width));\n final_dest_C = (m.getX() + (v % B.width));\n\n\n if (final_dest_R < B.height && final_dest_R >= 0\n && final_dest_C < B.width && final_dest_C >= 0) {\n\n if (!B.a.get(final_dest_R).get(final_dest_C).Reachable) {\n return false;\n }\n\n return true;\n }\n\n\n return false;\n }", "public void movimentar_dragao(int pos) {\n\t\tint check = 0;\n\t\tint counter = 0; //After 1000 tries it means that the dragon is trapped and cant move either way\n\t\twhile (check == 0 && counter < 1000) {\n\t\t\tint random = 1 + (int)(Math.random()*4);\n\t\t\tif (random == 1) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'X' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()+1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 2) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()-1][dragoes[pos].getY_coord()] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setX_coord(dragoes[pos].getX_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (random == 3) {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()-1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()-1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'X' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'S' &&\n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'D' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'd' && \n\t\t\t\t\t\tlabirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()+1] != 'O') {\n\t\t\t\t\tif (labirinto.getLab()[dragoes[pos].getX_coord()][dragoes[pos].getY_coord()] == 'F')\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), 'E');\n\t\t\t\t\telse\n\t\t\t\t\t\tlabirinto.setLabCell(dragoes[pos].getX_coord(), dragoes[pos].getY_coord(), ' ');\n\t\t\t\t\tdragoes[pos].setY_coord(dragoes[pos].getY_coord()+1);\n\t\t\t\t\tcheck = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcounter++;\n\t\t}\n\t}", "public boolean isValidMove(Coordinates coordinates) {\n if (grid[coordinates.getRow()][coordinates.getColumn()].getSymbol() != 'X' &&\n grid[coordinates.getRow()][coordinates.getColumn()].getSymbol() != 'O') {\n return true;\n }\n\n return false;\n }", "boolean isLegal(Move move) {\r\n return isLegal(move.from(), move.to());\r\n }", "private boolean checkMoveBase(Pieces piece, Coordinates from, Coordinates to) {\n\t\t//seleziono una posizione senza pedina\n\t\tif ( piece == null )\n\t\t\treturn false;\n\n\t\t//se la posizione tu non è contenuta nelle soluzioni valide della pedina from\n\t\tif ( !piece.validPositions(from).contains(to) )\n\t\t\treturn false;\n\n\t\t//se la posizione di destinazione contiene una pedina dello stesso colore\n\t\treturn !( chessboard.at(to) != null && chessboard.at(to).getColour().equals(piece.getColour()));\n\t}", "boolean makeMove(Bouger m) {\n\tlong oldBits[] = { pieceBits[LIGHT], pieceBits[DARK] };\n\n\tint from, to;\n\t/*\n\t* test to see if a castle move is legal and move the rook (the king is\n\t* moved with the usual move code later)\n\t*/\n\tif ((m.bits & 2) != 0) {\n\n\tif (inCheck(side))\n\treturn false;\n\tswitch (m.getTo()) {\n\tcase 62:\n\tif (color[F1] != EMPTY || color[G1] != EMPTY\n\t|| attack(F1, xside) || attack(G1, xside))\n\treturn false;\n\tfrom = H1;\n\tto = F1;\n\tbreak;\n\tcase 58:\n\tif (color[B1] != EMPTY || color[C1] != EMPTY\n\t|| color[D1] != EMPTY || attack(C1, xside)\n\t|| attack(D1, xside))\n\treturn false;\n\tfrom = A1;\n\tto = D1;\n\tbreak;\n\tcase 6:\n\tif (color[F8] != EMPTY || color[G8] != EMPTY\n\t|| attack(F8, xside) || attack(G8, xside))\n\treturn false;\n\tfrom = H8;\n\tto = F8;\n\tbreak;\n\tcase 2:\n\tif (color[B8] != EMPTY || color[C8] != EMPTY\n\t|| color[D8] != EMPTY || attack(C8, xside)\n\t|| attack(D8, xside))\n\treturn false;\n\tfrom = A8;\n\tto = D8;\n\tbreak;\n\tdefault: /* shouldn't get here */\n\tfrom = -1;\n\tto = -1;\n\tbreak;\n\t}\n\tcolor[to] = color[from];\n\tpiece[to] = piece[from];\n\tcolor[from] = EMPTY;\n\tpiece[from] = EMPTY;\n\tpieceBits[side] ^= (1L << from) | (1L << to);\n\t}\n\t/* back up information so we can take the move back later. */\n\n\tHistoryData h = new HistoryData();\n\th.m = m;\n\tto = m.getTo();\n\tfrom = m.getFrom();\n\th.capture = piece[to];\n\th.castle = castle;\n\th.ep = ep;\n\th.fifty = fifty;\n\th.pawnBits = new long[] { pawnBits[LIGHT], pawnBits[DARK] };\n\th.pieceBits = oldBits;\n\thistDat[hply++] = h;\n\n\t/*\n\t* update the castle, en passant, and fifty-move-draw variables\n\t*/\n\tcastle &= castleMask[from] & castleMask[to];\n\tif ((m.bits & 8) != 0) {\n\tif (side == LIGHT)\n\tep = to + 8;\n\telse\n\tep = to - 8;\n\t} else\n\tep = -1;\n\tif ((m.bits & 17) != 0)\n\tfifty = 0;\n\telse\n\t++fifty;\n\n\t/* move the piece */\n\tint thePiece = piece[from];\n\tif (thePiece == KING)\n\tkingSquare[side] = to;\n\tcolor[to] = side;\n\tif ((m.bits & 32) != 0) {\n\tpiece[to] = m.promote;\n\tpieceMat[side] += pieceValue[m.promote];\n\t} else\n\tpiece[to] = thePiece;\n\tcolor[from] = EMPTY;\n\tpiece[from] = EMPTY;\n\tlong fromBits = 1L << from;\n\tlong toBits = 1L << to;\n\tpieceBits[side] ^= fromBits | toBits;\n\tif ((m.bits & 16) != 0) {\n\tpawnBits[side] ^= fromBits;\n\tif ((m.bits & 32) == 0)\n\tpawnBits[side] |= toBits;\n\t}\n\tint capture = h.capture;\n\tif (capture != EMPTY) {\n\tpieceBits[xside] ^= toBits;\n\tif (capture == PAWN)\n\tpawnBits[xside] ^= toBits;\n\telse\n\tpieceMat[xside] -= pieceValue[capture];\n\t}\n\n\t/* erase the pawn if this is an en passant move */\n\tif ((m.bits & 4) != 0) {\n\tif (side == LIGHT) {\n\tcolor[to + 8] = EMPTY;\n\tpiece[to + 8] = EMPTY;\n\tpieceBits[DARK] ^= (1L << (to + 8));\n\tpawnBits[DARK] ^= (1L << (to + 8));\n\t} else {\n\tcolor[to - 8] = EMPTY;\n\tpiece[to - 8] = EMPTY;\n\tpieceBits[LIGHT] ^= (1L << (to - 8));\n\tpawnBits[LIGHT] ^= (1L << (to - 8));\n\t}\n\t}\n\n\t/*\n\t* switch sides and test for legality (if we can capture the other guy's\n\t* king, it's an illegal position and we need to take the move back)\n\t*/\n\tside ^= 1;\n\txside ^= 1;\n\tif (inCheck(xside)) {\n\ttakeBack();\n\treturn false;\n\t}\n\treturn true;\n\t}", "private boolean validNormalMove(int newX, int newY){\n\n // checks if the new position is out of range or not and if it is then it is occupied or not\n if (!getBoard().outOfRange(newX, newY) && !getBoard().occupied(newX, newY))\n return true;\n // false if in range, occupied , but piece of the same color\n else if(!getBoard().outOfRange(newX, newY) && getBoard().occupied(newX, newY) && (getBoard().getPiece(newX, newY).getColour() == this.getColour()))\n return false ;\n\n // true if in range, occupied and in the piece of the same color\n // note that in general the Move object will be set to false but after the if statement the occupied will be set to true\n else if(!getBoard().outOfRange(newX, newY) && getBoard().occupied(newX, newY)\n && (getBoard().getPiece(newX, newY).getColour() != this.getColour()))\n return true ;\n\n else\n return false;\n }", "@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }", "public boolean isLegalStep(MoveDirection dir){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tint[] toCheckPos = new int[2];\n\t\tint[] existingPos = new int[2];\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\ttoCheckPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t} else {\n\t\t\ttoCheckPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t}\n\t\t//0 = column, 1 = row\n\t\tif(dir == MoveDirection.North) {\n\t\t\tif(toCheckPos[1] == 1) return false;\n\t\t\tif(toCheckPos[1] - 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), -1, 0);\n\t\t} else if(dir == MoveDirection.South) {\n\t\t\tif(toCheckPos[1] == 9) return false;\n\t\t\tif(toCheckPos[1] + 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 1, 0);\n\t\t} else if(dir == MoveDirection.East) {\n\t\t\tif(toCheckPos[0] == 9) return false;\n\t\t\tif(toCheckPos[0] + 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, 1);\n\t\t} else if(dir == MoveDirection.West) {\n\t\t\tif(toCheckPos[0] == 1) return false;\n\t\t\tif(toCheckPos[0] - 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, -1);\n\t\t}\n\t\t\n\t\treturn false;\r\n }", "public boolean validMove(Player player, Movement move) {\n\n if (!player.hasPieceAt(move.oldP) || player.hasPieceAt(move.newP))\n return false;\n else if (sharedBoard.isBlocked(move) && !board.board[move.oldP.x][move.oldP.y].canJump())\n return false;\n else if (!sharedBoard.isPositionEmpty(move.newP))\n move = new Capture(move);\n\n return board.board[move.oldP.x][move.oldP.y].validMove(move);\n }", "protected int getMove() \t\t\t\t{\treturn move;\t\t}", "public boolean isValidMove(Move move) {\n return (abs(move.getStart()[0] - move.getEnd()[0]) == abs(move.getEnd()[1] - move.getStart()[1]))\n ||\n (move.getStart()[0] == move.getEnd()[0] && move.getStart()[1] != move.getEnd()[1])\n || (move.getStart()[1] == move.getEnd()[1] && move.getStart()[0] != move.getEnd()[0]);\n }", "void move() {\r\n\t\tif (x + xa < 0){\r\n\t\t\txa = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (x + xa > game.getWidth() - diameter){\r\n\t\t\txa = -mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (y + ya < 0){\r\n\t\t\tya = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (y + ya > game.getHeight() - diameter){\r\n\t\t\tgame.gameOver();\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (colisionPalas()){\r\n\t\t\tya = -mov;\r\n\t\t}\r\n\t\telse if(colisionEstorbos()){\r\n\t\t\tgame.puntuacion+=2;\r\n\t\t}\r\n\t\t\r\n\t\tx = x + xa;\r\n\t\ty = y + ya;\r\n\t}", "protected boolean move(int m, boolean player)\n { int status = game.move(m, player);\n if ( status == TicGame.NOMOVE )\n return false;\n repaint();\n if ( status == TicGame.WIN_X ||\n status == TicGame.WIN_O )\n winner(); \n return true;\n }", "@Test\n public void isMoveActionLegalFor()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Agent white can move his token to an adjacent empty space.\n assertTrue(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P13));\n\n // Agent white cannot move backwards.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P05));\n\n // Agent white cannot move to an occupied space.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P04,\n CheckersPosition.P08));\n\n // Agent white cannot move a red token.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P21,\n CheckersPosition.P17));\n\n // Agent white cannot move too far.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P18));\n }", "static boolean isWellFormed(String move) {\n if (move.length() != 4) {\n return false;\n } else {\n boolean mPieces = _PIECES.indexOf(move.substring(0, 1)) != -1;\n boolean mCol = _POSITIONS.indexOf(move.substring(1, 2)) != -1;\n boolean mRow = _POSITIONS.indexOf(move.substring(2, 3)) != -1;\n boolean mOrientations = _ORIENTATIONS.indexOf(move.substring(3, 4)) != -1;\n return mPieces && mCol && mRow && mOrientations;\n }\n }", "public boolean isEqual(Move m){\r\n\t\treturn m.getStartSquare()==start_sq&&m.getEndSquare()==end_sq&&(m.getModifier()==modifiers % 10);\r\n\t}", "public boolean playerMove(Character token, int dice){\n\n\t\tPlayers player = searchBox(token, 0, 0, 0).getPlayers().get(0);\n\t\tplayer.setCurrentBox(player.getCurrentBox() + dice);\n\t\t\n\t\tif(player.getCurrentBox() == colums*rows){\n\t\t\tplayer.setMovement(player.getMovement() + 1);\n\t\t\treturn true;\n\n\t\t}else if(player.getCurrentBox() > colums*rows){\n\t\t\tint difference = colums*rows - (player.getCurrentBox() - dice);\n\t\t\tgetBoxs().get(searchPosition(player.getCurrentBox() - dice, 0)).getPlayers().remove(0);\n\t\t\tplayer.setCurrentBox(colums*rows);\n\t\t\tgetBoxs().get(colums*rows - colums).getPlayers().add(player);\n\n\t\t\tif(dice - difference == colums*rows){\n\t\t\t\treturn playerMove(token, (colums*rows - 1) * (-1));\n\n\t\t\t}else{\n\t\t\t\treturn playerMove(token, (dice - difference) * (-1));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else{\n\n\t\t\tint index = searchPosition(player.getCurrentBox(), 0);\n\t\t\tsearchBox(token, 0, 0, 0).getPlayers().remove(0);\n\t\t\tplayer.setMovement(player.getMovement() + 1);\n\n\t\t\tif(getBoxs().get(index).getTypeAction()){\n\t\t\t\tplayer.setCurrentBox(getBoxs().get(getBoxs().get(index).getSendTo()).getNumBoxInt());\n\t\t\t\tgetBoxs().get(getBoxs().get(index).getSendTo()).getPlayers().add(player);\n\t\t\t\tSystem.out.println(\"*. El jugador cayo en una casilla especial por ende su ficha queda en: \" + player.getCurrentBox());\n\t\t\t}else{\n\t\t\t\tgetBoxs().get(index).getPlayers().add(player);\n\t\t\t\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t\t\n\n\t}", "public boolean canMove() {\n\n\tArrayList<Location> moveLocs = getValid(getLocation());\n\n\tif (isEnd == true) {\n\t return false;\n\t} \n\tif (!moveLocs.isEmpty()) {\n\t \n\t randomSelect(moveLocs);\n\t // selectMoveLocation(moveLocs);\n\t return true;\n\n\t} else {\n\t return false;\n\t}\n }", "public boolean tryMove(Move m) {\n \tif(m.getSource().getColor() != turn) return false;\n \treturn m.getSource().move(m);\n }", "private boolean isLastMoveRochade()\r\n\t{\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMove == null) return false;\r\n\t\tPiece king = lastMove.to.piece;\r\n\t\tif (!(king instanceof King)) return false;\r\n\t\t\r\n\t\tint y = king.getColor().equals(Color.WHITE) ? 0 : 7;\r\n\t\tif (lastMove.to.coordinate.y != y) return false;\r\n\t\t\r\n\t\tint xDiffAbs = Math.abs(lastMove.to.coordinate.x - lastMove.from.coordinate.x); \r\n\t\treturn xDiffAbs == 2;\r\n\t}", "public int move(int player, int pos) throws Exception{\n if(player != next || player != pos>>16)\n throw new Exception(\"Wrong stone.\");\n\n int x = pos & 255;\n int y = pos>>8 & 255;\n\n if(board[x][y] == 0){\n board[x][y] = player;\n\n next = next==1?2:1;\n\n stonesNum++;\n setWinFlag(x, y);\n }else{\n throw new Exception(\"Invalid move.\");\n }\n return winFlag;\n }", "public abstract boolean canMove(Board board, Spot from, Spot to);", "private boolean validMove(int xi, int yi, int xf, int yf) {\n\t\tPiece prevP = pieceAt(xi, yi);\n\t\tPiece nextP = pieceAt(xf, yf);\n\n\t\tif (prevP.isKing()) {\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && ((yf - yi) == 1 || (yi - yf) == 1)) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (prevP.isFire()) \n\t\t{\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && (yf - yi) == 1) \n\t\t\t{\n\t\t\t\tif (nextP != null && !nextP.isFire()) \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\telse if ((xf - xi) == 2 && (yf - yi) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi+1, yi+1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse if ((xi - xf) == 2 && (yf - yi) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi-1, yi+1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else \n\t\t{\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && (yi - yf) == 1) \n\t\t\t{\n\t\t\t\tif (nextP != null && nextP.isFire()) \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\telse if ((xf - xi) == 2 && (yi - yf) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi+1, yi-1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse if ((xi - xf) == 2 && (yi - yf) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi-1, yi-1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\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\treturn false;\n\t}", "public boolean sePuedeMover(int ficha) {\r\n boolean ret = false;\r\n int sentido = 1;\r\n if (isTurnoRojo()) {\r\n sentido = -1;\r\n }\r\n int[] aux = encontrarPosicion(ficha);\r\n int fila = aux[0];\r\n int columna = aux[1];\r\n\r\n if (movimientos[ficha] && (tablero[fila + sentido][columna].getTipo().equals(\"Vacio\") || tablero[fila + sentido][columna - 1].getTipo().equals(\"Vacio\") || tablero[fila + sentido][columna + 1].getTipo().equals(\"Vacio\"))) {\r\n ret = true;\r\n }\r\n\r\n return ret;\r\n\r\n }", "public int move(int player, int p, int x, int y) throws Exception{\n if(player != next || player != p)\n throw new Exception(\"Invalid position.\");\n\n //int x = pos & 255;\n //int y = pos>>8 & 255;\n\n if(board[x][y] == 0){\n board[x][y] = player;\n next = next==1?2:1;\n stonesNum++;\n setWinFlag(x, y);\n }else{\n throw new Exception(\"Invalid move.\");\n }\n return winFlag;\n }", "private void checkMove(Tile[][] chessBoard, int pawnX, int pawnY, int direction) {\r\n\t\tUnit unit = chessBoard[pawnX][pawnY+direction].getPiece();\r\n\t\tif (unit == null) {\r\n\t\t\tMoves move = new Moves(pawnX, pawnY+direction);\r\n\t\t\tinsertMove(move, moveList);\r\n\t\t}\r\n\t}", "private boolean legalMove() {\n\n\t\t// empty landing spot\n\t\tif (tilePath.size() == 0) {\n\t\t\tdebug(\"illegal, empty landing spot\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!mBoard.tileIsEmpty(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, tile not empty\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// start doesn't equal end\n\t\tif (tilePath.get(0).equals(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, start doesn't equal end\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean move() {\n\t\tint nextDirection;\n\t\tint pacmanX = parent.getPacManX();\n\t\tint pacmanY = parent.getPacManY();\n\t\t\n\t\tint[] directionPriority = new int[4];\n\t\t/** The direction is added to the priority in order to achieve it once the move is chosen */\n\t\tdirectionPriority[0]=(pacmanX-pixelLocationX)*(10)*state+GameCharacter.RIGHT;\n\t\tdirectionPriority[1]=((pacmanX-pixelLocationX)*(-10)*state+GameCharacter.LEFT);\n\t\tdirectionPriority[2]=(pacmanY-pixelLocationY)*(10)*state+GameCharacter.DOWN;\n\t\tdirectionPriority[3]=((pacmanY-pixelLocationY)*(-10)*state+GameCharacter.UP);\n\t\tArrays.sort(directionPriority);\n\t\t\n\t\tint i=3;\n\t\t\n\t\tdo {\n\t\t\tnextDirection = directionPriority[i]%10;\n\t\t\tif (nextDirection < 0) {\n\t\t\t\tnextDirection += 10;\n\t\t\t}\n\t\t\tif(isLegalMove(nextDirection) && (Math.abs(nextDirection-currentDirection) != 2) || i==0) {\n\t\t\t\tsetDirection(nextDirection);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\t\twhile (i>=0);\n\t\treturn super.move();\n\t}", "public boolean move(Block moveTo, boolean check, String move){\r\n\t\t//Translate File and Rank to array indices\r\n\t\t\t\tint srcFile = this.getBlock().getFile();\r\n\t\t\t\tint srcRank = chess.Chess.Rmap.get(this.getBlock().getRank()+\"\");\r\n\t\t\t\tint destFile = moveTo.getFile();\r\n\t\t\t\tint destRank = chess.Chess.Rmap.get(moveTo.getRank()+\"\"); \r\n\t\t\t\t\r\n\t\t\t\tif(((Math.abs(srcRank-destRank)==1 && Math.abs(srcFile-destFile)==2) || (Math.abs(srcRank-destRank)==2 && Math.abs(srcFile-destFile)==1))){\r\n\t\t\t\t\tif(moveTo.isOccupied()){\r\n\t\t\t\t\t\tif(moveTo.getPiece().getColor().equals(chess.Chess.board[srcRank][srcFile].getPiece().getColor())==true){\r\n\t\t\t\t\t\t\tif(check == true){\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tSystem.out.println(\"Invalid move, try again\");\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//A check to see if this move puts the opponent's King in check\r\n\t\t\t\t\t\tif(check == true){\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Call deletePiece to indicate that target piece has been captured\r\n\t\t\t\t\t\tchess.Chess.board[destRank][destFile].getPiece().deletePiece(chess.Chess.board[destRank][destFile].getPiece().getNumber(), chess.Chess.board[destRank][destFile].getPiece());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tchess.Chess.board[destRank][destFile].setPiece(getBlock().getPiece());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(chess.Chess.board[destRank][destFile].getPiece().getColor().equals(\"White\"))\r\n\t\t\t\t\t\t\tchess.Chess.board[destRank][destFile].setDisplay(\"wN \");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tchess.Chess.board[destRank][destFile].setDisplay(\"bN \");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.getBlock().setOccupied(false);\r\n\t\t\t\t\t\tthis.getBlock().setPiece(null);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.getBlock().isShaded()){\r\n\t\t\t\t\t\t\tthis.getBlock().setDisplay(\"## \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tthis.getBlock().setDisplay(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.setBlock(moveTo);\r\n\t\t\t\t\t\tchess.Chess.printBoard();\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\t//A check to see if this move puts the opponent's King in check\r\n\t\t\t\t\t\tif(check == true){\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tchess.Chess.board[destRank][destFile].setPiece(getBlock().getPiece());\r\n\t\t\t\t\t\tif(chess.Chess.board[destRank][destFile].getPiece().getColor().equals(\"White\"))\r\n\t\t\t\t\t\t\tchess.Chess.board[destRank][destFile].setDisplay(\"wN \");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tchess.Chess.board[destRank][destFile].setDisplay(\"bN \");\r\n\t\t\t\t\t\tchess.Chess.board[destRank][destFile].setOccupied(true);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tthis.getBlock().setOccupied(false);\r\n\t\t\t\t\t\tthis.getBlock().setPiece(null);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(this.getBlock().isShaded()){\r\n\t\t\t\t\t\t\tthis.getBlock().setDisplay(\"## \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\tthis.getBlock().setDisplay(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.setBlock(moveTo);\r\n\t\t\t\t\t\tchess.Chess.printBoard();\r\n\t\t\t\t\t\treturn true;\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\telse{\r\n\t\t\t\t\tif(check == true){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"Invalid move, try again\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t}", "public Move move() {\n\n byte[] piece;\n int pieceIndex;\n Move.Direction direction = null;\n int counter = 0;\n\n Scanner s = new Scanner(System.in);\n\n\n System.out.println(\"Please select piece to move: \");\n\n\n while (true) {\n try {\n pieceIndex = s.nextInt();\n\n if ((piece = getPiece(pieceIndex)) == null) {\n System.out.println(\"invalid index, try again!\");\n// check if selected piece is stuck\n } else if (\n (((player == Board.V) && (piece[1]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O ) || // UP\n ((player == Board.H) && (piece[1]-1 >=0) && (board.layout[piece[0]][piece[1]-1] == O)) || // DOWN\n ((player == Board.V) && (piece[0]-1 >=0) && (board.layout[piece[0]-1][piece[1]] == O)) || // LEFT\n (((player == Board.H) && (piece[0]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O )) // RIGHT\n {\n break;\n// if all are stuck pass turn\n } else if (counter + 1 < Board.getSize()) {\n counter++;\n System.out.println(\"Piece is stuck, pick another, \" + counter + \" pieces stuck.\");\n } else {\n System.out.println(\"Passing\");\n return null;\n }\n } catch (Exception e){\n System.out.println(\"Piece index expects int, try again\");\n s = new Scanner(System.in);\n }\n }\n System.out.println(\"Please select direction ('w' // 'a' // 's' // 'd'): \");\n\n boolean valid = false;\n while (!valid) {\n\n switch (s.next().charAt(0)) {\n // if the move requested is valid, break the loop, make the move on our record of layout and return the\n // move made\n case 'w':\n direction = Move.Direction.UP;\n valid = (((player == Board.V) && (piece[1]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O );\n break;\n\n case 'a':\n direction = Move.Direction.LEFT;\n valid = ((player == Board.V) && (piece[0]-1 >=0) && (board.layout[piece[0]-1][piece[1]] == O));\n break;\n\n case 's':\n direction = Move.Direction.DOWN;\n valid = ((player == Board.H) && (piece[1]-1 >=0) && (board.layout[piece[0]][piece[1]-1] == O));\n break;\n\n case 'd':\n direction = Move.Direction.RIGHT;\n valid = (((player == Board.H) && (piece[0]+1 == Board.getSize()))) || (board.layout[piece[0]][piece[1]+1] == O );\n break;\n default:\n System.out.println(\"Invalid key press, controls are wasd\");\n valid = false;\n }\n }\n Move move = makeMove(direction, pieceIndex);\n board.update(move, player);\n\n return move;\n }", "public boolean move(int oldCol, int oldRow, int newCol, int newRow , char promo) {\r\n\r\n\r\n if(isValidMove(oldCol, oldRow, newCol, newRow)) {\r\n\r\n\r\n // not a valid move for current player for ANY piece\r\n // if current players king will be in check as a result\r\n // move is disallowed\r\n if (King.isPlayerKingInCheck(oldRow, oldCol, newRow, newCol)) {\r\n return false;\r\n }\r\n else {\r\n\r\n if (Chessboard.whitesTurn==true) {\r\n Chessboard.whiteincheck=false;\r\n }\r\n if (Chessboard.blacksTurn==true) {\r\n Chessboard.blackincheck=false;\r\n }\r\n }\r\n\r\n\r\n\r\n Chessboard.chessBoard[newRow][newCol].setPiece(Chessboard.chessBoard[oldRow][oldCol].getPiece());\r\n Chessboard.chessBoard[oldRow][oldCol].setPiece(null);\r\n Chessboard.chessBoard[newRow][newCol].getPiece().moved();\r\n\r\n if (King.isOpponentKingInCheck(newRow, newCol)){\r\n if (Chessboard.whitesTurn==true) {\r\n Chessboard.blackincheck=true;\r\n }\r\n if (Chessboard.blacksTurn==true) {\r\n Chessboard.whiteincheck=true;\r\n }\r\n }\r\n else {\r\n if (Chessboard.whitesTurn==true) {\r\n Chessboard.blackincheck=false;\r\n }\r\n if (Chessboard.blacksTurn==true) {\r\n Chessboard.whiteincheck=false;\r\n }\r\n }\r\n if(King.isOpponentKinginCheckmate(newRow, newCol)) {\r\n Chessboard.checkMate=true;\r\n }\r\n\r\n\r\n Pawn.r = -1;\r\n Pawn.c = -1;\r\n return true;\r\n }\r\n return false;\r\n }", "public abstract boolean attemptMove(Player currentPlayerObj, Coordinate move);", "public static void moveTest() {\n\t\tOthelloBoard Board = new OthelloBoard(BOARD_SIZE,BOARD_SIZE);\n\t Board.setBoard();\n\t Board.decPieceCount();\n\t System.out.println(Board.getPieceCount());\n\t System.out.println(Board.move(\n\t TEST_MOVE_X1, TEST_MOVE_Y1, Board.WHITE_PIECE));\n\t Board.m_Pieces[TEST_PIECE_X][TEST_PIECE_Y]=Board.WHITE_PIECE;\n\t System.out.println(\"\");\n\t System.out.println(\"\");\n\t\tBoard.checkWin();\n\t\tSystem.out.println(\"Valid inputs\");\n\t\tSystem.out.println(\"OthelloBoard.move() - Begin\");\n\t\tSystem.out.println(\"Expected output: false\");\n\t\tSystem.out.println(\"\");\n\t\tSystem.out.println(\"Actual output: \" + \n\t\tBoard.move(OUTPUT_MOVE_TEST_X,OUTPUT_MOVE_TEST_Y,Board.BLACK_PIECE));\n\t System.out.println(\"\");\n\t}", "public static boolean validPos(String moveTo)\n\t{\n\t\tfor(int rows = 0; rows < 8; rows++)\n\t\t{\n\t\t\tfor(int cols = 0; cols < 8; cols++)\n\t\t\t{\n\t\t\t\tif(posMap[rows][cols].equals(moveTo))\n\t\t\t\t{\t\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}", "private boolean moveIsValid(Move move){\n BoardSpace[][] boardCopy = new BoardSpace[Constants.BOARD_DIMENSIONS][Constants.BOARD_DIMENSIONS];\n for(int i = 0; i < Constants.BOARD_DIMENSIONS; i++){\n for(int j = 0; j < Constants.BOARD_DIMENSIONS; j++){\n boardCopy[i][j] = new BoardSpace(boardSpaces[i][j]);\n }\n }\n int row = move.getStartRow();\n int col = move.getStartCol();\n String ourWord = \"\";\n String currentWord = \"\";\n for (Tile tile: move.getTiles()){\n ourWord += tile.getLetter();\n if (move.isAcross()){\n col++;\n } else {\n row++;\n }\n }\n currentWord = ourWord;\n if(move.isAcross()){\n //check if we keep going right we invalidate the word\n while(col+1 < boardCopy.length && !boardCopy[row][++col].isEmpty() ){\n if( isValidWord(currentWord += boardCopy[row][col].getTile().getLetter()) == false ) return false;\n }\n //check if we keep going left we invalidate the word\n col = move.getStartCol();\n currentWord = ourWord;\n while(col-1 >= 0 && !boardCopy[row][--col].isEmpty() ){\n if(!isValidWord( currentWord = boardCopy[row][col].getTile().getLetter() + currentWord ) ) return false;\n }\n } else if(!move.isAcross()){\n row = move.getStartRow(); col = move.getStartCol();\n currentWord = ourWord;\n //check if we keep going down we invalidate the word;\n while(row+1 < boardCopy.length && !boardCopy[++row][col].isEmpty()){\n if( !isValidWord(currentWord += boardCopy[row][col].getTile().getLetter() )) return false;\n }\n row = move.getStartRow();\n currentWord = ourWord;\n while(row-1 >= 0 && !boardCopy[--row][col].isEmpty()){\n if( !isValidWord( currentWord = boardCopy[row][col].getTile().getLetter() + currentWord )) return false;\n }\n }\n return true;\n }", "private Boolean podeMover(Casa casa, Casa destino, Tabuleiro tabuleiro) {\n \n // variaveis para simplificar o codigo (Matheus)\n \n int x = destino.x;\n int y = destino.y; \n \n \n //Verifica se o destino está nas diagonais e horizontal e vertical (Matheus)\n //combinação dos movimetos do Bispo e da Torre\n \n if(casa.x == x && !this.pulouPeca(\"reta\",1, casa, destino, tabuleiro) ) {\n return true;\n }\n if(casa.y == y && !this.pulouPeca(\"reta\",2, casa, destino, tabuleiro)) {\n return true;\n }\n \n for(int i = -7; i <= 7; i++) { \n if( (casa.x + i == x && casa.y + i == y) && !this.pulouPeca(\"diagonal\",1, casa, destino, tabuleiro)){\n return true;\n }\n if( (casa.x + i == x && casa.y + (i * -1) == y) && !this.pulouPeca(\"diagonal\",2, casa, destino, tabuleiro)){\n return true;\n }\n }\n return false;\n \n \n }", "private boolean hasPossibleMove()\n {\n for(int i=0; i<FieldSize; ++i)\n {\n for(int j=1; j<FieldSize; ++j)\n {\n if(field[i][j] == field[i][j-1])\n return true;\n }\n }\n for(int j=0; j<FieldSize; ++j)\n {\n for(int i=1; i<FieldSize; ++i)\n {\n if(field[i][j] == field[i-1][j])\n return true;\n }\n }\n return false;\n }", "private boolean isPlayer1Move(int move) {\n return ((move < 5) || (move == 10));\n }", "public abstract boolean canMove(int originX, int originY, int destX, int destY);", "private String checkLegalMove(PieceType piece, Location from, Location to) {\n\t\t// Create a string to store the error message in case the move is\n\t\t// invalid.\n\t\tString errorMessage = null;\n\n\t\t// Check that none of the arguments are null.\n\t\tif (piece == null || from == null || to == null) {\n\t\t\terrorMessage = \"Arguments to the move method must not be null.\";\n\t\t\treturn errorMessage;\n\t\t}\n\n\t\t// Make sure that the game has been started first\n\t\tif (!gameStarted) {\n\t\t\terrorMessage = \"Cannot make a move before the game has started.\";\n\t\t\treturn errorMessage;\n\t\t}\n\n\t\t// Get the piece from the from location that is attempting to move.\n\t\tfinal Piece movingPiece = gameBoard.getPieceAt(from);\n\n\t\t// Check whether the move is a valid move on the board.\n\t\terrorMessage = gameBoard.checkValidMove(piece, from, to);\n\t\tif (errorMessage != null) {\n\t\t\treturn errorMessage;\n\t\t}\n\n\t\t// A piece that is not the color whose turn it is cannot move.\n\t\tif (movingPiece.getOwner() != currentTurnColor) {\n\t\t\terrorMessage = \"You cannot move when it is not you turn.\";\n\t\t\treturn errorMessage;\n\t\t}\n\n\t\treturn null;\n\t}", "boolean canMoveTo(Vector2d position);", "private boolean makeMove(Move move) {\n\n // Moving piece from Cell\n Piece sourcePiece = move.getStart().getCurrentPiece();\n\n // Valid Move? Calling Piece actual implementation\n if (!sourcePiece.canMove(board, move.getStart(), move.getEnd())) {\n System.out.println(\"Invalid Move, sourcePiece is \" + sourcePiece);\n }\n\n // Killed other player Piece?\n Piece destPiece = move.getEnd().getCurrentPiece();\n if (destPiece != null) {\n destPiece.setKilled(true);\n move.setPieceKilled(destPiece);\n }\n\n // castling?\n if (sourcePiece instanceof King\n && sourcePiece.isCastlingMove()) {\n move.setCastlingMove(true);\n }\n\n // Store the Move\n movesPlayed.add(move);\n\n // If move is VALID, set piece=null at start cell and new piece at dest cell\n move.getEnd().setCurrentPiece(sourcePiece);\n move.getStart().setCurrentPiece(null);\n\n // Game Win or not\n if (destPiece instanceof King) {\n if (move.getPlayedBy().isWhiteSide()) {\n this.setStatus(GameStatus.WHITE_WIN);\n } else {\n this.setStatus(GameStatus.BLACK_WIN);\n }\n\n }\n\n return true;\n }", "boolean checkLegalMove(int posx, int posy) {\n\t\tBoolean bool;\n\t\tint change;\n\t\tchange = curPlayer > 1 ? (change = 1) : (change = -1);\n\t\tif (kingJumping(posx, posy, change)){\n\t\t\tbool = true;\n\t\t} else if (prevPosX == posx + change && (prevPosY == posy - 1 || prevPosY == posy + 1)){\n\t\t\tSystem.out.println(\"Normal move\");\n\t\t\tbool = true;\n\t\t} else if (jump(posx, posy, prevPiece) && (prevPosX == posx + (change * 2) && (prevPosY == posy - 2 || prevPosY == posy + 2))) {\n\t\t\tbool = true;\n\t\t} else if (((JLabel)prevComp).getIcon().equals(Playboard.rKing) || ((JLabel)prevComp).getIcon().equals(Playboard.bKing) || ((JLabel)prevComp).getIcon().equals(Playboard.blackSKing) || ((JLabel)prevComp).getIcon().equals(Playboard.redSKing)){\n\t\t\tchange *= (-1);\n\t\t\tif (prevPosX == posx + change && (prevPosY == posy - 1 || prevPosY == posy + 1)){\n\t\t\t\tbool = true;\n\t\t\t} else\n\t\t\t\tbool = false;\n\t\t} else if (prevPiece == 4 && (prevPosX == posx + 1 || prevPosX == posx -1) && (prevPosY == posy - 1 || prevPosY == posy +1)) { // King moves\n\t\t\tchange *= (-1);\n\t\t\tif (prevPosX == posx + change && (prevPosY == posy - 1 || prevPosY == posy + 1))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else {\n\t\t\tbool = false;\n\t\t}\n\t\treturn bool;\n\t}", "public abstract boolean checkMoveRange(String destination);", "boolean isLegal(Move move) {\n int c = move.getCol0();\n int r = move.getRow0();\n int[] vector = move.unit();\n Piece p;\n for(int i = 0; i <= vector[2]; i++) {\n p = get(c, r);\n if (p != null && p.side() != _turn) {\n return false;\n }\n }\n return true;\n\n }", "@Override\r\n\tpublic boolean makeMove(String notation) {\n\t\tif(Castle.isCastlingMove(new ChessCoordinate(notation))) {\r\n\t\t\tKing playerKing = (King) getPlayerTurn().getPieces(\"King\", true).get(0);\r\n\t\t\t//return the result of trying to castle\r\n\t\t\treturn playerKing.move(new ChessCoordinate(notation));\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t//not a castling move, standard move\r\n\t\t\t\t\r\n\t\t\tString[] notationList = notation.split(\"\");\r\n\t\t\t//find the piece name\r\n\t\t\tString pieceName = ChessPieceNames.getPieceName(notationList[0]);\t\t\r\n\t\t\t\r\n\t\t\tif(pieceName == null && getColumnNames().contains(notationList[0].toLowerCase())) {\r\n\t\t\t\t//if first character is a column and returned null from above\r\n\t\t\t\t//must be a pawn move like e4 or axb2\r\n\t\t\t\tpieceName = ChessPieceNames.PAWN.toString();\r\n\t\t\t}else if(pieceName == null){\r\n\t\t\t\t//not a column and null so invalid move\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n//\t\t\t//capturing move if there is a capture (x)\r\n\t\t\tboolean isCaptureMove = Arrays.asList(notationList).contains(\"x\");\r\n\t\t\t\r\n\t\t\t//final coordinate\r\n\t\t\tString coordinateString = notationList[notationList.length-2] + notationList[notationList.length-1];\r\n\t\t\tChessCoordinate coordinate = new ChessCoordinate(coordinateString);\r\n\t\t\tif(coordinate.isValid()) {\r\n\t\t\t\t//extract players alive pieces of piece name\r\n\t\t\t\tList<Piece> piecesOfType = getPlayerTurn().getPieces(pieceName, true);\r\n\t\t\t\t//list of pieces that can move to the same square\r\n\t\t\t\tList<Piece> piecesCanMoveToSquare = new ArrayList<Piece>();\r\n\t\t\t\tfor (Piece piece : piecesOfType) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//use valid moves of attacking if capturing move, else use move to\r\n\t\t\t\t\tSet<Coordinate> pieceMoves = isCaptureMove \r\n\t\t\t\t\t\t\t? piece.getValidMoves(Action.ATTACK) : piece.getValidMoves(Action.MOVE_TO);\r\n\t\t\t\t\tif(pieceMoves.contains(coordinate))piecesCanMoveToSquare.add(piece);\r\n\t\t\t\t}\t\r\n\t\t\t\t\r\n\t\t\t\tif (piecesCanMoveToSquare.size() == 1) {\r\n\t\t\t\t\t//only one piece can go to that square, so take piece at 0th index as the list only has one element\r\n\t\t\t\t\tpiecesCanMoveToSquare.get(0).move(coordinate);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse if (piecesCanMoveToSquare.size() > 1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(notation.length() <= 3) {\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid move, specify which piece to move to \" + coordinateString);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//multiple pieces of the same type can move to that square, check which one to use\r\n\t\t\t\t\t//if pawn, the identifier to use is the 0th index of notationList, eg axb4. use pawn in column a.\r\n\t\t\t\t\t//for other pieces, column to use is the 1st index of notationList. eg Nab4.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//variable called identifier as it can be a row or column value.\r\n\t\t\t\t\tString identifier = (pieceName.equalsIgnoreCase(ChessPieceNames.PAWN.toString()) ?\r\n\t\t\t\t\t\t\tnotationList[0] : notationList[1]).toLowerCase();\r\n\t\t\t\t\t//identifier should be a row value if pieces share the same column\r\n\t\t\t\t\tboolean isRowIdentifier = shareColumn(piecesOfType);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(isRowIdentifier && getRowNames().contains(identifier)) {\r\n\t\t\t\t\t\t//locate piece by row and move that piece to coordinate\r\n\t\t\t\t\t\tfor (Piece piece : piecesCanMoveToSquare) {\r\n\t\t\t\t\t\t\t//look at the row number of piece coordinate, see if it matches the identifier \r\n\t\t\t\t\t\t\tif(Character.toString(piece.getPosition().toString().charAt(1)).equalsIgnoreCase(identifier)) {\r\n\t\t\t\t\t\t\t\tpiece.move(coordinate);\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"There is no \" + pieceName + \" on row \" + identifier);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else if(getColumnNames().contains(identifier)) {\r\n\t\t\t\t\t\tfor (Piece piece : piecesCanMoveToSquare) {\r\n\t\t\t\t\t\t\t//look at the column letter of piece coordinate, see if it matches the identifier \r\n\t\t\t\t\t\t\tif(Character.toString(piece.getPosition().toString().charAt(0)).equalsIgnoreCase(identifier)) {\r\n\t\t\t\t\t\t\t\tpiece.move(coordinate);\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tSystem.out.println(\"There is no \" + pieceName + \" on column \" + identifier);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//invalid identifier\r\n\t\t\t\t\telse return false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//invalid coordinate, move can not be played\r\n\t\t\telse return false;\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean isValidMove(Move move, IChessPiece[][] board) {\n\t\tif(!super.isValidMove(move, board)){\n\t\t\treturn false;\n\t\t}\n\t\tif(Math.abs(move.fromRow-move.toRow)>1 || Math.abs(move.fromColumn-move.toColumn)>1){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public void makeMove(Move m){\n int oldTurn = turn;\n turn = -turn;\n moves++;\n enPassant = -1;\n if (m.toY == 0){ // white rook space\n if (m.toX == 0){\n castles &= nWHITE_LONG;\n //castles[1] = false;\n }else if (m.toX == 7){\n castles &= nWHITE_SHORT;\n //castles[0] = false;\n }\n } else if (m.toY == 7){ // black rook space\n if (m.toX == 0){\n castles &= nBLACK_LONG;\n //castles[3] = false;\n }else if (m.toX == 7){\n castles &= nBLACK_SHORT;\n //castles[2] = false;\n }\n }\n if (m.piece == WHITE_ROOK && m.fromY == 0){\n if (m.fromX == 0){castles &= nWHITE_LONG;} //castles[1] = false;}\n else if (m.fromX == 7){castles &= nWHITE_SHORT;} //castles[0] = false;}\n } else if (m.piece == BLACK_ROOK && m.fromY == 7){\n if (m.fromX == 0){castles &= nBLACK_LONG;} //castles[3] = false;}\n else if (m.fromX == 7){castles &= nBLACK_SHORT;} //castles[2] = false;}\n }\n // castling\n if (m.piece % 6 == 0){\n if (oldTurn == WHITE){\n castles &= 0b1100;\n //castles[0] = false; castles[1] = false;\n } else {\n castles &= 0b11;\n //castles[2] = false; castles[3] = false;\n }\n if (m.toX - m.fromX == 2){ // short\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n // rook\n board[m.fromY][5] = board[m.fromY][7];\n board[m.fromY][7] = 0;\n return;\n } else if (m.toX - m.fromX == -2){ // long\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n // rook\n board[m.fromY][3] = board[m.fromY][0];\n board[m.fromY][0] = 0;\n return;\n }\n } else if (m.piece % 6 == 1) { // pawn move\n stalemateCountdown = 0; // resets on a pawn move\n // promotion\n if (m.toY % 7 == 0){\n board[m.toY][m.toX] = m.promoteTo;\n board[m.fromY][m.fromX] = 0;\n return;\n }\n // en passant\n else if (m.fromX != m.toX && board[m.toY][m.toX] == 0){\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n if (oldTurn == WHITE){\n board[4][m.toX] = 0;\n }else{\n board[3][m.toX] = 0;\n }\n return;\n } else if (m.toY - m.fromY == 2*oldTurn){\n enPassant = m.fromX;\n }\n }\n // regular\n if (board[m.toY][m.toX] != 0){\n stalemateCountdown = 0; // resets on a capture\n }\n board[m.fromY][m.fromX] = 0;\n board[m.toY][m.toX] = m.piece;\n }", "boolean canMove(Tile t);" ]
[ "0.7316608", "0.69565743", "0.691763", "0.6858309", "0.67967373", "0.67932904", "0.67783296", "0.6697894", "0.666863", "0.6608289", "0.6601761", "0.6579875", "0.6567024", "0.6564042", "0.65566283", "0.6532911", "0.6517526", "0.6517492", "0.65078056", "0.65071553", "0.65070206", "0.64980495", "0.6470607", "0.6465043", "0.6460539", "0.64391285", "0.6436063", "0.64312065", "0.64302385", "0.6429154", "0.6422351", "0.6396997", "0.6390408", "0.63833654", "0.6377417", "0.63469225", "0.6341447", "0.63281804", "0.63275063", "0.6316581", "0.62975645", "0.6295662", "0.62919724", "0.62680215", "0.62663084", "0.6263458", "0.6256351", "0.62401295", "0.6229038", "0.6227642", "0.62225777", "0.62138486", "0.62090826", "0.6203068", "0.6189785", "0.6187477", "0.61865747", "0.61854875", "0.6183657", "0.6179415", "0.6176971", "0.6164795", "0.61647344", "0.61434966", "0.61363435", "0.61330414", "0.6130277", "0.61246914", "0.61183584", "0.611708", "0.6114427", "0.6113747", "0.6112864", "0.6109489", "0.6108712", "0.6107961", "0.6107142", "0.6100889", "0.60966104", "0.60960186", "0.60917187", "0.6070116", "0.60674375", "0.60553116", "0.60525656", "0.6050602", "0.6048011", "0.6047183", "0.604147", "0.6040426", "0.6035568", "0.60302174", "0.6029833", "0.60283744", "0.6024534", "0.6024458", "0.60228753", "0.6021755", "0.60205024", "0.6015533" ]
0.6335367
37
Ritorna il colore del giocatore vincitore.
public Colour getWinner(){ return winner; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "public String getCVCTG_CODIGO(){\n\t\treturn this.myCvctg_codigo;\n\t}", "private void suono(int idGioc) {\n\t\tpartita.effettoCasella(idGioc);\n\t}", "public int getCiclo() { return this.ciclo; }", "public Cgg_veh_categoria(\n\t\tString inCvctg_codigo,\n\t\tString inCgg_cvctg_codigo,\n\t\tString inCvctg_nombre,\n\t\tString inCvctg_observacion,\n\t\tboolean inCvctg_estado,\n\t\tString inCvctg_usuario_insert,\n\t\tString inCvctg_usuario_update\n\t){\n\t\tthis.setCVCTG_CODIGO(inCvctg_codigo);\n\t\tthis.setCGG_CVCTG_CODIGO(inCgg_cvctg_codigo);\n\t\tthis.setCVCTG_NOMBRE(inCvctg_nombre);\n\t\tthis.setCVCTG_OBSERVACION(inCvctg_observacion);\n\t\tthis.setCVCTG_ESTADO(inCvctg_estado);\n\t\tthis.setCVCTG_USUARIO_INSERT(inCvctg_usuario_insert);\n\t\tthis.setCVCTG_USUARIO_UPDATE(inCvctg_usuario_update);\n\t}", "public void daiGioco() {\n System.out.println(\"Scrivere 1 per giocare al PC, al costo di 200 Tam\\nSeleziona 2 per a Calcio, al costo di 100 Tam\\nSeleziona 3 per Disegnare, al costo di 50 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiFelicita += 60;\n puntiVita -= 30;\n soldiTam -= 200;\n }\n case 2 -> {\n puntiFelicita += 40;\n puntiVita -= 20;\n soldiTam -= 100;\n }\n case 3 -> {\n puntiFelicita += 30;\n puntiVita -= 10;\n soldiTam -= 50;\n }\n }\n checkStato();\n }", "public String getVigencia() { return this.vigencia; }", "public int getCoeficienteBernua()\n {\n return potenciaCV;\n }", "public Vencimientos() {\n initComponents();\n \n \n }", "public void setCVCTG_CODIGO(String inCvctg_codigo){\n\t\tthis.myCvctg_codigo = inCvctg_codigo;\n\t}", "private void iniciarNovaVez() {\n this.terminouVez = false;\n }", "public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }", "@Override\n public Boolean colisionoCon(Grafico gr) {\n return true;\n }", "@Override\n public Boolean colisionoCon(MV gr) {\n return true;\n }", "public String getCVCTG_NOMBRE(){\n\t\treturn this.myCvctg_nombre;\n\t}", "@Override\r\n\tpublic void updateCV() {\n\r\n\t}", "public ConversorVelocidad() {\n //setTemperaturaConvertida(0);\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 String getCvv() {\n return cvv;\n }", "public Fogon (String cocineroActual){\n Cocinero = cocineroActual;\n grados = 0; \n }", "public String getCGG_CVCTG_CODIGO(){\n\t\treturn this.myCgg_cvctg_codigo;\n\t}", "public GraficaVentas() {\n initComponents();\n categoriaMasVendidapanel.setVisible(false);\n marcaMasVendidapanel.setVisible(false);\n }", "public void setVigencia(String vigencia) { this.vigencia = vigencia; }", "public float getVcurs() {\n return vcurs;\n }", "public int getValeurCourante() {\n\t\treturn this.valC;\n\t}", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "public boolean Vacia (){\n return cima==-1;\n \n }", "protected PersonajeGrafico(int v, int x, int y){\r\n\t\tthis.velocidad=v;\r\n\t\tpos = new Point(ancho * x, alto * y);\r\n\t\tsprites = new Vector<Vector<Icon>>();\r\n\t\t\t\t\r\n\t}", "public Cotisant visite(Contributeur c){ \n int somme = this.state.get(c); \n c.affecterSolde(somme); \n return c ; \n }", "public Image getCorazon ( ) {\n\t\tswitch ( vida ) {\n\t\tcase 0 :\n\t\t\treturn sinVida;\n\t\tcase 1:\n\t\t\treturn cuartoDeVida;\n\t\tcase 2:\n\t\t\treturn mitadVida;\n\t\tcase 3:\n\t\t\treturn tresCuartos;\n\t\tcase 4:\n\t\t\treturn fullVida;\n\t\tdefault:\n\t\t\treturn sinVida;\n\t\t}\n\t}", "@Override\n public Boolean colisionoCon(Policia gr) {\n return true;\n }", "public Cerchio(double raggio){\n this.raggio = raggio;\n }", "public JComboBox getJComboBoxProvincia()\r\n {\r\n \tif (jComboBoxProvincia == null) {\r\n\t\t\tEdicionOperations oper = new EdicionOperations();\r\n\t\t\tArrayList<Provincia> listaProvincias = oper.obtenerProvinciasConNombre();\r\n\t\t\tjComboBoxProvincia = new JComboBox(listaProvincias.toArray());\r\n\t\t\tjComboBoxProvincia\r\n\t\t\t\t\t.setSelectedIndex(this\r\n\t\t\t\t\t\t\t.provinciaIndexSeleccionar(ConstantesLocalGISEIEL.idProvincia));\r\n\t\t\tjComboBoxProvincia.setRenderer(new UbicacionListCellRenderer());\r\n\t\t\tjComboBoxProvincia.addActionListener(new ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tif (getJComboBoxMunicipio() != null) {\r\n\t\t\t\t\t\tif (jComboBoxProvincia.getSelectedIndex() == 0) {\r\n\t\t\t\t\t\t\tjComboBoxMunicipio.removeAllItems();\r\n\t\t\t\t\t\t\tMunicipio municipio = new Municipio();\r\n\t\t\t\t\t\t\tmunicipio.setIdIne(\"\");\r\n\t\t\t\t\t\t\tmunicipio.setNombreOficial(\"\");\r\n\t\t\t\t\t\t\tjComboBoxMunicipio.addItem(municipio);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tEdicionOperations oper = new EdicionOperations();\r\n\t\t\t\t\t\t\tjComboBoxProvincia\r\n\t\t\t\t\t\t\t\t\t.setSelectedIndex(provinciaIndexSeleccionar(ConstantesLocalGISEIEL.idProvincia));\r\n\r\n\t\t\t\t\t\t\tif (jComboBoxProvincia.getSelectedItem() != null) {\r\n\t\t\t\t\t\t\t\tEdicionUtils.cargarLista(\r\n\t\t\t\t\t\t\t\t\t\tgetJComboBoxMunicipio(),\r\n\t\t\t\t\t\t\t\t\t\toper.obtenerTodosMunicipios(((Provincia) jComboBoxProvincia\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getSelectedItem())\r\n\t\t\t\t\t\t\t\t\t\t\t\t.getIdProvincia()));\r\n\t\t\t\t\t\t\t\tjComboBoxMunicipio\r\n\t\t\t\t\t\t\t\t\t\t.setSelectedIndex(municipioIndexSeleccionar(ConstantesLocalGISEIEL.idMunicipio));\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\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t\treturn jComboBoxProvincia;\r\n }", "private void controladorNuevoColectivo(Controlador controlador){\n this.contNuevoColectivo = controlador.getNuevoColectivo();\n nuevoColectivo.setControlCreateCollective(contNuevoColectivo);\n }", "public void setCVCTG_NOMBRE(String inCvctg_nombre){\n\t\tthis.myCvctg_nombre = inCvctg_nombre;\n\t}", "public void statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "public Giocatore(String nome, Casella c, Pedina p) {\r\n\t\tsetNome(nome);\r\n\t\tsetPedina(p);\r\n\t\tcasella = c;\r\n\t\tdado = new Dado();\r\n\t\t\r\n\t\tpunt_carta = punteggioIniziale;\r\n\t\tpunt_plastica = punteggioIniziale;\r\n\t\tpunt_vetro = punteggioIniziale;\r\n\t\tpunt_metallo = punteggioIniziale;\r\n\t\tpunt_indifferenziata = punteggioIniziale;\r\n\t\tpunt_organica = punteggioIniziale;\r\n\t}", "private Igralec cigavaVrsta(Vrsta vrsta) {\n int count_BELO = 0;\n int count_CRNO = 0;\n for (int k = 0; k < M && (count_BELO == 0 || count_CRNO == 0); k++) {\n switch (plosca[vrsta.x[k]][vrsta.y[k]]) {\n case BELO:\n count_BELO += 1;\n break;\n case CRNO:\n count_CRNO += 1;\n break;\n case PRAZNO:\n break;\n }\n }\n if (count_BELO == M) {\n return Igralec.BEL;\n } else if (count_CRNO == M) {\n return Igralec.CRN;\n } else {\n return null;\n }\n }", "private void cargarProvincias() {\n ArrayList<Provincia> provincias = new ArrayList<>();\n try {\n provincias = new Provincia().listarProvincias();\n if (!provincias.isEmpty()) {\n for (int i = 0; i < provincias.size(); i++) {\n ProvinciasjComboBox.addItem(provincias.get(i).getNombreProvincia());\n }\n } else {\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al cargar las provincias\");\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public static void proveraServisa() {\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje racunate vreme sledeceg servisa:\");\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tUtillMethod.proveraServisaVozila(Main.getVozilaAll().get(redniBroj));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}", "protected String usaVociCorrelate() {\n StringBuilder testo = new StringBuilder(VUOTA);\n String titolo = \"Voci correlate\";\n List<String> lista = listaCorrelate == null ? listaVociCorrelate() : listaCorrelate;\n String tag = \"*\";\n\n if (array.isValid(lista)) {\n testo.append(LibWiki.setParagrafo(titolo));\n testo.append(A_CAPO);\n for (String riga : lista) {\n testo.append(tag);\n testo.append(LibWiki.setQuadre(riga));\n testo.append(A_CAPO);\n }// end of for cycle\n testo.append(A_CAPO);\n }// end of if cycle\n\n return testo.toString();\n }", "public void riconnetti() {\n\t\tconnesso = true;\n\t}", "public CouleurFeu suivant() {\r\n // on choisit ici un algo très basique (je l'avais d'abord fait\r\n // en utisant la liste des valeurs, mais ça n'est pas très lisible.\r\n switch (this) {\r\n case VERT:\r\n return ORANGE;\r\n case ORANGE:\r\n return ROUGE;\r\n case ROUGE:\r\n return VERT;\r\n default:\r\n throw new RuntimeException(\"couleur inconnue ?? (impossible normalement)\");\r\n }\r\n }", "public void gagne()\r\n\t{\r\n\t\tthis.nbVictoires++;\r\n\t}", "public void setCGG_CVCTG_CODIGO(String inCgg_cvctg_codigo){\n\t\tthis.myCgg_cvctg_codigo = inCgg_cvctg_codigo;\n\t}", "public void vincular() {\n\n\t\ttry {\n\t\t\tList<Veiculo> veiculos = Deserializador.deserializar(\"conteudo/veiculos\", Veiculo.class);\n\t\t\tList<Motorista> motoristas = Deserializador.deserializar(\"conteudo/motoristas\", Motorista.class);\n\n\t\t\tScanner entrada = new Scanner(System.in);\n\t\t\tMotorista motorista = null;\n\t\t\tVeiculo veiculo = null;\n\t\t\tSystem.out.println(\"Digite o numero da CNH do motorista que deseja vincular.\");\n\t\t\tint cnh = entrada.nextInt();\n\t\t\tif (motoristas != null) {\n\t\t\t\tif (veiculos != null) {\n\t\t\t\t\tfor (Motorista motor : motoristas) {\n\t\t\t\t\t\tif (cnh == motor.getNumero_Carteira()) {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista encontrado: \" + motor.getNome());\n\t\t\t\t\t\t\tmotorista = motor;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (motorista == null) {\n\t\t\t\t\t\tSystem.out.println(\"Motorista nao encontrado!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (motorista.getVeiculo() == null) {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista selecionado com sucesso.\");\n\n\t\t\t\t\t\t\tSystem.out.println(\"Digite a placa do veiculo que deseja vincular ao motorista \"\n\t\t\t\t\t\t\t\t\t+ motorista.getNome());\n\t\t\t\t\t\t\tString placa = entrada.next();\n\t\t\t\t\t\t\tfor (Veiculo veic : veiculos) {\n\t\t\t\t\t\t\t\tif (veic.getPlaca().equals(placa)) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Veiculo encontrado.\");\n\t\t\t\t\t\t\t\t\tveiculo = veic;\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}\n\t\t\t\t\t\t\tif (veiculo == null) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veiculo nao encontrado!\");\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// RN004\n\t\t\t\t\t\t\t\tif (veiculo.getMotorista() == null) {\n\t\t\t\t\t\t\t\t\t// RN001\n\t\t\t\t\t\t\t\t\tif (Character.toLowerCase(motorista.getCategoria_Habilitacao()) == 'c') {\n\t\t\t\t\t\t\t\t\t\tveiculo.setMotorista(motorista);\n\t\t\t\t\t\t\t\t\t\tmotorista.setVeiculo(veiculo);\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Motorista registrado com sucesso.\");\n\n\t\t\t\t\t\t\t\t\t} else if (veiculo.getCarga() == 1\n\t\t\t\t\t\t\t\t\t\t\t&& Character.toLowerCase(motorista.getCategoria_Habilitacao()) == 'b') {\n\t\t\t\t\t\t\t\t\t\tveiculo.setMotorista(motorista);\n\t\t\t\t\t\t\t\t\t\tmotorista.setVeiculo(veiculo);\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Motorista registrado com sucesso.\");\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"Tipo da CNH do motorista invalida.\");\n\t\t\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\tSystem.out.println(\"O veiculo desejado ja esta vinculado a um motorista.\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista ja esta vinculado a um veiculo.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"A lista de veiculos esta vazia.\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"A lista de motoristas esta vazia.\");\n\t\t\t}\n\n\t\t\tSerializador s = new Serializador();\n\t\t\ts.serializar(\"conteudo/motoristas\", motoristas);\n\t\t\ts.serializar(\"conteudo/veiculos\", veiculos);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.err.println(\"Falha ao serializar ou deserializar! - \" + ex.toString());\n\t\t}\n\t}", "@Test\n\tpublic void usuarioSobreLaLineaDeBordeDeCoberturaDelCGP(){\n\t\tPOI cgp = new CGP(\"cgp\", posicionUno, direccion, vertices);\n\t\tAssert.assertTrue(cgp.estaCercaDe(posicionUsuario));\n\t}", "private void soigne(EtreVivant vivants) {\n setVirus(Virus.Rien);\n this.changeEtat(EtatEtreVivant.SAIN);\n }", "Videogioco findVideogiocoById(int id);", "@Override\n public Boolean colisionoCon(BOrigen gr) {\n return true;\n }", "public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }", "public CtrlEditGrupos() {\n edEsc = EditEscenario.getInstance();\n try {\n cd = CtrlDomain.getInstance();\n } catch (Exception e) {\n System.out.println(\"ERROR EN LA CARGA DEL CONTROLADOR DE DOMINIO\");\n }\n planEstudiosFinal = edEsc.getPlanEstudiosFinal();\n asignaturasFinal = edEsc.getAsignaturasFinal();\n restriccionesFinal = edEsc.getRestriccionesFinal();\n }", "public int cima(){\n return VectorPila[cima];\n }", "@Override\r\n\tpublic void chocarOvos() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void chocarOvos() {\n\t\t\r\n\t}", "@Override // Métodos que fazem a anulação\n\tpublic void vota() {\n\t\t\n\t}", "public void somaVezes(){\n qtVezes++;\n }", "private ISciIntInstituicaoCooperativa obterInstituicaoCooperativaSCI(Integer idInstituicao) throws IntegracaoInstituicaoException {\n\t\tISciIntInstituicaoCooperativa instituicaoCooperativa = null;\n\t\ttry{\n\t\t\tSciIntInstituicaoCooperativaDelegate instituicaoCooperativaDelegate = SciIntFabricaDelegate.getInstance().criarInstituicaoCooperativaDelegate();\n\t\t\tinstituicaoCooperativa = instituicaoCooperativaDelegate.obterInstituicaoCooperativaCache(idInstituicao);\n\t\t}catch (BancoobException e) {\n\t\t\tthis.getLogger().erro(e, e.getMessage());\n\t\t\tthrow new IntegracaoInstituicaoException(e);\n\t\t}\n\t\n\t\treturn instituicaoCooperativa;\n\t}", "@Override\n\tpublic void coba() {\n\t\t\n\t}", "public Jogador getVencedor() {\r\n return vencedor;\r\n }", "@Override\n\tpublic void verVehiculosDisponibles() {\n\t\tif(getCapacidad() > 0) {\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 1 \" + \" Carro disponible, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Plazas disponibles : \" + getCapacidad() + \" plazas, peso disponible : \" + getPeso() + \" kg, Carros disponibles: \" + \" 0 \" + \" Carro disponibles, Capacidad de Personas : 4 personas, Peso maximo : 500 kg\");\n\t\t}\n\t\t\n\t}", "private void loadVaccination() {\n String s = \"\";\n service.getVacDefaults(vacDefaults, patient, getVaccineID());\n \n if (PCC.errorCheck(vacDefaults)) {\n onClick$btnCancel();\n }\n \n if (immunItem == null && !getVacContraindications().isEmpty()) {\n if (!PromptDialog\n .confirm(\n \"The patient has the following contraindications\" + \" for \" + txtVaccine.getText() + \" of: \"\n + StrUtil.CRLF + getVacContraindications() + \"Do you wish to continue?\",\n \"ALERT: Contraindications Exist\")) {\n onClick$btnCancel();\n }\n }\n \n spnVolume.setText(getVacDefaults(VacDefault.VOLUME));\n datVIS.setValue(VistAUtil.parseDate(getVacDefaults(VacDefault.VISDATE)));\n ListUtil.selectComboboxData(cboLot, getVacDefaults(VacDefault.LOT));\n displayWarning();\n \n s = txtVaccine.getText().toUpperCase();\n if (StringUtils.indexOf(s, \" ORAL\") > -1 || (StringUtils.startsWith(s, \"OPV\"))) {\n selectItem(cboSite, \"ORAL\");\n } else {\n if (StringUtils.indexOf(s, \" INTRANASAL\") > -1) {\n selectItem(cboSite, \"INTRANASAL\");\n }\n }\n \n cboLot.setFocus(true);\n \n }", "public void CobroCiatCasaCiat() throws GWorkException {\r\n\t\tListarVehiculosCiatCasaCiat();\r\n\t}", "public static Conic newConic(Orbitable focus, WorldVector r, WorldVector v, double t, SpaceGrid sg) {\n\n r = r.subtract(focus.worldPosition(sg.getTime()));\n double rAngle = Vector2.normalizeAngle(r.angle());\n //System.out.println(\"Measured angle: \" + r.angle()); \n double rm = r.magnitude();\n double vm = v.magnitude();\n\n double mu = focus.mass() * Constants.G;\n //System.out.println(\"mu: \"+mu);\n\n Vector3 h = r.cross(v);\n double hm = h.magnitude();\n double signum = Math.signum(h.z);\n double energy = vm * vm / 2 - mu / rm;\n\n WorldVector e = r.scale(vm * vm / mu - 1 / rm).subtract(v.scale(r.dot(v) / mu));\n //System.out.println(\"evec \" + e);\n double em = e.magnitude();\n\n if (!Double.isFinite(em)) {\n System.out.println(\"Invalid eccentricity from state vectors: \" + em);\n System.out.println(\" r: \" + r);\n System.out.println(\" v: \" + v);\n return null;\n }\n\n double p;\n\n if (Math.abs(em - 1.0) > 0.001) {\n double a = -mu / (2 * energy);\n //System.out.println(\"a: \"+a);\n p = a * (1 - em * em);\n } else {\n p = hm * hm / mu;\n }\n\n double rotation = Vector2.normalizeAngle(Math.atan2(e.y, e.x));\n double theta = Vector2.normalizeAngle(rAngle - rotation);\n\n Conic c = newConic(focus, p, em, theta, signum, rotation, sg);\n\n return c;\n }", "private void accederpro() {\n\t\tVprosesor prof= new Vprosesor ();\n\t\t\n\t\tControladorprofesor b = new Controladorprofesor(prof);\n\t\tprof.setControladorprofesor(b);\n\t\tprof.setVisible(true);\n\t\tvb.dispose();\n\t\t\n\t}", "public vistaVentas() {\n initComponents();\n URL url = getClass().getResource(\"/imagenes/logoCarisma.jpg\");\n ImageIcon img = new ImageIcon(url);\n setIconImage(img.getImage());\n llenardescuento();\n }", "public double getCustoAluguel(){\n return 2 * cilindradas;\n }", "public void rodar(){\n\t\tmeuConjuntoDePneus.rodar();\r\n\t}", "private static void gioca(DBManager database)\n\t\t\tthrows ClassNotFoundException, SQLException {\n\n\t\tif (players.size() < MIN_PLAYERS) {\n\t\t\tSystem.out\n\t\t\t\t\t.printf(\"Attualmente ci sono %d giocatori.\\nCi devono essere almeno 2 giocatori per giocare!\\n\",\n\t\t\t\t\t\t\tplayers.size());\n\t\t}\n\t\telse {\n\t\t\tCollections.shuffle(players);\n\t\t\tPartita parta = new Partita(database, players);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tfor(Giocatore p : players){\n\t\t\t\tBanca.prelievo(p, CAPITALE_INIZIALE);\n\t\t\t\t\n\t\t\t}\n\n\t\t\tint turno = 0;\n\t\t\twhile (turno < NUMERO_TURNI * players.size() && players.size()>1) {\n\t\t\t\tif (turno %players.size() == 0)\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.printf(\"Turno %d\\n\", ((turno + 1)/players.size())+1);\n\n\t\t\t\ttry{\n\t\t\t\t\tparta.turno();\n\t\t\t\t}catch (FallimentoException e){\n\t\t\t\t\t\n\t\t\t\t\tplayers.remove(e.getGiocatore());\n\t\t\t\t\tparta.rimuoviGiocatore(e.getGiocatore());\n\t\t\t\t}\n\t\t\t\tturno += 1;\n\t\t\t\ttry{\n\t\t\t\t\tSystem.in.read();\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tproclamaVincitore();\n\t}", "public Vertice getvInicial() {\r\n return vInicial;\r\n }", "public VPacientes() {\n initComponents();\n inicializar();\n }", "public boolean getCVCTG_ESTADO(){\n\t\treturn this.myCvctg_estado;\n\t}", "public IfrViagem() {\n initComponents();\n v = new Viagem();\n criarViagem();\n\n Formatacao.formatarData(ftfDataSaida);\n Formatacao.formatarHora(ftfHoraSaida);\n Formatacao.formatarData(ftfDataRetorno);\n Formatacao.formatarHora(ftfHoraRetorno);\n Formatacao.formatarReal(ftfValorViagem);\n\n }", "private void juego(){\r\n boolean ind=false,ind2=true;\r\n System.out.println(\"Comencemos\");\r\n initReloj();\r\n System.out.println(\"Cada Carta esta\");\r\n while(ind==false && this.ind==true){\r\n visualizarm();\r\n usuario();\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n if(comprobar()==true){\r\n ind=true;\r\n this.ind=true;\r\n }\r\n }\r\n if(this.ind==true){\r\n ResultadoR res = new ResultadoR();\r\n res.resultado(\"Jugador Gana\",pj);\r\n }\r\n else{\r\n ResultadoR res= new ResultadoR();\r\n res.resultado(\"Jugador Pierde\", pj);\r\n }\r\n }", "public void setVcurs(float value) {\n this.vcurs = value;\n }", "public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}", "public boolean foiChecado(Vertice v){\n int i = v.label;\n return vertices[i];\n }", "public void ovr() {\n\n\t}", "private void drawCuadrado(Graphics g)\r\n {\r\n for(int i=0; i< c.size(); i++)\r\n {\r\n Cuadrado tmp = c.get(i);\r\n g.drawRect( tmp.getX(), tmp.getY() , tmp.getW(), tmp.getH() ); \r\n }\r\n }", "public CadastroLivro() {\n dv.passaCamposComEnter(this);\n initComponents();\n }", "public static void testVecteur(){\n\t\tVecteur u = new Vecteur(1,0);\n\t\tSystem.out.println(u);\n\t\tu = u.rotation(Math.PI/2);\n\t\tSystem.out.println(u);\n\t\tu = u.rotation(Math.PI/2);\n\t\tSystem.out.println(u);\n\t\t\n\t}", "public void setCvr(String cvr) {\n this.cvr = cvr;\n }", "public Cobra()\r\n {\r\n super();\r\n corpo = new ArrayList<CorpoCobra>();\r\n\r\n porCrescer = 0;\r\n ovosComidos = 0;\r\n vidas = 3;\r\n tonta = 0;\r\n }", "public String getCROSG_CODIGO(){\n\t\treturn this.myCrosg_codigo;\n\t}", "public void cargarEConcepto() {\n\tevidenciaConcepto = true;\n\tif (conceptoSeleccionado.getOrigen().equals(\n\t OrigenInformacionEnum.CONVENIOS.getValor())) {\n\t idEvidencia = convenioVigenteDTO.getId();\n\t nombreFichero = iesDTO.getCodigo() + \"_\"\n\t\t + convenioVigenteDTO.getId();\n\t}\n\n\ttry {\n\t listaEvidenciaConcepto = institutosServicio\n\t\t .obtenerEvidenciasDeIesPorIdConceptoEIdTabla(\n\t\t iesDTO.getId(), conceptoSeleccionado.getId(),\n\t\t idEvidencia, conceptoSeleccionado.getOrigen());\n\n\t} catch (ServicioException e) {\n\t LOG.log(Level.SEVERE, e.getMessage(), e);\n\t}\n }", "public void prenderVehiculo();", "public static Pot oceni_rdec(Igra igra) {\n\t\tTocka[][] plosca = igra.getPlosca();\n\t\tint N = Igra.N;\n\t\t\n\t\t// Najbolsa pot za rdecega.\n\t\tSet<Vrednost> rdeca_pot = new HashSet<Vrednost>();\n\t\t// Tabela za dinamicno iskanje najkrajse poti, elementi so objetki razreda Vrednosti.\n\t\tVrednost[][] tabela_dolzin_rdeci = new Vrednost[N][N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\ttabela_dolzin_rdeci[i][j] = new Vrednost(new Koordinati(j, i));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 1. vrstico, napolnimo rocno.\n\t\tfor (int j = 0; j < N; j++) {\n\t\t\tif (plosca[0][j].polje == Polje.Rdec) tabela_dolzin_rdeci[0][j].vrednost = 0;\n\t\t\tif (plosca[0][j].polje == Polje.PRAZNO) tabela_dolzin_rdeci[0][j].vrednost = 1;\n\t\t}\n\t\t\n\t\t// Ostalo pa dinamicno.\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\n\t\t\t\t// definiramo polja, ki nas zanimajo\n\t\t\t\tint levo_levo_zg;\n\t\t\t\tint levo_zg;\n\t\t\t\tint desno_desno_zg;\n\t\t\t\tint desno_zg;\n\t\t\t\tint zgoraj;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Dolocimo vrednosti polj, ki nas zanimajo, tu so nekatera polja od nasega oddaljena za dve polji,\n\t\t\t\t// to je glavna skrivnost argumenta, saj ce nam nasprotnik ne more prepreciti povezave dveh polj, ki nista\n\t\t\t\t// takojsnji sosedi ju smatramo kot ze povezani (tu pridejo v igro objekti razreda Skok).\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i][j - 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tlevo_levo_zg = tabela_dolzin_rdeci[i - 1][j - 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse levo_levo_zg = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { levo_levo_zg = POLNO; }\n\t\t\t\t\n\t\t\t\ttry { levo_zg = tabela_dolzin_rdeci[i - 1][j].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { levo_zg = POLNO; }\n\t\t\t\ttry { desno_zg = tabela_dolzin_rdeci[i - 1][j + 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { desno_zg = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i][j + 1].polje == Polje.PRAZNO && plosca[i - 1][j + 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tdesno_desno_zg = tabela_dolzin_rdeci[i - 1][j + 2].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse desno_desno_zg = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { desno_desno_zg = POLNO; }\n\t\t\t\ttry {\n\t\t\t\t\tif (plosca[i - 1][j].polje == Polje.PRAZNO && plosca[i - 1][j + 1].polje == Polje.PRAZNO) {\n\t\t\t\t\t\tzgoraj = tabela_dolzin_rdeci[i - 2][j + 1].vrednost;\n\t\t\t\t\t}\n\t\t\t\t\telse zgoraj = POLNO;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e) { zgoraj = POLNO; }\n\t\t\t\t\n\t\t\t\t// Preverimo, katero polje je najboljse (cez katerega bomo najhitreje povezali obe strani).\n\t\t\t\tVrednost pointer = null;\n\t\t\t\tSkok skok = null;\n\t\t\t\tint vrednost_polja;\n\t\t\t\tvrednost_polja = Math.min(levo_levo_zg, Math.min(levo_zg, Math.min(desno_zg, Math.min(desno_desno_zg, zgoraj))));\n\t\t\t\t\n\t\t\t\t// Ce to polje ni v neposredni blizini, v tabelo shranimo ustrezen Skok, da vemo, da tu se nimamo povezave,\n\t\t\t\t// a nas nasprotnik ne more zapreti.\n\t\t\t\tif (vrednost_polja != POLNO) {\n\t\t\t\t\tif (vrednost_polja == levo_levo_zg) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 1][j - 1];\n\t\t\t\t\t\tskok = Skok.Skok1;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == levo_zg) pointer = tabela_dolzin_rdeci[i - 1][j];\n\t\t\t\t\tif (vrednost_polja == desno_desno_zg) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 1][j + 2];\n\t\t\t\t\t\tskok = Skok.Skok3;\n\t\t\t\t\t}\n\t\t\t\t\tif (vrednost_polja == desno_zg) pointer = tabela_dolzin_rdeci[i - 1][j + 1];\n\t\t\t\t\tif (vrednost_polja == zgoraj) {\n\t\t\t\t\t\tpointer = tabela_dolzin_rdeci[i - 2][j + 1];\n\t\t\t\t\t\tskok = Skok.Skok2;\n\t\t\t\t\t}\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja += 1;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Moder) vrednost_polja = POLNO;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_rdeci[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_rdeci[i][j].pointer = pointer;\n\t\t\t\ttabela_dolzin_rdeci[i][j].skok = skok;\n\t\t\t}\n\t\t\t\n\t\t\t// Ponovni pregled. Prej smo gledali le polja nad nasim poljem, sedaj pa pogledamo se oba soseda v \n\t\t\t// smeri, ki ni neposredno smer napredovanja. Vse naredimo enako kot zgoraj, le da sedaj nimamo Skokov.\n\t\t\tfor (int j = 0; j < N; j++) {\n\t\t\t\tint levo;\n\t\t\t\tint desno;\n\t\t\t\tint vrednost_polja = tabela_dolzin_rdeci[i][j].vrednost;\n\t\t\t\tVrednost pointer = tabela_dolzin_rdeci[i][j].pointer;\n\t\t\t\tSkok skok = tabela_dolzin_rdeci[i][j].skok;\n\t\t\t\tVrednost nov_pointer = pointer;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry { levo = tabela_dolzin_rdeci[i][j - 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { levo = POLNO; }\n\t\t\t\ttry { desno = tabela_dolzin_rdeci[i][j + 1].vrednost; } \n\t\t\t\tcatch (ArrayIndexOutOfBoundsException e) { desno = POLNO; }\n\t\t\t\t\n\t\t\t\tif (levo != POLNO && levo < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = levo;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = levo + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_rdeci[i][j - 1];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\tif (desno != POLNO && desno < vrednost_polja) {\n\t\t\t\t\tif (plosca[i][j].polje == Polje.Rdec) vrednost_polja = desno;\n\t\t\t\t\tif (plosca[i][j].polje == Polje.PRAZNO) vrednost_polja = desno + 1;\n\t\t\t\t\tnov_pointer = tabela_dolzin_rdeci[i][j + 1];\n\t\t\t\t\tskok = null;\n\t\t\t\t}\n\t\t\t\ttabela_dolzin_rdeci[i][j].vrednost = vrednost_polja;\n\t\t\t\ttabela_dolzin_rdeci[i][j].pointer = nov_pointer;\n\t\t\t\ttabela_dolzin_rdeci[i][j].skok = skok;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Izracunamo dolzino najkrajse poti do zmage. \n\t\t// Ta dolzina je lahko 0, pa se nismo zmagali, saj moramo povezati se tista polja,\n\t\t// kjer imamo dve moznosti za zmago, torej Skoke, a takrat nas nasprotnik ne more vec ustaviti.\n\t\tint najmanjsa_rdeca = POLNO;\n\t\tVrednost pointer_rdeca = null;\n\t\tfor (int j = 0; j < N; j++) {\n\t\t\tint vrednost = tabela_dolzin_rdeci[N - 1][j].vrednost;\n\t\t\tif (najmanjsa_rdeca > vrednost) {\n\t\t\t\tnajmanjsa_rdeca = vrednost;\n\t\t\t\tpointer_rdeca = tabela_dolzin_rdeci[N - 1][j];\n\t\t\t}\t\n\t\t}\n\t\t\n\t\n\t\t// Izracunamo najkraso pot, to potrebujemo v Izbira potez.\n\t\tVrednost spremenljivka = pointer_rdeca;\n\t\twhile (spremenljivka != null) {\n\t\t\trdeca_pot.add(spremenljivka);\n\t\t\tspremenljivka = spremenljivka.pointer;\n\t\t}\n\t\t\n\t\treturn new Pot(najmanjsa_rdeca, rdeca_pot);\n\t}", "public String getvCodtmon() {\n return vCodtmon;\n }", "public guiProntuarioVirtual() {\n initComponents();\n \n }", "boolean estVide();", "public int getPesoV() \r\n\t\t{\r\n\t\t\treturn PesoV;\r\n\t\t}", "public static int getVelocidade() {\n return velocidade;\n }", "public ControladorCombate(int tipo_simulacion,\r\n Entrenador entrenador1, Entrenador entrenador2, ControladorPrincipal cp){\r\n this.esLider = false;\r\n this.controlador_principal = cp;\r\n this.tipo_simulacion = tipo_simulacion;\r\n this.combate = new Combate();\r\n this.equipo1 = entrenador1.getPokemones();\r\n this.equipo2 = entrenador2.getPokemones();\r\n this.entrenador1 = entrenador1;\r\n this.entrenador2 = entrenador2;\r\n this.vc = new VistaCombate();\r\n this.va = new VistaAtaque();\r\n this.ve = new VistaEquipo();\r\n this.creg = new ControladorRegistros();\r\n String[] nombres1 = new String[6];\r\n String[] nombres2 = new String[6];\r\n for (int i = 0; i < 6; i++) {\r\n nombres1[i]=equipo1[i].getPseudonimo();\r\n nombres2[i]=equipo2[i].getPseudonimo(); \r\n }\r\n this.vpc = new VistaPreviaCombate(tipo_simulacion, entrenador1.getNombre(), entrenador2.getNombre());\r\n this.vpc.agregarListener(this);\r\n this.vpc.setjC_Equipo1(nombres1);\r\n this.vpc.setjC_Equipo2(nombres2);\r\n this.vpc.setVisible(true);\r\n this.termino = false;\r\n resetearEntrenadores();\r\n }", "public Voznje() {\n initComponents();\n lstPodaci.setCellRenderer(new VoznjaCellRenderer());\n obrada = new ObradaVoznja();\n setTitle(Aplikacija.operater.getIme() + \" \" + Aplikacija.operater.getPrezime() + \" - Vožnje\");\n btnObrisi.setText(\"\\u274C\"+ \" Obriši\");\n btnPromijeni.setText(\"\\u2611\\uFE0F\" + \" Promijeni\");\n btnDodaj.setText(\"\\u2795\" + \" Dodaj\");\n ucitajPodatke(); \n \n DefaultComboBoxModel<Vozac> v = new DefaultComboBoxModel<>();\n new ObradaVozac().getPodaci().forEach(s -> {\n v.addElement(s);\n });\n cmbVozaci.setRenderer(new VozacCellRenderer());\n cmbVozaci.setModel(v);\n ucitajPodatke();\n \n \n \n }", "public ContaCorrente getContaCorrente() {\r\n return contaCorrente;\r\n }", "public Integer obterQuantidadeEconomiasVirtuais(Integer idImovel) throws ControladorException {\r\n\r\n\t\tInteger qtdEconomias = 0;\r\n\r\n\t\t// [UC0801] - Obter Quantidade de Economias por Subcategoria\r\n\t\tCollection<Subcategoria> colecaoSubcategoria = this.obterQuantidadeEconomiasSubCategoria(idImovel);\r\n\r\n\t\tif (colecaoSubcategoria != null && !colecaoSubcategoria.isEmpty()) {\r\n\r\n\t\t\tIterator iterator = colecaoSubcategoria.iterator();\r\n\r\n\t\t\twhile (iterator.hasNext()) {\r\n\r\n\t\t\t\tSubcategoria subcategoria = (Subcategoria) iterator.next();\r\n\r\n\t\t\t\t// Caso a categoria associada � subcategoria tenha fator de economias diferente\r\n\t\t\t\t// de NULO\r\n\t\t\t\tif (subcategoria.getCategoria().getFatorEconomias() != null) {\r\n\r\n\t\t\t\t\t// A quantidade de economias ser� o fator de economias da categoria\r\n\t\t\t\t\tqtdEconomias = qtdEconomias + subcategoria.getCategoria().getFatorEconomias().intValue();\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// A quantidade de economias ser� a quantidade de economias da subcategoria\r\n\t\t\t\t\tqtdEconomias = qtdEconomias + subcategoria.getQuantidadeEconomias();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn qtdEconomias;\r\n\t}", "@Override\n\tpublic void concentrarse() {\n\t\tSystem.out.println(\"Se centra en sacar lo mejor del Equipo\");\n\t\t\n\t}", "public Vector2d getVre() {\n return vre;\n }", "@Override\n public String toString(){\n return \"G(\"+this.getVidas()+\")\";\n }", "public String getCsVin() {\n return csVin;\n }", "public Scacchiera()\n {\n contenutoCaselle = new int[DIM_LATO][DIM_LATO];\n statoIniziale();\n }" ]
[ "0.63701594", "0.6011394", "0.5980898", "0.5898298", "0.586617", "0.58640593", "0.5831644", "0.57912195", "0.57885617", "0.5772467", "0.57466274", "0.572825", "0.5725439", "0.5719506", "0.57144296", "0.5711729", "0.57086706", "0.5706793", "0.5705091", "0.57047296", "0.56919515", "0.5691248", "0.5689336", "0.568377", "0.5676786", "0.56687576", "0.56571966", "0.5649451", "0.56425333", "0.56245977", "0.5617385", "0.5614421", "0.5612088", "0.55950654", "0.5593612", "0.55929434", "0.5581979", "0.55788374", "0.55633974", "0.55622524", "0.554561", "0.5545503", "0.5529589", "0.5519147", "0.55179936", "0.55068535", "0.5502011", "0.5496056", "0.5493372", "0.5492835", "0.5491372", "0.54875964", "0.5487155", "0.54795164", "0.54795164", "0.54738", "0.5460833", "0.5459646", "0.54538256", "0.5448965", "0.5447408", "0.5447123", "0.5447025", "0.54428214", "0.5438555", "0.54335076", "0.5430058", "0.54288065", "0.54100955", "0.54099774", "0.54042345", "0.5402734", "0.5399653", "0.5393492", "0.5392212", "0.53900546", "0.53884584", "0.5387469", "0.5377981", "0.53779364", "0.5377498", "0.5374032", "0.53733116", "0.5370858", "0.5352597", "0.5352513", "0.5348391", "0.5340821", "0.5337827", "0.53349817", "0.5333913", "0.5329353", "0.5329024", "0.53269017", "0.5322208", "0.53179175", "0.53085536", "0.53079945", "0.5307344", "0.5303573", "0.53012985" ]
0.0
-1
This Method is used to initialize driver and get base url
@BeforeMethod public void setUp() throws Exception{ ReadPropertiesFile propertiesFile = new ReadPropertiesFile(); baseUrl = propertiesFile.getValueFromPropertiesFile(FileConstants.CONFIG_PROPERTIES_FILE, "SITE_URL"); browser= propertiesFile.getValueFromPropertiesFile( FileConstants.CONFIG_PROPERTIES_FILE, "BROWSER"); //if(driver==null) setDriver(browser); driver.manage().window().maximize(); ATUReports.setWebDriver(driver); driver.get(baseUrl); ATUReports.indexPageDescription = "My Project Description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@BeforeMethod\n\tpublic void setUpMethod() {\n//\t\tDrivers.setChrome();\n//\t\tthis.driver = Drivers.getDriver();\n\t\tdriver.get(DataReaders.projectProperty(\"baseURL\"));\n\t}", "public void driverStart(String baseURL) {\n// FirefoxDriverManager.getInstance().setup();\n// driver = new FirefoxDriver();\n// driver.manage().window().maximize();\n// webDriverWait = new WebDriverWait(driver, 10);\n//\n//// ChromeDriverManager.getInstance().setup();\n//// driver = new ChromeDriver();\n//// driver.manage().window().maximize();\n//// webDriverWait = new WebDriverWait(driver, 5);\n//\n// driver.get(baseURL);\n\n FirefoxDriverManager.getInstance().setup();\n WebDriver driver = new FirefoxDriver();\n driver.get(\"http://localhost/litecart/\");\n\n\n }", "@BeforeTest\n\tpublic void Initialise() throws IOException\n\t{\n\t\t\t\tdriver=initialiseDriver();\n\t\t\t\t\n\t\t\t\tdriver.get(prop.getProperty(\"url\"));\n\t}", "public static void initialization() {\n String browserName = properties.getProperty(\"browserName\");\n\n if (browserName.equalsIgnoreCase(\"chrome\")) {\n System.setProperty(\"webdriver.chrome.driver\", \"F:/LearningStuff/WebDrivers/chromedriver.exe\");\n driver = new ChromeDriver();\n\n } else if (browserName.equalsIgnoreCase(\"firefox\")) {\n System.setProperty(\"webdriver.gecko.driver\", \"\");\n driver = new FirefoxDriver();\n }\n\n driver.manage().window().maximize(); //maximize browser\n driver.manage().deleteAllCookies(); //clear cookies\n driver.manage().timeouts().pageLoadTimeout(TestUtil.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS); //waits for a page load\n driver.manage().timeouts().implicitlyWait(TestUtil.IMPLICIT_WAIT, TimeUnit.SECONDS); //waits for an element\n driver.get(properties.getProperty(\"url\")); //opens the url\n }", "public void initialization() {\n\t\t\t\n\t\t if(prop.getProperty(\"browser\").equals(\"chrome\")) {\n\t\t \t\n\t\t \tWebDriverManager.chromedriver().setup();\n\t\t\t\t\n\t\t\t\t driver=new ChromeDriver();\n\t\t\t\t\n\t\t } else if(prop.getProperty(\"browser\").equals(\"firefox\")) {\n\t\t \t\n\t\t \tWebDriverManager.firefoxdriver().setup();\n\t\t\t\t\n\t\t\t\t driver=new FirefoxDriver();\n\t\t\t\t \n\t\t } else if(prop.getProperty(\"browser\").equals(\"edge\")) {\n\t\t \tWebDriverManager.edgedriver().setup();\n\t\t\t\t\n\t\t\t\t driver=new EdgeDriver();\n\t\t \t\n\t\t }\n\t\t\t\n\t }", "public static void initialization()\r\n\t{\r\n\t\tString browserName = prop.getProperty(\"browser\");\r\n\t\tif(browserName.equalsIgnoreCase(\"chrome\"))\r\n\t\t{\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"src\\\\test\\\\resources\\\\chromedriver.exe\");\r\n\t\t\tdriver = new ChromeDriver();\r\n\t\t}\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(TestUtil.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS);\r\n\t\tdriver.manage().timeouts().implicitlyWait(TestUtil.PAGE_LOAD_TIMEOUT,TimeUnit.SECONDS);\r\n\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t}", "@Override\n protected void load(){\n this.driver.get(super.URL_BASE.concat(this.url));\n }", "@BeforeClass\n public static void initDriver() {\n String baseUrl = \"https://www.snaptravel.com/search?encrypted_user_id=5xqebwRCiWusH08KS2yJKA&otp=5549929985\";\n driver.get(baseUrl);\n System.out.println(\"In testing\");\n }", "@BeforeMethod(alwaysRun = true)\n public static void setUp(){\n // ConfigReader.readProperties(Constants.CONFIGURATION_FILEPATH);\n ConfigReader.readProperties(Constants.CONFIGURATION_FILE);\n switch (ConfigReader.getPropertyValue(\"browser\")){\n case \"chrome\":\n //System.setProperty(\"webdriver.chrome.driver\", \"Drivers/chromedriver.exe\");\n WebDriverManager.chromedriver().setup();\n driver=new ChromeDriver();\n break;\n case \"firefox\":\n //System.setProperty(\"webdriver.gecko.driver\", \"Drivers/geckodriver.exe\");\n WebDriverManager.firefoxdriver().setup();\n driver=new FirefoxDriver();\n break;\n default:\n throw new RuntimeException(\"Invalid name of browser\");\n }\n driver.get(ConfigReader.getPropertyValue(\"url\"));\n driver.manage().window().maximize();\n //driver.manage().timeouts().implicitlyWait(Constants.IMPLICIT_WAIT, TimeUnit.SECONDS);\n }", "public void initialize() {\n webDriverConfig = WebDriverConfig.getInstance();\n webDriver = WebDriverFactory.getDriver(webDriverConfig.getBrowser());\n webDriver.manage().window().maximize();\n webDriver.manage().timeouts().implicitlyWait(webDriverConfig.getImplicitWaitTime(), TimeUnit.SECONDS);\n webDriverWait = new WebDriverWait(webDriver, webDriverConfig.getExplicitWaitTime());\n }", "public void initializeDriver() {\n }", "private void initDriver(){\r\n String browserToBeUsed = (String) jsonConfig.get(\"browserToBeUsed\");\r\n switch (browserToBeUsed) {\r\n case \"FF\":\r\n System.setProperty(\"webdriver.gecko.driver\", (String) jsonConfig.get(\"fireFoxDriverPath\"));\r\n FirefoxProfile ffProfile = new FirefoxProfile();\r\n // ffProfile.setPreference(\"javascript.enabled\", false);\r\n ffProfile.setPreference(\"intl.accept_languages\", \"en-GB\");\r\n\r\n FirefoxOptions ffOptions = new FirefoxOptions();\r\n ffOptions.setProfile(ffProfile);\r\n driver = new FirefoxDriver(ffOptions);\r\n break;\r\n case \"CH\":\r\n String driverPath = (String) jsonConfig.get(\"chromeDriverPath\");\r\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\r\n\r\n Map<String, Object> prefs = new HashMap<String, Object>();\r\n prefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n\r\n ChromeOptions options = new ChromeOptions();\r\n options.setExperimentalOption(\"prefs\", prefs);\r\n options.addArguments(\"--lang=en-GB\");\r\n driver = new ChromeDriver(options);\r\n break;\r\n case \"IE\":\r\n System.setProperty(\"webdriver.ie.driver\", (String) jsonConfig.get(\"ieDriverPath\"));\r\n\r\n InternetExplorerOptions ieOptions = new InternetExplorerOptions();\r\n ieOptions.disableNativeEvents();\r\n ieOptions.requireWindowFocus();\r\n ieOptions.introduceFlakinessByIgnoringSecurityDomains();\r\n driver = new InternetExplorerDriver(ieOptions);\r\n }\r\n\r\n driver.manage().window().maximize();\r\n }", "public void initDriver() {\n if (getBrowser().equals(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n if (System.getProperty(\"headless\") != null) {\n FirefoxOptions firefoxOptions = new FirefoxOptions();\n firefoxOptions.setHeadless(true);\n driver = new FirefoxDriver(firefoxOptions);\n } else {\n driver = new FirefoxDriver();\n }\n } else {\n WebDriverManager.chromedriver().setup();\n if (System.getProperty(\"headless\") != null) {\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.setHeadless(true);\n driver = new ChromeDriver(chromeOptions);\n } else {\n driver = new ChromeDriver();\n }\n }\n }", "public void setup(){\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"//Users//bpat12//Downloads//chromedriver\");\n\t\tdriver = new ChromeDriver();\n\t\tSystem.out.println(\"launch browser\");\n\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n\t\tdriver.get(url);\n\t}", "public WebDriver initializeDriver() {\n System.setProperty(\"webdriver.chrome.driver\", projectPath + \"//src//main//resources//chromedriver\");\n driver = new ChromeDriver();\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n return driver;\n }", "private void initialize() {\n if (driver == null)\n createNewDriverInstance();\n }", "public static WebDriver setUp() {\n\t\n \t\n \tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\"); //if it doesn't work we can check with user.dir...\n \tdriver = new ChromeDriver(); //launch the Browser it opens empty page\n \tdriver.manage().window().maximize();\n \tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS); //to wait globally\n \tdriver.get(\"http://166.62.36.207/humanresources/symfony/web/index.php/auth/login\");\n \t \n \treturn driver; //return object of the driver \t\n}", "private void setupAndConnect() {\n URL url = getUrl(this.endpointUrl);\n connection = null;\n try {\n connection = (HttpURLConnection) url.openConnection();\n HttpURLConnection.setFollowRedirects(true);\n } catch (IOException e) {\n LOG.severe(\"Error connecting to Url : \" + url);\n LOG.severe(e.toString());\n }\n }", "@BeforeClass\n\tpublic static void configureDriver(){\n\t\tif(driver == null) {\n\t\t\tif(Constants.browserName.equalsIgnoreCase(\"chrome\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\rober\\\\Documents\\\\WebDrivers\\\\chromedriver_win32-89\"\n\t\t\t\t\t\t+ \"\\\\chromedriver.exe\");\n\t\t\t\tdriver = new ChromeDriver();\n\t\t\t} else if(Constants.browserName.equalsIgnoreCase(\"firefox\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\rober\\\\Documents\\\\WebDrivers\\\\chromedriver_win32-89\"\n\t\t\t\t\t\t+ \"\\\\geckodriver.exe\");\n\t\t\t\tdriver = new FirefoxDriver();\n\t\t\t} else if(Constants.browserName.equalsIgnoreCase(\"edge\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.edge.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\rober\\\\Documents\\\\WebDrivers\\\\chromedriver_win32-89\"\n\t\t\t\t\t\t+ \"\\\\msedgedriver.exe\");\n\t\t\t\tdriver = new EdgeDriver();\n\t\t\t} else if(Constants.browserName.equalsIgnoreCase(\"ie\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.ie.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\rober\\\\Documents\\\\WebDrivers\\\\chromedriver_win32-89\"\n\t\t\t\t\t\t+ \"\\\\IEDriver.exe\");\n\t\t\t\tdriver = new InternetExplorerDriver();\n\t\t\t}\n\t\t}\n\t\t\n\t\tdriver.manage().deleteAllCookies();\n\t\tdriver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);\n\t\tdriver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tdriver.get(Constants.url);\n\t\t\n\t}", "public static void initialization() throws InterruptedException, FileNotFoundException {\n\n String browserName = prop.getProperty(\"browser\");\n if (browserName.equalsIgnoreCase(\"chrome\")) {\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n } else if (browserName.equalsIgnoreCase(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n }\n driver.manage().window().maximize();\n String url = prop.getProperty(\"url\");\n driver.get(url);\n driver.manage().timeouts().pageLoadTimeout(Util_Constants.IMPLICIT_WAIT, TimeUnit.SECONDS);\n\n\n }", "public DhbwTests()\n {\n DHBW_URL = System.getProperty(\"DHBW_URL\", DHBW_URL);\n WEB_DRIVER_PROVIDER = System.getProperty(\"WEB_DRIVER_PROVIDER\", WEB_DRIVER_PROVIDER);\n if (!WEB_DRIVER_PROVIDER.contains(\".\"))\n {\n WEB_DRIVER_PROVIDER = \"dhbw.test.util.\" + WEB_DRIVER_PROVIDER + \"WebDriverProvider\";\n }\n System.out.println(\"Config: \" + DHBW_URL + \" \" + WEB_DRIVER_PROVIDER);\n }", "public void initialization()\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Mrunal\\\\chromedriver.exe\");\n\t\n\t\tif(prop.getProperty(\"browser\").contains(\"chrome\"))\n\t\t driver = new ChromeDriver();\n\t\t \n\t\t driver.manage().deleteAllCookies();\n\t\t driver.manage().timeouts().pageLoadTimeout(2000, TimeUnit.MILLISECONDS);\n\t\t driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n\n\t\t driver.get(prop.getProperty(\"url\"));\n\t\t driver.manage().window().maximize();\n\t\t driver.manage().timeouts().implicitlyWait(8, TimeUnit.SECONDS);\n\t\t \n\t}", "@Before\n public void initTestSet() {\n webDriver = new ChromeDriver();\n webDriver.get(Book_URL); // open desired url\n webDriverTimeout();\n }", "private static String getBaseUrl()\r\n {\r\n return \"https://rapidapi.io/connect\";\r\n }", "@Before\n public void setUp() throws Exception {\n\t //driver = WebDriverFactory.getDriver(DesiredCapabilities.firefox());\n\t driver = new FirefoxDriver();\n baseUrl = \"https://my.roboforex.com/\";\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n }", "@BeforeClass\n public static void init() throws Exception {\n System.setProperty(\"instanceUri\", STANDALONE.getClass().getMethod(\"getBaseURI\").invoke(STANDALONE).toString());\n }", "@BeforeTest\n\t public void setUp() throws Exception {\n\t\t \n\t\tSystem.setProperty(\"webdriver.gecko.driver\",\n\t\t\t\t\"G:\\\\Selenium\\\\drivers\\\\geckodriver-v0.11.1-win64\\\\geckodriver.exe\");\n\t\tFile pathBinary = new File(\"C:\\\\Uday\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n\t\tFirefoxBinary firefoxBinary = new FirefoxBinary(pathBinary);\n\t\tFirefoxProfile firefoxProfile = new FirefoxProfile();\n\t\tdriver = new FirefoxDriver(firefoxBinary, firefoxProfile);\n\n\t baseUrl = \"http://localhost:8888/\";\n\t driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t }", "private static void initialiseBrowser() {\n\t\tif (System.getProperty(\"proxyname\") != null) {\n\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\tprofile.setPreference(\"network.proxy.type\", 1);\n\t\t\tprofile.setPreference(\"network.proxy.http\", System.getProperty(\"proxyname\"));\n\t\t\tprofile.setPreference(\"network.proxy.http_port\", 3128);\n\n\t\t\tdriver = new FirefoxDriver(profile);\n\t\t\tsetDriver(driver);\n\t\t}\n\t\telse{\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tsetDriver(driver);\n\t\t}\n\t}", "public void getDriver() {\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver = new ChromeDriver();\n\t}", "public void initialize() throws IOException{\nif(driver == null){\n\n\t//initialize config properties file\t\n\tCONFIG= new Properties();\n\tFileInputStream fn = new FileInputStream(System.getProperty(\"user.dir\")+\"//src//config//config.properties\");\n\tCONFIG.load(fn);\n\t\n\t//initialize xpaths file\n\tOR= new Properties();\n\tfn = new FileInputStream(System.getProperty(\"user.dir\")+\"//src//config//OR.properties\");\n\tOR.load(fn);\n\t\n\t//initialize browser\n\t//if(CONFIG.getProperty(\"browser\").equals(\"Firefox\")){\n\t\tdr = new FirefoxDriver();\n\n\t//}else if (CONFIG.getProperty(\"browser\").equals(\"Chrome\")){\n\t\t//System.setProperty(\"webdriver.chrome.driver\", (\"user.dir\")+\"//src//chromedriver.exe\");\n\t\t//dr = new ChromeDriver();\n\t\t\n\t//}\n\tdriver = new EventFiringWebDriver(dr);\n\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\n\t\n\t}\n}", "public static void initialization() {\n\t\tSystem.out.println(\"**Open initialization**\");\r\n\t\tString browserName = props.getProperty(\"browser\");\r\n\t\tSystem.out.println(\"Browser User = \" + browserName + \" URL = \" + props.getProperty(\"url\"));\r\n\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"D:/Selenium Automation/chromedriver/chromedriver.exe\");\r\n\t\tdriver = new ChromeDriver();\r\n\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\r\n\t\tdriver.get(props.getProperty(\"url\"));\r\n\t\tSystem.out.println(\"**Close initialization**\");\r\n\t}", "public static void setBaseURL() {\n\n\t\tRestAssured.baseURI = DataReader.dataReader(\"baseURL\");\n\t}", "@BeforeMethod\r\n\tpublic void Setup()\r\n\t{\n\t\tString strBrowserName=objConfig.getProperty(\"browser\");\r\n\t\tif(strBrowserName.equalsIgnoreCase(\"CHROME\"))\r\n\t\t{\r\n\t\t\tobjDriver=new ChromeDriver();\r\n\t\t}\r\n\t\telse if(strBrowserName.equalsIgnoreCase(\"FIREFOX\"))\r\n\t\t{\r\n\t\t\tobjDriver=new FirefoxDriver();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tobjDriver=new InternetExplorerDriver();\r\n\t\t}\r\n\t\t\r\n\t\t//To open the URL\r\n\t\t\r\n\t\tobjDriver.get(objConfig.getProperty(\"url\"));\r\n\t\t\r\n\t\t//To maximize the browser window.\r\n\t\tif(objConfig.getBooleanProperty(\"runFullScreen\"))\r\n\t\t\tobjDriver.manage().window().maximize();\r\n\r\n\t\t//To set the implicit wait time\r\n\t\tobjDriver.manage().timeouts().implicitlyWait(objConfig.getLongProperty(\"implicitTimeoutInSeconds\"), TimeUnit.SECONDS);\r\n\t\t\r\n\t\t\r\n\t}", "public void setUp() throws Exception {\n // Choose the browser, version, and platform to test\n DesiredCapabilities capabilities = DesiredCapabilities.firefox();\n capabilities.setCapability(\"version\", \"5\");\n capabilities.setCapability(\"platform\", Platform.XP);\n // Create the connection to Sauce Labs to run the tests\n this.driver = new RemoteWebDriver(\n new URL(\"http://mtest1:e55c18d3-f3b5-4d1d-9165-0a5f1aa3bcbe@ondemand.saucelabs.com:80/wd/hub\"),\n capabilities);\n\n //driver = new FirefoxDriver();\n baseUrl = \"https://www.linkedin.com\";\n //driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n }", "protected WebDriverManager() {\n initialize();\n }", "@BeforeTest\r\n\tpublic void setup()throws InterruptedException, MalformedURLException, IOException {\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t// Stream the data from the config properties file and store in the object input\r\n\t\t\tinput = new FileInputStream(\"./config.properties\");\r\n\t\t\tProperties prop = new Properties();\r\n\t\t\t\r\n\t\t\t// Load the data into prop object\r\n\t\t\tprop.load(input);\r\n\t\t\t\r\n\t\t\t//Assign the values into the variables taken from config properties file\r\n\t\t\tstrBrowser = prop.getProperty(\"BROWSER\");\r\n\t\t\tstrBaseUrl = prop.getProperty(\"BASE_URL\");\r\n\t\t\t\r\n\t\t\t//Choose the browser and launch by getting the values from config properties file\r\n\t\t\tif(strBrowser.equalsIgnoreCase(\"chrome\")) {\r\n\t\t\t\t\r\n\t\t\t\t//Sets the property of the chrome driver\r\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./Drivers/chromedriver.exe\");\r\n\t\t\t\t\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\t\t\t\t\r\n\t\t\t\t// Yet to provide the details for both IE and firefox below\r\n\t\t\t} else if(strBrowser.equalsIgnoreCase(\"ie\")) {\r\n\t\t\t\tSystem.setProperty(\"\", \"\");\r\n\t\t\t\tdriver = new InternetExplorerDriver();\r\n\t\t\t} else if(strBrowser.equalsIgnoreCase(\"firefox\")) {\r\n\t\t\t\tSystem.setProperty(\"\", \"\");\r\n\t\t\t\tdriver = new FirefoxDriver();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdriver.get(strBaseUrl);\r\n\t\t\tdriver.manage().window().maximize();\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tSystem.out.println(\"Provide a valid data for driver\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "protected void init(WebDriver driver) {\n }", "public static WebDriver setupDriver()\r\n\t{\r\n\t driver = getWebDriver();\r\n\t return driver;\r\n\t}", "@BeforeMethod\n public void setDriver() throws MalformedURLException {\n\n\n driver = WebDriverFactory.getDriver(WebDriverFactory.CHROME).get();\n\n\n loginPage = new LoginPage(driver);\n loginPageHelper = new LoginPageHelper(driver);\n menuHelper = new MenuHelper(driver);\n }", "@BeforeSuite\n\tpublic void initialize(){\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\t// loading config Repositories\n\t\t\tconfig = new Properties();\n\t\t\tFileInputStream fp = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\com\\\\hrm\\\\config\\\\config.properties\");\n\t\t\tconfig.load(fp);\n\t\t\t\n\t\t\t\n\t\t\t// checking the type of browser\n\t\t\tif(config.getProperty(\"browserType\").equalsIgnoreCase(\"Firefox\")){\n\t\n\t\t\t\twbDv = new FirefoxDriver();\n\t\t\t\t\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"IE\")){\n\t\t\t\t\n\t\t\t\twbDv = new InternetExplorerDriver();\n\t\t\t\tDesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();\n\t\t\t\tieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);\n\t\t\t\twbDv = new InternetExplorerDriver(ieCapabilities);\n\t\t\t}else if(config.getProperty(\"browserType\").equalsIgnoreCase(\"Chrome\")){\n\t\t\t\t\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", System.getProperty(\"user.dir\")+\"\\\\OtherUtility\\\\chromedriver.exe\");\n\t\t\t wbDv = new ChromeDriver();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tdriver = new EventFiringWebDriver(wbDv);\n\t\t\t\n\t\t\t// putting an implicit wait after every Action or Event\n\t\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\t\n\t\t\t// Loading the browser\n\t\t\tdriver.get(\"http://croissanceservices.com/hrm\");\n\t\t\t\n\t\t\t// opening the browser\n\t\t\tdriver.manage().window().maximize();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public void setUp()\n\t{\n\t\tif (driver == null){\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSystem.out.println(System.getProperty(\"user.dir\")+ \"\\\\src\\\\test\\\\resources\\\\properties\\\\Config.properties\");\n\t\t\t\tfis = new FileInputStream(System.getProperty(\"user.dir\")+ \"\\\\src\\\\test\\\\resources\\\\properties\\\\Config.properties\");\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\t\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tconfig.load(fis);\n\t\t\t\tSystem.out.println(\"config file loaded\");\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\t\ttry {\n\t\t\t\tfis = new FileInputStream(System.getProperty(\"user.dir\")+\"\\\\src\\\\test\\\\resources\\\\properties\\\\OR.properties\");\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\ttry {\n\t\t\t\tOR.load(fis);\n\t\t\t\t//config.load(fis);\n\t\t\t\tSystem.out.println(\"OR file loaded\");\n\t\t\t\tSystem.out.println(System.getenv(\"browser\"));\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}\n\t\tif (System.getenv(\"browser\")!= null)\n\t\t\t\t{\n\t\t\t\t\tbrowser = System.getenv(\"browser\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tbrowser = config.getProperty(\"browser\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\tconfig.setProperty(browser, browser);\n\t\tif (config.getProperty(\"browser\").equals(\"chrome\"))\n\t\t\t\n\t\t{\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\") + \"\\\\src\\\\test\\\\resources\\\\executables\\\\chromedriver.exe\");\n\t\t\tdriver = new ChromeDriver();\n\t\t\tSystem.out.println(\"Chrome Launched !!!\");\n\t\t}\n\t\t//System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Program Files (x86)\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t//driver = new ChromeDriver();\n\t\tSystem.out.println(System.getProperty(\"TestEnv\"));\n\t\tdriver.get(config.getProperty(\"testsiteurl\").replace(\"{TestEnv}\", System.getProperty(\"TestEnv\")));\n\t\tSystem.out.println(\"Navigated to : \" + config.getProperty(\"testsiteurl\"));\n\t\tdriver.manage().window().maximize();\n\t\t\n\t}", "public static WebDriver initializatio(){\n\t\t \r\n\t\t\t String browse_name= prop.getProperty(\"browser\");\r\n\t\t\t \r\n\t\t\t \r\n\t\t if(driver==null && browse_name.equals(\"chrome\")){\r\n\t\t\t System.setProperty(\"webdriver.chrome.driver\", \"C://Users//RJ//Downloads//chromedriver.exe\");\r\n\t\t\t driver=new ChromeDriver();\r\n\t\t\t //E:\\Yadav Selenium\r\n\t\t }\r\n\t\t \r\n\t\t else if(driver==null && browse_name.equals(\"FF\")){\r\n\t\t\t System.setProperty(\"webdriver.gecko.driver\", \"E://Yadav Selenium//geckodriver.exe\");\r\n\t\t\t driver=new FirefoxDriver();\r\n\t\t }\r\n\t\t event_driver=new EventFiringWebDriver(driver);\r\n\t\t //now cearte Eventlistnerhandler to resgistor with eventFireingWebdriver\r\n\t\t event_lisner=new WebEventListner();\r\n\t\t event_driver.register(event_lisner);\r\n\t\t driver=event_driver;\r\n\t\t \r\n\t\t driver.manage().window().maximize();\r\n\t\t driver.manage().deleteAllCookies();\r\n\t\t driver.manage().timeouts().pageLoadTimeout(Testutil.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS);\r\n\t\t driver.manage().timeouts().implicitlyWait(Testutil.IMPLICIT_WAIT, TimeUnit.SECONDS);\r\n\t\t // driver.get(prop.getProperty(\"url\"));\r\n\t\t driver.navigate().to(prop.getProperty(\"url\"));\r\n\t\treturn driver;\r\n\t}", "@BeforeClass\n public void setUp() {\n System.out.println(\"Setting up webdriver\");\n //Set the webdriver to use and the path to the webdriver\n System.setProperty(\"webdriver.chrome.driver\", \"src/test/java/Webdrivers/chromedriver.exe\");\n driver = new ChromeDriver();\n //Give our newly setup driver the base url for mentor marketplace. This serves as a\n //launching point for all tests.\n driver.get(baseUrl);\n }", "public void init() throws IOException{\n\t\tProperties testProp = new Properties();\n\t\tFileInputStream fis = new FileInputStream(\"src/main/resources/config.properties\");\n\t\ttestProp.load(fis);\n\t\t\t\n\t\t\n\t\t// Here, we are initiating the driver based on \"browser\" value mentioned in config.properties file\n\t\tif(testProp.getProperty(\"browser\").equalsIgnoreCase(\"chrome\")){\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",testProp.getProperty(\"chromedriverPath\"));\n\t\t\tdriver = new ChromeDriver();\n\t\t}\n\t\tif(testProp.getProperty(\"browser\").equalsIgnoreCase(\"firefox\")){\n\t\t\tdriver = new FirefoxDriver();\n\t\t}\n\t\t\n\t\tdriver.manage().window().fullscreen();\n\t\t\n\t\t// Here, we are getting the URL from confg.properties file and passing it to driver.navigate().to() method\n\t\tdriver.navigate().to(testProp.getProperty(\"testUrl\"));\n\t\tdriver.manage().timeouts().implicitlyWait(Long.parseLong(testProp.getProperty(\"implicitWait\")), TimeUnit.SECONDS);\n\t\tdriver.manage().timeouts().pageLoadTimeout(Long.parseLong(testProp.getProperty(\"pageLoadTimeout\")), TimeUnit.SECONDS);\n\n\t}", "@BeforeClass\n public static void setUpClass() throws Exception {\n\t driver = new FirefoxDriver();\n\t \n baseUrl = \"http://localhost/\";\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n }", "public void loadDriver() {\n\t\t\n\t\t//get() method is used to open an URL and it will wait till the whole page gets loaded.\n\t\twebDriver.get(\"https://www.google.co.in/\");\n\t}", "@BeforeClass\n @Parameters({ \"browser\", \"url\" })\n public void startDriver(@Optional(\"chrome\") String WindowBrowser, @Optional(\"http://computer-database.herokuapp.com/computers\") String URL) {\n\n final String os = System.getProperty(\"os.name\");\n userDirectory = System.getProperty(\"user.dir\");\n Log.info(\"Starting to intialise driver\");\n Log.info(\"OS environment: \" + os);\n Log.info(\"Browser: \" + WindowBrowser);\n if (WindowBrowser.equalsIgnoreCase(BROWSERS.FIREFOX.getBrowserName())) {\n final StringBuilder geckoDriverPath = new StringBuilder();\n geckoDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n geckoDriverPath.append(File.separator + \"mac\" + File.separator + \"geckodriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n geckoDriverPath.append(File.separator + \"win\" + File.separator + \"geckodriver.exe\");\n }\n System.setProperty(\"webdriver.gecko.driver\", geckoDriverPath.toString());\n driver = new FirefoxDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.CHROME.getBrowserName())) {\n final StringBuilder chromeDriverPath = new StringBuilder();\n System.out.println(userDirectory);\n chromeDriverPath.append(userDirectory + File.separator + \"src\" + File.separator + \"test\" + File.separator + \"resources\");\n if (os.contains(OS.MAC.getOsName())) {\n chromeDriverPath.append(File.separator + \"mac\" + File.separator + \"chromedriver\");\n } else if (os.contains(OS.WIN.getOsName())) {\n chromeDriverPath.append(File.separator + \"win\" + File.separator + \"chromedriver.exe\");\n }\n System.setProperty(\"webdriver.chrome.driver\", chromeDriverPath.toString());\n driver = new ChromeDriver();\n } else if (WindowBrowser.equalsIgnoreCase(BROWSERS.SAFARI.getBrowserName())) {\n driver = new SafariDriver();\n }\n driver.manage().window().setSize(new Dimension(1440, 844));\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n BaseURl = URL;\n Log.info(\"Driver initialised successfully\");\n driver.get(BaseURl);\n Log.info(\"Opening URl: \" + URL);\n }", "@BeforeClass\r\n\tpublic void setup() {\r\n\r\n\t\tdriver = new FirefoxDriver();\r\n\t\t\r\n\t\tlogger=Logger.getLogger(\"pnetpractice\");\r\n\t\tPropertyConfigurator.configure(\"log4j.properties\");\r\n\t\t\r\n\t\t\r\n\t\tdriver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\r\n\t\t//driver.get(Baseurl);\r\n\t}", "private void initialize() {\n int implicitWaitTime = 20;\n int explicitWaitTime = 30;\n int waitSleepTime = 10;\n\n ChromeDriverManager.getInstance(CHROME).setup();\n// FirefoxDriverManager.getInstance(FIREFOX).setup();\n this.webDriver = new ChromeDriver();\n this.webDriver.manage().window().maximize();\n this.webDriver.manage().timeouts().implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n webDriverWait = new WebDriverWait(webDriver, explicitWaitTime,waitSleepTime);\n }", "public static void initializer() \n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Users\\\\HP-PC\\\\Downloads\\\\Kahoot\\\\chromedriver.exe\" );\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.get(\"https://www.sathya.in/\");\n\t}", "public BaseJourney() {\n this.driver = DriverWrapper.getDriver();\n this.initElements();\n // load properties here\n this.isIOS = driver instanceof IOSDriver;\n this.isAndroid = driver instanceof AndroidDriver;\n }", "@BeforeMethod\n\tpublic void setup() throws MalformedURLException{\n\t\t\n\t\tbaseObj.mobileDriver();\n\t\t\n\t}", "@BeforeClass\n @Parameters({\"browser\", \"url\"})\n // Step 2: create a method with appropriate params\n void setup(String mBrowser, String mUrl){\n // Step 3: make use of the parameters\n if(mBrowser.equalsIgnoreCase(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\",\"C:/chromedriver_win32/chromedriver.exe\");\n driver = new ChromeDriver();\n }else if(mBrowser.equalsIgnoreCase(\"firefox\")){\n System.setProperty(\"webdriver.chrome.driver\",\"C:/firefox_win32/firefoxdriver.exe\");\n driver = new FirefoxDriver();\n }\n // Step 3: make use of the parameters\n driver.get(mUrl);\n }", "@BeforeClass\n public static void beforeClass() throws Exception {\n server = createServer();\n server.startServer();\n\n // this is the base url with the random port\n url = server.getUrl();\n }", "@BeforeMethod\n public void setUp() throws MalformedURLException {\n\n if (DRIVER.get() == null) {\n final String localAppiumServerURL = \"http://127.0.0.1:4723/wd/hub\";\n\n DRIVER.set(new AndroidDriver(new URL(localAppiumServerURL), CapabilitiesEmulator.TWITTER_CAPABILITIES()));\n\n WebDriverRunner.setWebDriver(getDriver());\n }\n\n //For google tests \"https://www.google.com\"\n // For twitter tests U should commit 'open' section\n\n// open(\"https://www.google.com\");\n\n// getDriver()\n// .get(\"https://www.google.com\");\n\n// getDriver()\n// .manage()\n// .timeouts()\n// .implicitlyWait(20, TimeUnit.SECONDS);\n }", "@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }", "public void determineBaseUrl() {\n if (Environment.isLatest()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isStage()) {\n baseUrl = \"api-stage.wdpro.starwave.com\";\n } else if (Environment.isENV4()) {\n baseUrl = \"api-latest.wdpro.starwave.com\";\n } else if (Environment.isENV2()) {\n // baseUrl = \"api-qa.wdpro.disney.go.com:8088\";\n baseUrl = \"api-env2.wdpro.starwave.com\";\n } else if (Environment.isSoftLaunch()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else if (Environment.isShadow()) {\n baseUrl = \"api-shadow.wdpro.starwave.com\";\n } else if (Environment.isProduction()) {\n baseUrl = \"api.wdpro.disney.go.com\";\n } else {\n baseUrl = \"api.wdpro.disney.go.com\";\n }\n }", "@BeforeTest\r\n\r\n\tpublic void setUp() throws Exception {\r\n\t\t// PropertyConfigurator.configure(\"log4j.properties\");\r\n\t\tdriver = new FirefoxDriver();\r\n\t\tbaseUrl = \"https://pghvm-vr7-www1.omnyx.com/Omnyx.Web/login\";\r\n\r\n\t\t// Maximize the browser's window\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(15, TimeUnit.SECONDS);\r\n\r\n\t}", "Driver getDriver();", "private String baseUrl() {\n return \"http://\" + xosServerAddress + \":\" +\n Integer.toString(xosServerPort) + XOSLIB + baseUri;\n }", "@Before\n public void startingTests() throws Exception {\n // from Sample 1:\n String libWithDriversLocation = System.getProperty(\"user.dir\") + \"\\\\lib\\\\\";\n System.setProperty(\"webdriver.chrome.driver\", libWithDriversLocation + \"chromedriver.exe\");\n // declaration above:\n driver = new ChromeDriver();\n\n //open page:\n driver.get(base_url);\n }", "@BeforeAll\n public static void setUp(){\n baseURI = ConfigurationReader.getProperty(\"spartan.base_url\");\n basePath = \"/api\" ;\n }", "@BeforeClass\n public void setUp(){\n Driver.get().get(ConfigurationReader.getProperty(\"url\"));\n TryCloudUtil.LogInTryCloud(driver);\n }", "@Override\n\tpublic void open() {\n\t\tcheckInit();\n\t\twebDriverPool.open();\n\t}", "@BeforeMethod\r\n public void setUp() {\n WebDriver driver = new FirefoxDriver();\r\n driver.get(\"http://selenium.polteq.com/testshop/index.php\");\r\n }", "@BeforeEach\n\tvoid setUp() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverPath);\n\n\t\t// step3: Initiate selenium webdriver\n\t\tdriver = new ChromeDriver();\n\n\t\t// step4: Lunch web browser\n\t\tdriver.get(siteUrl);\n\t}", "@BeforeClass\n public static void setup() {\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\n driver = new ChromeDriver();\n wait = new WebDriverWait(driver, 10);\n util = new Util(driver, wait);\n util.login(emailAddress, pwd);\n }", "@Before\n public void setUp() throws Exception {\n URL = \"https://www.facebook.com/\";\n\t//baseUrl = \"https://www.katalon.com/\";\n System.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Documentos\\\\Java Drivers\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n // driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n }", "public void connect(String url){\n seleniumDriver.get(url);\n }", "public static WebDriver initializeChromeDriver() throws Exception {\n\n\t\tFile file = null;\n\t\tChromeDriverService chromeService = null;\n\t\tString os = System.getProperty(\"os.name\").toLowerCase();\n\n\t\tif (os.contains(\"win\")){\n\t\t\t//Operating system is based on Windows\n\t\t\tfile = new File(Constants.CHROMEDRIVER_EXE);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new Exception(\"Erro ao localizar o driver\");\n\t\t\t}\n\t\t\tchromeService = new ChromeDriverService.Builder()\n\t\t\t\t\t.usingDriverExecutable(new File(Constants.CHROMEDRIVER_EXE))\n\t\t\t\t\t.usingAnyFreePort().build();\n\n\t\t} else if (os.contains(\"x\") || os.contains(\"mac\") || os.contains(\"osx\")){\n\t\t\t//Operating system is Apple OSX based\n\t\t\tfile = new File(Constants.CHROMEDRIVER_MAC);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new Exception(\"Erro ao localizar o driver\");\n\t\t\t}\n\t\t\tchromeService = new ChromeDriverService.Builder()\n\t\t\t\t\t.usingDriverExecutable(new File(Constants.CHROMEDRIVER_MAC))\n\t\t\t\t\t.usingAnyFreePort().build();\n\n\t\t} else if (os.contains(\"nix\") || os.contains(\"aix\") || os.contains(\"nux\")){\n\t\t\t//Operating system is based on Linux/Unix/*AIX\n\t\t\tfile = new File(Constants.CHROMEDRIVER_LINUX);\n\n\t\t\tif (!file.exists()) {\n\t\t\t\tthrow new Exception(\"Erro ao localizar o driver\");\n\t\t\t}\n\t\t\tchromeService = new ChromeDriverService.Builder()\n\t\t\t\t\t.usingDriverExecutable(new File(Constants.CHROMEDRIVER_LINUX))\n\t\t\t\t\t.usingAnyFreePort().build();\n\t\t}\n\n\t\tchromeService.start();\n\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\tcapabilities.setCapability(InternetExplorerDriver.INITIAL_BROWSER_URL, \"about:blank\");\n\n\t\tRemoteWebDriver driver = new RemoteWebDriver(chromeService.getUrl(), capabilities);\n\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\n\t\treturn driver;\n\t}", "@Override\n\tpublic void init(ServletConfig config) throws ServletException {\n\t\tsuper.init(config);\n//\t\tdriver = config.getInitParameter(\"driver\");\n//\t\tSystem.out.print(driver);\n//\t\turl = config.getInitParameter(\"url\");\n//\t\tuser = config.getInitParameter(\"user\");\n//\t\tpassword = config.getInitParameter(\"password\");\n\t\tgetConnection();\n\t}", "@BeforeEach\n\tpublic void setup() {\n\t\tif (!initialized) {\n\t\t\tbaseURI = String.format(uri, port);\n\t\t\tinitialized = true;\n\t\t}\n\t}", "@BeforeClass\r\n\tpublic void setUp() {\r\n\r\n\t\t// This will launch browser and specific url\r\n\t\tdriver = BrowserFactory.startBrowser(driver, \"Chrome\", \"https://www.flipkart.com/\");\t\r\n\t\r\n\t}", "public WebDriver initDriver (Properties prop) {\r\n\t\tString browserName = prop.getProperty(\"browser\");\r\n\t\tif(browserName.equals(\"chrome\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./src/test/resources/chrome/chromedriver.exe\");\r\n\t\t\tdriver = new ChromeDriver(optionsManager.getChromeOptions());\r\n\t\t}else if(browserName.equals(\"firefox\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"./src/test/resources/firefox/geckodriver.exe\");\r\n\t\t\tdriver = new FirefoxDriver(optionsManager.getFirefoxOptions());\r\n\t\t}\r\n\t\t\r\n\t\teventDriver = new EventFiringWebDriver(driver);\r\n\t\teventListener = new WebEventListener();\r\n\t\teventDriver.register(eventListener);\r\n\t\tdriver = eventDriver;\r\n\t\t\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\r\n\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\treturn driver;\r\n\t}", "public static WebDriver getDriver(){\n if(driver==null){\n //get the driver type from properties file\n\n String browser=ConfigurationReader.getPropery(\"browser\");\n switch(browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver=new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver=new FirefoxDriver();\n }\n }\n\n return driver;\n }", "public BasePage(WebDriver driver) {\n this.driver = driver;\n }", "public void setUpDriver(BrowserType bType) throws Exception {\n ObjectRepo.driver = standAloneStepUp(bType);\n oLog.debug(\"InitializeWebDrive : \" + ObjectRepo.driver.hashCode());\n ObjectRepo.driver\n .manage()\n .timeouts()\n .pageLoadTimeout(ObjectRepo.reader.getPageLoadTimeOut(),\n TimeUnit.SECONDS);\n ObjectRepo.driver\n .manage()\n .timeouts()\n .implicitlyWait(ObjectRepo.reader.getImplicitWait(),\n TimeUnit.SECONDS);\n ObjectRepo.driver.manage().window().maximize();\n\n }", "public GoogleAutomation() {\n\t\t\n\t\t//The setProperty() method of Java system class sets the property of the system which is indicated by a key.\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"driver//chromedriver.exe\");\n\t\t\n\t\t//initilize webDriver \n\t\twebDriver = new ChromeDriver();\n\t}", "@BeforeClass\r\n\tpublic void setUp() {\n\t\tdriver = BrowserFactory.startApplication(DataProviderFactory.getConfig().getStagingURL(), DataProviderFactory.getConfig().getBrowser());\r\n\t}", "@Override\r\n\tpublic void buildDriver() throws DriverException\r\n\t{\r\n\t\tif(ConfigUtil.isLocalEnv())\r\n\t\t{\r\n\t\t\t// if it is a Selenium tool, then create selenium ChromeDriver\r\n\t\t\tif(ConfigUtil.isSelenium()){\r\n\t\t\t\t\r\n\t\t\t\tFile chromeDriverFile=getChromeDriverFile();\r\n\t\t\t\tSystem.out.println(\" Found Driver file\");\r\n\t\t\t\tdriver =SeleniumDriver.buildChromeDriver(chromeDriverFile);\r\n\t\t\t\t //new org.openqa.selenium.chrome.ChromeDriver();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(ConfigUtil.isRemoteEnv())\r\n\t\t{\r\n\t\t\tif(ConfigUtil.isSelenium()){\r\n\t\t\t\tcapabilities = DesiredCapabilities.chrome();\t\r\n\t\t\t\tdriver = SeleniumDriver.buildRemoteDriver(capabilities);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\telse if(ConfigUtil.isBrowserStackEnv())\r\n\t\t{\r\n\t\t\tcapabilities = DesiredCapabilities.chrome();\r\n\t\t\tbuildBrowserstackCapabilities();\r\n\r\n\t\t}\r\n\r\n\t}", "@BeforeClass\n public static void instanceDriver() {\n ChromeOptions options = ConfigUtil.chromeOptions();\n driver = new ChromeDriver(options);\n wait = new WebDriverWait(driver, WEB_DRIVER_TIMEOUT);\n }", "@BeforeTest\n public void setup() {\n System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\User\\\\IdeaProjects\\\\LoginToJira\\\\chromedriver.exe\");\n // Create a new instance of the Chrome driver\n this.driver = new ChromeDriver();\n }", "public static WebDriver getDriver(){\n if(driverPool.get()==null) {\n synchronized ((Driver.class)) {\n\n\n\n\n /*\n we read our browser type from configuration file using .getProperty method we\n creating in configuration Reader class.\n */\n String browserType = ConfigurationReader.getProperty(\"browser\");\n\n /*\n Depending on the browser type our switch statement will determine\n to open specific type of browser/driver\n */\n\n // we use this not testBase we use this test base just for practice\n switch (browserType) {\n\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driverPool.set(new ChromeDriver());\n driverPool.get().manage().window().maximize();\n driverPool.get().manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n break;\n\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driverPool.set(new FirefoxDriver());\n driverPool.get().manage().window().maximize();\n driverPool.get().manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n break;\n\n }\n }\n\n }\n /*\n Same driver instance will be return every time we call Driver.getDriver(); method\n */\n return driverPool.get();\n }", "private void initChromeDriver(String appUrl) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"Drivers\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(appUrl);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t}", "@BeforeMethod\r\n\tpublic void setUp() {\n\t\tdriver = new FirefoxDriver();\r\n\t\tbaseUrl = \"https://www.google.com/\";\r\n\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\tdriver.manage().window().maximize();\r\n\r\n\t\tdriver.get(baseUrl);\r\n\t}", "@Before\n public void Setup() { //this is done before every test, chrome driver is saved in a specific location\n\n System.setProperty(\"webdriver.chrome.driver\",\n Constant.CROMEDRIVER);\n\n driver = new ChromeDriver();\n }", "private void setup() {\n if (config.getProperty(\"browser\").equals(\"chrome\")) {\n System.setProperty(\"webdriver.chrome.driver\", chromeDriverPath);\n driver = new ChromeDriver();\n } else if (config.getProperty(\"browser\").equals(\"firefox\")) {\n System.setProperty(\"webdriver.gecko.driver\", geckoDriverPath);\n driver = new FirefoxDriver();\n }\n\n event_driver = new EventFiringWebDriver(driver);\n // Now create object of EventListerHandler to register it with EventFiringWebDriver\n eventListener = new WebEventListener();\n event_driver.register(eventListener);\n driver = event_driver;\n\n wait = new WebDriverWait(driver, 30);\n }", "public static final BaseRemoteWebDriver getDriver() {\r\n\t\tString browser = ConfigProperties.BROWSER;\r\n\t\tif (driver == null) {\r\n\r\n\t\t\tif (browser.equalsIgnoreCase(FIREFOX)) {\r\n\r\n\t\t\t\tlog.info(\"initializing 'firefox' driver...\");\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities\r\n\t\t\t\t\t\t.firefox();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse if (browser.equalsIgnoreCase(CHROME)) {\r\n\r\n\t\t\t\tif (isPlatformWindows())\r\n\r\n\t\t\t\t\tlog.info(\"initializing 'chrome' driver...\");\r\n\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\tcapabilities.setCapability(\r\n\t\t\t\t\t\tCapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, \"ignore\");\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse if (browser.equalsIgnoreCase(INTERNET_EXPLORER)) {\r\n\r\n\t\t\t\tAssert.assertTrue(isPlatformWindows(),\r\n\t\t\t\t\t\t\"Internet Explorer is not supporting in this OS\");\r\n\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities\r\n\t\t\t\t\t\t.internetExplorer();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlog.info(\"initializing 'internet explorer' driver...\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse if (browser.equalsIgnoreCase(SAFARI)) {\r\n\r\n\t\t\t\tAssert.assertTrue(isPlatformWindows() || isPlatformMac(),\r\n\t\t\t\t\t\t\"Safari is not supporting in this OS\");\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.safari();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\telse if (browser.equalsIgnoreCase(\"html\")) {\r\n\r\n\t\t\t\tlog.info(\"initializing 'html' driver...\");\r\n\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities\r\n\t\t\t\t\t\t.htmlUnit();\r\n\t\t\t\tcapabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,\r\n\t\t\t\t\t\ttrue);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tdriver = new BaseRemoteWebDriver(new URL(\r\n\t\t\t\t\t\t\tConfigProperties.HUBURL), capabilities);\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn driver;\r\n\t}", "protected WebDriver getDriver() {\n return Web.getDriver(Browser.CHROME, server.getURL() + \"TEST\", By.className(\"AuO\"));\n }", "public void setupDriver(BrowserType btype) {\n\t\ttry {\n\t\t\tdriver = getBrowserObject(btype);\n\t\t\tlog.info(\"Initialized WebDriver \"+driver.hashCode());\n\t\t\tWaitHelper wait = new WaitHelper(driver);\n\t\t\twait.setImplicitWait(ObjectReader.reader.getImplicitWait(), TimeUnit.SECONDS);\n\t\t\twait.pageLoadTime(ObjectReader.reader.getPageLoadTime(), TimeUnit.SECONDS);\n\t\t\tdriver.manage().window().maximize();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@BeforeTest()\n\tpublic void initializemanager() {\n\t\tsetDriver(\"chrome\");\n\t\tdriver.get(getApplicationUrl(\"salesforce\"));\n\t\tdriver.manage().window().maximize();\n\t\tWebpageFactory.initializePageObjects(driver);\n\t\tDBUtil.createConnection();\n\t}", "@BeforeMethod(alwaysRun = true)\r\n\tpublic void testMethodSetup() {\r\n\t\tif (driver == null)\r\n\t\t\tinitializeDriver();\r\n\t\tlaunchURl();\r\n\t\twaitForPageLoad(1000);\r\n\t}", "@BeforeSuite(alwaysRun = true)\n\t protected void fetchSuiteConfiguration(ITestContext testContext) {\n\t\ttestUrl = testContext.getCurrentXmlTest().getParameter(\"selenium.url\");\n\t\t// testUrl = TestData.getURL();\n\t\tSystem.out.println(\"======\" + testUrl + \"=========\");\n\t}", "private WebDriver getDriver() {\n return new ChromeDriver();\n }", "public WebDriver WebDriverManager() throws IOException {\n\t\tFileInputStream fis = new FileInputStream(\n\t\t\t\tSystem.getProperty(\"user.dir\") + \"//src//test//resources//global.properties\");\n\t\tProperties prop = new Properties();\n\t\tprop.load(fis);\n\t\tString url = prop.getProperty(\"QAUrl\");\n\t\tString browser_properties = prop.getProperty(\"browser\");\n\t\tString browser_maven = System.getProperty(\"browser\");\n\t\t// result = testCondition ? value1 : value2\n\n\t\tString browser = browser_maven != null ? browser_maven : browser_properties;\n\n\t\tif (driver == null) {\n\n\t\t\tif (browser.equalsIgnoreCase(\"chrome\")) {\n\n\t\t\t\t// Setting system properties of ChromeDriver\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\") + \"\\\\src\\\\test\\\\resources\\\\chromedriver.exe\");\n\n\t\t\t\t// add after 111 version throwing errors\n\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\toptions.addArguments(\"--remote-allow-origins=*\");\n\n\t\t\t\t// Creating an object of ChromeDriver\n\t\t\t\tdriver = new ChromeDriver(options);// driver gets the life\n\n\t\t\t}\n\n\t\t\tif (browser.equalsIgnoreCase(\"firefox\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\limon.hossain\\\\eclipse-workspace\\\\libs\\\\geckodriver 5\");\n\n\t\t\t\tdriver = new FirefoxDriver();\n\t\t\t}\n\t\t\t// Specifiying pageLoadTimeout and Implicit wait\n\t\t\tdriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(5));\n\t\t\tdriver.manage().deleteAllCookies();\n\t\t\tdriver.manage().window().maximize();\n\n\t\t\t// launching the specified URL\n\t\t\tdriver.get(url);\n\t\t}\n\n\t\treturn driver;\n\n\t}", "private static String getBaseUrl() {\n StringBuilder url = new StringBuilder();\n url.append(getProtocol());\n url.append(getHost());\n url.append(getPort());\n url.append(getVersion());\n url.append(getService());\n Log.d(TAG, \"url_base: \" + url.toString());\n return url.toString();\n }", "public static String getBaseUrl() {\n return baseUrl;\n }", "public ChromeDriver build()\n\t{\n\t\ttry\n\t\t{\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\t\tURL url = ClassLoader.getSystemResource( metadata.getBinary() );\n\t\t\tSystem.setProperty( \"webdriver.chrome.driver\", new File( url.toURI() ).getAbsolutePath() );\n\t\t\tChromeOptions co = new ChromeOptions();\n\t\t\t//Map<String, Object> preferences = Maps.newHashMap();\n\t\t\t//preferences.put( \"browser.startup.homepage\", configuration.baseUrl().toString() );\n\t\t\t//preferences.put( \"browser.startup.page\", START_WITH_HOME_PAGE );\n\t\t\t//capabilities.setCapability( ChromeOptions.CAPABILITY, preferences );\n\t\t\tChromeDriver driver = new ChromeDriver( capabilities );\n\t\t\tdriver.get( configuration.baseUrl().toString() );\n\t\t\treturn driver;\n\t\t}\n\t\tcatch ( Exception e )\n\t\t{\n\t\t\tlogger.error( e.getMessage() );\n\t\t\tthrow new WebDriverException( e );\n\t\t}\n\t}", "private static WebDriver driver() {\n\t\treturn null;\r\n\t}", "@PostConstruct\n public void init() {\n try {\n this.host = config.getConnectionHost();\n this.port = config.getConnectionPort();\n this.uri = config.getConnectionUri();\n } catch (final Exception e) {\n throw new IllegalStateException(\"Test failure: \" + e.getMessage(), e);\n }\n }", "private void initialize(){\n if(uri != null)\n httpUriRequest = getHttpGet(uri);\n httpClient = HttpClients.createDefault();\n }" ]
[ "0.7286889", "0.71024334", "0.69714344", "0.6920432", "0.68465036", "0.6770932", "0.67541724", "0.671941", "0.6703488", "0.66824144", "0.6680412", "0.6654739", "0.66448736", "0.6610447", "0.6580567", "0.65762794", "0.65700597", "0.6535511", "0.6513957", "0.6500471", "0.6468845", "0.6442627", "0.6437694", "0.6437445", "0.6424081", "0.6421886", "0.64136046", "0.6410333", "0.6374486", "0.6363481", "0.6356779", "0.63564134", "0.63401765", "0.6316714", "0.63074994", "0.62981594", "0.62913144", "0.6280303", "0.62777793", "0.6262727", "0.62625104", "0.6253161", "0.62468404", "0.623477", "0.62136185", "0.6176422", "0.61750996", "0.6148114", "0.61442584", "0.6143934", "0.6130496", "0.61110604", "0.6110627", "0.6094423", "0.60723794", "0.60705334", "0.606464", "0.6058877", "0.6057819", "0.6056196", "0.60517526", "0.6050365", "0.6048189", "0.6028088", "0.6027631", "0.6020914", "0.6009286", "0.6002591", "0.5994923", "0.5993164", "0.5991748", "0.5989002", "0.59881586", "0.5979332", "0.5978198", "0.59670347", "0.59646076", "0.5963281", "0.5959189", "0.5944691", "0.5939366", "0.59327865", "0.59318554", "0.59304476", "0.59292144", "0.5922775", "0.5911474", "0.5903804", "0.59021837", "0.5898439", "0.5880318", "0.5878786", "0.5856258", "0.5851512", "0.5851072", "0.58456457", "0.583696", "0.5830309", "0.58278906", "0.58250815", "0.582112" ]
0.0
-1
This Method is used to set driver
public void setDriver(String browserName){ if(browserName==null){ browserName="firefox"; } if(browserName.equalsIgnoreCase("firefox")){ System.setProperty("webdriver.gecko.driver", FIREFOX_DRIVER_PATH); driver= new FirefoxDriver(); } if(browserName.equalsIgnoreCase("chrome")){ System.setProperty("webdriver.chrome.driver",CHROME_DRIVER_PATH); driver= new ChromeDriver(); } if(browserName.equalsIgnoreCase("ie")){ System.setProperty("webdriver.ie.driver",IE_DRIVER_PATH); driver= new InternetExplorerDriver(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDriver(String driver) {\r\n this.driver = driver;\r\n }", "public void setDriver(String driver) {\n this.driver = driver;\n saveProperties();\n }", "public void setDriver(final Driver driver) {\n\t\tthis.driver = driver;\n\t}", "protected void setDriver() throws Exception {\n\t\tswitch (browser.split(\"[-]\")[0].toLowerCase()) {\n\t\tcase \"firefox\":\n\t\t\tsetFirefoxDriver();\n\t\t\tbreak;\n\t\tcase \"chrome\":\n\t\t\t// runDocker();\n\t\t\tsetChromeDriver();\n\t\t\tbreak;\n\t\tcase \"ie\":\n\t\t\tsetIEDriver();\n\t\t\tbreak;\n\t\tcase \"edge\":\n\t\t\tsetEdgeDriver();\n\t\t\tbreak;\n\t\tcase \"safari\":\n\t\t\tsetSafariDriver();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tsetChromeDriver();\n\t\t\tbreak;\n\t\t}\n\t\tgetDriver().manage().window().maximize(); // Maximize the browser.\n\t\tgetDriver().manage().timeouts().implicitlyWait(defaultImplicitWaitTime, TimeUnit.SECONDS);\n\t}", "public void setDriverClass(String driverClass) {\n this.driverClass = driverClass;\n }", "public void setDriver(DatabaseDriver newDriver) {\r\n driver = newDriver;\r\n }", "public void setDriverDobj(JdbcDriver driver)\n {\n _driver = driver;\n }", "public void selectDriver();", "private void initDriver(){\r\n String browserToBeUsed = (String) jsonConfig.get(\"browserToBeUsed\");\r\n switch (browserToBeUsed) {\r\n case \"FF\":\r\n System.setProperty(\"webdriver.gecko.driver\", (String) jsonConfig.get(\"fireFoxDriverPath\"));\r\n FirefoxProfile ffProfile = new FirefoxProfile();\r\n // ffProfile.setPreference(\"javascript.enabled\", false);\r\n ffProfile.setPreference(\"intl.accept_languages\", \"en-GB\");\r\n\r\n FirefoxOptions ffOptions = new FirefoxOptions();\r\n ffOptions.setProfile(ffProfile);\r\n driver = new FirefoxDriver(ffOptions);\r\n break;\r\n case \"CH\":\r\n String driverPath = (String) jsonConfig.get(\"chromeDriverPath\");\r\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\r\n\r\n Map<String, Object> prefs = new HashMap<String, Object>();\r\n prefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n\r\n ChromeOptions options = new ChromeOptions();\r\n options.setExperimentalOption(\"prefs\", prefs);\r\n options.addArguments(\"--lang=en-GB\");\r\n driver = new ChromeDriver(options);\r\n break;\r\n case \"IE\":\r\n System.setProperty(\"webdriver.ie.driver\", (String) jsonConfig.get(\"ieDriverPath\"));\r\n\r\n InternetExplorerOptions ieOptions = new InternetExplorerOptions();\r\n ieOptions.disableNativeEvents();\r\n ieOptions.requireWindowFocus();\r\n ieOptions.introduceFlakinessByIgnoringSecurityDomains();\r\n driver = new InternetExplorerDriver(ieOptions);\r\n }\r\n\r\n driver.manage().window().maximize();\r\n }", "@Parameters({\"browser\"})\n\t@BeforeMethod\n\tpublic final void setDriver(String browser) throws Exception{\n\t\tsetBrowser = browser;\n\t\tswitch(browser){\n\t\t\n\t\tcase \"chrome\":\n\t\t\tWebDriverManager.chromedriver().setup();\n\t\t\twebDriver.set(new ChromeDriver());\n\t\tbreak;\n\t\t\n\t\tcase \"firefox\":\n\t\t\tWebDriverManager.firefoxdriver().setup();\n\t\t\twebDriver.set(new FirefoxDriver());\n\t\tbreak;\n\t\t\n\t\tcase \"ie\":\n\t\t\tWebDriverManager.edgedriver().setup();\n\t\t\twebDriver.set(new EdgeDriver());\n\t\tbreak;\n\t\t\n\t\tcase \"edge\":\n\t\t\t/*EdgeOptions options = new EdgeOptions();\n\t\t\t//options.setProxy(proxy)\n*/\t\t\tSystem.setProperty(\"webdriver.edge.driver\", resourcePath+\"Drivers/MicrosoftWebDriver.exe\");\n\t\t\tWebDriver driver = new EdgeDriver();\n\t\t\t//WebDriverManager.edgedriver().setup();\n\t\t\twebDriver.set(driver);\n\t\tbreak;\n\t\t\n\t\tcase \"safari\":\n\t\t\twebDriver.set(new SafariDriver());\n\t\t\n\t\t}\n\t}", "public void setDriver(java.lang.CharSequence value) {\n this.driver = value;\n }", "public export.serializers.avro.DeviceInfo.Builder setDriver(java.lang.CharSequence value) {\n validate(fields()[6], value);\n this.driver = value;\n fieldSetFlags()[6] = true;\n return this;\n }", "public void setDriverClassName(String driverClassName) {\n this.driverClassName = driverClassName;\n }", "private void setWebDriver() {\n if (Boolean.valueOf(System.getProperty(\"LOCAL_DRIVER\"))) {\n setLocalWebdriver();\n } else if (Boolean.valueOf(System.getProperty(\"REMOTE_DRIVER\"))) {\n setRemoteWebdriver();\n } else if (Boolean.valueOf(System.getProperty(\"SAUCE_DRIVER\"))) {\n setSauceWebdriver();\n } else {\n throw new WebDriverException(\"Type of driver not specified!!!\");\n }\n this.driver.get().manage().timeouts()\n .implicitlyWait(10, TimeUnit.SECONDS);\n if (browser.equalsIgnoreCase(\"internet explorer\")|browser.equalsIgnoreCase(\"firefox\")|browser.equalsIgnoreCase(\"chrome\")|browser.equalsIgnoreCase(\"safari\")) {\n\t\t\t//we only want to maximise the browser window for desktop browser, not devices.\n \tthis.driver.get().manage().window().maximize();\n\t\t}\n }", "private static void setDriver(String driverProperty, String driverPath) {\r\n if (System.getProperty(driverProperty) == null) {\r\n File driverFile = new File(driverPath);\r\n System.setProperty(driverProperty, driverFile.getAbsolutePath());\r\n }\r\n }", "public void setDriverName(String driverName) {\n this.driverName = driverName;\n }", "@Before\r\n\tpublic final void setDriver() {\n\t\tdriver = new Wizard();\r\n\t}", "@SuppressWarnings(\"static-access\")\n\tpublic void setWebDriver(WebDriver driver) {\n\t\tthis.driver = driver;\n\t}", "public void setJDBCDriver(Driver jdbcDriver)\n throws SQLException\n {\n DriverConfig driver;\n \n if (_driverList.size() > 0)\n driver = _driverList.get(0);\n else\n driver = createDriver();\n \n driver.setDriver(jdbcDriver);\n }", "public static void setDriver(WebDriver webDriver) {\n driver = webDriver;\n }", "private void setLocalWebdriver() {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setJavascriptEnabled(true);\n capabilities.setCapability(\"handlesAlerts\", true);\n switch (getBrowserId(browser)) {\n case 0:\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n driver.set(new InternetExplorerDriver(capabilities));\n break;\n case 1:\n driver.set(new FirefoxDriver(capabilities));\n break;\n case 2:\n driver.set(new SafariDriver(capabilities));\n break;\n case 3:\n driver.set(new ChromeDriver(capabilities));\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n }", "public void initializeDriver() {\n }", "public void setDbdriver(String dbdriver) {\n this.dbdriver = dbdriver;\n }", "public void setDriver(String driver) throws BuildException {\n jdbcDriver = driver;\n }", "@BeforeMethod\n public void setDriver() throws MalformedURLException {\n\n\n driver = WebDriverFactory.getDriver(WebDriverFactory.CHROME).get();\n\n\n loginPage = new LoginPage(driver);\n loginPageHelper = new LoginPageHelper(driver);\n menuHelper = new MenuHelper(driver);\n }", "public String getDriver() {\r\n return driver;\r\n }", "Driver getDriver();", "public void initDriver() {\n if (getBrowser().equals(\"firefox\")) {\n WebDriverManager.firefoxdriver().setup();\n if (System.getProperty(\"headless\") != null) {\n FirefoxOptions firefoxOptions = new FirefoxOptions();\n firefoxOptions.setHeadless(true);\n driver = new FirefoxDriver(firefoxOptions);\n } else {\n driver = new FirefoxDriver();\n }\n } else {\n WebDriverManager.chromedriver().setup();\n if (System.getProperty(\"headless\") != null) {\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.setHeadless(true);\n driver = new ChromeDriver(chromeOptions);\n } else {\n driver = new ChromeDriver();\n }\n }\n }", "@BeforeClass\n\tpublic static void configureDriver(){\n\t\tif(driver == null) {\n\t\t\tif(Constants.browserName.equalsIgnoreCase(\"chrome\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\rober\\\\Documents\\\\WebDrivers\\\\chromedriver_win32-89\"\n\t\t\t\t\t\t+ \"\\\\chromedriver.exe\");\n\t\t\t\tdriver = new ChromeDriver();\n\t\t\t} else if(Constants.browserName.equalsIgnoreCase(\"firefox\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\rober\\\\Documents\\\\WebDrivers\\\\chromedriver_win32-89\"\n\t\t\t\t\t\t+ \"\\\\geckodriver.exe\");\n\t\t\t\tdriver = new FirefoxDriver();\n\t\t\t} else if(Constants.browserName.equalsIgnoreCase(\"edge\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.edge.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\rober\\\\Documents\\\\WebDrivers\\\\chromedriver_win32-89\"\n\t\t\t\t\t\t+ \"\\\\msedgedriver.exe\");\n\t\t\t\tdriver = new EdgeDriver();\n\t\t\t} else if(Constants.browserName.equalsIgnoreCase(\"ie\")) {\n\t\t\t\tSystem.setProperty(\"webdriver.ie.driver\",\n\t\t\t\t\t\t\"C:\\\\Users\\\\rober\\\\Documents\\\\WebDrivers\\\\chromedriver_win32-89\"\n\t\t\t\t\t\t+ \"\\\\IEDriver.exe\");\n\t\t\t\tdriver = new InternetExplorerDriver();\n\t\t\t}\n\t\t}\n\t\t\n\t\tdriver.manage().deleteAllCookies();\n\t\tdriver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);\n\t\tdriver.manage().timeouts().pageLoadTimeout(30, TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tdriver.get(Constants.url);\n\t\t\n\t}", "public String getDriver() {\n return driver;\n }", "public String getDriver() {\n return driver;\n }", "private void setRemoteWebdriver() {\n\n switch (getBrowserId(browser)) {\n case 0:\n capabilities = DesiredCapabilities.internetExplorer();\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n break;\n case 1:\n\t\tFirefoxProfile profile = new FirefoxProfile();\n \tprofile.setEnableNativeEvents(true);\n capabilities = DesiredCapabilities.firefox();\n\t\tcapabilities.setCapability(FirefoxDriver.PROFILE, profile);\n \tcapabilities.setJavascriptEnabled(true);\n \tcapabilities.setCapability(\"marionette\", false);\n \tcapabilities.setCapability(\"acceptInsecureCerts\", true);\n break;\n case 2:\n capabilities = DesiredCapabilities.safari();\n break;\n case 3:\n capabilities = DesiredCapabilities.chrome();\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n capabilities.setCapability(\"javascriptEnabled\", true);\n capabilities.setCapability(\"platform\", platform);\n capabilities.setCapability(\"version\", version);\n capabilities.merge(extraCapabilities);\n\n try {\n this.driver.set(new RemoteWebDriver(new URL(\"http://\"\n + System.getProperty(\"GRID_HOST\") + \":\"\n + System.getProperty(\"GRID_PORT\") + \"/wd/hub\"),\n capabilities));\n } catch (MalformedURLException e) {\n LOGGER.log(Level.INFO,\n \"MalformedURLException in setRemoteWebdriver() method\", e);\n }\n }", "private void setWebdriver() throws Exception {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir + fileSeparator + \"lib\" + fileSeparator + \"chromedriver.exe\");\n\t\tcapability = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--disable-extensions\");\n\t\toptions.addArguments(\"disable-infobars\");\n\t\tcapability.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tdriver = new ChromeDriver(capability);\n\t\tdriver.manage().deleteAllCookies();\n\t\t_eventFiringDriver = new EventFiringWebDriver(driver);\n\t\t_eventFiringDriver.get(getUrl());\n\t\t_eventFiringDriver.manage().window().maximize();\n\n\t}", "public void setChromeDriver(){\n System.setProperty(\"webdriver.chrome.driver\", browserDriverPath);\n seleniumDriver = new ChromeDriver();\n }", "public void initialization() {\n\t\t\t\n\t\t if(prop.getProperty(\"browser\").equals(\"chrome\")) {\n\t\t \t\n\t\t \tWebDriverManager.chromedriver().setup();\n\t\t\t\t\n\t\t\t\t driver=new ChromeDriver();\n\t\t\t\t\n\t\t } else if(prop.getProperty(\"browser\").equals(\"firefox\")) {\n\t\t \t\n\t\t \tWebDriverManager.firefoxdriver().setup();\n\t\t\t\t\n\t\t\t\t driver=new FirefoxDriver();\n\t\t\t\t \n\t\t } else if(prop.getProperty(\"browser\").equals(\"edge\")) {\n\t\t \tWebDriverManager.edgedriver().setup();\n\t\t\t\t\n\t\t\t\t driver=new EdgeDriver();\n\t\t \t\n\t\t }\n\t\t\t\n\t }", "public void setStorageServerDriver(SCStorageServerDriver driver);", "@Before\n public void setWebDriver() throws IOException {\n System.setProperty(\"webdriver.chrome.driver\", DRIVER_PATH);\n ChromeOptions chromeOptions = new ChromeOptions();\n chromeOptions.addArguments(\"start-maximized\");\n driver = new ChromeDriver(chromeOptions);\n }", "private void setSauceWebdriver() {\n\n switch (getBrowserId(browser)) {\n case 0:\n capabilities = DesiredCapabilities.internetExplorer();\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n break;\n case 1:\n capabilities = DesiredCapabilities.firefox();\n break;\n case 2:\n capabilities = DesiredCapabilities.safari();\n break;\n case 3:\n capabilities = DesiredCapabilities.chrome();\n break;\n case 4:\n capabilities = DesiredCapabilities.iphone();\n capabilities.setCapability(\"deviceName\",\"iPhone Simulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n case 5:\n capabilities = DesiredCapabilities.iphone();\n capabilities.setCapability(\"deviceName\",\"iPad Simulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n case 6:\n capabilities = DesiredCapabilities.android();\n capabilities.setCapability(\"deviceName\",\"Android Emulator\");\n capabilities.setCapability(\"device-orientation\", \"portrait\");\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n capabilities.merge(extraCapabilities);\n capabilities.setCapability(\"javascriptEnabled\", true);\n capabilities.setCapability(\"platform\", platform);\n capabilities.setCapability(\"version\", version);\n\n try {\n this.driver.set(new RemoteWebDriver(new URL(System\n .getProperty(\"SAUCE_KEY\")), capabilities));\n } catch (MalformedURLException e) {\n LOGGER.log(Level.INFO,\n \"MalformedURLException in setSauceWebdriver() method\", e);\n }\n }", "void createDriver(Driver driver);", "public String getDriverClass() {\n return driverClass;\n }", "private void setIEDriver() throws Exception {\n\t\tcapabilities = DesiredCapabilities.internetExplorer();\n\t\t// capabilities.setCapability(\"ignoreProtectedModeSettings\", true);\n\t\t// capabilities.setCapability(\"ignoreZoomSetting\", true);\n\t\t// capabilities.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION,\n\t\t// true);\n\t\tcapabilities.setJavascriptEnabled(true);\n\n\t\tInternetExplorerOptions ieOptions = new InternetExplorerOptions();\n\t\tieOptions.destructivelyEnsureCleanSession();\n\t\tieOptions.ignoreZoomSettings();\n\t\tieOptions.setCapability(\"ignoreProtectedModeSettings\", true);\n\t\tieOptions.merge(capabilities);\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", ieDriverLocation);\n\t\t\tmyDriver = new InternetExplorerDriver(ieOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultIEVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultIEVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" IE-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", ieDriverLocation);\n\t\t\tmyDriver = new InternetExplorerDriver(ieOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}", "void updateDriver(Driver driver);", "public void setDriverLocation(String driverLocation) {\n\t\tthis.driverLocation = driverLocation;\n\t}", "public static WebDriver setupDriver()\r\n\t{\r\n\t driver = getWebDriver();\r\n\t return driver;\r\n\t}", "public static void setChromeDriverProperty() {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\automation_new_code\\\\onfs.alip.accounting\\\\BrowserDriver/chromedriver.exe\");\n\t\t}", "public abstract String getDriver();", "public static void setEmptyDriver() {\n\t\tdriver = null;\n\t}", "public Start (WebDriver driver) {\n\t\tthis.driver=driver;\n\t}", "public void getDriver() {\n\t\tWebDriverManager.chromedriver().setup();\n\t\tdriver = new ChromeDriver();\n\t}", "public static WebDriver getDriver(){\n if(driver==null){\n //get the driver type from properties file\n\n String browser=ConfigurationReader.getPropery(\"browser\");\n switch(browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver=new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver=new FirefoxDriver();\n }\n }\n\n return driver;\n }", "public void startDriver();", "@Test\n public void testSetScriptDriver_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n ScriptDriver driver = ScriptDriver.SilkPerformer;\n\n fixture.setScriptDriver(driver);\n\n }", "private void setChromeDriver() throws Exception {\n\t\t// boolean headless = false;\n\t\tHashMap<String, Object> chromePrefs = new HashMap<String, Object>();\n\t\tchromePrefs.put(\"profile.default_content_settings.popups\", 0);\n\t\tchromePrefs.put(\"download.default_directory\", BasePage.myTempDownloadsFolder);\n\t\tchromeOptions.setExperimentalOption(\"prefs\", chromePrefs);\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\n\t\tchromeOptions.addArguments(\"disable-popup-blocking\");\n\t\tchromeOptions.addArguments(\"--disable-extensions\");\n\t\tchromeOptions.addArguments(\"start-maximized\");\n\n\t\t/*\n\t\t * To set headless mode for chrome. Would need to make it conditional\n\t\t * from browser parameter Does not currently work for all tests.\n\t\t */\n\t\t// chromeOptions.setHeadless(true);\n\n\t\tif (runLocation.toLowerCase().equals(\"smartbear\")) {\n\t\t\tReporter.log(\"-- SMARTBEAR: standard capabilities. Not ChromeOptions\", true);\n\t\t\tcapabilities = new DesiredCapabilities();\n\t\t} else {\n\t\t\tcapabilities = DesiredCapabilities.chrome();\n\t\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);\n\t\t}\n\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), capabilities);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultChromeVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t \n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" Chrome-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromeDriverLocation);\n\t\t\tmyDriver = new ChromeDriver(chromeOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}", "public void setURL(String url)\n throws ConfigException\n {\n DriverConfig driver;\n \n if (_driverList.size() > 0)\n driver = _driverList.get(0);\n else\n throw new ConfigException(L.l(\"The driver must be assigned before the URL.\"));\n \n driver.setURL(url);\n }", "@JsonProperty(\"driver\")\n public void setDriver(ToolComponent driver) {\n this.driver = driver;\n }", "@BeforeMethod\r\n\tpublic void Setup()\r\n\t{\n\t\tString strBrowserName=objConfig.getProperty(\"browser\");\r\n\t\tif(strBrowserName.equalsIgnoreCase(\"CHROME\"))\r\n\t\t{\r\n\t\t\tobjDriver=new ChromeDriver();\r\n\t\t}\r\n\t\telse if(strBrowserName.equalsIgnoreCase(\"FIREFOX\"))\r\n\t\t{\r\n\t\t\tobjDriver=new FirefoxDriver();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tobjDriver=new InternetExplorerDriver();\r\n\t\t}\r\n\t\t\r\n\t\t//To open the URL\r\n\t\t\r\n\t\tobjDriver.get(objConfig.getProperty(\"url\"));\r\n\t\t\r\n\t\t//To maximize the browser window.\r\n\t\tif(objConfig.getBooleanProperty(\"runFullScreen\"))\r\n\t\t\tobjDriver.manage().window().maximize();\r\n\r\n\t\t//To set the implicit wait time\r\n\t\tobjDriver.manage().timeouts().implicitlyWait(objConfig.getLongProperty(\"implicitTimeoutInSeconds\"), TimeUnit.SECONDS);\r\n\t\t\r\n\t\t\r\n\t}", "public void setDriverid(java.lang.String value) {\n this.driverid = value;\n }", "public void setupDriver(BrowserType btype) {\n\t\ttry {\n\t\t\tdriver = getBrowserObject(btype);\n\t\t\tlog.info(\"Initialized WebDriver \"+driver.hashCode());\n\t\t\tWaitHelper wait = new WaitHelper(driver);\n\t\t\twait.setImplicitWait(ObjectReader.reader.getImplicitWait(), TimeUnit.SECONDS);\n\t\t\twait.pageLoadTime(ObjectReader.reader.getPageLoadTime(), TimeUnit.SECONDS);\n\t\t\tdriver.manage().window().maximize();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void loadDriver() {\n /*\n * The JDBC driver is loaded by loading its class.\n * If you are using JDBC 4.0 (Java SE 6) or newer, JDBC drivers may\n * be automatically loaded, making this code optional.\n *\n * In an embedded environment, this will also start up the Derby\n * engine (though not any databases), since it is not already\n * running. In a client environment, the Derby engine is being run\n * by the network server framework.\n *\n * In an embedded environment, any static Derby system properties\n * must be set before loading the driver to take effect.\n */\n try {\n Class.forName(driver).newInstance();\n System.out.println(\"Loaded the appropriate driver\");\n } catch (ClassNotFoundException cnfe) {\n System.err.println(\"\\nUnable to load the JDBC driver \" + driver);\n System.err.println(\"Please check your CLASSPATH.\");\n cnfe.printStackTrace(System.err);\n } catch (InstantiationException ie) {\n System.err.println(\n \"\\nUnable to instantiate the JDBC driver \" + driver);\n ie.printStackTrace(System.err);\n } catch (IllegalAccessException iae) {\n System.err.println(\n \"\\nNot allowed to access the JDBC driver \" + driver);\n iae.printStackTrace(System.err);\n }\n }", "@BeforeMethod(alwaysRun = true)\n public static void setUp(){\n // ConfigReader.readProperties(Constants.CONFIGURATION_FILEPATH);\n ConfigReader.readProperties(Constants.CONFIGURATION_FILE);\n switch (ConfigReader.getPropertyValue(\"browser\")){\n case \"chrome\":\n //System.setProperty(\"webdriver.chrome.driver\", \"Drivers/chromedriver.exe\");\n WebDriverManager.chromedriver().setup();\n driver=new ChromeDriver();\n break;\n case \"firefox\":\n //System.setProperty(\"webdriver.gecko.driver\", \"Drivers/geckodriver.exe\");\n WebDriverManager.firefoxdriver().setup();\n driver=new FirefoxDriver();\n break;\n default:\n throw new RuntimeException(\"Invalid name of browser\");\n }\n driver.get(ConfigReader.getPropertyValue(\"url\"));\n driver.manage().window().maximize();\n //driver.manage().timeouts().implicitlyWait(Constants.IMPLICIT_WAIT, TimeUnit.SECONDS);\n }", "public void setDriverJar(String driverJar) {\n this.driverJar = driverJar;\n }", "@Before\n public void Setup() { //this is done before every test, chrome driver is saved in a specific location\n\n System.setProperty(\"webdriver.chrome.driver\",\n Constant.CROMEDRIVER);\n\n driver = new ChromeDriver();\n }", "public void setDrivers(PriorityBlockingQueue<Driver> drivers) {\n this.drivers = drivers;\n }", "public void setHttpDriver(HttpDriver httpDriver) {\n this.httpDriver = httpDriver;\n }", "private void initialize() {\n if (driver == null)\n createNewDriverInstance();\n }", "public void setDriverClass(String driverClass) throws PropertyVetoException {\n\t\tthis.dataSource.setDriverClass(driverClass);\n\t}", "public DatabaseOptions driver(String type) {\n this.driver = type;\n return this;\n }", "public void setId(int driverDBId);", "public boolean setDriverConfiguration( byte driverIdType, String driverId, DriverConfiguration configuration );", "private void initDriver() throws InvalidDriverException {\n\t\ttry {\n\t\t\tClass.forName(this.driverName);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// unable to load driver; invalid\n\t\t\tthrow new InvalidDriverException(Failure.DRIVER);\n\t\t}\n\t}", "private void setup() {\n if (config.getProperty(\"browser\").equals(\"chrome\")) {\n System.setProperty(\"webdriver.chrome.driver\", chromeDriverPath);\n driver = new ChromeDriver();\n } else if (config.getProperty(\"browser\").equals(\"firefox\")) {\n System.setProperty(\"webdriver.gecko.driver\", geckoDriverPath);\n driver = new FirefoxDriver();\n }\n\n event_driver = new EventFiringWebDriver(driver);\n // Now create object of EventListerHandler to register it with EventFiringWebDriver\n eventListener = new WebEventListener();\n event_driver.register(eventListener);\n driver = event_driver;\n\n wait = new WebDriverWait(driver, 30);\n }", "void setSeleniumHelper(SeleniumHelper helper) {\n seleniumHelper = helper;\n }", "public DefaultDataSourceBuilder<T> driverClassName(String driverClassName) {\n this.properties.put(\"driverClassName\", driverClassName);\n return this;\n }", "protected void init(WebDriver driver) {\n }", "@Parameters(\"browser\")\n private void switchBrowser(String browser) {\n if (browser.equals(DRIVER_TYPE.IE.name())) {\n System.setProperty(\"webdriver.ie.driver\", \"src/test/resources/driver/IEDriverServer.exe\");\n driver = new InternetExplorerDriver();\n } else {\n System.setProperty(\"webdriver.chrome.driver\", \"src/test/resources/driver/chromedriver.exe\");\n driver = new ChromeDriver();\n }\n }", "public void setID(Object caller, int id)\n\t{\n\t\tif (caller instanceof DriverManager)\n\t\t{\n\t\t\tdriverID = id;\n\t\t}\n\t}", "@BeforeMethod\n\tpublic void setUpMethod() {\n//\t\tDrivers.setChrome();\n//\t\tthis.driver = Drivers.getDriver();\n\t\tdriver.get(DataReaders.projectProperty(\"baseURL\"));\n\t}", "private static void setupDrivers(Application application) {\n\t\tJob2dDriver loggerDriver = new LoggerDriver();\n\t\tDriverFeature.addDriver(\"Logger driver\", loggerDriver);\n\n\t\tDrawPanelController drawerController = DrawerFeature.getDrawerController();\n\t\tJob2dDriver driver = new LineDriverAdapter(drawerController, LineFactory.getBasicLine(), \"basic\");\n\t\tDriverFeature.addDriver(\"Line Simulator\", driver);\n\t\tDriverFeature.getDriverManager().setCurrentDriver(driver);\n\n\t\tdriver = new LineDriverAdapter(drawerController, LineFactory.getSpecialLine(), \"special\");\n\t\tDriverFeature.addDriver(\"Special line Simulator\", driver);\n\t\tDriverFeature.updateDriverInfo();\n\n\t\tdriver = new LineDriverAdapter(drawerController, customizableLine, \"customizable\");\n\t\tDriverFeature.addDriver(\"Customizable Line\", driver);\n\t\tDriverFeature.updateDriverInfo();\n\t}", "public String getDriver()\n {\n return m_driverName;\n }", "@BeforeClass\n @Parameters({\"browser\", \"url\"})\n // Step 2: create a method with appropriate params\n void setup(String mBrowser, String mUrl){\n // Step 3: make use of the parameters\n if(mBrowser.equalsIgnoreCase(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\",\"C:/chromedriver_win32/chromedriver.exe\");\n driver = new ChromeDriver();\n }else if(mBrowser.equalsIgnoreCase(\"firefox\")){\n System.setProperty(\"webdriver.chrome.driver\",\"C:/firefox_win32/firefoxdriver.exe\");\n driver = new FirefoxDriver();\n }\n // Step 3: make use of the parameters\n driver.get(mUrl);\n }", "public org.mddarr.rides.event.dto.AvroRide.Builder setDriverid(java.lang.String value) {\n validate(fields()[2], value);\n this.driverid = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "public void setWebServiceDriver(WebServiceDriver driver) {\n this.getManagerStore().put(WebServiceDriverManager.class.getCanonicalName(),\n new WebServiceDriverManager(driver, this));\n }", "public static void setup(String browser) throws Exception{\n if(browser.equalsIgnoreCase(\"firefox\")){\n \tFile pathToBinary = new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox 41\\\\firefox.exe\");\n \tFirefoxBinary binary = new FirefoxBinary(pathToBinary);\n \tFirefoxDriver driver = new FirefoxDriver(binary, new FirefoxProfile());\n \t\n \t//System.setProperty(\"webdriver.firefox.driver\",\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n \t/*DesiredCapabilities capabilies = DesiredCapabilities.firefox();\t\t\t\n capabilies.getBrowserName();\n capabilies.getVersion();*/\n \t\t\t\n \t//create Firefox instance\t \n //driver = new FirefoxDriver(); \n System.out.println(\"Browser Used: \"+browser);\n }\t \n //Check if parameter passed is 'Chrome'\n // https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/chrome/ChromeOptions.html\n // http://www.programcreek.com/java-api-examples/index.php?api=org.openqa.selenium.remote.DesiredCapabilities (Singleton)\n else if(browser.equalsIgnoreCase(\"chrome\")){\t \t \n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n ChromeOptions opt = new ChromeOptions();\n opt.setBinary(\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n opt.setExperimentalOption(\"Browser\", \"Chrome\");\n opt.getExperimentalOption(\"version\");\n \n// DesiredCapabilities capabilies = DesiredCapabilities.chrome();\n// capabilies.setBrowserName(\"chrome\");\n// capabilies.setPlatform(Platform.WINDOWS);\n// capabilies.setVersion(\"38\");\n// DesiredCapabilities capabilities = new DesiredCapabilities();\n \n //Create Chrome instance\n driver = new ChromeDriver(opt);\t \n }\n \n //Check if parameter passed is 'Safari'\t\n else if(browser.equalsIgnoreCase(\"safari\")){\t \t \n \tSystem.setProperty(\"webdriver.safari.driver\",\"C:/safaridriver.exe\");\n \t\n \t//System.setProperty(\"webdriver.safari.noinstall\", \"true\");\n \tdriver = new SafariDriver();\n \t\n /*\tSafariOptions options = new SafariOptions();\n \tSafariDriver driver = new SafariDriver(options);\n \tDesiredCapabilities capabilities = DesiredCapabilities.safari();\n \tcapabilities.setCapability(SafariOptions.CAPABILITY, options);*/\n }\n \n //Check if parameter passed is 'IE'\t \n else if(browser.equalsIgnoreCase(\"ie\")){\n \t//String IE32 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_32.exe\"; //IE 32 bit\n\t\t\tString IE64 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_64.exe\"; //IE 64 bit\n \tSystem.setProperty(\"webdriver.ie.driver\",IE64);\n \t\n /* \tDesiredCapabilities capabilies = DesiredCapabilities.internetExplorer();\n \tcapabilies.setBrowserName(\"ie\");\n capabilies.getBrowserName();\n capabilies.getPlatform();\n capabilies.getVersion();*/\n \n \t//Create IE instance\n \tdriver = new InternetExplorerDriver();\n }\t \n else{\t \n //If no browser passed throw exception\t \n throw new Exception(\"Browser is not correct\");\t \n }\t \n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\n\t}", "JGraphicDriverConfig(/*JGraphicDriver driver*/) {\n//\t\tthis.driver = driver;\n\t}", "public DriverConfig createDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _driverList.add(driver);\n \n return driver;\n }", "public String getDriverName() {\n return driverName;\n }", "protected void loadDriver() {\n try {\n Class.forName(\"org.relique.jdbc.csv.CsvDriver\");\n this.setConnection(DriverManager.getConnection(\"jdbc:relique:csv:\" + this.getDirectory()));\n this.setStatement(this.getConnection().createStatement());\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace(System.out);\n System.exit(1);\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n System.exit(1);\n }\n }", "public void setUpDriver(BrowserType bType) throws Exception {\n ObjectRepo.driver = standAloneStepUp(bType);\n oLog.debug(\"InitializeWebDrive : \" + ObjectRepo.driver.hashCode());\n ObjectRepo.driver\n .manage()\n .timeouts()\n .pageLoadTimeout(ObjectRepo.reader.getPageLoadTimeOut(),\n TimeUnit.SECONDS);\n ObjectRepo.driver\n .manage()\n .timeouts()\n .implicitlyWait(ObjectRepo.reader.getImplicitWait(),\n TimeUnit.SECONDS);\n ObjectRepo.driver.manage().window().maximize();\n\n }", "protected WebDriver newDriver() {\n SupportedWebDriver supportedDriverType = Configuration.getDriverType();\n return webDriverFactory.newInstanceOf(supportedDriverType);\n }", "private void setDriverPathForBrowser(String browserName) {\n \t\n \tif ( !binariesPath.exists() ) throw new IllegalStateException(\"No path at \" + binariesPath.getAbsolutePath() );\n \t\n switch (browserName.toLowerCase()) {\n case \"firefox\":\n {\n if (isMac())\n {\n System.setProperty(\"webdriver.gecko.driver\", new File(binariesPath,\"/MAC/geckodriver-v0.19.0-macos.tar.gz/geckodriver-v0.19.0-macos.tar\").getAbsolutePath());\n }\n else if (isLinux())\n {\n System.setProperty(\"webdriver.gecko.driver\", new File(binariesPath, \"/Ubuntu/geckodriver\").getAbsolutePath());\n }\n else\n {\n System.setProperty(\"webdriver.gecko.driver\", new File(binariesPath, \"/Windows/geckodriver.exe\").getAbsolutePath());\n }\n break;\n }\n case \"chrome\": {\n if (isMac()) {\n System.setProperty(\"webdriver.chrome.driver\", new File(binariesPath, \"/MAC/chromedriver\").getAbsolutePath());\n } else if (isLinux()) {\n System.setProperty(\"webdriver.chrome.driver\",new File(binariesPath, \"/Ubuntu/chromedriver\").getAbsolutePath());\n } else {\n System.setProperty(\"webdriver.chrome.driver\",new File(binariesPath,\"/Windows/chromedriver.exe\").getAbsolutePath());\n }\n break;\n }\n case \"ie\":\n System.setProperty(\"webdriver.ie.driver\", new File(binariesPath,\"/Windows/IEDriverServer.exe\").getAbsolutePath());\n }\n }", "void setParentDriverName(String value)\r\n throws Exception;", "public void setPoolDataSource(ConnectionPoolDataSource poolDataSource)\n throws SQLException\n {\n DriverConfig driver;\n \n if (_driverList.size() > 0)\n driver = _driverList.get(0);\n else\n driver = createDriver();\n \n driver.setPoolDataSource(poolDataSource);\n }", "public WebDriver initDriver (Properties prop) {\r\n\t\tString browserName = prop.getProperty(\"browser\");\r\n\t\tif(browserName.equals(\"chrome\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"./src/test/resources/chrome/chromedriver.exe\");\r\n\t\t\tdriver = new ChromeDriver(optionsManager.getChromeOptions());\r\n\t\t}else if(browserName.equals(\"firefox\")) {\r\n\t\t\toptionsManager = new OptionsManager(prop);\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"./src/test/resources/firefox/geckodriver.exe\");\r\n\t\t\tdriver = new FirefoxDriver(optionsManager.getFirefoxOptions());\r\n\t\t}\r\n\t\t\r\n\t\teventDriver = new EventFiringWebDriver(driver);\r\n\t\teventListener = new WebEventListener();\r\n\t\teventDriver.register(eventListener);\r\n\t\tdriver = eventDriver;\r\n\t\t\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\tdriver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);\r\n\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\treturn driver;\r\n\t}", "public static String getDriver(){\n\t\treturn HIVE_DRIVER;\n\t}", "@Parameters(\"browser\")\n\t \n @BeforeTest\n // Passing Browser parameter from TestNG xml\n \n public void beforeTest(String browser){\n\t if(browser.equalsIgnoreCase(\"firefox\")){\n\t driver = new FirefoxDriver();\n\t \n\t }// If browser is IE, then do this\n\t else if (browser.equalsIgnoreCase(\"ie\")){ \n\t // Here I am setting up the path for my IEDriver\n\t System.setProperty(\"webdriver.ie.driver\", \"E:\\\\IEDriverServer.exe\");\n\t driver = new InternetExplorerDriver();\n\t } \n\t // Doesn't the browser type, lauch the Website\n\t browserHelper.setUp(driver);\n\t }", "@Override\n protected void startDriver(IOSCapabilities caps) {\n }", "@BeforeTest\n public void setup() {\n System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\User\\\\IdeaProjects\\\\LoginToJira\\\\chromedriver.exe\");\n // Create a new instance of the Chrome driver\n this.driver = new ChromeDriver();\n }", "public DatabaseDriver getDriver() {\r\n return driver;\r\n }", "@BeforeMethod(alwaysRun = true)\n public void browserSetup(){\n driver = new ChromeDriver();\n }", "private void ucitajDrajver()throws Exception{\r\n db.loadDriver();\r\n }" ]
[ "0.8342585", "0.795646", "0.79419905", "0.7493363", "0.7446583", "0.73701936", "0.73063886", "0.71367973", "0.71280605", "0.70533055", "0.70248556", "0.70244867", "0.69873816", "0.6982063", "0.6971997", "0.69592834", "0.690659", "0.68947256", "0.68106306", "0.6787552", "0.6787055", "0.678406", "0.6769182", "0.66936487", "0.66795295", "0.6673301", "0.6667794", "0.66464394", "0.6616519", "0.65910685", "0.65910685", "0.6585722", "0.6579637", "0.651066", "0.6505198", "0.64718634", "0.64458656", "0.6381691", "0.6372384", "0.63488925", "0.6318435", "0.6304779", "0.63005877", "0.6266924", "0.6244053", "0.6224728", "0.6223758", "0.6217734", "0.6214986", "0.62088287", "0.620778", "0.6201145", "0.6192261", "0.6191194", "0.61732364", "0.61474776", "0.6144528", "0.6137377", "0.6136466", "0.61157584", "0.61097175", "0.6109663", "0.6105739", "0.608602", "0.60848606", "0.60672474", "0.6065741", "0.6064946", "0.6045919", "0.603915", "0.6033313", "0.60266495", "0.60248804", "0.60153776", "0.60066026", "0.59796166", "0.5971135", "0.59651095", "0.59605527", "0.59604365", "0.5954884", "0.59450513", "0.59385026", "0.59218645", "0.5917997", "0.591798", "0.59152186", "0.59097856", "0.5905007", "0.5880335", "0.5879365", "0.5871151", "0.5869558", "0.58652073", "0.5858439", "0.5845904", "0.58223516", "0.58216316", "0.5813418", "0.58133715" ]
0.71379036
7
This Method is used for closing browser
@AfterMethod public void tearDown(){ driver.close(); driver.quit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void closeBrowser() {\n System.out.println(\"Browser closed\");}", "public void closeBrowser(){\n driver.quit();\n }", "public void closeBrowser(){\n\t driver.close();\n\t \t }", "public static void CloseBrowser() {\n\t\tBrowser.Driver.quit();\n\t}", "public static void closeBrowser() {\n\t\tLOG.info(\"Closing current browser window.\");\n\t\tConstants.driver.close();\n\t\tLOG.info(\"Closed current browser window.\");\n\n\t}", "public void closeBrowserSession() {\n\t\tdriver.quit();\n\t}", "public static void browserClose() {\r\n\t// Make sure we shut everything down to avoid memory leaks\r\n\tdriver.close();\r\n\tdriver.quit();\r\n\tdriver = null;\r\n}", "public void BrowserQuit() {\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- The Browser should be closed\");\r\n\t\ttry{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\t\t\tdriver.quit();\r\n\t\t\tSystem.out.println(\"Browser Closed\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-The Browser is closed\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- No Browser is opened currently\");\r\n\r\n\t\t}\r\n\r\n\t}", "public static void closeBrowser(){\n if(CHOSEN_BROWSER.equals(FIREFOX)) {\n if(driver != null) {\n driver.quit();\n return;\n }\n return;\n }\n if (driver != null){\n driver.close();\n driver.quit();\n }\n }", "public static void closeBrowser()\n\t{\n\t\t\tdriver.quit();\n\t\t\tBaseUI.logger.log(Status.INFO,ReadPropertiesFile.getBrowser()+\" is closed Successfully \");\n\t\t\treport.flush();\n\t\t\tlog.info(\"Closing Browser \\n\");\n\t}", "@After\n public void closeBrowser(){\n\n browserManager.setcloseBrowser();// calling browser method to close the browser\n }", "@Test (priority = 5)\n\t@Then(\"^Close browser$\")\n\tpublic void close_browser() throws Throwable {\n\t\t\n\t\tobjDriver.close();\n\t\tobjDriver.quit();\n\t\t\n\t}", "public void closeAllBrowser(){\r\n\tdriver.quit();\t\r\n\t}", "private void close() throws Exception {\n browser.getDriver().close();\n }", "@Override\n\t\t\tpublic void windowClosing(WebBrowserEvent arg0) {\n\t\t\t}", "public void close() {\r\n driver.quit();\r\n }", "@AfterTest\n\tpublic void closeBrowser() {\n\t\tdriver.close();\n\t}", "@AfterMethod\n\tpublic void quitBrowser(){\n\t\tbrowser.closeBrowser(driver);\n\t}", "public void close() {\n getCloseButton().click();\n }", "public void quitBrowser(){\n\t\t driver.quit();\n\t }", "public void close() {\n if (driver.get() != null) {\n driver.get().quit();\n driver.set(null);\n }\n }", "public void closeAllBrowsers() {\n\n driver.quit();\n\n\n }", "public static void quitBrowser() {\r\n\t\ttry {\r\n\t\t\t// Thread.sleep(3000);\r\n\t\t\tdriver.quit();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Driver instance does not exist \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@When(\"^user should close the browsers$\")\n\tpublic void user_should_close_the_browsers() throws Throwable {\n\t\tdriver.quit();\n\t}", "@AfterClass(description = \"After class: closing browser\")\n public void quitBrowser()\n {\n HTMLReport htmlReport = new HTMLReport();\n htmlReport.log(\"STARTING AfterClass\");\n htmlReport.logINFO(\"The browser is quit\");\n driver.quit();\n htmlReport.logINFO(\"The end of test reporting\");\n reports.endTest(test);\n htmlReport.logINFO(\"Saving all logs to file\");\n reports.flush();\n }", "public void close() {\r\n dispatchEvent(new WindowEvent(this, WindowEvent.WINDOW_CLOSING));\r\n }", "@AfterClass\n\tpublic void closeBrowser(){\n\t\tdriver.quit();\n\t}", "protected void closeWeb() {\n closeWeb(currentWeb());\n }", "public void close() {\n\t\tgetFrame().dispatchEvent(new WindowEvent(getFrame(), WindowEvent.WINDOW_CLOSING));\n\t\t\n\t}", "private void closeFrame()\n\t{\n\t\tSystem.exit(0);\n\t}", "public void closeWindow() {\n\t\tgetDriver().close();\n\n\t}", "public void exit()\r\n\t{\r\n\t\tmainFrame.exit();\r\n\t}", "private static void Close () {\n frame.setVisible (false);\n frame.dispose();\n System.exit(0);\n }", "public void closeWindow() throws Exception {\n\t\t\tthis.driver.close();\r\n\t\t}", "@AfterClass\n public void closeBrowser() throws IOException {\n driver.quit();\n }", "private void close() {\n WindowEvent winClose = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClose);\n \n }", "public void close(){\r\n \tStage stage = (Stage) exit.getScene().getWindow();\r\n\t stage.close();\r\n\t main.browserInteraction.close();\r\n }", "void close() {\n\t\t\n\t\tthis.frame.setVisible(false);\n\t\tthis.frame.dispose();\n\t\t\n\t}", "public void close() {\n seleniumDriver.close();\n }", "public void closeDriver() {\n driver.quit();\n }", "public void quit()\r\n {\r\n brokerage.logout(this);\r\n myWindow = null;\r\n }", "public boolean requestCloseWindow() \n {\n return true; \n }", "public static void quit() throws Exception\r\n\t{\r\n\t\t//Close IronWasp Connection\r\n\t\tString browser = FilesAndFolders.getPropValue(\"driverName\");\r\n\t\tif (browser.contentEquals(\"firefoxIronWasp\"))\r\n\t\t{\r\n\t\t\tIronWasp.workflowEnd();\t\t\t\r\n\t\t}\r\n\r\n\t\t// Closing Browser instance\r\n\t\tdriver.quit(); \r\n\t}", "public static void closeAllBrowser() {\n\t\tLOG.info(\"Closing all browser window.\");\n\t\tConstants.driver.quit();\n\t\tLOG.info(\"Closed all browser window.\");\n\t}", "public void close() {\n\t\tSystem.out.println(\"Scraper terminated\");\n\t}", "public void Exit(){\n\t\t\t\tclose();\n\t\t\t}", "@AfterMethod\r\n\tpublic void closeapp()\r\n\t{\n\t\tdriver.quit();\r\n\t}", "private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this, WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "public static void close() {\n\t\tfindWindow();\n\t\t\n\t\tuser32.SendMessageA(handle, CLOSE_COMMAND, 0x00000000, 0x00000000);\n\t}", "public void closeWindow() {\n\t\tdriver.close();\n\t\tdriver.switchTo().window(winHandleBefore);\n\t}", "public static void closeMe() {\n window.close();\n }", "public void close() {\r\n\t\t\r\n\t\tWindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\r\n\t\tToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\r\n\t}", "public void quitBrowsers() {\n\n\t\tgetDriver().quit();\n\t}", "@AfterMethod\n\tpublic void close(){\n\t\tquit();\n\t}", "public void closeAllBrowsers() {\r\n\t\ttry {\r\n\t\t\tif (driver != null) {\r\n\t\t\t\tdriver.quit();\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 void exit() {\r\n \t\t// Send a closing signat to main window.\r\n \t\tmainWindow.dispatchEvent(new WindowEvent(mainWindow, WindowEvent.WINDOW_CLOSING));\r\n \t}", "public void closeClick() {\n timeline.stop();\n threadWorker.shutDownExecutor();\n Platform.exit();\n }", "@Override\n public void closeWindow() {\n \n }", "void forceClose();", "private void close() {\n WindowEvent winClosingEvent = new WindowEvent(this,WindowEvent.WINDOW_CLOSING);\nToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "public void closeDown() {\n\t\tdispose();\n\n\t}", "@Override\n\tpublic void windowClose(CloseEvent e) {\n\t\t\n\t}", "public void close() {\n System.exit(0);\n }", "private void closeProgram()\n {\n window.close();\n }", "@Override\n public void windowClosing(WindowEvent we) {\n finishDialog();\n }", "public void close() {\t\t\n\t}", "@AfterSuite\n\tpublic void closeBrowser(){\n\t\t\n\t\ttry{\n\t\t\tdriver.close();\n\t\t\tThread.sleep(5000);\n\t\t\t//MailService_API.zip(System.getProperty(\"user.dir\")+\"\\\\test-output\\\\Hybrid Security Telepath Test Suite\");\n\t\t\t//MailService_API.Email(config.getProperty(\"sendTo\"), config.getProperty(\"sendCC\"), config.getProperty(\"sendBCC\"), config.getProperty(\"sendMailFrom\"), config.getProperty(\"sendMailPassword\"));\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "@AfterSuite (alwaysRun = true)\n public static void closeBrowser() {\n report.endTest(test);\n //line below will flush the report\n report.flush();\n\n\n //line below will open the report\n driver.get(\"C:\\\\Users\\\\zakir\\\\Documents\\\\MyMavenProject\\\\\" + reportPath);\n\n //line below will close the report\n //report.close();\n\n\n // driver.quit();\n }", "@JavascriptInterface\n public void finish() {\n OBLogger.e(\"CLOSRE WINDOW\");\n ((Activity) mContext).finish();\n }", "public void exit() {\r\n\t\tdispose();\r\n\t}", "public void closeDriver(){\n\t\tdriver.quit();\n\t\tlogger.info(\"End of Execution\");\n\t}", "protected void windowClosed() {\r\n\r\n\t\t// Exit\tapplication.\r\n\t\tSystem.exit(0);\r\n\t}", "public void close() {\n WindowEvent winClosingEvent = new WindowEvent(this, WindowEvent.WINDOW_CLOSING);\n Toolkit.getDefaultToolkit().getSystemEventQueue().postEvent(winClosingEvent);\n }", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\tSystem.exit(0);\t\n\t}", "@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "public void windowClosing(WindowEvent comeInWindowEvent) {\n\t\tGUICommon.mainFrame.dispose();\n\t\tSystem.exit(0);\n\t}", "public void close()\n {\n driver.close();\n }", "@Override\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.exit(0);\n\n\t\t\t}", "@Override\n public void windowClosing(WindowEvent e) {\n System.exit(0);\n // super.windowClosing(e);\n }", "@Override\n public void windowClosing(WindowEvent e) {\n System.exit(0);\n }", "public void windowClosing (WindowEvent e) {\n\t bf.shutdown ();\n\t System.exit (0);\n\t}", "public void close() {}", "public void close()\n {\n\n window.close();\n try\n {\n screen.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public void quitDriver() {\n webDriver.quit();\n webDriver = null;\n }", "@Override\n public void windowClosing(WindowEvent evt) {\n System.exit(0); // Terminate the program\n }", "@AfterTest\n\tpublic void CloseWindow() {\n\t\t//driver.close();\n\t}", "public void closeWindow() {\n\t\tframeUnableToBuyPopup.dispose();\n\t}", "public static void closeBrowser(WebDriver driver)\r\n\t{\r\n\t\tdriver.close();\r\n\t}", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\tSystem.exit(0);\n\t\t\n\t}", "public abstract void windowClose(CloseEvent e);", "public void close() {\n\t\tframe.setVisible(false);\n\t}", "public void windowClosing(WindowEvent e) {\n\t\t \t\tif (close){\n\t\t \t\t\tSystem.exit(0);\n\t\t \t\t}\n\t\t \t}", "public void close() {\r\n\t\tWindowEvent closeWindow = new WindowEvent(frame123, WindowEvent.WINDOW_CLOSING);\r\n\t\tToolkit.getDefaultToolkit().getSystemEventQueue().postEvent(closeWindow);\r\n\t}", "@Override\n public void windowClosing(WindowEvent evt) {\n System.exit(0); // Terminate the program\n }", "public void windowClosing(WindowEvent e) {\n System.exit(0);\n }", "public void close() {\r\n\t}", "@Override\n @Test\n public void closeWindow_selected() {\n // open a second page\n guiTestUIMap.testLink().click();\n checkLastStepStatus(TestStatus.PASSED);\n // close the main page\n aludraWebGUI.perform().closeWindows(\"el\", \"op\", GUITestUIMap.TEST_PAGE_TITLE);\n checkLastStepStatus(TestStatus.PASSED);\n // try to select the main page\n aludraWebGUI.perform().selectWindow(GUITestUIMap.TEST_PAGE_TITLE);\n // The following check fails for Google Chrome due to a Selenium RC issue which is not expected to be fixed\n // checkLastStepStatus(TestStatus.FAILEDAUTOMATION);\n }", "public void close() {\n\t\t\r\n\t}", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\tSystem.exit(0);\n\t}", "@Override\n\tpublic void windowClosing(WindowEvent e) {\n\t\tSystem.exit(0);\n\t}" ]
[ "0.85992223", "0.80941826", "0.7975943", "0.79627496", "0.79591197", "0.7925916", "0.787078", "0.7736346", "0.7711625", "0.76250595", "0.7620704", "0.7620437", "0.7599", "0.75739306", "0.7566753", "0.7558847", "0.7532206", "0.7477376", "0.74482536", "0.74252623", "0.73527026", "0.72907907", "0.7287008", "0.72391254", "0.7208274", "0.72028047", "0.72015446", "0.7174568", "0.71704066", "0.7146124", "0.713668", "0.71134394", "0.70950824", "0.7093057", "0.70691144", "0.7055231", "0.70455694", "0.70337284", "0.70321923", "0.7007993", "0.7004939", "0.70047706", "0.6995592", "0.6992314", "0.6987114", "0.6982367", "0.6979002", "0.6971169", "0.69519913", "0.69493955", "0.6949232", "0.69485426", "0.6948114", "0.69471353", "0.69392824", "0.69330615", "0.69202006", "0.69034195", "0.68933254", "0.6886186", "0.68801016", "0.68757355", "0.6872705", "0.68717605", "0.68642664", "0.68617874", "0.6853559", "0.6845679", "0.6844817", "0.68395054", "0.6830194", "0.68256843", "0.6822831", "0.6808202", "0.6796931", "0.67930377", "0.67916065", "0.67889315", "0.6787176", "0.6780378", "0.67783827", "0.6775943", "0.6770825", "0.6769066", "0.6763341", "0.67580605", "0.6756466", "0.67514575", "0.67465764", "0.67454255", "0.6736904", "0.67332596", "0.6730459", "0.67233723", "0.6712703", "0.6711738", "0.67097014", "0.67089605", "0.6696966", "0.66727614", "0.66727614" ]
0.0
-1
Retrieves the handle to the given schedule
protected int getScheduleHandle(JNASchedule schedule) { Integer handle = ((JNAScheduleAllocations)schedule.getAdapter(APIObjectAllocations.class)).getScheduleHandle(); return (handle!=null) ? handle : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JNASchedule getNextSchedule(JNASchedule schedule) {\n\t\tif (this.isDisposed()) {\n\t\t\tthrow new ObjectDisposedException(this);\n\t\t}\n\n\t\tif (schedule.isDisposed()) {\n\t\t\tthrow new ObjectDisposedException(schedule);\n\t\t}\n\t\t\n\t\tDHANDLE hSchedules = getAllocations().getSchedulesHandle();\n\t\t\n\t\tint hCurrSchedule = getScheduleHandle(schedule);\n\t\t\n\t\tif (hCurrSchedule==0) {\n\t\t\tthrow new DominoException(0, \"Handle of specified schedule is 0\");\n\t\t}\n\n\t\treturn LockUtil.lockHandle(hSchedules, (hSchedulesByVal) -> {\n\t\t\tIntByReference rethNextSchedule = new IntByReference();\n\t\n\t\t\tMemory schedulePtrMem = new Memory(Native.POINTER_SIZE);\n\t\t\tshort result = NotesCAPI.get().SchContainer_GetNextSchedule(hSchedulesByVal, hCurrSchedule, rethNextSchedule,\n\t\t\t\t\tschedulePtrMem);\n\t\t\tif (result==INotesErrorConstants.ERR_SCHOBJ_NOTEXIST) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tNotesErrorUtils.checkResult(result);\n\t\n\t\t\tlong peer = schedulePtrMem.getLong(0);\n\t\t\tif (peer==0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\tPointer schedulePtr = new Pointer(peer);\n\t\t\tNotesScheduleStruct retpNextSchedule = NotesScheduleStruct.newInstance(schedulePtr);\n\t\t\tretpNextSchedule.read();\n\t\t\t\n\t\t\tint scheduleSize = JNANotesConstants.scheduleSize;\n\t\t\tif (PlatformUtils.isMac() && PlatformUtils.is64Bit()) {\n\t\t\t\t//on Mac/64, this structure is 4 byte aligned, other's are not\n\t\t\t\tint remainder = scheduleSize % 4;\n\t\t\t\tif (remainder > 0) {\n\t\t\t\t\tscheduleSize = 4 * (scheduleSize / 4) + 4;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tPointer pOwner = retpNextSchedule.getPointer().share(scheduleSize);\n\t\t\tString owner = NotesStringUtils.fromLMBCS(pOwner, (retpNextSchedule.wOwnerNameSize-1) & 0xffff);\n\t\n\t\t\treturn new JNASchedule(this, retpNextSchedule, owner, rethNextSchedule.getValue());\n\t\t});\n\t}", "private JNASchedule getFirstSchedule() {\n\t\tif (this.isDisposed()) {\n\t\t\tthrow new DominoException(0, \"Schedule collection has been disposed\");\n\t\t}\n\n\t\tDHANDLE hSchedules = getAllocations().getSchedulesHandle();\n\t\t\n\t\treturn LockUtil.lockHandle(hSchedules, (hSchedulesByVal) -> {\n\t\t\tIntByReference rethObj = new IntByReference();\n\t\t\tMemory schedulePtrMem = new Memory(Native.POINTER_SIZE);\n\n\t\t\tshort result = NotesCAPI.get().SchContainer_GetFirstSchedule(hSchedulesByVal, rethObj, schedulePtrMem);\n\t\t\tif (result == INotesErrorConstants.ERR_SCHOBJ_NOTEXIST) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tNotesErrorUtils.checkResult(result);\n\t\t\t\n\t\t\tif (rethObj.getValue()==0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\tlong peer = schedulePtrMem.getLong(0);\n\t\t\tif (peer==0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tPointer schedulePtr = new Pointer(peer);\n\t\t\tNotesScheduleStruct retpSchedule = NotesScheduleStruct.newInstance(schedulePtr);\n\t\t\tretpSchedule.read();\n\t\t\t\n\t\t\tint scheduleSize = JNANotesConstants.scheduleSize;\n\t\t\tif (PlatformUtils.isMac() && PlatformUtils.is64Bit()) {\n\t\t\t\t//on Mac/64, this structure is 4 byte aligned, other's are not\n\t\t\t\tint remainder = scheduleSize % 4;\n\t\t\t\tif (remainder > 0) {\n\t\t\t\t\tscheduleSize = 4 * (scheduleSize / 4) + 4;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tPointer pOwner = retpSchedule.getPointer().share(scheduleSize);\n\t\t\tString owner = NotesStringUtils.fromLMBCS(pOwner, (retpSchedule.wOwnerNameSize-1) & 0xffff);\n\t\t\t\n\t\t\treturn new JNASchedule(this, retpSchedule, owner, rethObj.getValue());\n\t\t});\n\t}", "public ProgramScheduled getProgramScheduleById(int scheduleId);", "WorkingSchedule getById(Long workingScheduleId);", "public ScheduleDisplayInfo getScheduleDisplay (@WebParam(name = \"scheduleId\") String scheduleId,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;", "public Schedule getSchedule(String route, int direction){\r\n // A schedule to hold all the data returned from the query\r\n Schedule weekdayZero = new Schedule();\r\n // Fetch the route id given the route\r\n Cursor getData = getReadableDatabase().rawQuery(\"select _id from routes where route_long_name = '\" + route + \"'\", null);\r\n // Make sure to begin at the first element of the returned data\r\n getData.moveToFirst();\r\n // Store the Route Id\r\n int route_id = getData.getInt(0);\r\n // Calendar id: (90400,90448) - Monday To Friday\r\n final String query = \"select Routes.Route_long_Name, \" +\r\n \"Calendar._Id, Stops.Stop_Name, Stop_Times.Stop_Sequence, Stop_Times.Arrival_Time, routes.route_short_name \" +\r\n \"from Trips join Calendar on Trips.Service_Id=Calendar._Id \" +\r\n \"join Routes on Trips.Route_Id=Routes._Id \" +\r\n \"join Stop_Times on Trips._Id=Stop_Times.Trip_Id \" +\r\n \"join Stops on Stop_Times.Stop_Id=Stops._Id \" +\r\n \"where Calendar._Id in \" + getDayOfTheWeek() + \" \" +\r\n \"AND Trips.Route_Id = \" + route_id + \" \" +\r\n \"AND Trips.Direction_Id = \" + direction + \" \" +\r\n \"AND Stop_Times.Arrival_Time != '' \" +\r\n \"order by arrival_time asc\";\r\n getData.moveToFirst();\r\n getData = getReadableDatabase().rawQuery(query, null);\r\n while (getData.moveToNext()){\r\n weekdayZero.insertData(getData.getString(0), getData.getInt(1), getData.getString(2), getData.getInt(3)\r\n , getData.getString(4), getData.getString(5));\r\n }\r\n return weekdayZero;\r\n }", "java.lang.String getSchedule();", "protected Schedule getSchedule(String command, Calendar calendar) {\n List<Schedule> scheduleList = calendar.getSchedules();\n int index;\n\n try {\n index = Integer.parseInt(command) - 1;\n if (index < scheduleList.size() && !(index < 0)) {\n return scheduleList.get(index);\n } else {\n System.out.println(\"please choose a valid input\");\n return null;\n }\n } catch (NumberFormatException e) {\n if (command.equals(\"q\")) {\n return null;\n } else if (calendar.getSchedule(command) != null) {\n return calendar.getSchedule(command);\n } else {\n System.out.println(\"please choose a valid input\");\n return null;\n }\n }\n }", "public Schedule get(String arg0) {\n\t\treturn null;\n\t}", "public Schedule getSchedule() {\r\n\t\treturn schedule;\r\n\t}", "public int getSchedule_id() {\r\n return schedule_id;\r\n }", "Schedule createSchedule();", "public ScheduleType getScheduleType();", "public Schedule getSchedule() {\n\n return schedule;\n }", "@RequestMapping(\"/Scheduling/findById\")\r\n\t@ResponseBody\r\n\tpublic Optional<Scheduling> findById(long scheduleId) {\r\n\t\treturn schedulingService.findById(scheduleId);\r\n\t}", "public String getSchedule() {\n return schedule;\n }", "@Override\n\tpublic PerformScheduleBBSDto getPerformScheduleBBSDto(int perform_schedule_seq) {\n\t\treturn dao.getPerformScheduleBBSDto(perform_schedule_seq);\n\t}", "Schedule selectByPrimaryKey(Integer id);", "long getScheduleID() {return mScheduleID; }", "public interface ScheduleService {\n BasicSchedule getBasicScheduleByHostelIdAndRoomType(long hostelId, RoomType type);\n\n /**\n * 获得最近一年的酒店基本计划\n *\n * @param hostelId\n * @return\n */\n List<BasicSchedule> getBasisSchedulesByHostelId(long hostelId);\n\n void modifyBasisSchedule(BasicSchedule basicSchedule);\n\n /**\n * 获得最近一年的酒店特殊计划\n *\n * @param hostelId\n * @return\n */\n List<SpecialSchedule> getSpecialScheduleByHostelId(long hostelId);\n\n void modifySpecialSchedule(SpecialSchedule specialSchedule);\n\n void addSpecialSchedule(SpecialSchedule specialSchedule);\n\n void deleteSpecialSchedule(SpecialSchedule specialSchedule);\n\n SpecialSchedule getSpecialSchedule(long hostelId, RoomType roomType, Date date);\n}", "io.opencannabis.schema.commerce.CommercialOrder.OrderScheduling getScheduling();", "public Schedule getScheduleForSelectedStopAndRoute(String route, int direction, int stopId){\n Schedule selectedStopSchedule = new Schedule();\r\n // Fetch the route id given the route\r\n Cursor getData = getReadableDatabase().rawQuery(\"select _id from routes where route_long_name = '\" + route + \"'\", null);\r\n // Make sure to begin at the first element of the returned data\r\n getData.moveToFirst();\r\n // Store the Route Id\r\n int route_id = getData.getInt(0);\r\n // Calendar id: (90400,90448) - Monday To Friday\r\n final String query = \"select Routes.Route_long_Name, \" +\r\n \"Calendar._Id, Stops.Stop_Name, Stop_Times.Stop_Sequence, Stop_Times.Arrival_Time, routes.route_short_name \" +\r\n \"from Trips join Calendar on Trips.Service_Id=Calendar._Id \" +\r\n \"join Routes on Trips.Route_Id=Routes._Id \" +\r\n \"join Stop_Times on Trips._Id=Stop_Times.Trip_Id \" +\r\n \"join Stops on Stop_Times.Stop_Id=Stops._Id \" +\r\n \"where Calendar._Id in \" + getDayOfTheWeek() + \" \" +\r\n \"AND Trips.Route_Id = \" + route_id + \" \" +\r\n \"AND Trips.Direction_Id = \" + direction + \" \" +\r\n \"AND Stop_Times.Arrival_Time != '' \" +\r\n \"AND stops._id = \" + stopId + \" \" +\r\n \"order by arrival_time asc\";\r\n getData.moveToFirst();\r\n getData = getReadableDatabase().rawQuery(query, null);\r\n while (getData.moveToNext()){\r\n selectedStopSchedule.insertData(getData.getString(0), getData.getInt(1), getData.getString(2), getData.getInt(3)\r\n , getData.getString(4), getData.getString(5));\r\n }\r\n return selectedStopSchedule;\r\n }", "public ScheduleFrom getScheduleFrom()\r\n {\r\n return (m_scheduleFrom);\r\n }", "com.google.cloud.compute.v1.Scheduling getScheduling();", "ScheduleStartType getScheduleStart();", "@RequestMapping(method = RequestMethod.GET, value=\"/findSchedule\")\n public ResponseEntity<?> findSchedule(@RequestParam(value=\"idSchedule\") int idSchedule){\n try{\n Schedule schedule = scheduleService.findSchedule(idSchedule);\n return ResponseEntity.ok().body(schedule);\n }catch (ResponseException e){\n return ResponseEntity.status(e.getResponseStatus()).body(e.getMessage());\n }catch (Exception e){\n return ResponseEntity.status(500).body(e.getMessage());\n }\n }", "public void requestSchedule(AsynchronousScheduleResponseHandler asrh) throws RemoteException {\n\n\t\tAsynchResponder ar = new AsynchResponder(asrh);\n\t\t(new Thread(ar)).start();\n\n\t}", "com.google.cloud.gkebackup.v1.BackupPlan.Schedule getBackupSchedule();", "TimerSchedule createTimerSchedule();", "public static void queriedScheduleInformation(Activity context) {\n\n // Get tracker\n Tracker tracker = ((GlobalEntity) context.getApplicationContext())\n .getTracker(TrackerName.APP_TRACKER);\n if (tracker == null) {\n return;\n }\n\n // Build and send an Event\n tracker.send(new HitBuilders.EventBuilder()\n .setCategory(\"Info Search [Schedule]\")\n .setAction(\"querySchedule\").setLabel(\"querySchedule\").build());\n }", "List<WorkingSchedule> getByPlaceId(Long placeId);", "public void setSchedule(Schedule schedule) {\r\n\t\tthis.schedule = schedule;\r\n\t}", "public SpaceSchedule getSchedule() {\n\t\treturn null;\n\t}", "public ISchedulingRule getSchedulingRule(IDeploymentTarget target) {\n return null;\r\n }", "public int getScheduleMethod() {\n return scheduleMethod;\n }", "public List<ScheduleDisplayInfo> getScheduleDisplaysByIds(@WebParam(name = \"scheduleIds\") List<String> scheduleIds,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;", "int getHandle();", "int getHandle();", "int getHandle();", "public String getHandle() {\r\n return handle;\r\n }", "public void setSchedule_id(int schedule_id) {\r\n this.schedule_id = schedule_id;\r\n }", "com.google.ads.googleads.v6.resources.AdScheduleView getAdScheduleView();", "public TaskProcessorHandle getHandle() {\n\treturn new TaskProcessorHandle(this);\n }", "io.opencannabis.schema.commerce.CommercialOrder.SchedulingType getScheduling();", "public String getPlacementRoadshowSchedule() {\n return placementRoadshowSchedule;\n }", "private void handleSchedule(ToDoSchedule todoSchedule)\r\n throws ToDoServiceDelegateException {\r\n\r\n if (todoSchedule.getInitiationDate().before(new Date())) {\r\n\r\n ToDo basis = todoSchedule.getToDo();\r\n\r\n ToDo scheduledTodo = null;\r\n scheduledTodo = (ToDo) basis.clone();\r\n scheduledTodo.setDeadlineTimestamp(new Date());\r\n scheduledTodo.setComplete(false);\r\n scheduledTodo.setId(null);\r\n\r\n this.getTodoServiceDelegate().save(scheduledTodo);\r\n\r\n }\r\n }", "java.lang.String getSnapshotCreationSchedule();", "public JobEntry getJob(String jobId)\n {\n JobEntry je = null;\n\n try\n {\n je = schedulerService.getJob(Integer.parseInt(jobId));\n }\n catch (TurbineException e)\n {\n log.error(\"Could not retreive job id #{}\", jobId, e);\n }\n\n return je;\n }", "public String getScheduleRow() {\n\t\treturn uSRow;\n\t}", "public CanaryScheduleOutput getSchedule() {\n return this.schedule;\n }", "ServerScheduledEvent getServerScheduledEvent();", "public IScheduleBCF getScheduleBCF()\r\n\t{\r\n\t\treturn scheduleBCF;\r\n\t}", "void setSchedule(java.lang.String schedule);", "public String getHandle() {\n return this.handle;\n }", "public Object getHandle(int executableID) {\n\t\t/* get Grpc*Handle by executableID */\n\t\tngLog.printLog(\n\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL, \n\t\t\tNgLog.LOGLEVEL_DEBUG,\n\t\t\tthis,\n\t\t\t\"NgGrpcClient#getHandle()\");\n\t\t\n\t\tObject handle;\n\t\tif ((handle = getFunctionHandle(executableID)) != null) {\n\t\t\t/* found FunctionHandle */\n\t\t\treturn handle;\n\t\t}\n\t\tif ((handle = getObjectHandle(executableID)) != null) {\n\t\t\t/* found ObjectHandle */\n\t\t\treturn handle;\n\t\t}\n\t\t\n\t\t/* not found handle */\n\t\treturn null;\n\t}", "public Scheduler getScheduler()\r\n/* 30: */ {\r\n/* 31: 73 */ return this.scheduler;\r\n/* 32: */ }", "public IGenScheduleHandler create() throws CreateException, RemoteException;", "public I getHandle(Worker<?, ?> sender, int latency) {\n\t\tif (sender == null)\n\t\t\tthrow new NullPointerException();\n\t\tHandle handler = new Handle(sender, recipients, constraints.get(sender));\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tI handle = (I)Proxy.newProxyInstance(klass.getClassLoader(), new Class<?>[]{klass}, handler);\n\t\treturn handle;\n\t}", "public String getHandle(final WinRefEx hWnd) {\n\t\treturn (hWnd == null) ? null : getHandle(TitleBuilder.byHandle(hWnd));\n\t}", "public ServiceQueue getManager(String route) {\n return route != null && registry.containsKey(route)? registry.get(route).getManager() : null;\n }", "private Object readResolve() throws ObjectStreamException {\n return ctx.grid().scheduler();\n }", "public String create(Schedule arg0) {\n\t\treturn null;\n\t}", "public Schedule create() {\n\n\t\tSchedule result;\n\n\t\tresult = new Schedule();\n\n\t\treturn result;\n\t}", "public List<WorkoutSchedule> getSchedules() {\n if (schedules == null) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n WorkoutScheduleDao targetDao = daoSession.getWorkoutScheduleDao();\n List<WorkoutSchedule> schedulesNew = targetDao._queryWorkout_Schedules(id);\n synchronized (this) {\n if(schedules == null) {\n schedules = schedulesNew;\n }\n }\n }\n return schedules;\n }", "public String getHandle(final String title) {\n\t\treturn getHandle(title, null);\n\t}", "@Override\n\tpublic InterviewSchedule fetchByPrimaryKey(Serializable primaryKey)\n\t\tthrows SystemException {\n\t\tInterviewSchedule interviewSchedule = (InterviewSchedule)EntityCacheUtil.getResult(InterviewScheduleModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\tInterviewScheduleImpl.class, primaryKey);\n\n\t\tif (interviewSchedule == _nullInterviewSchedule) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (interviewSchedule == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tinterviewSchedule = (InterviewSchedule)session.get(InterviewScheduleImpl.class,\n\t\t\t\t\t\tprimaryKey);\n\n\t\t\t\tif (interviewSchedule != null) {\n\t\t\t\t\tcacheResult(interviewSchedule);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tEntityCacheUtil.putResult(InterviewScheduleModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\t\tInterviewScheduleImpl.class, primaryKey,\n\t\t\t\t\t\t_nullInterviewSchedule);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tEntityCacheUtil.removeResult(InterviewScheduleModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\tInterviewScheduleImpl.class, primaryKey);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn interviewSchedule;\n\t}", "public GrpcObjectHandle getObjectHandle(int executableID) {\n\t\t/* get GrpcFunctionHandle by executableID */\n\t\tngLog.printLog(\n\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL, \n\t\t\tNgLog.LOGLEVEL_DEBUG,\n\t\t\tthis,\n\t\t\t\"NgGrpcClient#getObjectHandle()\");\n\t\t\n\t\t/* search target in list */\n\t\tfor (int i = 0; i < handleList.size(); i++) {\n\t\t\tNgGrpcObjectHandle handle = null;\n\t\t\ttry {\n\t\t\t\thandle = (NgGrpcObjectHandle) handleList.get(i);\n\t\t\t} catch (ClassCastException e) {\n\t\t\t\t/* nothing will be done */\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (handle.getExecutableID() == executableID) {\n\t\t\t\t/* found */\n\t\t\t\tngLog.printLog(\n\t\t\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL,\n\t\t\t\t\tNgLog.LOGLEVEL_INFO,\n\t\t\t\t\tthis,\n\t\t\t\t\t\"NgGrpcClient#getObjectHandle(): found target.\");\n\t\t\t\treturn handle;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* not found */\n\t\tngLog.printLog(\n\t\t\tNgLog.LOGCATEGORY_NINFG_INTERNAL,\n\t\t\tNgLog.LOGLEVEL_INFO,\n\t\t\tthis,\n\t\t\t\"NgGrpcClient#getObjectHandle(): not found target.\");\n\t\treturn null;\n\t}", "public void setSchedule(CanaryScheduleOutput schedule) {\n this.schedule = schedule;\n }", "public Object getDynamic(String route){\n //First look for OrganizationActions\n for(OrganizationRoute organizationRoute: ExtensionList.lookup(OrganizationRoute.class)){\n if(organizationRoute.getUrlName() != null && organizationRoute.getUrlName().equals(route)){\n return wrap(organizationRoute);\n }\n }\n\n // No OrganizationRoute found, now lookup in available actions from Jenkins instance serving root\n for(Action action:Jenkins.get().getActions()) {\n String urlName = action.getUrlName();\n if (urlName != null && urlName.equals(route)) {\n return wrap(action);\n }\n }\n return null;\n }", "public Schedule getOptSchedule() \n\t{\n\t\tScheduledTask[] schedule = new ScheduledTask[tasks.length];\n\t\tbest = heuristicScheduling(); \n\t\trecursive(schedule, 0, new int[m]);\n\t\treturn best;\n\t}", "public List<ScheduleInfo> getSchedulesByIds(@WebParam(name = \"scheduleIds\") List<String> scheduleIds,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;", "private TransactionSchedulerResult handleResponse(HederaClient hederaClient, TransactionReceipt receipt, ScheduleId scheduleId) throws TimeoutException {\n log.debug(receipt.status);\n switch (receipt.status) {\n case SUCCESS:\n case SCHEDULE_ALREADY_EXECUTED:\n case NO_NEW_VALID_SIGNATURES:\n return new TransactionSchedulerResult(/* success= */true, Status.SUCCESS, scheduleId);\n case IDENTICAL_SCHEDULE_ALREADY_CREATED:\n return scheduleSignTransaction(hederaClient, receipt);\n case DUPLICATE_TRANSACTION:\n return new TransactionSchedulerResult(/* success= */false, receipt.status);\n default:\n return new TransactionSchedulerResult(/* success= */false, receipt.status);\n }\n }", "public int getHandle() {\n return handle_;\n }", "public int getHandle() {\n return handle_;\n }", "public int getHandle() {\n return handle_;\n }", "public SchedulerInterface getCurrent() {\n return current;\n }", "@Override\n\tpublic InterviewSchedule fetchByPrimaryKey(long interviewScheduleId)\n\t\tthrows SystemException {\n\t\treturn fetchByPrimaryKey((Serializable)interviewScheduleId);\n\t}", "public int getHandle() {\n return handle_;\n }", "public int getHandle() {\n return handle_;\n }", "public int getHandle() {\n return handle_;\n }", "public ScheduleComponentType getScheduleComponentType() {\r\n return ScheduleComponentType.GUARD;\r\n }", "ScheduledEvents getScheduledEvents();", "public Route getRoute(Class<? extends RouteHandler> clazz) {\n return Route.getRouteFromHandler(clazz);\n }", "ScheduleFinishType getScheduleFinish();", "public static ThreadedPmClientInstanceResolver get() {\n\t\t// synchronization :: rely on registry to return same impl\n\t\tif (instance == null) {\n\t\t\tinstance = Registry.impl(ThreadedPmClientInstanceResolver.class);\n\t\t}\n\t\treturn instance;\n\t}", "public static Object getHandle(final Object bukkitObject) {\n \t\tif (bukkitObject == null) {\n \t\t\treturn null;\n \t\t}\n \n \t\t// We will have to do this dynamically, unfortunately\n \t\ttry {\n \t\t\treturn bukkitObject.getClass().getMethod(\"getHandle\")\n \t\t\t\t\t.invoke(bukkitObject);\n \t\t} catch (final Exception e) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"Cannot get Handle from \" + bukkitObject, e);\n \t\t}\n \t}", "public com.exacttarget.wsdl.partnerapi.HourlyRecurrence getHourlyRecurrence()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.exacttarget.wsdl.partnerapi.HourlyRecurrence target = null;\n target = (com.exacttarget.wsdl.partnerapi.HourlyRecurrence)get_store().find_element_user(HOURLYRECURRENCE$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getSchedulingStrategy() {\n return this.schedulingStrategy;\n }", "public WinRefEx getHandle_(final String title) {\n\t\treturn getHandle_(title, null);\n\t}", "public List<ScheduleDisplayInfo> searchForScheduleDisplays(@WebParam(name = \"criteria\") QueryByCriteria criteria,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;", "public Schedule getSchedule() {\n\n Schedule sched = new Schedule();\n\n if (m_startDate.getDate() != null) {\n sched.setStartDate(m_startDate.getDate());\n } else {\n return null; // execute unscheduled (right now)\n }\n if (m_endDate.getDate() != null) {\n sched.setEndDate(m_endDate.getDate());\n }\n\n m_repeat.applyToSchedule(sched);\n\n return sched;\n }", "boolean saveSchedule(Schedule schedule);", "public T caseRegulationSchedule(RegulationSchedule object) {\n\t\treturn null;\n\t}", "public int getHandle()\n\t{\n\t\treturn mHandle;\n\t}", "public int getScheduleState() {\n return scheduleState;\n }", "public int getHandle() {\n return m_handle;\n }", "SchedulingPlay selectByPrimaryKey(Long id);", "public String getHandle(final String title, final String text) {\n\t\treturn AutoItUtils.hwndToHandle(getHandle_(title, text));\n\t}", "public int getLCO_DIAN_SendSchedule_ID () \n\t{\n\t\tInteger ii = (Integer)get_Value(COLUMNNAME_LCO_DIAN_SendSchedule_ID);\n\t\tif (ii == null)\n\t\t\t return 0;\n\t\treturn ii.intValue();\n\t}", "private JobScheduler getScheduler(Context context) {\n if (scheduler == null) {\n scheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);\n }\n\n return scheduler;\n }" ]
[ "0.62691444", "0.5971573", "0.5895203", "0.58188343", "0.577921", "0.57612085", "0.56491756", "0.5616624", "0.5586949", "0.551692", "0.55032486", "0.5459474", "0.54404855", "0.54380494", "0.5344454", "0.5284251", "0.5241892", "0.5161483", "0.51284486", "0.5125867", "0.5111856", "0.5097348", "0.50867236", "0.5071567", "0.5040287", "0.50159115", "0.50032336", "0.5000338", "0.4970216", "0.49698573", "0.49675772", "0.49577355", "0.49339136", "0.4927319", "0.4922353", "0.4917744", "0.49004862", "0.49004862", "0.49004862", "0.4867416", "0.4845655", "0.48438674", "0.48416156", "0.4829866", "0.4827153", "0.48209748", "0.48203698", "0.48188186", "0.4804107", "0.47796312", "0.476192", "0.47505227", "0.4749109", "0.47456813", "0.47412786", "0.47231123", "0.47215465", "0.47192687", "0.4698327", "0.46919143", "0.46852773", "0.46797356", "0.46792868", "0.46590054", "0.46589127", "0.46504527", "0.46447134", "0.46402243", "0.4635248", "0.4623407", "0.46146014", "0.46099973", "0.459643", "0.459643", "0.459643", "0.45850265", "0.4581674", "0.45709446", "0.45709446", "0.45709446", "0.45659646", "0.45612946", "0.45602542", "0.4556557", "0.45524663", "0.4542444", "0.45219627", "0.4520358", "0.45189962", "0.45109877", "0.45071742", "0.45048422", "0.44942412", "0.44895646", "0.44885075", "0.44861186", "0.4481502", "0.44778925", "0.4476978", "0.44656646" ]
0.73640996
0
This function is used to get a handle to the first schedule object in a container.
private JNASchedule getFirstSchedule() { if (this.isDisposed()) { throw new DominoException(0, "Schedule collection has been disposed"); } DHANDLE hSchedules = getAllocations().getSchedulesHandle(); return LockUtil.lockHandle(hSchedules, (hSchedulesByVal) -> { IntByReference rethObj = new IntByReference(); Memory schedulePtrMem = new Memory(Native.POINTER_SIZE); short result = NotesCAPI.get().SchContainer_GetFirstSchedule(hSchedulesByVal, rethObj, schedulePtrMem); if (result == INotesErrorConstants.ERR_SCHOBJ_NOTEXIST) { return null; } NotesErrorUtils.checkResult(result); if (rethObj.getValue()==0) { return null; } long peer = schedulePtrMem.getLong(0); if (peer==0) { return null; } Pointer schedulePtr = new Pointer(peer); NotesScheduleStruct retpSchedule = NotesScheduleStruct.newInstance(schedulePtr); retpSchedule.read(); int scheduleSize = JNANotesConstants.scheduleSize; if (PlatformUtils.isMac() && PlatformUtils.is64Bit()) { //on Mac/64, this structure is 4 byte aligned, other's are not int remainder = scheduleSize % 4; if (remainder > 0) { scheduleSize = 4 * (scheduleSize / 4) + 4; } } Pointer pOwner = retpSchedule.getPointer().share(scheduleSize); String owner = NotesStringUtils.fromLMBCS(pOwner, (retpSchedule.wOwnerNameSize-1) & 0xffff); return new JNASchedule(this, retpSchedule, owner, rethObj.getValue()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JNASchedule getNextSchedule(JNASchedule schedule) {\n\t\tif (this.isDisposed()) {\n\t\t\tthrow new ObjectDisposedException(this);\n\t\t}\n\n\t\tif (schedule.isDisposed()) {\n\t\t\tthrow new ObjectDisposedException(schedule);\n\t\t}\n\t\t\n\t\tDHANDLE hSchedules = getAllocations().getSchedulesHandle();\n\t\t\n\t\tint hCurrSchedule = getScheduleHandle(schedule);\n\t\t\n\t\tif (hCurrSchedule==0) {\n\t\t\tthrow new DominoException(0, \"Handle of specified schedule is 0\");\n\t\t}\n\n\t\treturn LockUtil.lockHandle(hSchedules, (hSchedulesByVal) -> {\n\t\t\tIntByReference rethNextSchedule = new IntByReference();\n\t\n\t\t\tMemory schedulePtrMem = new Memory(Native.POINTER_SIZE);\n\t\t\tshort result = NotesCAPI.get().SchContainer_GetNextSchedule(hSchedulesByVal, hCurrSchedule, rethNextSchedule,\n\t\t\t\t\tschedulePtrMem);\n\t\t\tif (result==INotesErrorConstants.ERR_SCHOBJ_NOTEXIST) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tNotesErrorUtils.checkResult(result);\n\t\n\t\t\tlong peer = schedulePtrMem.getLong(0);\n\t\t\tif (peer==0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\tPointer schedulePtr = new Pointer(peer);\n\t\t\tNotesScheduleStruct retpNextSchedule = NotesScheduleStruct.newInstance(schedulePtr);\n\t\t\tretpNextSchedule.read();\n\t\t\t\n\t\t\tint scheduleSize = JNANotesConstants.scheduleSize;\n\t\t\tif (PlatformUtils.isMac() && PlatformUtils.is64Bit()) {\n\t\t\t\t//on Mac/64, this structure is 4 byte aligned, other's are not\n\t\t\t\tint remainder = scheduleSize % 4;\n\t\t\t\tif (remainder > 0) {\n\t\t\t\t\tscheduleSize = 4 * (scheduleSize / 4) + 4;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tPointer pOwner = retpNextSchedule.getPointer().share(scheduleSize);\n\t\t\tString owner = NotesStringUtils.fromLMBCS(pOwner, (retpNextSchedule.wOwnerNameSize-1) & 0xffff);\n\t\n\t\t\treturn new JNASchedule(this, retpNextSchedule, owner, rethNextSchedule.getValue());\n\t\t});\n\t}", "public Schedule get(String arg0) {\n\t\treturn null;\n\t}", "protected int getScheduleHandle(JNASchedule schedule) {\n\t\tInteger handle = ((JNAScheduleAllocations)schedule.getAdapter(APIObjectAllocations.class)).getScheduleHandle();\n\t\t\n\t\treturn (handle!=null) ? handle : 0;\n\t}", "ScheduleStartType getScheduleStart();", "public SchedulerInterface getCurrent() {\n return current;\n }", "public Schedule getSchedule() {\r\n\t\treturn schedule;\r\n\t}", "public SpaceSchedule getSchedule() {\n\t\treturn null;\n\t}", "public Scheduler getScheduler()\r\n/* 30: */ {\r\n/* 31: 73 */ return this.scheduler;\r\n/* 32: */ }", "public Schedule getSchedule() {\n\n return schedule;\n }", "protected Schedule getSchedule(String command, Calendar calendar) {\n List<Schedule> scheduleList = calendar.getSchedules();\n int index;\n\n try {\n index = Integer.parseInt(command) - 1;\n if (index < scheduleList.size() && !(index < 0)) {\n return scheduleList.get(index);\n } else {\n System.out.println(\"please choose a valid input\");\n return null;\n }\n } catch (NumberFormatException e) {\n if (command.equals(\"q\")) {\n return null;\n } else if (calendar.getSchedule(command) != null) {\n return calendar.getSchedule(command);\n } else {\n System.out.println(\"please choose a valid input\");\n return null;\n }\n }\n }", "public Object getFirstObject()\n {\n \tcurrentObject = firstObject;\n\n if (firstObject == null)\n \treturn null;\n else\n \treturn AL.get(0);\n }", "Schedule createSchedule();", "public ISchedulingRule getSchedulingRule(IDeploymentTarget target) {\n return null;\r\n }", "private Object readResolve() throws ObjectStreamException {\n return ctx.grid().scheduler();\n }", "public SeriesInstance getInstanceFirstRep() {\n\t\tif (getInstance().isEmpty()) {\n\t\t\treturn addInstance();\n\t\t}\n\t\treturn getInstance().get(0); \n\t}", "public ScheduleType getScheduleType();", "@Override\n\tpublic PerformScheduleBBSDto getPerformScheduleBBSDto(int perform_schedule_seq) {\n\t\treturn dao.getPerformScheduleBBSDto(perform_schedule_seq);\n\t}", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "public process get_first() {\n\t\treturn queue.getFirst();\n\t}", "protected Scheduler findScheduler(String schedulerName)\r\n/* 54: */ throws SchedulerException\r\n/* 55: */ {\r\n/* 56: 95 */ if ((this.beanFactory instanceof ListableBeanFactory))\r\n/* 57: */ {\r\n/* 58: 96 */ ListableBeanFactory lbf = (ListableBeanFactory)this.beanFactory;\r\n/* 59: 97 */ String[] beanNames = lbf.getBeanNamesForType(Scheduler.class);\r\n/* 60: 98 */ for (int i = 0; i < beanNames.length; i++)\r\n/* 61: */ {\r\n/* 62: 99 */ Scheduler schedulerBean = (Scheduler)lbf.getBean(beanNames[i]);\r\n/* 63:100 */ if (schedulerName.equals(schedulerBean.getSchedulerName())) {\r\n/* 64:101 */ return schedulerBean;\r\n/* 65: */ }\r\n/* 66: */ }\r\n/* 67: */ }\r\n/* 68:105 */ Scheduler schedulerInRepo = SchedulerRepository.getInstance().lookup(schedulerName);\r\n/* 69:106 */ if (schedulerInRepo == null) {\r\n/* 70:107 */ throw new IllegalStateException(\"No Scheduler named '\" + schedulerName + \"' found\");\r\n/* 71: */ }\r\n/* 72:109 */ return schedulerInRepo;\r\n/* 73: */ }", "private Job findLaunchClientJob() {\n Job[] jobs = Job.getJobManager().find(null);\n for (Job job : jobs) {\n if (job instanceof LaunchClientJob) {\n if (((LaunchClientJob) job).getServer().getId().equals(environment.getServer().getId())) {\n trace(\"Identified LaunchClientJob: \" + job);\n return job;\n }\n }\n }\n\n trace(\"Unable to find LaunchClientJob!\");\n return null;\n }", "WorkingSchedule getById(Long workingScheduleId);", "public OccurrenceInfo getFirstOccurrence() throws ServiceLocalException {\n\t\treturn (OccurrenceInfo) this.getPropertyBag()\n\t\t\t\t.getObjectFromPropertyDefinition(\n\t\t\t\t\t\tAppointmentSchema.FirstOccurrence);\n\t}", "public Schedule create() {\n\n\t\tSchedule result;\n\n\t\tresult = new Schedule();\n\n\t\treturn result;\n\t}", "public Object firstElement() {\n return _queue.firstElement();\n }", "@Override\r\n\tpublic E pollFirst() {\n\t\treturn null;\r\n\t}", "Schedule selectByPrimaryKey(Integer id);", "public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}", "public ScheduleFrom getScheduleFrom()\r\n {\r\n return (m_scheduleFrom);\r\n }", "public T caseConformLoadSchedule(ConformLoadSchedule object) {\n\t\treturn null;\n\t}", "public String create(Schedule arg0) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic Object getInstance() {\n\t\t\treturn null;\n\t\t}", "public Schedule getSchedule() {\n\n Schedule sched = new Schedule();\n\n if (m_startDate.getDate() != null) {\n sched.setStartDate(m_startDate.getDate());\n } else {\n return null; // execute unscheduled (right now)\n }\n if (m_endDate.getDate() != null) {\n sched.setEndDate(m_endDate.getDate());\n }\n\n m_repeat.applyToSchedule(sched);\n\n return sched;\n }", "public IScheduleBCF getScheduleBCF()\r\n\t{\r\n\t\treturn scheduleBCF;\r\n\t}", "public Alarm getFirstAlarm()\r\n\t{\r\n\t\tif ((getAlarms() != null) && !getAlarms().isEmpty())\r\n\t\t{\r\n\t\t\treturn getAlarms().get(FIRST);\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "public ScheduleDisplayInfo getScheduleDisplay (@WebParam(name = \"scheduleId\") String scheduleId,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;", "java.lang.String getSchedule();", "@Override\r\n\tpublic IScheduler getForcedScheduler() {\n\t\treturn null;\r\n\t}", "protected abstract String scheduler_next();", "public RTContainer container_element(RTContainer a, boolean first){\n\t\tif(a.getDecompGoals().size()>0 && a.getDecompPlans().size()==0){\n\t\t\tif(first)\n\t\t\t\treturn a.getDecompGoals().getFirst();\n\t\t\telse\n\t\t\t\treturn a.getDecompGoals().getLast(); \n\t\t}else{\n\t\t\tif(first)\n\t\t\t\treturn a.getDecompPlans().getFirst();\n\t\t\telse\n\t\t\t\treturn a.getDecompPlans().getLast();\n\t\t}\n\t}", "public static ThreadedPmClientInstanceResolver get() {\n\t\t// synchronization :: rely on registry to return same impl\n\t\tif (instance == null) {\n\t\t\tinstance = Registry.impl(ThreadedPmClientInstanceResolver.class);\n\t\t}\n\t\treturn instance;\n\t}", "com.google.cloud.compute.v1.Scheduling getScheduling();", "public T caseRegulationSchedule(RegulationSchedule object) {\n\t\treturn null;\n\t}", "public int getSchedule_id() {\r\n return schedule_id;\r\n }", "private int nextContainer(int actualContainerPosition) {\n int totalNumberOfContainer = (mNumberOfBowls + mNumberOfTrays) * 2; //14 in my case, but remember it starts form 0!!\n int nextContainer = actualContainerPosition + 1;\n\n if ( nextContainer == totalNumberOfContainer) {\n nextContainer = 0;\n }\n\n return nextContainer;\n }", "private Task getTask(Integer identifier) {\n Iterator<Task> iterator = tasks.iterator();\n while (iterator.hasNext()) {\n Task nextTask = iterator.next();\n if (nextTask.getIdentifier().equals(identifier)) {\n return nextTask;\n }\n }\n\n return null;\n }", "public interface ScheduleService {\n BasicSchedule getBasicScheduleByHostelIdAndRoomType(long hostelId, RoomType type);\n\n /**\n * 获得最近一年的酒店基本计划\n *\n * @param hostelId\n * @return\n */\n List<BasicSchedule> getBasisSchedulesByHostelId(long hostelId);\n\n void modifyBasisSchedule(BasicSchedule basicSchedule);\n\n /**\n * 获得最近一年的酒店特殊计划\n *\n * @param hostelId\n * @return\n */\n List<SpecialSchedule> getSpecialScheduleByHostelId(long hostelId);\n\n void modifySpecialSchedule(SpecialSchedule specialSchedule);\n\n void addSpecialSchedule(SpecialSchedule specialSchedule);\n\n void deleteSpecialSchedule(SpecialSchedule specialSchedule);\n\n SpecialSchedule getSpecialSchedule(long hostelId, RoomType roomType, Date date);\n}", "@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}", "@Override\n\tpublic InterviewSchedule fetchByPrimaryKey(Serializable primaryKey)\n\t\tthrows SystemException {\n\t\tInterviewSchedule interviewSchedule = (InterviewSchedule)EntityCacheUtil.getResult(InterviewScheduleModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\tInterviewScheduleImpl.class, primaryKey);\n\n\t\tif (interviewSchedule == _nullInterviewSchedule) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (interviewSchedule == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tinterviewSchedule = (InterviewSchedule)session.get(InterviewScheduleImpl.class,\n\t\t\t\t\t\tprimaryKey);\n\n\t\t\t\tif (interviewSchedule != null) {\n\t\t\t\t\tcacheResult(interviewSchedule);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tEntityCacheUtil.putResult(InterviewScheduleModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\t\tInterviewScheduleImpl.class, primaryKey,\n\t\t\t\t\t\t_nullInterviewSchedule);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tEntityCacheUtil.removeResult(InterviewScheduleModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\tInterviewScheduleImpl.class, primaryKey);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn interviewSchedule;\n\t}", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "TimerSchedule createTimerSchedule();", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "Optional<AgentContainer> findAgentContainer(String containerName);", "public String getSchedule() {\n return schedule;\n }", "public T caseBasicIntervalSchedule(BasicIntervalSchedule object) {\n\t\treturn null;\n\t}", "public Schedule getSchedule(String route, int direction){\r\n // A schedule to hold all the data returned from the query\r\n Schedule weekdayZero = new Schedule();\r\n // Fetch the route id given the route\r\n Cursor getData = getReadableDatabase().rawQuery(\"select _id from routes where route_long_name = '\" + route + \"'\", null);\r\n // Make sure to begin at the first element of the returned data\r\n getData.moveToFirst();\r\n // Store the Route Id\r\n int route_id = getData.getInt(0);\r\n // Calendar id: (90400,90448) - Monday To Friday\r\n final String query = \"select Routes.Route_long_Name, \" +\r\n \"Calendar._Id, Stops.Stop_Name, Stop_Times.Stop_Sequence, Stop_Times.Arrival_Time, routes.route_short_name \" +\r\n \"from Trips join Calendar on Trips.Service_Id=Calendar._Id \" +\r\n \"join Routes on Trips.Route_Id=Routes._Id \" +\r\n \"join Stop_Times on Trips._Id=Stop_Times.Trip_Id \" +\r\n \"join Stops on Stop_Times.Stop_Id=Stops._Id \" +\r\n \"where Calendar._Id in \" + getDayOfTheWeek() + \" \" +\r\n \"AND Trips.Route_Id = \" + route_id + \" \" +\r\n \"AND Trips.Direction_Id = \" + direction + \" \" +\r\n \"AND Stop_Times.Arrival_Time != '' \" +\r\n \"order by arrival_time asc\";\r\n getData.moveToFirst();\r\n getData = getReadableDatabase().rawQuery(query, null);\r\n while (getData.moveToNext()){\r\n weekdayZero.insertData(getData.getString(0), getData.getInt(1), getData.getString(2), getData.getInt(3)\r\n , getData.getString(4), getData.getString(5));\r\n }\r\n return weekdayZero;\r\n }", "public static SingleObject getInstance(){\n return instance;\n }", "public CarAndTime getFirstCarAndTime() {\n\t\tif (this.mVehicles.size() > 0) {\n\t\t\treturn mVehicles.getFirst();\n\t\t}\n\t\treturn null;\n\t}", "public BackendService first() {\n BackendService first = UtilKt.first(this);\n if (first == null) {\n throw new NoSuchElementException();\n }\n return first;\n }", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public Driver getFirstDriver()\n\t{\n\t\tif(unitSpaceAvailable == MAX_QUEUE){return null;}\n\t\treturn queue.get(0);\n\t}", "public T caseSeasonDayTypeSchedule(SeasonDayTypeSchedule object) {\n\t\treturn null;\n\t}", "@Override\n protected Scheduler scheduler() {\n return scheduler;\n }", "public Unit first()\n\t{\n\t\tif (size() == 0)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn iterator().next();\n\t}", "@RequestMapping(\"/Scheduling/findById\")\r\n\t@ResponseBody\r\n\tpublic Optional<Scheduling> findById(long scheduleId) {\r\n\t\treturn schedulingService.findById(scheduleId);\r\n\t}", "public static SingleObject getInstance(){\n\t\treturn instance;\n\t}", "public Schedule getOptSchedule() \n\t{\n\t\tScheduledTask[] schedule = new ScheduledTask[tasks.length];\n\t\tbest = heuristicScheduling(); \n\t\trecursive(schedule, 0, new int[m]);\n\t\treturn best;\n\t}", "protected CardUI getFirstCardUI() {\n\t\tif (this.cards.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn this.cards.keySet().iterator().next();\n\t}", "private Shift getShift(CharSequence title) {\n\t\tList<Shift> shifts = null;\n try {\n\t\t\tshifts = getHelper().getShiftDao().queryForEq(CalshareContract.Shift.COLUMN_NAME_SHIFT_TITLE, title);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \n if (shifts != null && shifts.size() != 0) {\n \tLog.i(EditShiftActivity.class.getName(), \"found Shift object with title \\'\" + title + \"\\'\");\n \treturn shifts.get(0);\n }\n else {\n \treturn null;\n }\n\t}", "@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}", "@Override\n public Optional<Container> findOne(String id) {\n log.debug(\"Request to get Container : {}\", id);\n return containerRepository.findById(id);\n }", "public final Scene getFirstScene() {\n if (scenes.size() > 0) {\n return scenes.get(0);\n } else {\n return null;\n }\n }", "public static SingleObject getInstance()\r\n {\r\n return instance;\r\n }", "public Object getFirst(){\n return pattern[0];\n }", "public Schedule() {\r\n }", "public synchronized Scheduler getScheduler() { return this.scheduler; }", "public T caseRegularIntervalSchedule(RegularIntervalSchedule object) {\n\t\treturn null;\n\t}", "public static ScheduleData getSchedule(final String replicaId, final Class<?> clazz)\n\t\t\tthrows IllegalAccessException, InstantiationException {\n\t\tTasklet annot = clazz.getAnnotation(Tasklet.class);\n\t\tString[] effectiveSchedDefs = null;\n\n\t\tif (annot == null)\n\t\t\treturn null;\n\t\tString[] schedDefs = annot.schedule();\n\t\tSystem.out.println(\"### Tasklet: \" + clazz.getName() + \" \" + replicaId + \" Sched: \" + Arrays.toString(schedDefs));\n\t\tfor (String schedDef : schedDefs) {\n\t\t\tif (!schedDef.equals(\"\")) {\n\t\t\t\teffectiveSchedDefs = schedDefs;\n\t\t\t\tif (schedDef.equals(\"dynamic\")) {\n\t\t\t\t\tTasklet.Interface ti = (Interface) clazz.newInstance();\n\t\t\t\t\teffectiveSchedDefs = ti.getDynamicSchedule();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (effectiveSchedDefs == null)\n\t\t\treturn null;\n\t\treturn new ScheduleDataNSF(replicaId, clazz.getName(), effectiveSchedDefs, annot.onAllServers());\n\t}", "public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }", "public Scheduler getScheduler() {\n\t\treturn scheduler;\n\t}", "public CanaryScheduleOutput getSchedule() {\n return this.schedule;\n }", "public ProgramScheduled getProgramScheduleById(int scheduleId);", "public Host getCurrentHost() {\n\t\tif (current == null) {\n\t\t\tString id = SystemHelper.os.getSystemUUID();\n\t\t\tfor (Host host : config.getHosts()) {\n\t\t\t\tif (id.equals(host.getId())) {\n\t\t\t\t\tcurrent = host;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn current;\n\t}", "public Container getContainer();", "public E pollFirst();", "public Object getObject() {\n return getObject(null);\n }", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public A first() {\n return first;\n }", "public T getFirst() {\n\treturn _front.getCargo();\n }", "@Override\r\n\tpublic E peekFirst() {\n\t\treturn null;\r\n\t}", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public static List<Schedule> fetchGeneratedSchedules() {\r\n if (!isComplete()) {\r\n return null;\r\n }\r\n\r\n return generatedSchedules;\r\n }", "public synchronized Object get() {\n try {\n Object obj = queue.take().getElement();\n\n // set next offset\n delayOffset = System.currentTimeMillis();\n\n return obj;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public WorldObject getFirstObject(){\r\n\t\treturn this.firstObject;\r\n\t}", "public E peek() {\n try {\n return b(1, (Long) null, (TimeUnit) null);\n } catch (InterruptedException unused) {\n return null;\n }\n }", "public PlanNode getFirstChild() {\n return this.children.isEmpty() ? null : this.children.getFirst();\n }", "@Override\n\tpublic InterviewSchedule fetchByPrimaryKey(long interviewScheduleId)\n\t\tthrows SystemException {\n\t\treturn fetchByPrimaryKey((Serializable)interviewScheduleId);\n\t}", "public Schedule() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public java.util.Calendar getCreated()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CREATED$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getCalendarValue();\n }\n }", "public static Object getComponentInstance(String name, ServletContext sc) {\r\n\t\tContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc));\r\n\t\tif (!containerWrapper.isStart()) {\r\n\t\t\tDebug.logError(\"JdonFramework not yet started, please try later \", module);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn containerWrapper.lookup(name);\r\n\t}" ]
[ "0.67480016", "0.61303794", "0.60386455", "0.5664864", "0.5543239", "0.55262595", "0.5521759", "0.550509", "0.5424905", "0.5380105", "0.5367718", "0.53590274", "0.53520364", "0.5345816", "0.53403753", "0.5338073", "0.5278638", "0.52647406", "0.5264566", "0.5252789", "0.52043366", "0.51846", "0.51296586", "0.5114261", "0.5083693", "0.5068004", "0.5063013", "0.50611705", "0.50519776", "0.50464976", "0.5039491", "0.5038506", "0.501777", "0.4985044", "0.4978764", "0.49760365", "0.4968089", "0.4967733", "0.49576023", "0.49572387", "0.49465644", "0.49417594", "0.4936558", "0.49350995", "0.49308467", "0.49267992", "0.4923", "0.49160087", "0.49148986", "0.49136207", "0.49111474", "0.4908994", "0.48996505", "0.4882745", "0.4871821", "0.48694742", "0.48668095", "0.486637", "0.4861868", "0.48576418", "0.48546872", "0.4846981", "0.48456606", "0.48436993", "0.48323858", "0.48306668", "0.4823743", "0.48064557", "0.4803735", "0.4802229", "0.47998136", "0.4795939", "0.47896183", "0.47889745", "0.47879606", "0.47782743", "0.47762755", "0.47730052", "0.47705615", "0.47661725", "0.4765712", "0.4762506", "0.47597712", "0.47553086", "0.4748529", "0.4741194", "0.473846", "0.47360986", "0.4733808", "0.47320032", "0.47286233", "0.4727091", "0.47253373", "0.4723054", "0.4715964", "0.4715933", "0.471558", "0.47150692", "0.47138435", "0.46982273" ]
0.7669219
0
This routine is used to get a handle to the next schedule object in a container.
public JNASchedule getNextSchedule(JNASchedule schedule) { if (this.isDisposed()) { throw new ObjectDisposedException(this); } if (schedule.isDisposed()) { throw new ObjectDisposedException(schedule); } DHANDLE hSchedules = getAllocations().getSchedulesHandle(); int hCurrSchedule = getScheduleHandle(schedule); if (hCurrSchedule==0) { throw new DominoException(0, "Handle of specified schedule is 0"); } return LockUtil.lockHandle(hSchedules, (hSchedulesByVal) -> { IntByReference rethNextSchedule = new IntByReference(); Memory schedulePtrMem = new Memory(Native.POINTER_SIZE); short result = NotesCAPI.get().SchContainer_GetNextSchedule(hSchedulesByVal, hCurrSchedule, rethNextSchedule, schedulePtrMem); if (result==INotesErrorConstants.ERR_SCHOBJ_NOTEXIST) { return null; } NotesErrorUtils.checkResult(result); long peer = schedulePtrMem.getLong(0); if (peer==0) { return null; } Pointer schedulePtr = new Pointer(peer); NotesScheduleStruct retpNextSchedule = NotesScheduleStruct.newInstance(schedulePtr); retpNextSchedule.read(); int scheduleSize = JNANotesConstants.scheduleSize; if (PlatformUtils.isMac() && PlatformUtils.is64Bit()) { //on Mac/64, this structure is 4 byte aligned, other's are not int remainder = scheduleSize % 4; if (remainder > 0) { scheduleSize = 4 * (scheduleSize / 4) + 4; } } Pointer pOwner = retpNextSchedule.getPointer().share(scheduleSize); String owner = NotesStringUtils.fromLMBCS(pOwner, (retpNextSchedule.wOwnerNameSize-1) & 0xffff); return new JNASchedule(this, retpNextSchedule, owner, rethNextSchedule.getValue()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JNASchedule getFirstSchedule() {\n\t\tif (this.isDisposed()) {\n\t\t\tthrow new DominoException(0, \"Schedule collection has been disposed\");\n\t\t}\n\n\t\tDHANDLE hSchedules = getAllocations().getSchedulesHandle();\n\t\t\n\t\treturn LockUtil.lockHandle(hSchedules, (hSchedulesByVal) -> {\n\t\t\tIntByReference rethObj = new IntByReference();\n\t\t\tMemory schedulePtrMem = new Memory(Native.POINTER_SIZE);\n\n\t\t\tshort result = NotesCAPI.get().SchContainer_GetFirstSchedule(hSchedulesByVal, rethObj, schedulePtrMem);\n\t\t\tif (result == INotesErrorConstants.ERR_SCHOBJ_NOTEXIST) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tNotesErrorUtils.checkResult(result);\n\t\t\t\n\t\t\tif (rethObj.getValue()==0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\tlong peer = schedulePtrMem.getLong(0);\n\t\t\tif (peer==0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tPointer schedulePtr = new Pointer(peer);\n\t\t\tNotesScheduleStruct retpSchedule = NotesScheduleStruct.newInstance(schedulePtr);\n\t\t\tretpSchedule.read();\n\t\t\t\n\t\t\tint scheduleSize = JNANotesConstants.scheduleSize;\n\t\t\tif (PlatformUtils.isMac() && PlatformUtils.is64Bit()) {\n\t\t\t\t//on Mac/64, this structure is 4 byte aligned, other's are not\n\t\t\t\tint remainder = scheduleSize % 4;\n\t\t\t\tif (remainder > 0) {\n\t\t\t\t\tscheduleSize = 4 * (scheduleSize / 4) + 4;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tPointer pOwner = retpSchedule.getPointer().share(scheduleSize);\n\t\t\tString owner = NotesStringUtils.fromLMBCS(pOwner, (retpSchedule.wOwnerNameSize-1) & 0xffff);\n\t\t\t\n\t\t\treturn new JNASchedule(this, retpSchedule, owner, rethObj.getValue());\n\t\t});\n\t}", "protected abstract String scheduler_next();", "protected int getScheduleHandle(JNASchedule schedule) {\n\t\tInteger handle = ((JNAScheduleAllocations)schedule.getAdapter(APIObjectAllocations.class)).getScheduleHandle();\n\t\t\n\t\treturn (handle!=null) ? handle : 0;\n\t}", "public Object getNext() { \t\n\t\t\tcurrIndex++;\t \n\t\t\treturn collection.elementAt(currIndex);\n\t\t}", "public Wagon<T> getNext() {\n\t\treturn next;\n\t}", "private DispatchTask next()\n {\n synchronized (m_lock)\n {\n while (null == m_runnable)\n {\n if (m_released)\n {\n return null;\n }\n\n try\n {\n m_lock.wait();\n } catch (InterruptedException e)\n {\n // Not needed\n }\n }\n\n return m_runnable;\n }\n }", "public T getNext() {\n\n // Create a new item to return\n T nextElement = getInstance();\n\n // Check if there are any more items from the list\n if (cursor <= arrayLimit) {\n nextElement = collection.get(cursor);\n cursor++;\n } else {\n // There are no more items - set to null\n nextElement = null;\n }\n\n // Return the derived item (will be null if not found)\n return nextElement;\n }", "private int nextContainer(int actualContainerPosition) {\n int totalNumberOfContainer = (mNumberOfBowls + mNumberOfTrays) * 2; //14 in my case, but remember it starts form 0!!\n int nextContainer = actualContainerPosition + 1;\n\n if ( nextContainer == totalNumberOfContainer) {\n nextContainer = 0;\n }\n\n return nextContainer;\n }", "public C getNext();", "public final String next() {\n if (this.task_set == null)\n throw new IllegalStateException(\"must initialize the scheduler before using it\");\n\n String next = scheduler_next();\n return next;\n }", "public Event getNextEvent() {\n \treturn next;\n }", "public T getNextItem();", "Entry getNext()\n {\n return (Entry) m_eNext;\n }", "public Object getNext() {\n\t\tif (current != null) {\n\t\t\tcurrent = current.next; // Get the reference to the next item\n\t\t}\n\t\treturn current == null ? null : current.item;\n\t}", "private myPoint getNextRoute(){\n\t\ttry {\n\t\t\treturn this.Route.take();\n\t\t} catch (InterruptedException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public Object next();", "public Object next();", "public GameObject getNext() {\n\t\t\tpointerIndex++;\n\t\t\treturn(gameObjects.elementAt(pointerIndex));\n\t\t}", "@Override\n public Object next() {\n Object retval = this.nextObject;\n advance();\n return retval;\n }", "public Task getNext()\n {\n\treturn new Task(toDo.get(0));\n }", "public NodeT getNext() {\n String nextItemKey = queue.poll();\n if (nextItemKey == null) {\n return null;\n }\n return nodeTable.get(nextItemKey);\n }", "private void scheduleNextAlarm() {\n // Cancel the currently scheduled Alarm in order to schedule the next.\n if (nextAlarm != null) {\n alarmManager.cancel(createAlarmIntent(this, nextAlarm.getId()));\n nextAlarm = null;\n }\n final Calendar calendar = Calendar.getInstance();\n Alarm alarm;\n int i = 0;\n do {\n // Look for an Alarm that is upcoming from the Calendar day and time.\n alarm = dailyDoDatabaseHelper.getNextAlarmForCalendarDay(calendar);\n if (alarm == null) {\n // If an Alarm was not found for the remainder of the day,\n // then check the next day starting midnight.\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.add(Calendar.DAY_OF_WEEK, 1);\n Log.d(CLASS_NAME, String.format(\"Checking next Calendar=%s for Alarm.\", calendar));\n }\n } while (alarm == null && i++ < 7);\n if (alarm != null) {\n nextAlarm = alarm;\n // Reusing the previous Calendar because it has scope of the future day.\n calendar.set(Calendar.HOUR_OF_DAY, alarm.getHour());\n calendar.set(Calendar.MINUTE, alarm.getMinute());\n calendar.set(Calendar.SECOND, 0);\n alarmManager.set(AlarmManager.RTC_WAKEUP,\n calendar.getTimeInMillis(),\n createAlarmIntent(this, alarm.getId()));\n Log.d(CLASS_NAME, String.format(\"Alarm=%s was found, scheduled on Calendar=%s\", alarm.toString(), calendar.toString()));\n } else {\n Log.d(CLASS_NAME, \"No upcoming Alarm(s) found to schedule.\");\n }\n }", "public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index >= this.size() - 1)\n\t\t\t\tindex = -1;\n\t\t\treturn this.get(++index);\n\t\t}\n\t\treturn null;\n\t}", "public final TemplateSubPatternAssociation getNext() {\n/* 230 */ return this.m_next;\n/* */ }", "private Object getNextElement()\n {\n return __m_NextElement;\n }", "public ObjectListNode getNext() {\n return next;\n }", "MIBObject getNext(String oid);", "public T getNext()\n {\n T elem = handler.getTop();\n handler.pop();\n return elem;\n }", "public SchedulerInterface getCurrent() {\n return current;\n }", "@Override\n public PaintOrder next() {\n if (!queue.isEmpty()) {\n currentOrders ++;\n var temp = queue.peek();\n return temp;\n }\n return null;\n }", "protected abstract D getNext(D d);", "public Cerradura next() {\n\t\tfor (Cerradura cerradura : cerraduras) {\n\t\t\tif (!cerradura.isProcess()) {\n\t\t\t\treturn cerradura;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public T nextElement() {\r\n\t\treturn items[currentObject++];\r\n \t}", "private Object readResolve() throws ObjectStreamException {\n return ctx.grid().scheduler();\n }", "public IEvent getNextEvent();", "public Movie getNextMovie(String host)\r\n\t{\n\t\treturn null;\r\n\t}", "private Addr nextPC() {\n if (inDelaySlotQueue()) {\n // Next address\n return currentAddr.inc();\n }\n\n // If there is a jump scheduled, return it\n if (jump != null) {\n var jumpAddr = jump;\n jump = null;\n return jumpAddr;\n }\n\n // Next address\n return currentAddr.inc();\n }", "public Object getNextDataFor(DataFlowID inFlowID) throws InterruptedException {\r\n BlockingQueue<Object> queue = mFlowData.get(inFlowID);\r\n return queue == null\r\n ? null\r\n : queue.take();\r\n }", "public synchronized Object get() {\n try {\n Object obj = queue.take().getElement();\n\n // set next offset\n delayOffset = System.currentTimeMillis();\n\n return obj;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public BSCObject next()\n {\n if (ready_for_fetch)\n {\n // the next sibling is waiting to be returned, so just return it\n ready_for_fetch = false;\n return sibling;\n }\n else if (hasNext())\n {\n // make sure there is a next sibling; if so, return it\n ready_for_fetch = false;\n return sibling;\n }\n else\n throw new NoSuchElementException();\n }", "public GameObject getNext();", "public Scheduler getScheduler()\r\n/* 30: */ {\r\n/* 31: 73 */ return this.scheduler;\r\n/* 32: */ }", "@Override\n\tpublic Object next() {\n\t\treturn null;\n\t}", "public synchronized AWTEvent getNextEvent() throws InterruptedException {\n do {\n\t for (int i = NUM_PRIORITIES - 1; i >= 0; i--) {\n\t\tif (queues[i].head != null) {\n\t\t EventQueueItem eqi = queues[i].head;\n\t\t queues[i].head = eqi.next;\n\t\t if (eqi.next == null) {\n\t\t\tqueues[i].tail = null;\n\t\t }\n\t\t return eqi.event;\n\t\t}\n\t }\n wait();\n } while(true);\n }", "public ListElement<T> getNext()\n\t{\n\t\treturn next;\n\t}", "@Override\n\tpublic PerformScheduleBBSDto getPerformScheduleBBSDto(int perform_schedule_seq) {\n\t\treturn dao.getPerformScheduleBBSDto(perform_schedule_seq);\n\t}", "private ReportProcessor getNext() {\n return next;\n }", "public ServiceSubTask getNextOpenSubTask() {\n\t\tServiceSubTask openTask = null;\n\t\tfor (ServiceSubTask subTask : getSubTasks().values()) {\n\t\t\tif (subTask.getStatus().equals(ServiceSubTaskStatus.WAITING)\n\t\t\t\t\t&& (openTask == null || subTask.getPosition() < openTask.getPosition()))\n\t\t\t\topenTask = subTask;\n\t\t\telse if (subTask.getStatus().equals(ServiceSubTaskStatus.OPEN))\n\t\t\t\treturn subTask;\n\t\t}\n\t\treturn openTask;\n\t}", "public void _next() {\n Object o;\n try {\n o = iter.next();\n } catch (NoSuchElementException e) {\n has_next = 0;\n return;\n }\n // resolve object\n if (o == null) {\n has_next = 1;\n next = null;\n } else if (o instanceof IdentityIF) {\n try {\n o = txn.getObject((IdentityIF)o, true);\n if (o == null) {\n _next();\n } else {\n has_next = 1;\n next = (F) o;\n }\n } catch (Throwable t) {\n has_next = -1;\n next = null;\n }\n } else {\n has_next = 1;\n next = (F) o;\n }\n }", "public Nodo getnext ()\n\t\t{\n\t\t\treturn next;\n\t\t\t\n\t\t}", "@Override\n public Object next()\n {\n if (current != null && current.next != null)\n {\n current = current.next; // Move to the next element in bucket\n }\n else // Move to next bucket\n {\n do\n {\n bucketIndex++;\n if (bucketIndex == buckets.length)\n {\n throw new NoSuchElementException();\n }\n current = buckets[bucketIndex];\n }\n while (current == null);\n }\n return current.data;\n }", "public Item next() {\n\t\t\tif (!hasNext())\n\t\t\t\treturn null;\n lastAccessed = current;\n Item item = current.item;\n current = current.next; \n index++;\n return item;\n\t\t}", "public MapElement getNext() {\n return next;\n }", "public Schedule getSchedule() {\r\n\t\treturn schedule;\r\n\t}", "ScheduleStartType getScheduleStart();", "@Override\n\t\tpublic T1 next() {\n\t\t\treturn (T1)_items[getindex(++_current)];\n\t\t}", "public Linkable next();", "public Reservation reserveNext() {\n synchronized (m_reservableListMutex) {\n purgeZombieResources();\n \n while (true) {\n if (++m_lastReservable >= m_reservables.size()) {\n m_lastReservable = 0;\n }\n \n final Reservable reservable =\n (Reservable)m_reservables.get(m_lastReservable);\n \n if (reservable.reserve()) {\n return reservable;\n }\n }\n }\n }", "public Square getNext() {\n\t\treturn queue.dequeue();\n\t}", "@Override\n\tpublic Item next() {\n\t\tindex = findNextElement();\n\n\t\tif (index == -1)\n\t\t\treturn null;\n\t\treturn items.get(index);\n\t}", "public SlideNode getNext() {\n\t\treturn next;\n\t}", "public T next() {\r\n if\t(!hasNext()) {\r\n throw new NoSuchElementException();\r\n }\r\n return items[now++];\r\n }", "@Override\n\t\tpublic T next() {\n\t\t\tmoveToNextIndex();\n\t\t\treturn objectAtIndex(_indicesByInsertOrder[_index]);\n\t\t}", "public Tile getNext(){\n\t\treturn this.next;\n\t}", "Schedule createSchedule();", "public E next() {\r\n\r\n\t\tE result = null;\r\n\t\tif (hasNext()) {\r\n\t\t\tresult = links.get(counter);\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "IList<T> getNext();", "protected Schedule getSchedule(String command, Calendar calendar) {\n List<Schedule> scheduleList = calendar.getSchedules();\n int index;\n\n try {\n index = Integer.parseInt(command) - 1;\n if (index < scheduleList.size() && !(index < 0)) {\n return scheduleList.get(index);\n } else {\n System.out.println(\"please choose a valid input\");\n return null;\n }\n } catch (NumberFormatException e) {\n if (command.equals(\"q\")) {\n return null;\n } else if (calendar.getSchedule(command) != null) {\n return calendar.getSchedule(command);\n } else {\n System.out.println(\"please choose a valid input\");\n return null;\n }\n }\n }", "public void add(Schedulorinator schedule) {\r\n if (!scheduleList.contains(schedule)) {\r\n scheduleList.add(schedule);\r\n schedule.addPerson(this);\r\n addObserver(schedule);\r\n notifyObservers(schedule);\r\n }\r\n }", "@Override\r\n\t\tpublic Item next() {\r\n\t\t\tif (!hasNext()) {\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn queue[index[i++]];\r\n\t\t\t}\r\n\t\t}", "Object getNextElement() throws NoSuchElementException;", "public com.Node<T> getNextRef() {\n\t\treturn null;\n\t}", "protected Monitor getNextMonitorEntry() throws MonitorException {\n Monitor monitor = null;\n\n // entries are always 4 byte aligned.\n if ((nextEntry % 4) != 0) {\n throw new MonitorStructureException(\n \"Entry index not properly aligned: \" + nextEntry);\n }\n\n // protect against a corrupted shared memory region.\n if ((nextEntry < 0) || (nextEntry > buffer.limit())) {\n throw new MonitorStructureException(\n \"Entry index out of bounds: nextEntry = \" + nextEntry\n + \", limit = \" + buffer.limit());\n }\n\n // check for the end of the buffer\n if (nextEntry == buffer.limit()) {\n lognl(\"getNextMonitorEntry():\"\n + \" nextEntry == buffer.limit(): returning\");\n return null;\n }\n\n buffer.position(nextEntry);\n\n int entryStart = buffer.position();\n int entryLength = buffer.getInt();\n\n // check for valid entry length\n if ((entryLength < 0) || (entryLength > buffer.limit())) {\n throw new MonitorStructureException(\n \"Invalid entry length: entryLength = \" + entryLength);\n }\n\n // check if last entry occurs before the eof.\n if ((entryStart + entryLength) > buffer.limit()) {\n throw new MonitorStructureException(\n \"Entry extends beyond end of buffer: \"\n + \" entryStart = \" + entryStart\n + \" entryLength = \" + entryLength\n + \" buffer limit = \" + buffer.limit());\n }\n\n if (entryLength == 0) {\n // end of data\n return null;\n }\n\n int nameLength = buffer.getInt();\n int vectorLength = buffer.getInt();\n byte dataType = buffer.get();\n byte flags = buffer.get();\n Units u = Units.toUnits(buffer.get());\n Variability v = Variability.toVariability(buffer.get());\n boolean supported = (flags & 0x01) != 0;\n\n // defend against corrupt entries\n if ((nameLength <= 0) || (nameLength > entryLength)) {\n throw new MonitorStructureException(\n \"Invalid Monitor name length: \" + nameLength);\n }\n\n if ((vectorLength < 0) || (vectorLength > entryLength)) {\n throw new MonitorStructureException(\n \"Invalid Monitor vector length: \" + vectorLength);\n }\n\n // read in the perfData item name, casting bytes to chars. skip the\n // null terminator\n //\n byte[] nameBytes = new byte[nameLength-1];\n for (int i = 0; i < nameLength-1; i++) {\n nameBytes[i] = buffer.get();\n }\n\n // convert name into a String\n String name = new String(nameBytes, 0, nameLength-1);\n\n if (v == Variability.INVALID) {\n throw new MonitorDataException(\"Invalid variability attribute:\"\n + \" entry index = \" + perfDataItem\n + \" name = \" + name);\n }\n if (u == Units.INVALID) {\n throw new MonitorDataException(\"Invalid units attribute: \"\n + \" entry index = \" + perfDataItem\n + \" name = \" + name);\n }\n\n int offset;\n if (vectorLength == 0) {\n // scalar Types\n if (dataType == BasicType.LONG.intValue()) {\n offset = entryStart + entryLength - 8; /* 8 = sizeof(long) */\n buffer.position(offset);\n LongBuffer lb = buffer.asLongBuffer();\n lb.limit(1);\n monitor = new PerfLongMonitor(name, u, v, supported, lb);\n perfDataItem++;\n } else {\n // bad data types.\n throw new MonitorTypeException(\"Invalid Monitor type:\"\n + \" entry index = \" + perfDataItem\n + \" name = \" + name\n + \" type = \" + dataType);\n }\n } else {\n // vector types\n if (dataType == BasicType.BYTE.intValue()) {\n if (u != Units.STRING) {\n // only byte arrays of type STRING are currently supported\n throw new MonitorTypeException(\"Invalid Monitor type:\"\n + \" entry index = \" + perfDataItem\n + \" name = \" + name\n + \" type = \" + dataType);\n }\n\n offset = entryStart + PERFDATA_NAME_OFFSET + nameLength;\n buffer.position(offset);\n ByteBuffer bb = buffer.slice();\n bb.limit(vectorLength);\n bb.position(0);\n\n if (v == Variability.CONSTANT) {\n monitor = new PerfStringConstantMonitor(name, supported,\n bb);\n } else if (v == Variability.VARIABLE) {\n monitor = new PerfStringVariableMonitor(name, supported,\n bb, vectorLength-1);\n } else {\n // Monotonically increasing byte arrays are not supported\n throw new MonitorDataException(\n \"Invalid variability attribute:\"\n + \" entry index = \" + perfDataItem\n + \" name = \" + name\n + \" variability = \" + v);\n }\n perfDataItem++;\n } else {\n // bad data types.\n throw new MonitorTypeException(\n \"Invalid Monitor type:\" + \" entry index = \"\n + perfDataItem + \" name = \" + name\n + \" type = \" + dataType);\n }\n }\n\n // setup index to next entry for next iteration of the loop.\n nextEntry = entryStart + entryLength;\n return monitor;\n }", "private synchronized EventType scheduleNextEvent()\n {\n Date today = new Date();\n Date today_sunrise = ss.getSunrise(latitude, longitude);\n Date today_sunset = ss.getSunset(latitude, longitude);\n Date today_off = ss.getOff(off);\n\n // get sunrise and sunset time for tomorrow\n Calendar tomorrow = Calendar.getInstance();\n tomorrow.roll(Calendar.DATE, true);\n Date tomorrow_sunrise = ss.getSunrise(latitude, longitude, tomorrow.getTime());\n Date tomorrow_sunset = ss.getSunset(latitude, longitude, tomorrow.getTime());\n Date tomorrow_off = ss.getOff(off);\n\n // determine if sunrise or sunset is the next event\n if (today.after(today_sunset)) {\n // get tomorrow's date time\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + tomorrow_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule tomorrow's sunrise as next event\n timer.schedule(new SunriseTask(), tomorrow_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = tomorrow_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else if (today.after(today_sunrise)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNSET \");\n System.out.println(\" @ \" + today_sunset);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_sunset);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunsetToday;\n return nextEvent;\n } else if (today.after(today_off)) {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: OFF \");\n System.out.println(\" @ \" + today_off);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunset as next event\n timer.schedule(new SunsetTask(), today_off);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = tomorrow_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseTomorrow;\n return nextEvent;\n } else {\n System.out.println(\"-----------------------------------\");\n System.out.println(\"[SCHEDULED] NEXT EVENT: SUNRISE \");\n System.out.println(\" @ \" + today_sunrise);\n System.out.println(\"-----------------------------------\");\n\n // schedule sunrise as next event\n timer.schedule(new SunriseTask(), today_sunrise);\n\n // set cache next sunrise and sunset variables\n nextSunriseDate = today_sunrise;\n nextSunsetDate = today_sunset;\n\n // return next event\n nextEvent = EventType.SunriseToday;\n return nextEvent;\n }\n }", "public Page getNextPageObject() {\n return getPageObject(this.currentIndex.viewIndex + 1);\n }", "public T getNextElement();", "public com.avaya.sce.runtime.Next getNext(com.avaya.sce.runtimecommon.SCESession mySession) {\n\t\tcom.avaya.sce.runtime.Next next = null;\n\t\treturn next;\n\t}", "@Override\n\t\tpublic Item next() {\n\t\t\tItem item=current.item;\n\t\t\tcurrent=current.next;\n\t\t\treturn item;\n\t\t}", "public emxPDFDocument_mxJPO getNext()\r\n {\r\n /*\r\n * Author : DJ\r\n * Date : 02/04/2003\r\n * Notes :\r\n * History :\r\n */\r\n return (emxPDFDocument_mxJPO)super.removeFirst();\r\n }", "public TimedVariable findNext(Date ref)\n\t{\n\t\tif (vars.isEmpty())\n\t\t\treturn null;\n\t\tint sz = vars.size();\n\n\t\tTimedVariable dummy = new TimedVariable(0);\n\t\tdummy.setTime(ref);\n\t\tint idx = Collections.binarySearch(vars, dummy, tvComparator);\n\n\t\tif (idx < 0)\n\t\t\tidx = (-idx) - 1;\n\t\telse // the exact time was found. Increment to the next value\n\t\t\tidx++;\n\t\t\n\t\tif (idx < sz)\n\t\t\treturn vars.get(idx);\n\t\telse\n\t\t\treturn null;\n\t}", "public T caseRegulationSchedule(RegulationSchedule object) {\n\t\treturn null;\n\t}", "TimerSchedule createTimerSchedule();", "private Board nextBoard () {\n while (!hasExhaustedDirections()) {\n getNextMove();\n directions_checked++;\n if (inBounds(move)) {\n return createMovedBoard(free, move);\n }\n }\n return null;\n }", "public Processo next() {\n Node temp = first;\n if (first == null) {\n last = null;\n }\n return temp.processo;\n }", "public KThread nextThread() \n\t\t{\n\t\t\tLib.assertTrue(Machine.interrupt().disabled());\n\t\t\tif (waitQueue.isEmpty())\n\t\t\t{\n\t\t\t\towner=null;\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\towner=waitQueue.peek(); //Set the head of the waitQueue as owner\n\t\t\tThreadState waiterState = getThreadState(owner);\n\t\t\tgetThreadState(owner).acquire(this); //Make the new owner acquire the queue\n\t\t\treturn waitQueue.poll(); //return next thread\n\t\t}", "public synchronized Event getNextEvent() {\n\t\twhile (queue.isEmpty()) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t\treturn queue.pop();\n\t}", "public Card getNextCard(){\n if(mCardIterator.hasNext()) {\n return mCardIterator.next();\n }\n else {\n return null;\n }\n }", "private E next() {\n\t\tif (hasNext()) {\n\t\t\tE temp = iterator.data;\n\t\t\titerator = iterator.next;\n\t\t\treturn temp;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public T next()\n {\n T data = current.item;\n current = current.next;\n return data;\n }", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public java.sql.Timestamp getNextAnchor() {\n return nextAnchor;\n }", "@Override\n public Iterator<ScheduledTask> iterator() {\n return new Iterator<ScheduledTask>() {\n private PartialSolution current = PartialSolution.this;\n\n @Override\n public boolean hasNext() {\n return current.getScheduledTask() != null;\n }\n\n @Override\n public ScheduledTask next() {\n ScheduledTask thisTask = current.getScheduledTask();\n if (current.getParent() != null) {\n current = current.getParent();\n }\n return thisTask;\n }\n };\n }", "public int get_next(boolean optimized) {\n\t\tint id = future_moves.get(0).get(0);\n\t\tfuture_moves.remove(0);\n\t\treturn id;\n\t\t\n\t}", "@Override\r\n\t\t\tpublic Square next() {\r\n\t\t\t\treturn master.next().getValue();\r\n\t\t\t}", "public Car getNextCar() {\n Optional<AssignCar> minOfAssigned = assignList.stream()\n .min(Comparator.comparingDouble(AssignCar::getAssignedCount));\n if (minOfAssigned.isPresent()) {\n AssignCar assignCar = minOfAssigned.get();\n assignCar.incrementAssign();\n return assignCar.getCar();\n }\n throw new IllegalStateException(\"Assign stream is empty\");\n }", "IEmpleado next();", "@Override\r\n\t\t\tpublic SimpleEntry<Point, Square> nextEntry() {\r\n\t\t\t\tMap.Entry<Point, Square> e = master.next();\r\n\t\t\t\treturn new SimpleEntry<Point, Square>(e.getKey(), e.getValue());\r\n\t\t\t}", "public Prism getNext() {\r\n\t\treturn next;\r\n\t}", "public IDLink<T> getNext(){\n \treturn npointer;\n }", "public synchronized Object acquireObject()\n throws DBPoolException {\n try {\n // if the maximum amount of instances are in use\n // wait until an instance has been released back\n // to the pool or 20 seconds has passed\n long timediff = 0;\n while ( in_use.size() == getMaxInstances() && timediff < 20000 ) {\n Thread.sleep( 100 );\n timediff += 100;\n }\n // if no instance has been released within 20 seconds\n // or can newly be instantiated return null\n if ( timediff >= 20000 )\n return null;\n\n // if a none used is available from the pool\n if ( available.size() > 0 ) {\n\n // get/remove ojebct from the pool\n Object o = available.remove( available.size() - 1 );\n if ( ( (Connection) o ).isClosed() ) {\n startLifeTime.remove( o );\n o = acquireObject();\n }\n\n // add it to 'in use' container\n if ( !in_use.contains( o ) )\n in_use.add( o );\n\n // reset its start life time\n startLifeTime.put( o, new Long( System.currentTimeMillis() ) );\n // set the start of its usage\n startUsageTime.put( o, new Long( System.currentTimeMillis() ) );\n\n // return the object\n return o;\n\n }\n // else instatiate a new object\n // create a new class instance\n DriverManager.registerDriver( (Driver) Class.forName( driver ).newInstance() );\n\n Properties prop = (Properties) properties.clone();\n Object connection = DriverManager.getConnection( database, prop );\n\n existingInstances++;\n\n // add it to 'in use' container\n in_use.add( connection );\n // set the start of its life time\n startLifeTime.put( connection, new Long( System.currentTimeMillis() ) );\n // set the start of its usage\n startUsageTime.put( connection, new Long( System.currentTimeMillis() ) );\n // return the object\n return connection;\n } catch ( Exception e ) {\n e.printStackTrace();\n throw new DBPoolException( \"Error while acquiring connection: \" + e.getMessage(), e );\n }\n }" ]
[ "0.6758109", "0.6081504", "0.566038", "0.55571777", "0.5543304", "0.5506778", "0.5480582", "0.5470262", "0.54657716", "0.5437411", "0.5398382", "0.5351511", "0.53480387", "0.53218234", "0.53212875", "0.5279082", "0.5279082", "0.52775353", "0.5273646", "0.52653754", "0.52235997", "0.5202682", "0.5167443", "0.5152542", "0.5140313", "0.5133249", "0.51250786", "0.51117617", "0.5107359", "0.5105822", "0.5097745", "0.5089319", "0.50814146", "0.5074192", "0.5057853", "0.5053313", "0.5042701", "0.50216913", "0.5005198", "0.5003393", "0.50004673", "0.4992936", "0.49802935", "0.49728948", "0.496566", "0.49627268", "0.49620512", "0.49575114", "0.4947139", "0.49357465", "0.49307463", "0.49274963", "0.49232703", "0.4918479", "0.49084228", "0.49081215", "0.4897859", "0.4897204", "0.48960668", "0.48956707", "0.48938885", "0.48866612", "0.48830646", "0.48813465", "0.48726663", "0.4852641", "0.48493353", "0.48486236", "0.482091", "0.48196155", "0.4819118", "0.481728", "0.48136452", "0.4803741", "0.48016003", "0.4800105", "0.4798235", "0.47939447", "0.47919446", "0.47853094", "0.4773321", "0.47707492", "0.47581553", "0.4758093", "0.4755325", "0.47545898", "0.47544283", "0.47528154", "0.47517014", "0.47502112", "0.4749997", "0.47494787", "0.47462162", "0.47443795", "0.47394615", "0.4738368", "0.47325382", "0.47309685", "0.4730099", "0.47282705" ]
0.72953314
0